summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2014-07-09 11:57:21 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-07-09 13:59:10 +0100
commit0aa3dee5e88a1494a7a6a8401e084cbdb4324727 (patch)
treee6c1f94e302b9b62741327742d3b0e4672baf3ba /sd
parent877aa0e1e879b057027029c1ceed07f90b00b0d3 (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 Change-Id: I016d801edefb5ab32b7b6a8e13a1dc3e8fdb866e
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/unoidl/unopage.cxx18
1 files changed, 17 insertions, 1 deletions
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index 359bade9b760..39cc6eef9bd6 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -71,6 +71,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;
@@ -400,7 +401,22 @@ SdrObject * SdGenericDrawPage::_CreateSdrObject( const Reference< drawing::XShap
{
SdDrawDocument* pDoc = (SdDrawDocument*)GetPage()->GetModel();
if( pDoc )
- pObj->NbcSetStyleSheet( pDoc->GetDefaultStyleSheet(), true );
+ {
+ // #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(), true);
+ }
+ else
+ {
+ pObj->NbcSetStyleSheet(pDoc->GetDefaultStyleSheet(), true);
+ }
+ }
}
return pObj;
}