You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by al...@apache.org on 2014/07/09 13:57:22 UTC
svn commit: r1609118 - /openoffice/trunk/main/sd/source/ui/unoidl/unopage.cxx
Author: alg
Date: Wed Jul 9 11:57:21 2014
New Revision: 1609118
URL: http://svn.apache.org/r1609118
Log:
i119287 corrected default style for draw objects created using UNO API
Modified:
openoffice/trunk/main/sd/source/ui/unoidl/unopage.cxx
Modified: openoffice/trunk/main/sd/source/ui/unoidl/unopage.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/unoidl/unopage.cxx?rev=1609118&r1=1609117&r2=1609118&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/unoidl/unopage.cxx (original)
+++ openoffice/trunk/main/sd/source/ui/unoidl/unopage.cxx Wed Jul 9 11:57:21 2014
@@ -67,11 +67,7 @@
#include <svx/svdview.hxx>
#include "misc.hxx"
#include "View.hxx"
-#ifndef SVX_LIGHT
-#ifndef SD_DRAW_DOC_SHELL_HXX
#include "DrawDocShell.hxx"
-#endif
-#endif
#include "ViewShell.hxx"
#include "DrawViewShell.hxx"
#include "unoobj.hxx"
@@ -80,6 +76,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;
@@ -431,9 +428,24 @@ SdrObject * SdGenericDrawPage::_CreateSd
SdrObject* pObj = SvxFmDrawPage::_CreateSdrObject( xShape );
if( pObj && ( (pObj->GetObjInventor() != SdrInventor) || (pObj->GetObjIdentifier() != OBJ_PAGE) ) )
{
- SdDrawDocument* pDoc = (SdDrawDocument*)GetPage()->GetModel();
+ SdDrawDocument* pDoc = (SdDrawDocument*)GetPage()->GetModel();
if( pDoc )
- pObj->NbcSetStyleSheet( pDoc->GetDefaultStyleSheet(), sal_True );
+ {
+ // #119287# 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 #119287#: 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;
}