diff options
author | Armin Le Grand <alg@apache.org> | 2012-06-11 14:56:06 +0000 |
---|---|---|
committer | Armin Le Grand <alg@apache.org> | 2012-06-11 14:56:06 +0000 |
commit | bc85939149f7ae5b65343d7f27bf302a8e31d4b1 (patch) | |
tree | 1c4019a9eb109c227d826b8cd4016d3f0780dac4 /sd | |
parent | fc17d3e1c60f18916786ddb4547a1c24d95ae51a (diff) |
#119287# Adapted to get the needed style as default style for all SdrGrafObj and SDrOle2Objs. Checked various scenarios, works well.
Notes
Notes:
merged as: 0a29c5bedda700a86b46e3c3cd9c9e1ce1d4f278
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/core/drawdoc.cxx | 3 | ||||
-rw-r--r-- | sd/source/ui/func/fuinsert.cxx | 19 | ||||
-rw-r--r-- | sd/source/ui/view/sdview4.cxx | 19 |
3 files changed, 3 insertions, 38 deletions
diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx index ad66284c19af..cce06aba7acf 100644 --- a/sd/source/core/drawdoc.cxx +++ b/sd/source/core/drawdoc.cxx @@ -645,6 +645,9 @@ void SdDrawDocument::NewOrLoadCompleted(DocCreationMode eMode) String aName( SdResId(STR_STANDARD_STYLESHEET_NAME)); SetDefaultStyleSheet(static_cast<SfxStyleSheet*>(mxStyleSheetPool->Find(aName, SD_STYLE_FAMILY_GRAPHICS))); + // #119287# Set default StyleSheet for SdrGrafObj and SdrOle2Obj + SetDefaultStyleSheetForSdrGrafObjAndSdrOle2Obj(static_cast<SfxStyleSheet*>(mxStyleSheetPool->Find(String( SdResId(STR_POOLSHEET_OBJNOLINENOFILL)), SD_STYLE_FAMILY_GRAPHICS))); + // Draw-Outliner und Dokument Outliner initialisieren, // aber nicht den globalen Outliner, den der ist ja nicht // dokumentspezifisch wie StyleSheetPool und StyleRequestHandler diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx index 4b32b499c09e..23b31bee2fe6 100644 --- a/sd/source/ui/func/fuinsert.cxx +++ b/sd/source/ui/func/fuinsert.cxx @@ -354,25 +354,6 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq ) SdrOle2Obj* pOleObj = new SdrOle2Obj( svt::EmbeddedObjectRef( xObj, nAspect ), aObjName, aRect ); SdrPageView* pPV = mpView->GetSdrPageView(); - if(pOleObj) - { - // #119287# - SdrModel* pModel = mpView ? mpView->GetModel() : 0; - SfxStyleSheetBasePool* pSfxStyleSheetBasePool = pModel ? pModel->GetStyleSheetPool() : 0; - SfxStyleSheet* pSheet = pSfxStyleSheetBasePool ? dynamic_cast< SfxStyleSheet* >(pSfxStyleSheetBasePool->Find(String(SdResId(STR_POOLSHEET_OBJNOLINENOFILL)), SD_STYLE_FAMILY_GRAPHICS)) : 0; - - if(pSheet) - { - pOleObj->SetStyleSheet(pSheet, false); - } - else - { - pOleObj->SetMergedItem(XFillStyleItem(XFILL_NONE)); - pOleObj->SetMergedItem(XLineStyleItem(XLINE_NONE)); - OSL_ENSURE(false, "Style Sheet for OLE not found (!)"); - } - } - // if we have a pick obj we need to make this new ole a pres obj replacing the current pick obj if( pPickObj ) { diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx index eabd8cb01c89..7e836d4036e9 100644 --- a/sd/source/ui/view/sdview4.cxx +++ b/sd/source/ui/view/sdview4.cxx @@ -223,25 +223,6 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction, bIsPresTarget = pP->IsPresObj(pPickObj); } - if(pNewGrafObj) - { - // #119287# - SdrModel* pModel = pPV->GetView().GetModel(); - SfxStyleSheetBasePool* pSfxStyleSheetBasePool = pModel ? pModel->GetStyleSheetPool() : 0; - SfxStyleSheet* pSheet = pSfxStyleSheetBasePool ? dynamic_cast< SfxStyleSheet* >(pSfxStyleSheetBasePool->Find(String(SdResId(STR_POOLSHEET_OBJNOLINENOFILL)), SD_STYLE_FAMILY_GRAPHICS)) : 0; - - if(pSheet) - { - pNewGrafObj->SetStyleSheet(pSheet, false); - } - else - { - pNewGrafObj->SetMergedItem(XFillStyleItem(XFILL_NONE)); - pNewGrafObj->SetMergedItem(XLineStyleItem(XLINE_NONE)); - OSL_ENSURE(false, "Style Sheet for GraphicObject not found (!)"); - } - } - if( ( mnAction & DND_ACTION_MOVE ) && pPickObj && !bIsPresTarget ) { // replace object |