[Libreoffice-commits] core.git: dbaccess/qa dbaccess/source

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Wed Jul 1 05:09:21 UTC 2020


 dbaccess/qa/unit/tdf119625.cxx                         |    5 ++---
 dbaccess/qa/unit/tdf126268.cxx                         |    2 +-
 dbaccess/source/core/dataaccess/databasedocument.cxx   |    2 +-
 dbaccess/source/core/recovery/dbdocrecovery.cxx        |    4 ++--
 dbaccess/source/core/recovery/storagetextstream.cxx    |    2 +-
 dbaccess/source/core/recovery/subcomponentrecovery.cxx |    4 ++--
 dbaccess/source/ui/dlg/indexfieldscontrol.cxx          |    2 +-
 dbaccess/source/ui/querydesign/QueryDesignView.cxx     |    4 ++--
 dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx  |    2 +-
 9 files changed, 13 insertions(+), 14 deletions(-)

New commits:
commit 4dfa47b25c82899028f439394ce63843ea60f5dc
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Jun 30 23:04:07 2020 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Wed Jul 1 07:08:29 2020 +0200

    Upcoming improved loplugin:staticanonymous -> redundantstatic: dbaccess
    
    Change-Id: I49932a9d89d2933bebd313d3f1f64af84f0e52cf
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97552
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/dbaccess/qa/unit/tdf119625.cxx b/dbaccess/qa/unit/tdf119625.cxx
index 5486a476f166..5d0ec008ff7a 100644
--- a/dbaccess/qa/unit/tdf119625.cxx
+++ b/dbaccess/qa/unit/tdf119625.cxx
@@ -52,9 +52,8 @@ struct expect_t
    the level we are testing, this test will have to allow for or set
    the destination timezone.
  */
-static const expect_t expect[]
-    = { { 0, 15, 10, 10 }, { 1, 23, 30, 30 }, { 2, 5, 0, 0 },  { 3, 4, 30, 0 },
-        { 4, 3, 15, 10 },  { 5, 5, 0, 0 },    { 6, 3, 22, 22 } };
+const expect_t expect[] = { { 0, 15, 10, 10 }, { 1, 23, 30, 30 }, { 2, 5, 0, 0 },  { 3, 4, 30, 0 },
+                            { 4, 3, 15, 10 },  { 5, 5, 0, 0 },    { 6, 3, 22, 22 } };
 
 void Tdf119625Test::testTime()
 {
diff --git a/dbaccess/qa/unit/tdf126268.cxx b/dbaccess/qa/unit/tdf126268.cxx
index 426edee37f0c..90039af825de 100644
--- a/dbaccess/qa/unit/tdf126268.cxx
+++ b/dbaccess/qa/unit/tdf126268.cxx
@@ -44,7 +44,7 @@ struct expect_t
 };
 }
 
-static const expect_t expect[] = {
+const expect_t expect[] = {
     { 1, "0.00" },   { 2, "25.00" },  { 3, "26.00" }, { 4, "30.4" },  { 5, "45.8" },
     { 6, "-25.00" }, { 7, "-26.00" }, { 8, "-30.4" }, { 9, "-45.8" },
 };
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx
index 6811ae332e84..4eac4796982b 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -316,7 +316,7 @@ namespace
     }
 }
 
-static const char sPictures[] = "Pictures";
+const char sPictures[] = "Pictures";
 
 // base documents seem to have a different behaviour to other documents, the
 // root storage contents at least seem to be re-used over different saves, thus if there is a
diff --git a/dbaccess/source/core/recovery/dbdocrecovery.cxx b/dbaccess/source/core/recovery/dbdocrecovery.cxx
index 280789ff8a84..ab5947d91261 100644
--- a/dbaccess/source/core/recovery/dbdocrecovery.cxx
+++ b/dbaccess/source/core/recovery/dbdocrecovery.cxx
@@ -86,9 +86,9 @@ namespace dbaccess
             return true;
         }
 
-        static const char sRecoveryDataSubStorageName[] = "recovery";
+        const char sRecoveryDataSubStorageName[] = "recovery";
 
-        static const char sObjectMapStreamName[] = "storage-component-map.ini";
+        const char sObjectMapStreamName[] = "storage-component-map.ini";
 
         void lcl_writeObjectMap_throw( const Reference<XComponentContext> & i_rContext, const Reference< XStorage >& i_rStorage,
             const MapStringToCompDesc& i_mapStorageToCompDesc )
diff --git a/dbaccess/source/core/recovery/storagetextstream.cxx b/dbaccess/source/core/recovery/storagetextstream.cxx
index 142615f005c2..6ea4ef005320 100644
--- a/dbaccess/source/core/recovery/storagetextstream.cxx
+++ b/dbaccess/source/core/recovery/storagetextstream.cxx
@@ -36,7 +36,7 @@ namespace dbaccess
         Reference< XTextOutputStream2 >  xTextOutput;
     };
 
-    static const char sLineFeed[] = "\n";
+    const char sLineFeed[] = "\n";
 
     // StorageTextOutputStream
     StorageTextOutputStream::StorageTextOutputStream(   const Reference<XComponentContext>& i_rContext,
diff --git a/dbaccess/source/core/recovery/subcomponentrecovery.cxx b/dbaccess/source/core/recovery/subcomponentrecovery.cxx
index 55f3f98a250e..ab16ee9e2c04 100644
--- a/dbaccess/source/core/recovery/subcomponentrecovery.cxx
+++ b/dbaccess/source/core/recovery/subcomponentrecovery.cxx
@@ -160,8 +160,8 @@ namespace dbaccess
             return xCommandProcessor;
         }
 
-        static const char sSettingsStreamName[] = "settings.xml";
-        static const char sCurrentQueryDesignName[] = "ooo:current-query-design";
+        const char sSettingsStreamName[] = "settings.xml";
+        const char sCurrentQueryDesignName[] = "ooo:current-query-design";
     }
 
     namespace {
diff --git a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
index 8676ff24d97a..e0613e02ac17 100644
--- a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
+++ b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
@@ -29,7 +29,7 @@
 namespace dbaui
 {
 
-static constexpr auto BROWSER_STANDARD_FLAGS = BrowserMode::COLUMNSELECTION | BrowserMode::HLINES | BrowserMode::VLINES |
+constexpr auto BROWSER_STANDARD_FLAGS = BrowserMode::COLUMNSELECTION | BrowserMode::HLINES | BrowserMode::VLINES |
                                     BrowserMode::HIDECURSOR | BrowserMode::HIDESELECT | BrowserMode::AUTO_HSCROLL | BrowserMode::AUTO_VSCROLL;
 
 #define COLUMN_ID_FIELDNAME     1
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index 30afb75932f6..035e805dbfaa 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -65,8 +65,8 @@ using namespace ::com::sun::star::container;
 // please look at the book LargeScale C++ to know why
 namespace
 {
-    static const char C_AND[] = " AND ";
-    static const char C_OR[] = " OR ";
+    const char C_AND[] = " AND ";
+    const char C_OR[] = " OR ";
 
     bool InsertJoin(    const OQueryDesignView* _pView,
                             const ::connectivity::OSQLParseNode *pNode);
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 98d782d8d4fd..f0e221fe109d 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -2060,7 +2060,7 @@ long OSelectionBrowseBox::GetRealRow(long nRowId) const
     return i;
 }
 
-static const long nVisibleRowMask[] =
+const long nVisibleRowMask[] =
                     {
                             0x0001,
                             0x0002,


More information about the Libreoffice-commits mailing list