Kaydet (Commit) d07778f6 authored tarafından Armin Le Grand's avatar Armin Le Grand

i119287 corrected default style for draw objects created using UNO API

üst f73412f0
...@@ -67,11 +67,7 @@ ...@@ -67,11 +67,7 @@
#include <svx/svdview.hxx> #include <svx/svdview.hxx>
#include "misc.hxx" #include "misc.hxx"
#include "View.hxx" #include "View.hxx"
#ifndef SVX_LIGHT
#ifndef SD_DRAW_DOC_SHELL_HXX
#include "DrawDocShell.hxx" #include "DrawDocShell.hxx"
#endif
#endif
#include "ViewShell.hxx" #include "ViewShell.hxx"
#include "DrawViewShell.hxx" #include "DrawViewShell.hxx"
#include "unoobj.hxx" #include "unoobj.hxx"
...@@ -80,6 +76,7 @@ ...@@ -80,6 +76,7 @@
#include "unopback.hxx" #include "unopback.hxx"
#include "unohelp.hxx" #include "unohelp.hxx"
#include <vcl/dibtools.hxx> #include <vcl/dibtools.hxx>
#include <svx/svdograf.hxx>
using ::com::sun::star::animations::XAnimationNode; using ::com::sun::star::animations::XAnimationNode;
using ::com::sun::star::animations::XAnimationNodeSupplier; using ::com::sun::star::animations::XAnimationNodeSupplier;
...@@ -433,7 +430,22 @@ SdrObject * SdGenericDrawPage::_CreateSdrObject( const Reference< drawing::XShap ...@@ -433,7 +430,22 @@ SdrObject * SdGenericDrawPage::_CreateSdrObject( const Reference< drawing::XShap
{ {
SdDrawDocument* pDoc = (SdDrawDocument*)GetPage()->GetModel(); SdDrawDocument* pDoc = (SdDrawDocument*)GetPage()->GetModel();
if( pDoc ) 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; return pObj;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment