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 | |
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
-rwxr-xr-x | chart2/source/model/main/PageBackground.cxx | 5 | ||||
-rw-r--r-- | sc/source/ui/drawfunc/fuins2.cxx | 14 | ||||
-rw-r--r-- | sc/source/ui/view/output3.cxx | 4 | ||||
-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 |
6 files changed, 4 insertions, 66 deletions
diff --git a/chart2/source/model/main/PageBackground.cxx b/chart2/source/model/main/PageBackground.cxx index 58bf42c96a83..c06c410a8468 100755 --- a/chart2/source/model/main/PageBackground.cxx +++ b/chart2/source/model/main/PageBackground.cxx @@ -32,6 +32,7 @@ #include "PropertyHelper.hxx" #include <com/sun/star/drawing/LineStyle.hpp> +#include <com/sun/star/drawing/FillStyle.hpp> #include <rtl/uuid.h> #include <cppuhelper/queryinterface.hxx> @@ -64,7 +65,9 @@ private: ::chart::FillProperties::AddDefaultsToMap( rOutMap ); // override other defaults - ::chart::PropertyHelper::setPropertyValue< sal_Int32 >( rOutMap, ::chart::FillProperties::PROP_FILL_COLOR, 0xffffff ); + // #121334# As default, do not fill the chart page background; we want to be able to have the background + // of the object containing the chart to define this background fill (evtl. with different methodologies) + ::chart::PropertyHelper::setPropertyValue( rOutMap, ::chart::FillProperties::PROP_FILL_STYLE, drawing::FillStyle_NONE ); ::chart::PropertyHelper::setPropertyValue( rOutMap, ::chart::LineProperties::PROP_LINE_STYLE, drawing::LineStyle_NONE ); } }; diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx index 4dca4b192ce4..81f3412b1ffd 100644 --- a/sc/source/ui/drawfunc/fuins2.cxx +++ b/sc/source/ui/drawfunc/fuins2.cxx @@ -89,8 +89,6 @@ using namespace ::com::sun::star; #include "globstr.hrc" #include "drawview.hxx" -extern SdrObject* pSkipPaintObj; // output.cxx - dieses Objekt nicht zeichnen - //------------------------------------------------------------------------ #define IS_AVAILABLE(WhichId,ppItem) \ @@ -385,12 +383,6 @@ FuInsertOLE::FuInsertOLE(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pVie aPnt.X() -= aSize.Width(); // move position to left edge Rectangle aRect (aPnt, aSize); SdrOle2Obj* pObj = new SdrOle2Obj( aObjRef, aName, aRect); - - // Dieses Objekt nicht vor dem Aktivieren zeichnen - // (in MarkListHasChanged kommt ein Update) - if (!bIsFromFile) - pSkipPaintObj = pObj; - SdrPageView* pPV = pView->GetSdrPageView(); pView->InsertObjectAtView(pObj, *pPV); @@ -428,7 +420,6 @@ FuInsertOLE::FuInsertOLE(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pVie else { pViewShell->ActivateObject( (SdrOle2Obj*) pObj, SVVERB_SHOW ); - pSkipPaintObj = NULL; } } @@ -672,11 +663,6 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* Rectangle aRect (aStart, aSize); SdrOle2Obj* pObj = new SdrOle2Obj( svt::EmbeddedObjectRef( xObj, nAspect ), aName, aRect); - - // Dieses Objekt nicht vor dem Aktivieren zeichnen - // (in MarkListHasChanged kommt ein Update) - pSkipPaintObj = pObj; - SdrPageView* pPV = pView->GetSdrPageView(); // pView->InsertObjectAtView(pObj, *pPV);//this call leads to an immidiate redraw and asks the chart for a visual representation diff --git a/sc/source/ui/view/output3.cxx b/sc/source/ui/view/output3.cxx index f8c51e3363bf..a0c3300d04d5 100644 --- a/sc/source/ui/view/output3.cxx +++ b/sc/source/ui/view/output3.cxx @@ -45,10 +45,6 @@ #include <svx/fmview.hxx> -// STATIC DATA ----------------------------------------------------------- - -SdrObject* pSkipPaintObj = NULL; - //================================================================== // #i72502# 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 |