summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/xmloff/xmlstyle.hxx8
-rw-r--r--xmloff/source/style/prstylei.cxx4
-rw-r--r--xmloff/source/text/txtstyli.cxx4
3 files changed, 7 insertions, 9 deletions
diff --git a/include/xmloff/xmlstyle.hxx b/include/xmloff/xmlstyle.hxx
index 04a74b841a15..7e09259c7443 100644
--- a/include/xmloff/xmlstyle.hxx
+++ b/include/xmloff/xmlstyle.hxx
@@ -41,7 +41,7 @@ class XMLOFF_DLLPUBLIC SvXMLStyleContext : public SvXMLImportContext
{
OUString maName;
OUString maDisplayName;
- OUString maAutoName;
+ css::uno::Any maAutoName;
OUString maParentName;// Will be moved to XMLPropStyle soon!!!!
OUString maFollow; // Will be moved to XMLPropStyle soon!!!!
OUString maLinked;
@@ -51,7 +51,7 @@ class XMLOFF_DLLPUBLIC SvXMLStyleContext : public SvXMLImportContext
bool mbValid : 1; // Set this to false in CreateAndInsert
// if the style shouldn't be processed
- // by Finish() or si somehow invalid.
+ // by Finish() or is somehow invalid.
bool mbNew : 1; // Set this to false in CreateAnsInsert
// if the style is already existing.
bool mbDefaultStyle : 1;
@@ -61,7 +61,7 @@ protected:
virtual void SetAttribute( sal_Int32 nElement, const OUString& rValue );
void SetFamily( XmlStyleFamily nSet ) { mnFamily = nSet; }
- void SetAutoName( const OUString& rName ) { maAutoName = rName; }
+ void SetAutoName( const css::uno::Any& rName ) { maAutoName = rName; }
public:
@@ -77,7 +77,7 @@ public:
const OUString& GetName() const { return maName; }
const OUString& GetDisplayName() const { return maDisplayName.getLength() ? maDisplayName : maName; }
- const OUString& GetAutoName() const { return maAutoName; }
+ const css::uno::Any& GetAutoName() const { return maAutoName; }
const OUString& GetParentName() const { return maParentName; }
const OUString& GetFollow() const { return maFollow; }
const OUString& GetLinked() const { return maLinked; }
diff --git a/xmloff/source/style/prstylei.cxx b/xmloff/source/style/prstylei.cxx
index 3dc8fc7087a3..c688a3a24b31 100644
--- a/xmloff/source/style/prstylei.cxx
+++ b/xmloff/source/style/prstylei.cxx
@@ -341,9 +341,7 @@ void XMLPropStyleContext::CreateAndInsert( bool bOverwrite )
Sequence< Any > aAny = xAutoStyle->getPropertyValues( aPropNames );
if( aAny.hasElements() )
{
- OUString aName;
- aAny[0] >>= aName;
- SetAutoName( aName );
+ SetAutoName(aAny[0]);
}
}
}
diff --git a/xmloff/source/text/txtstyli.cxx b/xmloff/source/text/txtstyli.cxx
index 01a0deab4e4b..bd21e35ad6a2 100644
--- a/xmloff/source/text/txtstyli.cxx
+++ b/xmloff/source/text/txtstyli.cxx
@@ -431,7 +431,7 @@ void XMLTextStyleContext::FillPropertySet(
{
bAutomatic = true;
- if( !GetAutoName().isEmpty() )
+ if( GetAutoName().hasValue() )
{
OUString sAutoProp = ( GetFamily() == XmlStyleFamily::TEXT_TEXT ) ?
OUString( "CharAutoStyleName" ):
@@ -446,7 +446,7 @@ void XMLTextStyleContext::FillPropertySet(
if ( xInfo->hasPropertyByName( sAutoProp ) )
{
- rPropSet->setPropertyValue( sAutoProp, Any(GetAutoName()) );
+ rPropSet->setPropertyValue( sAutoProp, GetAutoName() );
}
else
{