summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorIngrid Halama <iha@openoffice.org>2011-03-04 20:16:58 +0100
committerIngrid Halama <iha@openoffice.org>2011-03-04 20:16:58 +0100
commit6b4fa7ab87c548c6e8e2a71c33a9e92cc8e194de (patch)
treede076720e359bfc233571e3d35238d58218c4ec1 /chart2
parente3e1ee8f961c0ae9417d427e3214dfd00bcb8160 (diff)
chart55: #i117185# correct object size
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/main/ChartController_Position.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/chart2/source/controller/main/ChartController_Position.cxx b/chart2/source/controller/main/ChartController_Position.cxx
index 37cbdbb30f6b..d42d3112f67c 100644
--- a/chart2/source/controller/main/ChartController_Position.cxx
+++ b/chart2/source/controller/main/ChartController_Position.cxx
@@ -62,7 +62,7 @@ using namespace ::com::sun::star::chart2;
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void lcl_getPositionAndSizeFromItemSet( const SfxItemSet& rItemSet, Rectangle& rPosAndSize, const awt::Size aOriginalSize )
+void lcl_getPositionAndSizeFromItemSet( const SfxItemSet& rItemSet, awt::Rectangle& rPosAndSize, const awt::Size aOriginalSize )
{
long nPosX(0);
long nPosY(0);
@@ -121,7 +121,7 @@ void lcl_getPositionAndSizeFromItemSet( const SfxItemSet& rItemSet, Rectangle& r
break;
}
- rPosAndSize = Rectangle(Point(nPosX,nPosY),Size(nSizX,nSizY));
+ rPosAndSize = awt::Rectangle(nPosX,nPosY,nSizX,nSizY);
}
void SAL_CALL ChartController::executeDispatch_PositionAndSize()
@@ -166,19 +166,18 @@ void SAL_CALL ChartController::executeDispatch_PositionAndSize()
const SfxItemSet* pOutItemSet = pDlg->GetOutputItemSet();
if(pOutItemSet)
{
- Rectangle aObjectRect;
+ awt::Rectangle aObjectRect;
aItemSet.Put(*pOutItemSet);//overwrite old values with new values (-> all items are set)
lcl_getPositionAndSizeFromItemSet( aItemSet, aObjectRect, aSelectedSize );
awt::Size aPageSize( ChartModelHelper::getPageSize( getModel() ) );
- Rectangle aPageRect( 0,0,aPageSize.Width,aPageSize.Height );
+ awt::Rectangle aPageRect( 0,0,aPageSize.Width,aPageSize.Height );
bool bChanged = false;
if ( eObjectType == OBJECTTYPE_LEGEND )
bChanged = DiagramHelper::switchDiagramPositioningToExcludingPositioning( getModel(), false , true );
bool bMoved = PositionAndSizeHelper::moveObject( m_aSelection.getSelectedCID(), getModel()
- , awt::Rectangle(aObjectRect.getX(),aObjectRect.getY(),aObjectRect.getWidth(),aObjectRect.getHeight())
- , awt::Rectangle(aPageRect.getX(),aPageRect.getY(),aPageRect.getWidth(),aPageRect.getHeight()) );
+ , aObjectRect, aPageRect );
if( bMoved || bChanged )
aUndoGuard.commit();
}