[Libreoffice-commits] core.git: sal/osl sal/qa sax/source sc/inc sc/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Sat Aug 24 20:12:32 UTC 2019


 sal/osl/unx/file_path_helper.cxx                     |   17 +++------
 sal/qa/rtl/doublelock/rtl_doublelocking.cxx          |    2 -
 sax/source/fastparser/legacyfastparser.cxx           |    8 ++--
 sc/inc/document.hxx                                  |   12 +++---
 sc/inc/textuno.hxx                                   |    2 -
 sc/source/core/data/documen3.cxx                     |    8 ++--
 sc/source/core/data/document.cxx                     |    2 -
 sc/source/filter/excel/tokstack.cxx                  |   24 ++++++-------
 sc/source/filter/inc/tokstack.hxx                    |   34 +++++++++----------
 sc/source/ui/StatisticsDialogs/CorrelationDialog.cxx |    4 +-
 sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx  |    4 +-
 sc/source/ui/inc/CorrelationDialog.hxx               |    4 +-
 sc/source/ui/inc/CovarianceDialog.hxx                |    4 +-
 sc/source/ui/inc/MatrixComparisonGenerator.hxx       |    4 +-
 sc/source/ui/inc/tabvwsh.hxx                         |    2 -
 sc/source/ui/view/tabvwshc.cxx                       |    2 -
 16 files changed, 65 insertions(+), 68 deletions(-)

New commits:
commit e0adee8341e89d478511d7b3e784941f2fd9b504
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Sat Aug 24 20:32:19 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Aug 24 22:11:15 2019 +0200

    loplugin:returnconstval in sal..sc
    
    Change-Id: I300d14d580d450ec338129918955651b9d40d5d2
    Reviewed-on: https://gerrit.libreoffice.org/78059
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sal/osl/unx/file_path_helper.cxx b/sal/osl/unx/file_path_helper.cxx
index 584279cff841..a89e00bf76ed 100644
--- a/sal/osl/unx/file_path_helper.cxx
+++ b/sal/osl/unx/file_path_helper.cxx
@@ -28,14 +28,11 @@ const sal_Unicode FPH_CHAR_PATH_SEPARATOR = '/';
 const sal_Unicode FPH_CHAR_DOT            = '.';
 const sal_Unicode FPH_CHAR_COLON          = ':';
 
-static const OUString FPH_PATH_SEPARATOR()
-{ return OUString(FPH_CHAR_PATH_SEPARATOR); }
+static const OUStringLiteral FPH_PATH_SEPARATOR("/");
 
-static const OUString FPH_LOCAL_DIR_ENTRY()
-{ return OUString(FPH_CHAR_DOT); }
+static const OUStringLiteral FPH_LOCAL_DIR_ENTRY(".");
 
-static const OUString FPH_PARENT_DIR_ENTRY()
-{ return ".."; }
+static const OUStringLiteral FPH_PARENT_DIR_ENTRY("..");
 
 void osl_systemPathRemoveSeparator(rtl_uString* pustrPath)
 {
@@ -68,11 +65,11 @@ void osl_systemPathEnsureSeparator(rtl_uString** ppustrPath)
 
         if ((lp > 1 && i != (lp - 1)) || ((lp < 2) && i < 0))
         {
-            path += FPH_PATH_SEPARATOR();
+            path += FPH_PATH_SEPARATOR;
             rtl_uString_assign(ppustrPath, path.pData);
         }
 
-        SAL_WARN_IF( !path.endsWith(FPH_PATH_SEPARATOR()),
+        SAL_WARN_IF( !path.endsWith(FPH_PATH_SEPARATOR),
                      "sal.osl",
                      "osl_systemPathEnsureSeparator: Post condition failed");
     }
@@ -147,8 +144,8 @@ bool osl_systemPathIsLocalOrParentDirectoryEntry(
 
     osl_systemPathGetFileNameOrLastDirectoryPart(pustrPath, &dirent.pData);
 
-    return (dirent == FPH_LOCAL_DIR_ENTRY() ||
-            dirent == FPH_PARENT_DIR_ENTRY());
+    return (dirent == FPH_LOCAL_DIR_ENTRY ||
+            dirent == FPH_PARENT_DIR_ENTRY);
 }
 
 /** Simple iterator for a path list separated by the specified character
diff --git a/sal/qa/rtl/doublelock/rtl_doublelocking.cxx b/sal/qa/rtl/doublelock/rtl_doublelocking.cxx
index 384b8f59392a..d2e094d19c12 100644
--- a/sal/qa/rtl/doublelock/rtl_doublelocking.cxx
+++ b/sal/qa/rtl/doublelock/rtl_doublelocking.cxx
@@ -46,7 +46,7 @@
 
 namespace {
 struct Gregorian : public rtl::StaticWithInit<OUString, Gregorian> {
-    const OUString operator () () {
+    OUString operator () () {
         return CONST_TEST_STRING;
     }
 };
diff --git a/sax/source/fastparser/legacyfastparser.cxx b/sax/source/fastparser/legacyfastparser.cxx
index 994835acc666..f5a4a433f8df 100644
--- a/sax/source/fastparser/legacyfastparser.cxx
+++ b/sax/source/fastparser/legacyfastparser.cxx
@@ -130,8 +130,8 @@ private:
     Reference< XDocumentHandler > m_xDocumentHandler;
     Reference< XFastTokenHandler > m_xTokenHandler;
     rtl::Reference< NamespaceHandler > m_aNamespaceHandler;
-    const OUString getNamespacePrefixFromToken( sal_Int32 nToken );
-    const OUString getNameFromToken( sal_Int32 nToken );
+    OUString getNamespacePrefixFromToken( sal_Int32 nToken );
+    OUString getNameFromToken( sal_Int32 nToken );
 
     static const OUString aDefaultNamespace;
     static const OUString aNamespaceSeparator;
@@ -161,7 +161,7 @@ public:
 const OUString CallbackDocumentHandler::aDefaultNamespace = OUString("");
 const OUString CallbackDocumentHandler::aNamespaceSeparator = OUString(":");
 
-const OUString CallbackDocumentHandler::getNamespacePrefixFromToken( sal_Int32 nToken )
+OUString CallbackDocumentHandler::getNamespacePrefixFromToken( sal_Int32 nToken )
 {
     if ( ( nToken & 0xffff0000 ) != 0 )
     {
@@ -173,7 +173,7 @@ const OUString CallbackDocumentHandler::getNamespacePrefixFromToken( sal_Int32 n
         return OUString();
 }
 
-const OUString CallbackDocumentHandler::getNameFromToken( sal_Int32 nToken )
+OUString CallbackDocumentHandler::getNameFromToken( sal_Int32 nToken )
 {
     Sequence< sal_Int8 > aSeq = m_xTokenHandler->getUTF8Identifier( nToken & 0xffff );
     return OUString( reinterpret_cast< const char* >(
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 111170d97318..e23148c11420 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -958,10 +958,10 @@ public:
     SC_DLLPUBLIC void                                       SetGrammar( formula::FormulaGrammar::Grammar eGram );
     SC_DLLPUBLIC ScLinkMode                                 GetLinkMode( SCTAB nTab ) const;
     bool                                                    IsLinked( SCTAB nTab ) const;
-    SC_DLLPUBLIC const OUString                             GetLinkDoc( SCTAB nTab ) const;
-    const OUString                                          GetLinkFlt( SCTAB nTab ) const;
-    const OUString                                          GetLinkOpt( SCTAB nTab ) const;
-    SC_DLLPUBLIC const OUString                             GetLinkTab( SCTAB nTab ) const;
+    SC_DLLPUBLIC OUString                                   GetLinkDoc( SCTAB nTab ) const;
+    OUString                                                GetLinkFlt( SCTAB nTab ) const;
+    OUString                                                GetLinkOpt( SCTAB nTab ) const;
+    SC_DLLPUBLIC OUString                                   GetLinkTab( SCTAB nTab ) const;
     sal_uLong                                               GetLinkRefreshDelay( SCTAB nTab ) const;
     void                                                    SetLink( SCTAB nTab, ScLinkMode nMode, const OUString& rDoc,
                                                                      const OUString& rFilter, const OUString& rOptions,
@@ -1958,8 +1958,8 @@ public:
     void GetUnprotectedCells( ScRangeList& rRange, SCTAB nTab ) const;
 
     // PageStyle:
-    SC_DLLPUBLIC const OUString  GetPageStyle( SCTAB nTab ) const;
-    SC_DLLPUBLIC void            SetPageStyle( SCTAB nTab, const OUString& rName );
+    SC_DLLPUBLIC OUString GetPageStyle( SCTAB nTab ) const;
+    SC_DLLPUBLIC void     SetPageStyle( SCTAB nTab, const OUString& rName );
     Size            GetPageSize( SCTAB nTab ) const;
     void            SetPageSize( SCTAB nTab, const Size& rSize );
     void            SetRepeatArea( SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCROW nEndRow );
diff --git a/sc/inc/textuno.hxx b/sc/inc/textuno.hxx
index 7666c2691249..b76cdf6a94fc 100644
--- a/sc/inc/textuno.hxx
+++ b/sc/inc/textuno.hxx
@@ -124,7 +124,7 @@ public:
     ScEditEngineDefaulter*  GetEditEngine() { GetTextForwarder(); return pEditEngine.get(); }
 
     ScHeaderFooterPart      GetPart() const         { return nPart; }
-    const css::uno::Reference<css::sheet::XHeaderFooterContent> GetContentObj() const { return xContentObj; }
+    css::uno::Reference<css::sheet::XHeaderFooterContent> GetContentObj() const { return xContentObj; }
 
     const EditTextObject* GetTextObject() const { return mpTextObj.get(); }
 };
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index 8a0bd5ff47bc..ea94920a6a81 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -490,28 +490,28 @@ ScLinkMode ScDocument::GetLinkMode( SCTAB nTab ) const
     return ScLinkMode::NONE;
 }
 
-const OUString ScDocument::GetLinkDoc( SCTAB nTab ) const
+OUString ScDocument::GetLinkDoc( SCTAB nTab ) const
 {
     if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
         return maTabs[nTab]->GetLinkDoc();
     return OUString();
 }
 
-const OUString ScDocument::GetLinkFlt( SCTAB nTab ) const
+OUString ScDocument::GetLinkFlt( SCTAB nTab ) const
 {
     if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
         return maTabs[nTab]->GetLinkFlt();
     return OUString();
 }
 
-const OUString ScDocument::GetLinkOpt( SCTAB nTab ) const
+OUString ScDocument::GetLinkOpt( SCTAB nTab ) const
 {
     if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
         return maTabs[nTab]->GetLinkOpt();
     return OUString();
 }
 
-const OUString ScDocument::GetLinkTab( SCTAB nTab ) const
+OUString ScDocument::GetLinkTab( SCTAB nTab ) const
 {
     if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
         return maTabs[nTab]->GetLinkTab();
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 841cb3574213..9e9a3f0a25c7 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -6184,7 +6184,7 @@ void ScDocument::SetPageStyle( SCTAB nTab, const OUString& rName )
         maTabs[nTab]->SetPageStyle( rName );
 }
 
-const OUString ScDocument::GetPageStyle( SCTAB nTab ) const
+OUString ScDocument::GetPageStyle( SCTAB nTab ) const
 {
     if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] )
         return maTabs[nTab]->GetPageStyle();
diff --git a/sc/source/filter/excel/tokstack.cxx b/sc/source/filter/excel/tokstack.cxx
index f734e3168a18..de64bcef7a75 100644
--- a/sc/source/filter/excel/tokstack.cxx
+++ b/sc/source/filter/excel/tokstack.cxx
@@ -416,7 +416,7 @@ void TokenPool::operator >>( TokenId& rId )
     nP_IdLast = nP_IdCurrent;
 }
 
-const TokenId TokenPool::Store( const double& rDouble )
+TokenId TokenPool::Store( const double& rDouble )
 {
     if (!CheckElementOrGrow())
         return static_cast<const TokenId>(nElementCurrent+1);
@@ -438,12 +438,12 @@ const TokenId TokenPool::Store( const double& rDouble )
     return static_cast<const TokenId>(nElementCurrent); // return old value + 1!
 }
 
-const TokenId TokenPool::Store( const sal_uInt16 nIndex )
+TokenId TokenPool::Store( const sal_uInt16 nIndex )
 {
     return StoreName(nIndex, -1);
 }
 
-const TokenId TokenPool::Store( const OUString& rString )
+TokenId TokenPool::Store( const OUString& rString )
 {
     // mostly copied to Store( const sal_Char* ), to avoid a temporary string
     if (!CheckElementOrGrow())
@@ -473,7 +473,7 @@ const TokenId TokenPool::Store( const OUString& rString )
     return static_cast<const TokenId>(nElementCurrent); // return old value + 1!
 }
 
-const TokenId TokenPool::Store( const ScSingleRefData& rTr )
+TokenId TokenPool::Store( const ScSingleRefData& rTr )
 {
     if (!CheckElementOrGrow())
         return static_cast<const TokenId>(nElementCurrent+1);
@@ -496,7 +496,7 @@ const TokenId TokenPool::Store( const ScSingleRefData& rTr )
     return static_cast<const TokenId>(nElementCurrent); // return old value + 1!
 }
 
-const TokenId TokenPool::Store( const ScComplexRefData& rTr )
+TokenId TokenPool::Store( const ScComplexRefData& rTr )
 {
     if (!CheckElementOrGrow())
         return static_cast<const TokenId>(nElementCurrent+1);
@@ -525,7 +525,7 @@ const TokenId TokenPool::Store( const ScComplexRefData& rTr )
     return static_cast<const TokenId>(nElementCurrent); // return old value + 1!
 }
 
-const TokenId TokenPool::Store( const DefTokenId e, const OUString& r )
+TokenId TokenPool::Store( const DefTokenId e, const OUString& r )
 {
     if (!CheckElementOrGrow())
         return static_cast<const TokenId>(nElementCurrent+1);
@@ -551,7 +551,7 @@ const TokenId TokenPool::Store( const DefTokenId e, const OUString& r )
     return static_cast<const TokenId>(nElementCurrent); // return old value + 1!
 }
 
-const TokenId TokenPool::StoreNlf( const ScSingleRefData& rTr )
+TokenId TokenPool::StoreNlf( const ScSingleRefData& rTr )
 {
     if (!CheckElementOrGrow())
         return static_cast<const TokenId>(nElementCurrent+1);
@@ -576,7 +576,7 @@ const TokenId TokenPool::StoreNlf( const ScSingleRefData& rTr )
     return static_cast<const TokenId>(nElementCurrent);
 }
 
-const TokenId TokenPool::StoreMatrix()
+TokenId TokenPool::StoreMatrix()
 {
     if (!CheckElementOrGrow())
         return static_cast<const TokenId>(nElementCurrent+1);
@@ -598,7 +598,7 @@ const TokenId TokenPool::StoreMatrix()
     return static_cast<const TokenId>(nElementCurrent);
 }
 
-const TokenId TokenPool::StoreName( sal_uInt16 nIndex, sal_Int16 nSheet )
+TokenId TokenPool::StoreName( sal_uInt16 nIndex, sal_Int16 nSheet )
 {
     if (!CheckElementOrGrow())
         return static_cast<const TokenId>(nElementCurrent+1);
@@ -616,7 +616,7 @@ const TokenId TokenPool::StoreName( sal_uInt16 nIndex, sal_Int16 nSheet )
     return static_cast<const TokenId>(nElementCurrent);
 }
 
-const TokenId TokenPool::StoreExtName( sal_uInt16 nFileId, const OUString& rName )
+TokenId TokenPool::StoreExtName( sal_uInt16 nFileId, const OUString& rName )
 {
     if (!CheckElementOrGrow())
         return static_cast<const TokenId>(nElementCurrent+1);
@@ -634,7 +634,7 @@ const TokenId TokenPool::StoreExtName( sal_uInt16 nFileId, const OUString& rName
     return static_cast<const TokenId>(nElementCurrent);
 }
 
-const TokenId TokenPool::StoreExtRef( sal_uInt16 nFileId, const OUString& rTabName, const ScSingleRefData& rRef )
+TokenId TokenPool::StoreExtRef( sal_uInt16 nFileId, const OUString& rTabName, const ScSingleRefData& rRef )
 {
     if (!CheckElementOrGrow())
         return static_cast<const TokenId>(nElementCurrent+1);
@@ -653,7 +653,7 @@ const TokenId TokenPool::StoreExtRef( sal_uInt16 nFileId, const OUString& rTabNa
     return static_cast<const TokenId>(nElementCurrent);
 }
 
-const TokenId TokenPool::StoreExtRef( sal_uInt16 nFileId, const OUString& rTabName, const ScComplexRefData& rRef )
+TokenId TokenPool::StoreExtRef( sal_uInt16 nFileId, const OUString& rTabName, const ScComplexRefData& rRef )
 {
     if (!CheckElementOrGrow())
         return static_cast<const TokenId>(nElementCurrent+1);
diff --git a/sc/source/filter/inc/tokstack.hxx b/sc/source/filter/inc/tokstack.hxx
index 50d4bbd6f66f..82a6a9552219 100644
--- a/sc/source/filter/inc/tokstack.hxx
+++ b/sc/source/filter/inc/tokstack.hxx
@@ -232,24 +232,24 @@ public:
         inline TokenPool&           operator <<( TokenStack& rStack );
         void                        operator >>( TokenId& rId );
         inline void                 operator >>( TokenStack& rStack );
-        inline const TokenId        Store();
-        const TokenId               Store( const double& rDouble );
+        inline TokenId              Store();
+        TokenId                     Store( const double& rDouble );
 
                                     // only for Range-Names
-        const TokenId               Store( const sal_uInt16 nIndex );
-        ;
-        const TokenId               Store( const OUString& rString );
-        const TokenId               Store( const ScSingleRefData& rTr );
-        const TokenId               Store( const ScComplexRefData& rTr );
+        TokenId                     Store( const sal_uInt16 nIndex );
 
-        const TokenId               Store( const DefTokenId eId, const OUString& rName );
+        TokenId                     Store( const OUString& rString );
+        TokenId                     Store( const ScSingleRefData& rTr );
+        TokenId                     Store( const ScComplexRefData& rTr );
+
+        TokenId                     Store( const DefTokenId eId, const OUString& rName );
                                         // 4 externals (e.g. AddIns, Macros...)
-        const TokenId               StoreNlf( const ScSingleRefData& rTr );
-        const TokenId               StoreMatrix();
-        const TokenId               StoreName( sal_uInt16 nIndex, sal_Int16 nSheet );
-        const TokenId               StoreExtName( sal_uInt16 nFileId, const OUString& rName );
-        const TokenId               StoreExtRef( sal_uInt16 nFileId, const OUString& rTabName, const ScSingleRefData& rRef );
-        const TokenId               StoreExtRef( sal_uInt16 nFileId, const OUString& rTabName, const ScComplexRefData& rRef );
+        TokenId                     StoreNlf( const ScSingleRefData& rTr );
+        TokenId                     StoreMatrix();
+        TokenId                     StoreName( sal_uInt16 nIndex, sal_Int16 nSheet );
+        TokenId                     StoreExtName( sal_uInt16 nFileId, const OUString& rName );
+        TokenId                     StoreExtRef( sal_uInt16 nFileId, const OUString& rTabName, const ScSingleRefData& rRef );
+        TokenId                     StoreExtRef( sal_uInt16 nFileId, const OUString& rTabName, const ScComplexRefData& rRef );
 
         std::unique_ptr<ScTokenArray> GetTokenArray( const TokenId& rId );
         void                        Reset();
@@ -275,10 +275,10 @@ class TokenStack
         inline void                 Reset();
 
         bool                 HasMoreTokens() const { return nPos > 0; }
-        inline const TokenId        Get();
+        inline TokenId              Get();
 };
 
-inline const TokenId TokenStack::Get()
+inline TokenId TokenStack::Get()
 {
     TokenId nRet;
 
@@ -401,7 +401,7 @@ inline void TokenPool::operator >>( TokenStack& rStack )
     rStack << nId;
 }
 
-inline const TokenId TokenPool::Store()
+inline TokenId TokenPool::Store()
 {
     TokenId nId;
     *this >> nId;
diff --git a/sc/source/ui/StatisticsDialogs/CorrelationDialog.cxx b/sc/source/ui/StatisticsDialogs/CorrelationDialog.cxx
index e0bde397dd8e..5ecd359ab682 100644
--- a/sc/source/ui/StatisticsDialogs/CorrelationDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/CorrelationDialog.cxx
@@ -26,12 +26,12 @@ void ScCorrelationDialog::Close()
     DoClose(ScCorrelationDialogWrapper::GetChildWindowId());
 }
 
-const OUString ScCorrelationDialog::getLabel()
+OUString ScCorrelationDialog::getLabel()
 {
     return ScResId(STR_CORRELATION_LABEL);
 }
 
-const OUString ScCorrelationDialog::getTemplate()
+OUString ScCorrelationDialog::getTemplate()
 {
     return "=CORREL(%VAR1%; %VAR2%)";
 }
diff --git a/sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx b/sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx
index 6debc46e22a4..51b55f4e18c6 100644
--- a/sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx
@@ -31,12 +31,12 @@ void ScCovarianceDialog::Close()
     DoClose( ScCovarianceDialogWrapper::GetChildWindowId() );
 }
 
-const OUString ScCovarianceDialog::getLabel()
+OUString ScCovarianceDialog::getLabel()
 {
     return ScResId(STR_COVARIANCE_LABEL);
 }
 
-const OUString ScCovarianceDialog::getTemplate()
+OUString ScCovarianceDialog::getTemplate()
 {
     return "=COVAR(%VAR1%; %VAR2%)";
 }
diff --git a/sc/source/ui/inc/CorrelationDialog.hxx b/sc/source/ui/inc/CorrelationDialog.hxx
index 12db6f39df5b..a1444c67aff8 100644
--- a/sc/source/ui/inc/CorrelationDialog.hxx
+++ b/sc/source/ui/inc/CorrelationDialog.hxx
@@ -23,8 +23,8 @@ public:
     virtual void Close() override;
 
 protected:
-    virtual const OUString getLabel() override;
-    virtual const OUString getTemplate() override;
+    virtual OUString getLabel() override;
+    virtual OUString getTemplate() override;
 };
 
 #endif
diff --git a/sc/source/ui/inc/CovarianceDialog.hxx b/sc/source/ui/inc/CovarianceDialog.hxx
index 21acb96e4b75..382dc7edf96d 100644
--- a/sc/source/ui/inc/CovarianceDialog.hxx
+++ b/sc/source/ui/inc/CovarianceDialog.hxx
@@ -23,8 +23,8 @@ public:
     virtual void Close() override;
 
 protected:
-    virtual const OUString getLabel() override;
-    virtual const OUString getTemplate() override;
+    virtual OUString getLabel() override;
+    virtual OUString getTemplate() override;
     virtual const char* GetUndoNameId() override;
 };
 
diff --git a/sc/source/ui/inc/MatrixComparisonGenerator.hxx b/sc/source/ui/inc/MatrixComparisonGenerator.hxx
index d6af6a0f4139..47fdb3bb9b1e 100644
--- a/sc/source/ui/inc/MatrixComparisonGenerator.hxx
+++ b/sc/source/ui/inc/MatrixComparisonGenerator.hxx
@@ -30,8 +30,8 @@ protected:
     virtual const char* GetUndoNameId() override;
     virtual ScRange ApplyOutput(ScDocShell* pDocShell) override;
 
-    virtual const OUString getLabel() = 0;
-    virtual const OUString getTemplate() = 0;
+    virtual OUString getLabel() = 0;
+    virtual OUString getTemplate() = 0;
 };
 
 #endif
diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index 3e863a3881bb..9b9a7f4a1640 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -374,7 +374,7 @@ public:
     bool IsActive() const { return bIsActive; }
     OUString GetFormula(const ScAddress& rAddress);
     bool    UseSubTotal(ScRangeList* pRangeList);
-    const   OUString DoAutoSum(bool& rRangeFinder, bool& rSubTotal, const OpCode eCode);
+    OUString DoAutoSum(bool& rRangeFinder, bool& rSubTotal, const OpCode eCode);
 
     // ugly hack to call Define Names from Manage Names
     void    SwitchBetweenRefDialogs(SfxModelessDialogController* pDialog);
diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx
index 39ca331fcd63..9af8c23ab52c 100644
--- a/sc/source/ui/view/tabvwshc.cxx
+++ b/sc/source/ui/view/tabvwshc.cxx
@@ -597,7 +597,7 @@ bool ScTabViewShell::UseSubTotal(ScRangeList* pRangeList)
     return bSubTotal;
 }
 
-const OUString ScTabViewShell::DoAutoSum(bool& rRangeFinder, bool& rSubTotal, const OpCode eCode)
+OUString ScTabViewShell::DoAutoSum(bool& rRangeFinder, bool& rSubTotal, const OpCode eCode)
 {
     OUString aFormula;
     const ScMarkData& rMark = GetViewData().GetMarkData();


More information about the Libreoffice-commits mailing list