[Libreoffice-commits] core.git: 2 commits - include/test include/toolkit include/unotest toolkit/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Thu Aug 22 13:47:03 UTC 2019


 include/test/sheet/xcellrangereferrer.hxx |    2 +-
 include/test/sheet/xformulaquery.hxx      |    2 +-
 include/test/table/xtablecolumns.hxx      |    2 +-
 include/toolkit/awt/vclxwindows.hxx       |    4 ++--
 include/unotest/bootstrapfixturebase.hxx  |    4 ++--
 toolkit/source/awt/vclxwindow.cxx         |    4 ++--
 toolkit/source/awt/vclxwindows.cxx        |    4 ++--
 7 files changed, 11 insertions(+), 11 deletions(-)

New commits:
commit e724f245e9652230d4c1f58c353be150006affcd
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Aug 22 13:41:58 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Aug 22 15:46:24 2019 +0200

    loplugin:constmethod in test
    
    Change-Id: I15aa90d962b9d428a911f4b47a06d55318b42ba4
    Reviewed-on: https://gerrit.libreoffice.org/77953
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/test/sheet/xcellrangereferrer.hxx b/include/test/sheet/xcellrangereferrer.hxx
index f840a6bd1355..949f6b12eb7e 100644
--- a/include/test/sheet/xcellrangereferrer.hxx
+++ b/include/test/sheet/xcellrangereferrer.hxx
@@ -24,7 +24,7 @@ public:
     virtual css::uno::Reference< css::uno::XInterface > init() = 0;
 
     void setCellRange(css::table::CellRangeAddress aCellRange) { m_aCellRange = aCellRange; }
-    const css::table::CellRangeAddress & getCellRange() { return m_aCellRange; }
+    const css::table::CellRangeAddress & getCellRange() const { return m_aCellRange; }
     void testGetReferredCells();
 
 protected:
diff --git a/include/test/sheet/xformulaquery.hxx b/include/test/sheet/xformulaquery.hxx
index 7beb944e192c..662bc6c90fc6 100644
--- a/include/test/sheet/xformulaquery.hxx
+++ b/include/test/sheet/xformulaquery.hxx
@@ -35,7 +35,7 @@ public:
     virtual css::uno::Reference<css::uno::XInterface> init() = 0;
     virtual css::uno::Reference<css::uno::XInterface> getXSpreadsheet() = 0;
     void setXCell(css::uno::Reference<css::table::XCell> xCell) { m_xCell = xCell; }
-    css::uno::Reference<css::table::XCell> const& getXCell() { return m_xCell; }
+    css::uno::Reference<css::table::XCell> const& getXCell() const { return m_xCell; }
 
     void testQueryDependents();
     void testQueryPrecedents();
diff --git a/include/test/table/xtablecolumns.hxx b/include/test/table/xtablecolumns.hxx
index 204fb2860aa2..169eac9dbc77 100644
--- a/include/test/table/xtablecolumns.hxx
+++ b/include/test/table/xtablecolumns.hxx
@@ -25,7 +25,7 @@ class OOO_DLLPUBLIC_TEST XTableColumns
 public:
     virtual css::uno::Reference<css::uno::XInterface> init() = 0;
 
-    void setXSpreadsheet(css::uno::Reference<css::sheet::XSpreadsheet>& r_xSheet)
+    void setXSpreadsheet(const css::uno::Reference<css::sheet::XSpreadsheet>& r_xSheet)
     {
         m_xSheet = r_xSheet;
     }
diff --git a/include/unotest/bootstrapfixturebase.hxx b/include/unotest/bootstrapfixturebase.hxx
index 0a967d34d736..85f270b02c2c 100644
--- a/include/unotest/bootstrapfixturebase.hxx
+++ b/include/unotest/bootstrapfixturebase.hxx
@@ -59,9 +59,9 @@ public:
   virtual ~BootstrapFixtureBase() override;
 
   const css::uno::Reference<css::uno::XComponentContext>&
-              getComponentContext() { return m_xContext; }
+              getComponentContext() const { return m_xContext; }
   const css::uno::Reference<css::lang::XMultiServiceFactory>&
-              getMultiServiceFactory() { return m_xSFactory; }
+              getMultiServiceFactory() const { return m_xSFactory; }
 
   virtual void setUp() override;
   virtual void tearDown() override;
commit 8a82dca5bd43080f0f5597b915d1433b1c0f141a
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Aug 22 13:41:08 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Aug 22 15:46:16 2019 +0200

    loplugin:constmethod in toolkit
    
    Change-Id: Id80ee487d7083da5c1f1c4d012d6339700471204
    Reviewed-on: https://gerrit.libreoffice.org/77952
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/toolkit/awt/vclxwindows.hxx b/include/toolkit/awt/vclxwindows.hxx
index 202d5974c8f9..eba13e505a41 100644
--- a/include/toolkit/awt/vclxwindows.hxx
+++ b/include/toolkit/awt/vclxwindows.hxx
@@ -608,7 +608,7 @@ public:
     /// @throws css::uno::RuntimeException
     void setMinimum( sal_Int32 n );
     /// @throws css::uno::RuntimeException
-    sal_Int32 getMinimum(  );
+    sal_Int32 getMinimum(  ) const;
 
     // css::awt::VclWindowPeer
     void SAL_CALL setProperty( const OUString& PropertyName, const css::uno::Any& Value ) override;
@@ -889,7 +889,7 @@ public:
     void            SetFormatter( FormatterBase* pFormatter ) { mpFormatter = pFormatter; }
 
     void            setStrictFormat( bool bStrict );
-    bool        isStrictFormat();
+    bool            isStrictFormat() const;
 
     // css::awt::VclWindowPeer
     void SAL_CALL setProperty( const OUString& PropertyName, const css::uno::Any& Value ) override;
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index d632fc13036b..58afca500b80 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -156,11 +156,11 @@ public:
     /** synchronously mbEnableVisible
     */
     void    setEnableVisible( bool bEnableVisible ) { mbEnableVisible = bEnableVisible; }
-    bool    isEnableVisible() { return mbEnableVisible; }
+    bool    isEnableVisible() const { return mbEnableVisible; }
     /** synchronously mbDirectVisible;
     */
     void    setDirectVisible( bool bDirectVisible ) { mbDirectVisible = bDirectVisible; }
-    bool    isDirectVisible() { return mbDirectVisible; }
+    bool    isDirectVisible() const { return mbDirectVisible; }
 
     /** impl-version of VCLXWindow::ImplExecuteAsyncWithoutSolarLock
     */
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx
index d03331a5876f..46825604bd2d 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -3413,7 +3413,7 @@ void VCLXScrollBar::setMinimum( sal_Int32 n )
         pScrollBar->SetRangeMin( n );
 }
 
-sal_Int32 VCLXScrollBar::getMinimum()
+sal_Int32 VCLXScrollBar::getMinimum() const
 {
     SolarMutexGuard aGuard;
 
@@ -4662,7 +4662,7 @@ void VCLXFormattedSpinField::setStrictFormat( bool bStrict )
         pFormatter->SetStrictFormat( bStrict );
 }
 
-bool VCLXFormattedSpinField::isStrictFormat()
+bool VCLXFormattedSpinField::isStrictFormat() const
 {
     FormatterBase* pFormatter = GetFormatter();
     return pFormatter && pFormatter->IsStrictFormat();


More information about the Libreoffice-commits mailing list