[Libreoffice-commits] core.git: chart2/source

Jochen Nitschke j.nitschke+logerrit at ok.de
Wed Jul 13 07:27:10 UTC 2016


 chart2/source/controller/accessibility/AccessibleChartElement.cxx |    1 
 chart2/source/controller/dialogs/tp_RangeChooser.cxx              |    1 
 chart2/source/controller/main/ChartController.cxx                 |    2 -
 chart2/source/controller/main/ChartController_EditData.cxx        |    3 --
 chart2/source/controller/main/ChartController_Insert.cxx          |    1 
 chart2/source/controller/main/ChartController_Properties.cxx      |    3 --
 chart2/source/controller/main/ChartController_Tools.cxx           |    7 -----
 chart2/source/controller/main/UndoCommandDispatch.cxx             |   12 +---------
 chart2/source/model/template/ChartType.cxx                        |    4 ---
 chart2/source/model/template/NetChartType.cxx                     |    4 ---
 10 files changed, 7 insertions(+), 31 deletions(-)

New commits:
commit 5ce65d04fd3a6ca69be72e8415b74470c230f2e5
Author: Jochen Nitschke <j.nitschke+logerrit at ok.de>
Date:   Mon Jul 11 22:02:46 2016 +0200

    chart2: cleanup local var assignments
    
    and remove comments about a gcc 3.3 workaround.
    some comments went obsolete with other commits
    like 367105e0248c7b80b60b2554d04f5f248b4259b3
    
    Change-Id: I15fff464e2f71a6ade29c141bb17216770f54ced
    Reviewed-on: https://gerrit.libreoffice.org/27127
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/chart2/source/controller/accessibility/AccessibleChartElement.cxx b/chart2/source/controller/accessibility/AccessibleChartElement.cxx
index 6e24296..d94233a 100644
--- a/chart2/source/controller/accessibility/AccessibleChartElement.cxx
+++ b/chart2/source/controller/accessibility/AccessibleChartElement.cxx
@@ -169,7 +169,6 @@ Reference< awt::XFont > SAL_CALL AccessibleChartElement::getFont()
     CheckDisposeState();
 
     Reference< awt::XFont > xFont;
-    // using assignment for broken gcc 3.3
     Reference< awt::XDevice > xDevice( Reference< awt::XWindow >( GetInfo().m_xWindow ), uno::UNO_QUERY );
 
     if( xDevice.is())
diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.cxx b/chart2/source/controller/dialogs/tp_RangeChooser.cxx
index dbfdc38..f990f54 100644
--- a/chart2/source/controller/dialogs/tp_RangeChooser.cxx
+++ b/chart2/source/controller/dialogs/tp_RangeChooser.cxx
@@ -375,7 +375,6 @@ IMPL_LINK_NOARG_TYPED(RangeChooserTabPage, ControlChangedHdl, Edit&, void)
 IMPL_LINK_NOARG_TYPED(RangeChooserTabPage, ChooseRangeHdl, Button*, void)
 {
     OUString aRange = m_pED_Range->GetText();
-    // using assignment for broken gcc 3.3
     OUString aTitle = m_pFTTitle->GetText();
 
     lcl_enableRangeChoosing( true, m_pParentDialog );
diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx
index cd86b36..a925bbb 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -1382,7 +1382,7 @@ void ChartController::executeDispatch_SourceData()
     if( !xChartDoc.is())
         return;
 
-    UndoLiveUpdateGuard aUndoGuard = UndoLiveUpdateGuard(
+    UndoLiveUpdateGuard aUndoGuard(
         SCH_RESSTR(STR_ACTION_EDIT_DATA_RANGES), m_xUndoManager );
     if( xChartDoc.is())
     {
diff --git a/chart2/source/controller/main/ChartController_EditData.cxx b/chart2/source/controller/main/ChartController_EditData.cxx
index 669baea..646a27a 100644
--- a/chart2/source/controller/main/ChartController_EditData.cxx
+++ b/chart2/source/controller/main/ChartController_EditData.cxx
@@ -49,8 +49,7 @@ void ChartController::executeDispatch_EditData()
 
         {
             SolarMutexGuard aSolarGuard;
-            // using assignment for broken gcc 3.3
-            UndoLiveUpdateGuardWithData aUndoGuard = UndoLiveUpdateGuardWithData(
+            UndoLiveUpdateGuardWithData aUndoGuard(
                 SCH_RESSTR( STR_ACTION_EDIT_CHART_DATA ),
                 m_xUndoManager );
             ScopedVclPtrInstance<DataEditor> aDataEditorDialog( nullptr, xChartDoc, m_xCC );
diff --git a/chart2/source/controller/main/ChartController_Insert.cxx b/chart2/source/controller/main/ChartController_Insert.cxx
index 3b00265..fd0cda1 100644
--- a/chart2/source/controller/main/ChartController_Insert.cxx
+++ b/chart2/source/controller/main/ChartController_Insert.cxx
@@ -531,7 +531,6 @@ void ChartController::executeDispatch_InsertTrendlineEquation( bool bInsertR2 )
         uno::Reference< beans::XPropertySet > xEqProp( xRegCurve->getEquationProperties());
         if( xEqProp.is())
         {
-            // using assignment for broken gcc 3.3
             UndoGuard aUndoGuard(
                 ActionDescriptionProvider::createDescription(
                     ActionDescriptionProvider::INSERT, SCH_RESSTR( STR_OBJECT_CURVE_EQUATION )),
diff --git a/chart2/source/controller/main/ChartController_Properties.cxx b/chart2/source/controller/main/ChartController_Properties.cxx
index 43d9ca1..521acb4 100644
--- a/chart2/source/controller/main/ChartController_Properties.cxx
+++ b/chart2/source/controller/main/ChartController_Properties.cxx
@@ -817,8 +817,7 @@ void ChartController::executeDispatch_View3D()
 {
     try
     {
-        // using assignment for broken gcc 3.3
-        UndoLiveUpdateGuard aUndoGuard = UndoLiveUpdateGuard(
+        UndoLiveUpdateGuard aUndoGuard(
             SCH_RESSTR( STR_ACTION_EDIT_3D_VIEW ),
             m_xUndoManager );
 
diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx
index c3cc7a7..3cc97af 100644
--- a/chart2/source/controller/main/ChartController_Tools.cxx
+++ b/chart2/source/controller/main/ChartController_Tools.cxx
@@ -178,7 +178,6 @@ void ChartController::executeDispatch_NewArrangement()
         Reference< chart2::XDiagram > xDiagram( ChartModelHelper::findDiagram( xModel ));
         if( xDiagram.is())
         {
-            // using assignment for broken gcc 3.3
             UndoGuard aUndoGuard(
                 SCH_RESSTR( STR_ACTION_REARRANGE_CHART ),
                 m_xUndoManager );
@@ -234,7 +233,6 @@ void ChartController::executeDispatch_NewArrangement()
 void ChartController::executeDispatch_ScaleText()
 {
     SolarMutexGuard aSolarGuard;
-    // using assignment for broken gcc 3.3
     UndoGuard aUndoGuard(
         SCH_RESSTR( STR_ACTION_SCALE_TEXT ),
         m_xUndoManager );
@@ -615,7 +613,6 @@ bool ChartController::executeDispatch_Delete()
         {
             case OBJECTTYPE_TITLE:
             {
-                // using assignment for broken gcc 3.3
                 UndoGuard aUndoGuard(
                     ActionDescriptionProvider::createDescription(
                         ActionDescriptionProvider::DELETE, SCH_RESSTR( STR_OBJECT_TITLE )),
@@ -634,7 +631,6 @@ bool ChartController::executeDispatch_Delete()
                     uno::Reference< beans::XPropertySet > xLegendProp( xDiagram->getLegend(), uno::UNO_QUERY );
                     if( xLegendProp.is())
                     {
-                        // using assignment for broken gcc 3.3
                         UndoGuard aUndoGuard(
                             ActionDescriptionProvider::createDescription(
                                 ActionDescriptionProvider::DELETE, SCH_RESSTR( STR_OBJECT_LEGEND )),
@@ -681,7 +677,6 @@ bool ChartController::executeDispatch_Delete()
                         ObjectIdentifier::getFullParentParticle( aCID ), getModel()), uno::UNO_QUERY );
                 if( xRegCurveCnt.is())
                 {
-                    // using assignment for broken gcc 3.3
                     UndoGuard aUndoGuard(
                         ActionDescriptionProvider::createDescription(
                             ActionDescriptionProvider::DELETE, SCH_RESSTR( STR_OBJECT_AVERAGE_LINE )),
@@ -707,7 +702,6 @@ bool ChartController::executeDispatch_Delete()
                 if( xEqProp.is())
                 {
                     uno::Reference< frame::XModel > xModel( getModel() );
-                    // using assignment for broken gcc 3.3
                     UndoGuard aUndoGuard(
                         ActionDescriptionProvider::createDescription(
                             ActionDescriptionProvider::DELETE, SCH_RESSTR( STR_OBJECT_CURVE_EQUATION )),
@@ -741,7 +735,6 @@ bool ChartController::executeDispatch_Delete()
                         nId = STR_OBJECT_ERROR_BARS_Z;
 
                     uno::Reference< frame::XModel > xModel( getModel() );
-                    // using assignment for broken gcc 3.3
                     UndoGuard aUndoGuard(
                         ActionDescriptionProvider::createDescription(
                             ActionDescriptionProvider::DELETE, SCH_RESSTR( nId )),
diff --git a/chart2/source/controller/main/UndoCommandDispatch.cxx b/chart2/source/controller/main/UndoCommandDispatch.cxx
index 88e700a..f170d04 100644
--- a/chart2/source/controller/main/UndoCommandDispatch.cxx
+++ b/chart2/source/controller/main/UndoCommandDispatch.cxx
@@ -68,17 +68,9 @@ void UndoCommandDispatch::fireStatusEvent(
         const bool bFireAll = rURL.isEmpty();
         uno::Any aUndoState, aRedoState;
         if( m_xUndoManager->isUndoPossible())
-        {
-            // using assignment for broken gcc 3.3
-            OUString aUndo = SvtResId( STR_UNDO ).toString();
-            aUndoState <<= ( aUndo + m_xUndoManager->getCurrentUndoActionTitle());
-        }
+            aUndoState <<= ( SVT_RESSTR( STR_UNDO ) + m_xUndoManager->getCurrentUndoActionTitle());
         if( m_xUndoManager->isRedoPossible())
-        {
-            // using assignment for broken gcc 3.3
-            OUString aRedo = SvtResId( STR_REDO ).toString();
-            aRedoState <<= ( aRedo + m_xUndoManager->getCurrentRedoActionTitle());
-        }
+            aRedoState <<= ( SVT_RESSTR( STR_REDO ) + m_xUndoManager->getCurrentRedoActionTitle());
 
         if( bFireAll || rURL == ".uno:Undo" )
             fireStatusEventForURL( ".uno:Undo", aUndoState, m_xUndoManager->isUndoPossible(), xSingleListener );
diff --git a/chart2/source/model/template/ChartType.cxx b/chart2/source/model/template/ChartType.cxx
index 7bbe32b..663abaa 100644
--- a/chart2/source/model/template/ChartType.cxx
+++ b/chart2/source/model/template/ChartType.cxx
@@ -223,9 +223,7 @@ struct StaticChartTypeInfoHelper_Initializer
 {
     ::cppu::OPropertyArrayHelper* operator()()
     {
-        // using assignment for broken gcc 3.3
-        static ::cppu::OPropertyArrayHelper aPropHelper = ::cppu::OPropertyArrayHelper(
-            Sequence< beans::Property >() );
+        static ::cppu::OPropertyArrayHelper aPropHelper( Sequence< beans::Property >{} );
         return &aPropHelper;
     }
 };
diff --git a/chart2/source/model/template/NetChartType.cxx b/chart2/source/model/template/NetChartType.cxx
index c1ca343..42ede75 100644
--- a/chart2/source/model/template/NetChartType.cxx
+++ b/chart2/source/model/template/NetChartType.cxx
@@ -102,9 +102,7 @@ struct StaticNetChartTypeInfoHelper_Initializer
 {
     ::cppu::OPropertyArrayHelper* operator()()
     {
-        // using assignment for broken gcc 3.3
-        static ::cppu::OPropertyArrayHelper aPropHelper = ::cppu::OPropertyArrayHelper(
-            Sequence< beans::Property >() );
+        static ::cppu::OPropertyArrayHelper aPropHelper(Sequence< beans::Property >{});
         return &aPropHelper;
     }
 };


More information about the Libreoffice-commits mailing list