sd/source/ui/unoidl/unopage.cxx | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-)
New commits: commit 0cdef1b85048436997dd5b4003efb954305ecd66 Author: Armin Le Grand <a...@apache.org> Date: Wed Jul 9 11:57:21 2014 +0000 Resolves: #i119287# corrected default style for draw objects... created using UNO API (cherry picked from commit d07778f62ed386672a60ef7570a89b5fa109e026) Signed-off-by: Andras Timar <andras.ti...@collabora.com> Conflicts: sd/source/ui/unoidl/unopage.cxx Change-Id: I016d801edefb5ab32b7b6a8e13a1dc3e8fdb866e (cherry picked from commit 0aa3dee5e88a1494a7a6a8401e084cbdb4324727) Signed-off-by: Andras Timar <andras.ti...@collabora.com> diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx index a4fd2e2..1544aaf 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; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits