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

Takeshi Abe tabe at fixedpoint.jp
Wed Jul 24 05:13:02 PDT 2013


 connectivity/source/commontools/TDatabaseMetaDataBase.cxx |    4 +-
 connectivity/source/commontools/dbconversion.cxx          |    2 -
 connectivity/source/commontools/sqlerror.cxx              |    2 -
 connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx  |    2 -
 connectivity/source/drivers/mork/MDatabaseMetaData.cxx    |    2 -
 dbaccess/source/filter/xml/xmlHelper.cxx                  |    2 -
 dbaccess/source/filter/xml/xmlfilter.cxx                  |   20 +++++++-------
 dbaccess/source/ui/misc/UITools.cxx                       |    2 -
 8 files changed, 18 insertions(+), 18 deletions(-)

New commits:
commit a140d3b7cbad0a5cd361d6f310e5b16de308b21e
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Wed Jul 24 21:11:30 2013 +0900

    Mark as const
    
    Change-Id: Ia3996b997ebbd10ca02ec5a24d1969822bc39273

diff --git a/connectivity/source/commontools/TDatabaseMetaDataBase.cxx b/connectivity/source/commontools/TDatabaseMetaDataBase.cxx
index afcebaa..db0b796 100644
--- a/connectivity/source/commontools/TDatabaseMetaDataBase.cxx
+++ b/connectivity/source/commontools/TDatabaseMetaDataBase.cxx
@@ -94,7 +94,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaDataBase::getTypeInfo(  ) throw(SQ
 
         if ( xRow.is() )
         {
-            static sal_Int32 pTypes[] = {
+            static const sal_Int32 pTypes[] = {
                                         DataType::VARCHAR
                                         ,DataType::INTEGER
                                         ,DataType::INTEGER
@@ -137,7 +137,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaDataBase::getTypeInfo(  ) throw(SQ
             {
                 ::connectivity::ODatabaseMetaDataResultSet::ORow aRow;
                 aRow.push_back(ODatabaseMetaDataResultSet::getEmptyValue());
-                sal_Int32* pType = pTypes;
+                const sal_Int32* pType = pTypes;
                 for (sal_Int32 i = 1; i <= sal_Int32(sizeof(pTypes)/sizeof(pTypes[0])); ++i,++pType)
                 {
                     ORowSetValue aValue;
diff --git a/connectivity/source/commontools/dbconversion.cxx b/connectivity/source/commontools/dbconversion.cxx
index a09e09f..e55fb98 100644
--- a/connectivity/source/commontools/dbconversion.cxx
+++ b/connectivity/source/commontools/dbconversion.cxx
@@ -188,7 +188,7 @@ namespace dbtools
     }
 
     //------------------------------------------------------------------------------
-    static sal_Int32 aDaysInMonth[12] = {   31, 28, 31, 30, 31, 30,
+    static const sal_Int32 aDaysInMonth[12] = {   31, 28, 31, 30, 31, 30,
                                             31, 31, 30, 31, 30, 31 };
 
     //------------------------------------------------------------------------------
diff --git a/connectivity/source/commontools/sqlerror.cxx b/connectivity/source/commontools/sqlerror.cxx
index bcf4a2c..de58dae 100644
--- a/connectivity/source/commontools/sqlerror.cxx
+++ b/connectivity/source/commontools/sqlerror.cxx
@@ -113,7 +113,7 @@ namespace connectivity
     //--------------------------------------------------------------------
     const OUString& SQLError_Impl::getMessagePrefix()
     {
-        static OUString s_sMessagePrefix( "[OOoBase]" );
+        static const OUString s_sMessagePrefix( "[OOoBase]" );
         return s_sMessagePrefix;
     }
 
diff --git a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
index cd71d72..59369b2 100644
--- a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
@@ -1004,7 +1004,7 @@ Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getTableTypes(  ) throw
     /* Dont need to change as evoab driver supports only table */
 
     // there exists no possibility to get table types so we have to check
-    static OUString sTableTypes[] =
+    static const OUString sTableTypes[] =
     {
         OUString("TABLE"),
         // Currently we only support a 'TABLE' nothing more complex
diff --git a/connectivity/source/drivers/mork/MDatabaseMetaData.cxx b/connectivity/source/drivers/mork/MDatabaseMetaData.cxx
index fa30285..1f7e879 100644
--- a/connectivity/source/drivers/mork/MDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/mork/MDatabaseMetaData.cxx
@@ -846,7 +846,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsBatchUpdates(  ) throw(SQLException
 Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTableTypes(  ) throw(SQLException, RuntimeException)
 {
     // there exists no possibility to get table types so we have to check
-    static OUString sTableTypes[] =
+    static const OUString sTableTypes[] =
     {
         OUString("TABLE"),
         OUString("VIEW")
diff --git a/dbaccess/source/filter/xml/xmlHelper.cxx b/dbaccess/source/filter/xml/xmlHelper.cxx
index a410f08..70570ab 100644
--- a/dbaccess/source/filter/xml/xmlHelper.cxx
+++ b/dbaccess/source/filter/xml/xmlHelper.cxx
@@ -55,7 +55,7 @@ const XMLPropertyHandler* OPropertyHandlerFactory::GetPropertyHandler(sal_Int32
         case XML_DB_TYPE_EQUAL:
             if ( !m_pDisplayHandler.get() )
             {
-                static SvXMLEnumMapEntry aDisplayMap[] =
+                static const SvXMLEnumMapEntry aDisplayMap[] =
                 {
                     { XML_VISIBLE,      sal_True },
                     { XML_COLLAPSE,     sal_False },
diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx
index 24b6888..3460427 100644
--- a/dbaccess/source/filter/xml/xmlfilter.cxx
+++ b/dbaccess/source/filter/xml/xmlfilter.cxx
@@ -594,7 +594,7 @@ const SvXMLTokenMap& ODBFilter::GetDocElemTokenMap() const
 {
     if ( !m_pDocElemTokenMap.get() )
     {
-        static SvXMLTokenMapEntry aElemTokenMap[]=
+        static const SvXMLTokenMapEntry aElemTokenMap[]=
         {
             { XML_NAMESPACE_OFFICE, XML_SETTINGS,           XML_TOK_DOC_SETTINGS    },
             { XML_NAMESPACE_OOO,    XML_SETTINGS,           XML_TOK_DOC_SETTINGS    },
@@ -616,7 +616,7 @@ const SvXMLTokenMap& ODBFilter::GetDatabaseElemTokenMap() const
 {
     if ( !m_pDatabaseElemTokenMap.get() )
     {
-        static SvXMLTokenMapEntry aElemTokenMap[]=
+        static const SvXMLTokenMapEntry aElemTokenMap[]=
         {
             { XML_NAMESPACE_DB, XML_DATASOURCE,             XML_TOK_DATASOURCE  },
             { XML_NAMESPACE_DB, XML_FORMS,                  XML_TOK_FORMS},
@@ -636,7 +636,7 @@ const SvXMLTokenMap& ODBFilter::GetDataSourceElemTokenMap() const
 {
     if ( !m_pDataSourceElemTokenMap.get() )
     {
-        static SvXMLTokenMapEntry aElemTokenMap[]=
+        static const SvXMLTokenMapEntry aElemTokenMap[]=
         {
             { XML_NAMESPACE_DB,     XML_CONNECTION_RESOURCE,            XML_TOK_CONNECTION_RESOURCE},
             { XML_NAMESPACE_DB,     XML_SUPPRESS_VERSION_COLUMNS,       XML_TOK_SUPPRESS_VERSION_COLUMNS},
@@ -687,7 +687,7 @@ const SvXMLTokenMap& ODBFilter::GetLoginElemTokenMap() const
 {
     if ( !m_pLoginElemTokenMap.get() )
     {
-        static SvXMLTokenMapEntry aElemTokenMap[]=
+        static const SvXMLTokenMapEntry aElemTokenMap[]=
         {
             { XML_NAMESPACE_DB, XML_USER_NAME,              XML_TOK_USER_NAME},
             { XML_NAMESPACE_DB, XML_IS_PASSWORD_REQUIRED,   XML_TOK_IS_PASSWORD_REQUIRED},
@@ -704,7 +704,7 @@ const SvXMLTokenMap& ODBFilter::GetDatabaseDescriptionElemTokenMap() const
 {
     if ( !m_pDatabaseDescriptionElemTokenMap.get() )
     {
-        static SvXMLTokenMapEntry aElemTokenMap[]=
+        static const SvXMLTokenMapEntry aElemTokenMap[]=
         {
             { XML_NAMESPACE_DB, XML_FILE_BASED_DATABASE,    XML_TOK_FILE_BASED_DATABASE},
             { XML_NAMESPACE_DB, XML_SERVER_DATABASE,        XML_TOK_SERVER_DATABASE},
@@ -719,7 +719,7 @@ const SvXMLTokenMap& ODBFilter::GetDataSourceInfoElemTokenMap() const
 {
     if ( !m_pDataSourceInfoElemTokenMap.get() )
     {
-        static SvXMLTokenMapEntry aElemTokenMap[]=
+        static const SvXMLTokenMapEntry aElemTokenMap[]=
         {
             { XML_NAMESPACE_DB, XML_ADDITIONAL_COLUMN_STATEMENT,XML_TOK_ADDITIONAL_COLUMN_STATEMENT},
             { XML_NAMESPACE_DB, XML_ROW_RETRIEVING_STATEMENT,   XML_TOK_ROW_RETRIEVING_STATEMENT},
@@ -745,7 +745,7 @@ const SvXMLTokenMap& ODBFilter::GetDocumentsElemTokenMap() const
 {
     if ( !m_pDocumentsElemTokenMap.get() )
     {
-        static SvXMLTokenMapEntry aElemTokenMap[]=
+        static const SvXMLTokenMapEntry aElemTokenMap[]=
         {
             { XML_NAMESPACE_DB, XML_COMPONENT,              XML_TOK_COMPONENT},
             { XML_NAMESPACE_DB, XML_COMPONENT_COLLECTION,   XML_TOK_COMPONENT_COLLECTION},
@@ -765,7 +765,7 @@ const SvXMLTokenMap& ODBFilter::GetComponentElemTokenMap() const
 {
     if ( !m_pComponentElemTokenMap.get() )
     {
-        static SvXMLTokenMapEntry aElemTokenMap[]=
+        static const SvXMLTokenMapEntry aElemTokenMap[]=
         {
             { XML_NAMESPACE_XLINK,  XML_HREF,           XML_TOK_HREF    },
             { XML_NAMESPACE_XLINK,  XML_TYPE,           XML_TOK_TYPE    },
@@ -784,7 +784,7 @@ const SvXMLTokenMap& ODBFilter::GetQueryElemTokenMap() const
 {
     if ( !m_pQueryElemTokenMap.get() )
     {
-        static SvXMLTokenMapEntry aElemTokenMap[]=
+        static const SvXMLTokenMapEntry aElemTokenMap[]=
         {
             { XML_NAMESPACE_DB, XML_COMMAND,            XML_TOK_COMMAND },
             { XML_NAMESPACE_DB, XML_ESCAPE_PROCESSING,  XML_TOK_ESCAPE_PROCESSING   },
@@ -808,7 +808,7 @@ const SvXMLTokenMap& ODBFilter::GetColumnElemTokenMap() const
 {
     if ( !m_pColumnElemTokenMap.get() )
     {
-        static SvXMLTokenMapEntry aElemTokenMap[]=
+        static const SvXMLTokenMapEntry aElemTokenMap[]=
         {
             { XML_NAMESPACE_DB, XML_NAME,                       XML_TOK_COLUMN_NAME             },
             { XML_NAMESPACE_DB, XML_STYLE_NAME,                 XML_TOK_COLUMN_STYLE_NAME       },
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index e6ec4e7..df277c3 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -815,7 +815,7 @@ sal_Bool callColumnFormatDialog(Window* _pParent,
         { SID_ATTR_NUMBERFORMAT_ONE_AREA,   SFX_ITEM_POOLABLE },
         { SID_ATTR_NUMBERFORMAT_INFO,       SFX_ITEM_POOLABLE }
     };
-    static sal_uInt16 aAttrMap[] =
+    static const sal_uInt16 aAttrMap[] =
     {
         SBA_DEF_RANGEFORMAT, SBA_ATTR_ALIGN_HOR_JUSTIFY,
         SID_ATTR_NUMBERFORMAT_ONE_AREA, SID_ATTR_NUMBERFORMAT_ONE_AREA,


More information about the Libreoffice-commits mailing list