diff options
author | Armin Le Grand <alg@apache.org> | 2012-05-31 13:23:45 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-04-11 11:20:23 +0100 |
commit | 0a29c5bedda700a86b46e3c3cd9c9e1ce1d4f278 (patch) | |
tree | 61ef44bcf873afb94ed3b9efe761e9c0de67307d /svx/source/svdraw/svdoole2.cxx | |
parent | e2d31c5e705e6e4d6b0185bebba66a55e77981f4 (diff) |
Resolves: #i119287# exchanged hard attributes for OLE and GraphicObject
...with new default StyleSheet for these objects
(cherry picked from commit 2868ea34151cfb623a6a8bf41862d430205d9784)
Conflicts:
sd/source/core/drawdoc4.cxx
svx/source/sdr/contact/viewcontactofgraphic.cxx
Change-Id: I4849101de2ac1da83c8fb0f2d68316774982d197
Resolves: #i119287# Adapted to get the needed style as default style
for all SdrGrafObj and SDrOle2Objs. Checked various scenarios, works
well.
(cherry picked from commit bc85939149f7ae5b65343d7f27bf302a8e31d4b1)
Conflicts:
sd/source/core/drawdoc.cxx
sd/source/ui/func/fuinsert.cxx
sd/source/ui/view/sdview4.cxx
Change-Id: I40a17216f5c11ebca073026f62f1e9ab9ddfd119
Diffstat (limited to 'svx/source/svdraw/svdoole2.cxx')
-rw-r--r-- | svx/source/svdraw/svdoole2.cxx | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx index e3656a4ffa84..034f5b8b8b08 100644 --- a/svx/source/svdraw/svdoole2.cxx +++ b/svx/source/svdraw/svdoole2.cxx @@ -87,6 +87,8 @@ #include <basegfx/polygon/b2dpolypolygon.hxx> #include <editeng/outlobj.hxx> +#include <svx/svdpage.hxx> + using namespace ::rtl; using namespace ::com::sun::star; @@ -1449,6 +1451,26 @@ void SdrOle2Obj::SetPage(SdrPage* pNewPage) if (bRemove && mpImpl->mbConnected ) Disconnect(); + if(!pModel && !GetStyleSheet() && pNewPage->GetModel()) + { + // #i119287# Set default StyleSheet for SdrGrafObj here, it is different from 'Default'. This + // needs to be done before the style 'Default' is set from the :SetModel() call which is triggered + // from the following :SetPage(). + // TTTT: Needs to be moved in branch aw080 due to having a SdrModel from the beginning, is at this + // place for convenience currently (works in both versions, is not in the way) + SfxStyleSheet* pSheet = pNewPage->GetModel()->GetDefaultStyleSheetForSdrGrafObjAndSdrOle2Obj(); + + if(pSheet) + { + SetStyleSheet(pSheet, false); + } + else + { + SetMergedItem(XFillStyleItem(XFILL_NONE)); + SetMergedItem(XLineStyleItem(XLINE_NONE)); + } + } + SdrRectObj::SetPage(pNewPage); if (bInsert && !mpImpl->mbConnected ) |