summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/xmloff/txtstyli.hxx9
-rw-r--r--xmloff/source/text/txtimp.cxx4
-rw-r--r--xmloff/source/text/txtstyli.cxx20
3 files changed, 12 insertions, 21 deletions
diff --git a/include/xmloff/txtstyli.hxx b/include/xmloff/txtstyli.hxx
index 0588e52aa004..0c7e5891ae57 100644
--- a/include/xmloff/txtstyli.hxx
+++ b/include/xmloff/txtstyli.hxx
@@ -33,15 +33,6 @@ class XMLOFF_DLLPUBLIC XMLTextStyleContext : public XMLPropStyleContext
OUString m_sDropCapTextStyleName;
OUString m_sMasterPageName;
OUString m_sDataStyleName; // for grid columns only
- const OUString sIsAutoUpdate;
- const OUString sCategory;
- const OUString sNumberingStyleName;
- const OUString sOutlineLevel;
-
-public:
- const OUString sDropCapCharStyleName;
-private:
- const OUString sPageDescName;
sal_Int8 m_nOutlineLevel;
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 )) ) &&