diff options
author | Cédric Bosdonnat <cedric.bosdonnat@free.fr> | 2012-12-03 17:48:40 +0100 |
---|---|---|
committer | Cédric Bosdonnat <cedric.bosdonnat@free.fr> | 2012-12-03 17:58:48 +0100 |
commit | d9ef61fb546af443736057557552e3a95c569c11 (patch) | |
tree | 40e42d1f7d3574150699cf9b3b254fbe58703e42 /xmloff/source/style/XMLPageExport.cxx | |
parent | b49ea0c9d24aa48d62590cb3443c3ad4143d2e2f (diff) |
API CHANGE: roll back the XStyle changes to add a new Hidden property on Style
Change-Id: If6d23925567fb184cd8fc4e00fc72fe4d216e756
Diffstat (limited to 'xmloff/source/style/XMLPageExport.cxx')
-rw-r--r-- | xmloff/source/style/XMLPageExport.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/xmloff/source/style/XMLPageExport.cxx b/xmloff/source/style/XMLPageExport.cxx index 2710bee2acf6..89fa46a84c02 100644 --- a/xmloff/source/style/XMLPageExport.cxx +++ b/xmloff/source/style/XMLPageExport.cxx @@ -117,8 +117,13 @@ sal_Bool XMLPageExport::exportStyle( GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_NAME, GetExport().EncodeStyleName( sName, &bEncoded ) ); - if ( rStyle->isHidden( ) && GetExport( ).getDefaultVersion( ) == SvtSaveOptions::ODFVER_LATEST ) - GetExport( ).AddAttribute( XML_NAMESPACE_STYLE, XML_HIDDEN, "true" ); + if ( xPropSetInfo->hasPropertyByName( "Hidden" ) ) + { + uno::Any aValue = xPropSet->getPropertyValue( "Hidden" ); + sal_Bool bHidden = sal_False; + if ( ( aValue >>= bHidden ) && bHidden && GetExport( ).getDefaultVersion( ) == SvtSaveOptions::ODFVER_LATEST ) + GetExport( ).AddAttribute( XML_NAMESPACE_STYLE, XML_HIDDEN, "true" ); + } if( bEncoded ) GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_DISPLAY_NAME, |