summaryrefslogtreecommitdiff
path: root/xmloff
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 /xmloff
parent7867e1f1cdd726cb98a236245e3d08557cc3a313 (diff)
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>
Diffstat (limited to 'xmloff')
-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
47 files changed, 897 insertions, 1060 deletions
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,