[Libreoffice-commits] core.git: 2 commits - dbaccess/source desktop/source editeng/source extensions/source filter/source

Noel Grandin noel.grandin at collabora.co.uk
Fri Nov 4 13:15:57 UTC 2016


 dbaccess/source/core/api/CacheSet.cxx                   |    9 -
 dbaccess/source/core/api/KeySet.cxx                     |    9 -
 dbaccess/source/core/api/OptimisticSet.cxx              |   16 +--
 dbaccess/source/core/api/View.cxx                       |    3 
 dbaccess/source/core/dataaccess/documentcontainer.cxx   |    4 
 dbaccess/source/core/dataaccess/documentdefinition.cxx  |    3 
 dbaccess/source/core/misc/dsntypes.cxx                  |    3 
 dbaccess/source/ui/control/FieldDescControl.cxx         |    3 
 dbaccess/source/ui/dlg/indexdialog.cxx                  |   16 +--
 dbaccess/source/ui/dlg/queryfilter.cxx                  |    3 
 dbaccess/source/ui/dlg/queryorder.cxx                   |    6 -
 dbaccess/source/ui/dlg/tablespage.cxx                   |    3 
 dbaccess/source/ui/misc/TokenWriter.cxx                 |   22 +---
 dbaccess/source/ui/misc/UITools.cxx                     |    6 -
 dbaccess/source/ui/misc/indexcollection.cxx             |   19 +---
 dbaccess/source/ui/querydesign/QueryDesignView.cxx      |    7 -
 dbaccess/source/ui/querydesign/querycontroller.cxx      |    3 
 desktop/source/app/app.cxx                              |    3 
 desktop/source/deployment/registry/dp_backend.cxx       |    4 
 desktop/source/migration/services/wordbookmigration.cxx |   10 --
 editeng/source/misc/svxacorr.cxx                        |    5 -
 editeng/source/uno/unonrule.cxx                         |    5 -
 extensions/source/dbpilots/controlwizard.cxx            |    3 
 extensions/source/dbpilots/gridwizard.cxx               |    9 -
 extensions/source/propctrlr/formcomponenthandler.cxx    |    9 -
 filter/source/msfilter/escherex.cxx                     |   33 +------
 filter/source/msfilter/mstoolbar.cxx                    |    6 -
 filter/source/msfilter/msvbahelper.cxx                  |   19 +---
 filter/source/msfilter/svdfppt.cxx                      |   60 ++++---------
 filter/source/svg/svgexport.cxx                         |   44 ++-------
 filter/source/svg/svgreader.cxx                         |    9 -
 filter/source/svg/svgwriter.cxx                         |   73 ++++------------
 32 files changed, 133 insertions(+), 294 deletions(-)

New commits:
commit c1805c48ae6057d370a35f2e059f3ee82396c407
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Fri Nov 4 12:29:35 2016 +0200

    loplugin:oncevar in dbaccess
    
    Change-Id: I956063bb354fbbd002e922bb06d0b3863a2750fc
    Reviewed-on: https://gerrit.libreoffice.org/30565
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/dbaccess/source/core/api/CacheSet.cxx b/dbaccess/source/core/api/CacheSet.cxx
index 7f492b4..723e292 100644
--- a/dbaccess/source/core/api/CacheSet.cxx
+++ b/dbaccess/source/core/api/CacheSet.cxx
@@ -157,16 +157,14 @@ void SAL_CALL OCacheSet::insertRow( const ORowSetRow& _rInsertRow,const connecti
 
     // set values and column names
     OUStringBuffer aValues(" VALUES ( ");
-    static const char aPara[] = "?,";
     OUString aQuote = getIdentifierQuoteString();
-    static const char aComma[] = ",";
     sal_Int32 i = 1;
     ORowVector< ORowSetValue >::Vector::const_iterator aIter = _rInsertRow->get().begin()+1;
     connectivity::ORowVector< ORowSetValue > ::Vector::iterator aEnd = _rInsertRow->get().end();
     for(; aIter != aEnd;++aIter)
     {
-        aSql.append(::dbtools::quoteName( aQuote,m_xSetMetaData->getColumnName(i++)) + aComma);
-        aValues.append(aPara);
+        aSql.append(::dbtools::quoteName( aQuote,m_xSetMetaData->getColumnName(i++)) + ",");
+        aValues.append("?,");
     }
 
     aSql[aSql.getLength() - 1] = ')';
@@ -227,7 +225,6 @@ void OCacheSet::fillParameters( const ORowSetRow& _rRow
 
     OUString aColumnName;
 
-    static const char aPara[] = "?,";
     static const char aAnd[] = " AND ";
 
     OUString aQuote  = getIdentifierQuoteString();
@@ -271,7 +268,7 @@ void OCacheSet::fillParameters( const ORowSetRow& _rRow
         }
         if(aIter->isModified())
         {
-            _sParameter.append(::dbtools::quoteName( aQuote,aColumnName) + aPara);
+            _sParameter.append(::dbtools::quoteName( aQuote,aColumnName) + "?,");
         }
     }
 }
diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx
index a42d273..18724f6 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -221,12 +221,11 @@ namespace
 {
     void appendOneKeyColumnClause( const OUString &tblName, const OUString &colName, const connectivity::ORowSetValue &_rValue, OUStringBuffer &o_buf )
     {
-        static const char s_sDot[] = ".";
         OUString fullName;
         if (tblName.isEmpty())
             fullName = colName;
         else
-            fullName = tblName + s_sDot + colName;
+            fullName = tblName + "." + colName;
         if ( _rValue.isNull() )
         {
             o_buf.append(fullName + " IS NULL ");
@@ -627,9 +626,7 @@ void SAL_CALL OKeySet::insertRow( const ORowSetRow& _rInsertRow,const connectivi
 
     // set values and column names
     OUStringBuffer aValues(" VALUES ( ");
-    static const char aPara[] = "?,";
     OUString aQuote = getIdentifierQuoteString();
-    static const char aComma[] = ",";
 
     SelectColumnsMetaData::const_iterator aIter = m_pColumnNames->begin();
     SelectColumnsMetaData::const_iterator aEnd = m_pColumnNames->end();
@@ -644,8 +641,8 @@ void SAL_CALL OKeySet::insertRow( const ORowSetRow& _rInsertRow,const connectivi
             {
                 bRefetch = ::std::find(m_aFilterColumns.begin(),m_aFilterColumns.end(),aIter->second.sRealName) == m_aFilterColumns.end();
             }
-            aSql.append(::dbtools::quoteName( aQuote,aIter->second.sRealName) + aComma);
-            aValues.append(aPara);
+            aSql.append(::dbtools::quoteName( aQuote,aIter->second.sRealName) + ",");
+            aValues.append("?,");
             bModified = true;
         }
     }
diff --git a/dbaccess/source/core/api/OptimisticSet.cxx b/dbaccess/source/core/api/OptimisticSet.cxx
index 154ed3d..f32e709 100644
--- a/dbaccess/source/core/api/OptimisticSet.cxx
+++ b/dbaccess/source/core/api/OptimisticSet.cxx
@@ -172,7 +172,6 @@ void SAL_CALL OptimisticSet::updateRow(const ORowSetRow& _rInsertRow ,const ORow
     if ( m_aJoinedKeyColumns.empty() )
         throw SQLException();
     // list all columns that should be set
-    static const char s_sPara[] = " = ?";
     OUString aQuote  = getIdentifierQuoteString();
 
     ::std::map< OUString,bool > aResultSetChanged;
@@ -205,7 +204,7 @@ void SAL_CALL OptimisticSet::updateRow(const ORowSetRow& _rInsertRow ,const ORow
             OUStringBuffer& rPart = aSql[aIter->second.sTableName];
             if ( !rPart.isEmpty() )
                 rPart.append(", ");
-            rPart.append(sQuotedColumnName + s_sPara);
+            rPart.append(sQuotedColumnName + " = ?");
         }
     }
 
@@ -215,9 +214,6 @@ void SAL_CALL OptimisticSet::updateRow(const ORowSetRow& _rInsertRow ,const ORow
     if( aKeyConditions.empty() )
         ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_CONDITION_FOR_PK ), StandardSQLState::GENERAL_ERROR, m_xConnection );
 
-    static const char s_sUPDATE[] = "UPDATE ";
-    static const char s_sSET[] = " SET ";
-
     Reference<XDatabaseMetaData> xMetaData = m_xConnection->getMetaData();
 
     TSQLStatements::iterator aSqlIter = aSql.begin();
@@ -229,8 +225,8 @@ void SAL_CALL OptimisticSet::updateRow(const ORowSetRow& _rInsertRow ,const ORow
             m_bResultSetChanged = m_bResultSetChanged || aResultSetChanged[aSqlIter->first];
             OUString sCatalog,sSchema,sTable;
             ::dbtools::qualifiedNameComponents(xMetaData,aSqlIter->first,sCatalog,sSchema,sTable,::dbtools::EComposeRule::InDataManipulation);
-            OUStringBuffer sSql(s_sUPDATE + ::dbtools::composeTableNameForSelect( m_xConnection, sCatalog, sSchema, sTable ) +
-                                       s_sSET + aSqlIter->second.toString());
+            OUStringBuffer sSql("UPDATE " + ::dbtools::composeTableNameForSelect( m_xConnection, sCatalog, sSchema, sTable ) +
+                                       " SET " + aSqlIter->second.toString());
             OUStringBuffer& rCondition = aKeyConditions[aSqlIter->first];
             if ( !rCondition.isEmpty() )
                 sSql.append(" WHERE " + rCondition.toString() );
@@ -283,8 +279,6 @@ void SAL_CALL OptimisticSet::insertRow( const ORowSetRow& _rInsertRow,const conn
         ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_VALUE_CHANGED ), StandardSQLState::GENERAL_ERROR, m_xConnection );
 
     Reference<XDatabaseMetaData> xMetaData = m_xConnection->getMetaData();
-    static const char s_sINSERT[] = "INSERT INTO ";
-    static const char s_sVALUES[] = ") VALUES ( ";
     TSQLStatements::iterator aSqlIter = aSql.begin();
     TSQLStatements::iterator aSqlEnd  = aSql.end();
     for(;aSqlIter != aSqlEnd ; ++aSqlIter)
@@ -295,8 +289,8 @@ void SAL_CALL OptimisticSet::insertRow( const ORowSetRow& _rInsertRow,const conn
             OUString sCatalog,sSchema,sTable;
             ::dbtools::qualifiedNameComponents(xMetaData,aSqlIter->first,sCatalog,sSchema,sTable,::dbtools::EComposeRule::InDataManipulation);
             OUString sComposedTableName = ::dbtools::composeTableNameForSelect( m_xConnection, sCatalog, sSchema, sTable );
-            OUString sSql(s_sINSERT + sComposedTableName + " ( " + aSqlIter->second.toString() +
-                                 s_sVALUES + aParameter[aSqlIter->first].toString() + " )");
+            OUString sSql("INSERT INTO " + sComposedTableName + " ( " + aSqlIter->second.toString() +
+                                 ") VALUES ( " + aParameter[aSqlIter->first].toString() + " )");
 
             OUStringBuffer& rCondition = aKeyConditions[aSqlIter->first];
             if ( !rCondition.isEmpty() )
diff --git a/dbaccess/source/core/api/View.cxx b/dbaccess/source/core/api/View.cxx
index b30f1c8..41e4800 100644
--- a/dbaccess/source/core/api/View.cxx
+++ b/dbaccess/source/core/api/View.cxx
@@ -56,8 +56,7 @@ namespace dbaccess
         try
         {
             Reference<XMultiServiceFactory> xFac(_rxConnection,UNO_QUERY_THROW);
-            static const char s_sViewAccess[] = "ViewAccessServiceName";
-            m_xViewAccess.set(xFac->createInstance(lcl_getServiceNameForSetting(_rxConnection,s_sViewAccess)),UNO_QUERY);
+            m_xViewAccess.set(xFac->createInstance(lcl_getServiceNameForSetting(_rxConnection,"ViewAccessServiceName")),UNO_QUERY);
         }
         catch(const Exception& )
         {
diff --git a/dbaccess/source/core/dataaccess/documentcontainer.cxx b/dbaccess/source/core/dataaccess/documentcontainer.cxx
index 5430911..51bebd7 100644
--- a/dbaccess/source/core/dataaccess/documentcontainer.cxx
+++ b/dbaccess/source/core/dataaccess/documentcontainer.cxx
@@ -218,9 +218,7 @@ Reference< XInterface > SAL_CALL ODocumentContainer::createInstanceWithArguments
         bool bNew = sPersistentName.isEmpty();
         if ( bNew )
         {
-            static const char sBaseName[] = "Obj";
-
-            sPersistentName = sBaseName + OUString::number(rDefinitions.size() + 1);
+            sPersistentName = "Obj" + OUString::number(rDefinitions.size() + 1);
             Reference<XNameAccess> xElements(getContainerStorage(),UNO_QUERY);
             if ( xElements.is() )
                 sPersistentName = ::dbtools::createUniqueName(xElements,sPersistentName);
diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx
index 0dbfdaf..a0cdc67 100644
--- a/dbaccess/source/core/dataaccess/documentdefinition.cxx
+++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx
@@ -1351,9 +1351,8 @@ void ODocumentDefinition::saveAs()
                         try
                         {
                             Reference< XStorage> xStorage = getContainerStorage();
-                            static const char sBaseName[] = "Obj";
 
-                            OUString sPersistentName = ::dbtools::createUniqueName(xStorage,sBaseName);
+                            OUString sPersistentName = ::dbtools::createUniqueName(xStorage,"Obj");
                             xStorage->copyElementTo(m_pImpl->m_aProps.sPersistentName,xStorage,sPersistentName);
 
                             OUString sOldName = m_pImpl->m_aProps.aTitle;
diff --git a/dbaccess/source/core/misc/dsntypes.cxx b/dbaccess/source/core/misc/dsntypes.cxx
index 87b1606..0414b77 100644
--- a/dbaccess/source/core/misc/dsntypes.cxx
+++ b/dbaccess/source/core/misc/dsntypes.cxx
@@ -292,8 +292,7 @@ bool ODsnTypeCollection::isEmbeddedDatabase( const OUString& _sURL )
 OUString ODsnTypeCollection::getEmbeddedDatabase() const
 {
     OUString sEmbeddedDatabaseURL;
-    static const char s_sNodeName[] = "org.openoffice.Office.DataAccess"; ///Installed
-    const ::utl::OConfigurationTreeRoot aInstalled = ::utl::OConfigurationTreeRoot::createWithComponentContext(m_xContext, s_sNodeName, -1, ::utl::OConfigurationTreeRoot::CM_READONLY);
+    const ::utl::OConfigurationTreeRoot aInstalled = ::utl::OConfigurationTreeRoot::createWithComponentContext(m_xContext, "org.openoffice.Office.DataAccess", -1, ::utl::OConfigurationTreeRoot::CM_READONLY);
     if ( aInstalled.isValid() )
     {
         if ( aInstalled.hasByName("EmbeddedDatabases/DefaultEmbeddedDatabase/Value") )
diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx
index ad41b38..48bad58 100644
--- a/dbaccess/source/ui/control/FieldDescControl.cxx
+++ b/dbaccess/source/ui/control/FieldDescControl.cxx
@@ -1146,8 +1146,7 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr )
             ActivateAggregate( tpScale );
             pScale->SetMax(::std::max<sal_Int32>(pFieldType->nMaximumScale,pFieldDescr->GetScale()));
             pScale->SetMin(pFieldType->nMinimumScale);
-            static const char s_sPRECISION[] = "PRECISION";
-            pScale->SetSpecialReadOnly(pFieldType->aCreateParams.isEmpty() || pFieldType->aCreateParams == s_sPRECISION);
+            pScale->SetSpecialReadOnly(pFieldType->aCreateParams.isEmpty() || pFieldType->aCreateParams == "PRECISION");
         }
         else
             DeactivateAggregate( tpScale );
diff --git a/dbaccess/source/ui/dlg/indexdialog.cxx b/dbaccess/source/ui/dlg/indexdialog.cxx
index d2758b0..d094ae9 100644
--- a/dbaccess/source/ui/dlg/indexdialog.cxx
+++ b/dbaccess/source/ui/dlg/indexdialog.cxx
@@ -37,12 +37,6 @@
 #include <connectivity/dbtools.hxx>
 #include <osl/diagnose.h>
 
-const char INDEX_NEW_CMD[] = ".index:createNew";
-const char INDEX_DROP_CMD[] = ".index:dropCurrent";
-const char INDEX_RENAME_CMD[] = ".index:renameCurrent";
-const char INDEX_SAVE_CMD[] = ".index:saveCurrent";
-const char INDEX_RESET_CMD[] = ".index:resetCurrent";
-
 namespace dbaui
 {
 
@@ -175,11 +169,11 @@ namespace dbaui
     {
         get(m_pActions, "ACTIONS");
 
-        mnNewCmdId = m_pActions->GetItemId(INDEX_NEW_CMD);
-        mnDropCmdId = m_pActions->GetItemId(INDEX_DROP_CMD);
-        mnRenameCmdId = m_pActions->GetItemId(INDEX_RENAME_CMD);
-        mnSaveCmdId = m_pActions->GetItemId(INDEX_SAVE_CMD);
-        mnResetCmdId = m_pActions->GetItemId(INDEX_RESET_CMD);
+        mnNewCmdId = m_pActions->GetItemId(".index:createNew");
+        mnDropCmdId = m_pActions->GetItemId(".index:dropCurrent");
+        mnRenameCmdId = m_pActions->GetItemId(".index:renameCurrent");
+        mnSaveCmdId = m_pActions->GetItemId(".index:saveCurrent");
+        mnResetCmdId = m_pActions->GetItemId(".index:resetCurrent");
 
         maScNewCmdImg = m_pActions->GetItemImage(mnNewCmdId);
         maScDropCmdImg = m_pActions->GetItemImage(mnDropCmdId);
diff --git a/dbaccess/source/ui/dlg/queryfilter.cxx b/dbaccess/source/ui/dlg/queryfilter.cxx
index 710c532..acfc937 100644
--- a/dbaccess/source/ui/dlg/queryfilter.cxx
+++ b/dbaccess/source/ui/dlg/queryfilter.cxx
@@ -348,8 +348,7 @@ bool DlgFilterCrit::getCondition(const ListBox& _rField,const ListBox& _rComp,co
                 _rFilter.Name = ::dbtools::quoteName(aQuote,_rFilter.Name);
                 if ( !sTableName.isEmpty() )
                 {
-                    static const char sSep[] = ".";
-                    sTableName += sSep;
+                    sTableName += ".";
                     sTableName += _rFilter.Name;
                     _rFilter.Name = sTableName;
                 }
diff --git a/dbaccess/source/ui/dlg/queryorder.cxx b/dbaccess/source/ui/dlg/queryorder.cxx
index b495283..5e3c1205 100644
--- a/dbaccess/source/ui/dlg/queryorder.cxx
+++ b/dbaccess/source/ui/dlg/queryorder.cxx
@@ -216,8 +216,6 @@ OUString DlgOrderCrit::GetOrderList( ) const
 {
     Reference<XDatabaseMetaData> xMetaData = m_xConnection->getMetaData();
     OUString sQuote  = xMetaData.is() ? xMetaData->getIdentifierQuoteString() : OUString();
-    static const char sDESC[] = " DESC ";
-    static const char sASC[] = " ASC ";
 
     Reference< XNameAccess> xColumns = Reference< XColumnsSupplier >(m_xQueryComposer,UNO_QUERY)->getColumns();
 
@@ -232,9 +230,9 @@ OUString DlgOrderCrit::GetOrderList( ) const
             OUString sName = m_aColumnList[i]->GetSelectEntry();
             sOrder += ::dbtools::quoteName(sQuote,sName);
             if(m_aValueList[i]->GetSelectEntryPos())
-                sOrder += sDESC;
+                sOrder += " DESC ";
             else
-                sOrder += sASC;
+                sOrder += " ASC ";
         }
     }
     return sOrder;
diff --git a/dbaccess/source/ui/dlg/tablespage.cxx b/dbaccess/source/ui/dlg/tablespage.cxx
index 7886c44..3657169 100644
--- a/dbaccess/source/ui/dlg/tablespage.cxx
+++ b/dbaccess/source/ui/dlg/tablespage.cxx
@@ -440,7 +440,6 @@ namespace dbaui
     Sequence< OUString > OTableSubscriptionPage::collectDetailedSelection() const
     {
         Sequence< OUString > aTableFilter;
-        static const char sDot[] = ".";
         static const char sWildcard[] = "%";
 
         OUString sComposedName;
@@ -494,7 +493,7 @@ namespace dbaui
                             }
                         }
                         bSchemaWildcard = OTableTreeListBox::isWildcardChecked(pSchema);
-                        sComposedName += m_pTablesList->GetEntryText( pSchema ) + sDot;
+                        sComposedName += m_pTablesList->GetEntryText( pSchema ) + ".";
                     }
 
                     if (bSchemaWildcard)
diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx
index cb7d8873..ba5e4b0 100644
--- a/dbaccess/source/ui/misc/TokenWriter.cxx
+++ b/dbaccess/source/ui/misc/TokenWriter.cxx
@@ -74,11 +74,6 @@ using namespace ::com::sun::star::sdbcx;
 using namespace ::com::sun::star::awt;
 using namespace ::com::sun::star::util;
 
-const static char sMyBegComment[]   = "<!-- ";
-const static char sMyEndComment[]   = " -->";
-const static char sFontFamily[]     = "font-family: ";
-const static char sFontSize[]       = "font-size: ";
-
 #define SBA_FORMAT_SELECTION_COUNT  4
 #define CELL_X                      1437
 
@@ -410,8 +405,6 @@ bool ORTFImportExport::Write()
     m_pStream->WriteCharPtr( ";\\red255\\green255\\blue255;\\red192\\green192\\blue192;}" )
                 .WriteCharPtr( SAL_NEWLINE_STRING );
 
-    static char const aTRRH[] = "\\trrh-270\\pard\\intbl";
-    static char const aFS[] = "\\fs20\\f0\\cf0\\cb2";
     static char const aCell1[] = "\\clbrdrl\\brdrs\\brdrcf0\\clbrdrt\\brdrs\\brdrcf0\\clbrdrb\\brdrs\\brdrcf0\\clbrdrr\\brdrs\\brdrcf0\\clshdng10000\\clcfpat2\\cellx";
 
     m_pStream->WriteCharPtr( OOO_STRING_SVTOOLS_RTF_TROWD ).WriteCharPtr( OOO_STRING_SVTOOLS_RTF_TRGAPH );
@@ -442,7 +435,7 @@ bool ORTFImportExport::Write()
 
         // column description
         m_pStream->WriteChar( '{' ).WriteCharPtr( SAL_NEWLINE_STRING );
-        m_pStream->WriteCharPtr( aTRRH );
+        m_pStream->WriteCharPtr( "\\trrh-270\\pard\\intbl" );
 
         std::unique_ptr<OString[]> pHorzChar(new OString[nCount]);
 
@@ -481,7 +474,7 @@ bool ORTFImportExport::Write()
             if ( bUnderline )   m_pStream->WriteCharPtr( OOO_STRING_SVTOOLS_RTF_UL );
             if ( bStrikeout )   m_pStream->WriteCharPtr( OOO_STRING_SVTOOLS_RTF_STRIKE );
 
-            m_pStream->WriteCharPtr( aFS );
+            m_pStream->WriteCharPtr( "\\fs20\\f0\\cf0\\cb2" );
             m_pStream->WriteChar( ' ' );
             RTFOutFuncs::Out_String(*m_pStream,sColumnName,eDestEnc);
 
@@ -546,7 +539,6 @@ void ORTFImportExport::appendRow(OString* pHorzChar,sal_Int32 _nColumnCount,sal_
         m_pStream->WriteCharPtr( SAL_NEWLINE_STRING );
 
         static char const aCell2[] = "\\clbrdrl\\brdrs\\brdrcf2\\clbrdrt\\brdrs\\brdrcf2\\clbrdrb\\brdrs\\brdrcf2\\clbrdrr\\brdrs\\brdrcf2\\clshdng10000\\clcfpat1\\cellx";
-        static char const aTRRH[] = "\\trrh-270\\pard\\intbl";
 
         for ( sal_Int32 i=1; i<=_nColumnCount; ++i )
         {
@@ -562,7 +554,7 @@ void ORTFImportExport::appendRow(OString* pHorzChar,sal_Int32 _nColumnCount,sal_
         Reference< XRowSet > xRowSet(m_xRow,UNO_QUERY);
 
         m_pStream->WriteChar( '{' );
-        m_pStream->WriteCharPtr( aTRRH );
+        m_pStream->WriteCharPtr( "\\trrh-270\\pard\\intbl" );
         for ( sal_Int32 i=1; i <= _nColumnCount; ++i )
         {
             m_pStream->WriteCharPtr( SAL_NEWLINE_STRING );
@@ -711,15 +703,15 @@ void OHTMLImportExport::WriteBody()
     IncIndent(1);
     m_pStream->WriteCharPtr( "<" ).WriteCharPtr( OOO_STRING_SVTOOLS_HTML_style ).WriteCharPtr( " " ).WriteCharPtr( OOO_STRING_SVTOOLS_HTML_O_type ).WriteCharPtr( "=\"text/css\">" );
 
-    m_pStream->WriteCharPtr( sMyBegComment ); OUT_LF();
-    m_pStream->WriteCharPtr( OOO_STRING_SVTOOLS_HTML_body ).WriteCharPtr( " { " ).WriteCharPtr( sFontFamily ).WriteChar( '"' ).WriteCharPtr( OUStringToOString(m_aFont.Name, osl_getThreadTextEncoding()).getStr() ).WriteChar( '\"' );
+    m_pStream->WriteCharPtr( "<!-- " ); OUT_LF();
+    m_pStream->WriteCharPtr( OOO_STRING_SVTOOLS_HTML_body ).WriteCharPtr( " { " ).WriteCharPtr( "font-family: " ).WriteChar( '"' ).WriteCharPtr( OUStringToOString(m_aFont.Name, osl_getThreadTextEncoding()).getStr() ).WriteChar( '\"' );
         // TODO : think about the encoding of the font name
-    m_pStream->WriteCharPtr( "; " ).WriteCharPtr( sFontSize );
+    m_pStream->WriteCharPtr( "; " ).WriteCharPtr( "font-size: " );
     m_pStream->WriteInt32AsString(m_aFont.Height);
     m_pStream->WriteChar( '}' );
 
     OUT_LF();
-    m_pStream->WriteCharPtr( sMyEndComment );
+    m_pStream->WriteCharPtr( " -->" );
     IncIndent(-1); OUT_LF(); TAG_OFF_LF( OOO_STRING_SVTOOLS_HTML_style );
     OUT_LF();
 
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index 35ba938..f416675 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -436,8 +436,6 @@ void fillTypeInfo(  const Reference< css::sdbc::XConnection>& _rxConnection,
     // Information for a single SQL type
     if(xRs.is())
     {
-        static const char aB1[] = " [ ";
-        static const char aB2[] = " ]";
         Reference<XResultSetMetaData> xResultSetMetaData = Reference<XResultSetMetaDataSupplier>(xRs,UNO_QUERY)->getMetaData();
         ::connectivity::ORowSetValue aValue;
         ::std::vector<sal_Int32> aTypes;
@@ -620,11 +618,11 @@ void fillTypeInfo(  const Reference< css::sdbc::XConnection>& _rxConnection,
             if ( !aName.isEmpty() )
             {
                 pInfo->aUIName = aName;
-                pInfo->aUIName += aB1;
+                pInfo->aUIName += " [ ";
             }
             pInfo->aUIName += pInfo->aTypeName;
             if ( !aName.isEmpty() )
-                pInfo->aUIName += aB2;
+                pInfo->aUIName += " ]";
             // Now that we have the type info, save it in the multimap
             _rTypeInfoMap.insert(OTypeInfoMap::value_type(pInfo->nType,pInfo));
         }
diff --git a/dbaccess/source/ui/misc/indexcollection.cxx b/dbaccess/source/ui/misc/indexcollection.cxx
index b45dbd4..96e7010 100644
--- a/dbaccess/source/ui/misc/indexcollection.cxx
+++ b/dbaccess/source/ui/misc/indexcollection.cxx
@@ -142,11 +142,9 @@ namespace dbaui
             }
 
             // set the properties
-            static const char s_sUniquePropertyName[] = "IsUnique";
-            static const char s_sSortPropertyName[] = "IsAscending";
             static const char s_sNamePropertyName[] = "Name";
             // the index' own props
-            xIndexDescriptor->setPropertyValue(s_sUniquePropertyName, css::uno::makeAny(_rPos->bUnique));
+            xIndexDescriptor->setPropertyValue("IsUnique", css::uno::makeAny(_rPos->bUnique));
             xIndexDescriptor->setPropertyValue(s_sNamePropertyName, makeAny(_rPos->sName));
 
             // the fields
@@ -161,7 +159,7 @@ namespace dbaui
                 OSL_ENSURE(xColDescriptor.is(), "OIndexCollection::commitNewIndex: invalid column descriptor!");
                 if (xColDescriptor.is())
                 {
-                    xColDescriptor->setPropertyValue(s_sSortPropertyName, css::uno::makeAny(aFieldLoop->bSortAscending));
+                    xColDescriptor->setPropertyValue("IsAscending", css::uno::makeAny(aFieldLoop->bSortAscending));
                     xColDescriptor->setPropertyValue(s_sNamePropertyName, makeAny(OUString(aFieldLoop->sFieldName)));
                     xAppendCols->appendByDescriptor(xColDescriptor);
                 }
@@ -244,14 +242,9 @@ namespace dbaui
 
     void OIndexCollection::implFillIndexInfo(OIndex& _rIndex, const Reference< XPropertySet >& _rxDescriptor)
     {
-        static const char s_sPrimaryIndexPropertyName[] = "IsPrimaryKeyIndex";
-        static const char s_sUniquePropertyName[] = "IsUnique";
-        static const char s_sSortPropertyName[] = "IsAscending";
-        static const char s_sCatalogPropertyName[] = "Catalog";
-
-        _rIndex.bPrimaryKey = ::cppu::any2bool(_rxDescriptor->getPropertyValue(s_sPrimaryIndexPropertyName));
-        _rIndex.bUnique = ::cppu::any2bool(_rxDescriptor->getPropertyValue(s_sUniquePropertyName));
-        _rxDescriptor->getPropertyValue(s_sCatalogPropertyName) >>= _rIndex.sDescription;
+        _rIndex.bPrimaryKey = ::cppu::any2bool(_rxDescriptor->getPropertyValue("IsPrimaryKeyIndex"));
+        _rIndex.bUnique = ::cppu::any2bool(_rxDescriptor->getPropertyValue("IsUnique"));
+        _rxDescriptor->getPropertyValue("Catalog") >>= _rIndex.sDescription;
 
         // the columns
         Reference< XColumnsSupplier > xSuppCols(_rxDescriptor, UNO_QUERY);
@@ -283,7 +276,7 @@ namespace dbaui
 
                 // get the relevant properties
                 aCopyTo->sFieldName = *pFieldNames;
-                aCopyTo->bSortAscending = ::cppu::any2bool(xIndexColumn->getPropertyValue(s_sSortPropertyName));
+                aCopyTo->bSortAscending = ::cppu::any2bool(xIndexColumn->getPropertyValue("IsAscending"));
             }
 
             _rIndex.aFields.resize(aCopyTo - _rIndex.aFields.begin());
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index e5186d8..09228c1 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -630,9 +630,6 @@ namespace
 
             OJoinTableView::OTableWindowMap& rTabList = _pView->getTableView()->GetTabWinMap();
 
-            static const char sFieldSeparator[] = ", ";
-            static const char s_sAs[] = " AS ";
-
             aIter = _rFieldList.begin();
             for(;aIter != aEnd;++aIter)
             {
@@ -689,11 +686,11 @@ namespace
                         pEntryField->isNumericOrAggreateFunction()      ||
                         pEntryField->isOtherFunction()))
                     {
-                        aTmpStr.append(s_sAs);
+                        aTmpStr.append(" AS ");
                         aTmpStr.append(::dbtools::quoteName(aQuote, rFieldAlias));
                     }
                     aFieldListStr.append(aTmpStr.makeStringAndClear());
-                    aFieldListStr.append(sFieldSeparator);
+                    aFieldListStr.append(", ");
                 }
             }
             if(!aFieldListStr.isEmpty())
diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx
index 3fa97d7..6dac16d 100644
--- a/dbaccess/source/ui/querydesign/querycontroller.cxx
+++ b/dbaccess/source/ui/querydesign/querycontroller.cxx
@@ -279,9 +279,8 @@ namespace
      */
     void grabFocusFromLimitBox( OQueryController& _rController )
     {
-        static const char sResourceURL[] = "private:resource/toolbar/designobjectbar";
         Reference< XLayoutManager > xLayoutManager = OGenericUnoController::getLayoutManager( _rController.getFrame() );
-        Reference< XUIElement > xUIElement = xLayoutManager->getElement(sResourceURL);
+        Reference< XUIElement > xUIElement = xLayoutManager->getElement("private:resource/toolbar/designobjectbar");
         if (xUIElement.is())
         {
             Reference< XWindow > xWindow(xUIElement->getRealInterface(), css::uno::UNO_QUERY);
commit 2dfc4c0845c72b3a1cf19546a1606907f36eea42
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Fri Nov 4 12:28:59 2016 +0200

    loplugin:oncevar in desktop..filter
    
    Change-Id: I21c47cacbcd68f06eea7ccbbfa6d04fc65e2b7ee
    Reviewed-on: https://gerrit.libreoffice.org/30564
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 44598da..7f278e1 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1142,14 +1142,13 @@ void impl_checkRecoveryState(bool& bCrashed           ,
 bool impl_callRecoveryUI(bool bEmergencySave     ,
                          bool bExistsRecoveryData)
 {
-    static const char SERVICENAME_RECOVERYUI[] = "com.sun.star.comp.svx.RecoveryUI";
     static const char COMMAND_EMERGENCYSAVE[] = "vnd.sun.star.autorecovery:/doEmergencySave";
     static const char COMMAND_RECOVERY[] = "vnd.sun.star.autorecovery:/doAutoRecovery";
 
     css::uno::Reference< css::uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
 
     Reference< css::frame::XSynchronousDispatch > xRecoveryUI(
-        xContext->getServiceManager()->createInstanceWithContext(SERVICENAME_RECOVERYUI, xContext),
+        xContext->getServiceManager()->createInstanceWithContext("com.sun.star.comp.svx.RecoveryUI", xContext),
         css::uno::UNO_QUERY_THROW);
 
     Reference< css::util::XURLTransformer > xURLParser =
diff --git a/desktop/source/deployment/registry/dp_backend.cxx b/desktop/source/deployment/registry/dp_backend.cxx
index a7ca243..4b81c5e 100644
--- a/desktop/source/deployment/registry/dp_backend.cxx
+++ b/desktop/source/deployment/registry/dp_backend.cxx
@@ -268,8 +268,6 @@ void PackageRegistryBackend::deleteUnusedFolders(
         // get all temp directories:
         ::std::vector<OUString> tempEntries;
 
-        const char tmp[] = ".tmp";
-
         while (xResultSet->next())
         {
             OUString title(
@@ -277,7 +275,7 @@ void PackageRegistryBackend::deleteUnusedFolders(
                     xResultSet, UNO_QUERY_THROW )->getString(
                         1 /* Title */ ) );
 
-            if (title.endsWith(tmp))
+            if (title.endsWith(".tmp"))
                 tempEntries.push_back(
                     makeURLAppendSysPathSegment(sDataFolder, title));
         }
diff --git a/desktop/source/migration/services/wordbookmigration.cxx b/desktop/source/migration/services/wordbookmigration.cxx
index f74b719..bf6816d 100644
--- a/desktop/source/migration/services/wordbookmigration.cxx
+++ b/desktop/source/migration/services/wordbookmigration.cxx
@@ -29,12 +29,6 @@ using namespace ::com::sun::star::uno;
 
 namespace migration
 {
-
-
-    static const char sSourceSubDir[] = "/user/wordbook";
-    static const char sTargetSubDir[] = "/user/wordbook";
-
-
     // component operations
 
 
@@ -156,7 +150,7 @@ bool IsUserWordbook( const OUString& rFile )
         ::utl::Bootstrap::PathStatus aStatus = ::utl::Bootstrap::locateUserInstallation( sTargetDir );
         if ( aStatus == ::utl::Bootstrap::PATH_EXISTS )
         {
-            sTargetDir += sTargetSubDir;
+            sTargetDir += "/user/wordbook";
             TStringVectorPtr aFileList = getFiles( m_sSourceDir );
             TStringVector::const_iterator aI = aFileList->begin();
             while ( aI != aFileList->end() )
@@ -229,7 +223,7 @@ bool IsUserWordbook( const OUString& rFile )
                 {
                     OSL_FAIL( "WordbookMigration::initialize: argument UserData has wrong type!" );
                 }
-                m_sSourceDir += sSourceSubDir;
+                m_sSourceDir += "/user/wordbook";
                 break;
             }
         }
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 247d03b..fafb4be 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -96,9 +96,6 @@ static const sal_Char
     /* also at these ends - Brackets and all kinds of begin characters */
     sImplEndSkipChars[] = "\"\')]}\x83\x84\x89\x91\x92\x93\x94";
 
-// These characters are allowed in words: (for FnCapitalStartSentence)
-static const sal_Char sImplWordChars[] = "-'";
-
 OUString EncryptBlockName_Imp(const OUString& rName);
 
 static inline bool IsWordDelim( const sal_Unicode c )
@@ -833,7 +830,7 @@ bool SvxAutoCorrect::FnCapitalStartSentence( SvxAutoCorrDoc& rDoc,
         }
         else if (pWordStt && !rCC.isDigit(aText, pStr - pStart))
         {
-            if( lcl_IsInAsciiArr( sImplWordChars, *pStr ) &&
+            if( lcl_IsInAsciiArr( "-'", *pStr ) && // These characters are allowed in words
                 pWordStt - 1 == pStr &&
                 // Installation at beginning of paragraph. Replaced < by <= (#i38971#)
                 (pStart + 1) <= pStr &&
diff --git a/editeng/source/uno/unonrule.cxx b/editeng/source/uno/unonrule.cxx
index 313d592..1970f5f 100644
--- a/editeng/source/uno/unonrule.cxx
+++ b/editeng/source/uno/unonrule.cxx
@@ -150,9 +150,6 @@ Reference< XCloneable > SAL_CALL SvxUnoNumberingRules::createClone(  ) throw (Ru
     return new SvxUnoNumberingRules(maRule);
 }
 
-// XServiceInfo
-const char pSvxUnoNumberingRulesService[] = "com.sun.star.text.NumberingRules";
-
 OUString SAL_CALL SvxUnoNumberingRules::getImplementationName(  ) throw(RuntimeException, std::exception)
 {
     return OUString( "SvxUnoNumberingRules" );
@@ -165,7 +162,7 @@ sal_Bool SAL_CALL SvxUnoNumberingRules::supportsService( const OUString& Service
 
 Sequence< OUString > SAL_CALL SvxUnoNumberingRules::getSupportedServiceNames(  ) throw(RuntimeException, std::exception)
 {
-    OUString aService( pSvxUnoNumberingRulesService );
+    OUString aService( "com.sun.star.text.NumberingRules" );
     Sequence< OUString > aSeq( &aService, 1 );
     return aSeq;
 }
diff --git a/extensions/source/dbpilots/controlwizard.cxx b/extensions/source/dbpilots/controlwizard.cxx
index 8f9a21c..ad1d236 100644
--- a/extensions/source/dbpilots/controlwizard.cxx
+++ b/extensions/source/dbpilots/controlwizard.cxx
@@ -574,7 +574,6 @@ namespace dbp
             if (xColumns.is())
             {
                 m_aContext.aFieldNames = xColumns->getElementNames();
-                static const char s_sFieldTypeProperty[] = "Type";
                 const OUString* pBegin = m_aContext.aFieldNames.getConstArray();
                 const OUString* pEnd   = pBegin + m_aContext.aFieldNames.getLength();
                 for(;pBegin != pEnd;++pBegin)
@@ -584,7 +583,7 @@ namespace dbp
                     {
                         Reference< XPropertySet > xColumn;
                         xColumns->getByName(*pBegin) >>= xColumn;
-                        xColumn->getPropertyValue(s_sFieldTypeProperty) >>= nFieldType;
+                        xColumn->getPropertyValue("Type") >>= nFieldType;
                     }
                     catch(const Exception&)
                     {
diff --git a/extensions/source/dbpilots/gridwizard.cxx b/extensions/source/dbpilots/gridwizard.cxx
index 3795fa5..698318b 100644
--- a/extensions/source/dbpilots/gridwizard.cxx
+++ b/extensions/source/dbpilots/gridwizard.cxx
@@ -100,9 +100,6 @@ namespace dbp
         if (!xColumnFactory.is() || !xColumnContainer.is())
             return;
 
-        static const char s_sDataFieldProperty [] = "DataField";
-        static const char s_sLabelProperty     [] = "Label";
-        static const char s_sWidthProperty     [] = "Width";
         static const char s_sMouseWheelBehavior[] = "MouseWheelBehavior";
         static const char s_sEmptyString[] = "";
 
@@ -201,11 +198,11 @@ namespace dbp
                     disambiguateName(xExistenceChecker, sColumnName);
 
                     // the data field the column should be bound to
-                    xColumn->setPropertyValue(s_sDataFieldProperty, makeAny(*pFormFieldName));
+                    xColumn->setPropertyValue("DataField", makeAny(*pFormFieldName));
                     // the label
-                    xColumn->setPropertyValue(s_sLabelProperty, makeAny(*pFormFieldName + *pColumnLabelPostfix));
+                    xColumn->setPropertyValue("Label", makeAny(*pFormFieldName + *pColumnLabelPostfix));
                     // the width (<void/> => column will be auto-sized)
-                    xColumn->setPropertyValue(s_sWidthProperty, Any());
+                    xColumn->setPropertyValue("Width", Any());
 
                     if ( xColumnPSI->hasPropertyByName( s_sMouseWheelBehavior ) )
                         xColumn->setPropertyValue( s_sMouseWheelBehavior, makeAny( MouseWheelBehavior::SCROLL_DISABLED ) );
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx
index 362861d..c20126e 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -220,12 +220,10 @@ namespace pcr
             if ( (eType == TypeClass_STRING || eType == TypeClass_SEQUENCE) &&
                     lcl_isLanguageDependentProperty( _rPropertyName ) )
             {
-                static const char s_sResourceResolverPropName[] = "ResourceResolver";
-
                 Reference< resource::XStringResourceResolver > xStringResourceResolver;
                 try
                 {
-                    xStringResourceResolver.set( _xComponent->getPropertyValue( s_sResourceResolverPropName ),UNO_QUERY);
+                    xStringResourceResolver.set( _xComponent->getPropertyValue( "ResourceResolver" ),UNO_QUERY);
                     if( xStringResourceResolver.is() &&
                         xStringResourceResolver->getLocales().getLength() > 0 )
                     {
@@ -373,7 +371,6 @@ namespace pcr
                     else if( eType == TypeClass_SEQUENCE )
                     {
                         static const char aDot[] = ".";
-                        static const char aEsc[] = "&";
 
                         // Put strings into resource using new ids
                         Sequence< OUString > aNewStrings;
@@ -456,9 +453,7 @@ namespace pcr
                             OUString aStr = pNewStrings[i];
                             xStringResourceManager->setString( aPureIdStr, aStr );
 
-                            OUString aIdStr = aEsc;
-                            aIdStr += aPureIdStr;
-                            pNewIdStrings[i] = aIdStr;
+                            pNewIdStrings[i] = "&" + aPureIdStr;
                         }
                         aValue <<= aNewIdStrings;
 
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index ff78d89..dea7097 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -843,13 +843,8 @@ bool EscherPropertyContainer::GetLineArrow( const bool bLineStart,
     const css::uno::Reference< css::beans::XPropertySet > & rXPropSet,
         ESCHER_LineEnd& reLineEnd, sal_Int32& rnArrowLength, sal_Int32& rnArrowWidth )
 {
-    static const char sLineStart    [] = "LineStart";
-    static const char sLineStartName[] = "LineStartName";
-    static const char sLineEnd      [] = "LineEnd";
-    static const char sLineEndName  [] = "LineEndName";
-
-    const OUString sLine      ( bLineStart ? OUString(sLineStart) : OUString(sLineEnd) );
-    const OUString sLineName  ( bLineStart ? OUString(sLineStartName) : OUString(sLineEndName) );
+    const OUString sLine      ( bLineStart ? OUString("LineStart") : OUString("LineEnd") );
+    const OUString sLineName  ( bLineStart ? OUString("LineStartName") : OUString("LineEndName") );
 
     bool bIsArrow = false;
 
@@ -1908,9 +1903,6 @@ bool EscherPropertyContainer::CreatePolygonProperties(
           css::awt::Rectangle& rGeoRect,
     tools::Polygon* pPolygon )
 {
-    static const char sPolyPolygonBezier [] = "PolyPolygonBezier";
-    static const char sPolyPolygon       [] = "PolyPolygon";
-
     bool    bRetValue = true;
     bool    bLine = ( nFlags & ESCHER_CREATEPOLYGON_LINE ) != 0;
 
@@ -1922,7 +1914,7 @@ bool EscherPropertyContainer::CreatePolygonProperties(
     {
         css::uno::Any aAny;
         bRetValue = EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet,
-                        ( bBezier ) ? OUString(sPolyPolygonBezier) : OUString(sPolyPolygon), true );
+                        ( bBezier ) ? OUString("PolyPolygonBezier") : OUString("PolyPolygon"), true );
         if ( bRetValue )
         {
             aPolyPolygon = GetPolyPolygon( aAny );
@@ -2205,13 +2197,6 @@ bool EscherPropertyContainer::CreateConnectorProperties(
     EscherSolverContainer& rSolverContainer, css::awt::Rectangle& rGeoRect,
             sal_uInt16& rShapeType, sal_uInt16& rShapeFlags )
 {
-    static const char sEdgeKind            [] = "EdgeKind";
-    static const char sEdgeStartPoint      [] = "EdgeStartPoint";
-    static const char sEdgeEndPoint        [] = "EdgeEndPoint";
-    static const char sEdgeStartConnection [] = "EdgeStartConnection";
-    static const char sEdgeEndConnection   [] = "EdgeEndConnection";
-    static const char sEdgePath            [] = "PolyPolygonBezier";
-
     bool bRetValue = false;
     rShapeType = rShapeFlags = 0;
 
@@ -2223,14 +2208,14 @@ bool EscherPropertyContainer::CreateConnectorProperties(
         css::uno::Any aAny( rXShape->queryInterface( cppu::UnoType<css::beans::XPropertySet>::get()));
         if ( aAny >>= aXPropSet )
         {
-            if ( EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, sEdgeKind, true ) )
+            if ( EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, "EdgeKind", true ) )
             {
                 css::drawing::ConnectorType eCt;
                 aAny >>= eCt;
-                if ( EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, sEdgeStartPoint ) )
+                if ( EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, "EdgeStartPoint" ) )
                 {
                     aStartPoint = *o3tl::doAccess<css::awt::Point>(aAny);
-                    if ( EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, sEdgeEndPoint ) )
+                    if ( EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, "EdgeEndPoint" ) )
                     {
                         aEndPoint = *o3tl::doAccess<css::awt::Point>(aAny);
 
@@ -2256,9 +2241,9 @@ bool EscherPropertyContainer::CreateConnectorProperties(
                         sal_uInt32 nAdjustValue1, nAdjustValue2, nAdjustValue3;
                         nAdjustValue1 = nAdjustValue2 = nAdjustValue3 = 0x2a30;
 
-                        if ( EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, sEdgeStartConnection ) )
+                        if ( EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, "EdgeStartConnection" ) )
                             aAny >>= aShapeA;
-                        if ( EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, sEdgeEndConnection ) )
+                        if ( EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, "EdgeEndConnection" ) )
                             aAny >>= aShapeB;
                         rSolverContainer.AddConnector( rXShape, aStartPoint, aShapeA, aEndPoint, aShapeB );
                         switch ( eCt )
@@ -2274,7 +2259,7 @@ bool EscherPropertyContainer::CreateConnectorProperties(
 
                             case css::drawing::ConnectorType_STANDARD :// Connector 2->5
                                 {
-                                    if ( EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, sEdgePath ) )
+                                    if ( EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, "PolyPolygonBezier" ) )
                                     {
                                         tools::PolyPolygon aPolyPolygon = GetPolyPolygon( aAny );
                                         tools::Polygon aPoly;
diff --git a/filter/source/msfilter/mstoolbar.cxx b/filter/source/msfilter/mstoolbar.cxx
index 51ea8b5..e0698a3 100644
--- a/filter/source/msfilter/mstoolbar.cxx
+++ b/filter/source/msfilter/mstoolbar.cxx
@@ -99,11 +99,9 @@ CustomToolBarImportHelper::getCfgManager()
 uno::Any
 CustomToolBarImportHelper::createCommandFromMacro( const OUString& sCmd )
 {
-//"vnd.sun.star.script:Standard.Module1.Main?language=Basic&location=document"
-    static const char scheme[] = "vnd.sun.star.script:";
-    static const char part2 [] = "?language=Basic&location=document";
+    //"vnd.sun.star.script:Standard.Module1.Main?language=Basic&location=document"
     // create script url
-    OUString scriptURL = scheme + sCmd + part2;
+    OUString scriptURL = "vnd.sun.star.script:" + sCmd + "?language=Basic&location=document";
     return uno::makeAny( scriptURL );
 }
 
diff --git a/filter/source/msfilter/msvbahelper.cxx b/filter/source/msfilter/msvbahelper.cxx
index 4690c6f..1158555 100644
--- a/filter/source/msfilter/msvbahelper.cxx
+++ b/filter/source/msfilter/msvbahelper.cxx
@@ -607,16 +607,15 @@ OUString SAL_CALL VBAMacroResolver::resolveScriptURLtoVBAMacro( const OUString&
 
 bool getModifier( char c, sal_uInt16& mod )
 {
-    static const char modifiers[] = "+^%";
-    static const sal_uInt16 KEY_MODS[] = {KEY_SHIFT, KEY_MOD1, KEY_MOD2};
-
-    for ( unsigned int i=0; i<SAL_N_ELEMENTS(KEY_MODS); ++i )
-    {
-        if ( c == modifiers[i] )
-        {
-            mod = mod | KEY_MODS[ i ];
-            return true;
-        }
+    if ( c == '+' ) {
+        mod |= KEY_SHIFT;
+        return true;
+    } else if ( c == '^' ) {
+        mod |= KEY_MOD1;
+        return true;
+    } else if ( c == '%' ) {
+        mod |= KEY_MOD2;
+        return true;
     }
     return false;
 }
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 2f57c2b..6eada01 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -7327,9 +7327,8 @@ void CreateTableRows( const Reference< XTableRows >& xTableRows, const std::set<
         else
             nHeight = nTableBottom - nLastPosition;
 
-        static const char sWidth[] = "Height";
         Reference< XPropertySet > xPropSet( xTableRows->getByIndex( n ), UNO_QUERY_THROW );
-        xPropSet->setPropertyValue( sWidth, Any( nHeight ) );
+        xPropSet->setPropertyValue( "Height", Any( nHeight ) );
     }
 }
 
@@ -7351,9 +7350,8 @@ void CreateTableColumns( const Reference< XTableColumns >& xTableColumns, const
         else
             nWidth = nTableRight - nLastPosition;
 
-        static const char sWidth[] = "Width";
         Reference< XPropertySet > xPropSet( xTableColumns->getByIndex( n ), UNO_QUERY_THROW );
-        xPropSet->setPropertyValue( sWidth, Any( nWidth ) );
+        xPropSet->setPropertyValue( "Width", Any( nWidth ) );
     }
 }
 
@@ -7386,33 +7384,26 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell >& xCell )
         const sal_Int32 nRightDist(static_cast<const SdrMetricItem&>(pObj->GetMergedItem(SDRATTR_TEXT_RIGHTDIST)).GetValue());
         const sal_Int32 nUpperDist(static_cast<const SdrMetricItem&>(pObj->GetMergedItem(SDRATTR_TEXT_UPPERDIST)).GetValue());
         const sal_Int32 nLowerDist(static_cast<const SdrMetricItem&>(pObj->GetMergedItem(SDRATTR_TEXT_LOWERDIST)).GetValue());
-        static const char sTopBorder[] = "TextUpperDistance";
-        static const char sBottomBorder[] = "TextLowerDistance";
-        static const char sLeftBorder[] = "TextLeftDistance";
-        static const char sRightBorder[] = "TextRightDistance";
-        xPropSet->setPropertyValue( sTopBorder, Any( nUpperDist ) );
-        xPropSet->setPropertyValue( sRightBorder, Any( nRightDist ) );
-        xPropSet->setPropertyValue( sLeftBorder, Any( nLeftDist ) );
-        xPropSet->setPropertyValue( sBottomBorder, Any( nLowerDist ) );
-
-        static const char  sTextVerticalAdjust[] = "TextVerticalAdjust";
+        xPropSet->setPropertyValue( "TextUpperDistance", Any( nUpperDist ) );
+        xPropSet->setPropertyValue( "TextRightDistance", Any( nRightDist ) );
+        xPropSet->setPropertyValue( "TextLeftDistance", Any( nLeftDist ) );
+        xPropSet->setPropertyValue( "TextLowerDistance", Any( nLowerDist ) );
+
         const SdrTextVertAdjust eTextVertAdjust(static_cast<const SdrTextVertAdjustItem&>(pObj->GetMergedItem(SDRATTR_TEXT_VERTADJUST)).GetValue());
         drawing::TextVerticalAdjust eVA( drawing::TextVerticalAdjust_TOP );
         if ( eTextVertAdjust == SDRTEXTVERTADJUST_CENTER )
             eVA = drawing::TextVerticalAdjust_CENTER;
         else if ( eTextVertAdjust == SDRTEXTVERTADJUST_BOTTOM )
             eVA = drawing::TextVerticalAdjust_BOTTOM;
-        xPropSet->setPropertyValue( sTextVerticalAdjust, Any( eVA ) );
+        xPropSet->setPropertyValue( "TextVerticalAdjust", Any( eVA ) );
 
         //set textHorizontalAdjust and TextWritingMode attr
         const sal_Int32 eHA(static_cast<const SdrTextHorzAdjustItem&>(pObj->GetMergedItem(SDRATTR_TEXT_HORZADJUST)).GetValue());
         const SvxFrameDirection eDirection = (const SvxFrameDirection)(static_cast<const SvxFrameDirectionItem&>(pObj->GetMergedItem(EE_PARA_WRITINGDIR)).GetValue());
-        static const char  sHorizontalAdjust[] = "TextHorizontalAdjust";
-        static const char  sWritingMode[] = "TextWritingMode";
-        xPropSet->setPropertyValue(  sHorizontalAdjust , Any( eHA ) );
+        xPropSet->setPropertyValue(  "TextHorizontalAdjust" , Any( eHA ) );
         if ( eDirection == FRMDIR_VERT_TOP_RIGHT )
         {//vertical writing
-            xPropSet->setPropertyValue(  sWritingMode , Any( css::text::WritingMode_TB_RL ) );
+            xPropSet->setPropertyValue(  "TextWritingMode" , Any( css::text::WritingMode_TB_RL ) );
         }
         SfxItemSet aSet( pObj->GetMergedItemSet() );
         drawing::FillStyle eFillStyle(static_cast<const XFillStyleItem&>(pObj->GetMergedItem( XATTR_FILLSTYLE )).GetValue());
@@ -7421,11 +7412,10 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell >& xCell )
         {
             case drawing::FillStyle_SOLID :
                 {
-                    static const char sFillColor[] = "FillColor";
                     eFS = css::drawing::FillStyle_SOLID;
                     Color aFillColor( static_cast<const XFillColorItem&>(pObj->GetMergedItem( XATTR_FILLCOLOR )).GetColorValue() );
                     sal_Int32 nFillColor( aFillColor.GetColor() );
-                    xPropSet->setPropertyValue( sFillColor, Any( nFillColor ) );
+                    xPropSet->setPropertyValue( "FillColor", Any( nFillColor ) );
                 }
                 break;
             case drawing::FillStyle_GRADIENT :
@@ -7445,8 +7435,7 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell >& xCell )
                     aGradient.EndIntensity = aXGradient.GetEndIntens();
                     aGradient.StepCount = aXGradient.GetSteps();
 
-                    static const char sFillGradient[] = "FillGradient";
-                    xPropSet->setPropertyValue( sFillGradient, Any( aGradient ) );
+                    xPropSet->setPropertyValue( "FillGradient", Any( aGradient ) );
                 }
                 break;
             case drawing::FillStyle_HATCH :
@@ -7480,13 +7469,11 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell >& xCell )
             break;
 
         }
-        static const char sFillStyle[] = "FillStyle";
-        xPropSet->setPropertyValue( sFillStyle, Any( eFS ) );
+        xPropSet->setPropertyValue( "FillStyle", Any( eFS ) );
         if ( eFillStyle != drawing::FillStyle_NONE )
         {
             sal_Int16 nFillTransparence( static_cast<const XFillTransparenceItem&>(pObj->GetMergedItem( XATTR_FILLTRANSPARENCE ) ).GetValue() );
-            static const char sFillTransparence[] = "FillTransparence";
-            xPropSet->setPropertyValue( sFillTransparence, Any( nFillTransparence ) );
+            xPropSet->setPropertyValue( "FillTransparence", Any( nFillTransparence ) );
         }
     }
     catch( const Exception& )
@@ -7525,13 +7512,6 @@ void ApplyCellLineAttributes( const SdrObject* pLine, Reference< XTable >& xTabl
         std::vector< sal_Int32 >::const_iterator aIter( vPositions.begin() );
         while( aIter != vPositions.end() )
         {
-            static const char sTopBorder[] = "TopBorder";
-            static const char sBottomBorder[] = "BottomBorder";
-            static const char sLeftBorder[] = "LeftBorder";
-            static const char sRightBorder[] = "RightBorder";
-            static const char sDiagonalTLBR[] = "DiagonalTLBR";
-            static const char sDiagonalBLTR[] = "DiagonalBLTR";
-
             sal_Int32 nPosition = *aIter & 0xffffff;
             sal_Int32 nFlags = *aIter &~0xffffff;
             sal_Int32 nRow = nPosition / nColumns;
@@ -7540,17 +7520,17 @@ void ApplyCellLineAttributes( const SdrObject* pLine, Reference< XTable >& xTabl
             Reference< XPropertySet > xPropSet( xCell, UNO_QUERY_THROW );
 
             if ( nFlags & LinePositionLeft )
-                xPropSet->setPropertyValue( sLeftBorder, Any( aBorderLine ) );
+                xPropSet->setPropertyValue( "LeftBorder", Any( aBorderLine ) );
             if ( nFlags & LinePositionTop )
-                xPropSet->setPropertyValue( sTopBorder, Any( aBorderLine ) );
+                xPropSet->setPropertyValue( "TopBorder", Any( aBorderLine ) );
             if ( nFlags & LinePositionRight )
-                xPropSet->setPropertyValue( sRightBorder, Any( aBorderLine ) );
+                xPropSet->setPropertyValue( "RightBorder", Any( aBorderLine ) );
             if ( nFlags & LinePositionBottom )
-                xPropSet->setPropertyValue( sBottomBorder, Any( aBorderLine ) );
+                xPropSet->setPropertyValue( "BottomBorder", Any( aBorderLine ) );
             if ( nFlags & LinePositionTLBR )
-                xPropSet->setPropertyValue( sDiagonalTLBR, Any( true ) );
+                xPropSet->setPropertyValue( "DiagonalTLBR", Any( true ) );
             if ( nFlags & LinePositionBLTR )
-                xPropSet->setPropertyValue( sDiagonalBLTR, Any( true ) );
+                xPropSet->setPropertyValue( "DiagonalBLTR", Any( true ) );
             ++aIter;
         }
     }
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index 1cd7fa3..7db79d2 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -61,39 +61,21 @@ using namespace ::xmloff::token;
 #define NSPREFIX "ooo:"
 
 // ooo xml elements
-static const char    aOOOElemMetaSlides[] = NSPREFIX "meta_slides";
-static const char    aOOOElemMetaSlide[] = NSPREFIX "meta_slide";
 static const char    aOOOElemTextField[] = NSPREFIX "text_field";
 
-// ooo xml attributes for meta_slides
-static const char    aOOOAttrNumberOfSlides[] = NSPREFIX "number-of-slides";
-static const char    aOOOAttrStartSlideNumber[] = NSPREFIX "start-slide-number";
-static const char    aOOOAttrNumberingType[] = NSPREFIX "page-numbering-type";
-static const char    aOOOAttrUsePositionedChars[] = NSPREFIX "use-positioned-chars";
 
 // ooo xml attributes for meta_slide
 static const char    aOOOAttrSlide[] = NSPREFIX "slide";
 static const char    aOOOAttrMaster[] = NSPREFIX "master";
 static const char    aOOOAttrBackgroundVisibility[] = NSPREFIX "background-visibility";
 static const char    aOOOAttrMasterObjectsVisibility[] = NSPREFIX "master-objects-visibility";
-static const char    aOOOAttrPageNumberVisibility[] = NSPREFIX "page-number-visibility";
-static const char    aOOOAttrDateTimeVisibility[] = NSPREFIX "date-time-visibility";
-static const char    aOOOAttrFooterVisibility[] = NSPREFIX "footer-visibility";
 static const OUString aOOOAttrDateTimeField = NSPREFIX "date-time-field";
 static const char    aOOOAttrFooterField[] = NSPREFIX "footer-field";
-static const char    aOOOAttrHeaderField[] = NSPREFIX "header-field";
 static const char    aOOOAttrHasTransition[] = NSPREFIX "has-transition";
-static const char    aOOOAttrIdList[] = NSPREFIX "id-list";
 
 // ooo xml attributes for pages and shapes
 static const char    aOOOAttrName[] = NSPREFIX "name";
 
-// ooo xml attributes for date_time_field
-static const char    aOOOAttrDateTimeFormat[] = NSPREFIX "date-time-format";
-
-// ooo xml attributes for Placeholder Shapes
-static const char    aOOOAttrTextAdjust[] = NSPREFIX "text-adjust";
-
 static const char    constSvgNamespace[] = "http://www.w3.org/2000/svg";
 
 
@@ -292,7 +274,7 @@ public:
 
         OUString sDateTimeFormat = sDateFormat + " " + sTimeFormat;
 
-        pSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrDateTimeFormat, sDateTimeFormat );
+        pSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "date-time-format", sDateTimeFormat );
         SvXMLElementExport aExp( *pSVGExport, XML_NAMESPACE_NONE, "g", true, true );
     }
     virtual void growCharSet( SVGFilter::UCharSetMapMap & aTextFieldCharSets ) const override
@@ -923,13 +905,13 @@ void SVGFilter::implGenerateMetaData()
         // we wrap all meta presentation info into a svg:defs element
         SvXMLElementExport aDefsElem( *mpSVGExport, XML_NAMESPACE_NONE, "defs", true, true );
 
-        mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "id", aOOOElemMetaSlides );
-        mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrNumberOfSlides, OUString::number( nCount ) );
-        mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrStartSlideNumber, OUString::number( mnVisiblePage ) );
+        mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "id", NSPREFIX "meta_slides" );
+        mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "number-of-slides", OUString::number( nCount ) );
+        mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "start-slide-number", OUString::number( mnVisiblePage ) );
 
         if( mpSVGExport->IsUsePositionedCharacters() )
         {
-            mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrUsePositionedChars, "true" );
+            mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "use-positioned-chars", "true" );
         }
 
         // Add a (global) Page Numbering Type attribute for the document
@@ -970,13 +952,13 @@ void SVGFilter::implGenerateMetaData()
                     break;
             }
             if( !sNumberingType.isEmpty() )
-                mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrNumberingType, sNumberingType );
+                mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "page-numbering-type", sNumberingType );
         }
 
 
         {
             SvXMLElementExport    aExp( *mpSVGExport, XML_NAMESPACE_NONE, "g", true, true );
-            const OUString                aId( aOOOElemMetaSlide );
+            const OUString                aId( NSPREFIX "meta_slide" );
             const OUString                aElemTextFieldId( aOOOElemTextField );
             std::vector< TextField* >     aFieldSet;
 
@@ -1036,7 +1018,7 @@ void SVGFilter::implGenerateMetaData()
                             bPageNumberVisibility = bPageNumberVisibility && ( nPageNumberingType != css::style::NumberingType::NUMBER_NONE );
                             if( bPageNumberVisibility ) // visibility default value: 'hidden'
                             {
-                                mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrPageNumberVisibility, "visible" );
+                                mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "page-number-visibility", "visible" );
                             }
 
                             // Date/Time Field
@@ -1063,7 +1045,7 @@ void SVGFilter::implGenerateMetaData()
                             }
                             else
                             {
-                                mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrDateTimeVisibility, "hidden" );
+                                mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "date-time-visibility", "hidden" );
                             }
 
                             // Footer Field
@@ -1079,7 +1061,7 @@ void SVGFilter::implGenerateMetaData()
                             }
                             else
                             {
-                                mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrFooterVisibility, "hidden" );
+                                mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "footer-visibility", "hidden" );
                             }
                         }
                         else
@@ -1213,7 +1195,7 @@ void SVGFilter::implExportTextShapeIndex()
             if( !rPageId.isEmpty() && !sTextShapeIdList.isEmpty() )
             {
                 mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrSlide, rPageId  );
-                mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrIdList, sTextShapeIdList );
+                mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "id-list", sTextShapeIdList );
                 SvXMLElementExport aGElem( *mpSVGExport, XML_NAMESPACE_NONE, "g", true, true );
             }
         }
@@ -1767,7 +1749,7 @@ bool SVGFilter::implExportShape( const Reference< XShape >& rxShape, bool bMaste
                                 default:
                                     break;
                             }
-                            mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrTextAdjust, sTextAdjust );
+                            mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "text-adjust", sTextAdjust );
                         }
                     }
                     mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "class", aShapeClass );
@@ -2156,7 +2138,7 @@ IMPL_LINK( SVGFilter, CalcFieldHdl, EditFieldInfo*, pInfo, void )
             }
             bool bHasCharSetMap = !( mTextFieldCharSets.find( mCreateOjectsCurrentMasterPage ) == mTextFieldCharSets.end() );
 
