summaryrefslogtreecommitdiff
path: root/svx/source/xoutdev
diff options
context:
space:
mode:
authorArmin Weiss <aw@openoffice.org>2001-04-19 15:53:06 +0000
committerArmin Weiss <aw@openoffice.org>2001-04-19 15:53:06 +0000
commitd59a6cf8e517bda5922001c32ea831f6c417eb40 (patch)
tree5de938adb0ad39703df26c5e00ddec5ab64382f4 /svx/source/xoutdev
parent83fdc5f3061aa59eb91a50de07a2eee413ba1ee6 (diff)
#85953# unique name only necessary when enabled
#85953# if disabled, force name to empty string
Diffstat (limited to 'svx/source/xoutdev')
-rw-r--r--svx/source/xoutdev/xattr.cxx40
1 files changed, 26 insertions, 14 deletions
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
index f7343cf53a71..225cb7b331d9 100644
--- a/svx/source/xoutdev/xattr.cxx
+++ b/svx/source/xoutdev/xattr.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xattr.cxx,v $
*
- * $Revision: 1.12 $
+ * $Revision: 1.13 $
*
- * last change: $Author: cl $ $Date: 2001-03-27 12:00:44 $
+ * last change: $Author: aw $ $Date: 2001-04-19 16:53:06 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -3482,20 +3482,32 @@ BOOL XFillFloatTransparenceItem::CompareValueFunc( const NameOrIndex* p1, const
XFillFloatTransparenceItem* XFillFloatTransparenceItem::checkForUniqueItem( SdrModel* pModel ) const
{
- if( pModel )
+ // #85953# unique name only necessary when enabled
+ if(IsEnabled())
{
- const String aUniqueName = NameOrIndex::CheckNamedItem( this,
- XATTR_FILLFLOATTRANSPARENCE,
- &pModel->GetItemPool(),
- pModel->GetStyleSheetPool() ? &pModel->GetStyleSheetPool()->GetPool() : NULL,
- XFillFloatTransparenceItem::CompareValueFunc,
- RID_SVXSTR_TRASNGR0,
- NULL );
-
- // if the given name is not valid, replace it!
- if( aUniqueName != GetName() )
+ if( pModel )
+ {
+ const String aUniqueName = NameOrIndex::CheckNamedItem( this,
+ XATTR_FILLFLOATTRANSPARENCE,
+ &pModel->GetItemPool(),
+ pModel->GetStyleSheetPool() ? &pModel->GetStyleSheetPool()->GetPool() : NULL,
+ XFillFloatTransparenceItem::CompareValueFunc,
+ RID_SVXSTR_TRASNGR0,
+ NULL );
+
+ // if the given name is not valid, replace it!
+ if( aUniqueName != GetName() )
+ {
+ return new XFillFloatTransparenceItem( aUniqueName, GetValue(), TRUE );
+ }
+ }
+ }
+ else
+ {
+ // #85953# if disabled, force name to empty string
+ if(GetName().Len())
{
- return new XFillFloatTransparenceItem( aUniqueName, GetValue(), bEnabled );
+ return new XFillFloatTransparenceItem(String(), GetValue(), FALSE);
}
}