summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2014-07-09 11:57:21 +0000
committerAndras Timar <andras.timar@collabora.com>2014-07-10 07:56:22 +0200
commit2b8f66388450fcf7fb2f8087ee7c66c142fe72c0 (patch)
tree26b9c6c09d8d7c2d977ac6506a635e986a889475 /sd
parent848ee355904db1453f343c8257a86635c1dddcac (diff)
Resolves: #i119287# corrected default style for draw objects...
created using UNO API (cherry picked from commit d07778f62ed386672a60ef7570a89b5fa109e026) Conflicts: sd/source/ui/unoidl/unopage.cxx (cherry picked from commit 0aa3dee5e88a1494a7a6a8401e084cbdb4324727) Signed-off-by: Andras Timar <andras.timar@collabora.com> Conflicts: sd/source/ui/unoidl/unopage.cxx Change-Id: I016d801edefb5ab32b7b6a8e13a1dc3e8fdb866e
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/unoidl/unopage.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index 9ad34730d968..fa61e5fd2e5e 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -69,6 +69,7 @@
#include "unopback.hxx"
#include "unohelp.hxx"
#include <vcl/dibtools.hxx>
+#include <svx/svdograf.hxx>
using ::com::sun::star::animations::XAnimationNode;
using ::com::sun::star::animations::XAnimationNodeSupplier;
@@ -410,7 +411,22 @@ SdrObject * SdGenericDrawPage::_CreateSdrObject( const Reference< drawing::XShap
{
SdDrawDocument* pDoc = (SdDrawDocument*)GetPage()->GetModel();
if( pDoc )
+ {
+ // #i119287# similar to the code in the SdrObject methods the graphic and ole
+ // SdrObjects need another default style than the rest, see task. Adding here, too.
+ // TTTT: Same as for #i119287#: Can be removed in branch aw080 again
+ const bool bIsSdrGrafObj(0 != dynamic_cast< SdrGrafObj* >(pObj));
+ const bool bIsSdrOle2Obj(0 != dynamic_cast< SdrOle2Obj* >(pObj));
+
+ if(bIsSdrGrafObj || bIsSdrOle2Obj)
+ {
+ pObj->NbcSetStyleSheet(pDoc->GetDefaultStyleSheetForSdrGrafObjAndSdrOle2Obj(), sal_True);
+ }
+ else
+ {
pObj->NbcSetStyleSheet( pDoc->GetDefaultStyleSheet(), sal_True );
+ }
+ }
}
return pObj;
}