-            static const OUString aHeaderId( aOOOAttrHeaderField );
+            static const OUString aHeaderId( NSPREFIX "header-field" );
             static const OUString aFooterId( aOOOAttrFooterField );
             static const OUString aDateTimeId( aOOOAttrDateTimeField );
             static const OUString aVariableDateTimeId( aOOOAttrDateTimeField + "-variable" );
diff --git a/filter/source/svg/svgreader.cxx b/filter/source/svg/svgreader.cxx
index 7efe132..377a746 100644
--- a/filter/source/svg/svgreader.cxx
+++ b/filter/source/svg/svgreader.cxx
@@ -600,18 +600,15 @@ struct AnnotatingVisitor
 
     static OUString getOdfAlign( TextAlign eAlign )
     {
-        static const char aStart[] = "start";
-        static const char aEnd[] = "end";
-        static const char aCenter[] = "center";
         switch(eAlign)
         {
             default:
             case BEFORE:
-                return OUString(aStart);
+                return OUString("start");
             case CENTER:
-                return OUString(aCenter);
+                return OUString("center");
             case AFTER:
-                return OUString(aEnd);
+                return OUString("end");
         }
     }
 
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index e3c74c7..1723eeb 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -35,28 +35,15 @@
 static const char   aPrefixClipPathId[] = "clip_path_";
 
 static const char   aXMLElemG[] = "g";
