diff options
author | Armin Le Grand <alg@apache.org> | 2012-11-14 12:24:03 +0000 |
---|---|---|
committer | Armin Le Grand <alg@apache.org> | 2012-11-14 12:24:03 +0000 |
commit | af9220c24c9d80e5415d9d7d8f273b28d0d27cdb (patch) | |
tree | 69694542c9a2b6f285bf1c9c85e3102daa077f04 /sd | |
parent | 0050a8e4eace17ed1b55c7ec919edaa0daadc3a7 (diff) |
#121334# turbned back chart non-fill defaults, done the non-fill using tooling when chreating new chart modules
Notes
Notes:
merged as: 7c486ba2574486f886612b8c4c130c55acd7d93e
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/func/fuinsert.cxx | 10 | ||||
-rw-r--r-- | sd/source/ui/view/viewshe2.cxx | 8 |
2 files changed, 17 insertions, 1 deletions
diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx index da76c767b1a1..0fe881b4f0ee 100644 --- a/sd/source/ui/func/fuinsert.cxx +++ b/sd/source/ui/func/fuinsert.cxx @@ -71,8 +71,8 @@ #include <vcl/msgbox.hxx> #endif #include <sfx2/opengrf.hxx> - #include <sfx2/viewfrm.hxx> +#include <svx/charthelper.hxx> #include "app.hrc" #include "misc.hxx" @@ -394,6 +394,14 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq ) aVisualSize.Height = aTmp.Height(); xObj->setVisualAreaSize( nAspect, aVisualSize ); mpViewShell->ActivateObject(pOleObj, SVVERB_SHOW); + + if (nSlotId == SID_INSERT_DIAGRAM) + { + // note, that this call modified the chart model which + // results in a change notification. So call this after + // everything else is finished. + ChartHelper::AdaptDefaultsForChart( xObj ); + } } } else diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx index 2f1fffae12d3..85a3ffad1ced 100644 --- a/sd/source/ui/view/viewshe2.cxx +++ b/sd/source/ui/view/viewshe2.cxx @@ -83,6 +83,7 @@ #include <sfx2/viewfrm.hxx> #include <svtools/soerr.hxx> #include <toolkit/helper/vclunohelper.hxx> +#include <svx/charthelper.hxx> #ifdef _MSC_VER #pragma optimize ( "", off ) @@ -832,6 +833,7 @@ sal_Bool ViewShell::ActivateObject(SdrOle2Obj* pObj, long nVerb) GetDocSh()->SetWaitCursor( sal_True ); SfxViewShell* pViewShell = GetViewShell(); OSL_ASSERT (pViewShell!=NULL); + bool bChangeDefaultsForChart = false; uno::Reference < embed::XEmbeddedObject > xObj = pObj->GetObjRef(); if ( !xObj.is() ) @@ -848,6 +850,7 @@ sal_Bool ViewShell::ActivateObject(SdrOle2Obj* pObj, long nVerb) if( SvtModuleOptions().IsChart() ) { aClass = SvGlobalName( SO3_SCH_CLASSID ); + bChangeDefaultsForChart = true; } } else if( aName.EqualsAscii( "StarCalc" )) @@ -972,6 +975,11 @@ sal_Bool ViewShell::ActivateObject(SdrOle2Obj* pObj, long nVerb) // the object area size must be set after scaling, since it triggers the resizing pSdClient->SetObjArea(aRect); + if( bChangeDefaultsForChart && xObj.is()) + { + ChartHelper::AdaptDefaultsForChart( xObj ); + } + pSdClient->DoVerb(nVerb); // ErrCode wird ggf. vom Sfx ausgegeben pViewShell->GetViewFrame()->GetBindings().Invalidate( SID_NAVIGATOR_STATE, sal_True, sal_False); |