diff options
author | Armin Le Grand <alg@apache.org> | 2012-11-14 11:09:12 +0000 |
---|---|---|
committer | Armin Le Grand <alg@apache.org> | 2012-11-14 11:09:12 +0000 |
commit | 0050a8e4eace17ed1b55c7ec919edaa0daadc3a7 (patch) | |
tree | c44c37f2723227b5c2994dbfc0122808ad79428e /sd | |
parent | 20a3aee5359f143a6e4bf0bcb7fdef4675b3dd83 (diff) |
#121334# Changed default for charts background to be none (from white) to allow fill settings in the various apps to have an effect
Notes
Notes:
merged as: 7c486ba2574486f886612b8c4c130c55acd7d93e
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/func/fuinsert.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/inc/ViewShell.hxx | 3 | ||||
-rw-r--r-- | sd/source/ui/view/viewshe2.cxx | 36 |
3 files changed, 0 insertions, 47 deletions
diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx index 23b31bee2fe6..da76c767b1a1 100644 --- a/sd/source/ui/func/fuinsert.cxx +++ b/sd/source/ui/func/fuinsert.cxx @@ -394,14 +394,6 @@ 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. - mpViewShell->AdaptDefaultsForChart( xObj ); - } } } else diff --git a/sd/source/ui/inc/ViewShell.hxx b/sd/source/ui/inc/ViewShell.hxx index 901a2d2572cb..264ae75d175d 100644 --- a/sd/source/ui/inc/ViewShell.hxx +++ b/sd/source/ui/inc/ViewShell.hxx @@ -434,9 +434,6 @@ public: */ virtual bool RelocateToParentWindow (::Window* pParentWindow); - void AdaptDefaultsForChart( - const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject > & xEmbObj ); - /** Depending on the given request create a new page or duplicate an existing one. A new page is created behind the given slide. @param rRequest diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx index 8719e3a457a2..2f1fffae12d3 100644 --- a/sd/source/ui/view/viewshe2.cxx +++ b/sd/source/ui/view/viewshe2.cxx @@ -832,7 +832,6 @@ 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() ) @@ -849,7 +848,6 @@ sal_Bool ViewShell::ActivateObject(SdrOle2Obj* pObj, long nVerb) if( SvtModuleOptions().IsChart() ) { aClass = SvGlobalName( SO3_SCH_CLASSID ); - bChangeDefaultsForChart = true; } } else if( aName.EqualsAscii( "StarCalc" )) @@ -974,11 +972,6 @@ 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()) - { - AdaptDefaultsForChart( xObj ); - } - pSdClient->DoVerb(nVerb); // ErrCode wird ggf. vom Sfx ausgegeben pViewShell->GetViewFrame()->GetBindings().Invalidate( SID_NAVIGATOR_STATE, sal_True, sal_False); @@ -1186,33 +1179,4 @@ Point ViewShell::GetViewOrigin() const return mpContentWindow->GetViewOrigin(); } -void ViewShell::AdaptDefaultsForChart( - const uno::Reference < embed::XEmbeddedObject > & xEmbObj ) -{ - if( xEmbObj.is()) - { - uno::Reference< chart2::XChartDocument > xChartDoc( xEmbObj->getComponent(), uno::UNO_QUERY ); - OSL_ENSURE( xChartDoc.is(), "Trying to set chart property to non-chart OLE" ); - if( !xChartDoc.is()) - return; - - try - { - // set background to transparent (none) - uno::Reference< beans::XPropertySet > xPageProp( xChartDoc->getPageBackground()); - if( xPageProp.is()) - xPageProp->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FillStyle")), - uno::makeAny( drawing::FillStyle_NONE )); - // set no border - if( xPageProp.is()) - xPageProp->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LineStyle")), - uno::makeAny( drawing::LineStyle_NONE )); - } - catch( const uno::Exception & ) - { - OSL_ENSURE( false, "Exception caught in AdaptDefaultsForChart" ); - } - } -} - } // end of namespace sd |