-static const char   aXMLElemA[] = "a";
-static const char   aXMLElemClipPath[] = "clipPath";
 static const char   aXMLElemDefs[] = "defs";
-static const char   aXMLElemLine[] = "line";
-static const char   aXMLElemRect[] = "rect";
-static const char   aXMLElemEllipse[] = "ellipse";
-static const char   aXMLElemPath[] = "path";
 static const char   aXMLElemText[] = "text";
 static const char   aXMLElemTspan[] = "tspan";
-static const char   aXMLElemImage[] = "image";
-static const char   aXMLElemMask[] = "mask";
-static const char   aXMLElemPattern[] = "pattern";
 static const char   aXMLElemLinearGradient[] = "linearGradient";
-static const char   aXMLElemRadialGradient[] = "radialGradient";
 static const char   aXMLElemStop[] = "stop";
 
 static const char   aXMLAttrTransform[] = "transform";
 static const char   aXMLAttrStyle[] = "style";
 static const char   aXMLAttrId[] = "id";
-static const char   aXMLAttrClipPath[] = "clip-path";
-static const char   aXMLAttrClipPathUnits[] = "clipPathUnits";
-static const char   aXMLAttrD[] = "d";
 static const char   aXMLAttrX[] = "x";
 static const char   aXMLAttrY[] = "y";
 static const char   aXMLAttrX1[] = "x1";
