summaryrefslogtreecommitdiffstats
path: root/sd
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 /sd
parentfdo#57215: Fixed wrong text rotation in SVG Export (diff)
downloadcore-d9ef61fb546af443736057557552e3a95c569c11.tar.gz
core-d9ef61fb546af443736057557552e3a95c569c11.zip
API CHANGE: roll back the XStyle changes to add a new Hidden property on Style
Change-Id: If6d23925567fb184cd8fc4e00fc72fe4d216e756
Diffstat (limited to 'sd')
-rw-r--r--sd/inc/stlsheet.hxx2
-rw-r--r--sd/source/core/stlsheet.cxx29
2 files changed, 13 insertions, 18 deletions
diff --git a/sd/inc/stlsheet.hxx b/sd/inc/stlsheet.hxx
index 11942bb87f20..191bcf97b471 100644
--- a/sd/inc/stlsheet.hxx
+++ b/sd/inc/stlsheet.hxx
@@ -92,8 +92,6 @@ public:
virtual sal_Bool SAL_CALL isInUse( ) throw(::com::sun::star::uno::RuntimeException);
virtual ::rtl::OUString SAL_CALL getParentStyle( ) throw(::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setParentStyle( const ::rtl::OUString& aParentStyle ) throw(::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL isHidden( ) throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setHidden( sal_Bool bHidden ) throw(::com::sun::star::uno::RuntimeException);
// XPropertySet
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() throw(::com::sun::star::uno::RuntimeException);
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index 570516412e43..ecd84d74b302 100644
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -66,6 +66,7 @@ using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::drawing;
+#define WID_STYLE_HIDDEN 7997
#define WID_STYLE_DISPNAME 7998
#define WID_STYLE_FAMILY 7999
@@ -76,6 +77,7 @@ static SvxItemPropertySet& GetStylePropertySet()
{ RTL_CONSTASCII_STRINGPARAM("Family"), WID_STYLE_FAMILY, &::getCppuType((const OUString*)0), PropertyAttribute::READONLY, 0},
{ RTL_CONSTASCII_STRINGPARAM("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &XNameContainer::static_type(), 0, 0},
{ RTL_CONSTASCII_STRINGPARAM("DisplayName"), WID_STYLE_DISPNAME, &::getCppuType((const OUString*)0), PropertyAttribute::READONLY, 0},
+ { RTL_CONSTASCII_STRINGPARAM("Hidden"), WID_STYLE_HIDDEN, &::getCppuType((bool*)0), 0, 0},
SVX_UNOEDIT_NUMBERING_PROPERTIE,
SHADOW_PROPERTIES
@@ -1024,22 +1026,6 @@ void SAL_CALL SdStyleSheet::setParentStyle( const OUString& rParentName ) throw
}
}
-sal_Bool SAL_CALL SdStyleSheet::isHidden() throw(RuntimeException)
-{
- SolarMutexGuard aGuard;
- throwIfDisposed();
-
- return IsHidden();
-}
-
-void SAL_CALL SdStyleSheet::setHidden( sal_Bool rbHidden ) throw(RuntimeException)
-{
- SolarMutexGuard aGuard;
- throwIfDisposed();
-
- return SetHidden( rbHidden );
-}
-
// --------------------------------------------------------------------
// XPropertySet
// --------------------------------------------------------------------
@@ -1067,6 +1053,13 @@ void SAL_CALL SdStyleSheet::setPropertyValue( const OUString& aPropertyName, con
}
else
{
+ if( pEntry->nWID == WID_STYLE_HIDDEN )
+ {
+ sal_Bool bValue = sal_False;
+ if ( aValue >>= bValue )
+ SetHidden( bValue );
+ return;
+ }
if( pEntry->nWID == SDRATTR_TEXTDIRECTION )
return; // not yet implemented for styles
@@ -1188,6 +1181,10 @@ Any SAL_CALL SdStyleSheet::getPropertyValue( const OUString& PropertyName ) thro
aAny <<= BitmapMode_NO_REPEAT;
}
}
+ else if( pEntry->nWID == WID_STYLE_HIDDEN )
+ {
+ aAny <<= IsHidden( );
+ }
else
{
SfxItemSet aSet( GetPool().GetPool(), pEntry->nWID, pEntry->nWID);