From 24578b804007d8c3201e5ed32b8485e1725c33c1 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Thu, 17 Jan 2013 15:01:32 +0100 Subject: rhbz#760765 copy custom styles on copy & paste Change-Id: Icaacf3bc1a02a017692432aec36aba06d3f5dde5 --- sd/source/core/stlsheet.cxx | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'sd/source/core/stlsheet.cxx') diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx index ecd84d74b302..f0137390efc5 100644 --- a/sd/source/core/stlsheet.cxx +++ b/sd/source/core/stlsheet.cxx @@ -35,6 +35,7 @@ #include #include +#include #include #include #include @@ -349,13 +350,16 @@ bool SdStyleSheet::IsUsed() const continue; // NULL-Pointer ist im Listener-Array erlaubt - if (pListener && pListener->ISA(SdrAttrObj)) + if (pListener) { - bResult = ((SdrAttrObj*)pListener)->IsInserted(); - } - else if (pListener && pListener->ISA(SfxStyleSheet)) - { - bResult = ((SfxStyleSheet*)pListener)->IsUsed(); + if (pListener->ISA(sdr::properties::AttributeProperties)) + { + bResult = true; + } + else if (pListener->ISA(SfxStyleSheet)) + { + bResult = ((SfxStyleSheet*)pListener)->IsUsed(); + } } if (bResult) break; -- cgit v1.2.3