[Libreoffice-commits] core.git: 2 commits - sc/inc sc/source

Caolán McNamara caolanm at redhat.com
Wed Feb 15 08:53:54 UTC 2017


 sc/inc/pch/precompiled_sc.hxx                                  |    1 
 sc/inc/strload.hxx                                             |   45 ----------
 sc/source/core/data/global.cxx                                 |   20 +++-
 sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx    |    1 
 sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx         |    1 
 sc/source/ui/StatisticsDialogs/CorrelationDialog.cxx           |    1 
 sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx            |    1 
 sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx |    1 
 sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx  |    1 
 sc/source/ui/StatisticsDialogs/FTestDialog.cxx                 |    1 
 sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx   |    1 
 sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx         |    1 
 sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx |    1 
 sc/source/ui/StatisticsDialogs/RegressionDialog.cxx            |    1 
 sc/source/ui/StatisticsDialogs/SamplingDialog.cxx              |    1 
 sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx |    1 
 sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx |    1 
 sc/source/ui/StatisticsDialogs/TTestDialog.cxx                 |    1 
 sc/source/ui/StatisticsDialogs/ZTestDialog.cxx                 |    1 
 sc/source/ui/cctrl/checklistmenu.cxx                           |    2 
 sc/source/ui/view/gridwin.cxx                                  |    1 
 sc/source/ui/view/gridwin2.cxx                                 |    1 
 22 files changed, 18 insertions(+), 68 deletions(-)

New commits:
commit aff0a1d32242de794ab6bbae3cd35d208cbe876c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Feb 14 20:55:11 2017 +0000

    move ScRscStrLoader to its sole use place
    
    Change-Id: I8a5d4a23651868f9f3fa890cb50c0b64f58c63b7

diff --git a/sc/inc/pch/precompiled_sc.hxx b/sc/inc/pch/precompiled_sc.hxx
index 643a525..c5f20e5 100644
--- a/sc/inc/pch/precompiled_sc.hxx
+++ b/sc/inc/pch/precompiled_sc.hxx
@@ -440,7 +440,6 @@
 #include <stlpool.hxx>
 #include <stlsheet.hxx>
 #include <stringutil.hxx>
-#include <strload.hxx>
 #include <svl/SfxBroadcaster.hxx>
 #include <svl/cenumitm.hxx>
 #include <svl/eitem.hxx>
diff --git a/sc/inc/strload.hxx b/sc/inc/strload.hxx
deleted file mode 100644
index aaff970..0000000
--- a/sc/inc/strload.hxx
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_SC_INC_STRLOAD_HXX
-#define INCLUDED_SC_INC_STRLOAD_HXX
-
-#include "scresid.hxx"
-#include <tools/rc.hxx>
-
-class ScRscStrLoader : public Resource
-{
-public:
-    ScRscStrLoader( sal_uInt16 nRsc, sal_uInt16 nStrId ) :
-        Resource( ScResId( nRsc ) ), theStr( ScResId( nStrId ) )
-    {
-        FreeResource();
-    }
-
-    const OUString& GetString() const { return theStr; }
-
-private:
-    OUString theStr;
-};
-
-#define SC_STRLOAD(resource,strid) ScRscStrLoader( resource, strid).GetString()
-
-#endif // INCLUDED_SC_INC_STRLOAD_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index 6963bed..4e58714 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -69,7 +69,6 @@
 #include "adiasync.hxx"
 #include "userlist.hxx"
 #include "interpre.hxx"
-#include "strload.hxx"
 #include "docpool.hxx"
 #include "unitconv.hxx"
 #include "compiler.hxx"
@@ -311,6 +310,21 @@ void ScGlobal::SetUserList( const ScUserList* pNewList )
     }
 }
 
+class ScRscStrLoader : public Resource
+{
+public:
+    ScRscStrLoader( sal_uInt16 nRsc, sal_uInt16 nStrId ) :
+        Resource( ScResId( nRsc ) ), theStr( ScResId( nStrId ) )
+    {
+        FreeResource();
+    }
+
+    const OUString& GetString() const { return theStr; }
+
+private:
+    OUString theStr;
+};
+
 const OUString& ScGlobal::GetRscString( sal_uInt16 nIndex )
 {
     assert( nIndex < SC_GLOBSTR_STR_COUNT);
@@ -345,9 +359,9 @@ const OUString& ScGlobal::GetRscString( sal_uInt16 nIndex )
                 ;   // nothing
         }
         if (eOp != ocNone)