@@ -65,17 +52,12 @@ static const char   aXMLAttrX2[] = "x2";
 static const char   aXMLAttrY2[] = "y2";
 static const char   aXMLAttrCX[] = "cx";
 static const char   aXMLAttrCY[] = "cy";
-static const char   aXMLAttrR[] = "r";
 static const char   aXMLAttrRX[] = "rx";
 static const char   aXMLAttrRY[] = "ry";
 static const char   aXMLAttrWidth[] = "width";
 static const char   aXMLAttrHeight[] = "height";
-static const char   aXMLAttrStroke[] = "stroke";
-static const char   aXMLAttrStrokeOpacity[] = "stroke-opacity";
 static const char   aXMLAttrStrokeWidth[] = "stroke-width";
-static const char   aXMLAttrStrokeDashArray[] = "stroke-dasharray";
 static const char   aXMLAttrFill[] = "fill";
-static const char   aXMLAttrFillOpacity[] = "fill-opacity";
 static const char   aXMLAttrFontFamily[] = "font-family";
 static const char   aXMLAttrFontSize[] = "font-size";
 static const char   aXMLAttrFontStyle[] = "font-style";
@@ -83,23 +65,12 @@ static const char   aXMLAttrFontWeight[] = "font-weight";
 static const char   aXMLAttrTextDecoration[] = "text-decoration";
 static const char   aXMLAttrXLinkHRef[] = "xlink:href";
 static const char   aXMLAttrGradientUnits[] = "gradientUnits";
