diff options
Diffstat (limited to 'svx/source/svdraw/svdograf.cxx')
-rw-r--r-- | svx/source/svdraw/svdograf.cxx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index 78a8e2709a14..a0041ee8de1a 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -962,6 +962,26 @@ void SdrGrafObj::SetPage( SdrPage* pNewPage ) ImpLinkAbmeldung(); } + 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 (!aFileName.isEmpty() && bInsert) |