-            ppRscString[ nIndex ] = new OUString( ScCompiler::GetNativeSymbol( eOp));
+            ppRscString[ nIndex ] = new OUString(ScCompiler::GetNativeSymbol(eOp));
         else
-            ppRscString[ nIndex ] = new OUString( SC_STRLOAD( RID_GLOBSTR, nIndex ));
+            ppRscString[ nIndex ] = new OUString(ScRscStrLoader(RID_GLOBSTR, nIndex).GetString());
     }
     return *ppRscString[ nIndex ];
 }
commit 42a1428ca47c0131ded363ec8a42edd370255859
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Feb 14 20:52:21 2017 +0000

    don't need to include strload.hxx
    
    Change-Id: I1daa4fb47313827d37fee0187cccfc1df3b69e60

diff --git a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
index 68cee57..8158ae5 100644
--- a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
@@ -19,7 +19,6 @@
 #include "document.hxx"
 #include "uiitems.hxx"
 #include "reffact.hxx"
-#include "strload.hxx"
 #include "docfunc.hxx"
 #include "TableFillingAndNavigationTools.hxx"
 
diff --git a/sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx b/sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx
index f8914fe..0e5e1b3 100644
--- a/sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx
@@ -19,7 +19,6 @@
 #include "document.hxx"
 #include "uiitems.hxx"
 #include "reffact.hxx"
-#include "strload.hxx"
 #include "docfunc.hxx"
 #include "TableFillingAndNavigationTools.hxx"
 
diff --git a/sc/source/ui/StatisticsDialogs/CorrelationDialog.cxx b/sc/source/ui/StatisticsDialogs/CorrelationDialog.cxx
index a2e5e2a..09254e3 100644
--- a/sc/source/ui/StatisticsDialogs/CorrelationDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/CorrelationDialog.cxx
@@ -10,7 +10,6 @@
 
 #include "docsh.hxx"
 #include "reffact.hxx"
-#include "strload.hxx"
 
 #include "CorrelationDialog.hxx"
 
diff --git a/sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx b/sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx
index c037bbe..bb35aa7 100644
--- a/sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx
@@ -10,7 +10,6 @@
 
 #include "docsh.hxx"
 #include "reffact.hxx"
-#include "strload.hxx"
 
 #include "CovarianceDialog.hxx"
 
diff --git a/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx b/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
index b7c7128..ce72c96 100644
--- a/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
@@ -19,7 +19,6 @@
 #include "document.hxx"
 #include "uiitems.hxx"
 #include "reffact.hxx"
-#include "strload.hxx"
 #include "docfunc.hxx"
 #include "TableFillingAndNavigationTools.hxx"
 
diff --git a/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx b/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx
index e0b077f..6309f4f 100644
--- a/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx
@@ -19,7 +19,6 @@
 #include "document.hxx"
 #include "uiitems.hxx"
 #include "reffact.hxx"
-#include "strload.hxx"
 #include "docfunc.hxx"
 #include "TableFillingAndNavigationTools.hxx"
 
diff --git a/sc/source/ui/StatisticsDialogs/FTestDialog.cxx b/sc/source/ui/StatisticsDialogs/FTestDialog.cxx
index c4d5ae3..30675e9 100644
--- a/sc/source/ui/StatisticsDialogs/FTestDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/FTestDialog.cxx
@@ -19,7 +19,6 @@
 #include "document.hxx"
 #include "uiitems.hxx"
 #include "reffact.hxx"
-#include "strload.hxx"
 #include "docfunc.hxx"
 #include "TableFillingAndNavigationTools.hxx"
 
diff --git a/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx b/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx
index 8cbeee6..413e8c9 100644
--- a/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx
+++ b/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx
@@ -19,7 +19,6 @@
 #include "document.hxx"
 #include "uiitems.hxx"
 #include "reffact.hxx"
-#include "strload.hxx"
 #include "docfunc.hxx"
 #include "TableFillingAndNavigationTools.hxx"
 
diff --git a/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx b/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx
index aa7776a..88a25d5 100644
--- a/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx
@@ -19,7 +19,6 @@
 #include "document.hxx"
 #include "uiitems.hxx"
 #include "reffact.hxx"