-static const char   aXMLAttrPatternUnits[] = "patternUnits";
-static const char   aXMLAttrPreserveAspectRatio[] = "preserveAspectRatio";
 static const char   aXMLAttrOffset[] = "offset";
 static const char   aXMLAttrStopColor[] = "stop-color";
 static const char   aXMLAttrStrokeLinejoin[] = "stroke-linejoin";
 static const char   aXMLAttrStrokeLinecap[] = "stroke-linecap";
 
 
-#define NSPREFIX "ooo:"
-
-static const char aOOOAttrNumberingType[] = NSPREFIX "numbering-type";
-
-
-static sal_Char const XML_UNO_NAME_NRULE_NUMBERINGTYPE[] = "NumberingType";
-static sal_Char const XML_UNO_NAME_NRULE_BULLET_CHAR[] = "BulletChar";
-
-
 PushFlags SVGContextHandler::getPushFlags() const
 {
     if (maStateStack.empty())
@@ -221,10 +192,10 @@ void SVGAttributeWriter::AddPaintAttr( const Color& rLineColor, const Color& rFi
         }
     }
     else
-        AddColorAttr( aXMLAttrFill, aXMLAttrFillOpacity, rFillColor );
+        AddColorAttr( aXMLAttrFill, "fill-opacity", rFillColor );
 
     // Stroke
