User: hr      
Date: 2007-08-02 14:41:18+0000
Modified:
   dba/reportdesign/source/ui/report/ViewsWindow.cxx

Log:
 INTEGRATION: CWS rpt23fix01 (1.2.2); FILE MERGED
 2007/07/16 07:49:01 lla 1.2.2.3: #77986# toolbar fix
 2007/07/11 11:29:54 oj 1.2.2.2: #i77157# impl center as well
 2007/07/11 11:22:40 oj 1.2.2.1: #i77157# impl center as well

File Changes:

Directory: /dba/reportdesign/source/ui/report/
==============================================

File [changed]: ViewsWindow.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/report/ViewsWindow.cxx?r1=1.2&r2=1.3
Delta lines:  +31 -9
--------------------
--- ViewsWindow.cxx     2007-07-09 11:56:33+0000        1.2
+++ ViewsWindow.cxx     2007-08-02 14:41:16+0000        1.3
@@ -76,6 +76,8 @@
 #ifndef _REPORT_RPTUICLIP_HXX
 #include "dlgedclip.hxx"
 #endif
+#include "RptObject.hxx"
+#include "RptObject.hxx"
 #ifndef _RPTUI_MODULE_HELPER_RPT_HXX_
 #include "ModuleHelper.hxx"
 #endif
@@ -146,11 +148,17 @@
                         bMoveAllowed = _nYMov != nYTemp;
                         break;
                     case ControlModification::CENTER_HORIZONTAL:
-                        nXTemp += aOverlappingRect.Center().X() - 
aNewRect.Center().X();
+                        if ( _aObjRect.Left() < aOverlappingRect.Left() )
+                            nXTemp += aOverlappingRect.Left() - 
aNewRect.Left() - aNewRect.getWidth();
+                        else
+                            nXTemp += aOverlappingRect.Right() - 
aNewRect.Left();
                         bMoveAllowed = _nXMov != nXTemp;
                         break;
                     case ControlModification::CENTER_VERTICAL:
-                        nYTemp += aOverlappingRect.Center().Y() - 
aNewRect.Center().Y();
+                        if ( _aObjRect.Top() < aOverlappingRect.Top() )
+                            nYTemp += aOverlappingRect.Top() - aNewRect.Top() 
- aNewRect.getHeight();
+                        else
+                            nYTemp += aOverlappingRect.Bottom() - 
aNewRect.Top();
                         bMoveAllowed = _nYMov != nYTemp;
                         break;
                     case ControlModification::HEIGHT_GREATEST:
@@ -505,6 +513,11 @@
     m_sShapeType = _sShapeType;
 }
 //----------------------------------------------------------------------------
+rtl::OUString OViewsWindow::GetInsertObjString() const
+{
+       return m_sShapeType;
+}
+
 
//------------------------------------------------------------------------------
 void OViewsWindow::SetMode( DlgEdMode eNewMode )
 {
@@ -1047,10 +1060,19 @@
                     case ControlModification::WIDTH_SMALLEST:
                     case ControlModification::HEIGHT_SMALLEST:
                         pView->AddUndo( 
pView->GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pObj));
+                        {
+                            OObjectBase* pObjBase = 
dynamic_cast<OObjectBase*>(pObj);
+                            OSL_ENSURE(pObjBase,"Where comes this object 
from?");
+                            if ( pObjBase )
+                            {
                         if ( _nControlModification == 
ControlModification::WIDTH_SMALLEST || _nControlModification == 
ControlModification::WIDTH_GREATEST )
-                            
pObj->Resize(aObjRect.TopLeft(),Fraction(nXMov,aObjRect.getWidth()),Fraction(1,1));
+                                    
pObjBase->getReportComponent()->setSize(awt::Size(nXMov,aObjRect.getWidth()));
+                                    
//pObj->Resize(aObjRect.TopLeft(),Fraction(nXMov,aObjRect.getWidth()),Fraction(1,1));
                         else if ( _nControlModification == 
ControlModification::HEIGHT_GREATEST || _nControlModification == 
ControlModification::HEIGHT_SMALLEST )
-                            
pObj->Resize(aObjRect.TopLeft(),Fraction(1,1),Fraction(nYMov,aObjRect.getHeight()));
+                                    
pObjBase->getReportComponent()->setSize(awt::Size(nYMov,aObjRect.getHeight()));
+                                    
//pObj->Resize(aObjRect.TopLeft(),Fraction(1,1),Fraction(nYMov,aObjRect.getHeight()));
+                            }
+                        }
                         break;
                                    default: 
                         break;




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to