-#include "strload.hxx"
 #include "docfunc.hxx"
 #include "TableFillingAndNavigationTools.hxx"
 
diff --git a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx
index f8b28ab..694550a 100644
--- a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx
@@ -19,7 +19,6 @@
 #include "document.hxx"
 #include "uiitems.hxx"
 #include "reffact.hxx"
-#include "strload.hxx"
 #include "docfunc.hxx"
 
 #include <random>
diff --git a/sc/source/ui/StatisticsDialogs/RegressionDialog.cxx b/sc/source/ui/StatisticsDialogs/RegressionDialog.cxx
index f513b05..40a85ae 100644
--- a/sc/source/ui/StatisticsDialogs/RegressionDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/RegressionDialog.cxx
@@ -19,7 +19,6 @@
 #include "document.hxx"
 #include "uiitems.hxx"
 #include "reffact.hxx"
-#include "strload.hxx"
 #include "docfunc.hxx"
 #include "TableFillingAndNavigationTools.hxx"
 
diff --git a/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx b/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx
index a7c87fd..dd31179 100644
--- a/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx
@@ -18,7 +18,6 @@
 #include "document.hxx"
 #include "uiitems.hxx"
 #include "reffact.hxx"
-#include "strload.hxx"
 #include "docfunc.hxx"
 
 #include "SamplingDialog.hxx"
diff --git a/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx b/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx
index 0c361b8..5d6025a 100644
--- a/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx
@@ -21,7 +21,6 @@
 #include "reffact.hxx"
 #include "scresid.hxx"
 #include "docfunc.hxx"
-#include "strload.hxx"
 
 #include "StatisticsInputOutputDialog.hxx"
 
diff --git a/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx b/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx
index e0a00e1..90dcea1 100644
--- a/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx
@@ -21,7 +21,6 @@
 #include "reffact.hxx"
 #include "scresid.hxx"
 #include "docfunc.hxx"
-#include "strload.hxx"
 
 #include "StatisticsTwoVariableDialog.hxx"
 
diff --git a/sc/source/ui/StatisticsDialogs/TTestDialog.cxx b/sc/source/ui/StatisticsDialogs/TTestDialog.cxx
index 870631f..a3d6e24 100644
--- a/sc/source/ui/StatisticsDialogs/TTestDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/TTestDialog.cxx
@@ -19,7 +19,6 @@
 #include "document.hxx"
 #include "uiitems.hxx"
 #include "reffact.hxx"
-#include "strload.hxx"
 #include "docfunc.hxx"
 #include "TableFillingAndNavigationTools.hxx"
 
diff --git a/sc/source/ui/StatisticsDialogs/ZTestDialog.cxx b/sc/source/ui/StatisticsDialogs/ZTestDialog.cxx
index a304bb9..ebdf064 100644
--- a/sc/source/ui/StatisticsDialogs/ZTestDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/ZTestDialog.cxx
@@ -19,7 +19,6 @@
 #include "document.hxx"
 #include "uiitems.hxx"
 #include "reffact.hxx"
-#include "strload.hxx"
 #include "docfunc.hxx"
 #include "TableFillingAndNavigationTools.hxx"
 
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index 5cca65b..4b66131 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -18,8 +18,8 @@
  */
 
 #include "checklistmenu.hxx"
-#include "strload.hxx"
 #include "globstr.hrc"
+#include "scresid.hxx"
 #include "sc.hrc"
 
 #include <vcl/decoview.hxx>
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 2278476..8b02579 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -123,7 +123,6 @@
 #include "cliputil.hxx"
 #include "queryentry.hxx"
 #include "markdata.hxx"
-#include "strload.hxx"
 #include "externalrefmgr.hxx"
 #include "dociter.hxx"
 #include "hints.hxx"
diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx
index 66e9dcf..1cdef6e 100644
--- a/sc/source/ui/view/gridwin2.cxx
+++ b/sc/source/ui/view/gridwin2.cxx
@@ -39,7 +39,6 @@
 #include "dbdocfun.hxx"
 #include "checklistmenu.hxx"
 #include "dpcontrol.hxx"
-#include "strload.hxx"
 #include "userlist.hxx"
 #include "scabstdlg.hxx"
 #include "spellcheckcontext.hxx"


More information about the Libreoffice-commits mailing list