summaryrefslogtreecommitdiff
path: root/xmloff/source/style/styleexp.cxx
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedric.bosdonnat@free.fr>2012-12-03 17:48:40 +0100
committerCédric Bosdonnat <cedric.bosdonnat@free.fr>2012-12-03 17:58:48 +0100
commitd9ef61fb546af443736057557552e3a95c569c11 (patch)
tree40e42d1f7d3574150699cf9b3b254fbe58703e42 /xmloff/source/style/styleexp.cxx
parentb49ea0c9d24aa48d62590cb3443c3ad4143d2e2f (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/styleexp.cxx')
-rw-r--r--xmloff/source/style/styleexp.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/xmloff/source/style/styleexp.cxx b/xmloff/source/style/styleexp.cxx
index 0a9669eb1fdf..1cb096c22eff 100644
--- a/xmloff/source/style/styleexp.cxx
+++ b/xmloff/source/style/styleexp.cxx
@@ -121,8 +121,13 @@ sal_Bool XMLStyleExport::exportStyle(
if( !rXMLFamily.isEmpty() )
GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_FAMILY, rXMLFamily);
- if ( rStyle->isHidden( ) && GetExport( ).getDefaultVersion( ) == SvtSaveOptions::ODFVER_LATEST )
- GetExport( ).AddAttribute( XML_NAMESPACE_STYLE, XML_HIDDEN, "true" );
+ if ( xPropSetInfo->hasPropertyByName( "Hidden" ) )
+ {
+ aAny = xPropSet->getPropertyValue( "Hidden" );
+ sal_Bool bHidden = sal_False;
+ if ( ( aAny >>= bHidden ) && bHidden && GetExport( ).getDefaultVersion( ) == SvtSaveOptions::ODFVER_LATEST )
+ GetExport( ).AddAttribute( XML_NAMESPACE_STYLE, XML_HIDDEN, "true" );
+ }
// style:parent-style-name="..."
OUString sParentString(rStyle->getParentStyle());