summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2013-01-22 10:32:32 +0100
committerDavid Tardon <dtardon@redhat.com>2013-01-22 13:41:24 +0100
commitf8409911be702c988557903e44783e22a8029769 (patch)
tree430c0dc9ddede9fd45695af303a853ed4f5833ae /sd
parent24578b804007d8c3201e5ed32b8485e1725c33c1 (diff)
do not second-guess which classes use a stylesheet
Change-Id: I76b23bcdca2e7394fd5ab67e8341f4cdb46f8a64
Diffstat (limited to 'sd')
-rw-r--r--sd/source/core/stlsheet.cxx15
1 files changed, 3 insertions, 12 deletions
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index f0137390efc5..0756e6b3c68b 100644
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -349,18 +349,9 @@ bool SdStyleSheet::IsUsed() const
if( pListener == this )
continue;
- // NULL-Pointer ist im Listener-Array erlaubt
- if (pListener)
- {
- if (pListener->ISA(sdr::properties::AttributeProperties))
- {
- bResult = true;
- }
- else if (pListener->ISA(SfxStyleSheet))
- {
- bResult = ((SfxStyleSheet*)pListener)->IsUsed();
- }
- }
+ const svl::StyleSheetUser* const pUser(dynamic_cast<svl::StyleSheetUser*>(pListener));
+ if (pUser)
+ bResult = pUser->isUsedByModel();
if (bResult)
break;
}