diff options
author | Kohei Yoshida <kyoshida@novell.com> | 2011-03-10 16:55:21 -0500 |
---|---|---|
committer | Kohei Yoshida <kyoshida@novell.com> | 2011-03-10 20:21:13 -0500 |
commit | 12343c15568dcc2c9209d8ca41fda2263122448f (patch) | |
tree | 3212a89c6cd8ea2e0aee7103aa9669bbb8a6f307 /sc/source/ui/unoobj/chartuno.cxx | |
parent | 99745dbcbb25b61437914c9782475d0b67a4b0bd (diff) | |
parent | ce6308e4fad2281241bf4ca78280eba29f744d43 (diff) |
Merge commit 'ooo/DEV300_m101' into integration/dev300_m101
Diffstat (limited to 'sc/source/ui/unoobj/chartuno.cxx')
-rw-r--r-- | sc/source/ui/unoobj/chartuno.cxx | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/sc/source/ui/unoobj/chartuno.cxx b/sc/source/ui/unoobj/chartuno.cxx index fd5b97c88fde..db07ccda9d38 100644 --- a/sc/source/ui/unoobj/chartuno.cxx +++ b/sc/source/ui/unoobj/chartuno.cxx @@ -208,11 +208,11 @@ void SAL_CALL ScChartsObj::addNewByName( const rtl::OUString& aName, } ScRangeList* pList = new ScRangeList; - USHORT nRangeCount = (USHORT)aRanges.getLength(); + sal_uInt16 nRangeCount = (sal_uInt16)aRanges.getLength(); if (nRangeCount) { const table::CellRangeAddress* pAry = aRanges.getConstArray(); - for (USHORT i=0; i<nRangeCount; i++) + for (sal_uInt16 i=0; i<nRangeCount; i++) { ScRange aRange( static_cast<SCCOL>(pAry[i].StartColumn), pAry[i].StartRow, pAry[i].Sheet, static_cast<SCCOL>(pAry[i].EndColumn), pAry[i].EndRow, pAry[i].Sheet ); @@ -232,7 +232,8 @@ void SAL_CALL ScChartsObj::addNewByName( const rtl::OUString& aName, // Rechteck anpassen //! Fehler/Exception, wenn leer/ungueltig ??? Point aRectPos( aRect.X, aRect.Y ); - if (aRectPos.X() < 0) aRectPos.X() = 0; + bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); + if ( ( aRectPos.X() < 0 && !bLayoutRTL ) || ( aRectPos.X() > 0 && bLayoutRTL ) ) aRectPos.X() = 0; if (aRectPos.Y() < 0) aRectPos.Y() = 0; Size aRectSize( aRect.Width, aRect.Height ); if (aRectSize.Width() <= 0) aRectSize.Width() = 5000; // Default-Groesse @@ -314,7 +315,7 @@ void SAL_CALL ScChartsObj::removeByName( const rtl::OUString& aName ) ScDrawLayer* pModel = pDoc->GetDrawLayer(); // ist nicht 0 SdrPage* pPage = pModel->GetPage(static_cast<sal_uInt16>(nTab)); // ist nicht 0 - pModel->AddUndo( new SdrUndoRemoveObj( *pObj ) ); //! Undo-Kommentar? + pModel->AddUndo( new SdrUndoDelObj( *pObj ) ); pPage->RemoveObject( pObj->GetOrdNum() ); //! Notify etc.??? @@ -547,14 +548,14 @@ void ScChartObj::Update_Impl( const ScRangeListRef& rRanges, bool bColHeaders, b if (pDocShell) { ScDocument* pDoc = pDocShell->GetDocument(); - BOOL bUndo(pDoc->IsUndoEnabled()); + sal_Bool bUndo(pDoc->IsUndoEnabled()); if (bUndo) { pDocShell->GetUndoManager()->AddUndoAction( - new ScUndoChartData( pDocShell, aChartName, rRanges, bColHeaders, bRowHeaders, FALSE ) ); + new ScUndoChartData( pDocShell, aChartName, rRanges, bColHeaders, bRowHeaders, false ) ); } - pDoc->UpdateChartArea( aChartName, rRanges, bColHeaders, bRowHeaders, FALSE ); + pDoc->UpdateChartArea( aChartName, rRanges, bColHeaders, bRowHeaders, false ); } } @@ -608,7 +609,7 @@ void ScChartObj::getFastPropertyValue( uno::Any& rValue, sal_Int32 nHandle ) con if ( pDoc ) { ScRange aEmptyRange; - USHORT nIndex = 0; + sal_uInt16 nIndex = 0; ScChartListener aSearcher( aChartName, pDoc, aEmptyRange ); ScChartListenerCollection* pCollection = pDoc->GetChartListenerCollection(); if ( pCollection && pCollection->Search( &aSearcher, nIndex ) ) @@ -683,7 +684,7 @@ void SAL_CALL ScChartObj::setHasColumnHeaders( sal_Bool bHasColumnHeaders ) ScRangeListRef xRanges = new ScRangeList; bool bOldColHeaders, bOldRowHeaders; GetData_Impl( xRanges, bOldColHeaders, bOldRowHeaders ); - if ( bOldColHeaders != (bHasColumnHeaders != sal_False) ) + if ( bOldColHeaders != (bHasColumnHeaders != false) ) Update_Impl( xRanges, bHasColumnHeaders, bOldRowHeaders ); } @@ -703,7 +704,7 @@ void SAL_CALL ScChartObj::setHasRowHeaders( sal_Bool bHasRowHeaders ) ScRangeListRef xRanges = new ScRangeList; bool bOldColHeaders, bOldRowHeaders; GetData_Impl( xRanges, bOldColHeaders, bOldRowHeaders ); - if ( bOldRowHeaders != (bHasRowHeaders != sal_False) ) + if ( bOldRowHeaders != (bHasRowHeaders != false) ) Update_Impl( xRanges, bOldColHeaders, bHasRowHeaders ); } @@ -748,11 +749,11 @@ void SAL_CALL ScChartObj::setRanges( const uno::Sequence<table::CellRangeAddress GetData_Impl( xOldRanges, bColHeaders, bRowHeaders ); ScRangeList* pList = new ScRangeList; - USHORT nRangeCount = (USHORT)aRanges.getLength(); + sal_uInt16 nRangeCount = (sal_uInt16)aRanges.getLength(); if (nRangeCount) { const table::CellRangeAddress* pAry = aRanges.getConstArray(); - for (USHORT i=0; i<nRangeCount; i++) + for (sal_uInt16 i=0; i<nRangeCount; i++) { ScRange aRange( static_cast<SCCOL>(pAry[i].StartColumn), pAry[i].StartRow, pAry[i].Sheet, static_cast<SCCOL>(pAry[i].EndColumn), pAry[i].EndRow, pAry[i].Sheet ); |