summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-08-16 16:57:15 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-08-22 13:31:57 +0200
commit60bc26354763fa3461db49a3e827da552484150d (patch)
tree5c66cee43f76f556f9a086a67fa8a6e88750c5d5
parentloplugin:useuniqueptr in StringResourceImpl (diff)
downloadcore-60bc26354763fa3461db49a3e827da552484150d.tar.gz
core-60bc26354763fa3461db49a3e827da552484150d.zip
new loplugin:conststringfield
Look for const string fields which can be static, and mostly convert them to OUStringLiteral And add a getLength() method to OUStringLiteral to make the transition easier. Remove dead code in XclExpRoot::GenerateDefaultEncryptionData, default password is never empty. Change-Id: Iae75514d9dbb87289fd5b016222f640abe755091 Reviewed-on: https://gerrit.libreoffice.org/59204 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--comphelper/source/misc/backupfilehelper.cxx12
-rw-r--r--comphelper/source/officeinstdir/officeinstallationdirectories.cxx19
-rw-r--r--comphelper/source/officeinstdir/officeinstallationdirectories.hxx2
-rw-r--r--comphelper/source/xml/ofopxmlhelper.cxx78
-rw-r--r--compilerplugins/clang/conststringfield.cxx57
-rw-r--r--compilerplugins/clang/test/conststringfield.cxx43
-rw-r--r--cui/source/dialogs/colorpicker.cxx13
-rw-r--r--include/oox/helper/modelobjecthelper.hxx4
-rw-r--r--include/oox/vml/vmlinputstream.hxx2
-rw-r--r--include/rtl/ustring.hxx3
-rw-r--r--include/svtools/unoevent.hxx2
-rw-r--r--include/svx/xmleohlp.hxx2
-rw-r--r--include/vbahelper/vbaglobalbase.hxx1
-rw-r--r--include/xmloff/SettingsExportHelper.hxx8
-rw-r--r--include/xmloff/XMLEventExport.hxx2
-rw-r--r--include/xmloff/XMLPageExport.hxx3
-rw-r--r--include/xmloff/XMLTextMasterPageContext.hxx1
-rw-r--r--include/xmloff/XMLTextMasterPageExport.hxx14
-rw-r--r--include/xmloff/XMLTextShapeImportHelper.hxx4
-rw-r--r--include/xmloff/XMLTextShapeStyleContext.hxx2
-rw-r--r--include/xmloff/numehelp.hxx4
-rw-r--r--include/xmloff/prstylei.hxx2
-rw-r--r--include/xmloff/shapeexport.hxx22
-rw-r--r--include/xmloff/shapeimport.hxx5
-rw-r--r--include/xmloff/styleexp.hxx5
-rw-r--r--include/xmloff/txtparae.hxx95
-rw-r--r--include/xmloff/xmlnume.hxx3
-rw-r--r--include/xmloff/xmlnumi.hxx4
-rw-r--r--include/xmloff/xmlstyle.hxx3
-rw-r--r--oox/source/core/xmlfilterbase.cxx8
-rw-r--r--oox/source/helper/modelobjecthelper.cxx19
-rw-r--r--oox/source/ole/vbacontrol.cxx6
-rw-r--r--oox/source/vml/vmlinputstream.cxx9
-rw-r--r--package/source/manifest/ManifestImport.cxx289
-rw-r--r--package/source/manifest/ManifestImport.hxx71
-rw-r--r--registry/source/keyimpl.cxx22
-rw-r--r--registry/source/regimpl.cxx5
-rw-r--r--registry/source/regimpl.hxx2
-rw-r--r--reportdesign/source/filter/xml/xmlStyleImport.cxx17
-rw-r--r--reportdesign/source/filter/xml/xmlStyleImport.hxx4
-rw-r--r--sc/source/filter/excel/xeroot.cxx6
-rw-r--r--sc/source/filter/excel/xiescher.cxx9
-rw-r--r--sc/source/filter/excel/xlroot.cxx5
-rw-r--r--sc/source/filter/inc/xiescher.hxx1
-rw-r--r--sc/source/filter/inc/xlroot.hxx4
-rw-r--r--sc/source/filter/oox/pagesettings.cxx30
-rw-r--r--sc/source/filter/oox/worksheethelper.cxx6
-rw-r--r--sc/source/filter/xml/XMLStylesExportHelper.cxx43
-rw-r--r--sc/source/filter/xml/XMLStylesExportHelper.hxx11
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx5
-rw-r--r--sc/source/filter/xml/xmlexprt.hxx1
-rw-r--r--sc/source/filter/xml/xmlstyli.cxx17
-rw-r--r--sc/source/filter/xml/xmlstyli.hxx4
-rw-r--r--sd/source/filter/html/htmlex.cxx27
-rw-r--r--sd/source/filter/html/htmlex.hxx2
-rw-r--r--sd/source/filter/xml/sdtransform.cxx16
-rw-r--r--sd/source/ui/presenter/PresenterTextView.cxx51
-rw-r--r--sd/source/ui/unoidl/unoobj.cxx117
-rw-r--r--solenv/CompilerTest_compilerplugins_clang.mk1
-rw-r--r--svtools/source/uno/unoevent.cxx6
-rw-r--r--svx/source/table/tablelayouter.cxx14
-rw-r--r--svx/source/table/tablelayouter.hxx2
-rw-r--r--svx/source/table/tablertfexporter.cxx8
-rw-r--r--svx/source/tbxctrls/extrusioncontrols.cxx17
-rw-r--r--svx/source/tbxctrls/extrusioncontrols.hxx2
-rw-r--r--svx/source/tbxctrls/fontworkgallery.cxx38
-rw-r--r--svx/source/xml/xmleohlp.cxx11
-rw-r--r--sw/source/filter/xml/xmltexte.cxx11
-rw-r--r--sw/source/filter/xml/xmltexte.hxx2
-rw-r--r--ucb/source/ucp/file/bc.cxx16
-rw-r--r--ucb/source/ucp/file/filtask.cxx37
-rw-r--r--ucb/source/ucp/file/filtask.hxx21
-rw-r--r--vbahelper/source/vbahelper/vbaglobalbase.cxx14
-rw-r--r--xmloff/inc/XMLFootnoteConfigurationImportContext.hxx13
-rw-r--r--xmloff/inc/XMLImageMapContext.hxx2
-rw-r--r--xmloff/inc/XMLImageMapExport.hxx12
-rw-r--r--xmloff/inc/XMLIndexBibliographyConfigurationContext.hxx11
-rw-r--r--xmloff/inc/XMLLineNumberingImportContext.hxx12
-rw-r--r--xmloff/inc/XMLScriptContextFactory.hxx4
-rw-r--r--xmloff/inc/XMLScriptExportHandler.hxx2
-rw-r--r--xmloff/inc/XMLStarBasicContextFactory.hxx5
-rw-r--r--xmloff/inc/XMLStarBasicExportHandler.hxx6
-rw-r--r--xmloff/inc/XMLTextColumnsContext.hxx9
-rw-r--r--xmloff/inc/XMLTextColumnsExport.hxx9
-rw-r--r--xmloff/inc/txtflde.hxx76
-rw-r--r--xmloff/inc/txtfldi.hxx20
-rw-r--r--xmloff/source/core/SettingsExportHelper.cxx21
-rw-r--r--xmloff/source/draw/XMLImageMapContext.cxx12
-rw-r--r--xmloff/source/draw/XMLImageMapExport.cxx47
-rw-r--r--xmloff/source/draw/sdxmlexp.cxx13
-rw-r--r--xmloff/source/draw/sdxmlexp_impl.hxx2
-rw-r--r--xmloff/source/draw/shapeexport.cxx89
-rw-r--r--xmloff/source/draw/shapeimport.cxx15
-rw-r--r--xmloff/source/script/XMLEventExport.cxx4
-rw-r--r--xmloff/source/script/XMLScriptContextFactory.cxx15
-rw-r--r--xmloff/source/script/XMLScriptExportHandler.cxx6
-rw-r--r--xmloff/source/script/XMLStarBasicContextFactory.cxx19
-rw-r--r--xmloff/source/script/XMLStarBasicExportHandler.cxx23
-rw-r--r--xmloff/source/style/XMLPageExport.cxx15
-rw-r--r--xmloff/source/style/numehelp.cxx32
-rw-r--r--xmloff/source/style/prstylei.cxx14
-rw-r--r--xmloff/source/style/styleexp.cxx47
-rw-r--r--xmloff/source/style/xmlnume.cxx17
-rw-r--r--xmloff/source/style/xmlnumi.cxx20
-rw-r--r--xmloff/source/style/xmlstyle.cxx9
-rw-r--r--xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx48
-rw-r--r--xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx43
-rw-r--r--xmloff/source/text/XMLLineNumberingImportContext.cxx45
-rw-r--r--xmloff/source/text/XMLTextColumnsContext.cxx29
-rw-r--r--xmloff/source/text/XMLTextColumnsExport.cxx35
-rw-r--r--xmloff/source/text/XMLTextMasterPageContext.cxx9
-rw-r--r--xmloff/source/text/XMLTextMasterPageExport.cxx49
-rw-r--r--xmloff/source/text/XMLTextShapeImportHelper.cxx15
-rw-r--r--xmloff/source/text/XMLTextShapeStyleContext.cxx7
-rw-r--r--xmloff/source/text/txtflde.cxx571
-rw-r--r--xmloff/source/text/txtfldi.cxx75
-rw-r--r--xmloff/source/text/txtftne.cxx32
-rw-r--r--xmloff/source/text/txtparae.cxx384
-rw-r--r--xmloff/source/text/txtsecte.cxx4
-rw-r--r--xmloff/source/text/txtstyle.cxx10
-rw-r--r--xmlscript/source/xml_helper/xml_impctx.cxx19
121 files changed, 1517 insertions, 1881 deletions
diff --git a/comphelper/source/misc/backupfilehelper.cxx b/comphelper/source/misc/backupfilehelper.cxx
index d47c9904c696..7e5a76983e43 100644
--- a/comphelper/source/misc/backupfilehelper.cxx
+++ b/comphelper/source/misc/backupfilehelper.cxx
@@ -545,16 +545,16 @@ namespace
typedef std::vector< ExtensionInfoEntry > ExtensionInfoEntryVector;
+ static const OUStringLiteral gaRegPath { "/registry/com.sun.star.comp.deployment.bundle.PackageRegistryBackend/backenddb.xml" };
+
class ExtensionInfo
{
private:
ExtensionInfoEntryVector maEntries;
- OUString const maRegPath;
public:
ExtensionInfo()
- : maEntries(),
- maRegPath("/registry/com.sun.star.comp.deployment.bundle.PackageRegistryBackend/backenddb.xml")
+ : maEntries()
{
}
@@ -677,19 +677,19 @@ namespace
public:
void createUserExtensionRegistryEntriesFromXML(const OUString& rUserConfigWorkURL)
{
- const OUString aPath(rUserConfigWorkURL + "/uno_packages/cache" + maRegPath);
+ const OUString aPath(rUserConfigWorkURL + "/uno_packages/cache" + gaRegPath);
createExtensionRegistryEntriesFromXML(aPath);
}
void createSharedExtensionRegistryEntriesFromXML(const OUString& rUserConfigWorkURL)
{
- const OUString aPath(rUserConfigWorkURL + "/extensions/shared" + maRegPath);
+ const OUString aPath(rUserConfigWorkURL + "/extensions/shared" + gaRegPath);
createExtensionRegistryEntriesFromXML(aPath);
}
void createBundledExtensionRegistryEntriesFromXML(const OUString& rUserConfigWorkURL)
{
- const OUString aPath(rUserConfigWorkURL + "/extensions/bundled" + maRegPath);
+ const OUString aPath(rUserConfigWorkURL + "/extensions/bundled" + gaRegPath);
createExtensionRegistryEntriesFromXML(aPath);
}
diff --git a/comphelper/source/officeinstdir/officeinstallationdirectories.cxx b/comphelper/source/officeinstdir/officeinstallationdirectories.cxx
index a1850d4b6fc8..1323f79a22de 100644
--- a/comphelper/source/officeinstdir/officeinstallationdirectories.cxx
+++ b/comphelper/source/officeinstdir/officeinstallationdirectories.cxx
@@ -75,11 +75,12 @@ static bool makeCanonicalFileURL( OUString & rURL )
namespace comphelper {
+static OUString const g_aOfficeBrandDirMacro("$(brandbaseurl)");
+static OUString const g_aUserDirMacro("$(userdataurl)");
+
OfficeInstallationDirectories::OfficeInstallationDirectories(
const uno::Reference< uno::XComponentContext > & xCtx )
-: m_aOfficeBrandDirMacro( "$(brandbaseurl)" ),
- m_aUserDirMacro( "$(userdataurl)" ),
- m_xCtx( xCtx ),
+: m_xCtx( xCtx ),
m_pOfficeBrandDir( nullptr ),
m_pUserDir( nullptr )
{
@@ -131,7 +132,7 @@ OfficeInstallationDirectories::makeRelocatableURL( const OUString& URL )
return
aCanonicalURL.replaceAt( nIndex,
m_pOfficeBrandDir->getLength(),
- m_aOfficeBrandDirMacro );
+ g_aOfficeBrandDirMacro );
}
else
{
@@ -141,7 +142,7 @@ OfficeInstallationDirectories::makeRelocatableURL( const OUString& URL )
return
aCanonicalURL.replaceAt( nIndex,
m_pUserDir->getLength(),
- m_aUserDirMacro );
+ g_aUserDirMacro );
}
}
}
@@ -155,26 +156,26 @@ OfficeInstallationDirectories::makeAbsoluteURL( const OUString& URL )
{
if ( !URL.isEmpty() )
{
- sal_Int32 nIndex = URL.indexOf( m_aOfficeBrandDirMacro );
+ sal_Int32 nIndex = URL.indexOf( g_aOfficeBrandDirMacro );
if ( nIndex != -1 )
{
initDirs();
return
URL.replaceAt( nIndex,
- m_aOfficeBrandDirMacro.getLength(),
+ g_aOfficeBrandDirMacro.getLength(),
*m_pOfficeBrandDir );
}
else
{
- nIndex = URL.indexOf( m_aUserDirMacro );
+ nIndex = URL.indexOf( g_aUserDirMacro );
if ( nIndex != -1 )
{
initDirs();
return
URL.replaceAt( nIndex,
- m_aUserDirMacro.getLength(),
+ g_aUserDirMacro.getLength(),
*m_pUserDir );
}
}
diff --git a/comphelper/source/officeinstdir/officeinstallationdirectories.hxx b/comphelper/source/officeinstdir/officeinstallationdirectories.hxx
index e2b04a7687fb..bfcde8d72876 100644
--- a/comphelper/source/officeinstdir/officeinstallationdirectories.hxx
+++ b/comphelper/source/officeinstdir/officeinstallationdirectories.hxx
@@ -69,8 +69,6 @@ public:
private:
void initDirs();
- OUString const m_aOfficeBrandDirMacro;
- OUString const m_aUserDirMacro;
css::uno::Reference< css::uno::XComponentContext > m_xCtx;
std::unique_ptr<OUString> m_pOfficeBrandDir;
std::unique_ptr<OUString> m_pUserDir;
diff --git a/comphelper/source/xml/ofopxmlhelper.cxx b/comphelper/source/xml/ofopxmlhelper.cxx
index 62cd50aba2ca..4a2bf122b39e 100644
--- a/comphelper/source/xml/ofopxmlhelper.cxx
+++ b/comphelper/source/xml/ofopxmlhelper.cxx
@@ -47,22 +47,6 @@ class OFOPXMLHelper_Impl
{
sal_uInt16 const m_nFormat; // which format to parse
- // Relations info related strings
- OUString const m_aRelListElement;
- OUString const m_aRelElement;
- OUString const m_aIDAttr;
- OUString const m_aTypeAttr;
- OUString const m_aTargetModeAttr;
- OUString const m_aTargetAttr;
-
- // ContentType related strings
- OUString const m_aTypesElement;
- OUString const m_aDefaultElement;
- OUString const m_aOverrideElement;
- OUString const m_aExtensionAttr;
- OUString const m_aPartNameAttr;
- OUString const m_aContentTypeAttr;
-
css::uno::Sequence< css::uno::Sequence< css::beans::StringPair > > m_aResultSeq;
std::vector< OUString > m_aElementsSeq; // stack of elements being parsed
@@ -284,20 +268,24 @@ uno::Sequence< uno::Sequence< beans::StringPair > > ReadSequence_Impl(
} // namespace OFOPXMLHelper
+// Relations info related strings
+static OUString const g_aRelListElement("Relationships");
+static OUString const g_aRelElement( "Relationship" );
+static OUString const g_aIDAttr( "Id" );
+static OUString const g_aTypeAttr( "Type" );
+static OUString const g_aTargetModeAttr( "TargetMode" );
+static OUString const g_aTargetAttr( "Target" );
+
+// ContentType related strings
+static OUString const g_aTypesElement( "Types" );
+static OUString const g_aDefaultElement( "Default" );
+static OUString const g_aOverrideElement( "Override" );
+static OUString const g_aExtensionAttr( "Extension" );
+static OUString const g_aPartNameAttr( "PartName" );
+static OUString const g_aContentTypeAttr( "ContentType" );
+
OFOPXMLHelper_Impl::OFOPXMLHelper_Impl( sal_uInt16 nFormat )
: m_nFormat( nFormat )
-, m_aRelListElement( "Relationships" )
-, m_aRelElement( "Relationship" )
-, m_aIDAttr( "Id" )
-, m_aTypeAttr( "Type" )
-, m_aTargetModeAttr( "TargetMode" )
-, m_aTargetAttr( "Target" )
-, m_aTypesElement( "Types" )
-, m_aDefaultElement( "Default" )
-, m_aOverrideElement( "Override" )
-, m_aExtensionAttr( "Extension" )
-, m_aPartNameAttr( "PartName" )
-, m_aContentTypeAttr( "ContentType" )
{
}
@@ -324,7 +312,7 @@ void SAL_CALL OFOPXMLHelper_Impl::startElement( const OUString& aName, const uno
{
if ( m_nFormat == RELATIONINFO_FORMAT )
{
- if ( aName == m_aRelListElement )
+ if ( aName == g_aRelListElement )
{
sal_Int32 nNewLength = m_aElementsSeq.size() + 1;
@@ -335,7 +323,7 @@ void SAL_CALL OFOPXMLHelper_Impl::startElement( const OUString& aName, const uno
return; // nothing to do
}
- else if ( aName == m_aRelElement )
+ else if ( aName == g_aRelElement )
{
sal_Int32 nNewLength = m_aElementsSeq.size() + 1;
if ( nNewLength != 2 )
@@ -348,32 +336,32 @@ void SAL_CALL OFOPXMLHelper_Impl::startElement( const OUString& aName, const uno
sal_Int32 nAttrNum = 0;
m_aResultSeq[nNewEntryNum-1].realloc( 4 ); // the maximal expected number of arguments is 4
- OUString aIDValue = xAttribs->getValueByName( m_aIDAttr );
+ OUString aIDValue = xAttribs->getValueByName( g_aIDAttr );
if ( aIDValue.isEmpty() )
throw css::xml::sax::SAXException(); // TODO: the ID value must present
- OUString aTypeValue = xAttribs->getValueByName( m_aTypeAttr );
- OUString aTargetValue = xAttribs->getValueByName( m_aTargetAttr );
- OUString aTargetModeValue = xAttribs->getValueByName( m_aTargetModeAttr );
+ OUString aTypeValue = xAttribs->getValueByName( g_aTypeAttr );
+ OUString aTargetValue = xAttribs->getValueByName( g_aTargetAttr );
+ OUString aTargetModeValue = xAttribs->getValueByName( g_aTargetModeAttr );
- m_aResultSeq[nNewEntryNum-1][++nAttrNum - 1].First = m_aIDAttr;
+ m_aResultSeq[nNewEntryNum-1][++nAttrNum - 1].First = g_aIDAttr;
m_aResultSeq[nNewEntryNum-1][nAttrNum - 1].Second = aIDValue;
if ( !aTypeValue.isEmpty() )
{
- m_aResultSeq[nNewEntryNum-1][++nAttrNum - 1].First = m_aTypeAttr;
+ m_aResultSeq[nNewEntryNum-1][++nAttrNum - 1].First = g_aTypeAttr;
m_aResultSeq[nNewEntryNum-1][nAttrNum - 1].Second = aTypeValue;
}
if ( !aTargetValue.isEmpty() )
{
- m_aResultSeq[nNewEntryNum-1][++nAttrNum - 1].First = m_aTargetAttr;
+ m_aResultSeq[nNewEntryNum-1][++nAttrNum - 1].First = g_aTargetAttr;
m_aResultSeq[nNewEntryNum-1][nAttrNum - 1].Second = aTargetValue;
}
if ( !aTargetModeValue.isEmpty() )
{
- m_aResultSeq[nNewEntryNum-1][++nAttrNum - 1].First = m_aTargetModeAttr;
+ m_aResultSeq[nNewEntryNum-1][++nAttrNum - 1].First = g_aTargetModeAttr;
m_aResultSeq[nNewEntryNum-1][nAttrNum - 1].Second = aTargetModeValue;
}
@@ -384,7 +372,7 @@ void SAL_CALL OFOPXMLHelper_Impl::startElement( const OUString& aName, const uno
}
else if ( m_nFormat == CONTENTTYPE_FORMAT )
{
- if ( aName == m_aTypesElement )
+ if ( aName == g_aTypesElement )
{
sal_Int32 nNewLength = m_aElementsSeq.size() + 1;
@@ -398,7 +386,7 @@ void SAL_CALL OFOPXMLHelper_Impl::startElement( const OUString& aName, const uno
return; // nothing to do
}
- else if ( aName == m_aDefaultElement )
+ else if ( aName == g_aDefaultElement )
{
sal_Int32 nNewLength = m_aElementsSeq.size() + 1;
if ( nNewLength != 2 )
@@ -412,11 +400,11 @@ void SAL_CALL OFOPXMLHelper_Impl::startElement( const OUString& aName, const uno
if ( m_aResultSeq.getLength() != 2 )
throw uno::RuntimeException();
- const OUString aExtensionValue = xAttribs->getValueByName( m_aExtensionAttr );
+ const OUString aExtensionValue = xAttribs->getValueByName( g_aExtensionAttr );
if ( aExtensionValue.isEmpty() )
throw css::xml::sax::SAXException(); // TODO: the Extension value must present
- const OUString aContentTypeValue = xAttribs->getValueByName( m_aContentTypeAttr );
+ const OUString aContentTypeValue = xAttribs->getValueByName( g_aContentTypeAttr );
if ( aContentTypeValue.isEmpty() )
throw css::xml::sax::SAXException(); // TODO: the ContentType value must present
@@ -426,7 +414,7 @@ void SAL_CALL OFOPXMLHelper_Impl::startElement( const OUString& aName, const uno
m_aResultSeq[0][nNewResultLen-1].First = aExtensionValue;
m_aResultSeq[0][nNewResultLen-1].Second = aContentTypeValue;
}
- else if ( aName == m_aOverrideElement )
+ else if ( aName == g_aOverrideElement )
{
sal_Int32 nNewLength = m_aElementsSeq.size() + 1;
if ( nNewLength != 2 )
@@ -440,11 +428,11 @@ void SAL_CALL OFOPXMLHelper_Impl::startElement( const OUString& aName, const uno
if ( m_aResultSeq.getLength() != 2 )
throw uno::RuntimeException();
- OUString aPartNameValue = xAttribs->getValueByName( m_aPartNameAttr );
+ OUString aPartNameValue = xAttribs->getValueByName( g_aPartNameAttr );
if ( aPartNameValue.isEmpty() )
throw css::xml::sax::SAXException(); // TODO: the PartName value must present
- OUString aContentTypeValue = xAttribs->getValueByName( m_aContentTypeAttr );
+ OUString aContentTypeValue = xAttribs->getValueByName( g_aContentTypeAttr );
if ( aContentTypeValue.isEmpty() )
throw css::xml::sax::SAXException(); // TODO: the ContentType value must present
diff --git a/compilerplugins/clang/conststringfield.cxx b/compilerplugins/clang/conststringfield.cxx
new file mode 100644
index 000000000000..23a7db9ebea2
--- /dev/null
+++ b/compilerplugins/clang/conststringfield.cxx
@@ -0,0 +1,57 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "plugin.hxx"
+#include "check.hxx"
+#include "compat.hxx"
+#include <iostream>
+
+namespace
+{
+class ConstStringField : public loplugin::FilteringPlugin<ConstStringField>
+{
+public:
+ explicit ConstStringField(loplugin::InstantiationData const& data)
+ : loplugin::FilteringPlugin<ConstStringField>(data)
+ {
+ }
+
+ void run() override { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); }
+
+ bool TraverseConstructorInitializer(CXXCtorInitializer* init);
+};
+
+bool ConstStringField::TraverseConstructorInitializer(CXXCtorInitializer* init)
+{
+ if (!init->getSourceLocation().isValid() || ignoreLocation(init->getSourceLocation()))
+ return true;
+ if (!init->getMember())
+ return true;
+ auto tc = loplugin::TypeCheck(init->getMember()->getType());
+ if (!tc.Const().Class("OUString").Namespace("rtl").GlobalNamespace()
+ && !tc.Const().Class("OString").Namespace("rtl").GlobalNamespace())
+ return true;
+ if (auto constructExpr = dyn_cast<CXXConstructExpr>(init->getInit()))
+ {
+ if (constructExpr->getNumArgs() >= 1 && isa<clang::StringLiteral>(constructExpr->getArg(0)))
+ {
+ report(DiagnosticsEngine::Warning, "string field can be static const",
+ init->getSourceLocation())
+ << init->getSourceRange();
+ report(DiagnosticsEngine::Note, "field here", init->getMember()->getLocation())
+ << init->getMember()->getSourceRange();
+ }
+ }
+ return RecursiveASTVisitor::TraverseConstructorInitializer(init);
+}
+
+loplugin::Plugin::Registration<ConstStringField> X("conststringfield", true);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/compilerplugins/clang/test/conststringfield.cxx b/compilerplugins/clang/test/conststringfield.cxx
new file mode 100644
index 000000000000..fa8785713521
--- /dev/null
+++ b/compilerplugins/clang/test/conststringfield.cxx
@@ -0,0 +1,43 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <rtl/ustring.hxx>
+#include <rtl/string.hxx>
+
+class Class1
+{
+ OUString const m_field1; // expected-note {{field here [loplugin:conststringfield]}}
+ Class1()
+ : m_field1("xxxx")
+ // expected-error@-1 {{string field can be static const [loplugin:conststringfield]}}
+ {
+ }
+};
+
+class Class2
+{
+ OString const m_field1; // expected-note {{field here [loplugin:conststringfield]}}
+ Class2()
+ : m_field1("xxxx")
+ // expected-error@-1 {{string field can be static const [loplugin:conststringfield]}}
+ {
+ }
+};
+
+// no warning expected
+class Class4
+{
+ OUString m_field1;
+ Class4()
+ : m_field1("xxxx")
+ {
+ }
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/cui/source/dialogs/colorpicker.cxx b/cui/source/dialogs/colorpicker.cxx
index c928c0493e45..24a498238d2f 100644
--- a/cui/source/dialogs/colorpicker.cxx
+++ b/cui/source/dialogs/colorpicker.cxx
@@ -1212,8 +1212,6 @@ public:
private:
OUString msTitle;
- const OUString msColorKey;
- const OUString msModeKey;
Color mnColor;
sal_Int16 mnMode;
Reference<css::awt::XWindow> mxParent;
@@ -1235,10 +1233,11 @@ Sequence< OUString > ColorPicker_getSupportedServiceNames()
return seq;
}
+static const OUStringLiteral gsColorKey( "Color" );
+static const OUStringLiteral gsModeKey( "Mode" );
+
ColorPicker::ColorPicker()
: ColorPickerBase( m_aMutex )
- , msColorKey( "Color" )
- , msModeKey( "Mode" )
, mnColor( 0 )
, mnMode( 0 )
{
@@ -1273,7 +1272,7 @@ Sequence< OUString > SAL_CALL ColorPicker::getSupportedServiceNames( )
Sequence< PropertyValue > SAL_CALL ColorPicker::getPropertyValues( )
{
Sequence< PropertyValue > props(1);
- props[0].Name = msColorKey;
+ props[0].Name = gsColorKey;
props[0].Value <<= mnColor;
return props;
}
@@ -1282,11 +1281,11 @@ void SAL_CALL ColorPicker::setPropertyValues( const Sequence< PropertyValue >& a
{
for( sal_Int32 n = 0; n < aProps.getLength(); n++ )
{
- if( aProps[n].Name == msColorKey )
+ if( aProps[n].Name == gsColorKey )
{
aProps[n].Value >>= mnColor;
}
- else if( aProps[n].Name == msModeKey )
+ else if( aProps[n].Name == gsModeKey )
{
aProps[n].Value >>= mnMode;
}
diff --git a/include/oox/helper/modelobjecthelper.hxx b/include/oox/helper/modelobjecthelper.hxx
index eb9c7ba97228..5b5dea4f4092 100644
--- a/include/oox/helper/modelobjecthelper.hxx
+++ b/include/oox/helper/modelobjecthelper.hxx
@@ -117,10 +117,6 @@ private:
ObjectContainer maGradientContainer; ///< Contains all named fill gradients.
ObjectContainer maTransGradContainer; ///< Contains all named transparency Gradients.
ObjectContainer maBitmapUrlContainer; ///< Contains all named fill bitmap URLs.
- const OUString maDashNameBase; ///< Base name for all named line dashes.
- const OUString maGradientNameBase; ///< Base name for all named fill gradients.
- const OUString maTransGradNameBase; ///< Base name for all named fill gradients.
- const OUString maBitmapUrlNameBase; ///< Base name for all named fill bitmap URLs.
};
diff --git a/include/oox/vml/vmlinputstream.hxx b/include/oox/vml/vmlinputstream.hxx
index ed5db08330f4..54b93bbe4344 100644
--- a/include/oox/vml/vmlinputstream.hxx
+++ b/include/oox/vml/vmlinputstream.hxx
@@ -90,8 +90,6 @@ private:
mxTextStrm;
css::uno::Sequence< sal_Unicode > maOpeningBracket;
css::uno::Sequence< sal_Unicode > maClosingBracket;
- const OString maOpeningCData;
- const OString maClosingCData;
OString maBuffer;
sal_Int32 mnBufferPos;
};
diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx
index 1795f486162b..7ab872e9d61d 100644
--- a/include/rtl/ustring.hxx
+++ b/include/rtl/ustring.hxx
@@ -87,6 +87,9 @@ struct SAL_WARN_UNUSED OUStringLiteral
int size;
const char* data;
+
+ // So we can use this struct in some places interchangeably with OUString
+ constexpr sal_Int32 getLength() const { return size; }
};
/// @endcond
diff --git a/include/svtools/unoevent.hxx b/include/svtools/unoevent.hxx
index 74470085ff52..bb2d438fe04f 100644
--- a/include/svtools/unoevent.hxx
+++ b/include/svtools/unoevent.hxx
@@ -207,8 +207,6 @@ class SVT_DLLPUBLIC SvDetachedEventDescriptor : public SvBaseEventDescriptor
// the macros; aMacros[i] is the value for aSupportedMacroItemIDs[i]
std::vector<std::unique_ptr<SvxMacro>> aMacros;
- const OUString sImplName;
-
public:
SvDetachedEventDescriptor(const SvEventDescription* pSupportedMacroItems);
diff --git a/include/svx/xmleohlp.hxx b/include/svx/xmleohlp.hxx
index c96f40c3d75c..2cd352bc159d 100644
--- a/include/svx/xmleohlp.hxx
+++ b/include/svx/xmleohlp.hxx
@@ -46,8 +46,6 @@ class SVX_DLLPUBLIC SvXMLEmbeddedObjectHelper final :
{
::osl::Mutex maMutex;
- const OUString maReplacementGraphicsContainerStorageName;
- const OUString maReplacementGraphicsContainerStorageName60;
OUString maCurContainerStorageName;
diff --git a/include/vbahelper/vbaglobalbase.hxx b/include/vbahelper/vbaglobalbase.hxx
index fe338acd7f21..ed1f2114fcfb 100644
--- a/include/vbahelper/vbaglobalbase.hxx
+++ b/include/vbahelper/vbaglobalbase.hxx
@@ -48,7 +48,6 @@ class VBAHELPER_DLLPUBLIC VbaGlobalsBase : public Globals_BASE
{
protected:
const OUString msDocCtxName;
- const OUString msApplication;
bool hasServiceName( const OUString& serviceName );
void init( const css::uno::Sequence< css::beans::PropertyValue >& aInitArgs );
diff --git a/include/xmloff/SettingsExportHelper.hxx b/include/xmloff/SettingsExportHelper.hxx
index df73af11999d..ff503b2b2749 100644
--- a/include/xmloff/SettingsExportHelper.hxx
+++ b/include/xmloff/SettingsExportHelper.hxx
@@ -46,14 +46,6 @@ class XMLOFF_DLLPUBLIC XMLSettingsExportHelper
css::uno::Reference< css::util::XStringSubstitution > mxStringSubsitution;
- const OUString msPrinterIndependentLayout;
- const OUString msColorTableURL;
- const OUString msLineEndTableURL;
- const OUString msHatchTableURL;
- const OUString msDashTableURL;
- const OUString msGradientTableURL;
- const OUString msBitmapTableURL;
-
void ManipulateSetting( css::uno::Any& rAny, const OUString& rName ) const;
void CallTypeFunction(const css::uno::Any& rAny,
diff --git a/include/xmloff/XMLEventExport.hxx b/include/xmloff/XMLEventExport.hxx
index 5ca4a2b23448..797fc4a6dde3 100644
--- a/include/xmloff/XMLEventExport.hxx
+++ b/include/xmloff/XMLEventExport.hxx
@@ -58,8 +58,6 @@ typedef ::std::map< OUString, XMLEventName > NameMap;
*/
class XMLOFF_DLLPUBLIC XMLEventExport
{
- const OUString sEventType;
-
SvXMLExport& rExport;
HandlerMap aHandlerMap;
diff --git a/include/xmloff/XMLPageExport.hxx b/include/xmloff/XMLPageExport.hxx
index 0bfee31c8b59..4df54310e731 100644
--- a/include/xmloff/XMLPageExport.hxx
+++ b/include/xmloff/XMLPageExport.hxx
@@ -53,9 +53,6 @@ class XMLOFF_DLLPUBLIC XMLPageExport : public salhelper::SimpleReferenceObject
{
SvXMLExport& rExport;
- const OUString sIsPhysical;
- const OUString sFollowStyle;
-
css::uno::Reference< css::container::XNameAccess > xPageStyles;
::std::vector< XMLPageExportNameEntry > aNameVector;
diff --git a/include/xmloff/XMLTextMasterPageContext.hxx b/include/xmloff/XMLTextMasterPageContext.hxx
index ca715494dcca..cda2bb4a77a4 100644
--- a/include/xmloff/XMLTextMasterPageContext.hxx
+++ b/include/xmloff/XMLTextMasterPageContext.hxx
@@ -31,7 +31,6 @@ namespace com { namespace sun { namespace star {
class XMLOFF_DLLPUBLIC XMLTextMasterPageContext : public SvXMLStyleContext
{
- const OUString sFollowStyle;
OUString sFollow;
OUString sPageMasterName;
diff --git a/include/xmloff/XMLTextMasterPageExport.hxx b/include/xmloff/XMLTextMasterPageExport.hxx
index 150a74020c48..c56e90116c31 100644
--- a/include/xmloff/XMLTextMasterPageExport.hxx
+++ b/include/xmloff/XMLTextMasterPageExport.hxx
@@ -32,20 +32,6 @@ namespace com { namespace sun { namespace star {
class XMLOFF_DLLPUBLIC XMLTextMasterPageExport : public XMLPageExport
{
- const OUString sHeaderText;
- const OUString sHeaderOn;
- const OUString sHeaderShareContent;
- const OUString sHeaderTextFirst;
- const OUString sHeaderTextLeft;
-
- const OUString sFirstShareContent;
-
- const OUString sFooterText;
- const OUString sFooterOn;
- const OUString sFooterShareContent;
- const OUString sFooterTextFirst;
- const OUString sFooterTextLeft;
-
protected:
virtual void exportHeaderFooterContent(
diff --git a/include/xmloff/XMLTextShapeImportHelper.hxx b/include/xmloff/XMLTextShapeImportHelper.hxx
index 7a1a0a03f6fe..42f5d412f5b4 100644
--- a/include/xmloff/XMLTextShapeImportHelper.hxx
+++ b/include/xmloff/XMLTextShapeImportHelper.hxx
@@ -28,10 +28,6 @@ class XMLOFF_DLLPUBLIC XMLTextShapeImportHelper : public XMLShapeImportHelper
{
SvXMLImport& rImport;
- const OUString sAnchorType;
- const OUString sAnchorPageNo;
- const OUString sVertOrientPosition;
-
public:
XMLTextShapeImportHelper( SvXMLImport& rImp );
diff --git a/include/xmloff/XMLTextShapeStyleContext.hxx b/include/xmloff/XMLTextShapeStyleContext.hxx
index f1f9bf5a49d5..830da64c1838 100644
--- a/include/xmloff/XMLTextShapeStyleContext.hxx
+++ b/include/xmloff/XMLTextShapeStyleContext.hxx
@@ -25,8 +25,6 @@
class XMLOFF_DLLPUBLIC XMLTextShapeStyleContext : public XMLShapeStyleContext
{
- const OUString sIsAutoUpdate;
-
bool bAutoUpdate : 1;
SvXMLImportContextRef xEventContext;
diff --git a/include/xmloff/numehelp.hxx b/include/xmloff/numehelp.hxx
index dba76e714ed7..9402eaec011c 100644
--- a/include/xmloff/numehelp.hxx
+++ b/include/xmloff/numehelp.hxx
@@ -59,16 +59,12 @@ class XMLOFF_DLLPUBLIC XMLNumberFormatAttributesExportHelper
{
css::uno::Reference< css::util::XNumberFormats > xNumberFormats;
SvXMLExport* pExport;
- const OUString sStandardFormat;
- const OUString sType;
const OUString sAttrValue;
const OUString sAttrDateValue;
const OUString sAttrTimeValue;
const OUString sAttrBooleanValue;
const OUString sAttrStringValue;
const OUString sAttrCurrency;
- const OUString msCurrencySymbol;
- const OUString msCurrencyAbbreviation;
XMLNumberFormatSet aNumberFormats;
public:
XMLNumberFormatAttributesExportHelper(css::uno::Reference< css::util::XNumberFormatsSupplier > const & xNumberFormatsSupplier);
diff --git a/include/xmloff/prstylei.hxx b/include/xmloff/prstylei.hxx
index 1fbda3c11f77..da79ed726ad7 100644
--- a/include/xmloff/prstylei.hxx
+++ b/include/xmloff/prstylei.hxx
@@ -40,8 +40,6 @@ typedef std::unordered_set<OUString> OldFillStyleDefinitionSet;
class XMLOFF_DLLPUBLIC XMLPropStyleContext : public SvXMLStyleContext
{
private:
- const OUString msIsPhysical;
- const OUString msFollowStyle;
::std::vector< XMLPropertyState > maProperties;
css::uno::Reference < css::style::XStyle > mxStyle;
SvXMLImportContextRef mxStyles;
diff --git a/include/xmloff/shapeexport.hxx b/include/xmloff/shapeexport.hxx
index 1865210d5bde..def1bd936536 100644
--- a/include/xmloff/shapeexport.hxx
+++ b/include/xmloff/shapeexport.hxx
@@ -182,28 +182,6 @@ private:
SAL_DLLPRIVATE const rtl::Reference< SvXMLExportPropertyMapper >& GetPropertySetMapper() const { return mxPropertySetMapper; }
- const OUString msZIndex;
- const OUString msPrintable;
- const OUString msVisible;
-
- const OUString msModel;
- const OUString msStartShape;
- const OUString msEndShape;
- const OUString msOnClick;
- const OUString msEventType;
- const OUString msPresentation;
- const OUString msMacroName;
- const OUString msScript;
- const OUString msLibrary;
- const OUString msClickAction;
- const OUString msBookmark;
- const OUString msEffect;
- const OUString msPlayFull;
- const OUString msVerb;
- const OUString msSoundURL;
- const OUString msSpeed;
- const OUString msStarBasic;
-
OUStringBuffer msBuffer;
SAL_DLLPRIVATE void ImpCalcShapeType(const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType& eShapeType);
diff --git a/include/xmloff/shapeimport.hxx b/include/xmloff/shapeimport.hxx
index 080b71a02d0f..db7804be82b5 100644
--- a/include/xmloff/shapeimport.hxx
+++ b/include/xmloff/shapeimport.hxx
@@ -242,11 +242,6 @@ class XMLOFF_DLLPUBLIC XMLShapeImportHelper : public salhelper::SimpleReferenceO
std::unique_ptr<SvXMLTokenMap> mp3DSphereObjectAttrTokenMap;
std::unique_ptr<SvXMLTokenMap> mp3DLightAttrTokenMap;
- const OUString msStartShape;
- const OUString msEndShape;
- const OUString msStartGluePointIndex;
- const OUString msEndGluePointIndex;
-
rtl::Reference< XMLTableImport > mxShapeTableImport;
protected:
diff --git a/include/xmloff/styleexp.hxx b/include/xmloff/styleexp.hxx
index 0418aaebc8e5..66a23053005e 100644
--- a/include/xmloff/styleexp.hxx
+++ b/include/xmloff/styleexp.hxx
@@ -52,11 +52,6 @@ class SvXMLExport;
class XMLOFF_DLLPUBLIC XMLStyleExport : public salhelper::SimpleReferenceObject
{
SvXMLExport& rExport;
- const OUString sIsPhysical;
- const OUString sIsAutoUpdate;
- const OUString sFollowStyle;
- const OUString sNumberingStyleName;
- const OUString sOutlineLevel;
SvXMLAutoStylePoolP *pAutoStylePool;
protected:
diff --git a/include/xmloff/txtparae.hxx b/include/xmloff/txtparae.hxx
index 6a09abdaf30f..f19080d0c518 100644
--- a/include/xmloff/txtparae.hxx
+++ b/include/xmloff/txtparae.hxx
@@ -132,83 +132,28 @@ public:
private:
// Implement Title/Description Elements UI (#i73249#)
- const OUString sTitle;
- const OUString sDescription;
- const OUString sAnchorCharStyleName;
- const OUString sAnchorPageNo;
- const OUString sAnchorType;
- const OUString sBeginNotice;
- const OUString sBookmark;
- const OUString sCategory;
- const OUString sChainNextName;
- const OUString sCharStyleName;
- const OUString sCharStyleNames;
- const OUString sContourPolyPolygon;
- const OUString sDocumentIndexMark;
- const OUString sEndNotice;
- const OUString sFootnote;
- const OUString sFootnoteCounting;
- const OUString sFrame;
- const OUString sGraphicFilter;
- const OUString sGraphicRotation;
- const OUString sHeight;
- const OUString sHoriOrient;
- const OUString sHoriOrientPosition;
- const OUString sHyperLinkName;
- const OUString sHyperLinkTarget;
- const OUString sHyperLinkURL;
- const OUString sIsAutomaticContour;
- const OUString sIsCollapsed;
- const OUString sIsPixelContour;
- const OUString sIsStart;
- const OUString sIsSyncHeightToWidth;
- const OUString sIsSyncWidthToHeight;
- const OUString sNumberingRules;
- const OUString sNumberingType;
- const OUString sPageDescName;
- const OUString sPageStyleName;
- const OUString sParaConditionalStyleName;
- const OUString sParagraphService;
- const OUString sParaStyleName;
- const OUString sPositionEndOfDoc;
- const OUString sPrefix;
- const OUString sRedline;
- const OUString sReferenceId;
- const OUString sReferenceMark;
- const OUString sRelativeHeight;
- const OUString sRelativeWidth;
- const OUString sRuby;
- const OUString sRubyCharStyleName;
- const OUString sRubyText;
- const OUString sServerMap;
- const OUString sShapeService;
- const OUString sSizeType;
- const OUString sSoftPageBreak;
- const OUString sStartAt;
- const OUString sSuffix;
- const OUString sTableService;
- const OUString sText;
- const OUString sTextContentService;
- const OUString sTextEmbeddedService;
- const OUString sTextEndnoteService;
- const OUString sTextField;
- const OUString sTextFieldService;
- const OUString sTextFrameService;
- const OUString sTextGraphicService;
- const OUString sTextPortionType;
- const OUString sTextSection;
- const OUString sUnvisitedCharStyleName;
- const OUString sVertOrient;
- const OUString sVertOrientPosition;
- const OUString sVisitedCharStyleName;
- const OUString sWidth;
- const OUString sWidthType;
- const OUString sTextFieldStart;
- const OUString sTextFieldEnd;
- const OUString sTextFieldStartEnd;
+ static const OUStringLiteral gsAnchorCharStyleName;
+ static const OUStringLiteral gsBeginNotice;
+ static const OUStringLiteral gsCategory;
+ static const OUStringLiteral gsCharStyleName;
+ static const OUStringLiteral gsCharStyleNames;
+ static const OUStringLiteral gsEndNotice;
+ static const OUStringLiteral gsFootnote;
+ static const OUStringLiteral gsFootnoteCounting;
+ static const OUStringLiteral gsNumberingType;
+ static const OUStringLiteral gsPageDescName;
+ static const OUStringLiteral gsPageStyleName;
+ static const OUStringLiteral gsParaStyleName;
+ static const OUStringLiteral gsPositionEndOfDoc;
+ static const OUStringLiteral gsPrefix;
+ static const OUStringLiteral gsReferenceId;
+ static const OUStringLiteral gsStartAt;
+ static const OUStringLiteral gsSuffix;
+ static const OUStringLiteral gsTextEndnoteService;
+ static const OUStringLiteral gsTextSection;
protected:
- const OUString sFrameStyleName;
+ static const OUStringLiteral gsFrameStyleName;
SinglePropertySetInfoCache aCharStyleNamesPropInfoCache;
SvXMLAutoStylePoolP& GetAutoStylePool() { return rAutoStylePool; }
diff --git a/include/xmloff/xmlnume.hxx b/include/xmloff/xmlnume.hxx
index 0a4b1b5836ea..f8d905e522f4 100644
--- a/include/xmloff/xmlnume.hxx
+++ b/include/xmloff/xmlnume.hxx
@@ -40,9 +40,6 @@ class XMLTextListAutoStylePool;
class XMLOFF_DLLPUBLIC SvxXMLNumRuleExport final
{
SvXMLExport& rExport;
- const OUString sNumberingRules;
- const OUString sIsPhysical;
- const OUString sIsContinuousNumbering;
// Boolean indicating, if properties for position-and-space-mode LABEL_ALIGNMENT
// are exported or not. (#i89178#)
// These properties have been introduced in ODF 1.2. Thus, its export have
diff --git a/include/xmloff/xmlnumi.hxx b/include/xmloff/xmlnumi.hxx
index 57898f76d254..877340d34df1 100644
--- a/include/xmloff/xmlnumi.hxx
+++ b/include/xmloff/xmlnumi.hxx
@@ -38,10 +38,6 @@ typedef std::vector<rtl::Reference<SvxXMLListLevelStyleContext_Impl>> SvxXMLList
class XMLOFF_DLLPUBLIC SvxXMLListStyleContext
: public SvXMLStyleContext
{
- const OUString sIsPhysical;
- const OUString sNumberingRules;
- const OUString sIsContinuousNumbering;
-
css::uno::Reference< css::container::XIndexReplace > xNumRules;
std::unique_ptr<SvxXMLListStyle_Impl> pLevelStyles;
diff --git a/include/xmloff/xmlstyle.hxx b/include/xmloff/xmlstyle.hxx
index 1c06b1388aed..292af5128e3e 100644
--- a/include/xmloff/xmlstyle.hxx
+++ b/include/xmloff/xmlstyle.hxx
@@ -148,9 +148,6 @@ public:
class XMLOFF_DLLPUBLIC SvXMLStylesContext : public SvXMLImportContext
{
- const OUString msParaStyleServiceName;
- const OUString msTextStyleServiceName;
-
std::unique_ptr<SvXMLStylesContext_Impl> mpImpl;
std::unique_ptr<SvXMLTokenMap> mpStyleStylesElemTokenMap;
diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx
index 0a9ad85582e3..09d5dd63060d 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -176,7 +176,6 @@ struct XmlFilterBaseImpl
typedef RefMap< OUString, Relations > RelationsMap;
FastParser maFastParser;
- const OUString maBinSuffix;
RelationsMap maRelationsMap;
TextFieldStack maTextFieldStack;
const NamespaceMap& mrNamespaceMap;
@@ -185,8 +184,9 @@ struct XmlFilterBaseImpl
explicit XmlFilterBaseImpl();
};
+static const OUStringLiteral gaBinSuffix( ".bin" );
+
XmlFilterBaseImpl::XmlFilterBaseImpl() :
- maBinSuffix( ".bin" ),
mrNamespaceMap(StaticNamespaceMap::get())
{
// register XML namespaces
@@ -348,7 +348,7 @@ bool XmlFilterBase::importFragment( const rtl::Reference<FragmentHandler>& rxHan
return false;
// try to import binary streams (fragment extension must be '.bin')
- if (aFragmentPath.endsWith(mxImpl->maBinSuffix))
+ if (aFragmentPath.endsWith(gaBinSuffix))
{
try
{
@@ -420,7 +420,7 @@ Reference<XDocument> XmlFilterBase::importFragment( const OUString& aFragmentPat
return xRet;
// binary streams (fragment extension is '.bin') currently not supported
- if (aFragmentPath.endsWith(mxImpl->maBinSuffix))
+ if (aFragmentPath.endsWith(gaBinSuffix))
return xRet;
// try to import XML stream
diff --git a/oox/source/helper/modelobjecthelper.cxx b/oox/source/helper/modelobjecthelper.cxx
index 4929dc26749f..32557dd8dc1c 100644
--- a/oox/source/helper/modelobjecthelper.cxx
+++ b/oox/source/helper/modelobjecthelper.cxx
@@ -88,16 +88,17 @@ void ObjectContainer::createContainer() const
OSL_ENSURE( mxContainer.is(), "ObjectContainer::createContainer - container not found" );
}
+static const OUStringLiteral gaDashNameBase( "msLineDash " ); ///< Base name for all named line dashes.
+static const OUStringLiteral gaGradientNameBase( "msFillGradient " ); ///< Base name for all named fill gradients.
+static const OUStringLiteral gaTransGradNameBase( "msTransGradient " ); ///< Base name for all named fill gradients.
+static const OUStringLiteral gaBitmapUrlNameBase( "msFillBitmap " ); ///< Base name for all named fill bitmap URLs.
+
ModelObjectHelper::ModelObjectHelper( const Reference< XMultiServiceFactory >& rxModelFactory ) :
maMarkerContainer( rxModelFactory, "com.sun.star.drawing.MarkerTable" ),
maDashContainer( rxModelFactory, "com.sun.star.drawing.DashTable" ),
maGradientContainer( rxModelFactory, "com.sun.star.drawing.GradientTable" ),
maTransGradContainer( rxModelFactory, "com.sun.star.drawing.TransparencyGradientTable" ),
- maBitmapUrlContainer( rxModelFactory, "com.sun.star.drawing.BitmapTable" ),
- maDashNameBase( "msLineDash " ),
- maGradientNameBase( "msFillGradient " ),
- maTransGradNameBase( "msTransGradient " ),
- maBitmapUrlNameBase( "msFillBitmap " )
+ maBitmapUrlContainer( rxModelFactory, "com.sun.star.drawing.BitmapTable" )
{
}
@@ -116,24 +117,24 @@ bool ModelObjectHelper::insertLineMarker( const OUString& rMarkerName, const Pol
OUString ModelObjectHelper::insertLineDash( const LineDash& rDash )
{
- return maDashContainer.insertObject( maDashNameBase, Any( rDash ), true );
+ return maDashContainer.insertObject( gaDashNameBase, Any( rDash ), true );
}
OUString ModelObjectHelper::insertFillGradient( const awt::Gradient& rGradient )
{
- return maGradientContainer.insertObject( maGradientNameBase, Any( rGradient ), true );
+ return maGradientContainer.insertObject( gaGradientNameBase, Any( rGradient ), true );
}
OUString ModelObjectHelper::insertTransGrandient( const awt::Gradient& rGradient )
{
- return maTransGradContainer.insertObject( maTransGradNameBase, Any( rGradient ), true );
+ return maTransGradContainer.insertObject( gaTransGradNameBase, Any( rGradient ), true );
}
OUString ModelObjectHelper::insertFillBitmapXGraphic(uno::Reference<graphic::XGraphic> const & rxGraphic)
{
uno::Reference<awt::XBitmap> xBitmap(rxGraphic, uno::UNO_QUERY);
if (xBitmap.is())
- return maBitmapUrlContainer.insertObject(maBitmapUrlNameBase, Any(xBitmap), true);
+ return maBitmapUrlContainer.insertObject(gaBitmapUrlNameBase, Any(xBitmap), true);
return OUString();
}
diff --git a/oox/source/ole/vbacontrol.cxx b/oox/source/ole/vbacontrol.cxx
index ada01ab5f022..6a6de0cbfe52 100644
--- a/oox/source/ole/vbacontrol.cxx
+++ b/oox/source/ole/vbacontrol.cxx
@@ -98,12 +98,12 @@ public:
private:
::std::set< OUString >
maCtrlNames;
- const OUString maDummyBaseName;
sal_Int32 mnIndex;
};
+static const OUStringLiteral gaDummyBaseName( "DummyGroupSep" );
+
VbaControlNamesSet::VbaControlNamesSet() :
- maDummyBaseName( "DummyGroupSep" ),
mnIndex( 0 )
{
}
@@ -120,7 +120,7 @@ OUString VbaControlNamesSet::generateDummyName()
OUString aCtrlName;
do
{
- aCtrlName = maDummyBaseName + OUString::number( ++mnIndex );
+ aCtrlName = gaDummyBaseName + OUString::number( ++mnIndex );
}
while( maCtrlNames.count( aCtrlName ) > 0 );
maCtrlNames.insert( aCtrlName );
diff --git a/oox/source/vml/vmlinputstream.cxx b/oox/source/vml/vmlinputstream.cxx
index 4545b6924a41..0dcb588bf931 100644
--- a/oox/source/vml/vmlinputstream.cxx
+++ b/oox/source/vml/vmlinputstream.cxx
@@ -258,13 +258,14 @@ bool lclProcessCharacters( OStringBuffer& rBuffer, const OString& rChars )
} // namespace
+static const OString gaOpeningCData( "<![CDATA[" );
+static const OString gaClosingCData( "]]>" );
+
InputStream::InputStream( const Reference< XComponentContext >& rxContext, const Reference< XInputStream >& rxInStrm ) :
// use single-byte ISO-8859-1 encoding which maps all byte characters to the first 256 Unicode characters
mxTextStrm( TextInputStream::createXTextInputStream( rxContext, rxInStrm, RTL_TEXTENCODING_ISO_8859_1 ) ),
maOpeningBracket( 1 ),
maClosingBracket( 1 ),
- maOpeningCData( "<![CDATA[" ),
- maClosingCData( "]]>" ),
mnBufferPos( 0 )
{
if (!mxTextStrm.is())
@@ -352,10 +353,10 @@ void InputStream::updateBuffer()
// read the element text (add the leading opening bracket manually)
OString aElement = OString( '<' ) + readToElementEnd();
// check for CDATA part, starting with '<![CDATA['
- if( aElement.match( maOpeningCData ) )
+ if( aElement.match( gaOpeningCData ) )
{
// search the end tag ']]>'
- while( ((aElement.getLength() < maClosingCData.getLength()) || !aElement.endsWith( maClosingCData )) && !mxTextStrm->isEOF() )
+ while( ((aElement.getLength() < gaClosingCData.getLength()) || !aElement.endsWith( gaClosingCData )) && !mxTextStrm->isEOF() )
aElement += readToElementEnd();
// copy the entire CDATA part
aBuffer.append( aElement );
diff --git a/package/source/manifest/ManifestImport.cxx b/package/source/manifest/ManifestImport.cxx
index cd0034a2e1df..9982aae75209 100644
--- a/package/source/manifest/ManifestImport.cxx
+++ b/package/source/manifest/ManifestImport.cxx
@@ -33,83 +33,84 @@ using namespace com::sun::star::beans;
using namespace com::sun::star;
using namespace std;
+
+static const OUStringLiteral gsFileEntryElement ( ELEMENT_FILE_ENTRY );
+static const OUStringLiteral gsEncryptionDataElement( ELEMENT_ENCRYPTION_DATA );
+static const OUStringLiteral gsAlgorithmElement ( ELEMENT_ALGORITHM );
+static const OUStringLiteral gsStartKeyAlgElement ( ELEMENT_START_KEY_GENERATION );
+static const OUStringLiteral gsKeyDerivationElement( ELEMENT_KEY_DERIVATION );
+
+static const OUStringLiteral gsMediaTypeAttribute ( ATTRIBUTE_MEDIA_TYPE );
+static const OUStringLiteral gsVersionAttribute ( ATTRIBUTE_VERSION );
+static const OUStringLiteral gsFullPathAttribute ( ATTRIBUTE_FULL_PATH );
+static const OUStringLiteral gsSizeAttribute ( ATTRIBUTE_SIZE );
+static const OUStringLiteral gsSaltAttribute ( ATTRIBUTE_SALT );
+static const OUStringLiteral gsInitialisationVectorAttribute ( ATTRIBUTE_INITIALISATION_VECTOR );
+static const OUStringLiteral gsIterationCountAttribute ( ATTRIBUTE_ITERATION_COUNT );
+static const OUStringLiteral gsKeySizeAttribute ( ATTRIBUTE_KEY_SIZE );
+static const OUStringLiteral gsAlgorithmNameAttribute ( ATTRIBUTE_ALGORITHM_NAME );
+static const OUStringLiteral gsStartKeyAlgNameAttribute ( ATTRIBUTE_START_KEY_GENERATION_NAME );
+static const OUStringLiteral gsKeyDerivationNameAttribute ( ATTRIBUTE_KEY_DERIVATION_NAME );
+static const OUStringLiteral gsChecksumAttribute ( ATTRIBUTE_CHECKSUM );
+static const OUStringLiteral gsChecksumTypeAttribute ( ATTRIBUTE_CHECKSUM_TYPE );
+
+static const OUStringLiteral gsKeyInfoElement ( ELEMENT_ENCRYPTED_KEYINFO );
+static const OUStringLiteral gsManifestKeyInfoElement ( ELEMENT_MANIFEST_KEYINFO );
+static const OUStringLiteral gsEncryptedKeyElement ( ELEMENT_ENCRYPTEDKEY );
+static const OUStringLiteral gsEncryptionMethodElement ( ELEMENT_ENCRYPTIONMETHOD );
+static const OUStringLiteral gsPgpDataElement ( ELEMENT_PGPDATA );
+static const OUStringLiteral gsPgpKeyIDElement ( ELEMENT_PGPKEYID );
+static const OUStringLiteral gsPGPKeyPacketElement ( ELEMENT_PGPKEYPACKET );
+static const OUStringLiteral gsAlgorithmAttribute ( ATTRIBUTE_ALGORITHM );
+static const OUStringLiteral gsCipherDataElement ( ELEMENT_CIPHERDATA );
+static const OUStringLiteral gsCipherValueElement ( ELEMENT_CIPHERVALUE );
+
+static const OUStringLiteral gsManifestKeyInfoElement13 ( ELEMENT_MANIFEST13_KEYINFO );
+static const OUStringLiteral gsEncryptedKeyElement13 ( ELEMENT_ENCRYPTEDKEY13 );
+static const OUStringLiteral gsEncryptionMethodElement13 ( ELEMENT_ENCRYPTIONMETHOD13 );
+static const OUStringLiteral gsPgpDataElement13 ( ELEMENT_PGPDATA13 );
+static const OUStringLiteral gsPgpKeyIDElement13 ( ELEMENT_PGPKEYID13 );
+static const OUStringLiteral gsPGPKeyPacketElement13 ( ELEMENT_PGPKEYPACKET13 );
+static const OUStringLiteral gsAlgorithmAttribute13 ( ATTRIBUTE_ALGORITHM13 );
+static const OUStringLiteral gsCipherDataElement13 ( ELEMENT_CIPHERDATA13 );
+static const OUStringLiteral gsCipherValueElement13 ( ELEMENT_CIPHERVALUE13 );
+
+static const OUStringLiteral gsFullPathProperty ( "FullPath" );
+static const OUStringLiteral gsMediaTypeProperty ( "MediaType" );
+static const OUStringLiteral gsVersionProperty ( "Version" );
+static const OUStringLiteral gsIterationCountProperty ( "IterationCount" );
+static const OUStringLiteral gsDerivedKeySizeProperty ( "DerivedKeySize" );
+static const OUStringLiteral gsSaltProperty ( "Salt" );
+static const OUStringLiteral gsInitialisationVectorProperty ( "InitialisationVector" );
+static const OUStringLiteral gsSizeProperty ( "Size" );
+static const OUStringLiteral gsDigestProperty ( "Digest" );
+static const OUStringLiteral gsEncryptionAlgProperty ( "EncryptionAlgorithm" );
+static const OUStringLiteral gsStartKeyAlgProperty ( "StartKeyAlgorithm" );
+static const OUStringLiteral gsDigestAlgProperty ( "DigestAlgorithm" );
+
+static const OUStringLiteral gsSHA256_URL_ODF12 ( SHA256_URL_ODF12 );
+static const OUStringLiteral gsSHA256_URL ( SHA256_URL );
+static const OUStringLiteral gsSHA1_Name ( SHA1_NAME );
+static const OUStringLiteral gsSHA1_URL ( SHA1_URL );
+
+static const OUStringLiteral gsSHA256_1k_URL ( SHA256_1K_URL );
+static const OUStringLiteral gsSHA1_1k_Name ( SHA1_1K_NAME );
+static const OUStringLiteral gsSHA1_1k_URL ( SHA1_1K_URL );
+
+static const OUStringLiteral gsBlowfish_Name ( BLOWFISH_NAME );
+static const OUStringLiteral gsBlowfish_URL ( BLOWFISH_URL );
+static const OUStringLiteral gsAES128_URL ( AES128_URL );
+static const OUStringLiteral gsAES192_URL ( AES192_URL );
+static const OUStringLiteral gsAES256_URL ( AES256_URL );
+
+static const OUStringLiteral gsPBKDF2_Name ( PBKDF2_NAME );
+static const OUStringLiteral gsPBKDF2_URL ( PBKDF2_URL );
+
ManifestImport::ManifestImport( vector < Sequence < PropertyValue > > & rNewManVector )
: bIgnoreEncryptData ( false )
, bPgpEncryption ( false )
, nDerivedKeySize( 0 )
, rManVector ( rNewManVector )
-
- , sFileEntryElement ( ELEMENT_FILE_ENTRY )
- , sEncryptionDataElement( ELEMENT_ENCRYPTION_DATA )
- , sAlgorithmElement ( ELEMENT_ALGORITHM )
- , sStartKeyAlgElement ( ELEMENT_START_KEY_GENERATION )
- , sKeyDerivationElement( ELEMENT_KEY_DERIVATION )
-
- , sMediaTypeAttribute ( ATTRIBUTE_MEDIA_TYPE )
- , sVersionAttribute ( ATTRIBUTE_VERSION )
- , sFullPathAttribute ( ATTRIBUTE_FULL_PATH )
- , sSizeAttribute ( ATTRIBUTE_SIZE )
- , sSaltAttribute ( ATTRIBUTE_SALT )
- , sInitialisationVectorAttribute ( ATTRIBUTE_INITIALISATION_VECTOR )
- , sIterationCountAttribute ( ATTRIBUTE_ITERATION_COUNT )
- , sKeySizeAttribute ( ATTRIBUTE_KEY_SIZE )
- , sAlgorithmNameAttribute ( ATTRIBUTE_ALGORITHM_NAME )
- , sStartKeyAlgNameAttribute ( ATTRIBUTE_START_KEY_GENERATION_NAME )
- , sKeyDerivationNameAttribute ( ATTRIBUTE_KEY_DERIVATION_NAME )
- , sChecksumAttribute ( ATTRIBUTE_CHECKSUM )
- , sChecksumTypeAttribute ( ATTRIBUTE_CHECKSUM_TYPE )
-
- , sKeyInfoElement ( ELEMENT_ENCRYPTED_KEYINFO )
- , sManifestKeyInfoElement ( ELEMENT_MANIFEST_KEYINFO )
- , sEncryptedKeyElement ( ELEMENT_ENCRYPTEDKEY )
- , sEncryptionMethodElement ( ELEMENT_ENCRYPTIONMETHOD )
- , sPgpDataElement ( ELEMENT_PGPDATA )
- , sPgpKeyIDElement ( ELEMENT_PGPKEYID )
- , sPGPKeyPacketElement ( ELEMENT_PGPKEYPACKET )
- , sAlgorithmAttribute ( ATTRIBUTE_ALGORITHM )
- , sCipherDataElement ( ELEMENT_CIPHERDATA )
- , sCipherValueElement ( ELEMENT_CIPHERVALUE )
-
- , sManifestKeyInfoElement13 ( ELEMENT_MANIFEST13_KEYINFO )
- , sEncryptedKeyElement13 ( ELEMENT_ENCRYPTEDKEY13 )
- , sEncryptionMethodElement13 ( ELEMENT_ENCRYPTIONMETHOD13 )
- , sPgpDataElement13 ( ELEMENT_PGPDATA13 )
- , sPgpKeyIDElement13 ( ELEMENT_PGPKEYID13 )
- , sPGPKeyPacketElement13 ( ELEMENT_PGPKEYPACKET13 )
- , sAlgorithmAttribute13 ( ATTRIBUTE_ALGORITHM13 )
- , sCipherDataElement13 ( ELEMENT_CIPHERDATA13 )
- , sCipherValueElement13 ( ELEMENT_CIPHERVALUE13 )
-
- , sFullPathProperty ( "FullPath" )
- , sMediaTypeProperty ( "MediaType" )
- , sVersionProperty ( "Version" )
- , sIterationCountProperty ( "IterationCount" )
- , sDerivedKeySizeProperty ( "DerivedKeySize" )
- , sSaltProperty ( "Salt" )
- , sInitialisationVectorProperty ( "InitialisationVector" )
- , sSizeProperty ( "Size" )
- , sDigestProperty ( "Digest" )
- , sEncryptionAlgProperty ( "EncryptionAlgorithm" )
- , sStartKeyAlgProperty ( "StartKeyAlgorithm" )
- , sDigestAlgProperty ( "DigestAlgorithm" )
-
- , sSHA256_URL_ODF12 ( SHA256_URL_ODF12 )
- , sSHA256_URL ( SHA256_URL )
- , sSHA1_Name ( SHA1_NAME )
- , sSHA1_URL ( SHA1_URL )
-
- , sSHA256_1k_URL ( SHA256_1K_URL )
- , sSHA1_1k_Name ( SHA1_1K_NAME )
- , sSHA1_1k_URL ( SHA1_1K_URL )
-
- , sBlowfish_Name ( BLOWFISH_NAME )
- , sBlowfish_URL ( BLOWFISH_URL )
- , sAES128_URL ( AES128_URL )
- , sAES192_URL ( AES192_URL )
- , sAES256_URL ( AES256_URL )
-
- , sPBKDF2_Name ( PBKDF2_NAME )
- , sPBKDF2_URL ( PBKDF2_URL )
{
aStack.reserve( 10 );
}
@@ -130,21 +131,21 @@ void ManifestImport::doFileEntry(StringHashMap &rConvertedAttribs)
{
aSequence.resize(PKG_SIZE_ENCR_MNFST);
- aSequence[PKG_MNFST_FULLPATH].Name = sFullPathProperty;
- aSequence[PKG_MNFST_FULLPATH].Value <<= rConvertedAttribs[sFullPathAttribute];
- aSequence[PKG_MNFST_MEDIATYPE].Name = sMediaTypeProperty;
- aSequence[PKG_MNFST_MEDIATYPE].Value <<= rConvertedAttribs[sMediaTypeAttribute];
+ aSequence[PKG_MNFST_FULLPATH].Name = gsFullPathProperty;
+ aSequence[PKG_MNFST_FULLPATH].Value <<= rConvertedAttribs[gsFullPathAttribute];
+ aSequence[PKG_MNFST_MEDIATYPE].Name = gsMediaTypeProperty;
+ aSequence[PKG_MNFST_MEDIATYPE].Value <<= rConvertedAttribs[gsMediaTypeAttribute];
- OUString sVersion = rConvertedAttribs[sVersionAttribute];
+ OUString sVersion = rConvertedAttribs[gsVersionAttribute];
if ( sVersion.getLength() ) {
- aSequence[PKG_MNFST_VERSION].Name = sVersionProperty;
+ aSequence[PKG_MNFST_VERSION].Name = gsVersionProperty;
aSequence[PKG_MNFST_VERSION].Value <<= sVersion;
}
- OUString sSize = rConvertedAttribs[sSizeAttribute];
+ OUString sSize = rConvertedAttribs[gsSizeAttribute];
if ( sSize.getLength() ) {
sal_Int64 nSize = sSize.toInt64();
- aSequence[PKG_MNFST_UCOMPSIZE].Name = sSizeProperty;
+ aSequence[PKG_MNFST_UCOMPSIZE].Name = gsSizeProperty;
aSequence[PKG_MNFST_UCOMPSIZE].Value <<= nSize;
}
}
@@ -229,22 +230,22 @@ void ManifestImport::doEncryptionData(StringHashMap &rConvertedAttribs)
// If this element exists, then this stream is encrypted and we need
// to import the initialisation vector, salt and iteration count used
nDerivedKeySize = 0;
- OUString aString = rConvertedAttribs[sChecksumTypeAttribute];
+ OUString aString = rConvertedAttribs[gsChecksumTypeAttribute];
if ( !bIgnoreEncryptData ) {
- if ( aString == sSHA1_1k_Name || aString == sSHA1_1k_URL ) {
- aSequence[PKG_MNFST_DIGESTALG].Name = sDigestAlgProperty;
+ if ( aString == gsSHA1_1k_Name || aString == gsSHA1_1k_URL ) {
+ aSequence[PKG_MNFST_DIGESTALG].Name = gsDigestAlgProperty;
aSequence[PKG_MNFST_DIGESTALG].Value <<= xml::crypto::DigestID::SHA1_1K;
- } else if ( aString == sSHA256_1k_URL ) {
- aSequence[PKG_MNFST_DIGESTALG].Name = sDigestAlgProperty;
+ } else if ( aString == gsSHA256_1k_URL ) {
+ aSequence[PKG_MNFST_DIGESTALG].Name = gsDigestAlgProperty;
aSequence[PKG_MNFST_DIGESTALG].Value <<= xml::crypto::DigestID::SHA256_1K;
} else
bIgnoreEncryptData = true;
if ( !bIgnoreEncryptData ) {
- aString = rConvertedAttribs[sChecksumAttribute];
+ aString = rConvertedAttribs[gsChecksumAttribute];
uno::Sequence < sal_Int8 > aDecodeBuffer;
::comphelper::Base64::decode(aDecodeBuffer, aString);
- aSequence[PKG_MNFST_DIGEST].Name = sDigestProperty;
+ aSequence[PKG_MNFST_DIGEST].Name = gsDigestProperty;
aSequence[PKG_MNFST_DIGEST].Value <<= aDecodeBuffer;
}
}
@@ -253,22 +254,22 @@ void ManifestImport::doEncryptionData(StringHashMap &rConvertedAttribs)
void ManifestImport::doAlgorithm(StringHashMap &rConvertedAttribs)
{
if ( !bIgnoreEncryptData ) {
- OUString aString = rConvertedAttribs[sAlgorithmNameAttribute];
- if ( aString == sBlowfish_Name || aString == sBlowfish_URL ) {
- aSequence[PKG_MNFST_ENCALG].Name = sEncryptionAlgProperty;
+ OUString aString = rConvertedAttribs[gsAlgorithmNameAttribute];
+ if ( aString == gsBlowfish_Name || aString == gsBlowfish_URL ) {
+ aSequence[PKG_MNFST_ENCALG].Name = gsEncryptionAlgProperty;
aSequence[PKG_MNFST_ENCALG].Value <<= xml::crypto::CipherID::BLOWFISH_CFB_8;
- } else if ( aString == sAES256_URL ) {
- aSequence[PKG_MNFST_ENCALG].Name = sEncryptionAlgProperty;
+ } else if ( aString == gsAES256_URL ) {
+ aSequence[PKG_MNFST_ENCALG].Name = gsEncryptionAlgProperty;
aSequence[PKG_MNFST_ENCALG].Value <<= xml::crypto::CipherID::AES_CBC_W3C_PADDING;
OSL_ENSURE( !nDerivedKeySize || nDerivedKeySize == 32, "Unexpected derived key length!" );
nDerivedKeySize = 32;
- } else if ( aString == sAES192_URL ) {
- aSequence[PKG_MNFST_ENCALG].Name = sEncryptionAlgProperty;
+ } else if ( aString == gsAES192_URL ) {
+ aSequence[PKG_MNFST_ENCALG].Name = gsEncryptionAlgProperty;
aSequence[PKG_MNFST_ENCALG].Value <<= xml::crypto::CipherID::AES_CBC_W3C_PADDING;
OSL_ENSURE( !nDerivedKeySize || nDerivedKeySize == 24, "Unexpected derived key length!" );
nDerivedKeySize = 24;
- } else if ( aString == sAES128_URL ) {
- aSequence[PKG_MNFST_ENCALG].Name = sEncryptionAlgProperty;
+ } else if ( aString == gsAES128_URL ) {
+ aSequence[PKG_MNFST_ENCALG].Name = gsEncryptionAlgProperty;
aSequence[PKG_MNFST_ENCALG].Value <<= xml::crypto::CipherID::AES_CBC_W3C_PADDING;
OSL_ENSURE( !nDerivedKeySize || nDerivedKeySize == 16, "Unexpected derived key length!" );
nDerivedKeySize = 16;
@@ -276,10 +277,10 @@ void ManifestImport::doAlgorithm(StringHashMap &rConvertedAttribs)
bIgnoreEncryptData = true;
if ( !bIgnoreEncryptData ) {
- aString = rConvertedAttribs[sInitialisationVectorAttribute];
+ aString = rConvertedAttribs[gsInitialisationVectorAttribute];
uno::Sequence < sal_Int8 > aDecodeBuffer;
::comphelper::Base64::decode(aDecodeBuffer, aString);
- aSequence[PKG_MNFST_INIVECTOR].Name = sInitialisationVectorProperty;
+ aSequence[PKG_MNFST_INIVECTOR].Name = gsInitialisationVectorProperty;
aSequence[PKG_MNFST_INIVECTOR].Value <<= aDecodeBuffer;
}
}
@@ -288,19 +289,19 @@ void ManifestImport::doAlgorithm(StringHashMap &rConvertedAttribs)
void ManifestImport::doKeyDerivation(StringHashMap &rConvertedAttribs)
{
if ( !bIgnoreEncryptData ) {
- OUString aString = rConvertedAttribs[sKeyDerivationNameAttribute];
- if ( aString == sPBKDF2_Name || aString == sPBKDF2_URL ) {
- aString = rConvertedAttribs[sSaltAttribute];
+ OUString aString = rConvertedAttribs[gsKeyDerivationNameAttribute];
+ if ( aString == gsPBKDF2_Name || aString == gsPBKDF2_URL ) {
+ aString = rConvertedAttribs[gsSaltAttribute];
uno::Sequence < sal_Int8 > aDecodeBuffer;
::comphelper::Base64::decode(aDecodeBuffer, aString);
- aSequence[PKG_MNFST_SALT].Name = sSaltProperty;
+ aSequence[PKG_MNFST_SALT].Name = gsSaltProperty;
aSequence[PKG_MNFST_SALT].Value <<= aDecodeBuffer;
- aString = rConvertedAttribs[sIterationCountAttribute];
- aSequence[PKG_MNFST_ITERATION].Name = sIterationCountProperty;
+ aString = rConvertedAttribs[gsIterationCountAttribute];
+ aSequence[PKG_MNFST_ITERATION].Name = gsIterationCountProperty;
aSequence[PKG_MNFST_ITERATION].Value <<= aString.toInt32();
- aString = rConvertedAttribs[sKeySizeAttribute];
+ aString = rConvertedAttribs[gsKeySizeAttribute];
if ( aString.getLength() ) {
sal_Int32 nKey = aString.toInt32();
OSL_ENSURE( !nDerivedKeySize || nKey == nDerivedKeySize , "Provided derived key length differs from the expected one!" );
@@ -310,7 +311,7 @@ void ManifestImport::doKeyDerivation(StringHashMap &rConvertedAttribs)
else if ( nDerivedKeySize != 16 )
OSL_ENSURE( false, "Default derived key length differs from the expected one!" );
- aSequence[PKG_MNFST_DERKEYSIZE].Name = sDerivedKeySizeProperty;
+ aSequence[PKG_MNFST_DERKEYSIZE].Name = gsDerivedKeySizeProperty;
aSequence[PKG_MNFST_DERKEYSIZE].Value <<= nDerivedKeySize;
} else if ( bPgpEncryption ) {
if ( aString != "PGP" )
@@ -322,12 +323,12 @@ void ManifestImport::doKeyDerivation(StringHashMap &rConvertedAttribs)
void ManifestImport::doStartKeyAlg(StringHashMap &rConvertedAttribs)
{
- OUString aString = rConvertedAttribs[sStartKeyAlgNameAttribute];
- if (aString == sSHA256_URL || aString == sSHA256_URL_ODF12) {
- aSequence[PKG_MNFST_STARTALG].Name = sStartKeyAlgProperty;
+ OUString aString = rConvertedAttribs[gsStartKeyAlgNameAttribute];
+ if (aString == gsSHA256_URL || aString == gsSHA256_URL_ODF12) {
+ aSequence[PKG_MNFST_STARTALG].Name = gsStartKeyAlgProperty;
aSequence[PKG_MNFST_STARTALG].Value <<= xml::crypto::DigestID::SHA256;
- } else if ( aString == sSHA1_Name || aString == sSHA1_URL ) {
- aSequence[PKG_MNFST_STARTALG].Name = sStartKeyAlgProperty;
+ } else if ( aString == gsSHA1_Name || aString == gsSHA1_URL ) {
+ aSequence[PKG_MNFST_STARTALG].Name = gsStartKeyAlgProperty;
aSequence[PKG_MNFST_STARTALG].Value <<= xml::crypto::DigestID::SHA1;
} else
bIgnoreEncryptData = true;
@@ -349,11 +350,11 @@ void SAL_CALL ManifestImport::startElement( const OUString& aName, const uno::Re
break;
}
case 2: {
- if (aConvertedName == sFileEntryElement) //manifest:file-entry
+ if (aConvertedName == gsFileEntryElement) //manifest:file-entry
doFileEntry(aConvertedAttribs);
- else if (aConvertedName == sManifestKeyInfoElement) //loext:keyinfo
+ else if (aConvertedName == gsManifestKeyInfoElement) //loext:keyinfo
doKeyInfoEntry(aConvertedAttribs);
- else if (aConvertedName == sManifestKeyInfoElement13) //manifest:keyinfo
+ else if (aConvertedName == gsManifestKeyInfoElement13) //manifest:keyinfo
doKeyInfoEntry(aConvertedAttribs);
else
aStack.back().m_bValid = false;
@@ -365,11 +366,11 @@ void SAL_CALL ManifestImport::startElement( const OUString& aName, const uno::Re
if (!aIter->m_bValid)
aStack.back().m_bValid = false;
- else if (aConvertedName == sEncryptionDataElement) //manifest:encryption-data
+ else if (aConvertedName == gsEncryptionDataElement) //manifest:encryption-data
doEncryptionData(aConvertedAttribs);
- else if (aConvertedName == sEncryptedKeyElement) //loext:encrypted-key
+ else if (aConvertedName == gsEncryptedKeyElement) //loext:encrypted-key
doEncryptedKey(aConvertedAttribs);
- else if (aConvertedName == sEncryptedKeyElement13) //manifest:encrypted-key
+ else if (aConvertedName == gsEncryptedKeyElement13) //manifest:encrypted-key
doEncryptedKey(aConvertedAttribs);
else
aStack.back().m_bValid = false;
@@ -381,23 +382,23 @@ void SAL_CALL ManifestImport::startElement( const OUString& aName, const uno::Re
if (!aIter->m_bValid)
aStack.back().m_bValid = false;
- else if (aConvertedName == sAlgorithmElement) //manifest:algorithm,
+ else if (aConvertedName == gsAlgorithmElement) //manifest:algorithm,
doAlgorithm(aConvertedAttribs);
- else if (aConvertedName == sKeyDerivationElement) //manifest:key-derivation,
+ else if (aConvertedName == gsKeyDerivationElement) //manifest:key-derivation,
doKeyDerivation(aConvertedAttribs);
- else if (aConvertedName == sStartKeyAlgElement) //manifest:start-key-generation
+ else if (aConvertedName == gsStartKeyAlgElement) //manifest:start-key-generation
doStartKeyAlg(aConvertedAttribs);
- else if (aConvertedName == sEncryptionMethodElement) //loext:encryption-method
- doEncryptionMethod(aConvertedAttribs, sAlgorithmAttribute);
- else if (aConvertedName == sEncryptionMethodElement13) //manifest:encryption-method
- doEncryptionMethod(aConvertedAttribs, sAlgorithmAttribute13);
- else if (aConvertedName == sKeyInfoElement) //loext:KeyInfo
+ else if (aConvertedName == gsEncryptionMethodElement) //loext:encryption-method
+ doEncryptionMethod(aConvertedAttribs, gsAlgorithmAttribute);
+ else if (aConvertedName == gsEncryptionMethodElement13) //manifest:encryption-method
+ doEncryptionMethod(aConvertedAttribs, gsAlgorithmAttribute13);
+ else if (aConvertedName == gsKeyInfoElement) //loext:KeyInfo
doEncryptedKeyInfo(aConvertedAttribs);
- else if (aConvertedName == sCipherDataElement) //loext:CipherData
+ else if (aConvertedName == gsCipherDataElement) //loext:CipherData
doEncryptedCipherData(aConvertedAttribs);
- else if (aConvertedName == sCipherDataElement13) //manifest:CipherData
+ else if (aConvertedName == gsCipherDataElement13) //manifest:CipherData
doEncryptedCipherData(aConvertedAttribs);
- else if (aConvertedName == sPgpDataElement13) //manifest:PGPData
+ else if (aConvertedName == gsPgpDataElement13) //manifest:PGPData
doEncryptedPgpData(aConvertedAttribs);
else
aStack.back().m_bValid = false;
@@ -409,18 +410,18 @@ void SAL_CALL ManifestImport::startElement( const OUString& aName, const uno::Re
if (!aIter->m_bValid)
aStack.back().m_bValid = false;
- else if (aConvertedName == sPgpDataElement) //loext:PGPData
+ else if (aConvertedName == gsPgpDataElement) //loext:PGPData
doEncryptedPgpData(aConvertedAttribs);
- else if (aConvertedName == sCipherValueElement) //loext:CipherValue
+ else if (aConvertedName == gsCipherValueElement) //loext:CipherValue
// ciphervalue action happens on endElement
aCurrentCharacters = "";
- else if (aConvertedName == sCipherValueElement13) //manifest:CipherValue
+ else if (aConvertedName == gsCipherValueElement13) //manifest:CipherValue
// ciphervalue action happens on endElement
aCurrentCharacters = "";
- else if (aConvertedName == sPgpKeyIDElement13) //manifest:PGPKeyID
+ else if (aConvertedName == gsPgpKeyIDElement13) //manifest:PGPKeyID
// ciphervalue action happens on endElement
aCurrentCharacters = "";
- else if (aConvertedName == sPGPKeyPacketElement13) //manifest:PGPKeyPacket
+ else if (aConvertedName == gsPGPKeyPacketElement13) //manifest:PGPKeyPacket
// ciphervalue action happens on endElement
aCurrentCharacters = "";
else
@@ -433,10 +434,10 @@ void SAL_CALL ManifestImport::startElement( const OUString& aName, const uno::Re
if (!aIter->m_bValid)
aStack.back().m_bValid = false;
- else if (aConvertedName == sPgpKeyIDElement) //loext:PGPKeyID
+ else if (aConvertedName == gsPgpKeyIDElement) //loext:PGPKeyID
// ciphervalue action happens on endElement
aCurrentCharacters = "";
- else if (aConvertedName == sPGPKeyPacketElement) //loext:PGPKeyPacket
+ else if (aConvertedName == gsPGPKeyPacketElement) //loext:PGPKeyPacket
// ciphervalue action happens on endElement
aCurrentCharacters = "";
else
@@ -465,7 +466,7 @@ void SAL_CALL ManifestImport::endElement( const OUString& aName )
OUString aConvertedName = ConvertName( aName );
if ( !aStack.empty() && aStack.rbegin()->m_aConvertedName == aConvertedName ) {
- if ( aConvertedName == sFileEntryElement && aStack.back().m_bValid ) {
+ if ( aConvertedName == gsFileEntryElement && aStack.back().m_bValid ) {
// root folder gets KeyInfo entry if any, for PGP encryption
if (!bIgnoreEncryptData && !aKeys.empty() && aSequence[PKG_MNFST_FULLPATH].Value.get<OUString>() == "/" )
{
@@ -481,8 +482,8 @@ void SAL_CALL ManifestImport::endElement( const OUString& aName )
aSequence.clear();
}
- else if ( (aConvertedName == sEncryptedKeyElement
- || aConvertedName == sEncryptedKeyElement13)
+ else if ( (aConvertedName == gsEncryptedKeyElement
+ || aConvertedName == gsEncryptedKeyElement13)
&& aStack.back().m_bValid ) {
if ( !bIgnoreEncryptData )
{
@@ -495,22 +496,22 @@ void SAL_CALL ManifestImport::endElement( const OUString& aName )
// end element handling for elements with cdata
switch (nLevel) {
case 5: {
- if (aConvertedName == sCipherValueElement) //loext:CipherValue
+ if (aConvertedName == gsCipherValueElement) //loext:CipherValue
doEncryptedCipherValue();
- else if (aConvertedName == sCipherValueElement13) //manifest:CipherValue
+ else if (aConvertedName == gsCipherValueElement13) //manifest:CipherValue
doEncryptedCipherValue();
- else if (aConvertedName == sPgpKeyIDElement13) //manifest:PGPKeyID
+ else if (aConvertedName == gsPgpKeyIDElement13) //manifest:PGPKeyID
doEncryptedKeyId();
- else if (aConvertedName == sPGPKeyPacketElement13) //manifest:PGPKeyPacket
+ else if (aConvertedName == gsPGPKeyPacketElement13) //manifest:PGPKeyPacket
doEncryptedKeyPacket();
else
aStack.back().m_bValid = false;
break;
}
case 6: {
- if (aConvertedName == sPgpKeyIDElement) //loext:PGPKeyID
+ if (aConvertedName == gsPgpKeyIDElement) //loext:PGPKeyID
doEncryptedKeyId();
- else if (aConvertedName == sPGPKeyPacketElement) //loext:PGPKeyPacket
+ else if (aConvertedName == gsPGPKeyPacketElement) //loext:PGPKeyPacket
doEncryptedKeyPacket();
else
aStack.back().m_bValid = false;
diff --git a/package/source/manifest/ManifestImport.hxx b/package/source/manifest/ManifestImport.hxx
index 6661dc70b4e6..19d426b14f25 100644
--- a/package/source/manifest/ManifestImport.hxx
+++ b/package/source/manifest/ManifestImport.hxx
@@ -61,77 +61,6 @@ class ManifestImport final : public cppu::WeakImplHelper < css::xml::sax::XDocum
sal_Int32 nDerivedKeySize;
::std::vector < css::uno::Sequence < css::beans::PropertyValue > > & rManVector;
- const OUString sFileEntryElement;
- const OUString sEncryptionDataElement;
- const OUString sAlgorithmElement;
- const OUString sStartKeyAlgElement;
- const OUString sKeyDerivationElement;
-
- const OUString sMediaTypeAttribute;
- const OUString sVersionAttribute;
- const OUString sFullPathAttribute;
- const OUString sSizeAttribute;
- const OUString sSaltAttribute;
- const OUString sInitialisationVectorAttribute;
- const OUString sIterationCountAttribute;
- const OUString sKeySizeAttribute;
- const OUString sAlgorithmNameAttribute;
- const OUString sStartKeyAlgNameAttribute;
- const OUString sKeyDerivationNameAttribute;
- const OUString sChecksumAttribute;
- const OUString sChecksumTypeAttribute;
-
- const OUString sKeyInfoElement;
- const OUString sManifestKeyInfoElement;
- const OUString sEncryptedKeyElement;
- const OUString sEncryptionMethodElement;
- const OUString sPgpDataElement;
- const OUString sPgpKeyIDElement;
- const OUString sPGPKeyPacketElement;
- const OUString sAlgorithmAttribute;
- const OUString sCipherDataElement;
- const OUString sCipherValueElement;
-
- const OUString sManifestKeyInfoElement13;
- const OUString sEncryptedKeyElement13;
- const OUString sEncryptionMethodElement13;
- const OUString sPgpDataElement13;
- const OUString sPgpKeyIDElement13;
- const OUString sPGPKeyPacketElement13;
- const OUString sAlgorithmAttribute13;
- const OUString sCipherDataElement13;
- const OUString sCipherValueElement13;
-
- const OUString sFullPathProperty;
- const OUString sMediaTypeProperty;
- const OUString sVersionProperty;
- const OUString sIterationCountProperty;
- const OUString sDerivedKeySizeProperty;
- const OUString sSaltProperty;
- const OUString sInitialisationVectorProperty;
- const OUString sSizeProperty;
- const OUString sDigestProperty;
- const OUString sEncryptionAlgProperty;
- const OUString sStartKeyAlgProperty;
- const OUString sDigestAlgProperty;
-
- const OUString sSHA256_URL_ODF12;
- const OUString sSHA256_URL;
- const OUString sSHA1_Name;
- const OUString sSHA1_URL;
-
- const OUString sSHA256_1k_URL;
- const OUString sSHA1_1k_Name;
- const OUString sSHA1_1k_URL;
-
- const OUString sBlowfish_Name;
- const OUString sBlowfish_URL;
- const OUString sAES128_URL;
- const OUString sAES192_URL;
- const OUString sAES256_URL;
-
- const OUString sPBKDF2_Name;
- const OUString sPBKDF2_URL;
OUString PushNameAndNamespaces( const OUString& aName,
const css::uno::Reference< css::xml::sax::XAttributeList >& xAttribs,
diff --git a/registry/source/keyimpl.cxx b/registry/source/keyimpl.cxx
index 82077d4f287c..75b1e7d7101d 100644
--- a/registry/source/keyimpl.cxx
+++ b/registry/source/keyimpl.cxx
@@ -177,7 +177,7 @@ RegError ORegKey::getKeyNames(const OUString& keyName,
OUString sFullKeyName(pKey->getName());
if (sFullKeyName.getLength() > 1)
- sFullKeyName += m_pRegistry->ROOT;
+ sFullKeyName += ORegistry::ROOT;
sFullKeyName += sSubKeyName;
rtl_uString_newFromString(&pSubKeys[nSubKeys], sFullKeyName.pData);
@@ -231,7 +231,7 @@ RegError ORegKey::getValueInfo(const OUString& valueName, RegValueType* pValueTy
REG_GUARD(m_pRegistry->m_mutex);
- if ( rValue.create(m_pRegistry->getStoreFile(), m_name + m_pRegistry->ROOT, sImplValueName, accessMode) )
+ if ( rValue.create(m_pRegistry->getStoreFile(), m_name + ORegistry::ROOT, sImplValueName, accessMode) )
{
*pValueType = RegValueType::NOT_DEFINED;
*pValueSize = 0;
@@ -301,7 +301,7 @@ RegError ORegKey::setValue(const OUString& valueName, RegValueType vType, RegVal
REG_GUARD(m_pRegistry->m_mutex);
- if ( rValue.create(getStoreFile(), m_name + m_pRegistry->ROOT , sImplValueName, storeAccessMode::Create) )
+ if ( rValue.create(getStoreFile(), m_name + ORegistry::ROOT , sImplValueName, storeAccessMode::Create) )
{
return RegError::SET_VALUE_FAILED;
}
@@ -371,7 +371,7 @@ RegError ORegKey::setLongListValue(const OUString& valueName, sal_Int32 const *
REG_GUARD(m_pRegistry->m_mutex);
- if (rValue.create(getStoreFile(), m_name + m_pRegistry->ROOT, sImplValueName, storeAccessMode::Create) )
+ if (rValue.create(getStoreFile(), m_name + ORegistry::ROOT, sImplValueName, storeAccessMode::Create) )
{
return RegError::SET_VALUE_FAILED;
}
@@ -430,7 +430,7 @@ RegError ORegKey::setStringListValue(const OUString& valueName, sal_Char** pValu
REG_GUARD(m_pRegistry->m_mutex);
- if (rValue.create(getStoreFile(), m_name + m_pRegistry->ROOT, sImplValueName, storeAccessMode::Create) )
+ if (rValue.create(getStoreFile(), m_name + ORegistry::ROOT, sImplValueName, storeAccessMode::Create) )
{
return RegError::SET_VALUE_FAILED;
}
@@ -498,7 +498,7 @@ RegError ORegKey::setUnicodeListValue(const OUString& valueName, sal_Unicode** p
REG_GUARD(m_pRegistry->m_mutex);
- if (rValue.create(getStoreFile(), m_name + m_pRegistry->ROOT, sImplValueName, storeAccessMode::Create) )
+ if (rValue.create(getStoreFile(), m_name + ORegistry::ROOT, sImplValueName, storeAccessMode::Create) )
{
return RegError::SET_VALUE_FAILED;
}
@@ -569,7 +569,7 @@ RegError ORegKey::getValue(const OUString& valueName, RegValue value) const
REG_GUARD(m_pRegistry->m_mutex);
- if (rValue.create(getStoreFile(), m_name + m_pRegistry->ROOT, sImplValueName, accessMode) )
+ if (rValue.create(getStoreFile(), m_name + ORegistry::ROOT, sImplValueName, accessMode) )
{
return RegError::VALUE_NOT_EXISTS;
}
@@ -663,7 +663,7 @@ RegError ORegKey::getLongListValue(const OUString& valueName, sal_Int32** pValue
REG_GUARD(m_pRegistry->m_mutex);
- if (rValue.create(getStoreFile(), m_name + m_pRegistry->ROOT, sImplValueName, accessMode) )
+ if (rValue.create(getStoreFile(), m_name + ORegistry::ROOT, sImplValueName, accessMode) )
{
pValueList = nullptr;
*pLen = 0;
@@ -777,7 +777,7 @@ RegError ORegKey::getStringListValue(const OUString& valueName, sal_Char*** pVal
REG_GUARD(m_pRegistry->m_mutex);
- if ( rValue.create(getStoreFile(), m_name + m_pRegistry->ROOT, sImplValueName, accessMode) )
+ if ( rValue.create(getStoreFile(), m_name + ORegistry::ROOT, sImplValueName, accessMode) )
{
pValueList = nullptr;
*pLen = 0;
@@ -883,7 +883,7 @@ RegError ORegKey::getUnicodeListValue(const OUString& valueName, sal_Unicode***
REG_GUARD(m_pRegistry->m_mutex);
- if ( rValue.create(getStoreFile(), m_name + m_pRegistry->ROOT, sImplValueName, accessMode) )
+ if ( rValue.create(getStoreFile(), m_name + ORegistry::ROOT, sImplValueName, accessMode) )
{
pValueList = nullptr;
*pLen = 0;
@@ -1011,7 +1011,7 @@ OStoreDirectory ORegKey::getStoreDir() const
OUString relativName;
storeAccessMode accessMode = storeAccessMode::ReadWrite;
- if ( m_name == m_pRegistry->ROOT )
+ if ( m_name == ORegistry::ROOT )
{
fullPath.clear();
relativName.clear();
diff --git a/registry/source/regimpl.cxx b/registry/source/regimpl.cxx
index 1e24220f0ee9..43039fcddc29 100644
--- a/registry/source/regimpl.cxx
+++ b/registry/source/regimpl.cxx
@@ -420,11 +420,14 @@ void dumpType(typereg::Reader const & reader, OString const & indent) {
}
+#if __cplusplus <= 201402
+constexpr OUStringLiteral ORegistry::ROOT;
+#endif
+
ORegistry::ORegistry()
: m_refCount(1)
, m_readOnly(false)
, m_isOpen(false)
- , ROOT("/")
{
}
diff --git a/registry/source/regimpl.hxx b/registry/source/regimpl.hxx
index 838456e4a061..7aaf3e5ac207 100644
--- a/registry/source/regimpl.hxx
+++ b/registry/source/regimpl.hxx
@@ -145,7 +145,7 @@ private:
store::OStoreFile m_file;
KeyMap m_openKeyTable;
- const OUString ROOT;
+ static constexpr OUStringLiteral ROOT { "/" };
};
#endif
diff --git a/reportdesign/source/filter/xml/xmlStyleImport.cxx b/reportdesign/source/filter/xml/xmlStyleImport.cxx
index fc644f1d749b..5d0f9b1383a7 100644
--- a/reportdesign/source/filter/xml/xmlStyleImport.cxx
+++ b/reportdesign/source/filter/xml/xmlStyleImport.cxx
@@ -142,16 +142,17 @@ void OControlStyleContext::SetAttribute( sal_uInt16 nPrefixKey,
}
+static const OUStringLiteral g_sTableStyleFamilyName( XML_STYLE_FAMILY_TABLE_TABLE_STYLES_NAME );
+static const OUStringLiteral g_sColumnStyleFamilyName( XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_NAME );
+static const OUStringLiteral g_sRowStyleFamilyName( XML_STYLE_FAMILY_TABLE_ROW_STYLES_NAME );
+static const OUStringLiteral g_sCellStyleFamilyName( XML_STYLE_FAMILY_TABLE_CELL_STYLES_NAME );
+
OReportStylesContext::OReportStylesContext( ORptFilter& rImport,
sal_uInt16 nPrfx ,
const OUString& rLName ,
const Reference< XAttributeList > & xAttrList,
const bool bTempAutoStyles ) :
SvXMLStylesContext( rImport, nPrfx, rLName, xAttrList ),
- m_sTableStyleFamilyName( XML_STYLE_FAMILY_TABLE_TABLE_STYLES_NAME ),
- m_sColumnStyleFamilyName( XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_NAME ),
- m_sRowStyleFamilyName( XML_STYLE_FAMILY_TABLE_ROW_STYLES_NAME ),
- m_sCellStyleFamilyName( XML_STYLE_FAMILY_TABLE_CELL_STYLES_NAME ),
m_rImport(rImport),
m_nNumberFormatIndex(-1),
bAutoStyles(bTempAutoStyles)
@@ -373,16 +374,16 @@ OUString OReportStylesContext::GetServiceName( sal_uInt16 nFamily ) const
switch( nFamily )
{
case XML_STYLE_FAMILY_TABLE_TABLE:
- sServiceName = m_sTableStyleFamilyName;
+ sServiceName = g_sTableStyleFamilyName;
break;
case XML_STYLE_FAMILY_TABLE_COLUMN:
- sServiceName = m_sColumnStyleFamilyName;
+ sServiceName = g_sColumnStyleFamilyName;
break;
case XML_STYLE_FAMILY_TABLE_ROW:
- sServiceName = m_sRowStyleFamilyName;
+ sServiceName = g_sRowStyleFamilyName;
break;
case XML_STYLE_FAMILY_TABLE_CELL:
- sServiceName = m_sCellStyleFamilyName;
+ sServiceName = g_sCellStyleFamilyName;
break;
default:
break;
diff --git a/reportdesign/source/filter/xml/xmlStyleImport.hxx b/reportdesign/source/filter/xml/xmlStyleImport.hxx
index 6f8741457a85..28641a8b8f59 100644
--- a/reportdesign/source/filter/xml/xmlStyleImport.hxx
+++ b/reportdesign/source/filter/xml/xmlStyleImport.hxx
@@ -75,10 +75,6 @@ namespace rptxml
class OReportStylesContext : public SvXMLStylesContext
{
- const OUString m_sTableStyleFamilyName;
- const OUString m_sColumnStyleFamilyName;
- const OUString m_sRowStyleFamilyName;
- const OUString m_sCellStyleFamilyName;
ORptFilter& m_rImport;
sal_Int32 m_nNumberFormatIndex;
bool bAutoStyles : 1;
diff --git a/sc/source/filter/excel/xeroot.cxx b/sc/source/filter/excel/xeroot.cxx
index 7dd616b7de93..a1d822c9d491 100644
--- a/sc/source/filter/excel/xeroot.cxx
+++ b/sc/source/filter/excel/xeroot.cxx
@@ -353,11 +353,7 @@ uno::Sequence< beans::NamedValue > XclExpRoot::GetEncryptionData() const
uno::Sequence< beans::NamedValue > XclExpRoot::GenerateDefaultEncryptionData() const
{
- uno::Sequence< beans::NamedValue > aEncryptionData;
- if ( !GetDefaultPassword().isEmpty() )
- aEncryptionData = GenerateEncryptionData( GetDefaultPassword() );
-
- return aEncryptionData;
+ return GenerateEncryptionData( GetDefaultPassword() );
}
XclExpRootData::XclExpLinkMgrRef const & XclExpRoot::GetLocalLinkMgrRef() const
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index 6a914786565e..3ad8791d6101 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -3266,10 +3266,11 @@ XclImpDffConverter::XclImpDffConvData::XclImpDffConvData(
{
}
+static const OUStringLiteral gaStdFormName( "Standard" ); /// Standard name of control forms.
+
XclImpDffConverter::XclImpDffConverter( const XclImpRoot& rRoot, SvStream& rDffStrm ) :
XclImpSimpleDffConverter( rRoot, rDffStrm ),
oox::ole::MSConvertOCXControls( rRoot.GetDocShell()->GetModel() ),
- maStdFormName( "Standard" ),
mnOleImpFlags( 0 )
{
const SvtFilterOptions& rFilterOpt = SvtFilterOptions::Get();
@@ -3842,14 +3843,14 @@ void XclImpDffConverter::InitControlForm()
Reference< XFormsSupplier > xFormsSupplier( rConvData.mrSdrPage.getUnoPage(), UNO_QUERY_THROW );
Reference< XNameContainer > xFormsNC( xFormsSupplier->getForms(), UNO_SET_THROW );
// find or create the Standard form used to insert the imported controls
- if( xFormsNC->hasByName( maStdFormName ) )
+ if( xFormsNC->hasByName( gaStdFormName ) )
{
- xFormsNC->getByName( maStdFormName ) >>= rConvData.mxCtrlForm;
+ xFormsNC->getByName( gaStdFormName ) >>= rConvData.mxCtrlForm;
}
else if( SfxObjectShell* pDocShell = GetDocShell() )
{
rConvData.mxCtrlForm.set( ScfApiHelper::CreateInstance( pDocShell, "com.sun.star.form.component.Form" ), UNO_QUERY_THROW );
- xFormsNC->insertByName( maStdFormName, Any( rConvData.mxCtrlForm ) );
+ xFormsNC->insertByName( gaStdFormName, Any( rConvData.mxCtrlForm ) );
}
}
catch( const Exception& )
diff --git a/sc/source/filter/excel/xlroot.cxx b/sc/source/filter/excel/xlroot.cxx
index e721e2e94c58..9e941bd67720 100644
--- a/sc/source/filter/excel/xlroot.cxx
+++ b/sc/source/filter/excel/xlroot.cxx
@@ -76,6 +76,8 @@ XclDebugObjCounter::~XclDebugObjCounter()
}
#endif
+const OUStringLiteral XclRootData::gaDefPassword( "VelvetSweatshop" );
+
XclRootData::XclRootData( XclBiff eBiff, SfxMedium& rMedium,
tools::SvRef<SotStorage> const & xRootStrg, ScDocument& rDoc, rtl_TextEncoding eTextEnc, bool bExport ) :
meBiff( eBiff ),
@@ -83,7 +85,6 @@ XclRootData::XclRootData( XclBiff eBiff, SfxMedium& rMedium,
mrMedium( rMedium ),
mxRootStrg( xRootStrg ),
mrDoc( rDoc ),
- maDefPassword( "VelvetSweatshop" ),
meTextEnc( eTextEnc ),
meSysLang( Application::GetSettings().GetLanguageTag().getLanguageType() ),
meDocLang( Application::GetSettings().GetLanguageTag().getLanguageType() ),
@@ -237,7 +238,7 @@ sal_Int32 XclRoot::GetHmmFromPixelY( double fPixelY ) const
uno::Sequence< beans::NamedValue > XclRoot::RequestEncryptionData( ::comphelper::IDocPasswordVerifier& rVerifier ) const
{
::std::vector< OUString > aDefaultPasswords;
- aDefaultPasswords.push_back( mrData.maDefPassword );
+ aDefaultPasswords.push_back( XclRootData::gaDefPassword );
return ScfApiHelper::QueryEncryptionDataForMedium( mrData.mrMedium, rVerifier, &aDefaultPasswords );
}
diff --git a/sc/source/filter/inc/xiescher.hxx b/sc/source/filter/inc/xiescher.hxx
index 015b7c745242..58ac66867831 100644
--- a/sc/source/filter/inc/xiescher.hxx
+++ b/sc/source/filter/inc/xiescher.hxx
@@ -1024,7 +1024,6 @@ private:
typedef std::shared_ptr< XclImpDffConvData > XclImpDffConvDataRef;
typedef std::vector< XclImpDffConvDataRef > XclImpDffConvDataStack;
- const OUString maStdFormName; /// Standard name of control forms.
tools::SvRef<SotStorageStream> mxCtlsStrm; /// The 'Ctls' stream for OCX form controls.
ScfProgressBarRef mxProgress; /// The progress bar used in ProcessObj().
XclImpDffConvDataStack maDataStack; /// Stack for registered drawing managers.
diff --git a/sc/source/filter/inc/xlroot.hxx b/sc/source/filter/inc/xlroot.hxx
index f1b9a1085825..f5942a4b0808 100644
--- a/sc/source/filter/inc/xlroot.hxx
+++ b/sc/source/filter/inc/xlroot.hxx
@@ -84,7 +84,7 @@ struct XclRootData
OUString maDocUrl; /// Document URL of imported/exported file.
OUString maBasePath; /// Base path of imported/exported file (path of maDocUrl).
OUString maUserName; /// Current user name.
- const OUString maDefPassword; /// The default password used for stream encryption.
+ static const OUStringLiteral gaDefPassword; /// The default password used for stream encryption.
rtl_TextEncoding meTextEnc; /// Text encoding to import/export byte strings.
LanguageType meSysLang; /// System language.
LanguageType meDocLang; /// Document language (import: from file, export: from system).
@@ -178,7 +178,7 @@ public:
const OUString& GetUserName() const { return mrData.maUserName; }
/** Returns the default password used for stream encryption. */
- const OUString& GetDefaultPassword() const { return mrData.maDefPassword; }
+ static const OUStringLiteral& GetDefaultPassword() { return XclRootData::gaDefPassword; }
/** Requests and verifies a password from the medium or the user. */
css::uno::Sequence< css::beans::NamedValue >
RequestEncryptionData( ::comphelper::IDocPasswordVerifier& rVerifier ) const;
diff --git a/sc/source/filter/oox/pagesettings.cxx b/sc/source/filter/oox/pagesettings.cxx
index d822d9734a91..6ed7d463c1b1 100644
--- a/sc/source/filter/oox/pagesettings.cxx
+++ b/sc/source/filter/oox/pagesettings.cxx
@@ -428,11 +428,6 @@ private:
private:
typedef ::std::vector< HFPortionInfo > HFPortionInfoVec;
- const OUString maPageNumberService;
- const OUString maPageCountService;
- const OUString maSheetNameService;
- const OUString maFileNameService;
- const OUString maDateTimeService;
const std::set< OString > maBoldNames; /// All names for bold font style in lowercase UTF-8.
const std::set< OString > maItalicNames; /// All names for italic font style in lowercase UTF-8.
HFPortionInfoVec maPortions;
@@ -466,13 +461,14 @@ static const sal_Char* const sppcItalicNames[] =
} // namespace
+static const OUStringLiteral gaPageNumberService( "com.sun.star.text.TextField.PageNumber" );
+static const OUStringLiteral gaPageCountService( "com.sun.star.text.TextField.PageCount" );
+static const OUStringLiteral gaSheetNameService( "com.sun.star.text.TextField.SheetName" );
+static const OUStringLiteral gaFileNameService( "com.sun.star.text.TextField.FileName" );
+static const OUStringLiteral gaDateTimeService( "com.sun.star.text.TextField.DateTime" );
+
HeaderFooterParser::HeaderFooterParser( const WorkbookHelper& rHelper ) :
WorkbookHelper( rHelper ),
- maPageNumberService( "com.sun.star.text.TextField.PageNumber" ),
- maPageCountService( "com.sun.star.text.TextField.PageCount" ),
- maSheetNameService( "com.sun.star.text.TextField.SheetName" ),
- maFileNameService( "com.sun.star.text.TextField.FileName" ),
- maDateTimeService( "com.sun.star.text.TextField.DateTime" ),
maBoldNames( sppcBoldNames, sppcBoldNames + SAL_N_ELEMENTS(sppcBoldNames) ),
maItalicNames( sppcItalicNames, sppcItalicNames + SAL_N_ELEMENTS(sppcItalicNames) ),
maPortions( static_cast< size_t >( HF_COUNT ) ),
@@ -547,18 +543,18 @@ double HeaderFooterParser::parse( const Reference<sheet::XHeaderFooterContent>&
case 'R': setNewPortion( HF_RIGHT ); break; // right portion
case 'P': // page number
- appendField( createField( maPageNumberService ) );
+ appendField( createField( gaPageNumberService ) );
break;
case 'N': // total page count
- appendField( createField( maPageCountService ) );
+ appendField( createField( gaPageCountService ) );
break;
case 'A': // current sheet name
- appendField( createField( maSheetNameService ) );
+ appendField( createField( gaSheetNameService ) );
break;
case 'F': // file name
{
- Reference<text::XTextContent> xContent = createField( maFileNameService );
+ Reference<text::XTextContent> xContent = createField( gaFileNameService );
PropertySet aPropSet( xContent );
aPropSet.setProperty( PROP_FileFormat, css::text::FilenameDisplayFormat::NAME_AND_EXT );
appendField( xContent );
@@ -566,7 +562,7 @@ double HeaderFooterParser::parse( const Reference<sheet::XHeaderFooterContent>&
break;
case 'Z': // file path (without file name), OOXML, BIFF12, and BIFF8 only
{
- Reference<text::XTextContent> xContent = createField( maFileNameService );
+ Reference<text::XTextContent> xContent = createField( gaFileNameService );
PropertySet aPropSet( xContent );
// FilenameDisplayFormat::PATH not supported by Calc
aPropSet.setProperty( PROP_FileFormat, css::text::FilenameDisplayFormat::FULL );
@@ -579,7 +575,7 @@ double HeaderFooterParser::parse( const Reference<sheet::XHeaderFooterContent>&
break;
case 'D': // date
{
- Reference<text::XTextContent> xContent = createField( maDateTimeService );
+ Reference<text::XTextContent> xContent = createField( gaDateTimeService );
PropertySet aPropSet( xContent );
aPropSet.setProperty( PROP_IsDate, true );
appendField( xContent );
@@ -587,7 +583,7 @@ double HeaderFooterParser::parse( const Reference<sheet::XHeaderFooterContent>&
break;
case 'T': // time
{
- Reference<text::XTextContent> xContent = createField( maDateTimeService );
+ Reference<text::XTextContent> xContent = createField( gaDateTimeService );
PropertySet aPropSet( xContent );
aPropSet.setProperty( PROP_IsDate, false );
appendField( xContent );
diff --git a/sc/source/filter/oox/worksheethelper.cxx b/sc/source/filter/oox/worksheethelper.cxx
index f2f2d211030a..a4485f3ffc16 100644
--- a/sc/source/filter/oox/worksheethelper.cxx
+++ b/sc/source/filter/oox/worksheethelper.cxx
@@ -362,7 +362,6 @@ private:
private:
typedef ::std::unique_ptr< VmlDrawing > VmlDrawingPtr;
- const OUString maSheetCellRanges; /// Service name for a SheetCellRanges object.
const ScAddress& mrMaxApiPos; /// Reference to maximum Calc cell address from address converter.
ScRange maUsedArea; /// Used area of the sheet, and sheet index of the sheet.
ColumnModel maDefColModel; /// Default column formatting.
@@ -394,9 +393,10 @@ private:
bool mbHasDefWidth; /// True = default column width is set from defaultColWidth attribute.
};
+static const OUStringLiteral gaSheetCellRanges( "com.sun.star.sheet.SheetCellRanges" ); /// Service name for a SheetCellRanges object.
+
WorksheetGlobals::WorksheetGlobals( const WorkbookHelper& rHelper, const ISegmentProgressBarRef& rxProgressBar, WorksheetType eSheetType, SCTAB nSheet ) :
WorkbookHelper( rHelper ),
- maSheetCellRanges( "com.sun.star.sheet.SheetCellRanges" ),
mrMaxApiPos( rHelper.getAddressConverter().getMaxApiAddress() ),
maUsedArea( SCCOL_MAX, SCROW_MAX, nSheet, -1, -1, nSheet ), // Set start address to largest possible value, and end address to smallest
maSheetData( *this ),
@@ -475,7 +475,7 @@ Reference< XSheetCellRanges > WorksheetGlobals::getCellRangeList( const ScRangeL
Reference< XSheetCellRanges > xRanges;
if( mxSheet.is() && !rRanges.empty() ) try
{
- xRanges.set( getBaseFilter().getModelFactory()->createInstance( maSheetCellRanges ), UNO_QUERY_THROW );
+ xRanges.set( getBaseFilter().getModelFactory()->createInstance( gaSheetCellRanges ), UNO_QUERY_THROW );
Reference< XSheetCellRangeContainer > xRangeCont( xRanges, UNO_QUERY_THROW );
xRangeCont->addRangeAddresses( AddressConverter::toApiSequence(rRanges), false );
}
diff --git a/sc/source/filter/xml/XMLStylesExportHelper.cxx b/sc/source/filter/xml/XMLStylesExportHelper.cxx
index 3ee8db545ea9..4a1c140d15a5 100644
--- a/sc/source/filter/xml/XMLStylesExportHelper.cxx
+++ b/sc/source/filter/xml/XMLStylesExportHelper.cxx
@@ -82,18 +82,19 @@ bool ScMyValidation::IsEqual(const ScMyValidation& aVal) const
aVal.sFormula2 == sFormula2;
}
+static const OUStringLiteral gsERRALSTY(SC_UNONAME_ERRALSTY);
+static const OUStringLiteral gsIGNOREBL(SC_UNONAME_IGNOREBL);
+static const OUStringLiteral gsSHOWLIST(SC_UNONAME_SHOWLIST);
+static const OUStringLiteral gsTYPE(SC_UNONAME_TYPE);
+static const OUStringLiteral gsSHOWINP(SC_UNONAME_SHOWINP);
+static const OUStringLiteral gsSHOWERR(SC_UNONAME_SHOWERR);
+static const OUStringLiteral gsINPTITLE(SC_UNONAME_INPTITLE);
+static const OUStringLiteral gsINPMESS(SC_UNONAME_INPMESS);
+static const OUStringLiteral gsERRTITLE(SC_UNONAME_ERRTITLE);
+static const OUStringLiteral gsERRMESS(SC_UNONAME_ERRMESS);
+
ScMyValidationsContainer::ScMyValidationsContainer()
- : aValidationVec(),
- sERRALSTY(SC_UNONAME_ERRALSTY),
- sIGNOREBL(SC_UNONAME_IGNOREBL),
- sSHOWLIST(SC_UNONAME_SHOWLIST),
- sTYPE(SC_UNONAME_TYPE),
- sSHOWINP(SC_UNONAME_SHOWINP),
- sSHOWERR(SC_UNONAME_SHOWERR),
- sINPTITLE(SC_UNONAME_INPTITLE),
- sINPMESS(SC_UNONAME_INPMESS),
- sERRTITLE(SC_UNONAME_ERRTITLE),
- sERRMESS(SC_UNONAME_ERRMESS)
+ : aValidationVec()
{
}
@@ -108,17 +109,17 @@ void ScMyValidationsContainer::AddValidation(const uno::Any& aTempAny,
if (xPropertySet.is())
{
OUString sErrorMessage;
- xPropertySet->getPropertyValue(sERRMESS) >>= sErrorMessage;
+ xPropertySet->getPropertyValue(gsERRMESS) >>= sErrorMessage;
OUString sErrorTitle;
- xPropertySet->getPropertyValue(sERRTITLE) >>= sErrorTitle;
+ xPropertySet->getPropertyValue(gsERRTITLE) >>= sErrorTitle;
OUString sImputMessage;
- xPropertySet->getPropertyValue(sINPMESS) >>= sImputMessage;
+ xPropertySet->getPropertyValue(gsINPMESS) >>= sImputMessage;
OUString sImputTitle;
- xPropertySet->getPropertyValue(sINPTITLE) >>= sImputTitle;
- bool bShowErrorMessage = ::cppu::any2bool(xPropertySet->getPropertyValue(sSHOWERR));
- bool bShowImputMessage = ::cppu::any2bool(xPropertySet->getPropertyValue(sSHOWINP));
+ xPropertySet->getPropertyValue(gsINPTITLE) >>= sImputTitle;
+ bool bShowErrorMessage = ::cppu::any2bool(xPropertySet->getPropertyValue(gsSHOWERR));
+ bool bShowImputMessage = ::cppu::any2bool(xPropertySet->getPropertyValue(gsSHOWINP));
sheet::ValidationType aValidationType;
- xPropertySet->getPropertyValue(sTYPE) >>= aValidationType;
+ xPropertySet->getPropertyValue(gsTYPE) >>= aValidationType;
if (bShowErrorMessage || bShowImputMessage || aValidationType != sheet::ValidationType_ANY ||
!sErrorMessage.isEmpty() || !sErrorTitle.isEmpty() || !sImputMessage.isEmpty() || !sImputTitle.isEmpty())
{
@@ -130,9 +131,9 @@ void ScMyValidationsContainer::AddValidation(const uno::Any& aTempAny,
aValidation.bShowErrorMessage = bShowErrorMessage;
aValidation.bShowImputMessage = bShowImputMessage;
aValidation.aValidationType = aValidationType;
- aValidation.bIgnoreBlanks = ::cppu::any2bool(xPropertySet->getPropertyValue(sIGNOREBL));
- xPropertySet->getPropertyValue(sSHOWLIST) >>= aValidation.nShowList;
- xPropertySet->getPropertyValue(sERRALSTY) >>= aValidation.aAlertStyle;
+ aValidation.bIgnoreBlanks = ::cppu::any2bool(xPropertySet->getPropertyValue(gsIGNOREBL));
+ xPropertySet->getPropertyValue(gsSHOWLIST) >>= aValidation.nShowList;
+ xPropertySet->getPropertyValue(gsERRALSTY) >>= aValidation.aAlertStyle;
uno::Reference<sheet::XSheetCondition> xCondition(xPropertySet, uno::UNO_QUERY);
if (xCondition.is())
{
diff --git a/sc/source/filter/xml/XMLStylesExportHelper.hxx b/sc/source/filter/xml/XMLStylesExportHelper.hxx
index 3fa54f49919e..3399174fb433 100644
--- a/sc/source/filter/xml/XMLStylesExportHelper.hxx
+++ b/sc/source/filter/xml/XMLStylesExportHelper.hxx
@@ -66,17 +66,6 @@ class ScMyValidationsContainer
{
private:
ScMyValidationVec aValidationVec;
- const OUString sERRALSTY;
- const OUString sIGNOREBL;
- const OUString sSHOWLIST;
- const OUString sTYPE;
- const OUString sSHOWINP;
- const OUString sSHOWERR;
- const OUString sINPTITLE;
- const OUString sINPMESS;
- const OUString sERRTITLE;
- const OUString sERRMESS;
-
public:
ScMyValidationsContainer();
~ScMyValidationsContainer();
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 10ebe9139ca5..59f4b9bbb572 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -333,6 +333,8 @@ sal_Int16 ScXMLExport::GetMeasureUnit()
return xProperties->getMetric();
}
+static const OUStringLiteral gsLayerID( SC_LAYERID );
+
ScXMLExport::ScXMLExport(
const css::uno::Reference< css::uno::XComponentContext >& rContext,
OUString const & implementationName, SvXMLExportFlags nExportFlag)
@@ -354,7 +356,6 @@ ScXMLExport::ScXMLExport(
pMergedRangesContainer(nullptr),
pValidationsContainer(nullptr),
pChangeTrackingExportHelper(nullptr),
- sLayerID( SC_LAYERID ),
nOpenRow(-1),
nProgressCount(0),
nCurrentTable(0),
@@ -530,7 +531,7 @@ void ScXMLExport::CollectSharedData(SCTAB& nTableCount, sal_Int32& nShapesCount)
continue;
sal_Int16 nLayerID = 0;
- bool bExtracted = xShapeProp->getPropertyValue(sLayerID) >>= nLayerID;
+ bool bExtracted = xShapeProp->getPropertyValue(gsLayerID) >>= nLayerID;
if (!bExtracted)
continue;
diff --git a/sc/source/filter/xml/xmlexprt.hxx b/sc/source/filter/xml/xmlexprt.hxx
index c551fbe2e96f..14b13ee69a44 100644
--- a/sc/source/filter/xml/xmlexprt.hxx
+++ b/sc/source/filter/xml/xmlexprt.hxx
@@ -110,7 +110,6 @@ class ScXMLExport : public SvXMLExport
std::unique_ptr<ScMyMergedRangesContainer> pMergedRangesContainer;
std::unique_ptr<ScMyValidationsContainer> pValidationsContainer;
std::unique_ptr<ScChangeTrackingExportHelper> pChangeTrackingExportHelper;
- const OUString sLayerID;
OUString sExternalRefTabStyleName;
OUString sAttrName;
OUString sAttrStyleName;
diff --git a/sc/source/filter/xml/xmlstyli.cxx b/sc/source/filter/xml/xmlstyli.cxx
index 5087bf0591b9..03996c173c32 100644
--- a/sc/source/filter/xml/xmlstyli.cxx
+++ b/sc/source/filter/xml/xmlstyli.cxx
@@ -688,16 +688,17 @@ SvXMLStyleContext *XMLTableStylesContext::CreateDefaultStyleStyleChildContext(
return pStyle;
}
+static const OUStringLiteral gsCellStyleServiceName("com.sun.star.style.CellStyle");
+static const OUStringLiteral gsColumnStyleServiceName(XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_NAME);
+static const OUStringLiteral gsRowStyleServiceName(XML_STYLE_FAMILY_TABLE_ROW_STYLES_NAME);
+static const OUStringLiteral gsTableStyleServiceName(XML_STYLE_FAMILY_TABLE_TABLE_STYLES_NAME);
+
XMLTableStylesContext::XMLTableStylesContext( SvXMLImport& rImport,
sal_uInt16 nPrfx ,
const OUString& rLName ,
const uno::Reference< XAttributeList > & xAttrList,
const bool bTempAutoStyles )
: SvXMLStylesContext( rImport, nPrfx, rLName, xAttrList )
- , sCellStyleServiceName("com.sun.star.style.CellStyle")
- , sColumnStyleServiceName(XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_NAME)
- , sRowStyleServiceName(XML_STYLE_FAMILY_TABLE_ROW_STYLES_NAME)
- , sTableStyleServiceName(XML_STYLE_FAMILY_TABLE_TABLE_STYLES_NAME)
, nNumberFormatIndex(-1)
, nConditionalFormatIndex(-1)
, nCellStyleIndex(-1)
@@ -860,16 +861,16 @@ OUString XMLTableStylesContext::GetServiceName( sal_uInt16 nFamily ) const
switch( nFamily )
{
case XML_STYLE_FAMILY_TABLE_COLUMN:
- sServiceName = sColumnStyleServiceName;
+ sServiceName = gsColumnStyleServiceName;
break;
case XML_STYLE_FAMILY_TABLE_ROW:
- sServiceName = sRowStyleServiceName;
+ sServiceName = gsRowStyleServiceName;
break;
case XML_STYLE_FAMILY_TABLE_CELL:
- sServiceName = sCellStyleServiceName;
+ sServiceName = gsCellStyleServiceName;
break;
case XML_STYLE_FAMILY_TABLE_TABLE:
- sServiceName = sTableStyleServiceName;
+ sServiceName = gsTableStyleServiceName;
break;
}
}
diff --git a/sc/source/filter/xml/xmlstyli.hxx b/sc/source/filter/xml/xmlstyli.hxx
index f629817246f1..1babf9cd5bfb 100644
--- a/sc/source/filter/xml/xmlstyli.hxx
+++ b/sc/source/filter/xml/xmlstyli.hxx
@@ -126,10 +126,6 @@ class XMLTableStylesContext : public SvXMLStylesContext
css::uno::Reference< css::container::XNameContainer > xColumnStyles;
css::uno::Reference< css::container::XNameContainer > xRowStyles;
css::uno::Reference< css::container::XNameContainer > xTableStyles;
- const OUString sCellStyleServiceName;
- const OUString sColumnStyleServiceName;
- const OUString sRowStyleServiceName;
- const OUString sTableStyleServiceName;
sal_Int32 nNumberFormatIndex;
sal_Int32 nConditionalFormatIndex;
sal_Int32 nCellStyleIndex;
diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx
index 0c0616558fa9..cccf3494a477 100644
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -342,6 +342,11 @@ void lclAppendStyle(OUStringBuffer& aBuffer, const OUString& aTag, const OUStrin
} // anonymous namespace
+static const OUStringLiteral gaHTMLHeader(
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\r\n"
+ " \"http://www.w3.org/TR/html4/transitional.dtd\">\r\n"
+ "<html>\r\n<head>\r\n" );
+
// constructor for the html export helper classes
HtmlExport::HtmlExport(
const OUString& aPath,
@@ -369,10 +374,6 @@ HtmlExport::HtmlExport(
maHTMLExtension(STR_HTMLEXP_DEFAULT_EXTENSION),
maIndexUrl("index"),
meScript( SCRIPT_ASP ),
- maHTMLHeader(
- "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\r\n"
- " \"http://www.w3.org/TR/html4/transitional.dtd\">\r\n"
- "<html>\r\n<head>\r\n" ),
mpButtonSet( new ButtonSet() )
{
bool bChange = mpDoc->IsChanged();
@@ -640,7 +641,7 @@ void HtmlExport::ExportSingleDocument()
mnPagesWritten = 0;
InitProgress(mnSdPageCount);
- OUStringBuffer aStr(maHTMLHeader);
+ OUStringBuffer aStr(gaHTMLHeader);
aStr.append(DocumentMetadata());
aStr.append("\r\n");
aStr.append("</head>\r\n");
@@ -1103,7 +1104,7 @@ bool HtmlExport::CreateHtmlTextForPresPages()
}
// HTML head
- OUStringBuffer aStr(maHTMLHeader);
+ OUStringBuffer aStr(gaHTMLHeader);
aStr.append(CreateMetaCharset());
aStr.append(" <title>");
aStr.append(StringToHTMLString(maPageNames[nSdPage]));
@@ -1591,7 +1592,7 @@ bool HtmlExport::CreateHtmlForPresPages()
}
// HTML Head
- OUStringBuffer aStr(maHTMLHeader);
+ OUStringBuffer aStr(gaHTMLHeader);
aStr.append(CreateMetaCharset());
aStr.append(" <title>" + StringToHTMLString(maPageNames[nSdPage]) + "</title>\r\n");
@@ -1916,7 +1917,7 @@ bool HtmlExport::CreateContentPage()
SetDocColors();
// html head
- OUStringBuffer aStr(maHTMLHeader);
+ OUStringBuffer aStr(gaHTMLHeader);
aStr.append(CreateMetaCharset());
aStr.append(" <title>");
aStr.append(StringToHTMLString(maPageNames[0]));
@@ -2056,7 +2057,7 @@ bool HtmlExport::CreateNotesPages()
SetDocColors( pPage );
// Html head
- OUStringBuffer aStr(maHTMLHeader);
+ OUStringBuffer aStr(gaHTMLHeader);
aStr.append(CreateMetaCharset());
aStr.append(" <title>");
aStr.append(StringToHTMLString(maPageNames[0]));
@@ -2095,7 +2096,7 @@ bool HtmlExport::CreateOutlinePages()
for (sal_Int32 nPage = 0; nPage < (mbImpress?2:1) && bOk; ++nPage)
{
// Html head
- OUStringBuffer aStr(maHTMLHeader);
+ OUStringBuffer aStr(gaHTMLHeader);
aStr.append(CreateMetaCharset());
aStr.append(" <title>");
aStr.append(StringToHTMLString(maPageNames[0]));
@@ -2408,7 +2409,7 @@ bool HtmlExport::CreateNavBarFrames()
for( int nFile = 0; nFile < 3 && bOk; nFile++ )
{
- OUStringBuffer aStr(maHTMLHeader);
+ OUStringBuffer aStr(gaHTMLHeader);
aStr.append(CreateMetaCharset());
aStr.append(" <title>");
aStr.append(StringToHTMLString(maPageNames[0]));
@@ -2511,7 +2512,7 @@ bool HtmlExport::CreateNavBarFrames()
// the navigation bar outliner closed...
if(bOk)
{
- OUStringBuffer aStr(maHTMLHeader);
+ OUStringBuffer aStr(gaHTMLHeader);
aStr.append(CreateMetaCharset());
aStr.append(" <title>");
aStr.append(StringToHTMLString(maPageNames[0]));
@@ -2534,7 +2535,7 @@ bool HtmlExport::CreateNavBarFrames()
// ... and the outliner open
if( bOk )
{
- OUStringBuffer aStr(maHTMLHeader);
+ OUStringBuffer aStr(gaHTMLHeader);
aStr.append(CreateMetaCharset());
aStr.append(" <title>");
aStr.append(StringToHTMLString(maPageNames[0]));
diff --git a/sd/source/filter/html/htmlex.hxx b/sd/source/filter/html/htmlex.hxx
index 3bb86385e868..3a3e590621b0 100644
--- a/sd/source/filter/html/htmlex.hxx
+++ b/sd/source/filter/html/htmlex.hxx
@@ -138,8 +138,6 @@ class HtmlExport final
OUString maCGIPath;
PublishingScript meScript;
- const OUString maHTMLHeader;
-
std::unique_ptr< ButtonSet > mpButtonSet;
static SdrTextObj* GetLayoutTextObject(SdrPage const * pPage);
diff --git a/sd/source/filter/xml/sdtransform.cxx b/sd/source/filter/xml/sdtransform.cxx
index ca1bfb12bbb8..17806cf90903 100644
--- a/sd/source/filter/xml/sdtransform.cxx
+++ b/sd/source/filter/xml/sdtransform.cxx
@@ -66,9 +66,6 @@ public:
SdDrawDocument& mrDocument;
SdrOutliner& mrOutliner;
- const OUString msEnableNumbering;
- const OUString msTextNamespace;
- const OUString msTrue;
};
/** transforms the given model from OOo 2.x to OOo 3.x. This maps
@@ -83,12 +80,13 @@ void TransformOOo2xDocument( SdDrawDocument* pDocument )
}
}
+static const OUStringLiteral gsEnableNumbering( "enable-numbering" );
+static const OUStringLiteral gsTextNamespace( "urn:oasis:names:tc:opendocument:xmlns:text:1.0" );
+static const OUStringLiteral gsTrue( "true" );
+
SdTransformOOo2xDocument::SdTransformOOo2xDocument( SdDrawDocument& rDocument )
: mrDocument( rDocument )
, mrOutliner( rDocument.GetDrawOutliner() )
-, msEnableNumbering( "enable-numbering" )
-, msTextNamespace( "urn:oasis:names:tc:opendocument:xmlns:text:1.0" )
-, msTrue( "true" )
{
}
@@ -282,10 +280,10 @@ bool SdTransformOOo2xDocument::getBulletState( const SfxItemSet& rSet, sal_uInt1
const sal_uInt16 nCount = rAttr.GetAttrCount();
for( sal_uInt16 nItem = 0; nItem < nCount; nItem++ )
{
- if( ( rAttr.GetAttrLName( nItem ) == msEnableNumbering ) && ( rAttr.GetAttrNamespace( nItem ) == msTextNamespace ) )
+ if( ( rAttr.GetAttrLName( nItem ) == gsEnableNumbering ) && ( rAttr.GetAttrNamespace( nItem ) == gsTextNamespace ) )
{
const OUString& sValue( rAttr.GetAttrValue( nItem ) );
- rState = sValue == msTrue;
+ rState = sValue == gsTrue;
return true;
}
}
@@ -328,7 +326,7 @@ bool SdTransformOOo2xDocument::removeAlienAttributes( SfxItemSet& rSet, sal_uInt
const sal_uInt16 nCount = rAttr.GetAttrCount();
for( sal_uInt16 nItem = 0; nItem < nCount; nItem++ )
{
- if( ( rAttr.GetAttrLName( nItem ) == msEnableNumbering ) && ( rAttr.GetAttrNamespace( nItem ) == msTextNamespace ) )
+ if( ( rAttr.GetAttrLName( nItem ) == gsEnableNumbering ) && ( rAttr.GetAttrNamespace( nItem ) == gsTextNamespace ) )
{
if( nCount == 1 )
{
diff --git a/sd/source/ui/presenter/PresenterTextView.cxx b/sd/source/ui/presenter/PresenterTextView.cxx
index a1b7ca35ba8f..d41cd15a2dfc 100644
--- a/sd/source/ui/presenter/PresenterTextView.cxx
+++ b/sd/source/ui/presenter/PresenterTextView.cxx
@@ -48,22 +48,22 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
+static const OUStringLiteral gsTextPropertyName("Text");
+static const OUStringLiteral gsBitmapPropertyName("Bitmap");
+static const OUStringLiteral gsSizePropertyName("Size");
+static const OUStringLiteral gsBackgroundColorPropertyName("BackgroundColor");
+static const OUStringLiteral gsTextColorPropertyName("TextColor");
+static const OUStringLiteral gsFontDescriptorPropertyName("FontDescriptor");
+static const OUStringLiteral gsTopPropertyName("Top");
+static const OUStringLiteral gsTopRelativePropertyName("RelativeTop");
+static const OUStringLiteral gsTotalHeightPropertyName("TotalHeight");
+
namespace sd { namespace presenter {
// PresenterTextView::Implementation
class PresenterTextView::Implementation
{
public:
- const OUString msTextPropertyName;
- const OUString msBitmapPropertyName;
- const OUString msSizePropertyName;
- const OUString msBackgroundColorPropertyName;
- const OUString msTextColorPropertyName;
- const OUString msFontDescriptorPropertyName;
- const OUString msTopPropertyName;
- const OUString msTopRelativePropertyName;
- const OUString msTotalHeightPropertyName;
-
Implementation();
~Implementation();
@@ -131,15 +131,15 @@ Any PresenterTextView::GetPropertyValue (const OUString& rsPropertyName)
{
ThrowIfDisposed();
- if (rsPropertyName == mpImplementation->msBitmapPropertyName)
+ if (rsPropertyName == gsBitmapPropertyName)
{
return Any(mpImplementation->GetBitmap());
}
- else if (rsPropertyName == mpImplementation->msTopPropertyName)
+ else if (rsPropertyName == gsTopPropertyName)
{
return Any(mpImplementation->GetTop());
}
- else if (rsPropertyName == mpImplementation->msTotalHeightPropertyName)
+ else if (rsPropertyName == gsTotalHeightPropertyName)
{
return Any(mpImplementation->GetTotalHeight());
}
@@ -154,43 +154,43 @@ Any PresenterTextView::SetPropertyValue (
ThrowIfDisposed();
Any aOldValue;
- if (rsPropertyName == mpImplementation->msTextPropertyName)
+ if (rsPropertyName == gsTextPropertyName)
{
OUString sText;
if (rValue >>= sText)
mpImplementation->SetText(sText);
}
- else if (rsPropertyName == mpImplementation->msSizePropertyName)
+ else if (rsPropertyName == gsSizePropertyName)
{
awt::Size aSize;
if (rValue >>= aSize)
mpImplementation->SetSize(Size(aSize.Width,aSize.Height));
}
- else if (rsPropertyName == mpImplementation->msBackgroundColorPropertyName)
+ else if (rsPropertyName == gsBackgroundColorPropertyName)
{
util::Color aColor = util::Color();
if (rValue >>= aColor)
mpImplementation->SetBackgroundColor(Color(aColor));
}
- else if (rsPropertyName == mpImplementation->msTextColorPropertyName)
+ else if (rsPropertyName == gsTextColorPropertyName)
{
util::Color aColor = util::Color();
if (rValue >>= aColor)
mpImplementation->SetTextColor(Color(aColor));
}
- else if (rsPropertyName == mpImplementation->msFontDescriptorPropertyName)
+ else if (rsPropertyName == gsFontDescriptorPropertyName)
{
awt::FontDescriptor aFontDescriptor;
if (rValue >>= aFontDescriptor)
mpImplementation->SetFontDescriptor(aFontDescriptor);
}
- else if (rsPropertyName == mpImplementation->msTopPropertyName)
+ else if (rsPropertyName == gsTopPropertyName)
{
sal_Int32 nTop = 0;
if (rValue >>= nTop)
mpImplementation->SetTop(nTop);
}
- else if (rsPropertyName == mpImplementation->msTopRelativePropertyName)
+ else if (rsPropertyName == gsTopRelativePropertyName)
{
OUString sDistance;
if (rValue >>= sDistance)
@@ -214,16 +214,7 @@ void PresenterTextView::ThrowIfDisposed()
// PresenterTextView::Implementation
PresenterTextView::Implementation::Implementation()
- : msTextPropertyName("Text"),
- msBitmapPropertyName("Bitmap"),
- msSizePropertyName("Size"),
- msBackgroundColorPropertyName("BackgroundColor"),
- msTextColorPropertyName("TextColor"),
- msFontDescriptorPropertyName("FontDescriptor"),
- msTopPropertyName("Top"),
- msTopRelativePropertyName("RelativeTop"),
- msTotalHeightPropertyName("TotalHeight"),
- mxBitmap(),
+ : mxBitmap(),
mpCanvas(),
mpOutputDevice(VclPtr<VirtualDevice>::Create(*Application::GetDefaultDevice(), DeviceFormat::DEFAULT, DeviceFormat::DEFAULT)),
mpEditEngine(nullptr),
diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx
index 62f49e13d060..092a64862104 100644
--- a/sd/source/ui/unoidl/unoobj.cxx
+++ b/sd/source/ui/unoidl/unoobj.cxx
@@ -1070,22 +1070,6 @@ uno::Any SdXShape::GetStyleSheet() const
class SdUnoEventsAccess : public cppu::WeakImplHelper< css::container::XNameReplace, css::lang::XServiceInfo >
{
private:
- const OUString maStrOnClick;
- const OUString maStrServiceName;
- const OUString maStrEventType;
- const OUString maStrPresentation;
- const OUString maStrLibrary;
- const OUString maStrMacroName;
- const OUString maStrClickAction;
- const OUString maStrBookmark;
- const OUString maStrEffect;
- const OUString maStrPlayFull;
- const OUString maStrVerb;
- const OUString maStrSoundURL;
- const OUString maStrSpeed;
- const OUString maStrStarBasic;
- const OUString maStrScript;
-
SdXShape* mpShape;
public:
@@ -1115,23 +1099,24 @@ uno::Reference< container::XNameReplace > SAL_CALL SdXShape::getEvents( )
return new SdUnoEventsAccess( this );
}
+static const OUStringLiteral gaStrOnClick( "OnClick" );
+static const OUStringLiteral gaStrServiceName( "com.sun.star.documents.Events" );
+static const OUStringLiteral gaStrEventType( "EventType" );
+static const OUStringLiteral gaStrPresentation( "Presentation" );
+static const OUStringLiteral gaStrLibrary("Library");
+static const OUStringLiteral gaStrMacroName("MacroName");
+static const OUStringLiteral gaStrClickAction( "ClickAction" );
+static const OUStringLiteral gaStrBookmark( "Bookmark" );
+static const OUStringLiteral gaStrEffect( "Effect" );
+static const OUStringLiteral gaStrPlayFull( "PlayFull" );
+static const OUStringLiteral gaStrVerb( "Verb" );
+static const OUStringLiteral gaStrSoundURL( "SoundURL" );
+static const OUStringLiteral gaStrSpeed( "Speed" );
+static const OUStringLiteral gaStrStarBasic( "StarBasic" );
+static const OUStringLiteral gaStrScript( "Script" );
+
SdUnoEventsAccess::SdUnoEventsAccess( SdXShape* pShape ) throw()
-: maStrOnClick( "OnClick" ),
- maStrServiceName( "com.sun.star.documents.Events" ),
- maStrEventType( "EventType" ),
- maStrPresentation( "Presentation" ),
- maStrLibrary("Library"),
- maStrMacroName("MacroName"),
- maStrClickAction( "ClickAction" ),
- maStrBookmark( "Bookmark" ),
- maStrEffect( "Effect" ),
- maStrPlayFull( "PlayFull" ),
- maStrVerb( "Verb" ),
- maStrSoundURL( "SoundURL" ),
- maStrSpeed( "Speed" ),
- maStrStarBasic( "StarBasic" ),
- maStrScript( "Script" ),
- mpShape( pShape )
+ : mpShape( pShape )
{
}
@@ -1166,7 +1151,7 @@ static void clearEventsInAnimationInfo( SdAnimationInfo* pInfo )
// XNameReplace
void SAL_CALL SdUnoEventsAccess::replaceByName( const OUString& aName, const uno::Any& aElement )
{
- if( mpShape == nullptr || aName != maStrOnClick )
+ if( mpShape == nullptr || aName != gaStrOnClick )
throw container::NoSuchElementException();
uno::Sequence< beans::PropertyValue > aProperties;
@@ -1191,7 +1176,7 @@ void SAL_CALL SdUnoEventsAccess::replaceByName( const OUString& aName, const uno
sal_Int32 nIndex;
for( nIndex = 0; nIndex < nCount; nIndex++, pProperties++ )
{
- if( !( nFound & FoundFlags::EventType ) && pProperties->Name == maStrEventType )
+ if( !( nFound & FoundFlags::EventType ) && pProperties->Name == gaStrEventType )
{
if( pProperties->Value >>= aStrEventType )
{
@@ -1199,7 +1184,7 @@ void SAL_CALL SdUnoEventsAccess::replaceByName( const OUString& aName, const uno
continue;
}
}
- else if( !( nFound & FoundFlags::ClickAction ) && pProperties->Name == maStrClickAction )
+ else if( !( nFound & FoundFlags::ClickAction ) && pProperties->Name == gaStrClickAction )
{
if( pProperties->Value >>= eClickAction )
{
@@ -1207,7 +1192,7 @@ void SAL_CALL SdUnoEventsAccess::replaceByName( const OUString& aName, const uno
continue;
}
}
- else if( !( nFound & FoundFlags::Macro ) && ( pProperties->Name == maStrMacroName || pProperties->Name == maStrScript ) )
+ else if( !( nFound & FoundFlags::Macro ) && ( pProperties->Name == gaStrMacroName || pProperties->Name == gaStrScript ) )
{
if( pProperties->Value >>= aStrMacro )
{
@@ -1215,7 +1200,7 @@ void SAL_CALL SdUnoEventsAccess::replaceByName( const OUString& aName, const uno
continue;
}
}
- else if( !( nFound & FoundFlags::Library ) && pProperties->Name == maStrLibrary )
+ else if( !( nFound & FoundFlags::Library ) && pProperties->Name == gaStrLibrary )
{
if( pProperties->Value >>= aStrLibrary )
{
@@ -1223,7 +1208,7 @@ void SAL_CALL SdUnoEventsAccess::replaceByName( const OUString& aName, const uno
continue;
}
}
- else if( !( nFound & FoundFlags::Effect ) && pProperties->Name == maStrEffect )
+ else if( !( nFound & FoundFlags::Effect ) && pProperties->Name == gaStrEffect )
{
if( pProperties->Value >>= eEffect )
{
@@ -1231,7 +1216,7 @@ void SAL_CALL SdUnoEventsAccess::replaceByName( const OUString& aName, const uno
continue;
}
}
- else if( !( nFound & FoundFlags::Bookmark ) && pProperties->Name == maStrBookmark )
+ else if( !( nFound & FoundFlags::Bookmark ) && pProperties->Name == gaStrBookmark )
{
if( pProperties->Value >>= aStrBookmark )
{
@@ -1239,7 +1224,7 @@ void SAL_CALL SdUnoEventsAccess::replaceByName( const OUString& aName, const uno
continue;
}
}
- else if( !( nFound & FoundFlags::Speed ) && pProperties->Name == maStrSpeed )
+ else if( !( nFound & FoundFlags::Speed ) && pProperties->Name == gaStrSpeed )
{
if( pProperties->Value >>= eSpeed )
{
@@ -1247,7 +1232,7 @@ void SAL_CALL SdUnoEventsAccess::replaceByName( const OUString& aName, const uno
continue;
}
}
- else if( !( nFound & FoundFlags::SoundUrl ) && pProperties->Name == maStrSoundURL )
+ else if( !( nFound & FoundFlags::SoundUrl ) && pProperties->Name == gaStrSoundURL )
{
if( pProperties->Value >>= aStrSoundURL )
{
@@ -1255,7 +1240,7 @@ void SAL_CALL SdUnoEventsAccess::replaceByName( const OUString& aName, const uno
continue;
}
}
- else if( !( nFound & FoundFlags::PlayFull ) && pProperties->Name == maStrPlayFull )
+ else if( !( nFound & FoundFlags::PlayFull ) && pProperties->Name == gaStrPlayFull )
{
if( pProperties->Value >>= bPlayFull )
{
@@ -1263,7 +1248,7 @@ void SAL_CALL SdUnoEventsAccess::replaceByName( const OUString& aName, const uno
continue;
}
}
- else if( !( nFound & FoundFlags::Verb ) && pProperties->Name == maStrVerb )
+ else if( !( nFound & FoundFlags::Verb ) && pProperties->Name == gaStrVerb )
{
if( pProperties->Value >>= nVerb )
{
@@ -1281,7 +1266,7 @@ void SAL_CALL SdUnoEventsAccess::replaceByName( const OUString& aName, const uno
if( !( nFound & FoundFlags::EventType ) )
break;
- if( aStrEventType == maStrPresentation )
+ if( aStrEventType == gaStrPresentation )
{
if( !( nFound & FoundFlags::ClickAction ) )
break;
@@ -1436,7 +1421,7 @@ void SAL_CALL SdUnoEventsAccess::replaceByName( const OUString& aName, const uno
// XNameAccess
uno::Any SAL_CALL SdUnoEventsAccess::getByName( const OUString& aName )
{
- if( mpShape == nullptr || aName != maStrOnClick )
+ if( mpShape == nullptr || aName != gaStrOnClick )
throw container::NoSuchElementException();
SdAnimationInfo* pInfo = mpShape->GetAnimationInfo();
@@ -1486,15 +1471,15 @@ uno::Any SAL_CALL SdUnoEventsAccess::getByName( const OUString& aName )
if ( SfxApplication::IsXScriptURL( pInfo->GetBookmark() ) )
{
// Scripting Framework URL
- aAny <<= maStrScript;
- pProperties->Name = maStrEventType;
+ aAny <<= OUString(gaStrScript);
+ pProperties->Name = gaStrEventType;
pProperties->Handle = -1;
pProperties->Value = aAny;
pProperties->State = beans::PropertyState_DIRECT_VALUE;
pProperties++;
aAny <<= pInfo->GetBookmark();
- pProperties->Name = maStrScript;
+ pProperties->Name = gaStrScript;
pProperties->Handle = -1;
pProperties->Value = aAny;
pProperties->State = beans::PropertyState_DIRECT_VALUE;
@@ -1503,8 +1488,8 @@ uno::Any SAL_CALL SdUnoEventsAccess::getByName( const OUString& aName )
else
{
// Old Basic macro URL
- aAny <<= maStrStarBasic;
- pProperties->Name = maStrEventType;
+ aAny <<= OUString(gaStrStarBasic);
+ pProperties->Name = gaStrEventType;
pProperties->Handle = -1;
pProperties->Value = aAny;
pProperties->State = beans::PropertyState_DIRECT_VALUE;
@@ -1527,14 +1512,14 @@ uno::Any SAL_CALL SdUnoEventsAccess::getByName( const OUString& aName )
sBuffer.append( aMacroName );
aAny <<= sBuffer.makeStringAndClear();
- pProperties->Name = maStrMacroName;
+ pProperties->Name = gaStrMacroName;
pProperties->Handle = -1;
pProperties->Value = aAny;
pProperties->State = beans::PropertyState_DIRECT_VALUE;
pProperties++;
aAny <<= OUString( "StarOffice" );
- pProperties->Name = maStrLibrary;
+ pProperties->Name = gaStrLibrary;
pProperties->Handle = -1;
pProperties->Value = aAny;
pProperties->State = beans::PropertyState_DIRECT_VALUE;
@@ -1542,15 +1527,15 @@ uno::Any SAL_CALL SdUnoEventsAccess::getByName( const OUString& aName )
}
else
{
- aAny <<= maStrPresentation;
- pProperties->Name = maStrEventType;
+ aAny <<= OUString(gaStrPresentation);
+ pProperties->Name = gaStrEventType;
pProperties->Handle = -1;
pProperties->Value = aAny;
pProperties->State = beans::PropertyState_DIRECT_VALUE;
pProperties++;
aAny <<= eClickAction;
- pProperties->Name = maStrClickAction;
+ pProperties->Name = gaStrClickAction;
pProperties->Handle = -1;
pProperties->Value = aAny;
pProperties->State = beans::PropertyState_DIRECT_VALUE;
@@ -1569,7 +1554,7 @@ uno::Any SAL_CALL SdUnoEventsAccess::getByName( const OUString& aName )
case presentation::ClickAction_BOOKMARK:
{
const OUString aStrBookmark( getPageApiNameFromUiName( pInfo->GetBookmark()) );
- pProperties->Name = maStrBookmark;
+ pProperties->Name = gaStrBookmark;
pProperties->Handle = -1;
pProperties->Value <<= aStrBookmark;
pProperties->State = beans::PropertyState_DIRECT_VALUE;
@@ -1587,7 +1572,7 @@ uno::Any SAL_CALL SdUnoEventsAccess::getByName( const OUString& aName )
aURL += getPageApiNameFromUiName( aString.copy( nPos+1 ) );
aString = aURL;
}
- pProperties->Name = maStrBookmark;
+ pProperties->Name = gaStrBookmark;
pProperties->Handle = -1;
pProperties->Value <<= aString;
pProperties->State = beans::PropertyState_DIRECT_VALUE;
@@ -1596,14 +1581,14 @@ uno::Any SAL_CALL SdUnoEventsAccess::getByName( const OUString& aName )
case presentation::ClickAction_VANISH:
aAny <<= pInfo->meSecondEffect;
- pProperties->Name = maStrEffect;
+ pProperties->Name = gaStrEffect;
pProperties->Handle = -1;
pProperties->Value = aAny;
pProperties->State = beans::PropertyState_DIRECT_VALUE;
pProperties++;
aAny <<= pInfo->meSecondSpeed;
- pProperties->Name = maStrSpeed;
+ pProperties->Name = gaStrSpeed;
pProperties->Handle = -1;
pProperties->Value = aAny;
pProperties->State = beans::PropertyState_DIRECT_VALUE;
@@ -1615,13 +1600,13 @@ uno::Any SAL_CALL SdUnoEventsAccess::getByName( const OUString& aName )
if( eClickAction == presentation::ClickAction_SOUND || pInfo->mbSecondSoundOn )
{
aAny <<= pInfo->GetBookmark();
- pProperties->Name = maStrSoundURL;
+ pProperties->Name = gaStrSoundURL;
pProperties->Handle = -1;
pProperties->Value = aAny;
pProperties->State = beans::PropertyState_DIRECT_VALUE;
pProperties++;
- pProperties->Name = maStrPlayFull;
+ pProperties->Name = gaStrPlayFull;
pProperties->Handle = -1;
pProperties->Value <<= pInfo->mbSecondPlayFull;
pProperties->State = beans::PropertyState_DIRECT_VALUE;
@@ -1630,7 +1615,7 @@ uno::Any SAL_CALL SdUnoEventsAccess::getByName( const OUString& aName )
case presentation::ClickAction_VERB:
aAny <<= static_cast<sal_Int32>(pInfo->mnVerb);
- pProperties->Name = maStrVerb;
+ pProperties->Name = gaStrVerb;
pProperties->Handle = -1;
pProperties->Value = aAny;
pProperties->State = beans::PropertyState_DIRECT_VALUE;
@@ -1646,13 +1631,12 @@ uno::Any SAL_CALL SdUnoEventsAccess::getByName( const OUString& aName )
uno::Sequence< OUString > SAL_CALL SdUnoEventsAccess::getElementNames( )
{
- uno::Sequence< OUString > aStr( &maStrOnClick, 1 );
- return aStr;
+ return { gaStrOnClick };
}
sal_Bool SAL_CALL SdUnoEventsAccess::hasByName( const OUString& aName )
{
- return aName == maStrOnClick;
+ return aName == gaStrOnClick;
}
// XElementAccess
@@ -1679,8 +1663,7 @@ sal_Bool SAL_CALL SdUnoEventsAccess::supportsService( const OUString& ServiceNam
uno::Sequence< OUString > SAL_CALL SdUnoEventsAccess::getSupportedServiceNames( )
{
- uno::Sequence< OUString > aStr( &maStrServiceName, 1 );
- return aStr;
+ return { gaStrServiceName };
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/solenv/CompilerTest_compilerplugins_clang.mk b/solenv/CompilerTest_compilerplugins_clang.mk
index 499e33fe2faf..950bca605378 100644
--- a/solenv/CompilerTest_compilerplugins_clang.mk
+++ b/solenv/CompilerTest_compilerplugins_clang.mk
@@ -15,6 +15,7 @@ $(eval $(call gb_CompilerTest_add_exception_objects,compilerplugins_clang, \
compilerplugins/clang/test/casttovoid \
compilerplugins/clang/test/commaoperator \
compilerplugins/clang/test/constparams \
+ compilerplugins/clang/test/conststringfield \
compilerplugins/clang/test/convertlong \
compilerplugins/clang/test/cppunitassertequals \
compilerplugins/clang/test/cstylecast \
diff --git a/svtools/source/uno/unoevent.cxx b/svtools/source/uno/unoevent.cxx
index 4d6d4f130715..54582979066e 100644
--- a/svtools/source/uno/unoevent.cxx
+++ b/svtools/source/uno/unoevent.cxx
@@ -383,11 +383,9 @@ void SvEventDescriptor::getByName(
}
}
-
SvDetachedEventDescriptor::SvDetachedEventDescriptor(
const SvEventDescription* pSupportedMacroItems) :
- SvBaseEventDescriptor(pSupportedMacroItems),
- sImplName("SvDetachedEventDescriptor")
+ SvBaseEventDescriptor(pSupportedMacroItems)
{
aMacros.resize(mnMacroItems);
}
@@ -410,7 +408,7 @@ sal_Int16 SvDetachedEventDescriptor::getIndex(const SvMacroItemId nID) const
OUString SvDetachedEventDescriptor::getImplementationName()
{
- return sImplName;
+ return OUString("SvDetachedEventDescriptor");
}
diff --git a/svx/source/table/tablelayouter.cxx b/svx/source/table/tablelayouter.cxx
index 49d0cf9dfa65..bbca0cc47d30 100644
--- a/svx/source/table/tablelayouter.cxx
+++ b/svx/source/table/tablelayouter.cxx
@@ -51,10 +51,10 @@ namespace sdr { namespace table {
static SvxBorderLine gEmptyBorder;
+static const OUStringLiteral gsSize( "Size" );
TableLayouter::TableLayouter( const TableModelRef& xTableModel )
: mxTable( xTableModel )
-, msSize( "Size" )
{
}
@@ -572,7 +572,7 @@ void TableLayouter::LayoutTableWidth( tools::Rectangle& rArea, bool bFit )
}
else
{
- xColSet->getPropertyValue( msSize ) >>= nColWidth;
+ xColSet->getPropertyValue( gsSize ) >>= nColWidth;
}
maColumns[nCol].mnSize = nColWidth;
@@ -650,7 +650,7 @@ void TableLayouter::LayoutTableWidth( tools::Rectangle& rArea, bool bFit )
if( bFit )
{
Reference< XPropertySet > xColSet( xCols->getByIndex(nCol), UNO_QUERY_THROW );
- xColSet->setPropertyValue( msSize, Any( maColumns[nCol].mnSize ) );
+ xColSet->setPropertyValue( gsSize, Any( maColumns[nCol].mnSize ) );
}
}
@@ -732,7 +732,7 @@ void TableLayouter::LayoutTableHeight( tools::Rectangle& rArea, bool bFit )
}
else
{
- xRowSet->getPropertyValue( msSize ) >>= nRowHeight;
+ xRowSet->getPropertyValue( gsSize ) >>= nRowHeight;
}
maRows[nRow].mnSize = nRowHeight;
@@ -807,7 +807,7 @@ void TableLayouter::LayoutTableHeight( tools::Rectangle& rArea, bool bFit )
if( bFit )
{
Reference< XPropertySet > xRowSet( xRows->getByIndex(nRow), UNO_QUERY_THROW );
- xRowSet->setPropertyValue( msSize, Any( maRows[nRow].mnSize ) );
+ xRowSet->setPropertyValue( gsSize, Any( maRows[nRow].mnSize ) );
}
}
@@ -1070,7 +1070,7 @@ void TableLayouter::DistributeColumns( ::tools::Rectangle& rArea, sal_Int32 nFir
nWidth = nAllWidth; // last column get round errors
Reference< XPropertySet > xColSet( xCols->getByIndex( nCol ), UNO_QUERY_THROW );
- xColSet->setPropertyValue( msSize, Any( nWidth ) );
+ xColSet->setPropertyValue( gsSize, Any( nWidth ) );
nAllWidth -= nWidth;
}
@@ -1120,7 +1120,7 @@ void TableLayouter::DistributeRows( ::tools::Rectangle& rArea, sal_Int32 nFirstR
nHeight = nAllHeight; // last row get round errors
Reference< XPropertySet > xRowSet( xRows->getByIndex( nRow ), UNO_QUERY_THROW );
- xRowSet->setPropertyValue( msSize, Any( nHeight ) );
+ xRowSet->setPropertyValue( gsSize, Any( nHeight ) );
nAllHeight -= nHeight;
}
diff --git a/svx/source/table/tablelayouter.hxx b/svx/source/table/tablelayouter.hxx
index b664daa505c1..b411b5a48883 100644
--- a/svx/source/table/tablelayouter.hxx
+++ b/svx/source/table/tablelayouter.hxx
@@ -138,8 +138,6 @@ private:
BorderLineMap maHorizontalBorders;
BorderLineMap maVerticalBorders;
-
- const OUString msSize;
};
} }
diff --git a/svx/source/table/tablertfexporter.cxx b/svx/source/table/tablertfexporter.cxx
index 1cfaa372da6a..edd0ff610beb 100644
--- a/svx/source/table/tablertfexporter.cxx
+++ b/svx/source/table/tablertfexporter.cxx
@@ -60,7 +60,6 @@ private:
SvStream& mrStrm;
SdrTableObj& mrObj;
Reference< XTable > mxTable;
- const OUString msSize;
};
void SdrTableObj::ExportAsRTF( SvStream& rStrm, SdrTableObj& rObj )
@@ -69,11 +68,12 @@ void SdrTableObj::ExportAsRTF( SvStream& rStrm, SdrTableObj& rObj )
aEx.Write();
}
+static const OUStringLiteral gsSize( "Size" );
+
SdrTableRtfExporter::SdrTableRtfExporter( SvStream& rStrm, SdrTableObj& rObj )
: mrStrm( rStrm )
, mrObj( rObj )
, mxTable( rObj.getTable() )
-, msSize( "Size" )
{
}
@@ -100,7 +100,7 @@ void SdrTableRtfExporter::Write()
{
Reference< XPropertySet > xSet( xColumns->getByIndex(nCol), UNO_QUERY_THROW );
sal_Int32 nWidth = 0;
- xSet->getPropertyValue( msSize ) >>= nWidth;
+ xSet->getPropertyValue( gsSize ) >>= nWidth;
nPos += HundMMToTwips( nWidth );
aColumnStart.push_back( nPos );
}
@@ -129,7 +129,7 @@ void SdrTableRtfExporter::Write()
void SdrTableRtfExporter::WriteRow( const Reference< XPropertySet >& xRowSet, sal_Int32 nRow, const std::vector< sal_Int32 >& aColumnStart )
{
sal_Int32 nRowHeight = 0;
- xRowSet->getPropertyValue( msSize ) >>= nRowHeight;
+ xRowSet->getPropertyValue( gsSize ) >>= nRowHeight;
mrStrm.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_TROWD ).WriteCharPtr( OOO_STRING_SVTOOLS_RTF_TRGAPH ).WriteCharPtr( "30" ).WriteCharPtr( OOO_STRING_SVTOOLS_RTF_TRLEFT ).WriteCharPtr( "-30" );
mrStrm.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_TRRH ).WriteCharPtr( OString::number(nRowHeight).getStr() );
diff --git a/svx/source/tbxctrls/extrusioncontrols.cxx b/svx/source/tbxctrls/extrusioncontrols.cxx
index 69f26bcfb673..438aa466b89c 100644
--- a/svx/source/tbxctrls/extrusioncontrols.cxx
+++ b/svx/source/tbxctrls/extrusioncontrols.cxx
@@ -360,6 +360,9 @@ double ExtrusionDepthDialog::getDepth() const
double const aDepthListInch[] = { 0, 1270,2540,5080,10160 };
double const aDepthListMM[] = { 0, 1000, 2500, 5000, 10000 };
+static const OUStringLiteral gsExtrusionDepth( ".uno:ExtrusionDepth" );
+static const OUStringLiteral gsMetricUnit( ".uno:MetricUnit" );
+
ExtrusionDepthWindow::ExtrusionDepthWindow(
svt::ToolboxController& rController,
vcl::Window* pParentWindow
@@ -367,8 +370,6 @@ ExtrusionDepthWindow::ExtrusionDepthWindow(
, mrController( rController )
, meUnit(FUNIT_NONE)
, mfDepth( -1.0 )
- , msExtrusionDepth( ".uno:ExtrusionDepth" )
- , msMetricUnit( ".uno:MetricUnit" )
{
SetSelectHdl( LINK( this, ExtrusionDepthWindow, SelectHdl ) );
@@ -389,8 +390,8 @@ ExtrusionDepthWindow::ExtrusionDepthWindow(
SetOutputSizePixel( getMenuSize() );
- AddStatusListener( msExtrusionDepth );
- AddStatusListener( msMetricUnit );
+ AddStatusListener( gsExtrusionDepth );
+ AddStatusListener( gsMetricUnit );
}
void ExtrusionDepthWindow::implSetDepth( double fDepth )
@@ -447,7 +448,7 @@ void ExtrusionDepthWindow::statusChanged(
const css::frame::FeatureStateEvent& Event
)
{
- if( Event.FeatureURL.Main == msExtrusionDepth )
+ if( Event.FeatureURL.Main == gsExtrusionDepth )
{
if( !Event.IsEnabled )
{
@@ -460,7 +461,7 @@ void ExtrusionDepthWindow::statusChanged(
implSetDepth( fValue );
}
}
- else if( Event.FeatureURL.Main == msMetricUnit )
+ else if( Event.FeatureURL.Main == gsMetricUnit )
{
if( Event.IsEnabled )
{
@@ -509,10 +510,10 @@ IMPL_LINK_NOARG(ExtrusionDepthWindow, SelectHdl, ToolbarMenu*, void)
}
Sequence< PropertyValue > aArgs( 1 );
- aArgs[0].Name = msExtrusionDepth.copy(5);
+ aArgs[0].Name = OUString(gsExtrusionDepth).copy(5);
aArgs[0].Value <<= fDepth;
- mrController.dispatchCommand( msExtrusionDepth, aArgs );
+ mrController.dispatchCommand( gsExtrusionDepth, aArgs );
implSetDepth( fDepth );
if ( IsInPopupMode() )
diff --git a/svx/source/tbxctrls/extrusioncontrols.hxx b/svx/source/tbxctrls/extrusioncontrols.hxx
index eec41088e312..2f0d58c1c3b0 100644
--- a/svx/source/tbxctrls/extrusioncontrols.hxx
+++ b/svx/source/tbxctrls/extrusioncontrols.hxx
@@ -107,8 +107,6 @@ private:
svt::ToolboxController& mrController;
FieldUnit meUnit;
double mfDepth;
- const OUString msExtrusionDepth;
- const OUString msMetricUnit;
DECL_LINK( SelectHdl, ToolbarMenu*, void );
diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx
index f29a4bbe33d5..e5e40c9e06a8 100644
--- a/svx/source/tbxctrls/fontworkgallery.cxx
+++ b/svx/source/tbxctrls/fontworkgallery.cxx
@@ -283,17 +283,16 @@ public:
private:
svt::ToolboxController& mrController;
- const OUString msFontworkAlignment;
-
DECL_LINK( SelectHdl, ToolbarMenu*, void );
void implSetAlignment( int nAlignmentMode, bool bEnabled );
};
+static const OUStringLiteral gsFontworkAlignment(".uno:FontworkAlignment");
+
FontworkAlignmentWindow::FontworkAlignmentWindow(svt::ToolboxController& rController, vcl::Window* pParentWindow)
: ToolbarMenu(rController.getFrameInterface(), pParentWindow, WB_STDPOPUP)
, mrController(rController)
- , msFontworkAlignment(".uno:FontworkAlignment")
{
SetSelectHdl( LINK( this, FontworkAlignmentWindow, SelectHdl ) );
@@ -311,7 +310,7 @@ FontworkAlignmentWindow::FontworkAlignmentWindow(svt::ToolboxController& rContro
SetOutputSizePixel( getMenuSize() );
- AddStatusListener( msFontworkAlignment );
+ AddStatusListener( gsFontworkAlignment );
}
void FontworkAlignmentWindow::implSetAlignment( int nSurface, bool bEnabled )
@@ -326,7 +325,7 @@ void FontworkAlignmentWindow::implSetAlignment( int nSurface, bool bEnabled )
void FontworkAlignmentWindow::statusChanged( const css::frame::FeatureStateEvent& Event )
{
- if( Event.FeatureURL.Main == msFontworkAlignment )
+ if( Event.FeatureURL.Main == gsFontworkAlignment )
{
if( !Event.IsEnabled )
{
@@ -350,10 +349,10 @@ IMPL_LINK_NOARG(FontworkAlignmentWindow, SelectHdl, ToolbarMenu*, void)
if( nAlignment >= 0 )
{
Sequence< PropertyValue > aArgs( 1 );
- aArgs[0].Name = msFontworkAlignment.copy(5);
+ aArgs[0].Name = OUString(gsFontworkAlignment).copy(5);
aArgs[0].Value <<= nAlignment;
- mrController.dispatchCommand( msFontworkAlignment, aArgs );
+ mrController.dispatchCommand( gsFontworkAlignment, aArgs );
implSetAlignment( nAlignment, true );
}
@@ -433,21 +432,18 @@ public:
private:
svt::ToolboxController& mrController;
- const OUString msFontworkCharacterSpacing;
- const OUString msFontworkKernCharacterPairs;
-
DECL_LINK( SelectHdl, ToolbarMenu*, void );
void implSetCharacterSpacing( sal_Int32 nCharacterSpacing, bool bEnabled );
void implSetKernCharacterPairs( bool bEnabled );
};
+static const OUStringLiteral gsFontworkCharacterSpacing(".uno:FontworkCharacterSpacing");
+static const OUStringLiteral gsFontworkKernCharacterPairs(".uno:FontworkKernCharacterPairs");
FontworkCharacterSpacingWindow::FontworkCharacterSpacingWindow(svt::ToolboxController& rController, vcl::Window* pParentWindow)
: ToolbarMenu(rController.getFrameInterface(), pParentWindow, WB_STDPOPUP)
, mrController(rController)
- , msFontworkCharacterSpacing(".uno:FontworkCharacterSpacing")
- , msFontworkKernCharacterPairs(".uno:FontworkKernCharacterPairs")
{
SetSelectHdl( LINK( this, FontworkCharacterSpacingWindow, SelectHdl ) );
@@ -462,8 +458,8 @@ FontworkCharacterSpacingWindow::FontworkCharacterSpacingWindow(svt::ToolboxContr
SetOutputSizePixel( getMenuSize() );
- AddStatusListener( msFontworkCharacterSpacing );
- AddStatusListener( msFontworkKernCharacterPairs );
+ AddStatusListener( gsFontworkCharacterSpacing );
+ AddStatusListener( gsFontworkKernCharacterPairs );
}
void FontworkCharacterSpacingWindow::implSetCharacterSpacing( sal_Int32 nCharacterSpacing, bool bEnabled )
@@ -500,7 +496,7 @@ void FontworkCharacterSpacingWindow::implSetKernCharacterPairs( bool bEnabled )
void FontworkCharacterSpacingWindow::statusChanged( const css::frame::FeatureStateEvent& Event )
{
- if( Event.FeatureURL.Main == msFontworkCharacterSpacing )
+ if( Event.FeatureURL.Main == gsFontworkCharacterSpacing )
{
if( !Event.IsEnabled )
{
@@ -513,7 +509,7 @@ void FontworkCharacterSpacingWindow::statusChanged( const css::frame::FeatureSta
implSetCharacterSpacing( nValue, true );
}
}
- else if( Event.FeatureURL.Main == msFontworkKernCharacterPairs )
+ else if( Event.FeatureURL.Main == gsFontworkKernCharacterPairs )
{
if( !Event.IsEnabled )
{
@@ -548,7 +544,7 @@ IMPL_LINK_NOARG(FontworkCharacterSpacingWindow, SelectHdl,ToolbarMenu*, void)
if ( nSelection == 5 ) // custom spacing
{
Sequence< PropertyValue > aArgs( 1 );
- aArgs[0].Name = msFontworkCharacterSpacing.copy(5);
+ aArgs[0].Name = OUString(gsFontworkCharacterSpacing).copy(5);
aArgs[0].Value <<= nCharacterSpacing;
mrController.dispatchCommand( ".uno:FontworkCharacterSpacingDialog", aArgs );
@@ -556,20 +552,20 @@ IMPL_LINK_NOARG(FontworkCharacterSpacingWindow, SelectHdl,ToolbarMenu*, void)
else if ( nSelection == 6 ) // KernCharacterPairs
{
Sequence< PropertyValue > aArgs( 1 );
- aArgs[0].Name = msFontworkKernCharacterPairs.copy(5);
+ aArgs[0].Name = OUString(gsFontworkKernCharacterPairs).copy(5);
aArgs[0].Value <<= true;
- mrController.dispatchCommand( msFontworkKernCharacterPairs, aArgs );
+ mrController.dispatchCommand( gsFontworkKernCharacterPairs, aArgs );
implSetKernCharacterPairs( true );
}
else if( nSelection >= 0 )
{
Sequence< PropertyValue > aArgs( 1 );
- aArgs[0].Name = msFontworkCharacterSpacing.copy(5);
+ aArgs[0].Name = OUString(gsFontworkCharacterSpacing).copy(5);
aArgs[0].Value <<= nCharacterSpacing;
- mrController.dispatchCommand( msFontworkCharacterSpacing, aArgs );
+ mrController.dispatchCommand( gsFontworkCharacterSpacing, aArgs );
implSetCharacterSpacing( nCharacterSpacing, true );
}
diff --git a/svx/source/xml/xmleohlp.cxx b/svx/source/xml/xmleohlp.cxx
index b3859a92acfd..03cb04a7b17b 100644
--- a/svx/source/xml/xmleohlp.cxx
+++ b/svx/source/xml/xmleohlp.cxx
@@ -120,10 +120,11 @@ void SAL_CALL OutputStorageWrapper_Impl::closeOutput()
bStreamClosed = true;
}
+static const OUStringLiteral gaReplacementGraphicsContainerStorageName( XML_CONTAINERSTORAGE_NAME );
+static const OUStringLiteral gaReplacementGraphicsContainerStorageName60( XML_CONTAINERSTORAGE_NAME_60 );
+
SvXMLEmbeddedObjectHelper::SvXMLEmbeddedObjectHelper() :
WeakComponentImplHelper< XEmbeddedObjectResolver, XNameAccess >( maMutex ),
- maReplacementGraphicsContainerStorageName( XML_CONTAINERSTORAGE_NAME ),
- maReplacementGraphicsContainerStorageName60( XML_CONTAINERSTORAGE_NAME_60 ),
mpDocPersist( nullptr ),
meCreateMode( SvXMLEmbeddedObjectHelperMode::Read ),
mpStreamMap( nullptr )
@@ -132,8 +133,6 @@ SvXMLEmbeddedObjectHelper::SvXMLEmbeddedObjectHelper() :
SvXMLEmbeddedObjectHelper::SvXMLEmbeddedObjectHelper( ::comphelper::IEmbeddedHelper& rDocPersist, SvXMLEmbeddedObjectHelperMode eCreateMode ) :
WeakComponentImplHelper< XEmbeddedObjectResolver, XNameAccess >( maMutex ),
- maReplacementGraphicsContainerStorageName( XML_CONTAINERSTORAGE_NAME ),
- maReplacementGraphicsContainerStorageName60( XML_CONTAINERSTORAGE_NAME_60 ),
mpDocPersist( nullptr ),
meCreateMode( SvXMLEmbeddedObjectHelperMode::Read ),
mpStreamMap( nullptr )
@@ -282,8 +281,8 @@ bool SvXMLEmbeddedObjectHelper::ImplGetStorageNames(
bool bOASIS = mxRootStorage.is() &&
( SotStorage::GetVersion( mxRootStorage ) > SOFFICE_FILEFORMAT_60 );
rContainerStorageName = bOASIS
- ? maReplacementGraphicsContainerStorageName
- : maReplacementGraphicsContainerStorageName60;
+ ? gaReplacementGraphicsContainerStorageName
+ : gaReplacementGraphicsContainerStorageName60;
if( pGraphicRepl )
*pGraphicRepl = true;
diff --git a/sw/source/filter/xml/xmltexte.cxx b/sw/source/filter/xml/xmltexte.cxx
index 5775a3343257..977690a82729 100644
--- a/sw/source/filter/xml/xmltexte.cxx
+++ b/sw/source/filter/xml/xmltexte.cxx
@@ -75,11 +75,12 @@ SwNoTextNode *SwXMLTextParagraphExport::GetNoTextNode(
return pNdIdx->GetNodes()[pNdIdx->GetIndex() + 1]->GetNoTextNode();
}
+static const OUStringLiteral gsEmbeddedObjectProtocol( "vnd.sun.star.EmbeddedObject:" );
+
SwXMLTextParagraphExport::SwXMLTextParagraphExport(
SwXMLExport& rExp,
SvXMLAutoStylePoolP& _rAutoStylePool ) :
XMLTextParagraphExport( rExp, _rAutoStylePool ),
- sEmbeddedObjectProtocol( "vnd.sun.star.EmbeddedObject:" ),
aAppletClassId( SO3_APPLET_CLASSID ),
aPluginClassId( SO3_PLUGIN_CLASSID ),
aIFrameClassId( SO3_IFRAME_CLASSID )
@@ -277,9 +278,9 @@ void SwXMLTextParagraphExport::_exportTextEmbedded(
// First the stuff common to each of Applet/Plugin/Floating Frame
OUString sStyle;
Any aAny;
- if( rPropSetInfo->hasPropertyByName( sFrameStyleName ) )
+ if( rPropSetInfo->hasPropertyByName( gsFrameStyleName ) )
{
- aAny = rPropSet->getPropertyValue( sFrameStyleName );
+ aAny = rPropSet->getPropertyValue( gsFrameStyleName );
aAny >>= sStyle;
}
@@ -344,7 +345,7 @@ void SwXMLTextParagraphExport::_exportTextEmbedded(
if ( !bIsOwnLink )
{
- sURL = sEmbeddedObjectProtocol + rOLEObj.GetCurrentPersistName();
+ sURL = gsEmbeddedObjectProtocol + rOLEObj.GetCurrentPersistName();
}
sURL = GetExport().AddEmbeddedObject( sURL );
@@ -496,7 +497,7 @@ void SwXMLTextParagraphExport::_exportTextEmbedded(
case SV_EMBEDDED_OUTPLACE:
if( rXMLExport.getExportFlags() & SvXMLExportFlags::EMBEDDED )
{
- OUString sURL( sEmbeddedObjectProtocol + rOLEObj.GetCurrentPersistName() );
+ OUString sURL( gsEmbeddedObjectProtocol + rOLEObj.GetCurrentPersistName() );
if ( !( rXMLExport.getExportFlags() & SvXMLExportFlags::OASIS ) )
sURL += "?oasis=false";
diff --git a/sw/source/filter/xml/xmltexte.hxx b/sw/source/filter/xml/xmltexte.hxx
index 38d0d2bdd02e..8da021506c0d 100644
--- a/sw/source/filter/xml/xmltexte.hxx
+++ b/sw/source/filter/xml/xmltexte.hxx
@@ -34,8 +34,6 @@ namespace com { namespace sun { namespace star { namespace style {
class SwXMLTextParagraphExport : public XMLTextParagraphExport
{
- const OUString sEmbeddedObjectProtocol;
-
const SvGlobalName aAppletClassId;
const SvGlobalName aPluginClassId;
const SvGlobalName aIFrameClassId;
diff --git a/ucb/source/ucp/file/bc.cxx b/ucb/source/ucp/file/bc.cxx
index f42cdf84fd76..d72191b7c144 100644
--- a/ucb/source/ucp/file/bc.cxx
+++ b/ucb/source/ucp/file/bc.cxx
@@ -457,9 +457,9 @@ BaseContent::getContentType()
if( m_nState & JustInserted )
{
if ( m_bFolder )
- return m_pMyShell->FolderContentType;
+ return TaskManager::FolderContentType;
else
- return m_pMyShell->FileContentType;
+ return TaskManager::FileContentType;
}
else
{
@@ -477,9 +477,9 @@ BaseContent::getContentType()
if ( !xRow->wasNull() )
{
if ( IsDocument )
- return m_pMyShell->FileContentType;
+ return TaskManager::FileContentType;
else
- return m_pMyShell->FolderContentType;
+ return TaskManager::FolderContentType;
}
else
{
@@ -569,10 +569,10 @@ BaseContent::createNewContent( const ContentInfo& Info )
if ( Info.Type.isEmpty() )
return Reference< XContent >();
- bool bFolder = Info.Type == m_pMyShell->FolderContentType;
+ bool bFolder = Info.Type == TaskManager::FolderContentType;
if ( !bFolder )
{
- if ( Info.Type != m_pMyShell->FileContentType )
+ if ( Info.Type != TaskManager::FileContentType )
{
// Neither folder nor file to create!
return Reference< XContent >();
@@ -733,8 +733,8 @@ BaseContent::getPropertyValues(
if ( rProp.Name == "ContentType" )
{
- rValue <<= m_bFolder ? m_pMyShell->FolderContentType
- : m_pMyShell->FileContentType;
+ rValue <<= OUString(m_bFolder ? TaskManager::FolderContentType
+ : TaskManager::FileContentType);
}
else if ( rProp.Name == "IsFolder" )
{
diff --git a/ucb/source/ucp/file/filtask.cxx b/ucb/source/ucp/file/filtask.cxx
index 4ae6cc06e15a..474942bb6040 100644
--- a/ucb/source/ucp/file/filtask.cxx
+++ b/ucb/source/ucp/file/filtask.cxx
@@ -116,28 +116,31 @@ TaskManager::MyProperty::~MyProperty()
#include "filinl.hxx"
+ // Default properties
+
+static const OUStringLiteral Title( "Title" );
+static const OUStringLiteral CasePreservingURL( "CasePreservingURL" );
+static const OUStringLiteral IsDocument( "IsDocument" );
+static const OUStringLiteral IsFolder( "IsFolder" );
+static const OUStringLiteral DateModified( "DateModified" );
+static const OUStringLiteral Size( "Size" );
+static const OUStringLiteral IsVolume( "IsVolume" );
+static const OUStringLiteral IsRemoveable( "IsRemoveable" );
+static const OUStringLiteral IsRemote( "IsRemote" );
+static const OUStringLiteral IsCompactDisc( "IsCompactDisc" );
+static const OUStringLiteral IsFloppy( "IsFloppy" );
+static const OUStringLiteral IsHidden( "IsHidden" );
+static const OUStringLiteral ContentType( "ContentType" );
+static const OUStringLiteral IsReadOnly( "IsReadOnly" );
+static const OUStringLiteral CreatableContentsInfo( "CreatableContentsInfo" );
+const OUStringLiteral TaskManager::FolderContentType( "application/vnd.sun.staroffice.fsys-folder" );
+const OUStringLiteral TaskManager::FileContentType( "application/vnd.sun.staroffice.fsys-file" );
+
TaskManager::TaskManager( const uno::Reference< uno::XComponentContext >& rxContext,
FileProvider* pProvider, bool bWithConfig )
: m_nCommandId( 0 ),
m_pProvider( pProvider ),
m_xContext( rxContext ),
- Title( "Title" ),
- CasePreservingURL( "CasePreservingURL" ),
- IsDocument( "IsDocument" ),
- IsFolder( "IsFolder" ),
- DateModified( "DateModified" ),
- Size( "Size" ),
- IsVolume( "IsVolume" ),
- IsRemoveable( "IsRemoveable" ),
- IsRemote( "IsRemote" ),
- IsCompactDisc( "IsCompactDisc" ),
- IsFloppy( "IsFloppy" ),
- IsHidden( "IsHidden" ),
- ContentType( "ContentType" ),
- IsReadOnly( "IsReadOnly" ),
- CreatableContentsInfo( "CreatableContentsInfo" ),
- FolderContentType( "application/vnd.sun.staroffice.fsys-folder" ),
- FileContentType( "application/vnd.sun.staroffice.fsys-file" ),
m_sCommandInfo( 9 )
{
// Title
diff --git a/ucb/source/ucp/file/filtask.hxx b/ucb/source/ucp/file/filtask.hxx
index d50400f082de..6b151c2d45f3 100644
--- a/ucb/source/ucp/file/filtask.hxx
+++ b/ucb/source/ucp/file/filtask.hxx
@@ -645,28 +645,11 @@ namespace fileaccess
// General
ContentMap m_aContent;
- // Default properties
-
- const OUString Title;
- const OUString CasePreservingURL;
- const OUString IsDocument;
- const OUString IsFolder;
- const OUString DateModified;
- const OUString Size;
- const OUString IsVolume;
- const OUString IsRemoveable;
- const OUString IsRemote;
- const OUString IsCompactDisc;
- const OUString IsFloppy;
- const OUString IsHidden;
- const OUString ContentType;
- const OUString IsReadOnly;
- const OUString CreatableContentsInfo;
public:
- const OUString FolderContentType;
- const OUString FileContentType;
+ static const OUStringLiteral FolderContentType;
+ static const OUStringLiteral FileContentType;
private:
diff --git a/vbahelper/source/vbahelper/vbaglobalbase.cxx b/vbahelper/source/vbahelper/vbaglobalbase.cxx
index cc0f22c107c5..6e56cc19fea1 100644
--- a/vbahelper/source/vbahelper/vbaglobalbase.cxx
+++ b/vbahelper/source/vbahelper/vbaglobalbase.cxx
@@ -31,13 +31,13 @@ using namespace ooo::vba;
// special key to return the Application
const char sAppService[] = "ooo.vba.Application";
+static const OUStringLiteral gsApplication( "Application" );
VbaGlobalsBase::VbaGlobalsBase(
const uno::Reference< ov::XHelperInterface >& xParent,
const uno::Reference< uno::XComponentContext >& xContext, const OUString& sDocCtxName )
: Globals_BASE( xParent, xContext )
, msDocCtxName( sDocCtxName )
- , msApplication( "Application" )
{
// overwrite context with custom one ( that contains the application )
// wrap the service manager as we don't want the disposing context to tear down the 'normal' ServiceManager ( or at least that's what the code appears like it wants to do )
@@ -49,7 +49,7 @@ const uno::Reference< uno::XComponentContext >& xContext, const OUString& sDocCt
::cppu::ContextEntry_Init aHandlerContextInfo[] =
{
- ::cppu::ContextEntry_Init( msApplication, uno::Any() ),
+ ::cppu::ContextEntry_Init( gsApplication, uno::Any() ),
::cppu::ContextEntry_Init( sDocCtxName, uno::Any() ),
::cppu::ContextEntry_Init( "/singletons/com.sun.star.lang.theServiceManager" , uno::makeAny( aSrvMgr ) )
};
@@ -91,7 +91,7 @@ VbaGlobalsBase::~VbaGlobalsBase()
// release document reference (we don't want the component context trying to dispose that)
xNameContainer->removeByName( msDocCtxName );
// release application reference, as it is holding onto the context
- xNameContainer->removeByName( msApplication );
+ xNameContainer->removeByName( gsApplication );
}
}
catch ( const uno::Exception& )
@@ -106,9 +106,9 @@ VbaGlobalsBase::init( const uno::Sequence< beans::PropertyValue >& aInitArgs )
for ( sal_Int32 nIndex = 0; nIndex < nLen; ++nIndex )
{
uno::Reference< container::XNameContainer > xNameContainer( mxContext, uno::UNO_QUERY_THROW );
- if ( aInitArgs[ nIndex ].Name == msApplication )
+ if ( aInitArgs[ nIndex ].Name == gsApplication )
{
- xNameContainer->replaceByName( msApplication, aInitArgs[ nIndex ].Value );
+ xNameContainer->replaceByName( gsApplication, aInitArgs[ nIndex ].Value );
uno::Reference< XHelperInterface > xParent( aInitArgs[ nIndex ].Value, uno::UNO_QUERY );
mxParent = xParent;
}
@@ -125,7 +125,7 @@ VbaGlobalsBase::createInstance( const OUString& aServiceSpecifier )
{
// try to extract the Application from the context
uno::Reference< container::XNameContainer > xNameContainer( mxContext, uno::UNO_QUERY );
- xNameContainer->getByName( msApplication ) >>= xReturn;
+ xNameContainer->getByName( gsApplication ) >>= xReturn;
}
else if ( hasServiceName( aServiceSpecifier ) )
xReturn = mxContext->getServiceManager()->createInstanceWithContext( aServiceSpecifier, mxContext );
@@ -141,7 +141,7 @@ VbaGlobalsBase::createInstanceWithArguments( const OUString& aServiceSpecifier,
{
// try to extract the Application from the context
uno::Reference< container::XNameContainer > xNameContainer( mxContext, uno::UNO_QUERY );
- xNameContainer->getByName( msApplication ) >>= xReturn;
+ xNameContainer->getByName( gsApplication ) >>= xReturn;
}
else if ( hasServiceName( aServiceSpecifier ) )
xReturn = mxContext->getServiceManager()->createInstanceWithArgumentsAndContext( aServiceSpecifier, Arguments, mxContext );
diff --git a/xmloff/inc/XMLFootnoteConfigurationImportContext.hxx b/xmloff/inc/XMLFootnoteConfigurationImportContext.hxx
index 096714d33fdc..6d48f6bc4f18 100644
--- a/xmloff/inc/XMLFootnoteConfigurationImportContext.hxx
+++ b/xmloff/inc/XMLFootnoteConfigurationImportContext.hxx
@@ -33,19 +33,6 @@ class SvXMLImport;
/// import footnote and endnote configuration elements
class XMLFootnoteConfigurationImportContext : public SvXMLStyleContext
{
- const OUString sPropertyAnchorCharStyleName;
- const OUString sPropertyCharStyleName;
- const OUString sPropertyNumberingType;
- const OUString sPropertyPageStyleName;
- const OUString sPropertyParagraphStyleName;
- const OUString sPropertyPrefix;
- const OUString sPropertyStartAt;
- const OUString sPropertySuffix;
- const OUString sPropertyPositionEndOfDoc;
- const OUString sPropertyFootnoteCounting;
- const OUString sPropertyEndNotice;
- const OUString sPropertyBeginNotice;
-
OUString sCitationStyle;
OUString sAnchorStyle;
OUString sDefaultStyle;
diff --git a/xmloff/inc/XMLImageMapContext.hxx b/xmloff/inc/XMLImageMapContext.hxx
index 646b707b0d02..165c0f0e6765 100644
--- a/xmloff/inc/XMLImageMapContext.hxx
+++ b/xmloff/inc/XMLImageMapContext.hxx
@@ -33,8 +33,6 @@ namespace com { namespace sun { namespace star {
class XMLImageMapContext : public SvXMLImportContext
{
- const OUString sImageMap;
-
/// the image map to be imported
css::uno::Reference< css::container::XIndexContainer> xImageMap;
diff --git a/xmloff/inc/XMLImageMapExport.hxx b/xmloff/inc/XMLImageMapExport.hxx
index 9351682dbee1..507adce612c9 100644
--- a/xmloff/inc/XMLImageMapExport.hxx
+++ b/xmloff/inc/XMLImageMapExport.hxx
@@ -35,18 +35,6 @@ class SvXMLExport;
*/
class XMLImageMapExport
{
- const OUString msBoundary;
- const OUString msCenter;
- const OUString msDescription;
- const OUString msImageMap;
- const OUString msIsActive;
- const OUString msName;
- const OUString msPolygon;
- const OUString msRadius;
- const OUString msTarget;
- const OUString msURL;
- const OUString msTitle;
-
SvXMLExport& mrExport;
public:
diff --git a/xmloff/inc/XMLIndexBibliographyConfigurationContext.hxx b/xmloff/inc/XMLIndexBibliographyConfigurationContext.hxx
index 40845cb94c88..563a0b904a2d 100644
--- a/xmloff/inc/XMLIndexBibliographyConfigurationContext.hxx
+++ b/xmloff/inc/XMLIndexBibliographyConfigurationContext.hxx
@@ -43,17 +43,6 @@ namespace com { namespace sun { namespace star {
*/
class XMLIndexBibliographyConfigurationContext : public SvXMLStyleContext
{
- const OUString sFieldMaster_Bibliography;
- const OUString sBracketBefore;
- const OUString sBracketAfter;
- const OUString sIsNumberEntries;
- const OUString sIsSortByPosition;
- const OUString sSortKeys;
- const OUString sSortKey;
- const OUString sIsSortAscending;
- const OUString sSortAlgorithm;
- const OUString sLocale;
-
OUString sSuffix;
OUString sPrefix;
OUString sAlgorithm;
diff --git a/xmloff/inc/XMLLineNumberingImportContext.hxx b/xmloff/inc/XMLLineNumberingImportContext.hxx
index 3216070020ef..e9ca1185c5bd 100644
--- a/xmloff/inc/XMLLineNumberingImportContext.hxx
+++ b/xmloff/inc/XMLLineNumberingImportContext.hxx
@@ -50,18 +50,6 @@ enum LineNumberingToken
/** import <text:linenumbering-configuration> elements */
class XMLLineNumberingImportContext : public SvXMLStyleContext
{
- const OUString sCharStyleName;
- const OUString sCountEmptyLines;
- const OUString sCountLinesInFrames;
- const OUString sDistance;
- const OUString sInterval;
- const OUString sSeparatorText;
- const OUString sNumberPosition;
- const OUString sNumberingType;
- const OUString sIsOn;
- const OUString sRestartAtEachPage;
- const OUString sSeparatorInterval;
-
OUString sStyleName;
OUString sNumFormat;
OUString sNumLetterSync;
diff --git a/xmloff/inc/XMLScriptContextFactory.hxx b/xmloff/inc/XMLScriptContextFactory.hxx
index 8372e3a7c1ad..07027dcf16cd 100644
--- a/xmloff/inc/XMLScriptContextFactory.hxx
+++ b/xmloff/inc/XMLScriptContextFactory.hxx
@@ -32,10 +32,6 @@ class XMLEventsImportContext;
class XMLScriptContextFactory : public XMLEventContextFactory
{
- const OUString sEventType;
- const OUString sScript;
- const OUString sURL;
-
public:
XMLScriptContextFactory();
virtual ~XMLScriptContextFactory() override;
diff --git a/xmloff/inc/XMLScriptExportHandler.hxx b/xmloff/inc/XMLScriptExportHandler.hxx
index 54d6861ad788..e232376fe752 100644
--- a/xmloff/inc/XMLScriptExportHandler.hxx
+++ b/xmloff/inc/XMLScriptExportHandler.hxx
@@ -33,8 +33,6 @@ namespace com { namespace sun { namespace star {
class XMLScriptExportHandler : public XMLEventExportHandler
{
- const OUString sURL;
-
public:
XMLScriptExportHandler();
virtual ~XMLScriptExportHandler() override;
diff --git a/xmloff/inc/XMLStarBasicContextFactory.hxx b/xmloff/inc/XMLStarBasicContextFactory.hxx
index aa46454a071d..5ac877eacb69 100644
--- a/xmloff/inc/XMLStarBasicContextFactory.hxx
+++ b/xmloff/inc/XMLStarBasicContextFactory.hxx
@@ -33,11 +33,6 @@ class XMLEventsImportContext;
class XMLStarBasicContextFactory : public XMLEventContextFactory
{
- const OUString sEventType;
- const OUString sLibrary;
- const OUString sMacroName;
- const OUString sStarBasic;
-
public:
XMLStarBasicContextFactory();
virtual ~XMLStarBasicContextFactory() override;
diff --git a/xmloff/inc/XMLStarBasicExportHandler.hxx b/xmloff/inc/XMLStarBasicExportHandler.hxx
index f0e5e01714b5..de909e0d24eb 100644
--- a/xmloff/inc/XMLStarBasicExportHandler.hxx
+++ b/xmloff/inc/XMLStarBasicExportHandler.hxx
@@ -33,12 +33,6 @@ namespace com { namespace sun { namespace star {
class XMLStarBasicExportHandler : public XMLEventExportHandler
{
- const OUString sStarBasic;
- const OUString sLibrary;
- const OUString sMacroName;
- const OUString sStarOffice;
- const OUString sApplication;
-
public:
XMLStarBasicExportHandler();
virtual ~XMLStarBasicExportHandler() override;
diff --git a/xmloff/inc/XMLTextColumnsContext.hxx b/xmloff/inc/XMLTextColumnsContext.hxx
index fdc969b3e2e1..0aaa16866a73 100644
--- a/xmloff/inc/XMLTextColumnsContext.hxx
+++ b/xmloff/inc/XMLTextColumnsContext.hxx
@@ -32,15 +32,6 @@ typedef std::vector<rtl::Reference<XMLTextColumnContext_Impl>> XMLTextColumnsArr
class XMLTextColumnsContext :public XMLElementPropertyContext
{
- const OUString sSeparatorLineIsOn;
- const OUString sSeparatorLineWidth;
- const OUString sSeparatorLineColor;
- const OUString sSeparatorLineRelativeHeight;
- const OUString sSeparatorLineVerticalAlignment;
- const OUString sAutomaticDistance;
- const OUString sSeparatorLineStyle;
-
-
std::unique_ptr<XMLTextColumnsArray_Impl> pColumns;
rtl::Reference<XMLTextColumnSepContext_Impl> mxColumnSep;
std::unique_ptr<SvXMLTokenMap> pColumnAttrTokenMap;
diff --git a/xmloff/inc/XMLTextColumnsExport.hxx b/xmloff/inc/XMLTextColumnsExport.hxx
index 8652b6771ad0..9713ac33cda8 100644
--- a/xmloff/inc/XMLTextColumnsExport.hxx
+++ b/xmloff/inc/XMLTextColumnsExport.hxx
@@ -27,15 +27,6 @@ class XMLTextColumnsExport
{
SvXMLExport& rExport;
- const OUString sSeparatorLineIsOn;
- const OUString sSeparatorLineWidth;
- const OUString sSeparatorLineColor;
- const OUString sSeparatorLineRelativeHeight;
- const OUString sSeparatorLineVerticalAlignment;
- const OUString sIsAutomatic;
- const OUString sAutomaticDistance;
- const OUString sSeparatorLineStyle;
-
SvXMLExport& GetExport() { return rExport; }
public:
diff --git a/xmloff/inc/txtflde.hxx b/xmloff/inc/txtflde.hxx
index 16f6c799ed06..fdb64896098d 100644
--- a/xmloff/inc/txtflde.hxx
+++ b/xmloff/inc/txtflde.hxx
@@ -407,82 +407,6 @@ private:
static OUString MakeSequenceRefName(sal_Int16 nSeqNo,
const OUString& rSeqName);
- // constants
-
- // service names
- const OUString sServicePrefix;
- const OUString sFieldMasterPrefix;
- const OUString sPresentationServicePrefix;
-
- // property names
- const OUString sPropertyAdjust;
- const OUString sPropertyAuthor;
- const OUString sPropertyChapterFormat;
- const OUString sPropertyChapterNumberingLevel;
- const OUString sPropertyCharStyleNames;
- const OUString sPropertyCondition;
- const OUString sPropertyContent;
- const OUString sPropertyDataBaseName;
- const OUString sPropertyDataBaseURL;
- const OUString sPropertyDataColumnName;
- const OUString sPropertyDataCommandType;
- const OUString sPropertyDataTableName;
- const OUString sPropertyDateTime;
- const OUString sPropertyDateTimeValue;
- const OUString sPropertyDDECommandElement;
- const OUString sPropertyDDECommandFile;
- const OUString sPropertyDDECommandType;
- const OUString sPropertyDependentTextFields;
- const OUString sPropertyFalseContent;
- const OUString sPropertyFields;
- const OUString sPropertyFieldSubType;
- const OUString sPropertyFileFormat;
- const OUString sPropertyFullName;
- const OUString sPropertyHint;
- const OUString sPropertyInitials;
- const OUString sPropertyInstanceName;
- const OUString sPropertyIsAutomaticUpdate;
- const OUString sPropertyIsConditionTrue;
- const OUString sPropertyIsDataBaseFormat;
- const OUString sPropertyIsDate;
- const OUString sPropertyIsExpression;
- const OUString sPropertyIsFixed;
- const OUString sPropertyIsFixedLanguage;
- const OUString sPropertyIsHidden;
- const OUString sPropertyIsInput;
- const OUString sPropertyIsShowFormula;
- const OUString sPropertyIsVisible;
- const OUString sPropertyItems;
- const OUString sPropertyLevel;
- const OUString sPropertyMeasureKind;
- const OUString sPropertyName;
- const OUString sPropertyNumberFormat;
- const OUString sPropertyNumberingSeparator;
- const OUString sPropertyNumberingType;
- const OUString sPropertyOffset;
- const OUString sPropertyOn;
- const OUString sPropertyPlaceholderType;
- const OUString sPropertyReferenceFieldPart;
- const OUString sPropertyReferenceFieldSource;
- const OUString sPropertyReferenceFieldLanguage;
- const OUString sPropertyScriptType;
- const OUString sPropertySelectedItem;
- const OUString sPropertySequenceNumber;
- const OUString sPropertySequenceValue;
- const OUString sPropertySetNumber;
- const OUString sPropertySourceName;
- const OUString sPropertySubType;
- const OUString sPropertyTargetFrame;
- const OUString sPropertyTrueContent;
- const OUString sPropertyURL;
- const OUString sPropertyURLContent;
- const OUString sPropertyUserText;
- const OUString sPropertyValue;
- const OUString sPropertyVariableName;
- const OUString sPropertyHelp;
- const OUString sPropertyTooltip;
- const OUString sPropertyTextRange;
-
std::unique_ptr<XMLPropertyState> pCombinedCharactersPropertyState;
};
diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx
index 936c7102b3fb..42aadc741520 100644
--- a/xmloff/inc/txtfldi.hxx
+++ b/xmloff/inc/txtfldi.hxx
@@ -181,7 +181,6 @@ class XMLSenderFieldImportContext : public XMLTextFieldImportContext
sal_Int16 nSubType; /// API subtype for ExtUser field
const OUString sPropertyFixed;
- const OUString sPropertyFieldSubType;
const OUString sPropertyContent;
protected:
@@ -216,7 +215,6 @@ protected:
class XMLAuthorFieldImportContext : public XMLSenderFieldImportContext
{
bool bAuthorFullName;
- const OUString sPropertyAuthorFullName;
const OUString sPropertyFixed;
const OUString sPropertyContent;
@@ -245,8 +243,6 @@ protected:
class XMLPlaceholderFieldImportContext : public XMLTextFieldImportContext
{
- const OUString sPropertyPlaceholderType;
- const OUString sPropertyPlaceholder;
const OUString sPropertyHint;
OUString sDescription;
@@ -278,7 +274,6 @@ protected:
const OUString sPropertyFixed;
const OUString sPropertyDateTimeValue;
const OUString sPropertyDateTime;
- const OUString sPropertyAdjust;
const OUString sPropertyIsDate;
const OUString sPropertyIsFixedLanguage;
@@ -330,7 +325,6 @@ public:
class XMLPageContinuationImportContext : public XMLTextFieldImportContext
{
const OUString sPropertySubType;
- const OUString sPropertyUserText;
const OUString sPropertyNumberingType;
OUString sString; /// continuation string
@@ -390,12 +384,6 @@ public:
/** superclass for database fields: handle database and table names */
class XMLDatabaseFieldImportContext : public XMLTextFieldImportContext
{
- const OUString sPropertyDataBaseName;
- const OUString sPropertyDataBaseURL;
- const OUString sPropertyTableName;
- const OUString sPropertyDataCommandType;
- const OUString sPropertyIsVisible;
-
OUString sDatabaseName;
OUString sDatabaseURL;
OUString sTableName;
@@ -604,8 +592,6 @@ protected:
/** import revision field (<text:editing-cycles>) */
class XMLRevisionDocInfoImportContext : public XMLSimpleDocInfoImportContext
{
- const OUString sPropertyRevision;
-
public:
XMLRevisionDocInfoImportContext(SvXMLImport& rImport,
@@ -677,9 +663,6 @@ protected:
class XMLConditionalTextImportContext : public XMLTextFieldImportContext
{
const OUString sPropertyCondition;
- const OUString sPropertyTrueContent;
- const OUString sPropertyFalseContent;
- const OUString sPropertyIsConditionTrue;
const OUString sPropertyCurrentPresentation;
OUString sCondition;
@@ -793,9 +776,6 @@ protected:
/** import chapter fields (<text:chapter>) */
class XMLChapterImportContext : public XMLTextFieldImportContext
{
- const OUString sPropertyChapterFormat;
- const OUString sPropertyLevel;
-
sal_Int16 nFormat;
sal_Int8 nLevel;
diff --git a/xmloff/source/core/SettingsExportHelper.cxx b/xmloff/source/core/SettingsExportHelper.cxx
index 3ea9d3f6110d..ca5f677dbdd6 100644
--- a/xmloff/source/core/SettingsExportHelper.cxx
+++ b/xmloff/source/core/SettingsExportHelper.cxx
@@ -46,15 +46,16 @@
using namespace ::com::sun::star;
using namespace ::xmloff::token;
+static const OUStringLiteral gsPrinterIndependentLayout( "PrinterIndependentLayout" );
+static const OUStringLiteral gsColorTableURL( "ColorTableURL" );
+static const OUStringLiteral gsLineEndTableURL( "LineEndTableURL" );
+static const OUStringLiteral gsHatchTableURL( "HatchTableURL" );
+static const OUStringLiteral gsDashTableURL( "DashTableURL" );
+static const OUStringLiteral gsGradientTableURL( "GradientTableURL" );
+static const OUStringLiteral gsBitmapTableURL( "BitmapTableURL" );
+
XMLSettingsExportHelper::XMLSettingsExportHelper( ::xmloff::XMLSettingsExportContext& i_rContext )
: m_rContext( i_rContext )
-, msPrinterIndependentLayout( "PrinterIndependentLayout" )
-, msColorTableURL( "ColorTableURL" )
-, msLineEndTableURL( "LineEndTableURL" )
-, msHatchTableURL( "HatchTableURL" )
-, msDashTableURL( "DashTableURL" )
-, msGradientTableURL( "GradientTableURL" )
-, msBitmapTableURL( "BitmapTableURL" )
{
}
@@ -483,7 +484,7 @@ void XMLSettingsExportHelper::exportAllSettings(
*/
void XMLSettingsExportHelper::ManipulateSetting( uno::Any& rAny, const OUString& rName ) const
{
- if( rName == msPrinterIndependentLayout )
+ if( rName == gsPrinterIndependentLayout )
{
sal_Int16 nTmp = sal_Int16();
if( rAny >>= nTmp )
@@ -496,8 +497,8 @@ void XMLSettingsExportHelper::ManipulateSetting( uno::Any& rAny, const OUString&
rAny <<= OUString("high-resolution");
}
}
- else if( (rName == msColorTableURL) || (rName == msLineEndTableURL) || (rName == msHatchTableURL) ||
- (rName == msDashTableURL) || (rName == msGradientTableURL) || (rName == msBitmapTableURL ) )
+ else if( (rName == gsColorTableURL) || (rName == gsLineEndTableURL) || (rName == gsHatchTableURL) ||
+ (rName == gsDashTableURL) || (rName == gsGradientTableURL) || (rName == gsBitmapTableURL ) )
{
if( !mxStringSubsitution.is() )
{
diff --git a/xmloff/source/draw/XMLImageMapContext.cxx b/xmloff/source/draw/XMLImageMapContext.cxx
index d978ba79300c..b7386c24f0d7 100644
--- a/xmloff/source/draw/XMLImageMapContext.cxx
+++ b/xmloff/source/draw/XMLImageMapContext.cxx
@@ -544,22 +544,22 @@ void XMLImageMapCircleContext::Prepare(
}
+static const OUStringLiteral gsImageMap("ImageMap");
+
XMLImageMapContext::XMLImageMapContext(
SvXMLImport& rImport,
sal_uInt16 nPrefix,
const OUString& rLocalName,
Reference<XPropertySet> const & rPropertySet) :
SvXMLImportContext(rImport, nPrefix, rLocalName),
- sImageMap("ImageMap"),
xPropertySet(rPropertySet)
-
{
try
{
Reference < XPropertySetInfo > xInfo =
xPropertySet->getPropertySetInfo();
- if( xInfo.is() && xInfo->hasPropertyByName( sImageMap ) )
- xPropertySet->getPropertyValue(sImageMap) >>= xImageMap;
+ if( xInfo.is() && xInfo->hasPropertyByName( gsImageMap ) )
+ xPropertySet->getPropertyValue(gsImageMap) >>= xImageMap;
}
catch(const css::uno::Exception& e)
{
@@ -608,8 +608,8 @@ void XMLImageMapContext::EndElement()
{
Reference < XPropertySetInfo > xInfo =
xPropertySet->getPropertySetInfo();
- if( xInfo.is() && xInfo->hasPropertyByName( sImageMap ) )
- xPropertySet->setPropertyValue(sImageMap, uno::makeAny( xImageMap ) );
+ if( xInfo.is() && xInfo->hasPropertyByName( gsImageMap ) )
+ xPropertySet->setPropertyValue(gsImageMap, uno::makeAny( xImageMap ) );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/draw/XMLImageMapExport.cxx b/xmloff/source/draw/XMLImageMapExport.cxx
index e05ccd1aabee..062f35815f6d 100644
--- a/xmloff/source/draw/XMLImageMapExport.cxx
+++ b/xmloff/source/draw/XMLImageMapExport.cxx
@@ -54,18 +54,19 @@ using ::com::sun::star::document::XEventsSupplier;
using ::com::sun::star::lang::XServiceInfo;
using ::com::sun::star::drawing::PointSequence;
+static const OUStringLiteral gsBoundary("Boundary");
+static const OUStringLiteral gsCenter("Center");
+static const OUStringLiteral gsDescription("Description");
+static const OUStringLiteral gsImageMap("ImageMap");
+static const OUStringLiteral gsIsActive("IsActive");
+static const OUStringLiteral gsName("Name");
+static const OUStringLiteral gsPolygon("Polygon");
+static const OUStringLiteral gsRadius("Radius");
+static const OUStringLiteral gsTarget("Target");
+static const OUStringLiteral gsURL("URL");
+static const OUStringLiteral gsTitle("Title");
+
XMLImageMapExport::XMLImageMapExport(SvXMLExport& rExp) :
- msBoundary("Boundary"),
- msCenter("Center"),
- msDescription("Description"),
- msImageMap("ImageMap"),
- msIsActive("IsActive"),
- msName("Name"),
- msPolygon("Polygon"),
- msRadius("Radius"),
- msTarget("Target"),
- msURL("URL"),
- msTitle("Title"),
mrExport(rExp)
{
}
@@ -78,9 +79,9 @@ XMLImageMapExport::~XMLImageMapExport()
void XMLImageMapExport::Export(
const Reference<XPropertySet> & rPropertySet)
{
- if (rPropertySet->getPropertySetInfo()->hasPropertyByName(msImageMap))
+ if (rPropertySet->getPropertySetInfo()->hasPropertyByName(gsImageMap))
{
- Any aAny = rPropertySet->getPropertyValue(msImageMap);
+ Any aAny = rPropertySet->getPropertyValue(gsImageMap);
Reference<XIndexContainer> aContainer;
aAny >>= aContainer;
@@ -166,7 +167,7 @@ void XMLImageMapExport::ExportMapEntry(
// now: handle ImageMapObject properties (those for all types)
// XLINK (URL property)
- Any aAny = rPropertySet->getPropertyValue(msURL);
+ Any aAny = rPropertySet->getPropertyValue(gsURL);
OUString sHref;
aAny >>= sHref;
if (!sHref.isEmpty())
@@ -176,7 +177,7 @@ void XMLImageMapExport::ExportMapEntry(
mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
// Target property (and xlink:show)
- aAny = rPropertySet->getPropertyValue(msTarget);
+ aAny = rPropertySet->getPropertyValue(gsTarget);
OUString sTargt;
aAny >>= sTargt;
if (!sTargt.isEmpty())
@@ -190,7 +191,7 @@ void XMLImageMapExport::ExportMapEntry(
}
// name
- aAny = rPropertySet->getPropertyValue(msName);
+ aAny = rPropertySet->getPropertyValue(gsName);
OUString sItemName;
aAny >>= sItemName;
if (!sItemName.isEmpty())
@@ -199,7 +200,7 @@ void XMLImageMapExport::ExportMapEntry(
}
// is-active
- aAny = rPropertySet->getPropertyValue(msIsActive);
+ aAny = rPropertySet->getPropertyValue(gsIsActive);
if (! *o3tl::doAccess<bool>(aAny))
{
mrExport.AddAttribute(XML_NAMESPACE_DRAW, XML_NOHREF, XML_NOHREF);
@@ -230,7 +231,7 @@ void XMLImageMapExport::ExportMapEntry(
// title property (as <svg:title> element)
OUString sTitle;
- rPropertySet->getPropertyValue(msTitle) >>= sTitle;
+ rPropertySet->getPropertyValue(gsTitle) >>= sTitle;
if(!sTitle.isEmpty())
{
SvXMLElementExport aEventElemt(mrExport, XML_NAMESPACE_SVG, XML_TITLE, true/*bWhiteSpace*/, false);
@@ -239,7 +240,7 @@ void XMLImageMapExport::ExportMapEntry(
// description property (as <svg:desc> element)
OUString sDescription;
- rPropertySet->getPropertyValue(msDescription) >>= sDescription;
+ rPropertySet->getPropertyValue(gsDescription) >>= sDescription;
if (!sDescription.isEmpty())
{
SvXMLElementExport aDesc(mrExport, XML_NAMESPACE_SVG, XML_DESC, true/*bWhiteSpace*/, false);
@@ -257,7 +258,7 @@ void XMLImageMapExport::ExportRectangle(
const Reference<XPropertySet> & rPropertySet)
{
// get boundary rectangle
- Any aAny = rPropertySet->getPropertyValue(msBoundary);
+ Any aAny = rPropertySet->getPropertyValue(gsBoundary);
awt::Rectangle aRectangle;
aAny >>= aRectangle;
@@ -283,7 +284,7 @@ void XMLImageMapExport::ExportCircle(
const Reference<XPropertySet> & rPropertySet)
{
// get boundary rectangle
- Any aAny = rPropertySet->getPropertyValue(msCenter);
+ Any aAny = rPropertySet->getPropertyValue(gsCenter);
awt::Point aCenter;
aAny >>= aCenter;
@@ -297,7 +298,7 @@ void XMLImageMapExport::ExportCircle(
aBuffer.makeStringAndClear() );
// radius
- aAny = rPropertySet->getPropertyValue(msRadius);
+ aAny = rPropertySet->getPropertyValue(gsRadius);
sal_Int32 nRadius = 0;
aAny >>= nRadius;
mrExport.GetMM100UnitConverter().convertMeasureToXML(aBuffer, nRadius);
@@ -311,7 +312,7 @@ void XMLImageMapExport::ExportPolygon(const Reference<XPropertySet> & rPropertyS
// pair sequence. The bounding box is always the entire image.
// get polygon point sequence
- Any aAny = rPropertySet->getPropertyValue(msPolygon);
+ Any aAny = rPropertySet->getPropertyValue(gsPolygon);
PointSequence aPoly;
aAny >>= aPoly;
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index d9eab3c6e21b..daca0eb241db 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -383,6 +383,8 @@ ImpXMLAutoLayoutInfo::ImpXMLAutoLayoutInfo(sal_uInt16 nTyp, ImpXMLEXPPageMasterI
maPresRect.SetSize(aLayoutSize);
}
+static const OUStringLiteral gsPageLayoutNames( "PageLayoutNames" );
+
SdXMLExport::SdXMLExport(
const css::uno::Reference< css::uno::XComponentContext >& xContext,
OUString const & implementationName,
@@ -393,8 +395,7 @@ SdXMLExport::SdXMLExport(
mnDocDrawPageCount(0),
mnObjectCount(0),
mpHandoutPageMaster(nullptr),
- mbIsDraw(bIsDraw),
- msPageLayoutNames( "PageLayoutNames" )
+ mbIsDraw(bIsDraw)
{
}
@@ -2078,9 +2079,9 @@ void SdXMLExport::ExportStyles_(bool bUsed)
{
Reference< beans::XPropertySetInfo > xInfoSetInfo( xInfoSet->getPropertySetInfo() );
- if( xInfoSetInfo->hasPropertyByName( msPageLayoutNames ) )
+ if( xInfoSetInfo->hasPropertyByName( gsPageLayoutNames ) )
{
- xInfoSet->setPropertyValue( msPageLayoutNames, Any(maDrawPagesAutoLayoutNames) );
+ xInfoSet->setPropertyValue( gsPageLayoutNames, Any(maDrawPagesAutoLayoutNames) );
}
}
}
@@ -2096,9 +2097,9 @@ void SdXMLExport::collectAutoStyles()
{
Reference< beans::XPropertySetInfo > xInfoSetInfo( xInfoSet->getPropertySetInfo() );
- if( xInfoSetInfo->hasPropertyByName( msPageLayoutNames ) )
+ if( xInfoSetInfo->hasPropertyByName( gsPageLayoutNames ) )
{
- xInfoSet->getPropertyValue( msPageLayoutNames ) >>= maDrawPagesAutoLayoutNames;
+ xInfoSet->getPropertyValue( gsPageLayoutNames ) >>= maDrawPagesAutoLayoutNames;
}
}
diff --git a/xmloff/source/draw/sdxmlexp_impl.hxx b/xmloff/source/draw/sdxmlexp_impl.hxx
index 3b2a43bd3545..5e964d137dbb 100644
--- a/xmloff/source/draw/sdxmlexp_impl.hxx
+++ b/xmloff/source/draw/sdxmlexp_impl.hxx
@@ -111,8 +111,6 @@ class SdXMLExport : public SvXMLExport
bool mbIsDraw;
- const OUString msPageLayoutNames;
-
virtual void ExportStyles_(bool bUsed) override;
virtual void ExportAutoStyles_() override;
virtual void ExportFontDecls_() override;
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index 88af6541c444..36342fb1c66b 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -152,6 +152,27 @@ bool supportsText(XmlShapeType eShapeType)
}
+static const OUStringLiteral gsZIndex( "ZOrder" );
+static const OUStringLiteral gsPrintable( "Printable" );
+static const OUStringLiteral gsVisible( "Visible" );
+static const OUStringLiteral gsModel( "Model" );
+static const OUStringLiteral gsStartShape( "StartShape" );
+static const OUStringLiteral gsEndShape( "EndShape" );
+static const OUStringLiteral gsOnClick( "OnClick" );
+static const OUStringLiteral gsEventType( "EventType" );
+static const OUStringLiteral gsPresentation( "Presentation" );
+static const OUStringLiteral gsMacroName( "MacroName" );
+static const OUStringLiteral gsScript( "Script" );
+static const OUStringLiteral gsLibrary( "Library" );
+static const OUStringLiteral gsClickAction( "ClickAction" );
+static const OUStringLiteral gsBookmark( "Bookmark" );
+static const OUStringLiteral gsEffect( "Effect" );
+static const OUStringLiteral gsPlayFull( "PlayFull" );
+static const OUStringLiteral gsVerb( "Verb" );
+static const OUStringLiteral gsSoundURL( "SoundURL" );
+static const OUStringLiteral gsSpeed( "Speed" );
+static const OUStringLiteral gsStarBasic( "StarBasic" );
+
XMLShapeExport::XMLShapeExport(SvXMLExport& rExp,
SvXMLExportPropertyMapper *pExtMapper )
: mrExport( rExp ),
@@ -159,27 +180,7 @@ XMLShapeExport::XMLShapeExport(SvXMLExport& rExp,
maCurrentShapesIter(maShapesInfos.end()),
mbExportLayer( false ),
// #88546# init to sal_False
- mbHandleProgressBar( false ),
- msZIndex( "ZOrder" ),
- msPrintable( "Printable" ),
- msVisible( "Visible" ),
- msModel( "Model" ),
- msStartShape( "StartShape" ),
- msEndShape( "EndShape" ),
- msOnClick( "OnClick" ),
- msEventType( "EventType" ),
- msPresentation( "Presentation" ),
- msMacroName( "MacroName" ),
- msScript( "Script" ),
- msLibrary( "Library" ),
- msClickAction( "ClickAction" ),
- msBookmark( "Bookmark" ),
- msEffect( "Effect" ),
- msPlayFull( "PlayFull" ),
- msVerb( "Verb" ),
- msSoundURL( "SoundURL" ),
- msSpeed( "Speed" ),
- msStarBasic( "StarBasic" )
+ mbHandleProgressBar( false )
{
// construct PropertyHandlerFactory
mxSdPropHdlFactory = new XMLSdPropHdlFactory( mrExport.GetModel(), rExp );
@@ -274,7 +275,7 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap
sal_Int32 nZIndex = 0;
uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY);
if( xPropSet.is() )
- xPropSet->getPropertyValue(msZIndex) >>= nZIndex;
+ xPropSet->getPropertyValue(gsZIndex) >>= nZIndex;
ImplXMLShapeExportInfoVector& aShapeInfoVector = (*maCurrentShapesIter).second;
@@ -535,11 +536,11 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap
uno::Reference< uno::XInterface > xConnection;
// create shape ids for export later
- xPropSet->getPropertyValue( msStartShape ) >>= xConnection;
+ xPropSet->getPropertyValue( gsStartShape ) >>= xConnection;
if( xConnection.is() )
mrExport.getInterfaceToIdentifierMapper().registerReference( xConnection );
- xPropSet->getPropertyValue( msEndShape ) >>= xConnection;
+ xPropSet->getPropertyValue( gsEndShape ) >>= xConnection;
if( xConnection.is() )
mrExport.getInterfaceToIdentifierMapper().registerReference( xConnection );
break;
@@ -549,7 +550,7 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap
{
try
{
- uno::Reference< table::XColumnRowRange > xRange( xPropSet->getPropertyValue( msModel ), uno::UNO_QUERY_THROW );
+ uno::Reference< table::XColumnRowRange > xRange( xPropSet->getPropertyValue( gsModel ), uno::UNO_QUERY_THROW );
GetShapeTableExport()->collectTableAutoStyles( xRange );
}
catch(const uno::Exception&)
@@ -626,7 +627,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape
(eAction == presentation::ClickAction_BOOKMARK) )
{
OUString sURL;
- xSet->getPropertyValue(msBookmark) >>= sURL;
+ xSet->getPropertyValue(gsBookmark) >>= sURL;
if( !sURL.isEmpty() )
{
@@ -643,7 +644,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape
}
if( xSet.is() )
- xSet->getPropertyValue(msZIndex) >>= nZIndex;
+ xSet->getPropertyValue(gsZIndex) >>= nZIndex;
ImplXMLShapeExportInfoVector& aShapeInfoVector = (*maCurrentShapesIter).second;
@@ -762,8 +763,8 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape
bool bVisible = true;
bool bPrintable = true;
- xSet->getPropertyValue(msVisible) >>= bVisible;
- xSet->getPropertyValue(msPrintable) >>= bPrintable;
+ xSet->getPropertyValue(gsVisible) >>= bVisible;
+ xSet->getPropertyValue(gsPrintable) >>= bPrintable;
XMLTokenEnum eDisplayToken = XML_TOKEN_INVALID;
const unsigned short nDisplay = (bVisible ? 2 : 0) | (bPrintable ? 1 : 0);
@@ -1614,58 +1615,58 @@ void XMLShapeExport::ImpExportEvents( const uno::Reference< drawing::XShape >& x
OUString aStrBookmark;
uno::Sequence< beans::PropertyValue > aClickProperties;
- if( xEvents->hasByName( msOnClick ) && (xEvents->getByName( msOnClick ) >>= aClickProperties) )
+ if( xEvents->hasByName( gsOnClick ) && (xEvents->getByName( gsOnClick ) >>= aClickProperties) )
{
const beans::PropertyValue* pProperty = aClickProperties.getConstArray();
const beans::PropertyValue* pPropertyEnd = pProperty + aClickProperties.getLength();
for( ; pProperty != pPropertyEnd; ++pProperty )
{
- if( !( nFound & Found::CLICKEVENTTYPE ) && pProperty->Name == msEventType )
+ if( !( nFound & Found::CLICKEVENTTYPE ) && pProperty->Name == gsEventType )
{
if( pProperty->Value >>= aClickEventType )
nFound |= Found::CLICKEVENTTYPE;
}
- else if( !( nFound & Found::CLICKACTION ) && pProperty->Name == msClickAction )
+ else if( !( nFound & Found::CLICKACTION ) && pProperty->Name == gsClickAction )
{
if( pProperty->Value >>= eClickAction )
nFound |= Found::CLICKACTION;
}
- else if( !( nFound & Found::MACRO ) && ( pProperty->Name == msMacroName || pProperty->Name == msScript ) )
+ else if( !( nFound & Found::MACRO ) && ( pProperty->Name == gsMacroName || pProperty->Name == gsScript ) )
{
if( pProperty->Value >>= aStrMacro )
nFound |= Found::MACRO;
}
- else if( !( nFound & Found::LIBRARY ) && pProperty->Name == msLibrary )
+ else if( !( nFound & Found::LIBRARY ) && pProperty->Name == gsLibrary )
{
if( pProperty->Value >>= aStrLibrary )
nFound |= Found::LIBRARY;
}
- else if( !( nFound & Found::EFFECT ) && pProperty->Name == msEffect )
+ else if( !( nFound & Found::EFFECT ) && pProperty->Name == gsEffect )
{
if( pProperty->Value >>= eEffect )
nFound |= Found::EFFECT;
}
- else if( !( nFound & Found::BOOKMARK ) && pProperty->Name == msBookmark )
+ else if( !( nFound & Found::BOOKMARK ) && pProperty->Name == gsBookmark )
{
if( pProperty->Value >>= aStrBookmark )
nFound |= Found::BOOKMARK;
}
- else if( !( nFound & Found::SPEED ) && pProperty->Name == msSpeed )
+ else if( !( nFound & Found::SPEED ) && pProperty->Name == gsSpeed )
{
if( pProperty->Value >>= eSpeed )
nFound |= Found::SPEED;
}
- else if( !( nFound & Found::SOUNDURL ) && pProperty->Name == msSoundURL )
+ else if( !( nFound & Found::SOUNDURL ) && pProperty->Name == gsSoundURL )
{
if( pProperty->Value >>= aStrSoundURL )
nFound |= Found::SOUNDURL;
}
- else if( !( nFound & Found::PLAYFULL ) && pProperty->Name == msPlayFull )
+ else if( !( nFound & Found::PLAYFULL ) && pProperty->Name == gsPlayFull )
{
if( pProperty->Value >>= bPlayFull )
nFound |= Found::PLAYFULL;
}
- else if( !( nFound & Found::VERB ) && pProperty->Name == msVerb )
+ else if( !( nFound & Found::VERB ) && pProperty->Name == gsVerb )
{
if( pProperty->Value >>= nVerb )
nFound |= Found::VERB;
@@ -1675,7 +1676,7 @@ void XMLShapeExport::ImpExportEvents( const uno::Reference< drawing::XShape >& x
// create the XML elements
- if( aClickEventType == msPresentation )
+ if( aClickEventType == gsPresentation )
{
if( !(nFound & Found::CLICKACTION) || (eClickAction == presentation::ClickAction_NONE) )
return;
@@ -1787,7 +1788,7 @@ void XMLShapeExport::ImpExportEvents( const uno::Reference< drawing::XShape >& x
}
}
}
- else if( aClickEventType == msStarBasic )
+ else if( aClickEventType == gsStarBasic )
{
if( nFound & Found::MACRO )
{
@@ -1819,7 +1820,7 @@ void XMLShapeExport::ImpExportEvents( const uno::Reference< drawing::XShape >& x
SvXMLElementExport aEventElemt(mrExport, XML_NAMESPACE_SCRIPT, XML_EVENT_LISTENER, true, true);
}
}
- else if( aClickEventType == msScript )
+ else if( aClickEventType == gsScript )
{
if( nFound & Found::MACRO )
{
@@ -4880,7 +4881,7 @@ void XMLShapeExport::ImpExportTableShape( const uno::Reference< drawing::XShape
}
}
- uno::Reference< table::XColumnRowRange > xRange( xPropSet->getPropertyValue( msModel ), uno::UNO_QUERY_THROW );
+ uno::Reference< table::XColumnRowRange > xRange( xPropSet->getPropertyValue( gsModel ), uno::UNO_QUERY_THROW );
GetShapeTableExport()->exportTable( xRange );
}
}
diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx
index 762fc3e38bc8..dff86d74b63a 100644
--- a/xmloff/source/draw/shapeimport.cxx
+++ b/xmloff/source/draw/shapeimport.cxx
@@ -100,19 +100,18 @@ struct XMLShapeImportHelperImpl
bool mbIsPresentationShapesSupported;
};
+static const OUStringLiteral gsStartShape("StartShape");
+static const OUStringLiteral gsEndShape("EndShape");
+static const OUStringLiteral gsStartGluePointIndex("StartGluePointIndex");
+static const OUStringLiteral gsEndGluePointIndex("EndGluePointIndex");
+
XMLShapeImportHelper::XMLShapeImportHelper(
SvXMLImport& rImporter,
const uno::Reference< frame::XModel>& rModel,
SvXMLImportPropertyMapper *pExtMapper )
: mpImpl( new XMLShapeImportHelperImpl ),
-
mpPropertySetMapper(nullptr),
mpPresPagePropsMapper(nullptr),
- msStartShape("StartShape"),
- msEndShape("EndShape"),
- msStartGluePointIndex("StartGluePointIndex"),
- msEndGluePointIndex("EndGluePointIndex"),
-
mrImporter( rImporter )
{
mpImpl->mpSortContext = nullptr;
@@ -941,10 +940,10 @@ void XMLShapeImportHelper::restoreConnections()
mrImporter.getInterfaceToIdentifierMapper().getReference( rHint.aDestShapeId ), uno::UNO_QUERY );
if( xShape.is() )
{
- xConnector->setPropertyValue( rHint.bStart ? msStartShape : msEndShape, uno::Any(xShape) );
+ xConnector->setPropertyValue( rHint.bStart ? gsStartShape : gsEndShape, uno::Any(xShape) );
sal_Int32 nGlueId = rHint.nDestGlueId < 4 ? rHint.nDestGlueId : getGluePointId( xShape, rHint.nDestGlueId );
- xConnector->setPropertyValue( rHint.bStart ? msStartGluePointIndex : msEndGluePointIndex, uno::Any(nGlueId) );
+ xConnector->setPropertyValue( rHint.bStart ? gsStartGluePointIndex : gsEndGluePointIndex, uno::Any(nGlueId) );
}
// #86637# restore line deltas
diff --git a/xmloff/source/script/XMLEventExport.cxx b/xmloff/source/script/XMLEventExport.cxx
index 34a6faadccfd..eb0fc075c584 100644
--- a/xmloff/source/script/XMLEventExport.cxx
+++ b/xmloff/source/script/XMLEventExport.cxx
@@ -41,9 +41,9 @@ using ::com::sun::star::container::XNameReplace;
using ::com::sun::star::container::XNameAccess;
using ::xmloff::token::XML_EVENT_LISTENERS;
+static const OUStringLiteral gsEventType("EventType");
XMLEventExport::XMLEventExport(SvXMLExport& rExp) :
- sEventType("EventType"),
rExport(rExp),
bExtNamespace(false)
{
@@ -205,7 +205,7 @@ void XMLEventExport::ExportEvent(
for(sal_Int32 nVal = 0; nVal < nValues; nVal++)
{
- if (sEventType == pValues[nVal].Name)
+ if (gsEventType == pValues[nVal].Name)
{
// found! Now find handler and delegate
OUString sType;
diff --git a/xmloff/source/script/XMLScriptContextFactory.cxx b/xmloff/source/script/XMLScriptContextFactory.cxx
index 690a19d7437f..6fbbf53a7ebf 100644
--- a/xmloff/source/script/XMLScriptContextFactory.cxx
+++ b/xmloff/source/script/XMLScriptContextFactory.cxx
@@ -32,10 +32,11 @@ using ::com::sun::star::beans::PropertyValue;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
-XMLScriptContextFactory::XMLScriptContextFactory() :
- sEventType("EventType"),
- sScript("Script"),
- sURL("Script")
+static const OUStringLiteral gsEventType("EventType");
+static const OUStringLiteral gsScript("Script");
+static const OUStringLiteral gsURL("Script");
+
+XMLScriptContextFactory::XMLScriptContextFactory()
{
}
@@ -73,11 +74,11 @@ SvXMLImportContext * XMLScriptContextFactory::CreateContext
Sequence<PropertyValue> aValues(2);
// EventType
- aValues[0].Name = sEventType;
- aValues[0].Value <<= sScript;
+ aValues[0].Name = gsEventType;
+ aValues[0].Value <<= OUString(gsScript);
// URL
- aValues[1].Name = sURL;
+ aValues[1].Name = gsURL;
aValues[1].Value <<= sURLVal;
// add values for event now
diff --git a/xmloff/source/script/XMLScriptExportHandler.cxx b/xmloff/source/script/XMLScriptExportHandler.cxx
index 4e3e17c48d93..6dde942c9907 100644
--- a/xmloff/source/script/XMLScriptExportHandler.cxx
+++ b/xmloff/source/script/XMLScriptExportHandler.cxx
@@ -31,9 +31,9 @@ using namespace ::xmloff::token;
using ::com::sun::star::beans::PropertyValue;
+static const OUStringLiteral gsURL("Script");
-XMLScriptExportHandler::XMLScriptExportHandler() :
- sURL("Script")
+XMLScriptExportHandler::XMLScriptExportHandler()
{
}
@@ -56,7 +56,7 @@ void XMLScriptExportHandler::Export(
sal_Int32 nCount = rValues.getLength();
for(sal_Int32 i = 0; i < nCount; i++)
{
- if (sURL == rValues[i].Name)
+ if (gsURL == rValues[i].Name)
{
OUString sTmp;
rValues[i].Value >>= sTmp;
diff --git a/xmloff/source/script/XMLStarBasicContextFactory.cxx b/xmloff/source/script/XMLStarBasicContextFactory.cxx
index f849db55758d..7dd340b00301 100644
--- a/xmloff/source/script/XMLStarBasicContextFactory.cxx
+++ b/xmloff/source/script/XMLStarBasicContextFactory.cxx
@@ -33,11 +33,12 @@ using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
-XMLStarBasicContextFactory::XMLStarBasicContextFactory() :
- sEventType("EventType"),
- sLibrary("Library"),
- sMacroName("MacroName"),
- sStarBasic("StarBasic")
+static const OUStringLiteral gsEventType("EventType");
+static const OUStringLiteral gsLibrary("Library");
+static const OUStringLiteral gsMacroName("MacroName");
+static const OUStringLiteral gsStarBasic("StarBasic");
+
+XMLStarBasicContextFactory::XMLStarBasicContextFactory()
{
}
@@ -95,15 +96,15 @@ SvXMLImportContext* XMLStarBasicContextFactory::CreateContext(
Sequence<PropertyValue> aValues(3);
// EventType
- aValues[0].Name = sEventType;
- aValues[0].Value <<= sStarBasic;
+ aValues[0].Name = gsEventType;
+ aValues[0].Value <<= OUString(gsStarBasic);
// library name
- aValues[1].Name = sLibrary;
+ aValues[1].Name = gsLibrary;
aValues[1].Value <<= sLibraryVal;
// macro name
- aValues[2].Name = sMacroName;
+ aValues[2].Name = gsMacroName;
aValues[2].Value <<= sMacroNameVal;
// add values for event now
diff --git a/xmloff/source/script/XMLStarBasicExportHandler.cxx b/xmloff/source/script/XMLStarBasicExportHandler.cxx
index b6bb28725067..398908e52454 100644
--- a/xmloff/source/script/XMLStarBasicExportHandler.cxx
+++ b/xmloff/source/script/XMLStarBasicExportHandler.cxx
@@ -32,12 +32,13 @@ using namespace ::xmloff::token;
using ::com::sun::star::beans::PropertyValue;
-XMLStarBasicExportHandler::XMLStarBasicExportHandler() :
- sStarBasic("StarBasic"),
- sLibrary("Library"),
- sMacroName("MacroName"),
- sStarOffice("StarOffice"),
- sApplication("application")
+static const OUStringLiteral gsStarBasic("StarBasic");
+static const OUStringLiteral gsLibrary("Library");
+static const OUStringLiteral gsMacroName("MacroName");
+static const OUStringLiteral gsStarOffice("StarOffice");
+static const OUStringLiteral gsApplication("application");
+
+XMLStarBasicExportHandler::XMLStarBasicExportHandler()
{
}
@@ -53,23 +54,23 @@ void XMLStarBasicExportHandler::Export(
{
rExport.AddAttribute(XML_NAMESPACE_SCRIPT, XML_LANGUAGE,
rExport.GetNamespaceMap().GetQNameByKey(
- XML_NAMESPACE_OOO, sStarBasic ) );
+ XML_NAMESPACE_OOO, gsStarBasic ) );
rExport.AddAttribute(XML_NAMESPACE_SCRIPT, XML_EVENT_NAME, rEventQName);
OUString sLocation, sName;
sal_Int32 nCount = rValues.getLength();
for(sal_Int32 i = 0; i < nCount; i++)
{
- if (sLibrary == rValues[i].Name)
+ if (gsLibrary == rValues[i].Name)
{
OUString sTmp;
rValues[i].Value >>= sTmp;
sLocation = GetXMLToken(
- (sTmp.equalsIgnoreAsciiCase(sApplication) ||
- sTmp.equalsIgnoreAsciiCase(sStarOffice) ) ? XML_APPLICATION
+ (sTmp.equalsIgnoreAsciiCase(gsApplication) ||
+ sTmp.equalsIgnoreAsciiCase(gsStarOffice) ) ? XML_APPLICATION
: XML_DOCUMENT );
}
- else if (sMacroName == rValues[i].Name)
+ else if (gsMacroName == rValues[i].Name)
{
rValues[i].Value >>= sName;
}
diff --git a/xmloff/source/style/XMLPageExport.cxx b/xmloff/source/style/XMLPageExport.cxx
index c923705f9a41..fd61ebcd6eee 100644
--- a/xmloff/source/style/XMLPageExport.cxx
+++ b/xmloff/source/style/XMLPageExport.cxx
@@ -42,6 +42,9 @@ using namespace ::com::sun::star::container;
using namespace ::com::sun::star::beans;
using namespace ::xmloff::token;
+static const OUStringLiteral gsIsPhysical( "IsPhysical" );
+static const OUStringLiteral gsFollowStyle( "FollowStyle" );
+
bool XMLPageExport::findPageMasterName( const OUString& rStyleName, OUString& rPMName ) const
{
for( ::std::vector< XMLPageExportNameEntry >::const_iterator pEntry = aNameVector.begin();
@@ -90,9 +93,9 @@ bool XMLPageExport::exportStyle(
// Don't export styles that aren't existing really. This may be the
// case for StarOffice Writer's pool styles.
- if( xPropSetInfo->hasPropertyByName( sIsPhysical ) )
+ if( xPropSetInfo->hasPropertyByName( gsIsPhysical ) )
{
- Any aAny = xPropSet->getPropertyValue( sIsPhysical );
+ Any aAny = xPropSet->getPropertyValue( gsIsPhysical );
if( !*o3tl::doAccess<bool>(aAny) )
return false;
}
@@ -130,10 +133,10 @@ bool XMLPageExport::exportStyle(
GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_PAGE_LAYOUT_NAME, GetExport().EncodeStyleName( sPMName ) );
Reference<XPropertySetInfo> xInfo = xPropSet->getPropertySetInfo();
- if ( xInfo.is() && xInfo->hasPropertyByName(sFollowStyle) )
+ if ( xInfo.is() && xInfo->hasPropertyByName(gsFollowStyle) )
{
OUString sNextName;
- xPropSet->getPropertyValue( sFollowStyle ) >>= sNextName;
+ xPropSet->getPropertyValue( gsFollowStyle ) >>= sNextName;
if( sName != sNextName && !sNextName.isEmpty() )
{
@@ -152,9 +155,7 @@ bool XMLPageExport::exportStyle(
}
XMLPageExport::XMLPageExport( SvXMLExport& rExp ) :
- rExport( rExp ),
- sIsPhysical( "IsPhysical" ),
- sFollowStyle( "FollowStyle" )
+ rExport( rExp )
{
xPageMasterPropHdlFactory = new XMLPageMasterPropHdlFactory;
xPageMasterPropSetMapper = new XMLPageMasterPropSetMapper(
diff --git a/xmloff/source/style/numehelp.cxx b/xmloff/source/style/numehelp.cxx
index 21e778f16775..b678d559a277 100644
--- a/xmloff/source/style/numehelp.cxx
+++ b/xmloff/source/style/numehelp.cxx
@@ -36,19 +36,15 @@
using namespace com::sun::star;
using namespace xmloff::token;
-#define XML_TYPE "Type"
-#define XML_CURRENCYSYMBOL "CurrencySymbol"
-#define XML_CURRENCYABBREVIATION "CurrencyAbbreviation"
-#define XML_STANDARDFORMAT "StandardFormat"
+static const OUStringLiteral gsStandardFormat("StandardFormat");
+static const OUStringLiteral gsType("Type");
+static const OUStringLiteral gsCurrencySymbol("CurrencySymbol");
+static const OUStringLiteral gsCurrencyAbbreviation("CurrencyAbbreviation");
XMLNumberFormatAttributesExportHelper::XMLNumberFormatAttributesExportHelper(
css::uno::Reference< css::util::XNumberFormatsSupplier > const & xTempNumberFormatsSupplier)
: xNumberFormats(xTempNumberFormatsSupplier.is() ? xTempNumberFormatsSupplier->getNumberFormats() : css::uno::Reference< css::util::XNumberFormats > ()),
pExport(nullptr),
- sStandardFormat(XML_STANDARDFORMAT),
- sType(XML_TYPE),
- msCurrencySymbol(XML_CURRENCYSYMBOL),
- msCurrencyAbbreviation(XML_CURRENCYABBREVIATION),
aNumberFormats()
{
}
@@ -58,16 +54,12 @@ XMLNumberFormatAttributesExportHelper::XMLNumberFormatAttributesExportHelper(
SvXMLExport& rTempExport )
: xNumberFormats(xTempNumberFormatsSupplier.is() ? xTempNumberFormatsSupplier->getNumberFormats() : css::uno::Reference< css::util::XNumberFormats > ()),
pExport(&rTempExport),
- sStandardFormat(XML_STANDARDFORMAT),
- sType(XML_TYPE),
sAttrValue(rTempExport.GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_OFFICE, GetXMLToken(XML_VALUE))),
sAttrDateValue(rTempExport.GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_OFFICE, GetXMLToken(XML_DATE_VALUE))),
sAttrTimeValue(rTempExport.GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_OFFICE, GetXMLToken(XML_TIME_VALUE))),
sAttrBooleanValue(rTempExport.GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_OFFICE, GetXMLToken(XML_BOOLEAN_VALUE))),
sAttrStringValue(rTempExport.GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_OFFICE, GetXMLToken(XML_STRING_VALUE))),
sAttrCurrency(rTempExport.GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_OFFICE, GetXMLToken(XML_CURRENCY))),
- msCurrencySymbol(XML_CURRENCYSYMBOL),
- msCurrencyAbbreviation(XML_CURRENCYABBREVIATION),
aNumberFormats()
{
}
@@ -228,10 +220,10 @@ bool XMLNumberFormatAttributesExportHelper::GetCurrencySymbol(const sal_Int32 nN
try
{
uno::Reference <beans::XPropertySet> xNumberPropertySet(xNumberFormats->getByKey(nNumberFormat));
- if ( xNumberPropertySet->getPropertyValue(XML_CURRENCYSYMBOL) >>= sCurrencySymbol)
+ if ( xNumberPropertySet->getPropertyValue(gsCurrencySymbol) >>= sCurrencySymbol)
{
OUString sCurrencyAbbreviation;
- if ( xNumberPropertySet->getPropertyValue(XML_CURRENCYABBREVIATION) >>= sCurrencyAbbreviation)
+ if ( xNumberPropertySet->getPropertyValue(gsCurrencyAbbreviation) >>= sCurrencyAbbreviation)
{
if ( !sCurrencyAbbreviation.isEmpty())
sCurrencySymbol = sCurrencyAbbreviation;
@@ -265,9 +257,9 @@ sal_Int16 XMLNumberFormatAttributesExportHelper::GetCellType(const sal_Int32 nNu
try
{
uno::Reference <beans::XPropertySet> xNumberPropertySet(xNumberFormats->getByKey(nNumberFormat));
- xNumberPropertySet->getPropertyValue(XML_STANDARDFORMAT) >>= bIsStandard;
+ xNumberPropertySet->getPropertyValue(gsStandardFormat) >>= bIsStandard;
sal_Int16 nNumberType = sal_Int16();
- if ( xNumberPropertySet->getPropertyValue(XML_TYPE) >>= nNumberType )
+ if ( xNumberPropertySet->getPropertyValue(gsType) >>= nNumberType )
{
return nNumberType;
}
@@ -312,10 +304,10 @@ bool XMLNumberFormatAttributesExportHelper::GetCurrencySymbol(const sal_Int32 nN
try
{
uno::Reference <beans::XPropertySet> xNumberPropertySet(xNumberFormats->getByKey(nNumberFormat));
- if ( xNumberPropertySet->getPropertyValue(msCurrencySymbol) >>= rCurrencySymbol)
+ if ( xNumberPropertySet->getPropertyValue(gsCurrencySymbol) >>= rCurrencySymbol)
{
OUString sCurrencyAbbreviation;
- if ( xNumberPropertySet->getPropertyValue(msCurrencyAbbreviation) >>= sCurrencyAbbreviation)
+ if ( xNumberPropertySet->getPropertyValue(gsCurrencyAbbreviation) >>= sCurrencyAbbreviation)
{
if ( !sCurrencyAbbreviation.isEmpty())
rCurrencySymbol = sCurrencyAbbreviation;
@@ -348,9 +340,9 @@ sal_Int16 XMLNumberFormatAttributesExportHelper::GetCellType(const sal_Int32 nNu
uno::Reference <beans::XPropertySet> xNumberPropertySet(xNumberFormats->getByKey(nNumberFormat));
if (xNumberPropertySet.is())
{
- xNumberPropertySet->getPropertyValue(sStandardFormat) >>= bIsStandard;
+ xNumberPropertySet->getPropertyValue(gsStandardFormat) >>= bIsStandard;
sal_Int16 nNumberType = sal_Int16();
- if ( xNumberPropertySet->getPropertyValue(sType) >>= nNumberType )
+ if ( xNumberPropertySet->getPropertyValue(gsType) >>= nNumberType )
{
return nNumberType;
}
diff --git a/xmloff/source/style/prstylei.cxx b/xmloff/source/style/prstylei.cxx
index 35e6c1f90649..99ebee05b25f 100644
--- a/xmloff/source/style/prstylei.cxx
+++ b/xmloff/source/style/prstylei.cxx
@@ -141,6 +141,8 @@ namespace
+static const OUStringLiteral gsIsPhysical( "IsPhysical" );
+static const OUStringLiteral gsFollowStyle( "FollowStyle" );
XMLPropStyleContext::XMLPropStyleContext( SvXMLImport& rImport,
sal_uInt16 nPrfx, const OUString& rLName,
@@ -148,8 +150,6 @@ XMLPropStyleContext::XMLPropStyleContext( SvXMLImport& rImport,
SvXMLStylesContext& rStyles, sal_uInt16 nFamily,
bool bDefault )
: SvXMLStyleContext( rImport, nPrfx, rLName, xAttrList, nFamily, bDefault )
-, msIsPhysical( "IsPhysical" )
-, msFollowStyle( "FollowStyle" )
, mxStyles( &rStyles )
{
}
@@ -388,9 +388,9 @@ void XMLPropStyleContext::CreateAndInsert( bool bOverwrite )
Reference < XPropertySet > xPropSet( mxStyle, UNO_QUERY );
Reference< XPropertySetInfo > xPropSetInfo =
xPropSet->getPropertySetInfo();
- if( !bNew && xPropSetInfo->hasPropertyByName( msIsPhysical ) )
+ if( !bNew && xPropSetInfo->hasPropertyByName( gsIsPhysical ) )
{
- Any aAny = xPropSet->getPropertyValue( msIsPhysical );
+ Any aAny = xPropSet->getPropertyValue( gsIsPhysical );
bNew = !*o3tl::doAccess<bool>(aAny);
}
SetNew( bNew );
@@ -512,14 +512,14 @@ void XMLPropStyleContext::Finish( bool bOverwrite )
Reference < XPropertySet > xPropSet( mxStyle, UNO_QUERY );
Reference< XPropertySetInfo > xPropSetInfo =
xPropSet->getPropertySetInfo();
- if( xPropSetInfo->hasPropertyByName( msFollowStyle ) )
+ if( xPropSetInfo->hasPropertyByName( gsFollowStyle ) )
{
- Any aAny = xPropSet->getPropertyValue( msFollowStyle );
+ Any aAny = xPropSet->getPropertyValue( gsFollowStyle );
OUString sCurrFollow;
aAny >>= sCurrFollow;
if( sCurrFollow != sFollow )
{
- xPropSet->setPropertyValue( msFollowStyle, Any(sFollow) );
+ xPropSet->setPropertyValue( gsFollowStyle, Any(sFollow) );
}
}
diff --git a/xmloff/source/style/styleexp.cxx b/xmloff/source/style/styleexp.cxx
index 40334fc30be1..dac2d19e1565 100644
--- a/xmloff/source/style/styleexp.cxx
+++ b/xmloff/source/style/styleexp.cxx
@@ -56,15 +56,16 @@ using namespace ::xmloff::token;
using ::com::sun::star::document::XEventsSupplier;
+static const OUStringLiteral gsIsPhysical( "IsPhysical" );
+static const OUStringLiteral gsIsAutoUpdate( "IsAutoUpdate" );
+static const OUStringLiteral gsFollowStyle( "FollowStyle" );
+static const OUStringLiteral gsNumberingStyleName( "NumberingStyleName" );
+static const OUStringLiteral gsOutlineLevel( "OutlineLevel" );
+
XMLStyleExport::XMLStyleExport(
SvXMLExport& rExp,
SvXMLAutoStylePoolP *pAutoStyleP ) :
rExport( rExp ),
- sIsPhysical( "IsPhysical" ),
- sIsAutoUpdate( "IsAutoUpdate" ),
- sFollowStyle( "FollowStyle" ),
- sNumberingStyleName( "NumberingStyleName" ),
- sOutlineLevel( "OutlineLevel" ),
pAutoStylePool( pAutoStyleP )
{
}
@@ -140,9 +141,9 @@ bool XMLStyleExport::exportStyle(
// Don't export styles that aren't existing really. This may be the
// case for StarOffice Writer's pool styles.
- if( xPropSetInfo->hasPropertyByName( sIsPhysical ) )
+ if( xPropSetInfo->hasPropertyByName( gsIsPhysical ) )
{
- aAny = xPropSet->getPropertyValue( sIsPhysical );
+ aAny = xPropSet->getPropertyValue( gsIsPhysical );
if( !*o3tl::doAccess<bool>(aAny) )
return false;
}
@@ -193,9 +194,9 @@ bool XMLStyleExport::exportStyle(
GetExport().EncodeStyleName( sParent ) );
// style:next-style-name="..." (paragraph styles only)
- if( xPropSetInfo->hasPropertyByName( sFollowStyle ) )
+ if( xPropSetInfo->hasPropertyByName( gsFollowStyle ) )
{
- aAny = xPropSet->getPropertyValue( sFollowStyle );
+ aAny = xPropSet->getPropertyValue( gsFollowStyle );
OUString sNextName;
aAny >>= sNextName;
if( sName != sNextName )
@@ -206,9 +207,9 @@ bool XMLStyleExport::exportStyle(
}
// style:auto-update="..." (SW only)
- if( xPropSetInfo->hasPropertyByName( sIsAutoUpdate ) )
+ if( xPropSetInfo->hasPropertyByName( gsIsAutoUpdate ) )
{
- aAny = xPropSet->getPropertyValue( sIsAutoUpdate );
+ aAny = xPropSet->getPropertyValue( gsIsAutoUpdate );
if( *o3tl::doAccess<bool>(aAny) )
GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_AUTO_UPDATE,
XML_TRUE );
@@ -216,12 +217,12 @@ bool XMLStyleExport::exportStyle(
// style:default-outline-level"..."
sal_Int32 nOutlineLevel = 0;
- if( xPropSetInfo->hasPropertyByName( sOutlineLevel ) )
+ if( xPropSetInfo->hasPropertyByName( gsOutlineLevel ) )
{
Reference< XPropertyState > xPropState( xPropSet, uno::UNO_QUERY );
- if( PropertyState_DIRECT_VALUE == xPropState->getPropertyState( sOutlineLevel ) )
+ if( PropertyState_DIRECT_VALUE == xPropState->getPropertyState( gsOutlineLevel ) )
{
- aAny = xPropSet->getPropertyValue( sOutlineLevel );
+ aAny = xPropSet->getPropertyValue( gsOutlineLevel );
aAny >>= nOutlineLevel;
if( nOutlineLevel > 0 )
{
@@ -248,13 +249,13 @@ bool XMLStyleExport::exportStyle(
}
// style:list-style-name="..." (SW paragraph styles only)
- if( xPropSetInfo->hasPropertyByName( sNumberingStyleName ) )
+ if( xPropSetInfo->hasPropertyByName( gsNumberingStyleName ) )
{
Reference< XPropertyState > xPropState( xPropSet, uno::UNO_QUERY );
if( PropertyState_DIRECT_VALUE ==
- xPropState->getPropertyState( sNumberingStyleName ) )
+ xPropState->getPropertyState( gsNumberingStyleName ) )
{
- aAny = xPropSet->getPropertyValue( sNumberingStyleName );
+ aAny = xPropSet->getPropertyValue( gsNumberingStyleName );
if( aAny.hasValue() )
{
OUString sListName;
@@ -325,7 +326,7 @@ bool XMLStyleExport::exportStyle(
{
break;
}
- if ( xPropState->getPropertyState( sNumberingStyleName ) == PropertyState_DIRECT_VALUE )
+ if ( xPropState->getPropertyState( gsNumberingStyleName ) == PropertyState_DIRECT_VALUE )
{
bNoInheritedListStyle = false;
break;
@@ -478,7 +479,7 @@ void XMLStyleExport::exportStyleFamily(
Reference< XPropertySetInfo > xPropSetInfo =
xPropSet->getPropertySetInfo();
- if (xPropSetInfo->hasPropertyByName( sFollowStyle ))
+ if (xPropSetInfo->hasPropertyByName( gsFollowStyle ))
pExportedStyles.reset(new std::set<OUString>);
bFirstStyle = false;
}
@@ -512,9 +513,9 @@ void XMLStyleExport::exportStyleFamily(
Reference< XPropertySetInfo > xPropSetInfo( xPropSet->getPropertySetInfo() );
// styles that aren't existing really are ignored.
- if (xPropSetInfo->hasPropertyByName( sIsPhysical ))
+ if (xPropSetInfo->hasPropertyByName( gsIsPhysical ))
{
- Any aAny( xPropSet->getPropertyValue( sIsPhysical ) );
+ Any aAny( xPropSet->getPropertyValue( gsIsPhysical ) );
if (!*o3tl::doAccess<bool>(aAny))
continue;
}
@@ -522,13 +523,13 @@ void XMLStyleExport::exportStyleFamily(
if (!xStyle->isInUse())
continue;
- if (!xPropSetInfo->hasPropertyByName( sFollowStyle ))
+ if (!xPropSetInfo->hasPropertyByName( gsFollowStyle ))
{
continue;
}
OUString sNextName;
- xPropSet->getPropertyValue( sFollowStyle ) >>= sNextName;
+ xPropSet->getPropertyValue( gsFollowStyle ) >>= sNextName;
OUString sTmp( sNextName );
// if the next style hasn't been exported by now, export it now
// and remember its name.
diff --git a/xmloff/source/style/xmlnume.cxx b/xmloff/source/style/xmlnume.cxx
index c2ada9da5dcc..40d128d52621 100644
--- a/xmloff/source/style/xmlnume.cxx
+++ b/xmloff/source/style/xmlnume.cxx
@@ -615,11 +615,12 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel,
}
+static const OUStringLiteral gsNumberingRules( "NumberingRules" );
+static const OUStringLiteral gsIsPhysical( "IsPhysical" );
+static const OUStringLiteral gsIsContinuousNumbering( "IsContinuousNumbering" );
+
SvxXMLNumRuleExport::SvxXMLNumRuleExport( SvXMLExport& rExp ) :
rExport( rExp ),
- sNumberingRules( "NumberingRules" ),
- sIsPhysical( "IsPhysical" ),
- sIsContinuousNumbering( "IsContinuousNumbering" ),
// Let list style creation depend on Load/Save option "ODF format version" (#i89178#)
mbExportPositionAndSpaceModeLabelAlignment( true )
{
@@ -671,9 +672,9 @@ void SvxXMLNumRuleExport::exportNumberingRule(
// text:consecutive-numbering="..."
bool bContNumbering = false;
if( xPropSetInfo.is() &&
- xPropSetInfo->hasPropertyByName( sIsContinuousNumbering ) )
+ xPropSetInfo->hasPropertyByName( gsIsContinuousNumbering ) )
{
- Any aAny( xPropSet->getPropertyValue( sIsContinuousNumbering ) );
+ Any aAny( xPropSet->getPropertyValue( gsIsContinuousNumbering ) );
bContNumbering = *o3tl::doAccess<bool>(aAny);
}
if( bContNumbering )
@@ -696,14 +697,14 @@ void SvxXMLNumRuleExport::exportStyle( const Reference< XStyle >& rStyle )
// Don't export styles that aren't existing really. This may be the
// case for StarOffice Writer's pool styles.
- if( xPropSetInfo->hasPropertyByName( sIsPhysical ) )
+ if( xPropSetInfo->hasPropertyByName( gsIsPhysical ) )
{
- aAny = xPropSet->getPropertyValue( sIsPhysical );
+ aAny = xPropSet->getPropertyValue( gsIsPhysical );
if( !*o3tl::doAccess<bool>(aAny) )
return;
}
- aAny = xPropSet->getPropertyValue( sNumberingRules );
+ aAny = xPropSet->getPropertyValue( gsNumberingRules );
Reference<XIndexReplace> xNumRule;
aAny >>= xNumRule;
diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx
index 1e1f7098cdeb..df5fab3f49ea 100644
--- a/xmloff/source/style/xmlnumi.cxx
+++ b/xmloff/source/style/xmlnumi.cxx
@@ -142,8 +142,6 @@ static const SvXMLTokenMapEntry* lcl_getLevelAttrTokenMap()
class SvxXMLListLevelStyleContext_Impl : public SvXMLImportContext
{
friend class SvxXMLListLevelStyleAttrContext_Impl;
- const OUString sStarBats;
- const OUString sStarMath;
OUString sPrefix;
OUString sSuffix;
@@ -244,15 +242,16 @@ public:
}
};
+static const OUStringLiteral gsStarBats( "StarBats" );
+static const OUStringLiteral gsStarMath( "StarMath" );
+
SvxXMLListLevelStyleContext_Impl::SvxXMLListLevelStyleContext_Impl(
SvXMLImport& rImport, sal_uInt16 nPrfx,
const OUString& rLName,
const Reference< xml::sax::XAttributeList > & xAttrList )
: SvXMLImportContext( rImport, nPrfx, rLName )
-, sStarBats( "StarBats" )
-, sStarMath( "StarMath" )
-, sNumFormat( OUString("1") )
+, sNumFormat( "1" )
, nLevel( -1 )
, nSpaceBefore( 0 )
, nMinLabelWidth( 0 )
@@ -501,12 +500,12 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties()
aFDesc.CharSet = eBulletFontEncoding;
aFDesc.Weight = WEIGHT_DONTKNOW;
bool bStarSymbol = false;
- if( aFDesc.Name.equalsIgnoreAsciiCase( sStarBats ) )
+ if( aFDesc.Name.equalsIgnoreAsciiCase( gsStarBats ) )
{
cBullet = GetImport().ConvStarBatsCharToStarSymbol( cBullet );
bStarSymbol = true;
}
- else if( aFDesc.Name.equalsIgnoreAsciiCase( sStarMath ) )
+ else if( aFDesc.Name.equalsIgnoreAsciiCase( gsStarMath ) )
{
cBullet = GetImport().ConvStarMathCharToStarSymbol( cBullet );
bStarSymbol = true;
@@ -1009,15 +1008,16 @@ void SvxXMLListStyleContext::SetAttribute( sal_uInt16 nPrefixKey,
}
}
+static const OUStringLiteral sIsPhysical( "IsPhysical" );
+static const OUStringLiteral sNumberingRules( "NumberingRules" );
+static const OUStringLiteral sIsContinuousNumbering( "IsContinuousNumbering" );
+
SvxXMLListStyleContext::SvxXMLListStyleContext( SvXMLImport& rImport,
sal_uInt16 nPrfx,
const OUString& rLName,
const Reference< xml::sax::XAttributeList > & xAttrList,
bool bOutl )
: SvXMLStyleContext( rImport, nPrfx, rLName, xAttrList, bOutl ? XML_STYLE_FAMILY_TEXT_OUTLINE : XML_STYLE_FAMILY_TEXT_LIST )
-, sIsPhysical( "IsPhysical" )
-, sNumberingRules( "NumberingRules" )
-, sIsContinuousNumbering( "IsContinuousNumbering" )
, bConsecutive( false )
, bOutline( bOutl )
{
diff --git a/xmloff/source/style/xmlstyle.cxx b/xmloff/source/style/xmlstyle.cxx
index 47e052c67ace..371f0def7735 100644
--- a/xmloff/source/style/xmlstyle.cxx
+++ b/xmloff/source/style/xmlstyle.cxx
@@ -84,6 +84,9 @@ static const SvXMLTokenMapEntry aStyleStylesElemTokenMap[] =
XML_TOKEN_MAP_END
};
+static const OUStringLiteral gsParaStyleServiceName( "com.sun.star.style.ParagraphStyle" );
+static const OUStringLiteral gsTextStyleServiceName( "com.sun.star.style.CharacterStyle" );
+
const SvXMLTokenMap& SvXMLStylesContext::GetStyleStylesElemTokenMap()
{
if( !mpStyleStylesElemTokenMap )
@@ -730,10 +733,10 @@ OUString SvXMLStylesContext::GetServiceName( sal_uInt16 nFamily ) const
switch( nFamily )
{
case XML_STYLE_FAMILY_TEXT_PARAGRAPH:
- sServiceName = msParaStyleServiceName;
+ sServiceName = gsParaStyleServiceName;
break;
case XML_STYLE_FAMILY_TEXT_TEXT:
- sServiceName = msTextStyleServiceName;
+ sServiceName = gsTextStyleServiceName;
break;
}
@@ -744,8 +747,6 @@ SvXMLStylesContext::SvXMLStylesContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
const OUString& rLName,
const uno::Reference< xml::sax::XAttributeList > &, bool bAuto ) :
SvXMLImportContext( rImport, nPrfx, rLName ),
- msParaStyleServiceName( "com.sun.star.style.ParagraphStyle" ),
- msTextStyleServiceName( "com.sun.star.style.CharacterStyle" ),
mpImpl( new SvXMLStylesContext_Impl( bAuto ) ),
mpStyleStylesElemTokenMap( nullptr )
{
diff --git a/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx b/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx
index 31412606573f..633a2151c400 100644
--- a/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx
+++ b/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx
@@ -109,6 +109,18 @@ void XMLFootnoteConfigHelper::Characters( const OUString& rChars )
// XMLFootnoteConfigurationImportContext
+static const OUStringLiteral gsPropertyAnchorCharStyleName("AnchorCharStyleName");
+static const OUStringLiteral gsPropertyCharStyleName("CharStyleName");
+static const OUStringLiteral gsPropertyNumberingType("NumberingType");
+static const OUStringLiteral gsPropertyPageStyleName("PageStyleName");
+static const OUStringLiteral gsPropertyParagraphStyleName("ParaStyleName");
+static const OUStringLiteral gsPropertyPrefix("Prefix");
+static const OUStringLiteral gsPropertyStartAt("StartAt");
+static const OUStringLiteral gsPropertySuffix("Suffix");
+static const OUStringLiteral gsPropertyPositionEndOfDoc("PositionEndOfDoc");
+static const OUStringLiteral gsPropertyFootnoteCounting("FootnoteCounting");
+static const OUStringLiteral gsPropertyEndNotice("EndNotice");
+static const OUStringLiteral gsPropertyBeginNotice("BeginNotice");
XMLFootnoteConfigurationImportContext::XMLFootnoteConfigurationImportContext(
SvXMLImport& rImport,
@@ -116,18 +128,6 @@ XMLFootnoteConfigurationImportContext::XMLFootnoteConfigurationImportContext(
const OUString& rLocalName,
const Reference<XAttributeList> & xAttrList)
: SvXMLStyleContext(rImport, nPrfx, rLocalName, xAttrList, XML_STYLE_FAMILY_TEXT_FOOTNOTECONFIG)
-, sPropertyAnchorCharStyleName("AnchorCharStyleName")
-, sPropertyCharStyleName("CharStyleName")
-, sPropertyNumberingType("NumberingType")
-, sPropertyPageStyleName("PageStyleName")
-, sPropertyParagraphStyleName("ParaStyleName")
-, sPropertyPrefix("Prefix")
-, sPropertyStartAt("StartAt")
-, sPropertySuffix("Suffix")
-, sPropertyPositionEndOfDoc("PositionEndOfDoc")
-, sPropertyFootnoteCounting("FootnoteCounting")
-, sPropertyEndNotice("EndNotice")
-, sPropertyBeginNotice("BeginNotice")
, sNumFormat("1")
, sNumSync("false")
, pAttrTokenMap(nullptr)
@@ -356,33 +356,33 @@ void XMLFootnoteConfigurationImportContext::ProcessSettings(
{
aAny <<= GetImport().GetStyleDisplayName(
XML_STYLE_FAMILY_TEXT_TEXT, sCitationStyle );
- rConfig->setPropertyValue(sPropertyCharStyleName, aAny);
+ rConfig->setPropertyValue(gsPropertyCharStyleName, aAny);
}
if (!sAnchorStyle.isEmpty())
{
aAny <<= GetImport().GetStyleDisplayName(
XML_STYLE_FAMILY_TEXT_TEXT, sAnchorStyle );
- rConfig->setPropertyValue(sPropertyAnchorCharStyleName, aAny);
+ rConfig->setPropertyValue(gsPropertyAnchorCharStyleName, aAny);
}
if (!sPageStyle.isEmpty())
{
aAny <<= GetImport().GetStyleDisplayName(
XML_STYLE_FAMILY_MASTER_PAGE, sPageStyle );
- rConfig->setPropertyValue(sPropertyPageStyleName, aAny);
+ rConfig->setPropertyValue(gsPropertyPageStyleName, aAny);
}
if (!sDefaultStyle.isEmpty())
{
aAny <<= GetImport().GetStyleDisplayName(
XML_STYLE_FAMILY_TEXT_PARAGRAPH, sDefaultStyle );
- rConfig->setPropertyValue(sPropertyParagraphStyleName, aAny);
+ rConfig->setPropertyValue(gsPropertyParagraphStyleName, aAny);
}
- rConfig->setPropertyValue(sPropertyPrefix, Any(sPrefix));
+ rConfig->setPropertyValue(gsPropertyPrefix, Any(sPrefix));
- rConfig->setPropertyValue(sPropertySuffix, Any(sSuffix));
+ rConfig->setPropertyValue(gsPropertySuffix, Any(sSuffix));
sal_Int16 nNumType = NumberingType::ARABIC;
GetImport().GetMM100UnitConverter().convertNumFormat( nNumType, sNumFormat,
@@ -392,16 +392,16 @@ void XMLFootnoteConfigurationImportContext::ProcessSettings(
if( NumberingType::CHAR_SPECIAL == nNumType )
nNumType = NumberingType::ARABIC;
- rConfig->setPropertyValue(sPropertyNumberingType, Any(nNumType));
+ rConfig->setPropertyValue(gsPropertyNumberingType, Any(nNumType));
- rConfig->setPropertyValue(sPropertyStartAt, Any(nOffset));
+ rConfig->setPropertyValue(gsPropertyStartAt, Any(nOffset));
if (!bIsEndnote)
{
- rConfig->setPropertyValue(sPropertyPositionEndOfDoc, Any(bPosition));
- rConfig->setPropertyValue(sPropertyFootnoteCounting, Any(nNumbering));
- rConfig->setPropertyValue(sPropertyEndNotice, Any(sEndNotice));
- rConfig->setPropertyValue(sPropertyBeginNotice, Any(sBeginNotice));
+ rConfig->setPropertyValue(gsPropertyPositionEndOfDoc, Any(bPosition));
+ rConfig->setPropertyValue(gsPropertyFootnoteCounting, Any(nNumbering));
+ rConfig->setPropertyValue(gsPropertyEndNotice, Any(sEndNotice));
+ rConfig->setPropertyValue(gsPropertyBeginNotice, Any(sBeginNotice));
}
}
diff --git a/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx b/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx
index ef696c540a16..b84bc32b38a6 100644
--- a/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx
+++ b/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx
@@ -41,22 +41,23 @@ using ::com::sun::star::beans::XPropertySet;
using ::com::sun::star::lang::XMultiServiceFactory;
+static const OUStringLiteral gsFieldMaster_Bibliography("com.sun.star.text.FieldMaster.Bibliography");
+static const OUStringLiteral gsBracketBefore("BracketBefore");
+static const OUStringLiteral gsBracketAfter("BracketAfter");
+static const OUStringLiteral gsIsNumberEntries("IsNumberEntries");
+static const OUStringLiteral gsIsSortByPosition("IsSortByPosition");
+static const OUStringLiteral gsSortKeys("SortKeys");
+static const OUStringLiteral gsSortKey("SortKey");
+static const OUStringLiteral gsIsSortAscending("IsSortAscending");
+static const OUStringLiteral gsSortAlgorithm("SortAlgorithm");
+static const OUStringLiteral gsLocale("Locale");
+
XMLIndexBibliographyConfigurationContext::XMLIndexBibliographyConfigurationContext(
SvXMLImport& rImport,
sal_uInt16 nPrfx,
const OUString& rLocalName,
const Reference<XAttributeList> & xAttrList) :
SvXMLStyleContext(rImport, nPrfx, rLocalName, xAttrList, XML_STYLE_FAMILY_TEXT_BIBLIOGRAPHYCONFIG),
- sFieldMaster_Bibliography("com.sun.star.text.FieldMaster.Bibliography"),
- sBracketBefore("BracketBefore"),
- sBracketAfter("BracketAfter"),
- sIsNumberEntries("IsNumberEntries"),
- sIsSortByPosition("IsSortByPosition"),
- sSortKeys("SortKeys"),
- sSortKey("SortKey"),
- sIsSortAscending("IsSortAscending"),
- sSortAlgorithm("SortAlgorithm"),
- sLocale("Locale"),
sSuffix(),
sPrefix(),
sAlgorithm(),
@@ -193,12 +194,12 @@ SvXMLImportContextRef XMLIndexBibliographyConfigurationContext::CreateChildConte
Sequence<PropertyValue> aKey(2);
PropertyValue aNameValue;
- aNameValue.Name = sSortKey;
+ aNameValue.Name = gsSortKey;
aNameValue.Value <<= static_cast<sal_Int16>(nKey);
aKey[0] = aNameValue;
PropertyValue aSortValue;
- aSortValue.Name = sIsSortAscending;
+ aSortValue.Name = gsIsSortAscending;
aSortValue.Value <<= bSort;
aKey[1] = aSortValue;
@@ -227,7 +228,7 @@ void XMLIndexBibliographyConfigurationContext::CreateAndInsert(bool)
sal_Int32 nServiceCount(aServices.getLength());
while (i < nServiceCount && !bFound)
{
- if (aServices[i] == sFieldMaster_Bibliography)
+ if (aServices[i] == gsFieldMaster_Bibliography)
// here we should use a method which compares in reverse order if available
bFound = true;
else
@@ -236,26 +237,26 @@ void XMLIndexBibliographyConfigurationContext::CreateAndInsert(bool)
if (bFound)
{
Reference<XInterface> xIfc =
- xFactory->createInstance(sFieldMaster_Bibliography);
+ xFactory->createInstance(gsFieldMaster_Bibliography);
if( xIfc.is() )
{
Reference<XPropertySet> xPropSet( xIfc, UNO_QUERY );
Any aAny;
- xPropSet->setPropertyValue(sBracketAfter, Any(sSuffix));
- xPropSet->setPropertyValue(sBracketBefore, Any(sPrefix));
- xPropSet->setPropertyValue(sIsNumberEntries, Any(bNumberedEntries));
- xPropSet->setPropertyValue(sIsSortByPosition, Any(bSortByPosition));
+ xPropSet->setPropertyValue(gsBracketAfter, Any(sSuffix));
+ xPropSet->setPropertyValue(gsBracketBefore, Any(sPrefix));
+ xPropSet->setPropertyValue(gsIsNumberEntries, Any(bNumberedEntries));
+ xPropSet->setPropertyValue(gsIsSortByPosition, Any(bSortByPosition));
if( !maLanguageTagODF.isEmpty() )
{
aAny <<= maLanguageTagODF.getLanguageTag().getLocale( false);
- xPropSet->setPropertyValue(sLocale, aAny);
+ xPropSet->setPropertyValue(gsLocale, aAny);
}
if( !sAlgorithm.isEmpty() )
{
- xPropSet->setPropertyValue(sSortAlgorithm, Any(sAlgorithm));
+ xPropSet->setPropertyValue(gsSortAlgorithm, Any(sAlgorithm));
}
sal_Int32 nCount = aSortKeys.size();
@@ -264,7 +265,7 @@ void XMLIndexBibliographyConfigurationContext::CreateAndInsert(bool)
{
aKeysSeq[i] = aSortKeys[i];
}
- xPropSet->setPropertyValue(sSortKeys, Any(aKeysSeq));
+ xPropSet->setPropertyValue(gsSortKeys, Any(aKeysSeq));
}
// else: can't get FieldMaster -> ignore
}
diff --git a/xmloff/source/text/XMLLineNumberingImportContext.cxx b/xmloff/source/text/XMLLineNumberingImportContext.cxx
index 4bf0fc2669fc..a02090e901d3 100644
--- a/xmloff/source/text/XMLLineNumberingImportContext.cxx
+++ b/xmloff/source/text/XMLLineNumberingImportContext.cxx
@@ -42,23 +42,24 @@ using ::com::sun::star::xml::sax::XAttributeList;
using ::com::sun::star::text::XLineNumberingProperties;
+static const OUStringLiteral gsCharStyleName("CharStyleName");
+static const OUStringLiteral gsCountEmptyLines("CountEmptyLines");
+static const OUStringLiteral gsCountLinesInFrames("CountLinesInFrames");
+static const OUStringLiteral gsDistance("Distance");
+static const OUStringLiteral gsInterval("Interval");
+static const OUStringLiteral gsSeparatorText("SeparatorText");
+static const OUStringLiteral gsNumberPosition("NumberPosition");
+static const OUStringLiteral gsNumberingType("NumberingType");
+static const OUStringLiteral gsIsOn("IsOn");
+static const OUStringLiteral gsRestartAtEachPage("RestartAtEachPage");
+static const OUStringLiteral gsSeparatorInterval("SeparatorInterval");
+
XMLLineNumberingImportContext::XMLLineNumberingImportContext(
SvXMLImport& rImport,
sal_uInt16 nPrfx,
const OUString& rLocalName,
const Reference<XAttributeList> & xAttrList)
: SvXMLStyleContext(rImport, nPrfx, rLocalName, xAttrList, XML_STYLE_FAMILY_TEXT_LINENUMBERINGCONFIG)
-, sCharStyleName("CharStyleName")
-, sCountEmptyLines("CountEmptyLines")
-, sCountLinesInFrames("CountLinesInFrames")
-, sDistance("Distance")
-, sInterval("Interval")
-, sSeparatorText("SeparatorText")
-, sNumberPosition("NumberPosition")
-, sNumberingType("NumberingType")
-, sIsOn("IsOn")
-, sRestartAtEachPage("RestartAtEachPage")
-, sSeparatorInterval("SeparatorInterval")
, sNumFormat(GetXMLToken(XML_1))
, sNumLetterSync(GetXMLToken(XML_FALSE))
, nOffset(-1)
@@ -226,33 +227,33 @@ void XMLLineNumberingImportContext::CreateAndInsert(bool)
{
aAny <<= GetImport().GetStyleDisplayName(
XML_STYLE_FAMILY_TEXT_TEXT, sStyleName );
- xLineNumbering->setPropertyValue(sCharStyleName, aAny);
+ xLineNumbering->setPropertyValue(gsCharStyleName, aAny);
}
- xLineNumbering->setPropertyValue(sSeparatorText, Any(sSeparator));
- xLineNumbering->setPropertyValue(sDistance, Any(nOffset));
- xLineNumbering->setPropertyValue(sNumberPosition, Any(nNumberPosition));
+ xLineNumbering->setPropertyValue(gsSeparatorText, Any(sSeparator));
+ xLineNumbering->setPropertyValue(gsDistance, Any(nOffset));
+ xLineNumbering->setPropertyValue(gsNumberPosition, Any(nNumberPosition));
if (nIncrement >= 0)
{
- xLineNumbering->setPropertyValue(sInterval, Any(nIncrement));
+ xLineNumbering->setPropertyValue(gsInterval, Any(nIncrement));
}
if (nSeparatorIncrement >= 0)
{
- xLineNumbering->setPropertyValue(sSeparatorInterval, Any(nSeparatorIncrement));
+ xLineNumbering->setPropertyValue(gsSeparatorInterval, Any(nSeparatorIncrement));
}
- xLineNumbering->setPropertyValue(sIsOn, Any(bNumberLines));
- xLineNumbering->setPropertyValue(sCountEmptyLines, Any(bCountEmptyLines));
- xLineNumbering->setPropertyValue(sCountLinesInFrames, Any(bCountInFloatingFrames));
- xLineNumbering->setPropertyValue(sRestartAtEachPage, Any(bRestartNumbering));
+ xLineNumbering->setPropertyValue(gsIsOn, Any(bNumberLines));
+ xLineNumbering->setPropertyValue(gsCountEmptyLines, Any(bCountEmptyLines));
+ xLineNumbering->setPropertyValue(gsCountLinesInFrames, Any(bCountInFloatingFrames));
+ xLineNumbering->setPropertyValue(gsRestartAtEachPage, Any(bRestartNumbering));
sal_Int16 nNumType = NumberingType::ARABIC;
GetImport().GetMM100UnitConverter().convertNumFormat( nNumType,
sNumFormat,
sNumLetterSync );
- xLineNumbering->setPropertyValue(sNumberingType, Any(nNumType));
+ xLineNumbering->setPropertyValue(gsNumberingType, Any(nNumType));
}
}
}
diff --git a/xmloff/source/text/XMLTextColumnsContext.cxx b/xmloff/source/text/XMLTextColumnsContext.cxx
index feff3ca8d05a..0cabdc2ca9ab 100644
--- a/xmloff/source/text/XMLTextColumnsContext.cxx
+++ b/xmloff/source/text/XMLTextColumnsContext.cxx
@@ -236,6 +236,14 @@ XMLTextColumnSepContext_Impl::XMLTextColumnSepContext_Impl(
}
}
+static const OUStringLiteral gsSeparatorLineIsOn("SeparatorLineIsOn");
+static const OUStringLiteral gsSeparatorLineWidth("SeparatorLineWidth");
+static const OUStringLiteral gsSeparatorLineColor("SeparatorLineColor");
+static const OUStringLiteral gsSeparatorLineRelativeHeight("SeparatorLineRelativeHeight");
+static const OUStringLiteral gsSeparatorLineVerticalAlignment("SeparatorLineVerticalAlignment");
+static const OUStringLiteral gsAutomaticDistance("AutomaticDistance");
+static const OUStringLiteral gsSeparatorLineStyle("SeparatorLineStyle");
+
XMLTextColumnsContext::XMLTextColumnsContext(
SvXMLImport& rImport, sal_uInt16 nPrfx,
const OUString& rLName,
@@ -244,13 +252,6 @@ XMLTextColumnsContext::XMLTextColumnsContext(
const XMLPropertyState& rProp,
::std::vector< XMLPropertyState > &rProps )
: XMLElementPropertyContext( rImport, nPrfx, rLName, rProp, rProps )
-, sSeparatorLineIsOn("SeparatorLineIsOn")
-, sSeparatorLineWidth("SeparatorLineWidth")
-, sSeparatorLineColor("SeparatorLineColor")
-, sSeparatorLineRelativeHeight("SeparatorLineRelativeHeight")
-, sSeparatorLineVerticalAlignment("SeparatorLineVerticalAlignment")
-, sAutomaticDistance("AutomaticDistance")
-, sSeparatorLineStyle("SeparatorLineStyle")
, pColumnAttrTokenMap( new SvXMLTokenMap(aColAttrTokenMap) )
, pColumnSepAttrTokenMap( new SvXMLTokenMap(aColSepAttrTokenMap) )
, nCount( 0 )
@@ -398,33 +399,33 @@ void XMLTextColumnsContext::EndElement( )
{
bool bOn = mxColumnSep != nullptr;
- xPropSet->setPropertyValue( sSeparatorLineIsOn, Any(bOn) );
+ xPropSet->setPropertyValue( gsSeparatorLineIsOn, Any(bOn) );
if( mxColumnSep.is() )
{
if( mxColumnSep->GetWidth() )
{
- xPropSet->setPropertyValue( sSeparatorLineWidth, Any(mxColumnSep->GetWidth()) );
+ xPropSet->setPropertyValue( gsSeparatorLineWidth, Any(mxColumnSep->GetWidth()) );
}
if( mxColumnSep->GetHeight() )
{
- xPropSet->setPropertyValue( sSeparatorLineRelativeHeight,
+ xPropSet->setPropertyValue( gsSeparatorLineRelativeHeight,
Any(mxColumnSep->GetHeight()) );
}
if ( mxColumnSep->GetStyle() )
{
- xPropSet->setPropertyValue( sSeparatorLineStyle, Any(mxColumnSep->GetStyle()) );
+ xPropSet->setPropertyValue( gsSeparatorLineStyle, Any(mxColumnSep->GetStyle()) );
}
- xPropSet->setPropertyValue( sSeparatorLineColor, Any(mxColumnSep->GetColor()) );
+ xPropSet->setPropertyValue( gsSeparatorLineColor, Any(mxColumnSep->GetColor()) );
- xPropSet->setPropertyValue( sSeparatorLineVerticalAlignment, Any(mxColumnSep->GetVertAlign()) );
+ xPropSet->setPropertyValue( gsSeparatorLineVerticalAlignment, Any(mxColumnSep->GetVertAlign()) );
}
// handle 'automatic columns': column distance
if( bAutomatic )
{
- xPropSet->setPropertyValue( sAutomaticDistance, Any(nAutomaticDistance) );
+ xPropSet->setPropertyValue( gsAutomaticDistance, Any(nAutomaticDistance) );
}
}
diff --git a/xmloff/source/text/XMLTextColumnsExport.cxx b/xmloff/source/text/XMLTextColumnsExport.cxx
index eca4e3c2734f..84501d2f6653 100644
--- a/xmloff/source/text/XMLTextColumnsExport.cxx
+++ b/xmloff/source/text/XMLTextColumnsExport.cxx
@@ -43,16 +43,17 @@ using namespace ::com::sun::star::beans;
using namespace ::xmloff::token;
+static const OUStringLiteral gsSeparatorLineIsOn("SeparatorLineIsOn");
+static const OUStringLiteral gsSeparatorLineWidth("SeparatorLineWidth");
+static const OUStringLiteral gsSeparatorLineColor("SeparatorLineColor");
+static const OUStringLiteral gsSeparatorLineRelativeHeight("SeparatorLineRelativeHeight");
+static const OUStringLiteral gsSeparatorLineVerticalAlignment("SeparatorLineVerticalAlignment");
+static const OUStringLiteral gsIsAutomatic("IsAutomatic");
+static const OUStringLiteral gsAutomaticDistance("AutomaticDistance");
+static const OUStringLiteral gsSeparatorLineStyle("SeparatorLineStyle");
+
XMLTextColumnsExport::XMLTextColumnsExport( SvXMLExport& rExp ) :
- rExport( rExp ),
- sSeparatorLineIsOn("SeparatorLineIsOn"),
- sSeparatorLineWidth("SeparatorLineWidth"),
- sSeparatorLineColor("SeparatorLineColor"),
- sSeparatorLineRelativeHeight("SeparatorLineRelativeHeight"),
- sSeparatorLineVerticalAlignment("SeparatorLineVerticalAlignment"),
- sIsAutomatic("IsAutomatic"),
- sAutomaticDistance("AutomaticDistance"),
- sSeparatorLineStyle("SeparatorLineStyle")
+ rExport( rExp )
{
}
@@ -73,10 +74,10 @@ void XMLTextColumnsExport::exportXML( const Any& rAny )
Reference < XPropertySet > xPropSet( xColumns, UNO_QUERY );
if( xPropSet.is() )
{
- Any aAny = xPropSet->getPropertyValue( sIsAutomatic );
+ Any aAny = xPropSet->getPropertyValue( gsIsAutomatic );
if ( *o3tl::doAccess<bool>(aAny) )
{
- aAny = xPropSet->getPropertyValue( sAutomaticDistance );
+ aAny = xPropSet->getPropertyValue( gsAutomaticDistance );
sal_Int32 nDistance = 0;
aAny >>= nDistance;
OUStringBuffer aBuffer;
@@ -93,11 +94,11 @@ void XMLTextColumnsExport::exportXML( const Any& rAny )
if( xPropSet.is() )
{
- Any aAny = xPropSet->getPropertyValue( sSeparatorLineIsOn );
+ Any aAny = xPropSet->getPropertyValue( gsSeparatorLineIsOn );
if( *o3tl::doAccess<bool>(aAny) )
{
// style:width
- aAny = xPropSet->getPropertyValue( sSeparatorLineWidth );
+ aAny = xPropSet->getPropertyValue( gsSeparatorLineWidth );
sal_Int32 nWidth = 0;
aAny >>= nWidth;
GetExport().GetMM100UnitConverter().convertMeasureToXML( sValue,
@@ -106,7 +107,7 @@ void XMLTextColumnsExport::exportXML( const Any& rAny )
sValue.makeStringAndClear() );
// style:color
- aAny = xPropSet->getPropertyValue( sSeparatorLineColor );
+ aAny = xPropSet->getPropertyValue( gsSeparatorLineColor );
sal_Int32 nColor = 0;
aAny >>= nColor;
::sax::Converter::convertColor( sValue, nColor );
@@ -114,7 +115,7 @@ void XMLTextColumnsExport::exportXML( const Any& rAny )
sValue.makeStringAndClear() );
// style:height
- aAny = xPropSet->getPropertyValue( sSeparatorLineRelativeHeight );
+ aAny = xPropSet->getPropertyValue( gsSeparatorLineRelativeHeight );
sal_Int8 nHeight = 0;
aAny >>= nHeight;
::sax::Converter::convertPercent( sValue, nHeight );
@@ -122,7 +123,7 @@ void XMLTextColumnsExport::exportXML( const Any& rAny )
sValue.makeStringAndClear() );
// style::style
- aAny = xPropSet->getPropertyValue( sSeparatorLineStyle );
+ aAny = xPropSet->getPropertyValue( gsSeparatorLineStyle );
sal_Int8 nStyle = 0;
aAny >>= nStyle;
@@ -140,7 +141,7 @@ void XMLTextColumnsExport::exportXML( const Any& rAny )
GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_STYLE, eStr );
// style:vertical-align
- aAny = xPropSet->getPropertyValue( sSeparatorLineVerticalAlignment );
+ aAny = xPropSet->getPropertyValue( gsSeparatorLineVerticalAlignment );
VerticalAlignment eVertAlign;
aAny >>= eVertAlign;
diff --git a/xmloff/source/text/XMLTextMasterPageContext.cxx b/xmloff/source/text/XMLTextMasterPageContext.cxx
index f679c7d2d273..9d298aa730bc 100644
--- a/xmloff/source/text/XMLTextMasterPageContext.cxx
+++ b/xmloff/source/text/XMLTextMasterPageContext.cxx
@@ -59,12 +59,13 @@ Reference < XStyle > XMLTextMasterPageContext::Create()
return xNewStyle;
}
+static const OUStringLiteral gsFollowStyle( "FollowStyle" );
+
XMLTextMasterPageContext::XMLTextMasterPageContext( SvXMLImport& rImport,
sal_uInt16 nPrfx, const OUString& rLName,
const Reference< XAttributeList > & xAttrList,
bool bOverwrite )
: SvXMLStyleContext( rImport, nPrfx, rLName, xAttrList, XML_STYLE_FAMILY_MASTER_PAGE )
-, sFollowStyle( "FollowStyle" )
, bInsertHeader( false )
, bInsertFooter( false )
, bInsertHeaderLeft( false )
@@ -271,7 +272,7 @@ void XMLTextMasterPageContext::Finish( bool bOverwrite )
Reference< XPropertySetInfo > xPropSetInfo =
xPropSet->getPropertySetInfo();
- if( xPropSetInfo->hasPropertyByName( sFollowStyle ) )
+ if( xPropSetInfo->hasPropertyByName( gsFollowStyle ) )
{
OUString sDisplayFollow(
GetImport().GetStyleDisplayName(
@@ -280,12 +281,12 @@ void XMLTextMasterPageContext::Finish( bool bOverwrite )
!xPageStyles->hasByName( sDisplayFollow ) )
sDisplayFollow = xStyle->getName();
- Any aAny = xPropSet->getPropertyValue( sFollowStyle );
+ Any aAny = xPropSet->getPropertyValue( gsFollowStyle );
OUString sCurrFollow;
aAny >>= sCurrFollow;
if( sCurrFollow != sDisplayFollow )
{
- xPropSet->setPropertyValue( sFollowStyle, Any(sDisplayFollow) );
+ xPropSet->setPropertyValue( gsFollowStyle, Any(sDisplayFollow) );
}
}
diff --git a/xmloff/source/text/XMLTextMasterPageExport.cxx b/xmloff/source/text/XMLTextMasterPageExport.cxx
index 9aed4eac2823..f2adab2600fa 100644
--- a/xmloff/source/text/XMLTextMasterPageExport.cxx
+++ b/xmloff/source/text/XMLTextMasterPageExport.cxx
@@ -32,19 +32,20 @@ using namespace ::com::sun::star::text;
using namespace ::com::sun::star::beans;
using namespace ::xmloff::token;
+static const OUStringLiteral gsHeaderText( "HeaderText" );
+static const OUStringLiteral gsHeaderOn( "HeaderIsOn" );
+static const OUStringLiteral gsHeaderShareContent( "HeaderIsShared" );
+static const OUStringLiteral gsHeaderTextFirst( "HeaderTextFirst" );
+static const OUStringLiteral gsHeaderTextLeft( "HeaderTextLeft" );
+static const OUStringLiteral gsFirstShareContent( "FirstIsShared" );
+static const OUStringLiteral gsFooterText( "FooterText" );
+static const OUStringLiteral gsFooterOn( "FooterIsOn" );
+static const OUStringLiteral gsFooterShareContent( "FooterIsShared" );
+static const OUStringLiteral gsFooterTextFirst( "FooterTextFirst" );
+static const OUStringLiteral gsFooterTextLeft( "FooterTextLeft" );
+
XMLTextMasterPageExport::XMLTextMasterPageExport( SvXMLExport& rExp ) :
- XMLPageExport( rExp ),
- sHeaderText( "HeaderText" ),
- sHeaderOn( "HeaderIsOn" ),
- sHeaderShareContent( "HeaderIsShared" ),
- sHeaderTextFirst( "HeaderTextFirst" ),
- sHeaderTextLeft( "HeaderTextLeft" ),
- sFirstShareContent( "FirstIsShared" ),
- sFooterText( "FooterText" ),
- sFooterOn( "FooterIsOn" ),
- sFooterShareContent( "FooterIsShared" ),
- sFooterTextFirst( "FooterTextFirst" ),
- sFooterTextLeft( "FooterTextLeft" )
+ XMLPageExport( rExp )
{
}
@@ -83,27 +84,27 @@ void XMLTextMasterPageExport::exportMasterPageContent(
Any aAny;
Reference < XText > xHeaderText;
- aAny = rPropSet->getPropertyValue( sHeaderText );
+ aAny = rPropSet->getPropertyValue( gsHeaderText );
aAny >>= xHeaderText;
Reference < XText > xHeaderTextFirst;
- aAny = rPropSet->getPropertyValue( sHeaderTextFirst );
+ aAny = rPropSet->getPropertyValue( gsHeaderTextFirst );
aAny >>= xHeaderTextFirst;
Reference < XText > xHeaderTextLeft;
- aAny = rPropSet->getPropertyValue( sHeaderTextLeft );
+ aAny = rPropSet->getPropertyValue( gsHeaderTextLeft );
aAny >>= xHeaderTextLeft;
Reference < XText > xFooterText;
- aAny = rPropSet->getPropertyValue( sFooterText );
+ aAny = rPropSet->getPropertyValue( gsFooterText );
aAny >>= xFooterText;
Reference < XText > xFooterTextFirst;
- aAny = rPropSet->getPropertyValue( sFooterTextFirst );
+ aAny = rPropSet->getPropertyValue( gsFooterTextFirst );
aAny >>= xFooterTextFirst;
Reference < XText > xFooterTextLeft;
- aAny = rPropSet->getPropertyValue( sFooterTextLeft );
+ aAny = rPropSet->getPropertyValue( gsFooterTextLeft );
aAny >>= xFooterTextLeft;
if( bAutoStyles )
@@ -123,21 +124,21 @@ void XMLTextMasterPageExport::exportMasterPageContent(
}
else
{
- aAny = rPropSet->getPropertyValue( sHeaderOn );
+ aAny = rPropSet->getPropertyValue( gsHeaderOn );
bool bHeader = false;
aAny >>= bHeader;
bool bHeaderFirstShared = false;
if( bHeader )
{
- aAny = rPropSet->getPropertyValue( sFirstShareContent );
+ aAny = rPropSet->getPropertyValue( gsFirstShareContent );
aAny >>= bHeaderFirstShared;
}
bool bHeaderLeftShared = false;
if( bHeader )
{
- aAny = rPropSet->getPropertyValue( sHeaderShareContent );
+ aAny = rPropSet->getPropertyValue( gsHeaderShareContent );
aAny >>= bHeaderLeftShared;
}
@@ -171,21 +172,21 @@ void XMLTextMasterPageExport::exportMasterPageContent(
exportHeaderFooterContent( xHeaderTextFirst, false );
}
- aAny = rPropSet->getPropertyValue( sFooterOn );
+ aAny = rPropSet->getPropertyValue( gsFooterOn );
bool bFooter = false;
aAny >>= bFooter;
bool bFooterFirstShared = false;
if( bFooter )
{
- aAny = rPropSet->getPropertyValue( sFirstShareContent );
+ aAny = rPropSet->getPropertyValue( gsFirstShareContent );
aAny >>= bFooterFirstShared;
}
bool bFooterLeftShared = false;
if( bFooter )
{
- aAny = rPropSet->getPropertyValue( sFooterShareContent );
+ aAny = rPropSet->getPropertyValue( gsFooterShareContent );
aAny >>= bFooterLeftShared;
}
diff --git a/xmloff/source/text/XMLTextShapeImportHelper.cxx b/xmloff/source/text/XMLTextShapeImportHelper.cxx
index 0d42e9a3b183..2fbad1717326 100644
--- a/xmloff/source/text/XMLTextShapeImportHelper.cxx
+++ b/xmloff/source/text/XMLTextShapeImportHelper.cxx
@@ -39,14 +39,15 @@ using namespace ::com::sun::star::text;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::xml::sax;
+static const OUStringLiteral gsAnchorType("AnchorType");
+static const OUStringLiteral gsAnchorPageNo("AnchorPageNo");
+static const OUStringLiteral gsVertOrientPosition("VertOrientPosition");
+
XMLTextShapeImportHelper::XMLTextShapeImportHelper(
SvXMLImport& rImp ) :
XMLShapeImportHelper( rImp, rImp.GetModel(),
XMLTextImportHelper::CreateShapeExtPropMapper(rImp) ),
- rImport( rImp ),
- sAnchorType("AnchorType"),
- sAnchorPageNo("AnchorPageNo"),
- sVertOrientPosition("VertOrientPosition")
+ rImport( rImp )
{
Reference < XDrawPageSupplier > xDPS( rImp.GetModel(), UNO_QUERY );
if( xDPS.is() )
@@ -121,7 +122,7 @@ void XMLTextShapeImportHelper::addShape(
Reference < XPropertySet > xPropSet( rShape, UNO_QUERY );
// anchor type
- xPropSet->setPropertyValue( sAnchorType, Any(eAnchorType) );
+ xPropSet->setPropertyValue( gsAnchorType, Any(eAnchorType) );
Reference < XTextContent > xTxtCntnt( rShape, UNO_QUERY );
xTxtImport->InsertTextContent( xTxtCntnt );
@@ -134,11 +135,11 @@ void XMLTextShapeImportHelper::addShape(
// only set positive page numbers
if ( nPage > 0 )
{
- xPropSet->setPropertyValue( sAnchorPageNo, Any(nPage) );
+ xPropSet->setPropertyValue( gsAnchorPageNo, Any(nPage) );
}
break;
case TextContentAnchorType_AS_CHARACTER:
- xPropSet->setPropertyValue( sVertOrientPosition, Any(nY) );
+ xPropSet->setPropertyValue( gsVertOrientPosition, Any(nY) );
break;
default:
break;
diff --git a/xmloff/source/text/XMLTextShapeStyleContext.cxx b/xmloff/source/text/XMLTextShapeStyleContext.cxx
index 2608afdcff9a..c785a967ad52 100644
--- a/xmloff/source/text/XMLTextShapeStyleContext.cxx
+++ b/xmloff/source/text/XMLTextShapeStyleContext.cxx
@@ -134,13 +134,14 @@ void XMLTextShapeStyleContext::SetAttribute( sal_uInt16 nPrefixKey,
}
+static const OUStringLiteral gsIsAutoUpdate( "IsAutoUpdate" );
+
XMLTextShapeStyleContext::XMLTextShapeStyleContext( SvXMLImport& rImport,
sal_uInt16 nPrfx, const OUString& rLName,
const Reference< XAttributeList > & xAttrList,
SvXMLStylesContext& rStyles, sal_uInt16 nFamily ) :
XMLShapeStyleContext( rImport, nPrfx, rLName, xAttrList, rStyles,
nFamily ),
- sIsAutoUpdate( "IsAutoUpdate" ),
bAutoUpdate( false )
{
}
@@ -204,10 +205,10 @@ void XMLTextShapeStyleContext::CreateAndInsert( bool bOverwrite )
Reference < XPropertySet > xPropSet( xStyle, UNO_QUERY );
Reference< XPropertySetInfo > xPropSetInfo =
xPropSet->getPropertySetInfo();
- if( xPropSetInfo->hasPropertyByName( sIsAutoUpdate ) )
+ if( xPropSetInfo->hasPropertyByName( gsIsAutoUpdate ) )
{
bool bTmp = bAutoUpdate;
- xPropSet->setPropertyValue( sIsAutoUpdate, Any(bTmp) );
+ xPropSet->setPropertyValue( gsIsAutoUpdate, Any(bTmp) );
}
// tell the style about it's events (if applicable)
diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx
index 87ed6f8ff62f..63bbb7cee2ca 100644
--- a/xmloff/source/text/txtflde.cxx
+++ b/xmloff/source/text/txtflde.cxx
@@ -272,80 +272,83 @@ inline Sequence<OUString> const GetStringSequenceProperty(
const Reference<XPropertySet> & xPropSet);
+ // service names
+static const OUStringLiteral gsServicePrefix("com.sun.star.text.textfield.");
+static const OUStringLiteral gsFieldMasterPrefix("com.sun.star.text.FieldMaster.");
+static const OUStringLiteral gsPresentationServicePrefix("com.sun.star.presentation.TextField.");
+
+ // property names
+static const OUStringLiteral gsPropertyAdjust("Adjust");
+static const OUStringLiteral gsPropertyAuthor("Author");
+static const OUStringLiteral gsPropertyChapterFormat("ChapterFormat");
+static const OUStringLiteral gsPropertyChapterNumberingLevel("ChapterNumberingLevel");
+static const OUStringLiteral gsPropertyCharStyleNames("CharStyleNames");
+static const OUStringLiteral gsPropertyCondition("Condition");
+static const OUStringLiteral gsPropertyContent("Content");
+static const OUStringLiteral gsPropertyDataBaseName("DataBaseName");
+static const OUStringLiteral gsPropertyDataBaseURL("DataBaseURL");
+static const OUStringLiteral gsPropertyDataColumnName("DataColumnName");
+static const OUStringLiteral gsPropertyDataCommandType("DataCommandType");
+static const OUStringLiteral gsPropertyDataTableName("DataTableName");
+static const OUStringLiteral gsPropertyDateTime("DateTime");
+static const OUStringLiteral gsPropertyDateTimeValue("DateTimeValue");
+static const OUStringLiteral gsPropertyDDECommandElement("DDECommandElement");
+static const OUStringLiteral gsPropertyDDECommandFile("DDECommandFile");
+static const OUStringLiteral gsPropertyDDECommandType("DDECommandType");
+static const OUStringLiteral gsPropertyDependentTextFields("DependentTextFields");
+static const OUStringLiteral gsPropertyFalseContent("FalseContent");
+static const OUStringLiteral gsPropertyFields("Fields");
+static const OUStringLiteral gsPropertyFieldSubType("UserDataType");
+static const OUStringLiteral gsPropertyFileFormat("FileFormat");
+static const OUStringLiteral gsPropertyFullName("FullName");
+static const OUStringLiteral gsPropertyHint("Hint");
+static const OUStringLiteral gsPropertyInitials("Initials");
+static const OUStringLiteral gsPropertyInstanceName("InstanceName");
+static const OUStringLiteral gsPropertyIsAutomaticUpdate("IsAutomaticUpdate");
+static const OUStringLiteral gsPropertyIsConditionTrue("IsConditionTrue");
+static const OUStringLiteral gsPropertyIsDataBaseFormat("DataBaseFormat");
+static const OUStringLiteral gsPropertyIsDate("IsDate");
+static const OUStringLiteral gsPropertyIsExpression("IsExpression");
+static const OUStringLiteral gsPropertyIsFixed("IsFixed");
+static const OUStringLiteral gsPropertyIsFixedLanguage("IsFixedLanguage");
+static const OUStringLiteral gsPropertyIsHidden("IsHidden");
+static const OUStringLiteral gsPropertyIsInput("Input");
+static const OUStringLiteral gsPropertyIsShowFormula("IsShowFormula");
+static const OUStringLiteral gsPropertyIsVisible("IsVisible");
+static const OUStringLiteral gsPropertyItems("Items");
+static const OUStringLiteral gsPropertyLevel("Level");
+static const OUStringLiteral gsPropertyMeasureKind("Kind");
+static const OUStringLiteral gsPropertyName("Name");
+static const OUStringLiteral gsPropertyNumberFormat("NumberFormat");
+static const OUStringLiteral gsPropertyNumberingSeparator("NumberingSeparator");
+static const OUStringLiteral gsPropertyNumberingType("NumberingType");
+static const OUStringLiteral gsPropertyOffset("Offset");
+static const OUStringLiteral gsPropertyOn("On");
+static const OUStringLiteral gsPropertyPlaceholderType("PlaceHolderType");
+static const OUStringLiteral gsPropertyReferenceFieldPart("ReferenceFieldPart");
+static const OUStringLiteral gsPropertyReferenceFieldSource("ReferenceFieldSource");
+static const OUStringLiteral gsPropertyReferenceFieldLanguage("ReferenceFieldLanguage");
+static const OUStringLiteral gsPropertyScriptType("ScriptType");
+static const OUStringLiteral gsPropertySelectedItem("SelectedItem");
+static const OUStringLiteral gsPropertySequenceNumber("SequenceNumber");
+static const OUStringLiteral gsPropertySequenceValue("SequenceValue");
+static const OUStringLiteral gsPropertySetNumber("SetNumber");
+static const OUStringLiteral gsPropertySourceName("SourceName");
+static const OUStringLiteral gsPropertySubType("SubType");
+static const OUStringLiteral gsPropertyTargetFrame("TargetFrame");
+static const OUStringLiteral gsPropertyTrueContent("TrueContent");
+static const OUStringLiteral gsPropertyURL("URL");
+static const OUStringLiteral gsPropertyURLContent("URLContent");
+static const OUStringLiteral gsPropertyUserText("UserText");
+static const OUStringLiteral gsPropertyValue("Value");
+static const OUStringLiteral gsPropertyVariableName("VariableName");
+static const OUStringLiteral gsPropertyHelp("Help");
+static const OUStringLiteral gsPropertyTooltip("Tooltip");
+static const OUStringLiteral gsPropertyTextRange("TextRange");
+
XMLTextFieldExport::XMLTextFieldExport( SvXMLExport& rExp,
std::unique_ptr<XMLPropertyState> pCombinedCharState)
: rExport(rExp),
- sServicePrefix("com.sun.star.text.textfield."),
- sFieldMasterPrefix("com.sun.star.text.FieldMaster."),
- sPresentationServicePrefix("com.sun.star.presentation.TextField."),
-
- sPropertyAdjust("Adjust"),
- sPropertyAuthor("Author"),
- sPropertyChapterFormat("ChapterFormat"),
- sPropertyChapterNumberingLevel("ChapterNumberingLevel"),
- sPropertyCharStyleNames("CharStyleNames"),
- sPropertyCondition("Condition"),
- sPropertyContent("Content"),
- sPropertyDataBaseName("DataBaseName"),
- sPropertyDataBaseURL("DataBaseURL"),
- sPropertyDataColumnName("DataColumnName"),
- sPropertyDataCommandType("DataCommandType"),
- sPropertyDataTableName("DataTableName"),
- sPropertyDateTime("DateTime"),
- sPropertyDateTimeValue("DateTimeValue"),
- sPropertyDDECommandElement("DDECommandElement"),
- sPropertyDDECommandFile("DDECommandFile"),
- sPropertyDDECommandType("DDECommandType"),
- sPropertyDependentTextFields("DependentTextFields"),
- sPropertyFalseContent("FalseContent"),
- sPropertyFields("Fields"),
- sPropertyFieldSubType("UserDataType"),
- sPropertyFileFormat("FileFormat"),
- sPropertyFullName("FullName"),
- sPropertyHint("Hint"),
- sPropertyInitials("Initials"),
- sPropertyInstanceName("InstanceName"),
- sPropertyIsAutomaticUpdate("IsAutomaticUpdate"),
- sPropertyIsConditionTrue("IsConditionTrue"),
- sPropertyIsDataBaseFormat("DataBaseFormat"),
- sPropertyIsDate("IsDate"),
- sPropertyIsExpression("IsExpression"),
- sPropertyIsFixed("IsFixed"),
- sPropertyIsFixedLanguage("IsFixedLanguage"),
- sPropertyIsHidden("IsHidden"),
- sPropertyIsInput("Input"),
- sPropertyIsShowFormula("IsShowFormula"),
- sPropertyIsVisible("IsVisible"),
- sPropertyItems("Items"),
- sPropertyLevel("Level"),
- sPropertyMeasureKind("Kind"),
- sPropertyName("Name"),
- sPropertyNumberFormat("NumberFormat"),
- sPropertyNumberingSeparator("NumberingSeparator"),
- sPropertyNumberingType("NumberingType"),
- sPropertyOffset("Offset"),
- sPropertyOn("On"),
- sPropertyPlaceholderType("PlaceHolderType"),
- sPropertyReferenceFieldPart("ReferenceFieldPart"),
- sPropertyReferenceFieldSource("ReferenceFieldSource"),
- sPropertyReferenceFieldLanguage("ReferenceFieldLanguage"),
- sPropertyScriptType("ScriptType"),
- sPropertySelectedItem("SelectedItem"),
- sPropertySequenceNumber("SequenceNumber"),
- sPropertySequenceValue("SequenceValue"),
- sPropertySetNumber("SetNumber"),
- sPropertySourceName("SourceName"),
- sPropertySubType("SubType"),
- sPropertyTargetFrame("TargetFrame"),
- sPropertyTrueContent("TrueContent"),
- sPropertyURL("URL"),
- sPropertyURLContent("URLContent"),
- sPropertyUserText("UserText"),
- sPropertyValue("Value"),
- sPropertyVariableName("VariableName"),
- sPropertyHelp("Help"),
- sPropertyTooltip("Tooltip"),
- sPropertyTextRange("TextRange"),
pCombinedCharactersPropertyState(std::move(pCombinedCharState))
{
SetExportOnlyUsedFieldDeclarations();
@@ -371,10 +374,10 @@ enum FieldIdEnum XMLTextFieldExport::GetFieldID(
// search for TextField service name
while( nCount-- )
{
- if (pNames->matchIgnoreAsciiCase(sServicePrefix))
+ if (pNames->matchIgnoreAsciiCase(gsServicePrefix))
{
// TextField found => postfix is field type!
- sFieldName = pNames->copy(sServicePrefix.getLength());
+ sFieldName = pNames->copy(gsServicePrefix.getLength());
break;
}
@@ -389,10 +392,10 @@ enum FieldIdEnum XMLTextFieldExport::GetFieldID(
// search for TextField service name
while( nCount2-- )
{
- if( pNames2->startsWith(sPresentationServicePrefix) )
+ if( pNames2->startsWith(gsPresentationServicePrefix) )
{
// TextField found => postfix is field type!
- sFieldName = pNames2->copy(sPresentationServicePrefix.getLength());
+ sFieldName = pNames2->copy(gsPresentationServicePrefix.getLength());
break;
}
@@ -449,13 +452,13 @@ enum FieldIdEnum XMLTextFieldExport::MapFieldName(
// b) map prelim. to final FIELD_IDs
switch (nToken) {
case FIELD_ID_VARIABLE_SET:
- if (GetBoolProperty(sPropertyIsInput, xPropSet))
+ if (GetBoolProperty(gsPropertyIsInput, xPropSet))
{
nToken = FIELD_ID_VARIABLE_INPUT;
}
else
{
- switch (GetIntProperty(sPropertySubType, xPropSet))
+ switch (GetIntProperty(gsPropertySubType, xPropSet))
{
case SetVariableType::STRING: // text field
case SetVariableType::VAR: // num field
@@ -473,7 +476,7 @@ enum FieldIdEnum XMLTextFieldExport::MapFieldName(
break;
case FIELD_ID_VARIABLE_GET:
- switch (GetIntProperty(sPropertySubType, xPropSet))
+ switch (GetIntProperty(gsPropertySubType, xPropSet))
{
case SetVariableType::STRING: // text field
case SetVariableType::VAR: // num field
@@ -490,7 +493,7 @@ enum FieldIdEnum XMLTextFieldExport::MapFieldName(
break;
case FIELD_ID_TIME:
- if (GetBoolProperty(sPropertyIsDate, xPropSet))
+ if (GetBoolProperty(gsPropertyIsDate, xPropSet))
{
nToken = FIELD_ID_DATE;
}
@@ -499,10 +502,10 @@ enum FieldIdEnum XMLTextFieldExport::MapFieldName(
case FIELD_ID_PAGENUMBER:
// NumberingType not available in non-Writer apps
if (xPropSet->getPropertySetInfo()->
- hasPropertyByName(sPropertyNumberingType))
+ hasPropertyByName(gsPropertyNumberingType))
{
if (NumberingType::CHAR_SPECIAL == GetIntProperty(
- sPropertyNumberingType, xPropSet))
+ gsPropertyNumberingType, xPropSet))
{
nToken = FIELD_ID_PAGESTRING;
}
@@ -510,28 +513,28 @@ enum FieldIdEnum XMLTextFieldExport::MapFieldName(
break;
case FIELD_ID_DOCINFO_CREATION_TIME:
- if (GetBoolProperty(sPropertyIsDate, xPropSet))
+ if (GetBoolProperty(gsPropertyIsDate, xPropSet))
{
nToken = FIELD_ID_DOCINFO_CREATION_DATE;
}
break;
case FIELD_ID_DOCINFO_PRINT_TIME:
- if (GetBoolProperty(sPropertyIsDate, xPropSet))
+ if (GetBoolProperty(gsPropertyIsDate, xPropSet))
{
nToken = FIELD_ID_DOCINFO_PRINT_DATE;
}
break;
case FIELD_ID_DOCINFO_SAVE_TIME:
- if (GetBoolProperty(sPropertyIsDate, xPropSet))
+ if (GetBoolProperty(gsPropertyIsDate, xPropSet))
{
nToken = FIELD_ID_DOCINFO_SAVE_DATE;
}
break;
case FIELD_ID_REF_REFERENCE:
- switch (GetInt16Property(sPropertyReferenceFieldSource, xPropSet))
+ switch (GetInt16Property(gsPropertyReferenceFieldSource, xPropSet))
{
case ReferenceFieldSource::REFERENCE_MARK:
nToken = FIELD_ID_REF_REFERENCE;
@@ -626,7 +629,7 @@ bool XMLTextFieldExport::IsStringField(
case FIELD_ID_VARIABLE_INPUT:
{
// depends on field sub type
- return ( GetIntProperty(sPropertySubType, xPropSet) ==
+ return ( GetIntProperty(gsPropertySubType, xPropSet) ==
SetVariableType::STRING );
}
@@ -635,18 +638,18 @@ bool XMLTextFieldExport::IsStringField(
{
Reference<XTextField> xTextField(xPropSet, UNO_QUERY);
DBG_ASSERT(xTextField.is(), "field is no XTextField!");
- bool bRet = GetBoolProperty(sPropertyIsExpression,
+ bool bRet = GetBoolProperty(gsPropertyIsExpression,
GetMasterPropertySet(xTextField));
return !bRet;
}
case FIELD_ID_META:
- return 0 > GetIntProperty(sPropertyNumberFormat, xPropSet);
+ return 0 > GetIntProperty(gsPropertyNumberFormat, xPropSet);
case FIELD_ID_DATABASE_DISPLAY:
// TODO: depends on... ???
// workaround #no-bug#: no data type
- return 5100 == GetIntProperty(sPropertyNumberFormat, xPropSet);
+ return 5100 == GetIntProperty(gsPropertyNumberFormat, xPropSet);
case FIELD_ID_TABLE_FORMULA:
// legacy field: always a number field (because it always has
@@ -760,7 +763,7 @@ void XMLTextFieldExport::ExportFieldAutoStyle(
// insert this text field master
OUString sFieldMasterName = GetStringProperty(
- sPropertyInstanceName, xDepField->getTextFieldMaster());
+ gsPropertyInstanceName, xDepField->getTextFieldMaster());
if (!sFieldMasterName.isEmpty())
aMapIter->second.insert( sFieldMasterName );
}
@@ -785,10 +788,10 @@ void XMLTextFieldExport::ExportFieldAutoStyle(
case FIELD_ID_DATABASE_DISPLAY:
{
- sal_Int32 nFormat = GetIntProperty(sPropertyNumberFormat, xPropSet);
+ sal_Int32 nFormat = GetIntProperty(gsPropertyNumberFormat, xPropSet);
// workaround: #no-bug#; see IsStringField(...)
if ( (5100 != nFormat) &&
- !GetBoolProperty(sPropertyIsDataBaseFormat, xPropSet) )
+ !GetBoolProperty(gsPropertyIsDataBaseFormat, xPropSet) )
{
GetExport().addDataStyle(nFormat);
}
@@ -803,17 +806,17 @@ void XMLTextFieldExport::ExportFieldAutoStyle(
// support it)
Reference<XPropertySetInfo> xPropSetInfo(
xPropSet->getPropertySetInfo() );
- if ( xPropSetInfo->hasPropertyByName( sPropertyNumberFormat ) )
+ if ( xPropSetInfo->hasPropertyByName( gsPropertyNumberFormat ) )
{
sal_Int32 nFormat =
- GetIntProperty(sPropertyNumberFormat, xPropSet);
+ GetIntProperty(gsPropertyNumberFormat, xPropSet);
// nFormat may be -1 for numeric fields that display their
// variable name. (Maybe this should be a field type, then?)
if (nFormat != -1)
{
if( ! GetOptionalBoolProperty(
- sPropertyIsFixedLanguage,
+ gsPropertyIsFixedLanguage,
xPropSet, xPropSetInfo, false ) )
{
nFormat =
@@ -853,7 +856,7 @@ void XMLTextFieldExport::ExportFieldAutoStyle(
if (! IsStringField(nToken, xPropSet)) {
sal_Int32 nFormat =
- GetIntProperty(sPropertyNumberFormat, xPropSet);
+ GetIntProperty(gsPropertyNumberFormat, xPropSet);
// nFormat may be -1 for numeric fields that display their
// variable name. (Maybe this should be a field type, then?)
@@ -863,7 +866,7 @@ void XMLTextFieldExport::ExportFieldAutoStyle(
// for all these fields (except table formula)
if( ( nToken != FIELD_ID_TABLE_FORMULA ) &&
! GetOptionalBoolProperty(
- sPropertyIsFixedLanguage,
+ gsPropertyIsFixedLanguage,
xPropSet, xPropSet->getPropertySetInfo(),
false ) )
{
@@ -1017,7 +1020,7 @@ void XMLTextFieldExport::ExportField(
GetExport().GetTextParagraphExport()
->GetCharStyleNamesPropInfoCache().hasProperty(
xRangePropSet, xRangePropSetInfo ), bHasAutoStyle,
- xRangePropSet, sPropertyCharStyleNames );
+ xRangePropSet, gsPropertyCharStyleNames );
// export span with style (if necessary)
// (except for combined characters field)
@@ -1056,10 +1059,10 @@ void XMLTextFieldExport::ExportFieldHelper(
switch (nToken) {
case FIELD_ID_AUTHOR:
// author field: fixed, field (sub-)type
- if (xPropSetInfo->hasPropertyByName(sPropertyIsFixed))
+ if (xPropSetInfo->hasPropertyByName(gsPropertyIsFixed))
{
GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_FIXED,
- (GetBoolProperty(sPropertyIsFixed, rPropSet) ? XML_TRUE : XML_FALSE) );
+ (GetBoolProperty(gsPropertyIsFixed, rPropSet) ? XML_TRUE : XML_FALSE) );
}
ExportElement(MapAuthorFieldName(rPropSet), sPresentation);
break;
@@ -1067,7 +1070,7 @@ void XMLTextFieldExport::ExportFieldHelper(
case FIELD_ID_SENDER:
// sender field: fixed, field (sub-)type
ProcessBoolean(XML_FIXED,
- GetBoolProperty(sPropertyIsFixed, rPropSet), true);
+ GetBoolProperty(gsPropertyIsFixed, rPropSet), true);
ExportElement(MapSenderFieldName(rPropSet), sPresentation);
break;
@@ -1075,9 +1078,9 @@ void XMLTextFieldExport::ExportFieldHelper(
// placeholder field: type, name, description
ProcessString(XML_PLACEHOLDER_TYPE,
MapPlaceholderType(
- GetInt16Property(sPropertyPlaceholderType, rPropSet)));
+ GetInt16Property(gsPropertyPlaceholderType, rPropSet)));
ProcessString(XML_DESCRIPTION,
- GetStringProperty(sPropertyHint,rPropSet), true);
+ GetStringProperty(gsPropertyHint,rPropSet), true);
ExportElement(XML_PLACEHOLDER, sPresentation);
break;
@@ -1085,20 +1088,20 @@ void XMLTextFieldExport::ExportFieldHelper(
{
// variable set field: name, visible, format&value
ProcessString(XML_NAME,
- GetStringProperty(sPropertyVariableName, rPropSet));
- ProcessDisplay(GetBoolProperty(sPropertyIsVisible, rPropSet),
+ GetStringProperty(gsPropertyVariableName, rPropSet));
+ ProcessDisplay(GetBoolProperty(gsPropertyIsVisible, rPropSet),
false);
ProcessString(XML_FORMULA, XML_NAMESPACE_OOOW,
- GetStringProperty(sPropertyContent, rPropSet),
+ GetStringProperty(gsPropertyContent, rPropSet),
sPresentation);
ProcessValueAndType(IsStringField(nToken, rPropSet),
- GetIntProperty(sPropertyNumberFormat, rPropSet),
- GetStringProperty(sPropertyContent, rPropSet),
+ GetIntProperty(gsPropertyNumberFormat, rPropSet),
+ GetStringProperty(gsPropertyContent, rPropSet),
sPresentation,
- GetDoubleProperty(sPropertyValue, rPropSet),
+ GetDoubleProperty(gsPropertyValue, rPropSet),
true, true, true,
! GetOptionalBoolProperty(
- sPropertyIsFixedLanguage,
+ gsPropertyIsFixedLanguage,
rPropSet, xPropSetInfo, false ) );
ExportElement(XML_VARIABLE_SET, sPresentation);
break;
@@ -1107,20 +1110,20 @@ void XMLTextFieldExport::ExportFieldHelper(
{
// variable get field: name, format&value
ProcessString(XML_NAME,
- GetStringProperty(sPropertyContent, rPropSet));
- bool bCmd = GetBoolProperty(sPropertyIsShowFormula, rPropSet);
+ GetStringProperty(gsPropertyContent, rPropSet));
+ bool bCmd = GetBoolProperty(gsPropertyIsShowFormula, rPropSet);
ProcessDisplay(true, bCmd);
// #i81766# for older versions export of the value-type
bool bExportValueType = !bCmd && ( GetExport().getExportFlags() & SvXMLExportFlags::SAVEBACKWARDCOMPATIBLE );
// show style, unless name will be shown
ProcessValueAndType(IsStringField(nToken, rPropSet),
- GetIntProperty(sPropertyNumberFormat, rPropSet),
+ GetIntProperty(gsPropertyNumberFormat, rPropSet),
"", "", 0.0, // values not used
false,
bExportValueType,
!bCmd,
! GetOptionalBoolProperty(
- sPropertyIsFixedLanguage,
+ gsPropertyIsFixedLanguage,
rPropSet, xPropSetInfo, false ) );
ExportElement(XML_VARIABLE_GET, sPresentation);
break;
@@ -1128,22 +1131,22 @@ void XMLTextFieldExport::ExportFieldHelper(
case FIELD_ID_VARIABLE_INPUT:
// variable input field: name, description, format&value
ProcessString(XML_NAME,
- GetStringProperty(sPropertyVariableName, rPropSet));
+ GetStringProperty(gsPropertyVariableName, rPropSet));
ProcessString(XML_DESCRIPTION,
- GetStringProperty(sPropertyHint , rPropSet));
- ProcessDisplay(GetBoolProperty(sPropertyIsVisible, rPropSet),
+ GetStringProperty(gsPropertyHint , rPropSet));
+ ProcessDisplay(GetBoolProperty(gsPropertyIsVisible, rPropSet),
false);
ProcessString(XML_FORMULA, XML_NAMESPACE_OOOW,
- GetStringProperty(sPropertyContent, rPropSet),
+ GetStringProperty(gsPropertyContent, rPropSet),
sPresentation);
ProcessValueAndType(IsStringField(nToken, rPropSet),
- GetIntProperty(sPropertyNumberFormat, rPropSet),
- GetStringProperty(sPropertyContent, rPropSet),
+ GetIntProperty(gsPropertyNumberFormat, rPropSet),
+ GetStringProperty(gsPropertyContent, rPropSet),
sPresentation,
- GetDoubleProperty(sPropertyValue, rPropSet),
+ GetDoubleProperty(gsPropertyValue, rPropSet),
true, true, true,
! GetOptionalBoolProperty(
- sPropertyIsFixedLanguage,
+ gsPropertyIsFixedLanguage,
rPropSet, xPropSetInfo, false ) );
ExportElement(XML_VARIABLE_INPUT, sPresentation);
break;
@@ -1151,20 +1154,20 @@ void XMLTextFieldExport::ExportFieldHelper(
case FIELD_ID_USER_GET:
// user field: name, hidden, style
{
- bool bCmd = GetBoolProperty(sPropertyIsShowFormula, rPropSet);
- ProcessDisplay(GetBoolProperty(sPropertyIsVisible, rPropSet),
+ bool bCmd = GetBoolProperty(gsPropertyIsShowFormula, rPropSet);
+ ProcessDisplay(GetBoolProperty(gsPropertyIsVisible, rPropSet),
bCmd);
ProcessValueAndType(IsStringField(nToken, rPropSet),
- GetIntProperty(sPropertyNumberFormat, rPropSet),
+ GetIntProperty(gsPropertyNumberFormat, rPropSet),
"", "", 0.0, // values not used
false, false, !bCmd,
! GetOptionalBoolProperty(
- sPropertyIsFixedLanguage,
+ gsPropertyIsFixedLanguage,
rPropSet, xPropSetInfo, false ) );
// name from FieldMaster
ProcessString(XML_NAME,
- GetStringProperty(sPropertyName,
+ GetStringProperty(gsPropertyName,
GetMasterPropertySet(rTextField)));
ExportElement(XML_USER_FIELD_GET, sPresentation);
break;
@@ -1176,26 +1179,26 @@ void XMLTextFieldExport::ExportFieldHelper(
// GetStringProperty(sPropertyName,
// GetMasterPropertySet(rTextField)));
ProcessString(XML_NAME,
- GetStringProperty(sPropertyContent, rPropSet));
+ GetStringProperty(gsPropertyContent, rPropSet));
ProcessString(XML_DESCRIPTION,
- GetStringProperty(sPropertyHint, rPropSet));
+ GetStringProperty(gsPropertyHint, rPropSet));
ExportElement(XML_USER_FIELD_INPUT, sPresentation);
break;
case FIELD_ID_SEQUENCE:
{
// sequence field: name, formula, seq-format
- OUString sName = GetStringProperty(sPropertyVariableName, rPropSet);
+ OUString sName = GetStringProperty(gsPropertyVariableName, rPropSet);
// TODO: use reference name only if actually being referenced.
ProcessString(XML_REF_NAME,
MakeSequenceRefName(
- GetInt16Property(sPropertySequenceValue, rPropSet),
+ GetInt16Property(gsPropertySequenceValue, rPropSet),
sName));
ProcessString(XML_NAME, sName);
ProcessString(XML_FORMULA, XML_NAMESPACE_OOOW,
- GetStringProperty(sPropertyContent, rPropSet),
+ GetStringProperty(gsPropertyContent, rPropSet),
sPresentation);
- ProcessNumberingType(GetInt16Property(sPropertyNumberingType,
+ ProcessNumberingType(GetInt16Property(gsPropertyNumberingType,
rPropSet));
ExportElement(XML_SEQUENCE, sPresentation);
break;
@@ -1204,19 +1207,19 @@ void XMLTextFieldExport::ExportFieldHelper(
case FIELD_ID_EXPRESSION:
{
// formula field: formula, format&value
- bool bCmd = GetBoolProperty(sPropertyIsShowFormula, rPropSet);
+ bool bCmd = GetBoolProperty(gsPropertyIsShowFormula, rPropSet);
ProcessString(XML_FORMULA, XML_NAMESPACE_OOOW,
- GetStringProperty(sPropertyContent, rPropSet),
+ GetStringProperty(gsPropertyContent, rPropSet),
sPresentation);
ProcessDisplay(true, bCmd);
ProcessValueAndType(IsStringField(nToken, rPropSet),
- GetIntProperty(sPropertyNumberFormat, rPropSet),
- GetStringProperty(sPropertyContent, rPropSet),
+ GetIntProperty(gsPropertyNumberFormat, rPropSet),
+ GetStringProperty(gsPropertyContent, rPropSet),
sPresentation,
- GetDoubleProperty(sPropertyValue, rPropSet),
+ GetDoubleProperty(gsPropertyValue, rPropSet),
!bCmd, !bCmd, !bCmd,
! GetOptionalBoolProperty(
- sPropertyIsFixedLanguage,
+ gsPropertyIsFixedLanguage,
rPropSet, xPropSetInfo, false ) );
ExportElement(XML_EXPRESSION, sPresentation);
break;
@@ -1225,51 +1228,51 @@ void XMLTextFieldExport::ExportFieldHelper(
case FIELD_ID_TEXT_INPUT:
// text input field: description and string-value
ProcessString(XML_DESCRIPTION,
- GetStringProperty(sPropertyHint, rPropSet));
+ GetStringProperty(gsPropertyHint, rPropSet));
ProcessString(XML_HELP,
- GetStringProperty(sPropertyHelp, rPropSet), true);
+ GetStringProperty(gsPropertyHelp, rPropSet), true);
ProcessString(XML_HINT,
- GetStringProperty(sPropertyTooltip, rPropSet), true);
+ GetStringProperty(gsPropertyTooltip, rPropSet), true);
ExportElement(XML_TEXT_INPUT, sPresentation);
break;
case FIELD_ID_TIME:
// all properties (except IsDate) are optional!
- if (xPropSetInfo->hasPropertyByName(sPropertyNumberFormat))
+ if (xPropSetInfo->hasPropertyByName(gsPropertyNumberFormat))
{
ProcessValueAndType(false,
- GetIntProperty(sPropertyNumberFormat,rPropSet),
+ GetIntProperty(gsPropertyNumberFormat,rPropSet),
"", "", 0.0, // not used
false, false, true,
! GetOptionalBoolProperty(
- sPropertyIsFixedLanguage,
+ gsPropertyIsFixedLanguage,
rPropSet, xPropSetInfo, false ),
true);
}
- if (xPropSetInfo->hasPropertyByName(sPropertyDateTimeValue))
+ if (xPropSetInfo->hasPropertyByName(gsPropertyDateTimeValue))
{
// no value -> current time
ProcessTimeOrDateTime(XML_TIME_VALUE,
- GetDateTimeProperty(sPropertyDateTimeValue,
+ GetDateTimeProperty(gsPropertyDateTimeValue,
rPropSet));
}
- if (xPropSetInfo->hasPropertyByName(sPropertyDateTime))
+ if (xPropSetInfo->hasPropertyByName(gsPropertyDateTime))
{
// no value -> current time
ProcessTimeOrDateTime(XML_TIME_VALUE,
- GetDateTimeProperty(sPropertyDateTime,rPropSet));
+ GetDateTimeProperty(gsPropertyDateTime,rPropSet));
}
- if (xPropSetInfo->hasPropertyByName(sPropertyIsFixed))
+ if (xPropSetInfo->hasPropertyByName(gsPropertyIsFixed))
{
ProcessBoolean(XML_FIXED,
- GetBoolProperty(sPropertyIsFixed, rPropSet),
+ GetBoolProperty(gsPropertyIsFixed, rPropSet),
false);
}
- if (xPropSetInfo->hasPropertyByName(sPropertyAdjust))
+ if (xPropSetInfo->hasPropertyByName(gsPropertyAdjust))
{
// adjust value given as integer in minutes
ProcessDateTime(XML_TIME_ADJUST,
- GetIntProperty(sPropertyAdjust, rPropSet),
+ GetIntProperty(gsPropertyAdjust, rPropSet),
false, true);
}
ExportElement(XML_TIME, sPresentation);
@@ -1277,40 +1280,40 @@ void XMLTextFieldExport::ExportFieldHelper(
case FIELD_ID_DATE:
// all properties (except IsDate) are optional!
- if (xPropSetInfo->hasPropertyByName(sPropertyNumberFormat))
+ if (xPropSetInfo->hasPropertyByName(gsPropertyNumberFormat))
{
ProcessValueAndType(false,
- GetIntProperty(sPropertyNumberFormat,rPropSet),
+ GetIntProperty(gsPropertyNumberFormat,rPropSet),
"", "", 0.0, // not used
false, false, true,
! GetOptionalBoolProperty(
- sPropertyIsFixedLanguage,
+ gsPropertyIsFixedLanguage,
rPropSet, xPropSetInfo, false ) );
}
- if (xPropSetInfo->hasPropertyByName(sPropertyDateTimeValue))
+ if (xPropSetInfo->hasPropertyByName(gsPropertyDateTimeValue))
{
// no value -> current date
ProcessDateTime(XML_DATE_VALUE,
- GetDateTimeProperty(sPropertyDateTimeValue,
+ GetDateTimeProperty(gsPropertyDateTimeValue,
rPropSet));
}
// TODO: remove double-handling after SRC614
- else if (xPropSetInfo->hasPropertyByName(sPropertyDateTime))
+ else if (xPropSetInfo->hasPropertyByName(gsPropertyDateTime))
{
ProcessDateTime(XML_DATE_VALUE,
- GetDateTimeProperty(sPropertyDateTime,rPropSet));
+ GetDateTimeProperty(gsPropertyDateTime,rPropSet));
}
- if (xPropSetInfo->hasPropertyByName(sPropertyIsFixed))
+ if (xPropSetInfo->hasPropertyByName(gsPropertyIsFixed))
{
ProcessBoolean(XML_FIXED,
- GetBoolProperty(sPropertyIsFixed, rPropSet),
+ GetBoolProperty(gsPropertyIsFixed, rPropSet),
false);
}
- if (xPropSetInfo->hasPropertyByName(sPropertyAdjust))
+ if (xPropSetInfo->hasPropertyByName(gsPropertyAdjust))
{
// adjust value given as number of days
ProcessDateTime(XML_DATE_ADJUST,
- GetIntProperty(sPropertyAdjust, rPropSet),
+ GetIntProperty(gsPropertyAdjust, rPropSet),
true, true);
}
ExportElement(XML_DATE, sPresentation);
@@ -1318,16 +1321,16 @@ void XMLTextFieldExport::ExportFieldHelper(
case FIELD_ID_PAGENUMBER:
// all properties are optional
- if (xPropSetInfo->hasPropertyByName(sPropertyNumberingType))
+ if (xPropSetInfo->hasPropertyByName(gsPropertyNumberingType))
{
- ProcessNumberingType(GetInt16Property(sPropertyNumberingType,
+ ProcessNumberingType(GetInt16Property(gsPropertyNumberingType,
rPropSet));
}
- if (xPropSetInfo->hasPropertyByName(sPropertyOffset))
+ if (xPropSetInfo->hasPropertyByName(gsPropertyOffset))
{
- sal_Int32 nAdjust = GetIntProperty(sPropertyOffset, rPropSet);
+ sal_Int32 nAdjust = GetIntProperty(gsPropertyOffset, rPropSet);
- if (xPropSetInfo->hasPropertyByName(sPropertySubType))
+ if (xPropSetInfo->hasPropertyByName(gsPropertySubType))
{
// property SubType used in MapPageNumebrName
ProcessString(XML_SELECT_PAGE,
@@ -1341,7 +1344,7 @@ void XMLTextFieldExport::ExportFieldHelper(
case FIELD_ID_PAGESTRING:
{
ProcessString(XML_STRING_VALUE,
- GetStringProperty(sPropertyUserText, rPropSet),
+ GetStringProperty(gsPropertyUserText, rPropSet),
sPresentation);
sal_Int32 nDummy = 0; // MapPageNumberName need int
ProcessString(XML_SELECT_PAGE, MapPageNumberName(rPropSet, nDummy));
@@ -1354,9 +1357,9 @@ void XMLTextFieldExport::ExportFieldHelper(
case FIELD_ID_DATABASE_NAME:
ProcessString(XML_TABLE_NAME,
- GetStringProperty(sPropertyDataTableName, rPropSet));
- ProcessCommandType(GetIntProperty(sPropertyDataCommandType, rPropSet));
- ProcessDisplay(GetBoolProperty(sPropertyIsVisible, rPropSet),
+ GetStringProperty(gsPropertyDataTableName, rPropSet));
+ ProcessCommandType(GetIntProperty(gsPropertyDataCommandType, rPropSet));
+ ProcessDisplay(GetBoolProperty(gsPropertyIsVisible, rPropSet),
false);
ExportDataBaseElement(XML_DATABASE_NAME, sPresentation,
rPropSet, xPropSetInfo);
@@ -1364,13 +1367,13 @@ void XMLTextFieldExport::ExportFieldHelper(
case FIELD_ID_DATABASE_NUMBER:
ProcessString(XML_TABLE_NAME,
- GetStringProperty(sPropertyDataTableName, rPropSet));
- ProcessCommandType(GetIntProperty(sPropertyDataCommandType, rPropSet));
+ GetStringProperty(gsPropertyDataTableName, rPropSet));
+ ProcessCommandType(GetIntProperty(gsPropertyDataCommandType, rPropSet));
ProcessNumberingType(
- GetInt16Property(sPropertyNumberingType,rPropSet));
+ GetInt16Property(gsPropertyNumberingType,rPropSet));
ProcessInteger(XML_VALUE,
- GetIntProperty(sPropertySetNumber, rPropSet));
- ProcessDisplay(GetBoolProperty(sPropertyIsVisible, rPropSet),
+ GetIntProperty(gsPropertySetNumber, rPropSet));
+ ProcessDisplay(GetBoolProperty(gsPropertyIsVisible, rPropSet),
false);
ExportDataBaseElement(XML_DATABASE_ROW_NUMBER, sPresentation,
rPropSet, xPropSetInfo);
@@ -1378,10 +1381,10 @@ void XMLTextFieldExport::ExportFieldHelper(
case FIELD_ID_DATABASE_NEXT:
ProcessString(XML_TABLE_NAME,
- GetStringProperty(sPropertyDataTableName, rPropSet));
- ProcessCommandType(GetIntProperty(sPropertyDataCommandType, rPropSet));
+ GetStringProperty(gsPropertyDataTableName, rPropSet));
+ ProcessCommandType(GetIntProperty(gsPropertyDataCommandType, rPropSet));
ProcessString(XML_CONDITION, XML_NAMESPACE_OOOW,
- GetStringProperty(sPropertyCondition, rPropSet));
+ GetStringProperty(gsPropertyCondition, rPropSet));
DBG_ASSERT(sPresentation.isEmpty(),
"Unexpected presentation for database next field");
ExportDataBaseElement(XML_DATABASE_NEXT, OUString(),
@@ -1390,12 +1393,12 @@ void XMLTextFieldExport::ExportFieldHelper(
case FIELD_ID_DATABASE_SELECT:
ProcessString(XML_TABLE_NAME,
- GetStringProperty(sPropertyDataTableName, rPropSet));
- ProcessCommandType(GetIntProperty(sPropertyDataCommandType, rPropSet));
+ GetStringProperty(gsPropertyDataTableName, rPropSet));
+ ProcessCommandType(GetIntProperty(gsPropertyDataCommandType, rPropSet));
ProcessString(XML_CONDITION, XML_NAMESPACE_OOOW,
- GetStringProperty(sPropertyCondition, rPropSet));
+ GetStringProperty(gsPropertyCondition, rPropSet));
ProcessInteger(XML_ROW_NUMBER,
- GetIntProperty(sPropertySetNumber, rPropSet));
+ GetIntProperty(gsPropertySetNumber, rPropSet));
DBG_ASSERT(sPresentation.isEmpty(),
"Unexpected presentation for database select field");
ExportDataBaseElement(XML_DATABASE_ROW_SELECT, OUString(),
@@ -1407,19 +1410,19 @@ void XMLTextFieldExport::ExportFieldHelper(
// get database, table and column name from field master
const Reference<XPropertySet> & xMaster = GetMasterPropertySet(rTextField);
ProcessString(XML_TABLE_NAME,
- GetStringProperty(sPropertyDataTableName, xMaster));
- ProcessCommandType(GetIntProperty(sPropertyDataCommandType, xMaster));
+ GetStringProperty(gsPropertyDataTableName, xMaster));
+ ProcessCommandType(GetIntProperty(gsPropertyDataCommandType, xMaster));
ProcessString(XML_COLUMN_NAME,
- GetStringProperty(sPropertyDataColumnName, xMaster));
+ GetStringProperty(gsPropertyDataColumnName, xMaster));
// export number format if available (happens only for numbers!)
- if (!GetBoolProperty(sPropertyIsDataBaseFormat, rPropSet))
+ if (!GetBoolProperty(gsPropertyIsDataBaseFormat, rPropSet))
{
ProcessValueAndType(false, // doesn't happen for text
- GetIntProperty(sPropertyNumberFormat,rPropSet),
+ GetIntProperty(gsPropertyNumberFormat,rPropSet),
"", "", 0.0, // not used
false, false, true, false);
}
- ProcessDisplay(GetBoolProperty(sPropertyIsVisible, rPropSet),
+ ProcessDisplay(GetBoolProperty(gsPropertyIsVisible, rPropSet),
false);
ExportDataBaseElement(XML_DATABASE_DISPLAY, sPresentation,
xMaster, xMaster->getPropertySetInfo());
@@ -1428,7 +1431,7 @@ void XMLTextFieldExport::ExportFieldHelper(
case FIELD_ID_DOCINFO_REVISION:
ProcessBoolean(XML_FIXED,
- GetBoolProperty(sPropertyIsFixed, rPropSet), false);
+ GetBoolProperty(gsPropertyIsFixed, rPropSet), false);
ExportElement(MapDocInfoFieldName(nToken), sPresentation);
break;
@@ -1440,16 +1443,16 @@ void XMLTextFieldExport::ExportFieldHelper(
case FIELD_ID_DOCINFO_CREATION_DATE:
case FIELD_ID_DOCINFO_PRINT_DATE:
ProcessValueAndType(false,
- GetIntProperty(sPropertyNumberFormat, rPropSet),
+ GetIntProperty(gsPropertyNumberFormat, rPropSet),
"", "", 0.0,
false, false, true,
! GetOptionalBoolProperty(
- sPropertyIsFixedLanguage,
+ gsPropertyIsFixedLanguage,
rPropSet, xPropSetInfo, false ) );
// todo: export date/time value, but values not available -> core bug
ProcessBoolean(XML_FIXED,
- GetBoolProperty(sPropertyIsFixed, rPropSet), false);
+ GetBoolProperty(gsPropertyIsFixed, rPropSet), false);
ExportElement(MapDocInfoFieldName(nToken), sPresentation);
break;
@@ -1460,10 +1463,10 @@ void XMLTextFieldExport::ExportFieldHelper(
case FIELD_ID_DOCINFO_SUBJECT:
case FIELD_ID_DOCINFO_KEYWORDS:
case FIELD_ID_DOCINFO_SAVE_AUTHOR:
- if (xPropSetInfo->hasPropertyByName(sPropertyIsFixed))
+ if (xPropSetInfo->hasPropertyByName(gsPropertyIsFixed))
{
ProcessBoolean(XML_FIXED,
- GetBoolProperty(sPropertyIsFixed, rPropSet), false);
+ GetBoolProperty(gsPropertyIsFixed, rPropSet), false);
}
ExportElement(MapDocInfoFieldName(nToken), sPresentation);
break;
@@ -1471,17 +1474,17 @@ void XMLTextFieldExport::ExportFieldHelper(
case FIELD_ID_DOCINFO_CUSTOM:
{
ProcessValueAndType(false, // doesn't happen for text
- GetIntProperty(sPropertyNumberFormat,rPropSet),
+ GetIntProperty(gsPropertyNumberFormat,rPropSet),
"", "", 0.0, // not used
false, false, true,
! GetOptionalBoolProperty(
- sPropertyIsFixedLanguage,
+ gsPropertyIsFixedLanguage,
rPropSet, xPropSetInfo, false ));
- uno::Any aAny = rPropSet->getPropertyValue( sPropertyName );
+ uno::Any aAny = rPropSet->getPropertyValue( gsPropertyName );
OUString sName;
aAny >>= sName;
ProcessString(XML_NAME, sName);
- ProcessBoolean(XML_FIXED, GetBoolProperty(sPropertyIsFixed, rPropSet), false);
+ ProcessBoolean(XML_FIXED, GetBoolProperty(gsPropertyIsFixed, rPropSet), false);
ExportElement(XML_USER_DEFINED, sPresentation);
break;
}
@@ -1495,9 +1498,9 @@ void XMLTextFieldExport::ExportFieldHelper(
case FIELD_ID_COUNT_OBJECTS:
// all properties optional (applies to pages only, but I'll do
// it for all for sake of common implementation)
- if (xPropSetInfo->hasPropertyByName(sPropertyNumberingType))
+ if (xPropSetInfo->hasPropertyByName(gsPropertyNumberingType))
{
- ProcessNumberingType(GetInt16Property(sPropertyNumberingType,
+ ProcessNumberingType(GetInt16Property(gsPropertyNumberingType,
rPropSet));
}
ExportElement(MapCountFieldName(nToken), sPresentation);
@@ -1505,33 +1508,33 @@ void XMLTextFieldExport::ExportFieldHelper(
case FIELD_ID_CONDITIONAL_TEXT:
ProcessString(XML_CONDITION, XML_NAMESPACE_OOOW,
- GetStringProperty(sPropertyCondition, rPropSet));
+ GetStringProperty(gsPropertyCondition, rPropSet));
ProcessString(XML_STRING_VALUE_IF_TRUE,
- GetStringProperty(sPropertyTrueContent, rPropSet));
+ GetStringProperty(gsPropertyTrueContent, rPropSet));
ProcessString(XML_STRING_VALUE_IF_FALSE,
- GetStringProperty(sPropertyFalseContent, rPropSet));
+ GetStringProperty(gsPropertyFalseContent, rPropSet));
ProcessBoolean(XML_CURRENT_VALUE,
- GetBoolProperty(sPropertyIsConditionTrue, rPropSet),
+ GetBoolProperty(gsPropertyIsConditionTrue, rPropSet),
false);
ExportElement(XML_CONDITIONAL_TEXT, sPresentation);
break;
case FIELD_ID_HIDDEN_TEXT:
ProcessString(XML_CONDITION, XML_NAMESPACE_OOOW,
- GetStringProperty(sPropertyCondition, rPropSet));
+ GetStringProperty(gsPropertyCondition, rPropSet));
ProcessString(XML_STRING_VALUE,
- GetStringProperty(sPropertyContent, rPropSet));
+ GetStringProperty(gsPropertyContent, rPropSet));
ProcessBoolean(XML_IS_HIDDEN,
- GetBoolProperty(sPropertyIsHidden, rPropSet),
+ GetBoolProperty(gsPropertyIsHidden, rPropSet),
false);
ExportElement(XML_HIDDEN_TEXT, sPresentation);
break;
case FIELD_ID_HIDDEN_PARAGRAPH:
ProcessString(XML_CONDITION, XML_NAMESPACE_OOOW,
- GetStringProperty(sPropertyCondition, rPropSet));
+ GetStringProperty(gsPropertyCondition, rPropSet));
ProcessBoolean(XML_IS_HIDDEN,
- GetBoolProperty(sPropertyIsHidden, rPropSet),
+ GetBoolProperty(gsPropertyIsHidden, rPropSet),
false);
DBG_ASSERT(sPresentation.isEmpty(),
"Unexpected presentation for hidden paragraph field");
@@ -1541,32 +1544,32 @@ void XMLTextFieldExport::ExportFieldHelper(
case FIELD_ID_TEMPLATE_NAME:
ProcessString(XML_DISPLAY,
MapTemplateDisplayFormat(
- GetInt16Property(sPropertyFileFormat, rPropSet)));
+ GetInt16Property(gsPropertyFileFormat, rPropSet)));
ExportElement(XML_TEMPLATE_NAME, sPresentation);
break;
case FIELD_ID_CHAPTER:
ProcessString(XML_DISPLAY,
MapChapterDisplayFormat(
- GetInt16Property(sPropertyChapterFormat, rPropSet)));
+ GetInt16Property(gsPropertyChapterFormat, rPropSet)));
// API numbers 0..9, we number 1..10
ProcessInteger(XML_OUTLINE_LEVEL,
- GetInt8Property(sPropertyLevel, rPropSet) + 1);
+ GetInt8Property(gsPropertyLevel, rPropSet) + 1);
ExportElement(XML_CHAPTER, sPresentation);
break;
case FIELD_ID_FILE_NAME:
// all properties are optional
- if (xPropSetInfo->hasPropertyByName(sPropertyFileFormat))
+ if (xPropSetInfo->hasPropertyByName(gsPropertyFileFormat))
{
ProcessString(XML_DISPLAY,
MapFilenameDisplayFormat(
- GetInt16Property(sPropertyFileFormat, rPropSet)));
+ GetInt16Property(gsPropertyFileFormat, rPropSet)));
}
- if (xPropSetInfo->hasPropertyByName(sPropertyIsFixed))
+ if (xPropSetInfo->hasPropertyByName(gsPropertyIsFixed))
{
ProcessBoolean(XML_FIXED,
- GetBoolProperty(sPropertyIsFixed, rPropSet),
+ GetBoolProperty(gsPropertyIsFixed, rPropSet),
false);
}
ExportElement(XML_FILE_NAME, sPresentation);
@@ -1574,9 +1577,9 @@ void XMLTextFieldExport::ExportFieldHelper(
case FIELD_ID_REFPAGE_SET:
ProcessBoolean(XML_ACTIVE,
- GetBoolProperty(sPropertyOn, rPropSet), true);
+ GetBoolProperty(gsPropertyOn, rPropSet), true);
ProcessIntegerDef(XML_PAGE_ADJUST,
- GetInt16Property(sPropertyOffset, rPropSet), 0);
+ GetInt16Property(gsPropertyOffset, rPropSet), 0);
DBG_ASSERT(sPresentation.isEmpty(),
"Unexpected presentation page variable field");
ExportElement(XML_PAGE_VARIABLE_SET);
@@ -1584,7 +1587,7 @@ void XMLTextFieldExport::ExportFieldHelper(
case FIELD_ID_REFPAGE_GET:
ProcessNumberingType(
- GetInt16Property(sPropertyNumberingType, rPropSet));
+ GetInt16Property(gsPropertyNumberingType, rPropSet));
ExportElement(XML_PAGE_VARIABLE_GET, sPresentation);
break;
@@ -1597,22 +1600,22 @@ void XMLTextFieldExport::ExportFieldHelper(
// was: if (nSeqNumber != -1) ...
ProcessString(XML_REFERENCE_FORMAT,
MapReferenceType(GetInt16Property(
- sPropertyReferenceFieldPart, rPropSet)),
+ gsPropertyReferenceFieldPart, rPropSet)),
XML_TEMPLATE);
ProcessString(XML_REF_NAME,
MakeSequenceRefName(
- GetInt16Property(sPropertySequenceNumber, rPropSet),
- GetStringProperty(sPropertySourceName, rPropSet) ) );
- if (xPropSetInfo->hasPropertyByName(sPropertyReferenceFieldLanguage) &&
+ GetInt16Property(gsPropertySequenceNumber, rPropSet),
+ GetStringProperty(gsPropertySourceName, rPropSet) ) );
+ if (xPropSetInfo->hasPropertyByName(gsPropertyReferenceFieldLanguage) &&
SvtSaveOptions().GetODFDefaultVersion() > SvtSaveOptions::ODFVER_012)
{
// export text:reference-language attribute, if not empty
ProcessString(XML_REFERENCE_LANGUAGE,
- GetStringProperty(sPropertyReferenceFieldLanguage, rPropSet), true, XML_NAMESPACE_LO_EXT);
+ GetStringProperty(gsPropertyReferenceFieldLanguage, rPropSet), true, XML_NAMESPACE_LO_EXT);
}
ExportElement(
MapReferenceSource(
- GetInt16Property(sPropertyReferenceFieldSource, rPropSet)),
+ GetInt16Property(gsPropertyReferenceFieldSource, rPropSet)),
sPresentation);
break;
@@ -1621,20 +1624,20 @@ void XMLTextFieldExport::ExportFieldHelper(
// reference to bookmarks, references: format, name (and element)
ProcessString(XML_REFERENCE_FORMAT,
MapReferenceType(GetInt16Property(
- sPropertyReferenceFieldPart, rPropSet)),
+ gsPropertyReferenceFieldPart, rPropSet)),
XML_TEMPLATE);
ProcessString(XML_REF_NAME,
- GetStringProperty(sPropertySourceName, rPropSet));
- if (xPropSetInfo->hasPropertyByName(sPropertyReferenceFieldLanguage) &&
+ GetStringProperty(gsPropertySourceName, rPropSet));
+ if (xPropSetInfo->hasPropertyByName(gsPropertyReferenceFieldLanguage) &&
SvtSaveOptions().GetODFDefaultVersion() > SvtSaveOptions::ODFVER_012)
{
// export text:reference-language attribute, if not empty
ProcessString(XML_REFERENCE_LANGUAGE,
- GetStringProperty(sPropertyReferenceFieldLanguage, rPropSet), true, XML_NAMESPACE_LO_EXT);
+ GetStringProperty(gsPropertyReferenceFieldLanguage, rPropSet), true, XML_NAMESPACE_LO_EXT);
}
ExportElement(
MapReferenceSource(GetInt16Property(
- sPropertyReferenceFieldSource, rPropSet)),
+ gsPropertyReferenceFieldSource, rPropSet)),
sPresentation);
break;
@@ -1645,21 +1648,21 @@ void XMLTextFieldExport::ExportFieldHelper(
FIELD_ID_REF_ENDNOTE==nToken ? XML_ENDNOTE : XML_FOOTNOTE );
ProcessString(XML_REFERENCE_FORMAT,
MapReferenceType(GetInt16Property(
- sPropertyReferenceFieldPart, rPropSet)),
+ gsPropertyReferenceFieldPart, rPropSet)),
XML_TEMPLATE);
ProcessString(XML_REF_NAME,
MakeFootnoteRefName(GetInt16Property(
- sPropertySequenceNumber, rPropSet)));
- if (xPropSetInfo->hasPropertyByName(sPropertyReferenceFieldLanguage) &&
+ gsPropertySequenceNumber, rPropSet)));
+ if (xPropSetInfo->hasPropertyByName(gsPropertyReferenceFieldLanguage) &&
SvtSaveOptions().GetODFDefaultVersion() > SvtSaveOptions::ODFVER_012)
{
// export text:reference-language attribute, if not empty
ProcessString(XML_REFERENCE_LANGUAGE,
- GetStringProperty(sPropertyReferenceFieldLanguage, rPropSet), true, XML_NAMESPACE_LO_EXT);
+ GetStringProperty(gsPropertyReferenceFieldLanguage, rPropSet), true, XML_NAMESPACE_LO_EXT);
}
ExportElement(
MapReferenceSource(GetInt16Property(
- sPropertyReferenceFieldSource, rPropSet)),
+ gsPropertyReferenceFieldSource, rPropSet)),
sPresentation);
break;
@@ -1667,7 +1670,7 @@ void XMLTextFieldExport::ExportFieldHelper(
// name from field master
ProcessString(XML_CONNECTION_NAME,
- GetStringProperty(sPropertyName,
+ GetStringProperty(gsPropertyName,
GetMasterPropertySet(rTextField)));
ExportElement(XML_DDE_CONNECTION, sPresentation);
break;
@@ -1691,10 +1694,10 @@ void XMLTextFieldExport::ExportFieldHelper(
{
// this field is a special case because it gets mapped onto a
// hyperlink, rather than one of the regular text field.
- ProcessString(XML_HREF, GetExport().GetRelativeReference(GetStringProperty(sPropertyURL, rPropSet)),
+ ProcessString(XML_HREF, GetExport().GetRelativeReference(GetStringProperty(gsPropertyURL, rPropSet)),
false, XML_NAMESPACE_XLINK);
ProcessString(XML_TARGET_FRAME_NAME,
- GetStringProperty(sPropertyTargetFrame,rPropSet),
+ GetStringProperty(gsPropertyTargetFrame,rPropSet),
true, XML_NAMESPACE_OFFICE);
GetExport().AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
SvXMLElementExport aUrlField(rExport, XML_NAMESPACE_TEXT, XML_A,
@@ -1712,21 +1715,21 @@ void XMLTextFieldExport::ExportFieldHelper(
case FIELD_ID_SCRIPT:
ProcessString(XML_LANGUAGE,
- GetStringProperty(sPropertyScriptType, rPropSet),
+ GetStringProperty(gsPropertyScriptType, rPropSet),
true, XML_NAMESPACE_SCRIPT);
DBG_ASSERT(sPresentation.isEmpty(),
"Unexpected presentation for script field");
- if (GetBoolProperty(sPropertyURLContent, rPropSet))
+ if (GetBoolProperty(gsPropertyURLContent, rPropSet))
{
ProcessString(XML_HREF,
- GetExport().GetRelativeReference(GetStringProperty(sPropertyContent, rPropSet)),
+ GetExport().GetRelativeReference(GetStringProperty(gsPropertyContent, rPropSet)),
false, XML_NAMESPACE_XLINK);
ExportElement(XML_SCRIPT);
}
else
{
ExportElement(XML_SCRIPT,
- GetStringProperty(sPropertyContent, rPropSet));
+ GetStringProperty(gsPropertyContent, rPropSet));
}
break;
@@ -1738,14 +1741,14 @@ void XMLTextFieldExport::ExportFieldHelper(
// annotation element + content
OUString aName;
- rPropSet->getPropertyValue(sPropertyName) >>= aName;
+ rPropSet->getPropertyValue(gsPropertyName) >>= aName;
if (!aName.isEmpty())
GetExport().AddAttribute(XML_NAMESPACE_OFFICE, XML_NAME, aName);
SvXMLElementExport aElem(GetExport(), XML_NAMESPACE_OFFICE,
XML_ANNOTATION, false, true);
// author
- OUString aAuthor( GetStringProperty(sPropertyAuthor, rPropSet) );
+ OUString aAuthor( GetStringProperty(gsPropertyAuthor, rPropSet) );
if( !aAuthor.isEmpty() )
{
SvXMLElementExport aCreatorElem( GetExport(), XML_NAMESPACE_DC,
@@ -1755,7 +1758,7 @@ void XMLTextFieldExport::ExportFieldHelper(
}
// date time
- util::DateTime aDate( GetDateTimeProperty(sPropertyDateTimeValue, rPropSet) );
+ util::DateTime aDate( GetDateTimeProperty(gsPropertyDateTimeValue, rPropSet) );
{
OUStringBuffer aBuffer;
::sax::Converter::convertDateTime(aBuffer, aDate, nullptr, true);
@@ -1768,7 +1771,7 @@ void XMLTextFieldExport::ExportFieldHelper(
if (SvtSaveOptions().GetODFDefaultVersion() > SvtSaveOptions::ODFVER_012)
{
// initials
- OUString aInitials( GetStringProperty(sPropertyInitials, rPropSet) );
+ OUString aInitials( GetStringProperty(gsPropertyInitials, rPropSet) );
if( !aInitials.isEmpty() )
{
// TODO: see OFFICE-3776 export meta:creator-initials for ODF 1.3
@@ -1782,7 +1785,7 @@ void XMLTextFieldExport::ExportFieldHelper(
css::uno::Reference < css::text::XText > xText;
try
{
- css::uno::Any aRet = rPropSet->getPropertyValue(sPropertyTextRange);
+ css::uno::Any aRet = rPropSet->getPropertyValue(gsPropertyTextRange);
aRet >>= xText;
}
catch ( css::uno::Exception& )
@@ -1791,7 +1794,7 @@ void XMLTextFieldExport::ExportFieldHelper(
if ( xText.is() )
GetExport().GetTextParagraphExport()->exportText( xText );
else
- ProcessParagraphSequence(GetStringProperty(sPropertyContent,rPropSet));
+ ProcessParagraphSequence(GetStringProperty(gsPropertyContent,rPropSet));
break;
}
@@ -1812,18 +1815,18 @@ void XMLTextFieldExport::ExportFieldHelper(
case FIELD_ID_MEASURE:
{
- ProcessString(XML_KIND, MapMeasureKind(GetInt16Property(sPropertyMeasureKind, rPropSet)));
+ ProcessString(XML_KIND, MapMeasureKind(GetInt16Property(gsPropertyMeasureKind, rPropSet)));
ExportElement( XML_MEASURE, sPresentation );
break;
}
case FIELD_ID_TABLE_FORMULA:
ProcessString( XML_FORMULA, XML_NAMESPACE_OOOW,
- GetStringProperty(sPropertyContent, rPropSet) );
+ GetStringProperty(gsPropertyContent, rPropSet) );
ProcessDisplay( true,
- GetBoolProperty(sPropertyIsShowFormula, rPropSet) );
+ GetBoolProperty(gsPropertyIsShowFormula, rPropSet) );
ProcessValueAndType( false,
- GetIntProperty(sPropertyNumberFormat, rPropSet),
+ GetIntProperty(gsPropertyNumberFormat, rPropSet),
"", "", 0.0f,
false, false, true,
false );
@@ -1832,17 +1835,17 @@ void XMLTextFieldExport::ExportFieldHelper(
case FIELD_ID_DROP_DOWN:
{
- ProcessString(XML_NAME, GetStringProperty(sPropertyName, rPropSet));
+ ProcessString(XML_NAME, GetStringProperty(gsPropertyName, rPropSet));
ProcessString(XML_HELP,
- GetStringProperty(sPropertyHelp, rPropSet), true);
+ GetStringProperty(gsPropertyHelp, rPropSet), true);
ProcessString(XML_HINT,
- GetStringProperty(sPropertyTooltip, rPropSet), true);
+ GetStringProperty(gsPropertyTooltip, rPropSet), true);
SvXMLElementExport aElem( GetExport(),
XML_NAMESPACE_TEXT, XML_DROP_DOWN,
false, false );
ProcessStringSequence
- (GetStringSequenceProperty( sPropertyItems, rPropSet ),
- GetStringProperty( sPropertySelectedItem, rPropSet ) );
+ (GetStringSequenceProperty( gsPropertyItems, rPropSet ),
+ GetStringProperty( gsPropertySelectedItem, rPropSet ) );
GetExport().Characters( sPresentation );
}
@@ -1968,7 +1971,7 @@ void XMLTextFieldExport::ExportFieldDeclarations(
// save interesting field masters
if (sFieldMasterType == FIELD_SERVICE_SETEXP)
{
- sal_Int32 nType = GetIntProperty(sPropertySubType, xPropSet);
+ sal_Int32 nType = GetIntProperty(gsPropertySubType, xPropSet);
// sequence or variable?
if ( SetVariableType::SEQUENCE == nType )
@@ -2021,7 +2024,7 @@ void XMLTextFieldExport::ExportFieldDeclarations(
ExplodeFieldMasterName(sName, sFieldMasterType, sVarName);
// determine string/numeric field
- bool bIsString = ( GetIntProperty(sPropertySubType, xPropSet)
+ bool bIsString = ( GetIntProperty(gsPropertySubType, xPropSet)
== SetVariableType::STRING );
// get dependent field property set
@@ -2031,7 +2034,7 @@ void XMLTextFieldExport::ExportFieldDeclarations(
// process value and type.
ProcessValueAndType(
bIsString,
- GetIntProperty(sPropertyNumberFormat, xFieldPropSet),
+ GetIntProperty(gsPropertyNumberFormat, xFieldPropSet),
"", "", 0.0,
false, true, false, false);
}
@@ -2081,7 +2084,7 @@ void XMLTextFieldExport::ExportFieldDeclarations(
// outline level
sal_Int32 nLevel = 1 + GetIntProperty(
- sPropertyChapterNumberingLevel, xPropSet);
+ gsPropertyChapterNumberingLevel, xPropSet);
DBG_ASSERT(nLevel >= 0, "illegal outline level");
DBG_ASSERT(nLevel < 127, "possible illegal outline level");
ProcessInteger(XML_DISPLAY_OUTLINE_LEVEL, nLevel);
@@ -2089,7 +2092,7 @@ void XMLTextFieldExport::ExportFieldDeclarations(
// separation character
if (nLevel > 0) {
ProcessString(XML_SEPARATION_CHARACTER, GetStringProperty(
- sPropertyNumberingSeparator, xPropSet));
+ gsPropertyNumberingSeparator, xPropSet));
}
ProcessString(XML_NAME, sVarName);
ExportElement(XML_SEQUENCE_DECL, true);
@@ -2121,13 +2124,13 @@ void XMLTextFieldExport::ExportFieldDeclarations(
OUString sVarName;
ExplodeFieldMasterName(sName, sFieldMasterType, sVarName);
- if (GetBoolProperty(sPropertyIsExpression, xPropSet))
+ if (GetBoolProperty(gsPropertyIsExpression, xPropSet))
{
// expression:
ProcessValueAndType(
false,
0, "", "",
- GetDoubleProperty(sPropertyValue, xPropSet),
+ GetDoubleProperty(gsPropertyValue, xPropSet),
true,
true,
false,
@@ -2139,7 +2142,7 @@ void XMLTextFieldExport::ExportFieldDeclarations(
ProcessString(XML_VALUE_TYPE, XML_STRING,
XML_NAMESPACE_OFFICE);
ProcessString(XML_STRING_VALUE,
- GetStringProperty(sPropertyContent, xPropSet),
+ GetStringProperty(gsPropertyContent, xPropSet),
false, XML_NAMESPACE_OFFICE );
}
ProcessString(XML_NAME, sVarName);
@@ -2173,25 +2176,25 @@ void XMLTextFieldExport::ExportFieldDeclarations(
{
ProcessString(XML_NAME,
- GetStringProperty(sPropertyName, xPropSet),
+ GetStringProperty(gsPropertyName, xPropSet),
false, XML_NAMESPACE_OFFICE);
// export elements; can't use ProcessString because
// elements are in office namespace
ProcessString(XML_DDE_APPLICATION,
- GetStringProperty(sPropertyDDECommandType,
+ GetStringProperty(gsPropertyDDECommandType,
xPropSet),
false, XML_NAMESPACE_OFFICE);
ProcessString(XML_DDE_TOPIC,
- GetStringProperty(sPropertyDDECommandFile,
+ GetStringProperty(gsPropertyDDECommandFile,
xPropSet),
false, XML_NAMESPACE_OFFICE);
ProcessString(XML_DDE_ITEM,
- GetStringProperty(sPropertyDDECommandElement,
+ GetStringProperty(gsPropertyDDECommandElement,
xPropSet),
false, XML_NAMESPACE_OFFICE);
bool bIsAutomaticUpdate = GetBoolProperty(
- sPropertyIsAutomaticUpdate, xPropSet);
+ gsPropertyIsAutomaticUpdate, xPropSet);
if (bIsAutomaticUpdate)
{
GetExport().AddAttribute(XML_NAMESPACE_OFFICE,
@@ -2262,7 +2265,7 @@ void XMLTextFieldExport::ExportMacro(
// the description attribute
ProcessString(XML_DESCRIPTION,
- GetStringProperty(sPropertyHint, rPropSet),
+ GetStringProperty(gsPropertyHint, rPropSet),
rContent);
// the element
@@ -2328,7 +2331,7 @@ void XMLTextFieldExport::ExportMetaField(
// style:data-style-name
ProcessValueAndType(false,
- GetIntProperty(sPropertyNumberFormat, i_xMeta),
+ GetIntProperty(gsPropertyNumberFormat, i_xMeta),
"", "", 0.0, false, false, true,
false );
@@ -2698,7 +2701,7 @@ void XMLTextFieldExport::ProcessBibliographyData(
const Reference<XPropertySet>& rPropSet)
{
// get the values
- Any aAny = rPropSet->getPropertyValue(sPropertyFields);
+ Any aAny = rPropSet->getPropertyValue(gsPropertyFields);
Sequence<PropertyValue> aValues;
aAny >>= aValues;
@@ -2802,13 +2805,13 @@ void XMLTextFieldExport::ExportDataBaseElement(
OUString sDataBaseName;
OUString sDataBaseURL;
OUString sStr;
- if( ( rPropertySet->getPropertyValue( sPropertyDataBaseName ) >>= sStr )
+ if( ( rPropertySet->getPropertyValue( gsPropertyDataBaseName ) >>= sStr )
&& !sStr.isEmpty() )
{
sDataBaseName = sStr;
}
- else if( rPropertySetInfo->hasPropertyByName( sPropertyDataBaseURL ) &&
- (rPropertySet->getPropertyValue( sPropertyDataBaseURL ) >>= sStr) &&
+ else if( rPropertySetInfo->hasPropertyByName( gsPropertyDataBaseURL ) &&
+ (rPropertySet->getPropertyValue( gsPropertyDataBaseURL ) >>= sStr) &&
!sStr.isEmpty() )
{
sDataBaseURL = sStr;
@@ -2840,7 +2843,7 @@ void XMLTextFieldExport::ExportDataBaseElement(
void XMLTextFieldExport::ExplodeFieldMasterName(
const OUString& sMasterName, OUString& sFieldType, OUString& sVarName)
{
- sal_Int32 nLength = sFieldMasterPrefix.getLength();
+ sal_Int32 nLength = gsFieldMasterPrefix.getLength();
sal_Int32 nSeparator = sMasterName.indexOf('.', nLength);
// '.' found?
@@ -2871,7 +2874,7 @@ bool XMLTextFieldExport::GetDependentFieldPropertySet(
{
Any aAny;
Sequence<Reference<XDependentTextField> > aFields;
- aAny = xMaster->getPropertyValue(sPropertyDependentTextFields);
+ aAny = xMaster->getPropertyValue(gsPropertyDependentTextFields);
aAny >>= aFields;
// any fields?
@@ -2932,7 +2935,7 @@ enum XMLTokenEnum XMLTextFieldExport::MapAuthorFieldName(
const Reference<XPropertySet> & xPropSet)
{
// Initials or full name?
- return GetBoolProperty(sPropertyFullName, xPropSet)
+ return GetBoolProperty(gsPropertyFullName, xPropSet)
? XML_AUTHOR_NAME : XML_AUTHOR_INITIALS;
}
@@ -2942,7 +2945,7 @@ enum XMLTokenEnum XMLTextFieldExport::MapPageNumberName(
{
enum XMLTokenEnum eName = XML_TOKEN_INVALID;
PageNumberType ePage;
- Any aAny = xPropSet->getPropertyValue(sPropertySubType);
+ Any aAny = xPropSet->getPropertyValue(gsPropertySubType);
ePage = *o3tl::doAccess<PageNumberType>(aAny);
switch (ePage)
@@ -3185,7 +3188,7 @@ enum XMLTokenEnum XMLTextFieldExport::MapSenderFieldName(
enum XMLTokenEnum eName = XML_TOKEN_INVALID;
// sub-field type
- switch (GetInt16Property(sPropertyFieldSubType, xPropSet))
+ switch (GetInt16Property(gsPropertyFieldSubType, xPropSet))
{
case UserDataPart::COMPANY :
eName = XML_SENDER_COMPANY;
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index 9f0946873102..b14c45d64b32 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -537,6 +537,8 @@ void XMLTextFieldImportContext::ForceUpdate(
// XMLSenderFieldImportContext
+static const OUStringLiteral gsPropertyFieldSubType("UserDataType");
+
XMLSenderFieldImportContext::XMLSenderFieldImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp,
sal_uInt16 nPrfx, const OUString& sLocalName,
@@ -544,7 +546,6 @@ XMLSenderFieldImportContext::XMLSenderFieldImportContext(
: XMLTextFieldImportContext(rImport, rHlp, "ExtendedUser", nPrfx, sLocalName)
, nSubType(0)
, sPropertyFixed(sAPI_is_fixed)
- , sPropertyFieldSubType("UserDataType")
, sPropertyContent(sAPI_content)
, bFixed(true)
, nElementToken(nToken)
@@ -631,7 +632,7 @@ void XMLSenderFieldImportContext::PrepareField(
const Reference<XPropertySet> & rPropSet)
{
// set members
- rPropSet->setPropertyValue(sPropertyFieldSubType, Any(nSubType));
+ rPropSet->setPropertyValue(gsPropertyFieldSubType, Any(nSubType));
// set fixed
rPropSet->setPropertyValue(sPropertyFixed, Any(bFixed));
@@ -655,6 +656,7 @@ void XMLSenderFieldImportContext::PrepareField(
// XMLAuthorFieldImportContext
+static const OUStringLiteral gsPropertyAuthorFullName("FullName");
XMLAuthorFieldImportContext::XMLAuthorFieldImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp,
@@ -662,7 +664,6 @@ XMLAuthorFieldImportContext::XMLAuthorFieldImportContext(
sal_uInt16 nToken)
: XMLSenderFieldImportContext(rImport, rHlp, nPrfx, sLocalName, nToken)
, bAuthorFullName(true)
-, sPropertyAuthorFullName("FullName")
, sPropertyFixed(sAPI_is_fixed)
, sPropertyContent(sAPI_content)
{
@@ -695,7 +696,7 @@ void XMLAuthorFieldImportContext::PrepareField(
{
// set members
Any aAny;
- rPropSet->setPropertyValue(sPropertyAuthorFullName, Any(bAuthorFullName));
+ rPropSet->setPropertyValue(gsPropertyAuthorFullName, Any(bAuthorFullName));
rPropSet->setPropertyValue(sPropertyFixed, Any(bFixed));
@@ -728,12 +729,13 @@ static SvXMLEnumMapEntry<PageNumberType> const lcl_aSelectPageAttrMap[] =
{ XML_TOKEN_INVALID, PageNumberType(0) },
};
+static const OUStringLiteral gsPropertyUserText("UserText");
+
XMLPageContinuationImportContext::XMLPageContinuationImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp, sal_uInt16 nPrfx,
const OUString& sLocalName)
: XMLTextFieldImportContext(rImport, rHlp, sAPI_page_number, nPrfx, sLocalName)
, sPropertySubType(sAPI_sub_type)
-, sPropertyUserText("UserText")
, sPropertyNumberingType(sAPI_numbering_type)
, eSelectPage(PageNumberType_CURRENT)
, sStringOK(false)
@@ -772,7 +774,7 @@ void XMLPageContinuationImportContext::PrepareField(
xPropertySet->setPropertyValue(sPropertySubType, Any(eSelectPage));
aAny <<= (sStringOK ? sString : GetContent());
- xPropertySet->setPropertyValue(sPropertyUserText, aAny);
+ xPropertySet->setPropertyValue(gsPropertyUserText, aAny);
aAny <<= style::NumberingType::CHAR_SPECIAL;
xPropertySet->setPropertyValue(sPropertyNumberingType, aAny);
@@ -878,12 +880,13 @@ void XMLPageNumberImportContext::PrepareField(
// Placeholder
+static const OUStringLiteral gsPropertyPlaceholderType("PlaceHolderType");
+static const OUStringLiteral gsPropertyPlaceholder("PlaceHolder");
+
XMLPlaceholderFieldImportContext::XMLPlaceholderFieldImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp,
sal_uInt16 nPrfx, const OUString& sLocalName)
: XMLTextFieldImportContext(rImport, rHlp, "JumpEdit", nPrfx, sLocalName)
-, sPropertyPlaceholderType("PlaceHolderType")
-, sPropertyPlaceholder("PlaceHolder")
, sPropertyHint(sAPI_hint)
, nPlaceholderType(PlaceholderType::TEXT)
{
@@ -951,14 +954,15 @@ void XMLPlaceholderFieldImportContext::PrepareField(
--nLength;
}
aAny <<= aContent.copy(nStart, nLength);
- xPropertySet->setPropertyValue(sPropertyPlaceholder, aAny);
+ xPropertySet->setPropertyValue(gsPropertyPlaceholder, aAny);
- xPropertySet->setPropertyValue(sPropertyPlaceholderType, Any(nPlaceholderType));
+ xPropertySet->setPropertyValue(gsPropertyPlaceholderType, Any(nPlaceholderType));
}
// time field
+static const OUStringLiteral gsPropertyAdjust("Adjust");
XMLTimeFieldImportContext::XMLTimeFieldImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp,
@@ -968,7 +972,6 @@ XMLTimeFieldImportContext::XMLTimeFieldImportContext(
, sPropertyFixed(sAPI_is_fixed)
, sPropertyDateTimeValue(sAPI_date_time_value)
, sPropertyDateTime(sAPI_date_time)
-, sPropertyAdjust("Adjust")
, sPropertyIsDate(sAPI_is_date)
, sPropertyIsFixedLanguage(sAPI_is_fixed_language)
, nAdjust(0)
@@ -1043,9 +1046,9 @@ void XMLTimeFieldImportContext::PrepareField(
rPropertySet->setPropertyValue(sPropertyIsDate, Any(bIsDate));
- if (xPropertySetInfo->hasPropertyByName(sPropertyAdjust))
+ if (xPropertySetInfo->hasPropertyByName(gsPropertyAdjust))
{
- rPropertySet->setPropertyValue(sPropertyAdjust, Any(nAdjust));
+ rPropertySet->setPropertyValue(gsPropertyAdjust, Any(nAdjust));
}
// set value
@@ -1135,16 +1138,17 @@ void XMLDateFieldImportContext::ProcessAttribute(
// database field superclass
+static const OUStringLiteral gsPropertyDataBaseName("DataBaseName");
+static const OUStringLiteral gsPropertyDataBaseURL("DataBaseURL");
+static const OUStringLiteral gsPropertyTableName("DataTableName");
+static const OUStringLiteral gsPropertyDataCommandType("DataCommandType");
+static const OUStringLiteral gsPropertyIsVisible("IsVisible");
+
XMLDatabaseFieldImportContext::XMLDatabaseFieldImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp,
const sal_Char* pServiceName, sal_uInt16 nPrfx,
const OUString& sLocalName, bool bUseDisply)
: XMLTextFieldImportContext(rImport, rHlp, pServiceName, nPrfx, sLocalName)
-, sPropertyDataBaseName("DataBaseName")
-, sPropertyDataBaseURL("DataBaseURL")
-, sPropertyTableName("DataTableName")
-, sPropertyDataCommandType("DataCommandType")
-, sPropertyIsVisible("IsVisible")
, nCommandType( sdb::CommandType::TABLE )
, bCommandTypeOK(false)
, bDisplay( true )
@@ -1240,27 +1244,27 @@ SvXMLImportContextRef XMLDatabaseFieldImportContext::CreateChildContext(
void XMLDatabaseFieldImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- xPropertySet->setPropertyValue(sPropertyTableName, Any(sTableName));
+ xPropertySet->setPropertyValue(gsPropertyTableName, Any(sTableName));
if( bDatabaseNameOK )
{
- xPropertySet->setPropertyValue(sPropertyDataBaseName, Any(sDatabaseName));
+ xPropertySet->setPropertyValue(gsPropertyDataBaseName, Any(sDatabaseName));
}
else if( bDatabaseURLOK )
{
- xPropertySet->setPropertyValue(sPropertyDataBaseURL, Any(sDatabaseURL));
+ xPropertySet->setPropertyValue(gsPropertyDataBaseURL, Any(sDatabaseURL));
}
// #99980# load/save command type for all fields; also load
// old documents without command type
if( bCommandTypeOK )
{
- xPropertySet->setPropertyValue( sPropertyDataCommandType, Any(nCommandType) );
+ xPropertySet->setPropertyValue( gsPropertyDataCommandType, Any(nCommandType) );
}
if( bUseDisplay && bDisplayOK )
{
- xPropertySet->setPropertyValue( sPropertyIsVisible, Any(bDisplay) );
+ xPropertySet->setPropertyValue( gsPropertyIsVisible, Any(bDisplay) );
}
}
@@ -1602,13 +1606,13 @@ const sal_Char* XMLSimpleDocInfoImportContext::MapTokenToServiceName(
// revision field
+static const OUStringLiteral sPropertyRevision("Revision");
XMLRevisionDocInfoImportContext::XMLRevisionDocInfoImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp, sal_uInt16 nPrfx,
const OUString& sLocalName, sal_uInt16 nToken) :
XMLSimpleDocInfoImportContext(rImport, rHlp, nPrfx, sLocalName,
- nToken, false, false),
- sPropertyRevision("Revision")
+ nToken, false, false)
{
bValid = true;
}
@@ -1872,6 +1876,9 @@ void XMLHiddenParagraphImportContext::PrepareField(
// import conditional text (<text:conditional-text>)
+static const OUStringLiteral gsPropertyTrueContent("TrueContent");
+static const OUStringLiteral gsPropertyFalseContent("FalseContent");
+static const OUStringLiteral gsPropertyIsConditionTrue("IsConditionTrue");
XMLConditionalTextImportContext::XMLConditionalTextImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp,
@@ -1879,9 +1886,6 @@ XMLConditionalTextImportContext::XMLConditionalTextImportContext(
XMLTextFieldImportContext(rImport, rHlp, "ConditionalText",
nPrfx, sLocalName),
sPropertyCondition(sAPI_condition),
- sPropertyTrueContent("TrueContent"),
- sPropertyFalseContent("FalseContent"),
- sPropertyIsConditionTrue("IsConditionTrue"),
sPropertyCurrentPresentation(sAPI_current_presentation),
bConditionOK(false),
bTrueOK(false),
@@ -1936,9 +1940,9 @@ void XMLConditionalTextImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
xPropertySet->setPropertyValue(sPropertyCondition, Any(sCondition));
- xPropertySet->setPropertyValue(sPropertyFalseContent, Any(sFalseContent));
- xPropertySet->setPropertyValue(sPropertyTrueContent, Any(sTrueContent));
- xPropertySet->setPropertyValue(sPropertyIsConditionTrue, Any(bCurrentValue));
+ xPropertySet->setPropertyValue(gsPropertyFalseContent, Any(sFalseContent));
+ xPropertySet->setPropertyValue(gsPropertyTrueContent, Any(sTrueContent));
+ xPropertySet->setPropertyValue(gsPropertyIsConditionTrue, Any(bCurrentValue));
xPropertySet->setPropertyValue(sPropertyCurrentPresentation, Any(GetContent()));
}
@@ -2157,13 +2161,14 @@ static const SvXMLEnumMapEntry<sal_uInt16> aChapterDisplayMap[] =
{ XML_TOKEN_INVALID, 0 }
};
+static const OUStringLiteral gsPropertyChapterFormat("ChapterFormat");
+static const OUStringLiteral gsPropertyLevel("Level");
+
XMLChapterImportContext::XMLChapterImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp,
sal_uInt16 nPrfx, const OUString& sLocalName) :
XMLTextFieldImportContext(rImport, rHlp, "Chapter",
nPrfx, sLocalName),
- sPropertyChapterFormat("ChapterFormat"),
- sPropertyLevel("Level"),
nFormat(ChapterFormat::NAME_NUMBER),
nLevel(0)
{
@@ -2209,8 +2214,8 @@ void XMLChapterImportContext::ProcessAttribute(
void XMLChapterImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- xPropertySet->setPropertyValue(sPropertyChapterFormat, Any(nFormat));
- xPropertySet->setPropertyValue(sPropertyLevel, Any(nLevel));
+ xPropertySet->setPropertyValue(gsPropertyChapterFormat, Any(nFormat));
+ xPropertySet->setPropertyValue(gsPropertyLevel, Any(nLevel));
}
diff --git a/xmloff/source/text/txtftne.cxx b/xmloff/source/text/txtftne.cxx
index 31303fdde72a..0c7b7682413b 100644
--- a/xmloff/source/text/txtftne.cxx
+++ b/xmloff/source/text/txtftne.cxx
@@ -73,14 +73,14 @@ void XMLTextParagraphExport::exportTextFootnote(
{
// get footnote and associated text
Any aAny;
- aAny = rPropSet->getPropertyValue(sFootnote);
+ aAny = rPropSet->getPropertyValue(gsFootnote);
Reference<XFootnote> xFootnote;
aAny >>= xFootnote;
Reference<XText> xText(xFootnote, UNO_QUERY);
// are we an endnote?
Reference<XServiceInfo> xServiceInfo( xFootnote, UNO_QUERY );
- bool bIsEndnote = xServiceInfo->supportsService(sTextEndnoteService);
+ bool bIsEndnote = xServiceInfo->supportsService(gsTextEndnoteService);
if (bAutoStyles)
{
@@ -133,7 +133,7 @@ void XMLTextParagraphExport::exportTextFootnote(
GetExport(), bIsUICharStyle &&
aCharStyleNamesPropInfoCache.hasProperty(
rPropSet ), bHasAutoStyle,
- rPropSet, sCharStyleNames );
+ rPropSet, gsCharStyleNames );
if( !sStyle.isEmpty() )
{
GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_STYLE_NAME,
@@ -169,7 +169,7 @@ void XMLTextParagraphExport::exportTextFootnoteHelper(
{
// export reference Id (for reference fields)
Reference<XPropertySet> xPropSet(rFootnote, UNO_QUERY);
- Any aAny = xPropSet->getPropertyValue(sReferenceId);
+ Any aAny = xPropSet->getPropertyValue(gsReferenceId);
sal_Int32 nNumber = 0;
aAny >>= nNumber;
OUStringBuffer aBuf;
@@ -255,34 +255,34 @@ void XMLTextParagraphExport::exportTextFootnoteConfigurationHelper(
: XML_FOOTNOTE ) );
// default/paragraph style
lcl_exportString( GetExport(), rFootnoteConfig,
- sParaStyleName,
+ gsParaStyleName,
XML_NAMESPACE_TEXT, XML_DEFAULT_STYLE_NAME,
true);
// citation style
lcl_exportString( GetExport(), rFootnoteConfig,
- sCharStyleName,
+ gsCharStyleName,
XML_NAMESPACE_TEXT, XML_CITATION_STYLE_NAME,
true);
// citation body style
lcl_exportString( GetExport(), rFootnoteConfig,
- sAnchorCharStyleName,
+ gsAnchorCharStyleName,
XML_NAMESPACE_TEXT, XML_CITATION_BODY_STYLE_NAME,
true);
// page style
lcl_exportString( GetExport(), rFootnoteConfig,
- sPageStyleName,
+ gsPageStyleName,
XML_NAMESPACE_TEXT, XML_MASTER_PAGE_NAME,
true );
// prefix
- lcl_exportString( GetExport(), rFootnoteConfig, sPrefix,
+ lcl_exportString( GetExport(), rFootnoteConfig, gsPrefix,
XML_NAMESPACE_STYLE, XML_NUM_PREFIX, false);
// suffix
- lcl_exportString( GetExport(), rFootnoteConfig, sSuffix,
+ lcl_exportString( GetExport(), rFootnoteConfig, gsSuffix,
XML_NAMESPACE_STYLE, XML_NUM_SUFFIX, false);
@@ -290,7 +290,7 @@ void XMLTextParagraphExport::exportTextFootnoteConfigurationHelper(
// numbering style
OUStringBuffer sBuffer;
- aAny = rFootnoteConfig->getPropertyValue(sNumberingType);
+ aAny = rFootnoteConfig->getPropertyValue(gsNumberingType);
sal_Int16 nNumbering = 0;
aAny >>= nNumbering;
GetExport().GetMM100UnitConverter().convertNumFormat( sBuffer, nNumbering);
@@ -304,7 +304,7 @@ void XMLTextParagraphExport::exportTextFootnoteConfigurationHelper(
}
// StartAt / start-value
- aAny = rFootnoteConfig->getPropertyValue(sStartAt);
+ aAny = rFootnoteConfig->getPropertyValue(gsStartAt);
sal_Int16 nOffset = 0;
aAny >>= nOffset;
GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_START_VALUE,
@@ -315,12 +315,12 @@ void XMLTextParagraphExport::exportTextFootnoteConfigurationHelper(
{
// footnotes position
aAny = rFootnoteConfig->getPropertyValue(
- sPositionEndOfDoc);
+ gsPositionEndOfDoc);
GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_FOOTNOTES_POSITION,
( (*o3tl::doAccess<bool>(aAny)) ?
XML_DOCUMENT : XML_PAGE ) );
- aAny = rFootnoteConfig->getPropertyValue(sFootnoteCounting);
+ aAny = rFootnoteConfig->getPropertyValue(gsFootnoteCounting);
sal_Int16 nTmp = 0;
aAny >>= nTmp;
enum XMLTokenEnum eElement;
@@ -353,7 +353,7 @@ void XMLTextParagraphExport::exportTextFootnoteConfigurationHelper(
OUString sTmp;
// end notice / quo vadis
- aAny = rFootnoteConfig->getPropertyValue(sEndNotice);
+ aAny = rFootnoteConfig->getPropertyValue(gsEndNotice);
aAny >>= sTmp;
if (!sTmp.isEmpty())
@@ -365,7 +365,7 @@ void XMLTextParagraphExport::exportTextFootnoteConfigurationHelper(
}
// begin notice / ergo sum
- aAny = rFootnoteConfig->getPropertyValue(sBeginNotice);
+ aAny = rFootnoteConfig->getPropertyValue(gsBeginNotice);
aAny >>= sTmp;
if (!sTmp.isEmpty())
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index 93d5fe16424c..569be2c3c707 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -135,6 +135,84 @@ using namespace ::com::sun::star::graphic;
using namespace ::xmloff;
using namespace ::xmloff::token;
+// Implement Title/Description Elements UI (#i73249#)
+static const OUStringLiteral gsTitle("Title");
+static const OUStringLiteral gsDescription("Description");
+const OUStringLiteral XMLTextParagraphExport::gsAnchorCharStyleName("AnchorCharStyleName");
+static const OUStringLiteral gsAnchorPageNo("AnchorPageNo");
+static const OUStringLiteral gsAnchorType("AnchorType");
+const OUStringLiteral XMLTextParagraphExport::gsBeginNotice("BeginNotice");
+static const OUStringLiteral gsBookmark("Bookmark");
+const OUStringLiteral XMLTextParagraphExport::gsCategory("Category");
+static const OUStringLiteral gsChainNextName("ChainNextName");
+const OUStringLiteral XMLTextParagraphExport::gsCharStyleName("CharStyleName");
+const OUStringLiteral XMLTextParagraphExport::gsCharStyleNames("CharStyleNames");
+static const OUStringLiteral gsContourPolyPolygon("ContourPolyPolygon");
+static const OUStringLiteral gsDocumentIndexMark("DocumentIndexMark");
+const OUStringLiteral XMLTextParagraphExport::gsEndNotice("EndNotice");
+const OUStringLiteral XMLTextParagraphExport::gsFootnote("Footnote");
+const OUStringLiteral XMLTextParagraphExport::gsFootnoteCounting("FootnoteCounting");
+static const OUStringLiteral gsFrame("Frame");
+static const OUStringLiteral gsGraphicFilter("GraphicFilter");
+static const OUStringLiteral gsGraphicRotation("GraphicRotation");
+static const OUStringLiteral gsHeight("Height");
+static const OUStringLiteral gsHoriOrient("HoriOrient");
+static const OUStringLiteral gsHoriOrientPosition("HoriOrientPosition");
+static const OUStringLiteral gsHyperLinkName("HyperLinkName");
+static const OUStringLiteral gsHyperLinkTarget("HyperLinkTarget");
+static const OUStringLiteral gsHyperLinkURL("HyperLinkURL");
+static const OUStringLiteral gsIsAutomaticContour("IsAutomaticContour");
+static const OUStringLiteral gsIsCollapsed("IsCollapsed");
+static const OUStringLiteral gsIsPixelContour("IsPixelContour");
+static const OUStringLiteral gsIsStart("IsStart");
+static const OUStringLiteral gsIsSyncHeightToWidth("IsSyncHeightToWidth");
+static const OUStringLiteral gsIsSyncWidthToHeight("IsSyncWidthToHeight");
+static const OUStringLiteral gsNumberingRules("NumberingRules");
+const OUStringLiteral XMLTextParagraphExport::gsNumberingType("NumberingType");
+const OUStringLiteral XMLTextParagraphExport::gsPageDescName("PageDescName");
+const OUStringLiteral XMLTextParagraphExport::gsPageStyleName("PageStyleName");
+static const OUStringLiteral gsParaConditionalStyleName("ParaConditionalStyleName");
+static const OUStringLiteral gsParagraphService("com.sun.star.text.Paragraph");
+const OUStringLiteral XMLTextParagraphExport::gsParaStyleName("ParaStyleName");
+const OUStringLiteral XMLTextParagraphExport::gsPositionEndOfDoc("PositionEndOfDoc");
+const OUStringLiteral XMLTextParagraphExport::gsPrefix("Prefix");
+static const OUStringLiteral gsRedline("Redline");
+const OUStringLiteral XMLTextParagraphExport::gsReferenceId("ReferenceId");
+static const OUStringLiteral gsReferenceMark("ReferenceMark");
+static const OUStringLiteral gsRelativeHeight("RelativeHeight");
+static const OUStringLiteral gsRelativeWidth("RelativeWidth");
+static const OUStringLiteral gsRuby("Ruby");
+static const OUStringLiteral gsRubyCharStyleName("RubyCharStyleName");
+static const OUStringLiteral gsRubyText("RubyText");
+static const OUStringLiteral gsServerMap("ServerMap");
+static const OUStringLiteral gsShapeService("com.sun.star.drawing.Shape");
+static const OUStringLiteral gsSizeType("SizeType");
+static const OUStringLiteral gsSoftPageBreak( "SoftPageBreak" );
+const OUStringLiteral XMLTextParagraphExport::gsStartAt("StartAt");
+const OUStringLiteral XMLTextParagraphExport::gsSuffix("Suffix");
+static const OUStringLiteral gsTableService("com.sun.star.text.TextTable");
+static const OUStringLiteral gsText("Text");
+static const OUStringLiteral gsTextContentService("com.sun.star.text.TextContent");
+static const OUStringLiteral gsTextEmbeddedService("com.sun.star.text.TextEmbeddedObject");
+const OUStringLiteral XMLTextParagraphExport::gsTextEndnoteService("com.sun.star.text.Endnote");
+static const OUStringLiteral gsTextField("TextField");
+static const OUStringLiteral gsTextFieldService("com.sun.star.text.TextField");
+static const OUStringLiteral gsTextFrameService("com.sun.star.text.TextFrame");
+static const OUStringLiteral gsTextGraphicService("com.sun.star.text.TextGraphicObject");
+static const OUStringLiteral gsTextPortionType("TextPortionType");
+const OUStringLiteral XMLTextParagraphExport::gsTextSection("TextSection");
+static const OUStringLiteral gsUnvisitedCharStyleName("UnvisitedCharStyleName");
+static const OUStringLiteral gsVertOrient("VertOrient");
+static const OUStringLiteral gsVertOrientPosition("VertOrientPosition");
+static const OUStringLiteral gsVisitedCharStyleName("VisitedCharStyleName");
+static const OUStringLiteral gsWidth("Width");
+static const OUStringLiteral gsWidthType( "WidthType" );
+static const OUStringLiteral gsTextFieldStart( "TextFieldStart" );
+static const OUStringLiteral gsTextFieldEnd( "TextFieldEnd" );
+static const OUStringLiteral gsTextFieldStartEnd( "TextFieldStartEnd" );
+
+const OUStringLiteral XMLTextParagraphExport::gsFrameStyleName("FrameStyleName");
+
namespace
{
class TextContentSet
@@ -492,17 +570,17 @@ void XMLTextParagraphExport::Add( sal_uInt16 nFamily,
switch( nFamily )
{
case XML_STYLE_FAMILY_TEXT_PARAGRAPH:
- if( xPropSetInfo->hasPropertyByName( sParaStyleName ) )
+ if( xPropSetInfo->hasPropertyByName( gsParaStyleName ) )
{
- rPropSet->getPropertyValue( sParaStyleName ) >>= sParent;
+ rPropSet->getPropertyValue( gsParaStyleName ) >>= sParent;
}
- if( xPropSetInfo->hasPropertyByName( sParaConditionalStyleName ) )
+ if( xPropSetInfo->hasPropertyByName( gsParaConditionalStyleName ) )
{
- rPropSet->getPropertyValue( sParaConditionalStyleName ) >>= sCondParent;
+ rPropSet->getPropertyValue( gsParaConditionalStyleName ) >>= sCondParent;
}
- if( xPropSetInfo->hasPropertyByName( sNumberingRules ) )
+ if( xPropSetInfo->hasPropertyByName( gsNumberingRules ) )
{
- Reference < XIndexReplace > xNumRule(rPropSet->getPropertyValue( sNumberingRules ), uno::UNO_QUERY);
+ Reference < XIndexReplace > xNumRule(rPropSet->getPropertyValue( gsNumberingRules ), uno::UNO_QUERY);
if( xNumRule.is() && xNumRule->getCount() )
{
Reference < XNamed > xNamed( xNumRule, UNO_QUERY );
@@ -566,9 +644,9 @@ void XMLTextParagraphExport::Add( sal_uInt16 nFamily,
}
break;
case XML_STYLE_FAMILY_TEXT_FRAME:
- if( xPropSetInfo->hasPropertyByName( sFrameStyleName ) )
+ if( xPropSetInfo->hasPropertyByName( gsFrameStyleName ) )
{
- rPropSet->getPropertyValue( sFrameStyleName ) >>= sParent;
+ rPropSet->getPropertyValue( gsFrameStyleName ) >>= sParent;
}
break;
case XML_STYLE_FAMILY_TEXT_SECTION:
@@ -1176,83 +1254,7 @@ XMLTextParagraphExport::XMLTextParagraphExport(
mpTextListsHelper( nullptr ),
maTextListsHelperStack(),
mbCollected(false),
- // Implement Title/Description Elements UI (#i73249#)
- sTitle("Title"),
- sDescription("Description"),
- sAnchorCharStyleName("AnchorCharStyleName"),
- sAnchorPageNo("AnchorPageNo"),
- sAnchorType("AnchorType"),
- sBeginNotice("BeginNotice"),
- sBookmark("Bookmark"),
- sCategory("Category"),
- sChainNextName("ChainNextName"),
- sCharStyleName("CharStyleName"),
- sCharStyleNames("CharStyleNames"),
- sContourPolyPolygon("ContourPolyPolygon"),
- sDocumentIndexMark("DocumentIndexMark"),
- sEndNotice("EndNotice"),
- sFootnote("Footnote"),
- sFootnoteCounting("FootnoteCounting"),
- sFrame("Frame"),
- sGraphicFilter("GraphicFilter"),
- sGraphicRotation("GraphicRotation"),
- sHeight("Height"),
- sHoriOrient("HoriOrient"),
- sHoriOrientPosition("HoriOrientPosition"),
- sHyperLinkName("HyperLinkName"),
- sHyperLinkTarget("HyperLinkTarget"),
- sHyperLinkURL("HyperLinkURL"),
- sIsAutomaticContour("IsAutomaticContour"),
- sIsCollapsed("IsCollapsed"),
- sIsPixelContour("IsPixelContour"),
- sIsStart("IsStart"),
- sIsSyncHeightToWidth("IsSyncHeightToWidth"),
- sIsSyncWidthToHeight("IsSyncWidthToHeight"),
- sNumberingRules("NumberingRules"),
- sNumberingType("NumberingType"),
- sPageDescName("PageDescName"),
- sPageStyleName("PageStyleName"),
- sParaConditionalStyleName("ParaConditionalStyleName"),
- sParagraphService("com.sun.star.text.Paragraph"),
- sParaStyleName("ParaStyleName"),
- sPositionEndOfDoc("PositionEndOfDoc"),
- sPrefix("Prefix"),
- sRedline("Redline"),
- sReferenceId("ReferenceId"),
- sReferenceMark("ReferenceMark"),
- sRelativeHeight("RelativeHeight"),
- sRelativeWidth("RelativeWidth"),
- sRuby("Ruby"),
- sRubyCharStyleName("RubyCharStyleName"),
- sRubyText("RubyText"),
- sServerMap("ServerMap"),
- sShapeService("com.sun.star.drawing.Shape"),
- sSizeType("SizeType"),
- sSoftPageBreak( "SoftPageBreak" ),
- sStartAt("StartAt"),
- sSuffix("Suffix"),
- sTableService("com.sun.star.text.TextTable"),
- sText("Text"),
- sTextContentService("com.sun.star.text.TextContent"),
- sTextEmbeddedService("com.sun.star.text.TextEmbeddedObject"),
- sTextEndnoteService("com.sun.star.text.Endnote"),
- sTextField("TextField"),
- sTextFieldService("com.sun.star.text.TextField"),
- sTextFrameService("com.sun.star.text.TextFrame"),
- sTextGraphicService("com.sun.star.text.TextGraphicObject"),
- sTextPortionType("TextPortionType"),
- sTextSection("TextSection"),
- sUnvisitedCharStyleName("UnvisitedCharStyleName"),
- sVertOrient("VertOrient"),
- sVertOrientPosition("VertOrientPosition"),
- sVisitedCharStyleName("VisitedCharStyleName"),
- sWidth("Width"),
- sWidthType( "WidthType" ),
- sTextFieldStart( "TextFieldStart" ),
- sTextFieldEnd( "TextFieldEnd" ),
- sTextFieldStartEnd( "TextFieldStartEnd" ),
- sFrameStyleName("FrameStyleName"),
- aCharStyleNamesPropInfoCache( sCharStyleNames )
+ aCharStyleNamesPropInfoCache( gsCharStyleNames )
{
rtl::Reference < XMLPropertySetMapper > xPropMapper(new XMLTextPropertySetMapper( TextPropMap::PARA, true ));
xParaPropMapper = new XMLTextExportPropertySetMapper( xPropMapper,
@@ -1550,7 +1552,7 @@ void XMLTextParagraphExport::collectTextAutoStylesOptimized( bool bIsProgress )
if(xTxtCntnt.is())
{
Reference<XServiceInfo> xServiceInfo(xTxtCntnt, UNO_QUERY);
- if( xServiceInfo->supportsService(sShapeService))
+ if( xServiceInfo->supportsService(gsShapeService))
exportShape(xTxtCntnt, true);
}
}
@@ -1667,9 +1669,9 @@ void XMLTextParagraphExport::exportText(
if( xInfo.is() )
{
- if (xInfo->hasPropertyByName( sTextSection ))
+ if (xInfo->hasPropertyByName( gsTextSection ))
{
- xPropertySet->getPropertyValue(sTextSection) >>= xBaseSection ;
+ xPropertySet->getPropertyValue(gsTextSection) >>= xBaseSection ;
}
}
}
@@ -1756,7 +1758,7 @@ void XMLTextParagraphExport::exportTextContentEnumeration(
}
Reference<XServiceInfo> xServiceInfo( xTxtCntnt, UNO_QUERY );
- if( xServiceInfo->supportsService( sParagraphService ) )
+ if( xServiceInfo->supportsService( gsParagraphService ) )
{
if( bAutoStyles )
{
@@ -1806,7 +1808,7 @@ void XMLTextParagraphExport::exportTextContentEnumeration(
bExportParagraph, aPropSetHelper, eExtensionNS );
bHasContent = true;
}
- else if( xServiceInfo->supportsService( sTableService ) )
+ else if( xServiceInfo->supportsService( gsTableService ) )
{
if( !bAutoStyles )
{
@@ -1836,19 +1838,19 @@ void XMLTextParagraphExport::exportTextContentEnumeration(
bHasContent = true;
}
- else if( xServiceInfo->supportsService( sTextFrameService ) )
+ else if( xServiceInfo->supportsService( gsTextFrameService ) )
{
exportTextFrame( xTxtCntnt, bAutoStyles, bIsProgress, true, pRangePropSet );
}
- else if( xServiceInfo->supportsService( sTextGraphicService ) )
+ else if( xServiceInfo->supportsService( gsTextGraphicService ) )
{
exportTextGraphic( xTxtCntnt, bAutoStyles, pRangePropSet );
}
- else if( xServiceInfo->supportsService( sTextEmbeddedService ) )
+ else if( xServiceInfo->supportsService( gsTextEmbeddedService ) )
{
exportTextEmbedded( xTxtCntnt, bAutoStyles, pRangePropSet );
}
- else if( xServiceInfo->supportsService( sShapeService ) )
+ else if( xServiceInfo->supportsService( gsShapeService ) )
{
exportShape( xTxtCntnt, bAutoStyles, pRangePropSet );
}
@@ -2084,7 +2086,7 @@ void XMLTextParagraphExport::exportParagraph(
Reference < XEnumeration> xContentEnum;
Reference < XContentEnumerationAccess > xCEA( rTextContent, UNO_QUERY );
if( xCEA.is() )
- xContentEnum.set(xCEA->createContentEnumeration( sTextContentService ));
+ xContentEnum.set(xCEA->createContentEnumeration( gsTextContentService ));
const bool bHasContentEnum = xContentEnum.is() &&
xContentEnum->hasMoreElements();
@@ -2097,9 +2099,9 @@ void XMLTextParagraphExport::exportParagraph(
// we always retrieve the style names even if they are not required.
if( bAutoStyles )
{
- if( xPropSet->getPropertySetInfo()->hasPropertyByName( sTextSection ) )
+ if( xPropSet->getPropertySetInfo()->hasPropertyByName( gsTextSection ) )
{
- xSection.set(xPropSet->getPropertyValue( sTextSection ), uno::UNO_QUERY);
+ xSection.set(xPropSet->getPropertyValue( gsTextSection ), uno::UNO_QUERY);
}
}
else
@@ -2157,17 +2159,17 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
Reference < XTextRange > xTxtRange(xPropSet, uno::UNO_QUERY);
Reference<XPropertySetInfo> xPropInfo(xPropSet->getPropertySetInfo());
- if (xPropInfo->hasPropertyByName(sTextPortionType))
+ if (xPropInfo->hasPropertyByName(gsTextPortionType))
{
OUString sType;
- xPropSet->getPropertyValue(sTextPortionType) >>= sType;
+ xPropSet->getPropertyValue(gsTextPortionType) >>= sType;
- if( sType == sText)
+ if( sType == gsText)
{
exportTextRange( xTxtRange, bAutoStyles,
rPrevCharIsSpace, openFieldMark);
}
- else if( sType == sTextField)
+ else if( sType == gsTextField)
{
exportTextField(xTxtRange, bAutoStyles, bIsProgress, &rPrevCharIsSpace);
}
@@ -2179,7 +2181,7 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
{
if (!bAutoStyles)
{
- Reference<XNamed> xBookmark(xPropSet->getPropertyValue(sBookmark), UNO_QUERY);
+ Reference<XNamed> xBookmark(xPropSet->getPropertyValue(gsBookmark), UNO_QUERY);
const OUString& rName = xBookmark->getName();
if (!rName.isEmpty())
{
@@ -2188,14 +2190,14 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_OFFICE, XML_ANNOTATION_END, false, false );
}
}
- else if( sType == sFrame )
+ else if( sType == gsFrame )
{
Reference < XEnumeration> xContentEnum;
Reference < XContentEnumerationAccess > xCEA( xTxtRange,
UNO_QUERY );
if( xCEA.is() )
xContentEnum.set(xCEA->createContentEnumeration(
- sTextContentService ));
+ gsTextContentService ));
// frames are never in sections
Reference<XTextSection> xSection;
if( xContentEnum.is() )
@@ -2205,36 +2207,36 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
&xPropSet );
}
- else if (sType == sFootnote)
+ else if (sType == gsFootnote)
{
exportTextFootnote(xPropSet,
xTxtRange->getString(),
bAutoStyles, bIsProgress );
}
- else if (sType == sBookmark)
+ else if (sType == gsBookmark)
{
exportTextMark(xPropSet,
- sBookmark,
+ gsBookmark,
lcl_XmlBookmarkElements,
bAutoStyles);
}
- else if (sType == sReferenceMark)
+ else if (sType == gsReferenceMark)
{
exportTextMark(xPropSet,
- sReferenceMark,
+ gsReferenceMark,
lcl_XmlReferenceElements,
bAutoStyles);
}
- else if (sType == sDocumentIndexMark)
+ else if (sType == gsDocumentIndexMark)
{
pIndexMarkExport->ExportIndexMark(xPropSet, bAutoStyles);
}
- else if (sType == sRedline)
+ else if (sType == gsRedline)
{
if (nullptr != pRedlineExport)
pRedlineExport->ExportChange(xPropSet, bAutoStyles);
}
- else if (sType == sRuby)
+ else if (sType == gsRuby)
{
exportRuby(xPropSet, bAutoStyles);
}
@@ -2242,16 +2244,16 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
{
exportMeta(xPropSet, bAutoStyles, bIsProgress, rPrevCharIsSpace);
}
- else if (sType == sTextFieldStart)
+ else if (sType == gsTextFieldStart)
{
- Reference< css::text::XFormField > xFormField(xPropSet->getPropertyValue(sBookmark), UNO_QUERY);
+ Reference< css::text::XFormField > xFormField(xPropSet->getPropertyValue(gsBookmark), UNO_QUERY);
/* As of now, textmarks are a proposed extension to the OpenDocument standard. */
if (!bAutoStyles)
{
if (GetExport().getDefaultVersion() > SvtSaveOptions::ODFVER_012)
{
- Reference<XNamed> xBookmark(xPropSet->getPropertyValue(sBookmark), UNO_QUERY);
+ Reference<XNamed> xBookmark(xPropSet->getPropertyValue(gsBookmark), UNO_QUERY);
if (xBookmark.is())
{
GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_NAME, xBookmark->getName());
@@ -2309,11 +2311,11 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
}
}
}
- else if (sType == sTextFieldEnd)
+ else if (sType == gsTextFieldEnd)
{
if (!bAutoStyles)
{
- Reference< css::text::XFormField > xFormField(xPropSet->getPropertyValue(sBookmark), UNO_QUERY);
+ Reference< css::text::XFormField > xFormField(xPropSet->getPropertyValue(gsBookmark), UNO_QUERY);
if ( GetExport().getDefaultVersion() > SvtSaveOptions::ODFVER_012 )
{
@@ -2347,18 +2349,18 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
}
}
}
- else if (sType == sTextFieldStartEnd)
+ else if (sType == gsTextFieldStartEnd)
{
if (!bAutoStyles)
{
if (GetExport().getDefaultVersion() > SvtSaveOptions::ODFVER_012)
{
- Reference<XNamed> xBookmark(xPropSet->getPropertyValue(sBookmark), UNO_QUERY);
+ Reference<XNamed> xBookmark(xPropSet->getPropertyValue(gsBookmark), UNO_QUERY);
if (xBookmark.is())
{
GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_NAME, xBookmark->getName());
}
- Reference< css::text::XFormField > xFormField(xPropSet->getPropertyValue(sBookmark), UNO_QUERY);
+ Reference< css::text::XFormField > xFormField(xPropSet->getPropertyValue(gsBookmark), UNO_QUERY);
if (xFormField.is())
{
GetExport().AddAttribute(XML_NAMESPACE_FIELD, XML_TYPE, xFormField->getFieldType());
@@ -2372,7 +2374,7 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
}
else
{
- Reference<XNamed> xBookmark(xPropSet->getPropertyValue(sBookmark), UNO_QUERY);
+ Reference<XNamed> xBookmark(xPropSet->getPropertyValue(gsBookmark), UNO_QUERY);
if (xBookmark.is())
{
GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_NAME, xBookmark->getName());
@@ -2383,7 +2385,7 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
}
}
}
- else if (sType == sSoftPageBreak)
+ else if (sType == gsSoftPageBreak)
{
exportSoftPageBreak();
}
@@ -2394,7 +2396,7 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
else
{
Reference<XServiceInfo> xServiceInfo( xTxtRange, UNO_QUERY );
- if( xServiceInfo->supportsService( sTextFieldService ) )
+ if( xServiceInfo->supportsService( gsTextFieldService ) )
{
exportTextField(xTxtRange, bAutoStyles, bIsProgress, &rPrevCharIsSpace);
}
@@ -2422,9 +2424,9 @@ void XMLTextParagraphExport::exportTextField(
{
Reference < XPropertySet > xPropSet( rTextRange, UNO_QUERY );
// non-Writer apps need not support Property TextField, so test first
- if (xPropSet->getPropertySetInfo()->hasPropertyByName( sTextField ))
+ if (xPropSet->getPropertySetInfo()->hasPropertyByName( gsTextField ))
{
- Reference < XTextField > xTxtFld(xPropSet->getPropertyValue( sTextField ), uno::UNO_QUERY);
+ Reference < XTextField > xTxtFld(xPropSet->getPropertyValue( gsTextField ), uno::UNO_QUERY);
SAL_WARN_IF( !xTxtFld.is(), "xmloff", "text field missing" );
if( xTxtFld.is() )
{
@@ -2485,13 +2487,13 @@ void XMLTextParagraphExport::exportTextMark(
// start, end, or point-reference?
sal_Int8 nElement;
- if( *o3tl::doAccess<bool>(rPropSet->getPropertyValue(sIsCollapsed)) )
+ if( *o3tl::doAccess<bool>(rPropSet->getPropertyValue(gsIsCollapsed)) )
{
nElement = 0;
}
else
{
- nElement = *o3tl::doAccess<bool>(rPropSet->getPropertyValue(sIsStart)) ? 1 : 2;
+ nElement = *o3tl::doAccess<bool>(rPropSet->getPropertyValue(gsIsStart)) ? 1 : 2;
}
// bookmark, bookmark-start: xml:id and RDFa for RDF metadata
@@ -2579,7 +2581,7 @@ XMLShapeExportFlags XMLTextParagraphExport::addTextFrameAttributes(
// text:anchor-type
TextContentAnchorType eAnchor = TextContentAnchorType_AT_PARAGRAPH;
- rPropSet->getPropertyValue( sAnchorType ) >>= eAnchor;
+ rPropSet->getPropertyValue( gsAnchorType ) >>= eAnchor;
{
XMLAnchorTypePropHdl aAnchorTypeHdl;
OUString sTmp;
@@ -2592,7 +2594,7 @@ XMLShapeExportFlags XMLTextParagraphExport::addTextFrameAttributes(
if( TextContentAnchorType_AT_PAGE == eAnchor )
{
sal_Int16 nPage = 0;
- rPropSet->getPropertyValue( sAnchorPageNo ) >>= nPage;
+ rPropSet->getPropertyValue( gsAnchorPageNo ) >>= nPage;
SAL_WARN_IF(nPage <= 0, "xmloff",
"ERROR: writing invalid anchor-page-number 0");
GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_ANCHOR_PAGE_NUMBER,
@@ -2610,11 +2612,11 @@ XMLShapeExportFlags XMLTextParagraphExport::addTextFrameAttributes(
{
// svg:x
sal_Int16 nHoriOrient = HoriOrientation::NONE;
- rPropSet->getPropertyValue( sHoriOrient ) >>= nHoriOrient;
+ rPropSet->getPropertyValue( gsHoriOrient ) >>= nHoriOrient;
if( HoriOrientation::NONE == nHoriOrient )
{
sal_Int32 nPos = 0;
- rPropSet->getPropertyValue( sHoriOrientPosition ) >>= nPos;
+ rPropSet->getPropertyValue( gsHoriOrientPosition ) >>= nPos;
GetExport().GetMM100UnitConverter().convertMeasureToXML(
sValue, nPos );
GetExport().AddAttribute( XML_NAMESPACE_SVG, XML_X,
@@ -2633,11 +2635,11 @@ XMLShapeExportFlags XMLTextParagraphExport::addTextFrameAttributes(
{
// svg:y
sal_Int16 nVertOrient = VertOrientation::NONE;
- rPropSet->getPropertyValue( sVertOrient ) >>= nVertOrient;
+ rPropSet->getPropertyValue( gsVertOrient ) >>= nVertOrient;
if( VertOrientation::NONE == nVertOrient )
{
sal_Int32 nPos = 0;
- rPropSet->getPropertyValue( sVertOrientPosition ) >>= nPos;
+ rPropSet->getPropertyValue( gsVertOrientPosition ) >>= nPos;
GetExport().GetMM100UnitConverter().convertMeasureToXML(
sValue, nPos );
GetExport().AddAttribute( XML_NAMESPACE_SVG, XML_Y,
@@ -2656,17 +2658,17 @@ XMLShapeExportFlags XMLTextParagraphExport::addTextFrameAttributes(
// svg:width
sal_Int16 nWidthType = SizeType::FIX;
- if( xPropSetInfo->hasPropertyByName( sWidthType ) )
+ if( xPropSetInfo->hasPropertyByName( gsWidthType ) )
{
- rPropSet->getPropertyValue( sWidthType ) >>= nWidthType;
+ rPropSet->getPropertyValue( gsWidthType ) >>= nWidthType;
}
- if( xPropSetInfo->hasPropertyByName( sWidth ) )
+ if( xPropSetInfo->hasPropertyByName( gsWidth ) )
{
sal_Int32 nWidth = 0;
// VAR size will be written as zero min-size
if( SizeType::VARIABLE != nWidthType )
{
- rPropSet->getPropertyValue( sWidth ) >>= nWidth;
+ rPropSet->getPropertyValue( gsWidth ) >>= nWidth;
}
GetExport().GetMM100UnitConverter().convertMeasureToXML(sValue, nWidth);
if( SizeType::FIX != nWidthType )
@@ -2689,17 +2691,17 @@ XMLShapeExportFlags XMLTextParagraphExport::addTextFrameAttributes(
}
}
bool bSyncWidth = false;
- if( xPropSetInfo->hasPropertyByName( sIsSyncWidthToHeight ) )
+ if( xPropSetInfo->hasPropertyByName( gsIsSyncWidthToHeight ) )
{
- bSyncWidth = *o3tl::doAccess<bool>(rPropSet->getPropertyValue( sIsSyncWidthToHeight ));
+ bSyncWidth = *o3tl::doAccess<bool>(rPropSet->getPropertyValue( gsIsSyncWidthToHeight ));
if( bSyncWidth )
GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_REL_WIDTH,
XML_SCALE );
}
- if( !bSyncWidth && xPropSetInfo->hasPropertyByName( sRelativeWidth ) )
+ if( !bSyncWidth && xPropSetInfo->hasPropertyByName( gsRelativeWidth ) )
{
sal_Int16 nRelWidth = 0;
- rPropSet->getPropertyValue( sRelativeWidth ) >>= nRelWidth;
+ rPropSet->getPropertyValue( gsRelativeWidth ) >>= nRelWidth;
SAL_WARN_IF( nRelWidth < 0 || nRelWidth > 254, "xmloff",
"Got illegal relative width from API" );
if( nRelWidth > 0 )
@@ -2712,26 +2714,26 @@ XMLShapeExportFlags XMLTextParagraphExport::addTextFrameAttributes(
// svg:height, fo:min-height or style:rel-height
sal_Int16 nSizeType = SizeType::FIX;
- if( xPropSetInfo->hasPropertyByName( sSizeType ) )
+ if( xPropSetInfo->hasPropertyByName( gsSizeType ) )
{
- rPropSet->getPropertyValue( sSizeType ) >>= nSizeType;
+ rPropSet->getPropertyValue( gsSizeType ) >>= nSizeType;
}
bool bSyncHeight = false;
- if( xPropSetInfo->hasPropertyByName( sIsSyncHeightToWidth ) )
+ if( xPropSetInfo->hasPropertyByName( gsIsSyncHeightToWidth ) )
{
- bSyncHeight = *o3tl::doAccess<bool>(rPropSet->getPropertyValue( sIsSyncHeightToWidth ));
+ bSyncHeight = *o3tl::doAccess<bool>(rPropSet->getPropertyValue( gsIsSyncHeightToWidth ));
}
sal_Int16 nRelHeight = 0;
- if( !bSyncHeight && xPropSetInfo->hasPropertyByName( sRelativeHeight ) )
+ if( !bSyncHeight && xPropSetInfo->hasPropertyByName( gsRelativeHeight ) )
{
- rPropSet->getPropertyValue( sRelativeHeight ) >>= nRelHeight;
+ rPropSet->getPropertyValue( gsRelativeHeight ) >>= nRelHeight;
}
- if( xPropSetInfo->hasPropertyByName( sHeight ) )
+ if( xPropSetInfo->hasPropertyByName( gsHeight ) )
{
sal_Int32 nHeight = 0;
if( SizeType::VARIABLE != nSizeType )
{
- rPropSet->getPropertyValue( sHeight ) >>= nHeight;
+ rPropSet->getPropertyValue( gsHeight ) >>= nHeight;
}
GetExport().GetMM100UnitConverter().convertMeasureToXML( sValue,
nHeight );
@@ -2860,7 +2862,7 @@ void XMLTextParagraphExport::exportAnyTextFrame(
XMLTextCharStyleNamesElementExport aCharStylesExport(
GetExport(), bDoSomething, bHasAutoStyle,
bDoSomething ? *pRangePropSet : Reference<XPropertySet>(),
- sCharStyleNames );
+ gsCharStyleNames );
if( !sStyle.isEmpty() )
GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_STYLE_NAME,
@@ -2910,9 +2912,9 @@ void XMLTextParagraphExport::_exportTextFrame(
Reference < XText > xTxt(xTxtFrame->getText());
OUString sStyle;
- if( rPropSetInfo->hasPropertyByName( sFrameStyleName ) )
+ if( rPropSetInfo->hasPropertyByName( gsFrameStyleName ) )
{
- rPropSet->getPropertyValue( sFrameStyleName ) >>= sStyle;
+ rPropSet->getPropertyValue( gsFrameStyleName ) >>= sStyle;
}
OUString sAutoStyle( sStyle );
@@ -2938,10 +2940,10 @@ void XMLTextParagraphExport::_exportTextFrame(
}
// draw:chain-next-name
- if( rPropSetInfo->hasPropertyByName( sChainNextName ) )
+ if( rPropSetInfo->hasPropertyByName( gsChainNextName ) )
{
OUString sNext;
- if( (rPropSet->getPropertyValue( sChainNextName ) >>= sNext) && !sNext.isEmpty() )
+ if( (rPropSet->getPropertyValue( gsChainNextName ) >>= sNext) && !sNext.isEmpty() )
GetExport().AddAttribute( XML_NAMESPACE_DRAW,
XML_CHAIN_NEXT_NAME,
sNext );
@@ -2972,13 +2974,13 @@ void XMLTextParagraphExport::exportContour(
const Reference < XPropertySet > & rPropSet,
const Reference < XPropertySetInfo > & rPropSetInfo )
{
- if( !rPropSetInfo->hasPropertyByName( sContourPolyPolygon ) )
+ if( !rPropSetInfo->hasPropertyByName( gsContourPolyPolygon ) )
{
return;
}
PointSequenceSequence aSourcePolyPolygon;
- rPropSet->getPropertyValue( sContourPolyPolygon ) >>= aSourcePolyPolygon;
+ rPropSet->getPropertyValue( gsContourPolyPolygon ) >>= aSourcePolyPolygon;
const basegfx::B2DPolyPolygon aPolyPolygon(
basegfx::utils::UnoPointSequenceSequenceToB2DPolyPolygon(
aSourcePolyPolygon));
@@ -2992,9 +2994,9 @@ void XMLTextParagraphExport::exportContour(
const basegfx::B2DRange aPolyPolygonRange(aPolyPolygon.getB2DRange());
bool bPixel(false);
- if( rPropSetInfo->hasPropertyByName( sIsPixelContour ) )
+ if( rPropSetInfo->hasPropertyByName( gsIsPixelContour ) )
{
- bPixel = *o3tl::doAccess<bool>(rPropSet->getPropertyValue( sIsPixelContour ));
+ bPixel = *o3tl::doAccess<bool>(rPropSet->getPropertyValue( gsIsPixelContour ));
}
// svg: width
@@ -3054,10 +3056,10 @@ void XMLTextParagraphExport::exportContour(
eElem = XML_CONTOUR_PATH;
}
- if( rPropSetInfo->hasPropertyByName( sIsAutomaticContour ) )
+ if( rPropSetInfo->hasPropertyByName( gsIsAutomaticContour ) )
{
bool bTmp = *o3tl::doAccess<bool>(rPropSet->getPropertyValue(
- sIsAutomaticContour ));
+ gsIsAutomaticContour ));
GetExport().AddAttribute( XML_NAMESPACE_DRAW,
XML_RECREATE_ON_EDIT, bTmp ? XML_TRUE : XML_FALSE );
}
@@ -3072,9 +3074,9 @@ void XMLTextParagraphExport::_exportTextGraphic(
const Reference < XPropertySetInfo > & rPropSetInfo )
{
OUString sStyle;
- if( rPropSetInfo->hasPropertyByName( sFrameStyleName ) )
+ if( rPropSetInfo->hasPropertyByName( gsFrameStyleName ) )
{
- rPropSet->getPropertyValue( sFrameStyleName ) >>= sStyle;
+ rPropSet->getPropertyValue( gsFrameStyleName ) >>= sStyle;
}
OUString sAutoStyle( sStyle );
@@ -3085,7 +3087,7 @@ void XMLTextParagraphExport::_exportTextGraphic(
// check if we need to use svg:transform
sal_Int16 nRotation(0);
- rPropSet->getPropertyValue( sGraphicRotation ) >>= nRotation;
+ rPropSet->getPropertyValue( gsGraphicRotation ) >>= nRotation;
const bool bUseRotation(0 != nRotation);
basegfx::B2DPoint aCenter(0.0, 0.0);
@@ -3158,7 +3160,7 @@ void XMLTextParagraphExport::_exportTextGraphic(
// draw:filter-name
OUString sGrfFilter;
- rPropSet->getPropertyValue( sGraphicFilter ) >>= sGrfFilter;
+ rPropSet->getPropertyValue( gsGraphicFilter ) >>= sGrfFilter;
if( !sGrfFilter.isEmpty() )
GetExport().AddAttribute( XML_NAMESPACE_DRAW, XML_FILTER_NAME,
sGrfFilter );
@@ -3275,10 +3277,10 @@ void XMLTextParagraphExport::exportTitleAndDescription(
const Reference < XPropertySetInfo > & rPropSetInfo )
{
// svg:title
- if( rPropSetInfo->hasPropertyByName( sTitle ) )
+ if( rPropSetInfo->hasPropertyByName( gsTitle ) )
{
OUString sObjTitle;
- rPropSet->getPropertyValue( sTitle ) >>= sObjTitle;
+ rPropSet->getPropertyValue( gsTitle ) >>= sObjTitle;
if( !sObjTitle.isEmpty() )
{
SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_SVG,
@@ -3288,10 +3290,10 @@ void XMLTextParagraphExport::exportTitleAndDescription(
}
// svg:description
- if( rPropSetInfo->hasPropertyByName( sDescription ) )
+ if( rPropSetInfo->hasPropertyByName( gsDescription ) )
{
OUString sObjDesc;
- rPropSet->getPropertyValue( sDescription ) >>= sObjDesc;
+ rPropSet->getPropertyValue( gsDescription ) >>= sObjDesc;
if( !sObjDesc.isEmpty() )
{
SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_SVG,
@@ -3310,11 +3312,11 @@ bool XMLTextParagraphExport::addHyperlinkAttributes(
OUString sHRef, sName, sTargetFrame, sUStyleName, sVStyleName;
bool bServerMap = false;
- if( rPropSetInfo->hasPropertyByName( sHyperLinkURL ) &&
+ if( rPropSetInfo->hasPropertyByName( gsHyperLinkURL ) &&
( !rPropState.is() || PropertyState_DIRECT_VALUE ==
- rPropState->getPropertyState( sHyperLinkURL ) ) )
+ rPropState->getPropertyState( gsHyperLinkURL ) ) )
{
- rPropSet->getPropertyValue( sHyperLinkURL ) >>= sHRef;
+ rPropSet->getPropertyValue( gsHyperLinkURL ) >>= sHRef;
if( !sHRef.isEmpty() )
bExport = true;
@@ -3327,47 +3329,47 @@ bool XMLTextParagraphExport::addHyperlinkAttributes(
return false;
}
- if ( rPropSetInfo->hasPropertyByName( sHyperLinkName )
+ if ( rPropSetInfo->hasPropertyByName( gsHyperLinkName )
&& ( !rPropState.is()
- || PropertyState_DIRECT_VALUE == rPropState->getPropertyState( sHyperLinkName ) ) )
+ || PropertyState_DIRECT_VALUE == rPropState->getPropertyState( gsHyperLinkName ) ) )
{
- rPropSet->getPropertyValue( sHyperLinkName ) >>= sName;
+ rPropSet->getPropertyValue( gsHyperLinkName ) >>= sName;
if( !sName.isEmpty() )
bExport = true;
}
- if ( rPropSetInfo->hasPropertyByName( sHyperLinkTarget )
+ if ( rPropSetInfo->hasPropertyByName( gsHyperLinkTarget )
&& ( !rPropState.is()
- || PropertyState_DIRECT_VALUE == rPropState->getPropertyState( sHyperLinkTarget ) ) )
+ || PropertyState_DIRECT_VALUE == rPropState->getPropertyState( gsHyperLinkTarget ) ) )
{
- rPropSet->getPropertyValue( sHyperLinkTarget ) >>= sTargetFrame;
+ rPropSet->getPropertyValue( gsHyperLinkTarget ) >>= sTargetFrame;
if( !sTargetFrame.isEmpty() )
bExport = true;
}
- if ( rPropSetInfo->hasPropertyByName( sServerMap )
+ if ( rPropSetInfo->hasPropertyByName( gsServerMap )
&& ( !rPropState.is()
- || PropertyState_DIRECT_VALUE == rPropState->getPropertyState( sServerMap ) ) )
+ || PropertyState_DIRECT_VALUE == rPropState->getPropertyState( gsServerMap ) ) )
{
- bServerMap = *o3tl::doAccess<bool>(rPropSet->getPropertyValue( sServerMap ));
+ bServerMap = *o3tl::doAccess<bool>(rPropSet->getPropertyValue( gsServerMap ));
if ( bServerMap )
bExport = true;
}
- if ( rPropSetInfo->hasPropertyByName( sUnvisitedCharStyleName )
+ if ( rPropSetInfo->hasPropertyByName( gsUnvisitedCharStyleName )
&& ( !rPropState.is()
- || PropertyState_DIRECT_VALUE == rPropState->getPropertyState( sUnvisitedCharStyleName ) ) )
+ || PropertyState_DIRECT_VALUE == rPropState->getPropertyState( gsUnvisitedCharStyleName ) ) )
{
- rPropSet->getPropertyValue( sUnvisitedCharStyleName ) >>= sUStyleName;
+ rPropSet->getPropertyValue( gsUnvisitedCharStyleName ) >>= sUStyleName;
if( !sUStyleName.isEmpty() )
bExport = true;
}
- if ( rPropSetInfo->hasPropertyByName( sVisitedCharStyleName )
+ if ( rPropSetInfo->hasPropertyByName( gsVisitedCharStyleName )
&& ( !rPropState.is()
- || PropertyState_DIRECT_VALUE == rPropState->getPropertyState( sVisitedCharStyleName ) ) )
+ || PropertyState_DIRECT_VALUE == rPropState->getPropertyState( gsVisitedCharStyleName ) ) )
{
- rPropSet->getPropertyValue( sVisitedCharStyleName ) >>= sVStyleName;
+ rPropSet->getPropertyValue( gsVisitedCharStyleName ) >>= sVStyleName;
if( !sVStyleName.isEmpty() )
bExport = true;
}
@@ -3419,7 +3421,7 @@ void XMLTextParagraphExport::exportTextRangeSpan(
bIsUICharStyle && aCharStyleNamesPropInfoCache.hasProperty( xPropSet, xPropSetInfo ),
bHasAutoStyle,
xPropSet,
- sCharStyleNames );
+ gsCharStyleNames );
if ( !sStyle.isEmpty() )
{
@@ -3711,11 +3713,11 @@ void XMLTextParagraphExport::exportRuby(
bool bAutoStyles )
{
// early out: a collapsed ruby makes no sense
- if (*o3tl::doAccess<bool>(rPropSet->getPropertyValue(sIsCollapsed)))
+ if (*o3tl::doAccess<bool>(rPropSet->getPropertyValue(gsIsCollapsed)))
return;
// start value ?
- bool bStart = *o3tl::doAccess<bool>(rPropSet->getPropertyValue(sIsStart));
+ bool bStart = *o3tl::doAccess<bool>(rPropSet->getPropertyValue(gsIsStart));
if (bAutoStyles)
{
@@ -3735,8 +3737,8 @@ void XMLTextParagraphExport::exportRuby(
return;
// save ruby text + ruby char style
- rPropSet->getPropertyValue(sRubyText) >>= sOpenRubyText;
- rPropSet->getPropertyValue(sRubyCharStyleName) >>= sOpenRubyCharStyle;
+ rPropSet->getPropertyValue(gsRubyText) >>= sOpenRubyText;
+ rPropSet->getPropertyValue(gsRubyCharStyleName) >>= sOpenRubyCharStyle;
// ruby style
GetExport().CheckAttrList();
diff --git a/xmloff/source/text/txtsecte.cxx b/xmloff/source/text/txtsecte.cxx
index 6c9e9e5a0eab..1ac0f8eef0f7 100644
--- a/xmloff/source/text/txtsecte.cxx
+++ b/xmloff/source/text/txtsecte.cxx
@@ -60,9 +60,9 @@ void XMLTextParagraphExport::exportListAndSectionChange(
Reference<XPropertySet> xPropSet(rNextSectionContent, UNO_QUERY);
if (xPropSet.is())
{
- if (xPropSet->getPropertySetInfo()->hasPropertyByName(sTextSection))
+ if (xPropSet->getPropertySetInfo()->hasPropertyByName(gsTextSection))
{
- xPropSet->getPropertyValue(sTextSection) >>= xNextSection;
+ xPropSet->getPropertyValue(gsTextSection) >>= xNextSection;
}
// else: no current section
}
diff --git a/xmloff/source/text/txtstyle.cxx b/xmloff/source/text/txtstyle.cxx
index eefa1d2fca6a..99f894cebbb5 100644
--- a/xmloff/source/text/txtstyle.cxx
+++ b/xmloff/source/text/txtstyle.cxx
@@ -50,10 +50,10 @@ void XMLTextParagraphExport::exportStyleAttributes(
Reference< XPropertySet > xPropSet( rStyle, UNO_QUERY );
Reference< XPropertySetInfo > xPropSetInfo(
xPropSet->getPropertySetInfo());
- if( xPropSetInfo->hasPropertyByName( sCategory ) )
+ if( xPropSetInfo->hasPropertyByName( gsCategory ) )
{
sal_Int16 nCategory = 0;
- xPropSet->getPropertyValue( sCategory ) >>= nCategory;
+ xPropSet->getPropertyValue( gsCategory ) >>= nCategory;
enum XMLTokenEnum eValue = XML_TOKEN_INVALID;
if( -1 != nCategory )
{
@@ -82,13 +82,13 @@ void XMLTextParagraphExport::exportStyleAttributes(
if( eValue != XML_TOKEN_INVALID )
GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_CLASS, eValue);
}
- if( xPropSetInfo->hasPropertyByName( sPageDescName ) )
+ if( xPropSetInfo->hasPropertyByName( gsPageDescName ) )
{
Reference< XPropertyState > xPropState( xPropSet, uno::UNO_QUERY );
if( PropertyState_DIRECT_VALUE ==
- xPropState->getPropertyState( sPageDescName ) )
+ xPropState->getPropertyState( gsPageDescName ) )
{
- xPropSet->getPropertyValue( sPageDescName ) >>= sName;
+ xPropSet->getPropertyValue( gsPageDescName ) >>= sName;
// fix for #i5551# if( sName.getLength() > 0 )
GetExport().AddAttribute( XML_NAMESPACE_STYLE,
XML_MASTER_PAGE_NAME,
diff --git a/xmlscript/source/xml_helper/xml_impctx.cxx b/xmlscript/source/xml_helper/xml_impctx.cxx
index 47d8a544b4e6..0ad0d17b8467 100644
--- a/xmlscript/source/xml_helper/xml_impctx.cxx
+++ b/xmlscript/source/xml_helper/xml_impctx.cxx
@@ -105,9 +105,6 @@ class DocumentHandlerImpl :
t_OUString2LongMap m_URI2Uid;
sal_Int32 m_uid_count;
- OUString const m_sXMLNS_PREFIX_UNKNOWN;
- OUString const m_sXMLNS;
-
sal_Int32 m_nLastURI_lookup;
OUString m_aLastURI_lookup;
@@ -169,13 +166,15 @@ public:
virtual OUString SAL_CALL getUriByUid( sal_Int32 Uid ) override;
};
+static OUString const g_sXMLNS_PREFIX_UNKNOWN( "<<< unknown prefix >>>" );
+static OUString const g_sXMLNS( "xmlns" );
+
+
DocumentHandlerImpl::DocumentHandlerImpl(
Reference< xml::input::XRoot > const & xRoot,
bool bSingleThreadedUse )
: m_xRoot( xRoot ),
m_uid_count( 0 ),
- m_sXMLNS_PREFIX_UNKNOWN( "<<< unknown prefix >>>" ),
- m_sXMLNS( "xmlns" ),
m_nLastURI_lookup( UID_UNKNOWN ),
m_aLastURI_lookup( "<<< unknown URI >>>" ),
m_nLastPrefix_lookup( UID_UNKNOWN ),
@@ -240,7 +239,7 @@ inline sal_Int32 DocumentHandlerImpl::getUidByPrefix(
else
{
m_nLastPrefix_lookup = UID_UNKNOWN;
- m_aLastPrefix_lookup = m_sXMLNS_PREFIX_UNKNOWN;
+ m_aLastPrefix_lookup = g_sXMLNS_PREFIX_UNKNOWN;
}
}
return m_nLastPrefix_lookup;
@@ -286,7 +285,7 @@ inline void DocumentHandlerImpl::popPrefix(
}
m_nLastPrefix_lookup = UID_UNKNOWN;
- m_aLastPrefix_lookup = m_sXMLNS_PREFIX_UNKNOWN;
+ m_aLastPrefix_lookup = g_sXMLNS_PREFIX_UNKNOWN;
}
inline void DocumentHandlerImpl::getElementName(
@@ -458,7 +457,7 @@ void DocumentHandlerImpl::startElement(
pQNames[ nPos ] = xAttribs->getNameByIndex( nPos );
OUString const & rQAttributeName = pQNames[ nPos ];
- if (rQAttributeName.startsWith( m_sXMLNS ))
+ if (rQAttributeName.startsWith( g_sXMLNS ))
{
if (rQAttributeName.getLength() == 5) // set default namespace
{
@@ -468,7 +467,7 @@ void DocumentHandlerImpl::startElement(
xAttribs->getValueByIndex( nPos ) );
elementEntry->m_prefixes.push_back( aDefNamespacePrefix );
pUids[ nPos ] = UID_UNKNOWN;
- pPrefixes[ nPos ] = m_sXMLNS;
+ pPrefixes[ nPos ] = g_sXMLNS;
pLocalNames[ nPos ] = aDefNamespacePrefix;
}
else if (':' == rQAttributeName[ 5 ]) // set prefix
@@ -477,7 +476,7 @@ void DocumentHandlerImpl::startElement(
pushPrefix( aPrefix, xAttribs->getValueByIndex( nPos ) );
elementEntry->m_prefixes.push_back( aPrefix );
pUids[ nPos ] = UID_UNKNOWN;
- pPrefixes[ nPos ] = m_sXMLNS;
+ pPrefixes[ nPos ] = g_sXMLNS;
pLocalNames[ nPos ] = aPrefix;
}
// else just a name starting with xmlns, but no prefix