[Libreoffice-commits] .: Branch 'integration/dev300_m101' - chart2/source

Kohei Yoshida kohei at kemper.freedesktop.org
Mon Mar 14 11:14:48 PDT 2011


 chart2/source/controller/dialogs/tp_ChartType.cxx          |    3 -
 chart2/source/controller/dialogs/tp_PolarOptions.cxx       |    2 -
 chart2/source/controller/dialogs/tp_Scale.hrc              |    1 
 chart2/source/controller/main/ChartController.cxx          |   20 ++++------
 chart2/source/controller/main/ChartController_TextEdit.cxx |    2 -
 chart2/source/controller/main/ChartController_Tools.cxx    |    2 -
 chart2/source/controller/main/ChartController_Window.cxx   |   26 ++++++-------
 chart2/source/controller/main/ShapeController.cxx          |   22 +++++------
 chart2/source/view/charttypes/PieChart.cxx                 |    1 
 9 files changed, 36 insertions(+), 43 deletions(-)

New commits:
commit 7967e36a81e406aee18f796e5db7fc4b41da75b7
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Mon Mar 14 13:50:33 2011 -0400

    Various, mostly mutex-related build breakage fixes & warning removals.

diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx
index eeedd85..86f89ae 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.cxx
+++ b/chart2/source/controller/dialogs/tp_ChartType.cxx
@@ -1080,8 +1080,7 @@ void ChartTypeTabPage::fillAllControls( const ChartTypeParameter& rParameter, bo
     m_nChangingCalls++;
     if( m_pCurrentMainType && bAlsoResetSubTypeList )
     {
-        bool bIsHighContrast = ( true && GetSettings().GetStyleSettings().GetHighContrastMode() );
-        m_pCurrentMainType->fillSubTypeList( m_aSubTypeList, bIsHighContrast, rParameter );
+        m_pCurrentMainType->fillSubTypeList( m_aSubTypeList, rParameter );
     }
     m_aSubTypeList.SelectItem( static_cast<sal_uInt16>( rParameter.nSubTypeIndex) );
     m_pAxisTypeResourceGroup->fillControls( rParameter );
diff --git a/chart2/source/controller/dialogs/tp_PolarOptions.cxx b/chart2/source/controller/dialogs/tp_PolarOptions.cxx
index 55cb880..d163de2 100644
--- a/chart2/source/controller/dialogs/tp_PolarOptions.cxx
+++ b/chart2/source/controller/dialogs/tp_PolarOptions.cxx
@@ -87,11 +87,9 @@ void PolarOptionsTabPage::Reset(const SfxItemSet& rInAttrs)
 {
     const SfxPoolItem *pPoolItem = NULL;
 
-    long nTmp;
     if (rInAttrs.GetItemState(SCHATTR_STARTING_ANGLE, sal_True, &pPoolItem) == SFX_ITEM_SET)
     {
         long nTmp = (long)((const SfxInt32Item*)pPoolItem)->GetValue();
-
         m_aAngleDial.SetRotation( nTmp*100 );
     }
     else
diff --git a/chart2/source/controller/dialogs/tp_Scale.hrc b/chart2/source/controller/dialogs/tp_Scale.hrc
index 83d2e27..af1067a 100644
--- a/chart2/source/controller/dialogs/tp_Scale.hrc
+++ b/chart2/source/controller/dialogs/tp_Scale.hrc
@@ -60,4 +60,3 @@
 #define LB_HELP_TIME_UNIT   3
 #define LB_TIME_RESOLUTION  4
 
-#define STR_LIST_TIME_UNIT  1
diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx
index 1cc3f3c..e69312d 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -472,7 +472,7 @@ void SAL_CALL ChartController::modeChanged( const util::ModeChangeEvent& rEvent
     if( rEvent.NewMode.equals(C2U("dirty")) )
     {
         //the view has become dirty, we should repaint it if we have a window
-        ::vos::OGuard aGuard( Application::GetSolarMutex() );
+        SolarMutexGuard aGuard;
         if( m_pChartWindow )
             m_pChartWindow->ForceInvalidate();
     }
@@ -516,7 +516,7 @@ void SAL_CALL ChartController::modeChanged( const util::ModeChangeEvent& rEvent
                     impl_initializeAccessible();
 
                     {
-                        ::vos::OGuard aGuard( Application::GetSolarMutex() );
+                        SolarMutexGuard aGuard;
                         if( m_pChartWindow )
                             m_pChartWindow->Invalidate();
                     }
@@ -528,8 +528,7 @@ void SAL_CALL ChartController::modeChanged( const util::ModeChangeEvent& rEvent
     }
 }
 
-        sal_Bool SAL_CALL ChartController
-::attachModel( const uno::Reference< frame::XModel > & xModel )
+sal_Bool SAL_CALL ChartController::attachModel( const uno::Reference< frame::XModel > & xModel )
         throw(uno::RuntimeException)
 {
     impl_invalidateAccessible();
@@ -537,12 +536,11 @@ void SAL_CALL ChartController::modeChanged( const util::ModeChangeEvent& rEvent
     //is called to attach the controller to a new model.
     //return true if attach was successfully, false otherwise (e.g. if you do not work with a model)
 
-    SolarMutexGuard aGuard;
+    SolarMutexClearableGuard aClearableGuard;
     if( impl_isDisposedOrSuspended() ) //@todo? allow attaching a new model while suspended?
         return sal_False; //behave passive if already disposed or suspended
     aClearableGuard.clear();
 
-
     TheModelRef aNewModelRef( new TheModel( xModel), m_aModelMutex);
     TheModelRef aOldModelRef(m_aModel,m_aModelMutex);
     m_aModel = aNewModelRef;
@@ -611,7 +609,7 @@ void SAL_CALL ChartController::modeChanged( const util::ModeChangeEvent& rEvent
 
     //the frameloader is responsible to call xModel->connectController
     {
-        ::vos::OGuard aGuard( Application::GetSolarMutex() );
+        SolarMutexGuard aGuard;
         if( m_pChartWindow )
             m_pChartWindow->Invalidate();
     }
@@ -1088,7 +1086,7 @@ bool lcl_isFormatObjectCommand( const rtl::OString& aCommand )
     else if(aCommand.equals("Update")) //Update Chart
     {
         ChartViewHelper::setViewToDirtyState( getModel() );
-        ::vos::OGuard aGuard( Application::GetSolarMutex() );
+        SolarMutexGuard aGuard;
         if( m_pChartWindow )
             m_pChartWindow->Invalidate();
     }
@@ -1454,7 +1452,7 @@ uno::Reference< XAccessible > ChartController::CreateAccessible()
 
 void ChartController::impl_invalidateAccessible()
 {
-    ::vos::OGuard aGuard( Application::GetSolarMutex() );
+    SolarMutexGuard aGuard;
     if( m_pChartWindow )
     {
         Reference< lang::XInitialization > xInit( m_pChartWindow->GetAccessible(false), uno::UNO_QUERY );
@@ -1467,7 +1465,7 @@ void ChartController::impl_invalidateAccessible()
 }
 void ChartController::impl_initializeAccessible()
 {
-    ::vos::OGuard aGuard( Application::GetSolarMutex() );
+    SolarMutexGuard aGuard;
     if( m_pChartWindow )
         this->impl_initializeAccessible( Reference< lang::XInitialization >( m_pChartWindow->GetAccessible(false), uno::UNO_QUERY ) );
 }
@@ -1483,7 +1481,7 @@ void ChartController::impl_initializeAccessible( const uno::Reference< lang::XIn
         aArguments[2]=uno::makeAny(m_xChartView);
         uno::Reference< XAccessible > xParent;
         {
-            ::vos::OGuard aGuard( Application::GetSolarMutex() );
+            SolarMutexGuard aGuard;
             if( m_pChartWindow )
             {
                 Window* pParentWin( m_pChartWindow->GetAccessibleParentWindow());
diff --git a/chart2/source/controller/main/ChartController_TextEdit.cxx b/chart2/source/controller/main/ChartController_TextEdit.cxx
index 16ec0b8..a1f7a8b 100644
--- a/chart2/source/controller/main/ChartController_TextEdit.cxx
+++ b/chart2/source/controller/main/ChartController_TextEdit.cxx
@@ -77,7 +77,7 @@ void ChartController::StartTextEdit( const Point* pMousePixel )
 {
     //the first marked object will be edited
 
-    ::vos::OGuard aGuard( Application::GetSolarMutex() );
+    SolarMutexGuard aGuard;
     SdrObject* pTextObj = m_pDrawViewWrapper->getTextEditObject();
     if(!pTextObj)
         return;
diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx
index b6ad450..4b70cfc 100644
--- a/chart2/source/controller/main/ChartController_Tools.cxx
+++ b/chart2/source/controller/main/ChartController_Tools.cxx
@@ -257,7 +257,7 @@ void ChartController::executeDispatch_ScaleText()
 
 void ChartController::executeDispatch_Paste()
 {
-    ::vos::OGuard aGuard( Application::GetSolarMutex() );
+    SolarMutexGuard aGuard;
     if( m_pChartWindow )
     {
         Graphic aGraphic;
diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx
index be00da1..bee0060 100644
--- a/chart2/source/controller/main/ChartController_Window.cxx
+++ b/chart2/source/controller/main/ChartController_Window.cxx
@@ -244,7 +244,7 @@ const short HITPIX=2; //hit-tolerance in pixel
             , sal_Int32 Width, sal_Int32 Height, sal_Int16 Flags )
             throw (uno::RuntimeException)
 {
-    ::vos::OGuard aGuard( Application::GetSolarMutex() );
+    SolarMutexGuard aGuard;
     uno::Reference<awt::XWindow> xWindow = m_xViewWindow;
     
     if(xWindow.is() && m_pChartWindow)
@@ -562,7 +562,7 @@ bool isDoubleClick( const MouseEvent& rMEvt )
 
 void ChartController::startDoubleClickWaiting()
 {
-    ::vos::OGuard aGuard( Application::GetSolarMutex() );
+    SolarMutexGuard aGuard;
 
     m_bWaitingForDoubleClick = true;
 
@@ -589,7 +589,7 @@ IMPL_LINK( ChartController, DoubleClickWaitingHdl, void*, EMPTYARG )
     if( !m_bWaitingForMouseUp && m_aSelection.maybeSwitchSelectionAfterSingleClickWasEnsured() )
     {
         this->impl_selectObjectAndNotiy();
-        ::vos::OGuard aGuard( Application::GetSolarMutex() );
+        SolarMutexGuard aGuard;
         if( m_pChartWindow )
         {
             Window::PointerState aPointerState( m_pChartWindow->GetPointerState() );
@@ -977,7 +977,7 @@ void ChartController::execute_DoubleClick( const Point* pMousePixel )
 
 void ChartController::execute_Resize()
 {
-    ::vos::OGuard aGuard( Application::GetSolarMutex() );
+    SolarMutexGuard aGuard;
     if(m_pChartWindow)
         m_pChartWindow->Invalidate();
 }
@@ -1015,7 +1015,7 @@ void ChartController::execute_Command( const CommandEvent& rCEvt )
     if(rCEvt.GetCommand() == COMMAND_CONTEXTMENU && !bIsAction)
     {
         {
-            ::vos::OGuard aGuard( Application::GetSolarMutex() );
+            SolarMutexGuard aGuard;
             if(m_pChartWindow)
                 m_pChartWindow->ReleaseMouse();
         }
@@ -1032,7 +1032,7 @@ void ChartController::execute_Command( const CommandEvent& rCEvt )
             Point aPos( rCEvt.GetMousePosPixel() );
             if( !rCEvt.IsMouseEvent() )
             {
-                ::vos::OGuard aGuard( Application::GetSolarMutex() );
+                SolarMutexGuard aGuard;
                 if(m_pChartWindow)
                     aPos = m_pChartWindow->GetPointerState().maPos;
             }
@@ -1296,7 +1296,7 @@ void ChartController::execute_Command( const CommandEvent& rCEvt )
                 Point aPos( rCEvt.GetMousePosPixel() );
                 if( !rCEvt.IsMouseEvent() )
                 {
-                    ::vos::OGuard aGuard( Application::GetSolarMutex() );
+                    SolarMutexGuard aGuard;
                     if(m_pChartWindow)
                         aPos = m_pChartWindow->GetPointerState().maPos;
                 }
@@ -1310,7 +1310,7 @@ void ChartController::execute_Command( const CommandEvent& rCEvt )
              ( rCEvt.GetCommand() == COMMAND_INPUTCONTEXTCHANGE ) )
     {
         //#i84417# enable editing with IME
-        ::vos::OGuard aGuard( Application::GetSolarMutex() );
+        SolarMutexGuard aGuard;
         if( m_pDrawViewWrapper )
             m_pDrawViewWrapper->Command( rCEvt, m_pChartWindow );
     }
@@ -1344,7 +1344,7 @@ bool ChartController::execute_KeyInput( const KeyEvent& rKEvt )
         return bReturn;
 
     {
-        ::vos::OGuard aGuard( Application::GetSolarMutex() );
+        SolarMutexGuard aGuard;
         if( pDrawViewWrapper->IsTextEdit() )
         {
             if( pDrawViewWrapper->KeyInput(rKEvt,m_pChartWindow) )
@@ -1446,7 +1446,7 @@ bool ChartController::execute_KeyInput( const KeyEvent& rKEvt )
                     if( bAlternate && m_pChartWindow )
                     {
                         // together with Alt-key: 1 px in each direction
-                        ::vos::OGuard aGuard( Application::GetSolarMutex() );
+                        SolarMutexGuard aGuard;
                         if( m_pChartWindow )
                         {
                             Size aPixelSize = m_pChartWindow->PixelToLogic( Size( 2, 2 ));
@@ -1477,7 +1477,7 @@ bool ChartController::execute_KeyInput( const KeyEvent& rKEvt )
                     if( bAlternate && m_pChartWindow )
                     {
                         // together with Alt-key: 1 px
-                        ::vos::OGuard aGuard( Application::GetSolarMutex() );
+                        SolarMutexGuard aGuard;
                         if(m_pChartWindow)
                         {
                             Size aPixelSize = m_pChartWindow->PixelToLogic( Size( 1, 1 ));
@@ -1574,7 +1574,7 @@ bool ChartController::execute_KeyInput( const KeyEvent& rKEvt )
         bReturn = executeDispatch_Delete();
         if( ! bReturn )
         {
-            ::vos::OGuard aGuard( Application::GetSolarMutex() );
+            SolarMutexGuard aGuard;
             InfoBox( m_pChartWindow, String(SchResId( STR_ACTION_NOTPOSSIBLE ))).Execute();
         }
     }
@@ -1733,7 +1733,7 @@ bool ChartController::requestQuickHelp(
 void ChartController::impl_selectObjectAndNotiy()
 {
     {
-        ::vos::OGuard aGuard( Application::GetSolarMutex() );
+        SolarMutexGuard aGuard;
         DrawViewWrapper* pDrawViewWrapper = m_pDrawViewWrapper;
         if( pDrawViewWrapper )
         {
diff --git a/chart2/source/controller/main/ShapeController.cxx b/chart2/source/controller/main/ShapeController.cxx
index 14eabe7..5c8dccb 100644
--- a/chart2/source/controller/main/ShapeController.cxx
+++ b/chart2/source/controller/main/ShapeController.cxx
@@ -263,7 +263,7 @@ IMPL_LINK( ShapeController, CheckNameHdl, AbstractSvxNameDialog*, pDialog )
 
 void ShapeController::executeDispatch_FormatLine()
 {
-    ::vos::OGuard aGuard( Application::GetSolarMutex() );
+    SolarMutexGuard aGuard;
     if ( m_pChartController )
     {
         Window* pParent = dynamic_cast< Window* >( m_pChartController->m_pChartWindow );
@@ -303,7 +303,7 @@ void ShapeController::executeDispatch_FormatLine()
 
 void ShapeController::executeDispatch_FormatArea()
 {
-    ::vos::OGuard aGuard( Application::GetSolarMutex() );
+    SolarMutexGuard aGuard;
     if ( m_pChartController )
     {
         Window* pParent = dynamic_cast< Window* >( m_pChartController->m_pChartWindow );
@@ -352,7 +352,7 @@ void ShapeController::executeDispatch_FormatArea()
 
 void ShapeController::executeDispatch_TextAttributes()
 {
-    ::vos::OGuard aGuard( Application::GetSolarMutex() );
+    SolarMutexGuard aGuard;
     if ( m_pChartController )
     {
         Window* pParent = dynamic_cast< Window* >( m_pChartController->m_pChartWindow );
@@ -389,7 +389,7 @@ void ShapeController::executeDispatch_TextAttributes()
 
 void ShapeController::executeDispatch_TransformDialog()
 {
-    ::vos::OGuard aGuard( Application::GetSolarMutex() );
+    SolarMutexGuard aGuard;
     if ( m_pChartController )
     {
         Window* pParent = dynamic_cast< Window* >( m_pChartController->m_pChartWindow );
@@ -446,7 +446,7 @@ void ShapeController::executeDispatch_TransformDialog()
 
 void ShapeController::executeDispatch_ObjectTitleDescription()
 {
-    ::vos::OGuard aGuard( Application::GetSolarMutex() );
+    SolarMutexGuard aGuard;
     if ( m_pChartController )
     {
         DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
@@ -477,7 +477,7 @@ void ShapeController::executeDispatch_ObjectTitleDescription()
 
 void ShapeController::executeDispatch_RenameObject()
 {
-    ::vos::OGuard aGuard( Application::GetSolarMutex() );
+    SolarMutexGuard aGuard;
     if ( m_pChartController )
     {
         DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
@@ -509,7 +509,7 @@ void ShapeController::executeDispatch_RenameObject()
 
 void ShapeController::executeDispatch_ChangeZOrder( sal_uInt16 nId )
 {
-    ::vos::OGuard aGuard( Application::GetSolarMutex() );
+    SolarMutexGuard aGuard;
     DrawViewWrapper* pDrawViewWrapper = ( m_pChartController ? m_pChartController->GetDrawViewWrapper() : NULL );
     if ( pDrawViewWrapper )
     {
@@ -558,7 +558,7 @@ void ShapeController::executeDispatch_ChangeZOrder( sal_uInt16 nId )
 
 void ShapeController::executeDispatch_FontDialog()
 {
-    ::vos::OGuard aGuard( Application::GetSolarMutex() );
+    SolarMutexGuard aGuard;
     if ( m_pChartController )
     {
         Window* pParent = dynamic_cast< Window* >( m_pChartController->m_pChartWindow );
@@ -581,7 +581,7 @@ void ShapeController::executeDispatch_FontDialog()
 
 void ShapeController::executeDispatch_ParagraphDialog()
 {
-    ::vos::OGuard aGuard( Application::GetSolarMutex() );
+    SolarMutexGuard aGuard;
     if ( m_pChartController )
     {
         Window* pParent = dynamic_cast< Window* >( m_pChartController->m_pChartWindow );
@@ -701,7 +701,7 @@ bool ShapeController::isBackwardPossible()
 {
     if ( m_pChartController && m_pChartController->m_aSelection.isAdditionalShapeSelected() )
     {
-        ::vos::OGuard aGuard( Application::GetSolarMutex() );
+        SolarMutexGuard aGuard;
         DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
         if ( pDrawViewWrapper )
         {
@@ -720,7 +720,7 @@ bool ShapeController::isForwardPossible()
 {
     if ( m_pChartController && m_pChartController->m_aSelection.isAdditionalShapeSelected() )
     {
-        ::vos::OGuard aGuard( Application::GetSolarMutex() );
+        SolarMutexGuard aGuard;
         DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
         if ( pDrawViewWrapper )
         {
diff --git a/chart2/source/view/charttypes/PieChart.cxx b/chart2/source/view/charttypes/PieChart.cxx
index e5ec25d..ffb8f59 100644
--- a/chart2/source/view/charttypes/PieChart.cxx
+++ b/chart2/source/view/charttypes/PieChart.cxx
@@ -393,7 +393,6 @@ void PieChart::createShapes()
             if( !bIsVisible )
                 continue;
 
-            double fLogicZ = -1.0;//as defined
             double fDepth  = this->getTransformedDepth();
 
             uno::Reference< drawing::XShapes > xSeriesGroupShape_Shapes = getSeriesGroupShape(pSeries, xSeriesTarget);


More information about the Libreoffice-commits mailing list