summaryrefslogtreecommitdiff
path: root/xmloff/source/text/txtparae.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-10-31 10:27:02 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-10-31 10:32:27 +0000
commit1b36f23b516b44ccccf64f294c35073088835e5f (patch)
tree873892c685b0a963750c52a404c87a1d2adb7a11 /xmloff/source/text/txtparae.cxx
parentaeeabc36fd0a4a71238c8c3df2e80ea324f9bac0 (diff)
loplugin:oncevar in xmloff..xmlsecurity
Change-Id: I2353d3c73130ed9420e8d803a9a96a06549bb6bd Reviewed-on: https://gerrit.libreoffice.org/30429 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff/source/text/txtparae.cxx')
-rw-r--r--xmloff/source/text/txtparae.cxx13
1 files changed, 4 insertions, 9 deletions
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index e7e1a118e213..d25e527c5d89 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -2156,10 +2156,7 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
bool bAutoStyles, bool bIsProgress,
bool bPrvChrIsSpc )
{
- static const char sMeta[] = "InContentMetadata";
static const char sFieldMarkName[] = "__FieldMark_";
- static const char sAnnotation[] = "Annotation";
- static const char sAnnotationEnd[] = "AnnotationEnd";
bool bPrevCharIsSpace = bPrvChrIsSpc;
@@ -2188,12 +2185,12 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
exportTextField( xTxtRange, bAutoStyles, bIsProgress );
bPrevCharIsSpace = false;
}
- else if ( sType == sAnnotation )
+ else if ( sType == "Annotation" )
{
exportTextField( xTxtRange, bAutoStyles, bIsProgress );
bPrevCharIsSpace = false;
}
- else if ( sType == sAnnotationEnd )
+ else if ( sType == "AnnotationEnd" )
{
if (!bAutoStyles)
{
@@ -2258,7 +2255,7 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
{
exportRuby(xPropSet, bAutoStyles);
}
- else if (sType == sMeta)
+ else if (sType == "InContentMetadata")
{
exportMeta(xPropSet, bAutoStyles, bIsProgress);
}
@@ -3708,8 +3705,6 @@ void XMLTextParagraphExport::exportMeta(
const Reference<XPropertySet> & i_xPortion,
bool i_bAutoStyles, bool i_isProgress)
{
- static const char sMeta[] = "InContentMetadata";
-
bool doExport(!i_bAutoStyles); // do not export element if autostyles
// check version >= 1.2
switch (GetExport().getDefaultVersion()) {
@@ -3719,7 +3714,7 @@ void XMLTextParagraphExport::exportMeta(
}
const Reference< XTextContent > xTextContent(
- i_xPortion->getPropertyValue(sMeta), UNO_QUERY_THROW);
+ i_xPortion->getPropertyValue("InContentMetadata"), UNO_QUERY_THROW);
const Reference< XEnumerationAccess > xEA( xTextContent, UNO_QUERY_THROW );
const Reference< XEnumeration > xTextEnum( xEA->createEnumeration() );