openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1409174 - in /incubator/ooo/trunk/main: chart2/source/model/main/PageBackground.cxx sc/source/ui/drawfunc/fuins2.cxx sc/source/ui/view/output3.cxx sd/source/ui/func/fuinsert.cxx sd/source/ui/inc/ViewShell.hxx sd/source/ui/view/viewshe2.cxx
Date Wed, 14 Nov 2012 12:09:13 GMT
Author: alg
Date: Wed Nov 14 12:09:12 2012
New Revision: 1409174

URL: http://svn.apache.org/viewvc?rev=1409174&view=rev
Log:
#121334# Changed default for charts background to be none (from white) to allow fill settings
in the various apps to have an effect

Modified:
    incubator/ooo/trunk/main/chart2/source/model/main/PageBackground.cxx
    incubator/ooo/trunk/main/sc/source/ui/drawfunc/fuins2.cxx
    incubator/ooo/trunk/main/sc/source/ui/view/output3.cxx
    incubator/ooo/trunk/main/sd/source/ui/func/fuinsert.cxx
    incubator/ooo/trunk/main/sd/source/ui/inc/ViewShell.hxx
    incubator/ooo/trunk/main/sd/source/ui/view/viewshe2.cxx

Modified: incubator/ooo/trunk/main/chart2/source/model/main/PageBackground.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/chart2/source/model/main/PageBackground.cxx?rev=1409174&r1=1409173&r2=1409174&view=diff
==============================================================================
--- incubator/ooo/trunk/main/chart2/source/model/main/PageBackground.cxx (original)
+++ incubator/ooo/trunk/main/chart2/source/model/main/PageBackground.cxx Wed Nov 14 12:09:12
2012
@@ -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 );
     }    
 };

Modified: incubator/ooo/trunk/main/sc/source/ui/drawfunc/fuins2.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sc/source/ui/drawfunc/fuins2.cxx?rev=1409174&r1=1409173&r2=1409174&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sc/source/ui/drawfunc/fuins2.cxx (original)
+++ incubator/ooo/trunk/main/sc/source/ui/drawfunc/fuins2.cxx Wed Nov 14 12:09:12 2012
@@ -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*
 				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*
 				else
 				{
 					pViewShell->ActivateObject( (SdrOle2Obj*) pObj, SVVERB_SHOW );
-					pSkipPaintObj = NULL;
 				}
 			}
 
@@ -672,11 +663,6 @@ FuInsertChart::FuInsertChart(ScTabViewSh
 
         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

Modified: incubator/ooo/trunk/main/sc/source/ui/view/output3.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sc/source/ui/view/output3.cxx?rev=1409174&r1=1409173&r2=1409174&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sc/source/ui/view/output3.cxx (original)
+++ incubator/ooo/trunk/main/sc/source/ui/view/output3.cxx Wed Nov 14 12:09:12 2012
@@ -45,10 +45,6 @@
 
 #include <svx/fmview.hxx>
 
-// STATIC DATA -----------------------------------------------------------
-
-SdrObject* pSkipPaintObj = NULL;
-
 //==================================================================
 
 // #i72502#

Modified: incubator/ooo/trunk/main/sd/source/ui/func/fuinsert.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sd/source/ui/func/fuinsert.cxx?rev=1409174&r1=1409173&r2=1409174&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sd/source/ui/func/fuinsert.cxx (original)
+++ incubator/ooo/trunk/main/sd/source/ui/func/fuinsert.cxx Wed Nov 14 12:09:12 2012
@@ -394,14 +394,6 @@ void FuInsertOLE::DoExecute( SfxRequest&
                 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

Modified: incubator/ooo/trunk/main/sd/source/ui/inc/ViewShell.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sd/source/ui/inc/ViewShell.hxx?rev=1409174&r1=1409173&r2=1409174&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sd/source/ui/inc/ViewShell.hxx (original)
+++ incubator/ooo/trunk/main/sd/source/ui/inc/ViewShell.hxx Wed Nov 14 12:09:12 2012
@@ -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

Modified: incubator/ooo/trunk/main/sd/source/ui/view/viewshe2.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sd/source/ui/view/viewshe2.cxx?rev=1409174&r1=1409173&r2=1409174&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sd/source/ui/view/viewshe2.cxx (original)
+++ incubator/ooo/trunk/main/sd/source/ui/view/viewshe2.cxx Wed Nov 14 12:09:12 2012
@@ -832,7 +832,6 @@ sal_Bool ViewShell::ActivateObject(SdrOl
 	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(SdrOl
 			if( SvtModuleOptions().IsChart() )
             {
                 aClass = SvGlobalName( SO3_SCH_CLASSID );
-                bChangeDefaultsForChart = true;
             }
 		}
 		else if( aName.EqualsAscii( "StarCalc" ))
@@ -974,11 +972,6 @@ sal_Bool ViewShell::ActivateObject(SdrOl
 		// 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



Mime
View raw message