-    AddColorAttr( aXMLAttrStroke, aXMLAttrStrokeOpacity, rLineColor );
+    AddColorAttr( "stroke", "stroke-opacity", rLineColor );
 }
 
 
@@ -321,9 +292,9 @@ void SVGAttributeWriter::AddGradientDef( const Rectangle& rObjRect, const Gradie
                 mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrGradientUnits, "userSpaceOnUse" );
                 mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrCX, OUString::number( ImplRound( fCenterX ) ) );
                 mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrCY, OUString::number( ImplRound( fCenterY ) ) );
-                mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrR, OUString::number( ImplRound( fRadius ) ) );
+                mrExport.AddAttribute( XML_NAMESPACE_NONE, "r", OUString::number( ImplRound( fRadius ) ) );
 
-                apGradient.reset( new SvXMLElementExport( mrExport, XML_NAMESPACE_NONE, aXMLElemRadialGradient, true, true ) );
+                apGradient.reset( new SvXMLElementExport( mrExport, XML_NAMESPACE_NONE, "radialGradient", true, true ) );
 
                 // write stop values
                 ImplGetColorStr( aEndColor, aColorStr );
@@ -1039,11 +1010,11 @@ bool SVGTextWriter::nextParagraph()
                                         for( sal_Int32 i = 0; i < nCount; ++i )
                                         {
                                             const PropertyValue& rProp = pPropArray[i];
-                                            if( rProp.Name == XML_UNO_NAME_NRULE_NUMBERINGTYPE )
+                                            if( rProp.Name == "NumberingType" )
                                             {
                                                 rProp.Value >>= eType;
                                             }
-                                            else if( rProp.Name == XML_UNO_NAME_NRULE_BULLET_CHAR )
+                                            else if( rProp.Name == "BulletChar" )
                                             {
                                                 OUString sValue;
                                                 rProp.Value >>= sValue;
@@ -1320,7 +1291,7 @@ void SVGTextWriter::startTextParagraph()
                     sNumberingType = "number-style";
                     break;
         }
-        mrExport.AddAttribute( XML_NAMESPACE_NONE, aOOOAttrNumberingType, sNumberingType );
+        mrExport.AddAttribute( XML_NAMESPACE_NONE, "ooo:numbering-type", sNumberingType );
         mrExport.AddAttribute( XML_NAMESPACE_NONE, "class", "ListItem" );
     }
     else
@@ -1738,7 +1709,7 @@ void SVGTextWriter::implWriteTextPortion( const Point& rPos,
         SvXMLElementExport aSVGTspanElem( mrExport, XML_NAMESPACE_NONE, aXMLElemTspan, mbIWS, mbIWS );
         mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrXLinkHRef, msUrl );
         {
-            SvXMLElementExport aSVGAElem( mrExport, XML_NAMESPACE_NONE, aXMLElemA, mbIWS, mbIWS );
+            SvXMLElementExport aSVGAElem( mrExport, XML_NAMESPACE_NONE, "a", mbIWS, mbIWS );
             mrExport.GetDocHandler()->characters( rText );
         }
     }
@@ -1933,7 +1904,7 @@ void SVGActionWriter::ImplWriteLine( const Point& rPt1, const Point& rPt2,
     }
 
     {
-        SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemLine, true, true );
+        SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, "line", true, true );
     }
 }
 
@@ -1955,7 +1926,7 @@ void SVGActionWriter::ImplWriteRect( const Rectangle& rRect, long nRadX, long nR
     if( nRadY )
         mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrRY, OUString::number( ImplMap( nRadY ) ) );
 
-    SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemRect, true, true );
+    SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, "rect", true, true );
 }
 
 
@@ -1971,7 +1942,7 @@ void SVGActionWriter::ImplWriteEllipse( const Point& rCenter, long nRadX, long n
     mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrRY, OUString::number( ImplMap( nRadY ) ) );
 
     {
-        SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemEllipse, true, true );
+        SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, "ellipse", true, true );
     }
 }
 
@@ -2042,11 +2013,11 @@ void SVGActionWriter::ImplWritePolyPolygon( const tools::PolyPolygon& rPolyPoly,
         aPolyPoly = rPolyPoly;
 
     // add path data attribute
-    mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrD, GetPathString( aPolyPoly, bLineOnly ) );
+    mrExport.AddAttribute( XML_NAMESPACE_NONE, "d", GetPathString( aPolyPoly, bLineOnly ) );
 
     {
         // write polyline/polygon element
-        SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemPath, true, true );
+        SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, "path", true, true );
     }
 }
 
@@ -2131,7 +2102,7 @@ void SVGActionWriter::ImplWriteShape( const SVGShapeDescriptor& rShape )
             aDashArrayStr += OUString::number( nDash );
         }
 
-        mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStrokeDashArray, aDashArrayStr );
+        mrExport.AddAttribute( XML_NAMESPACE_NONE, "stroke-dasharray", aDashArrayStr );
     }
 
     ImplWritePolyPolygon( aPolyPoly, bLineOnly, false );
@@ -2147,8 +2118,8 @@ void SVGActionWriter::ImplCreateClipPathDef( const tools::PolyPolygon& rPolyPoly
 
     {
         mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrId, aClipPathId );
-        mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrClipPathUnits, "userSpaceOnUse" );
-        SvXMLElementExport aElemClipPath( mrExport, XML_NAMESPACE_NONE, aXMLElemClipPath, true, true );
+        mrExport.AddAttribute( XML_NAMESPACE_NONE, "clipPathUnits", "userSpaceOnUse" );
+        SvXMLElementExport aElemClipPath( mrExport, XML_NAMESPACE_NONE, "clipPath", true, true );
 
         ImplWritePolyPolygon(rPolyPoly, false);
     }
@@ -2162,7 +2133,7 @@ void SVGActionWriter::ImplStartClipRegion(sal_Int32 nClipPathId)
         return;
 
     OUString aUrl = OUStringLiteral("url(#") + aPrefixClipPathId + OUString::number( nClipPathId ) + ")";
-    mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrClipPath, aUrl );
+    mrExport.AddAttribute( XML_NAMESPACE_NONE, "clip-path", aUrl );
     mpCurrentClipRegionElem.reset( new SvXMLElementExport( mrExport, XML_NAMESPACE_NONE, aXMLElemG, true, true ) );
 }
 
@@ -2210,10 +2181,10 @@ void SVGActionWriter::ImplWritePattern( const tools::PolyPolygon& rPolyPoly,
             mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrWidth, OUString::number( aRect.GetWidth() ) );
             mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrHeight, OUString::number( aRect.GetHeight() ) );
 
-            mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrPatternUnits, OUString( "userSpaceOnUse") );
+            mrExport.AddAttribute( XML_NAMESPACE_NONE, "patternUnits", OUString( "userSpaceOnUse") );
 
             {
-                SvXMLElementExport aElemPattern( mrExport, XML_NAMESPACE_NONE, aXMLElemPattern, true, true );
+                SvXMLElementExport aElemPattern( mrExport, XML_NAMESPACE_NONE, "pattern", true, true );
 
                 // The origin of a pattern is positioned at (aRect.Left(), aRect.Top()).
                 // So we need to adjust the pattern coordinate.
@@ -2445,7 +2416,7 @@ void SVGActionWriter::ImplWriteMask( GDIMetaFile& rMtf,
 
         mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrId, aMaskId );
         {
-            SvXMLElementExport aElemMask( mrExport, XML_NAMESPACE_NONE, aXMLElemMask, true, true );
+            SvXMLElementExport aElemMask( mrExport, XML_NAMESPACE_NONE, "mask", true, true );
 
             const tools::PolyPolygon aPolyPolygon( tools::PolyPolygon( Rectangle( rDestPt, rDestSize ) ) );
             Gradient aGradient( rGradient );
@@ -2780,11 +2751,11 @@ void SVGActionWriter::ImplWriteBmp( const BitmapEx& rBmpEx,
                 mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrHeight, OUString::number( aSz.Height() ) );
 
                 // the image must be scaled to aSz in a non-uniform way
-                mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrPreserveAspectRatio, "none" );
+                mrExport.AddAttribute( XML_NAMESPACE_NONE, "preserveAspectRatio", "none" );
 
                 mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrXLinkHRef, aBuffer.makeStringAndClear() );
                 {
-                    SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemImage, true, true );
+                    SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, "image", true, true );
                 }
             }
         }


More information about the Libreoffice-commits mailing list