summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-07-04 17:36:05 +0200
committerMichael Stahl <mstahl@redhat.com>2017-07-05 11:35:04 +0200
commit789433da173ddf528e31a93d15ab5adfe722d183 (patch)
tree25e565467a804cc512f6fe2a22321032dfe4dbf8 /xmloff
parentc9c1135de2be25c8630c1197df80e5ceb4f9907a (diff)
xmloff: XMLTextStyleContext: remove property name constant members
Change-Id: Ica367371f1f7fb6e7858c8e35ec4c8de994e357d
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/text/txtimp.cxx4
-rw-r--r--xmloff/source/text/txtstyli.cxx20
2 files changed, 12 insertions, 12 deletions
diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx
index dc6b16147c19..b2653f152871 100644
--- a/xmloff/source/text/txtimp.cxx
+++ b/xmloff/source/text/txtimp.cxx
@@ -1752,9 +1752,9 @@ OUString XMLTextImportHelper::SetStyleAndAttrs(
XML_STYLE_FAMILY_TEXT_TEXT,
pStyle->GetDropCapStyleName()) );
if (m_xImpl->m_xTextStyles->hasByName(sDisplayName) &&
- xPropSetInfo->hasPropertyByName( pStyle->sDropCapCharStyleName ) )
+ xPropSetInfo->hasPropertyByName("DropCapCharStyleName"))
{
- xPropSet->setPropertyValue( pStyle->sDropCapCharStyleName, makeAny(sDisplayName) );
+ xPropSet->setPropertyValue("DropCapCharStyleName", makeAny(sDisplayName));
}
}
diff --git a/xmloff/source/text/txtstyli.cxx b/xmloff/source/text/txtstyli.cxx
index 345bd60c0889..b03e0382c73f 100644
--- a/xmloff/source/text/txtstyli.cxx
+++ b/xmloff/source/text/txtstyli.cxx
@@ -133,12 +133,6 @@ XMLTextStyleContext::XMLTextStyleContext( SvXMLImport& rImport,
SvXMLStylesContext& rStyles, sal_uInt16 nFamily,
bool bDefaultStyle )
: XMLPropStyleContext( rImport, nPrfx, rLName, xAttrList, rStyles, nFamily, bDefaultStyle )
-, sIsAutoUpdate( "IsAutoUpdate" )
-, sCategory( "Category" )
-, sNumberingStyleName( "NumberingStyleName" )
-, sOutlineLevel("OutlineLevel" )
-, sDropCapCharStyleName( "DropCapCharStyleName" )
-, sPageDescName( "PageDescName" )
, m_nOutlineLevel( -1 )
, m_isAutoUpdate( false )
, m_bHasMasterPageName( false )
@@ -211,6 +205,8 @@ void XMLTextStyleContext::CreateAndInsert( bool bOverwrite )
Reference < XPropertySet > xPropSet( xStyle, UNO_QUERY );
Reference< XPropertySetInfo > xPropSetInfo =
xPropSet->getPropertySetInfo();
+
+ OUString const sIsAutoUpdate("IsAutoUpdate");
if( xPropSetInfo->hasPropertyByName( sIsAutoUpdate ) )
{
xPropSet->setPropertyValue( sIsAutoUpdate, Any(m_isAutoUpdate) );
@@ -219,10 +215,10 @@ void XMLTextStyleContext::CreateAndInsert( bool bOverwrite )
sal_uInt16 nCategory = ParagraphStyleCategory::TEXT;
if( XML_STYLE_FAMILY_TEXT_PARAGRAPH == GetFamily() &&
!m_sCategoryVal.isEmpty() && xStyle->isUserDefined() &&
- xPropSetInfo->hasPropertyByName( sCategory ) &&
+ xPropSetInfo->hasPropertyByName("Category") &&
SvXMLUnitConverter::convertEnum( nCategory, m_sCategoryVal, aCategoryMap))
{
- xPropSet->setPropertyValue( sCategory, Any((sal_Int16)nCategory) );
+ xPropSet->setPropertyValue("Category", Any(static_cast<sal_Int16>(nCategory)));
}
// tell the style about it's events (if applicable)
@@ -277,6 +273,7 @@ void XMLTextStyleContext::Finish( bool bOverwrite )
Reference< XPropertySetInfo > xPropSetInfo =
xPropSet->getPropertySetInfo();
+ OUString const sOutlineLevel("OutlineLevel");
if( xPropSetInfo->hasPropertyByName( sOutlineLevel ))
{
if (m_nOutlineLevel >= 0)
@@ -286,6 +283,7 @@ void XMLTextStyleContext::Finish( bool bOverwrite )
}
// Consider set empty list style (#i69523#)
+ OUString const sNumberingStyleName("NumberingStyleName");
if (m_bListStyleSet &&
xPropSetInfo->hasPropertyByName( sNumberingStyleName ) )
{
@@ -352,9 +350,9 @@ void XMLTextStyleContext::Finish( bool bOverwrite )
GetImport().GetTextImport()->GetTextStyles();
if( rTextStyles.is() &&
rTextStyles->hasByName( sDisplayDropCapTextStyleName ) &&
- xPropSetInfo->hasPropertyByName( sDropCapCharStyleName ) )
+ xPropSetInfo->hasPropertyByName("DropCapCharStyleName"))
{
- xPropSet->setPropertyValue( sDropCapCharStyleName, Any(sDisplayDropCapTextStyleName) );
+ xPropSet->setPropertyValue("DropCapCharStyleName", Any(sDisplayDropCapTextStyleName));
}
}
@@ -366,6 +364,8 @@ void XMLTextStyleContext::Finish( bool bOverwrite )
// The families container must exist
const Reference < XNameContainer >& rPageStyles =
GetImport().GetTextImport()->GetPageStyles();
+
+ OUString const sPageDescName("PageDescName");
if( ( sDisplayName.isEmpty() ||
(rPageStyles.is() &&
rPageStyles->hasByName( sDisplayName )) ) &&