[ooo-build-commit] Branch 'ooo/master' - 5 commits - chart2/source sc/source

Jan Holesovsky kendy at kemper.freedesktop.org
Thu Aug 27 17:17:17 PDT 2009


 chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx |   10 
 chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx       |    7 
 chart2/source/controller/dialogs/Bitmaps.hrc                      |    4 
 chart2/source/controller/dialogs/Bitmaps.src                      |    8 
 chart2/source/controller/dialogs/Bitmaps_HC.hrc                   |    4 
 chart2/source/controller/dialogs/Bitmaps_HC.src                   |    8 
 chart2/source/controller/dialogs/ChartTypeDialogController.cxx    |   11 
 chart2/source/controller/dialogs/DataBrowser.cxx                  |    3 
 chart2/source/controller/dialogs/Strings_ChartTypes.src           |    4 
 chart2/source/controller/dialogs/dlg_DataSource.cxx               |   13 
 chart2/source/controller/dialogs/tp_ChartType.cxx                 |    3 
 chart2/source/controller/dialogs/tp_DataSource.cxx                |   23 
 chart2/source/controller/dialogs/tp_DataSource.hxx                |    7 
 chart2/source/controller/dialogs/tp_RangeChooser.cxx              |   23 
 chart2/source/controller/dialogs/tp_RangeChooser.hxx              |    6 
 chart2/source/controller/inc/dlg_DataSource.hxx                   |    3 
 chart2/source/inc/ChartTypeHelper.hxx                             |    2 
 chart2/source/inc/CommonConverters.hxx                            |    4 
 chart2/source/inc/Strings.hrc                                     |    3 
 chart2/source/inc/servicenames_charttypes.hxx                     |    1 
 chart2/source/model/template/ChartTypeManager.cxx                 |   18 
 chart2/source/model/template/FilledNetChartType.cxx               |   97 ++
 chart2/source/model/template/FilledNetChartType.hxx               |   66 +
 chart2/source/model/template/NetChartType.cxx                     |  120 +--
 chart2/source/model/template/NetChartType.hxx                     |   40 -
 chart2/source/model/template/NetChartTypeTemplate.cxx             |   28 
 chart2/source/model/template/NetChartTypeTemplate.hxx             |    4 
 chart2/source/model/template/_serviceregistration_charttypes.cxx  |    9 
 chart2/source/model/template/makefile.mk                          |    1 
 chart2/source/tools/ChartTypeHelper.cxx                           |   29 
 chart2/source/tools/CommonConverters.cxx                          |   23 
 chart2/source/tools/DiagramHelper.cxx                             |    2 
 chart2/source/view/axes/VCoordinateSystem.cxx                     |    5 
 chart2/source/view/charttypes/AreaChart.cxx                       |   64 +
 chart2/source/view/charttypes/AreaChart.hxx                       |    2 
 chart2/source/view/charttypes/BubbleChart.cxx                     |    4 
 chart2/source/view/charttypes/VSeriesPlotter.cxx                  |    7 
 chart2/source/view/inc/VCoordinateSystem.hxx                      |    4 
 chart2/source/view/inc/VSeriesPlotter.hxx                         |    2 
 chart2/source/view/main/ChartView.cxx                             |   20 
 chart2/source/view/main/VDataSeries.cxx                           |    2 
 sc/source/filter/excel/xlchart.cxx                                |   49 -
 sc/source/ui/Accessibility/AccessibleCell.cxx                     |    2 
 sc/source/ui/Accessibility/AccessibleText.cxx                     |  140 +++
 sc/source/ui/inc/AccessibleText.hxx                               |    4 
 sc/source/ui/inc/gridwin.hxx                                      |   40 -
 sc/source/ui/inc/tabview.hxx                                      |    6 
 sc/source/ui/view/gridwin.cxx                                     |  371 ++--------
 sc/source/ui/view/gridwin4.cxx                                    |    2 
 sc/source/ui/view/makefile.mk                                     |    4 
 sc/source/ui/view/tabview.cxx                                     |    3 
 sc/source/ui/view/tabview5.cxx                                    |   10 
 52 files changed, 826 insertions(+), 499 deletions(-)

New commits:
commit 82ac86cda581abb06bd8e755707079c4236f1ef0
Author: Vladimir Glazounov <vg at openoffice.org>
Date:   Thu Aug 27 14:46:36 2009 +0000

    CWS-TOOLING: integrate CWS hr64_DEV300
    2009-07-21 13:24:57 +0200 hr  r274189 : #i99576#: re-enable optimization for tabcont.cxx
    2009-07-21 13:17:18 +0200 hr  r274188 : #i99592: disable -xspace optimization for Solaris x86 and SunStudio 12, due to some mis-optimzation in sc and elsewhere. SunStudio 12 update 1 is OK, but needs a few unrelated changes which will be implemented in DEV300 code line

diff --git a/sc/source/ui/view/makefile.mk b/sc/source/ui/view/makefile.mk
index 9af8051..466ab5d 100644
--- a/sc/source/ui/view/makefile.mk
+++ b/sc/source/ui/view/makefile.mk
@@ -135,12 +135,10 @@ SLOFILES =  \
         $(SLO)$/viewfun4.obj \
         $(SLO)$/viewfun2.obj
 .ELIF "$(OS)$(COM)$(CPUNAME)"=="SOLARISC52INTEL"
-# tabcont can be removed if -xspace is no longer used (i99576, i99592)
     NOOPTFILES=\
         $(SLO)$/drawview.obj    \
         $(SLO)$/dbfunc2.obj     \
-        $(SLO)$/tabvwsh2.obj    \
-        $(SLO)$/tabcont.obj
+        $(SLO)$/tabvwsh2.obj
 .ELSE
 
     NOOPTFILES=\
commit bfafd8a7f67233a85f3dd4bc02f585f7933e3cf8
Author: Release Engineers <releng at openoffice.org>
Date:   Wed Aug 26 14:41:39 2009 +0000

    CWS-TOOLING: integrate CWS aw075
    2009-08-12 18:26:05 +0200 aw  r274912 : #i97672# use SelectionMaximumLuminancePercent to limit the hilight color to be not too invisible
    2009-08-12 18:25:53 +0200 aw  r274911 : #i97672# use SelectionMaximumLuminancePercent to limit the hilight color to be not too invisible
    2009-08-12 18:25:20 +0200 aw  r274910 : #i97672# Added SelectionMaximumLuminancePercent to decide which maximum luminance for the selection color to accept from the system
    2009-08-12 18:00:17 +0200 aw  r274908 : #i97672# added SelectionMaximumLuminancePercent which limits the luminance of the system's selection color to a maximum luminance (default is 70)
    2009-08-11 14:01:07 +0200 aw  r274859 : #i104150# take over values from transparence percent field even when disabled
    2009-08-11 13:59:33 +0200 aw  r274858 : #i103500# corrected the transparent SC overlay pixel alignment
    2009-08-11 12:42:46 +0200 jsk  r274854 : #i103937# Added two new controls to options/view page for transparency and opacity
    2009-08-10 16:20:02 +0200 aw  r274823 : #i97672# Adapting MF_SELECTION to #i35956#
    2009-08-04 17:50:42 +0200 aw  r274626 : #i102109# need to use AlphaMask instead of Bitmap
    2009-08-04 17:03:25 +0200 aw  r274624 : #i103982# corrected OutlinerParaObject owvership in GetBackgroundTextForwarder()
    2009-08-04 12:18:11 +0200 aw  r274614 : #i97672# corrected warning due to member initialisation
    2009-08-03 11:54:16 +0200 aw  r274571 : #i99268# corrected SdrExchangeView::GetObjGraphic
    2009-07-31 14:22:57 +0200 aw  r274529 : #i101520# added support for not correct 3d polygons for 3D polygon object which is used over API from chart directly
    2009-07-31 13:25:20 +0200 aw  r274527 : #i97672# added disabling selection options when system does not support them; slightly corrected positions
    2009-07-31 13:20:32 +0200 aw  r274526 : #i102706# Do not merge closed polygons when converting MetaFiles to SdrObjects
    2009-07-30 18:03:07 +0200 aw  r274499 : #i102175# corrected 1870 degree rotation situation for MetaFile paints
    2009-07-30 17:06:31 +0200 aw  r274496 : #i103709# corrected HitTest for callouts and DrawingLayer text objects
    2009-07-29 18:55:22 +0200 aw  r274465 : #i102956# corrected CutFindProcessor to back-transform all found cuts to the starting 3D coordinate system
    2009-07-29 13:38:40 +0200 aw  r274448 : #i103720# corrected mpAsynchLoadEvent usage
    2009-07-29 12:48:12 +0200 aw  r274447 : #i96762# cleanup: spaces
    2009-07-28 19:11:31 +0200 aw  r274427 : #97672# first version of reworked selection with changeable transparency and frame
    2009-07-28 19:09:39 +0200 aw  r274425 : #97672# first version of reworked selection with changeable transparency and frame
    2009-07-28 19:09:27 +0200 aw  r274424 : #97672# first version of reworked selection with changeable transparency and frame
    2009-07-28 19:09:14 +0200 aw  r274423 : #97672# first version of reworked selection with changeable transparency and frame
    2009-07-28 19:08:59 +0200 aw  r274422 : #97672# first version of reworked selection with changeable transparency and frame
    2009-07-28 19:08:47 +0200 aw  r274421 : #97672# first version of reworked selection with changeable transparency and frame
    2009-07-28 15:44:50 +0200 aw  r274411 : #i102556# corrected TextLayouterDevice::getTextBoundRect implementation and usage; empty Rectangles were not handled correctly
    2009-07-23 17:48:36 +0200 aw  r274277 : #i102063# implemented in-between OLE content holder (SdrOleContentPrimitive2D) and it's decomposition. Cleaned up diverse OLE graphic preparations
    2009-07-22 12:55:12 +0200 aw  r274227 : #i102109# extended OutputDevice::DrawTransparent (the version with TransparenceGradient) to work correctly with AntiAliased content
    2009-07-21 13:31:12 +0200 aw  r274191 : #i102611# changed scaling of Z-Range for Z-Buffer for ZBufferProcessor3D
    2009-07-20 20:06:46 +0200 aw  r274155 : #i103500# moved OverlayObjectCell back to use discrete coordinates for rectangle list
    2009-07-16 17:33:26 +0200 aw  r274065 : #i103530# corrected parameter preparation for MetaFile::Rotate call

diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index 0a6b45c..914ae51 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -37,6 +37,7 @@
 #include "viewdata.hxx"
 #include "cbutton.hxx"
 #include <svx/sdr/overlay/overlayobject.hxx>
+#include <basegfx/matrix/b2dhommatrix.hxx>
 
 #include <vector>
 
@@ -94,44 +95,7 @@ public:
 
 // ---------------------------------------------------------------------------
 // predefines
-class ScGridWindow;
-
-enum ScOverlayType { SC_OVERLAY_INVERT, SC_OVERLAY_SOLID, SC_OVERLAY_BORDER_TRANSPARENT };
-
-// #114409#
-namespace sdr
-{
-    namespace overlay
-    {
-        // predefines
-        class OverlayObjectList;
-
-        // OverlayObjectCell - used for cell cursor, selection and AutoFill handle
-
-        class OverlayObjectCell : public OverlayObject
-        {
-        public:
-            typedef ::std::vector< basegfx::B2DRange > RangeVector;
-
-        protected:
-            basegfx::B2DPolyPolygon impGetOverlayPolyPolygon() const;
-
-        private:
-            ScOverlayType   mePaintType;
-            RangeVector     maRectangles;
-
-            // geometry creation for OverlayObject
-            virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
-
-        public:
-            OverlayObjectCell( ScOverlayType eType, const Color& rColor, const RangeVector& rRects);
-            virtual ~OverlayObjectCell();
-        };
-
-    } // end of namespace overlay
-} // end of namespace sdr
-
-// ---------------------------------------------------------------------------
+namespace sdr { namespace overlay { class OverlayObjectList; }}
 
 class ScGridWindow : public Window, public DropTargetHelper, public DragSourceHelper
 {
diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx
index 8e69d44..0e1c5ac 100644
--- a/sc/source/ui/inc/tabview.hxx
+++ b/sc/source/ui/inc/tabview.hxx
@@ -181,9 +181,6 @@ private:
     BOOL				bMoveIsShift;
     BOOL				bNewStartIfMarking;
 
-    BOOL                bOldSelection;          // old style (inverting) of selection
-
-
     void			Init();
 
     void			DoAddWin( ScGridWindow* pWin );
@@ -528,9 +525,6 @@ public:
     void            SetBrushDocument( ScDocument* pNew, BOOL bLock );
     void            SetDrawBrushSet( SfxItemSet* pNew, BOOL bLock );
     void            ResetBrushDocument();
-
-    void            UpdateSelectionType();
-    BOOL            IsOldSelection() const          { return bOldSelection; }
 };
 
 
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 86ea619..2b65eb8 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -122,18 +122,11 @@
 #include "tabprotection.hxx"
 #include "postit.hxx"
 
-// #114409#
-#include <vcl/salbtype.hxx>		// FRound
 #include "drawview.hxx"
 #include <svx/sdrpagewindow.hxx>
-#include <svx/sdrpaintwindow.hxx>
 #include <svx/sdr/overlay/overlaymanager.hxx>
 #include <vcl/svapp.hxx>
-
-#include <drawinglayer/primitive2d/invertprimitive2d.hxx>
-#include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx>
-#include <drawinglayer/primitive2d/unifiedalphaprimitive2d.hxx>
-#include <basegfx/polygon/b2dpolygontools.hxx>
+#include <svx/sdr/overlay/overlayselection.hxx>
 
 using namespace com::sun::star;
 using ::com::sun::star::uno::Sequence;
@@ -359,8 +352,7 @@ void lcl_UnLockComment( ScDrawView* pView, SdrPageView* pPV, SdrModel* pDrDoc, c
     }
 }
 
-//==================================================================
-
+// ---------------------------------------------------------------------------
 //	WB_DIALOGCONTROL noetig fuer UNO-Controls
 ScGridWindow::ScGridWindow( Window* pParent, ScViewData* pData, ScSplitPos eWhichPos )
 :			Window( pParent, WB_CLIPCHILDREN | WB_DIALOGCONTROL ),
@@ -4866,7 +4858,6 @@ BOOL ScGridWindow::GetEditUrlOrError( BOOL bSpellErr, const Point& rPos,
     MapMode aEditMode = pViewData->GetLogicMode(eWhich);			// ohne Drawing-Skalierung
     Rectangle aLogicEdit = PixelToLogic( aEditRect, aEditMode );
     long nThisColLogic = aLogicEdit.Right() - aLogicEdit.Left() + 1;
-
     Size aPaperSize = Size( 1000000, 1000000 );
     if(pCell->GetCellType() == CELLTYPE_FORMULA)
     {
@@ -5181,37 +5172,30 @@ void ScGridWindow::UpdateCursorOverlay()
         }
     }
 
-    //
-    //  convert into logic units and create overlay object
-    //
-
     if ( aPixelRects.size() )
     {
-        sdr::overlay::OverlayObjectCell::RangeVector aRanges;
-
-        std::vector<Rectangle>::const_iterator aPixelEnd( aPixelRects.end() );
-        for ( std::vector<Rectangle>::const_iterator aPixelIter( aPixelRects.begin() );
-              aPixelIter != aPixelEnd; ++aPixelIter )
-        {
-            Rectangle aLogic( PixelToLogic( *aPixelIter, aDrawMode ) );
-
-            const basegfx::B2DPoint aTopLeft(aLogic.Left(), aLogic.Top());
-            const basegfx::B2DPoint aBottomRight(aLogic.Right(), aLogic.Bottom());
-            const basegfx::B2DRange a2DRange(aTopLeft, aBottomRight);
-
-            aRanges.push_back( a2DRange );
-        }
-
         // #i70788# get the OverlayManager safely
         ::sdr::overlay::OverlayManager* pOverlayManager = getOverlayManager();
 
         if(pOverlayManager)
         {
-            BOOL bOld = pViewData->GetView()->IsOldSelection();
-
-            ScOverlayType eType = bOld ? SC_OVERLAY_INVERT : SC_OVERLAY_SOLID;
-            Color aCursorColor( SC_MOD()->GetColorConfig().GetColorValue(svtools::FONTCOLOR).nColor );
-            sdr::overlay::OverlayObjectCell* pOverlay = new sdr::overlay::OverlayObjectCell( eType, aCursorColor, aRanges );
+            const Color aCursorColor( SC_MOD()->GetColorConfig().GetColorValue(svtools::FONTCOLOR).nColor );
+            std::vector< basegfx::B2DRange > aRanges;
+            const basegfx::B2DHomMatrix aTransform(GetInverseViewTransformation());
+            
+            for(sal_uInt32 a(0); a < aPixelRects.size(); a++)
+            {
+                const Rectangle aRA(aPixelRects[a]);
+                basegfx::B2DRange aRB(aRA.Left(), aRA.Top(), aRA.Right() + 1, aRA.Bottom() + 1);
+                aRB.transform(aTransform);
+                aRanges.push_back(aRB);
+            }
+            
+            sdr::overlay::OverlayObject* pOverlay = new sdr::overlay::OverlaySelection(
+                sdr::overlay::OVERLAY_SOLID, 
+                aCursorColor, 
+                aRanges,
+                false);
 
             pOverlayManager->add(*pOverlay);
             mpOOCursors = new ::sdr::overlay::OverlayObjectList;
@@ -5236,50 +5220,52 @@ void ScGridWindow::UpdateSelectionOverlay()
         SetMapMode( aDrawMode );
 
     DeleteSelectionOverlay();
-
     std::vector<Rectangle> aPixelRects;
     GetSelectionRects( aPixelRects );
 
     if ( aPixelRects.size() && pViewData->IsActive() )
     {
-        SCTAB nTab = pViewData->GetTabNo();
-        BOOL bLayoutRTL = pViewData->GetDocument()->IsLayoutRTL( nTab );
-        BOOL bOld = pViewData->GetView()->IsOldSelection();
-
-        sdr::overlay::OverlayObjectCell::RangeVector aRanges;
+        // #i70788# get the OverlayManager safely
+        ::sdr::overlay::OverlayManager* pOverlayManager = getOverlayManager();
 
-        std::vector<Rectangle>::const_iterator aPixelEnd( aPixelRects.end() );
-        for ( std::vector<Rectangle>::const_iterator aPixelIter( aPixelRects.begin() );
-              aPixelIter != aPixelEnd; ++aPixelIter )
+        if(pOverlayManager)
         {
-            Rectangle aPixel( *aPixelIter );
-            if ( !bOld )
+            std::vector< basegfx::B2DRange > aRanges;
+            const basegfx::B2DHomMatrix aTransform(GetInverseViewTransformation());
+            
+            for(sal_uInt32 a(0); a < aPixelRects.size(); a++)
             {
-                // for transparent selection, add a pixel so the border is on the grid on all edges
-                if ( bLayoutRTL )
-                    aPixel.Right() += 1;
-                else
-                    aPixel.Left() -= 1;
-                aPixel.Top() -= 1;
+                const Rectangle aRA(aPixelRects[a]);
+                basegfx::B2DRange aRB(aRA.Left() - 1, aRA.Top() - 1, aRA.Right(), aRA.Bottom());
+                aRB.transform(aTransform);
+                aRanges.push_back(aRB);
             }
-            Rectangle aLogic( PixelToLogic( aPixel, aDrawMode ) );
 
-            const basegfx::B2DPoint aTopLeft(aLogic.Left(), aLogic.Top());
-            const basegfx::B2DPoint aBottomRight(aLogic.Right(), aLogic.Bottom());
-            const basegfx::B2DRange a2DRange(aTopLeft, aBottomRight);
+            // #i97672# get the system's hilight color and limit it to the maximum
+            // allowed luminance. This is needed to react on too bright hilight colors
+            // which would otherwise vive a bad visualisation
+            Color aHighlight(GetSettings().GetStyleSettings().GetHighlightColor());
+            const SvtOptionsDrawinglayer aSvtOptionsDrawinglayer;
+            const basegfx::BColor aSelection(aHighlight.getBColor());
+            const double fLuminance(aSelection.luminance());
+            const double fMaxLum(aSvtOptionsDrawinglayer.GetSelectionMaximumLuminancePercent() / 100.0);
 
-            aRanges.push_back( a2DRange );
-        }
+            if(fLuminance > fMaxLum)
+            {
+                const double fFactor(fMaxLum / fLuminance);
+                const basegfx::BColor aNewSelection(
+                    aSelection.getRed() * fFactor,
+                    aSelection.getGreen() * fFactor,
+                    aSelection.getBlue() * fFactor);
 
-        // #i70788# get the OverlayManager safely
-        ::sdr::overlay::OverlayManager* pOverlayManager = getOverlayManager();
+                aHighlight = Color(aNewSelection);
+            }
 
-        if(pOverlayManager)
-        {
-            ScOverlayType eType = bOld ? SC_OVERLAY_INVERT : SC_OVERLAY_BORDER_TRANSPARENT;
-            Color aHighlight( GetSettings().GetStyleSettings().GetHighlightColor() );
-            sdr::overlay::OverlayObjectCell* pOverlay =
-                new sdr::overlay::OverlayObjectCell( eType, aHighlight, aRanges );
+            sdr::overlay::OverlayObject* pOverlay = new sdr::overlay::OverlaySelection(
+                sdr::overlay::OVERLAY_TRANSPARENT, 
+                aHighlight, 
+                aRanges,
+                true);
 
             pOverlayManager->add(*pOverlay);
             mpOOSelection = new ::sdr::overlay::OverlayObjectList;
@@ -5330,32 +5316,25 @@ void ScGridWindow::UpdateAutoFillOverlay()
         aFillPos.Y() += nSizeYPix;
         aFillPos.Y() -= 2;
         Rectangle aFillRect( aFillPos, Size(6,6) );
-
-        //
-        //  convert into logic units
-        //
-
-        sdr::overlay::OverlayObjectCell::RangeVector aRanges;
-
-        Rectangle aLogic( PixelToLogic( aFillRect, aDrawMode ) );
-
-        const basegfx::B2DPoint aTopLeft(aLogic.Left(), aLogic.Top());
-        const basegfx::B2DPoint aBottomRight(aLogic.Right(), aLogic.Bottom());
-        const basegfx::B2DRange a2DRange(aTopLeft, aBottomRight);
-
-        aRanges.push_back( a2DRange );
-
+    
         // #i70788# get the OverlayManager safely
         ::sdr::overlay::OverlayManager* pOverlayManager = getOverlayManager();
 
         if(pOverlayManager)
         {
-            BOOL bOld = pViewData->GetView()->IsOldSelection();
-
-            ScOverlayType eType = bOld ? SC_OVERLAY_INVERT : SC_OVERLAY_SOLID;
-            Color aHandleColor( SC_MOD()->GetColorConfig().GetColorValue(svtools::FONTCOLOR).nColor );
-            sdr::overlay::OverlayObjectCell* pOverlay =
-                new sdr::overlay::OverlayObjectCell( eType, aHandleColor, aRanges );
+            const Color aHandleColor( SC_MOD()->GetColorConfig().GetColorValue(svtools::FONTCOLOR).nColor );
+            std::vector< basegfx::B2DRange > aRanges;
+            const basegfx::B2DHomMatrix aTransform(GetInverseViewTransformation());
+            basegfx::B2DRange aRB(aFillRect.Left(), aFillRect.Top(), aFillRect.Right() + 1, aFillRect.Bottom() + 1);
+            
+            aRB.transform(aTransform);
+            aRanges.push_back(aRB);
+
+            sdr::overlay::OverlayObject* pOverlay = new sdr::overlay::OverlaySelection( 
+                sdr::overlay::OVERLAY_SOLID, 
+                aHandleColor, 
+                aRanges,
+                false);
 
             pOverlayManager->add(*pOverlay);
             mpOOAutoFill = new ::sdr::overlay::OverlayObjectList;
@@ -5466,34 +5445,28 @@ void ScGridWindow::UpdateDragRectOverlay()
             aPixelRects.push_back( Rectangle( aRect.Left()+3, aRect.Bottom()-2, aRect.Right()-3, aRect.Bottom() ) );
         }
 
-        //
-        //  convert into logic units and create overlay object
-        //
-
-        sdr::overlay::OverlayObjectCell::RangeVector aRanges;
-
-        std::vector<Rectangle>::const_iterator aPixelEnd( aPixelRects.end() );
-        for ( std::vector<Rectangle>::const_iterator aPixelIter( aPixelRects.begin() );
-              aPixelIter != aPixelEnd; ++aPixelIter )
-        {
-            Rectangle aLogic( PixelToLogic( *aPixelIter, aDrawMode ) );
-
-            const basegfx::B2DPoint aTopLeft(aLogic.Left(), aLogic.Top());
-            const basegfx::B2DPoint aBottomRight(aLogic.Right(), aLogic.Bottom());
-            const basegfx::B2DRange a2DRange(aTopLeft, aBottomRight);
-
-            aRanges.push_back( a2DRange );
-        }
-
         // #i70788# get the OverlayManager safely
         ::sdr::overlay::OverlayManager* pOverlayManager = getOverlayManager();
 
         if(pOverlayManager)
         {
-            ScOverlayType eType = SC_OVERLAY_INVERT;
-            Color aHighlight = GetSettings().GetStyleSettings().GetHighlightColor();
-            sdr::overlay::OverlayObjectCell* pOverlay =
-                new sdr::overlay::OverlayObjectCell( eType, aHighlight, aRanges );
+            // Color aHighlight = GetSettings().GetStyleSettings().GetHighlightColor();
+            std::vector< basegfx::B2DRange > aRanges;
+            const basegfx::B2DHomMatrix aTransform(GetInverseViewTransformation());
+            
+            for(sal_uInt32 a(0); a < aPixelRects.size(); a++)
+            {
+                const Rectangle aRA(aPixelRects[a]);
+                basegfx::B2DRange aRB(aRA.Left(), aRA.Top(), aRA.Right() + 1, aRA.Bottom() + 1);
+                aRB.transform(aTransform);
+                aRanges.push_back(aRB);
+            }
+
+            sdr::overlay::OverlayObject* pOverlay = new sdr::overlay::OverlaySelection( 
+                sdr::overlay::OVERLAY_INVERT, 
+                Color(COL_BLACK),
+                aRanges,
+                false);
 
             pOverlayManager->add(*pOverlay);
             mpOODragRect = new ::sdr::overlay::OverlayObjectList;
@@ -5520,31 +5493,26 @@ void ScGridWindow::UpdateHeaderOverlay()
     DeleteHeaderOverlay();
 
     //  Pixel rectangle is in aInvertRect
-
-    //
-    //  convert into logic units and create overlay object
-    //
-
     if ( !aInvertRect.IsEmpty() )
     {
-        Rectangle aLogic( PixelToLogic( aInvertRect, aDrawMode ) );
-
-        const basegfx::B2DPoint aTopLeft(aLogic.Left(), aLogic.Top());
-        const basegfx::B2DPoint aBottomRight(aLogic.Right(), aLogic.Bottom());
-        const basegfx::B2DRange a2DRange(aTopLeft, aBottomRight);
-
-        sdr::overlay::OverlayObjectCell::RangeVector aRanges;
-        aRanges.push_back( a2DRange );
-
         // #i70788# get the OverlayManager safely
         ::sdr::overlay::OverlayManager* pOverlayManager = getOverlayManager();
 
         if(pOverlayManager)
         {
-            ScOverlayType eType = SC_OVERLAY_INVERT;
-            Color aHighlight = GetSettings().GetStyleSettings().GetHighlightColor();
-            sdr::overlay::OverlayObjectCell* pOverlay =
-                new sdr::overlay::OverlayObjectCell( eType, aHighlight, aRanges );
+            // Color aHighlight = GetSettings().GetStyleSettings().GetHighlightColor();
+            std::vector< basegfx::B2DRange > aRanges;
+            const basegfx::B2DHomMatrix aTransform(GetInverseViewTransformation());
+            basegfx::B2DRange aRB(aInvertRect.Left(), aInvertRect.Top(), aInvertRect.Right() + 1, aInvertRect.Bottom() + 1);
+            
+            aRB.transform(aTransform);
+            aRanges.push_back(aRB);
+
+            sdr::overlay::OverlayObject* pOverlay = new sdr::overlay::OverlaySelection(
+                sdr::overlay::OVERLAY_INVERT, 
+                Color(COL_BLACK), 
+                aRanges,
+                false);
 
             pOverlayManager->add(*pOverlay);
             mpOOHeader = new ::sdr::overlay::OverlayObjectList;
@@ -5595,30 +5563,26 @@ void ScGridWindow::UpdateShrinkOverlay()
         }
     }
 
-    //
-    //  convert into logic units and create overlay object
-    //
-
     if ( !aPixRect.IsEmpty() )
     {
-        Rectangle aLogic( PixelToLogic( aPixRect, aDrawMode ) );
-
-        const basegfx::B2DPoint aTopLeft(aLogic.Left(), aLogic.Top());
-        const basegfx::B2DPoint aBottomRight(aLogic.Right(), aLogic.Bottom());
-        const basegfx::B2DRange a2DRange(aTopLeft, aBottomRight);
-
-        sdr::overlay::OverlayObjectCell::RangeVector aRanges;
-        aRanges.push_back( a2DRange );
-
         // #i70788# get the OverlayManager safely
         ::sdr::overlay::OverlayManager* pOverlayManager = getOverlayManager();
 
         if(pOverlayManager)
         {
-            ScOverlayType eType = SC_OVERLAY_INVERT;
-            Color aHighlight = GetSettings().GetStyleSettings().GetHighlightColor();
-            sdr::overlay::OverlayObjectCell* pOverlay =
-                new sdr::overlay::OverlayObjectCell( eType, aHighlight, aRanges );
+            // Color aHighlight = GetSettings().GetStyleSettings().GetHighlightColor();
+            std::vector< basegfx::B2DRange > aRanges;
+            const basegfx::B2DHomMatrix aTransform(GetInverseViewTransformation());
+            basegfx::B2DRange aRB(aPixRect.Left(), aPixRect.Top(), aPixRect.Right() + 1, aPixRect.Bottom() + 1);
+            
+            aRB.transform(aTransform);
+            aRanges.push_back(aRB);
+
+            sdr::overlay::OverlayObject* pOverlay = new sdr::overlay::OverlaySelection(
+                sdr::overlay::OVERLAY_INVERT, 
+                Color(COL_BLACK), 
+                aRanges,
+                false);
 
             pOverlayManager->add(*pOverlay);
             mpOOShrink = new ::sdr::overlay::OverlayObjectList;
@@ -5660,121 +5624,4 @@ void ScGridWindow::flushOverlayManager()
 }
 
 // ---------------------------------------------------------------------------
-
-// #114409#
-namespace sdr
-{
-    namespace overlay
-    {
-        OverlayObjectCell::OverlayObjectCell( ScOverlayType eType, const Color& rColor, const RangeVector& rRects )
-        :	OverlayObject( rColor ),
-            mePaintType( eType ),
-            maRectangles( rRects )
-        {
-            // no AA for selection overlays
-            allowAntiAliase(false);
-        }
-
-        OverlayObjectCell::~OverlayObjectCell()
-        {
-        }
-
-        drawinglayer::primitive2d::Primitive2DSequence OverlayObjectCell::createOverlayObjectPrimitive2DSequence()
-        {
-            drawinglayer::primitive2d::Primitive2DSequence aRetval;
-            const basegfx::BColor aRGBColor(getBaseColor().getBColor());
-            const sal_uInt32 nCount(maRectangles.size());
-
-            if(nCount)
-            {
-                // create fill primities for all rectangles
-                // These ranges are meant as rectangles, so it is not sufficient to replace them
-                // using the derived polygon. That would leave out the bottom and right lines
-                // in a discrete width/height due to polygon painting conventions of leaving off those.
-                // To solve, it is either possible to create a view-dependent rectangle primitive
-                // handling this internally or to additionally create a hairline primitive to
-                // cover these areas (which i will do here)
-                const bool bIsTransparent(SC_OVERLAY_BORDER_TRANSPARENT == mePaintType);
-                aRetval.realloc(nCount * 2);
-
-                for(sal_uInt32 a(0);a < nCount; a++)
-                {
-                    const basegfx::B2DRange& rRange(maRectangles[a]);
-                    const basegfx::B2DPolygon aPolygon(basegfx::tools::createPolygonFromRect(rRange));
-                    
-                    aRetval[a * 2] = drawinglayer::primitive2d::Primitive2DReference(
-                        new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D(
-                            basegfx::B2DPolyPolygon(aPolygon),
-                            aRGBColor));
-                    aRetval[(a * 2) + 1] = drawinglayer::primitive2d::Primitive2DReference(
-                        new drawinglayer::primitive2d::PolyPolygonHairlinePrimitive2D(
-                            basegfx::B2DPolyPolygon(aPolygon),
-                            aRGBColor));
-                }
-
-                if(SC_OVERLAY_INVERT == mePaintType)
-                {
-                    // embed all in invert primitive
-                    const drawinglayer::primitive2d::Primitive2DReference aInvert(
-                        new drawinglayer::primitive2d::InvertPrimitive2D(
-                            aRetval));
-
-                    aRetval = drawinglayer::primitive2d::Primitive2DSequence(&aInvert, 1);
-                }
-                else if(bIsTransparent)
-                {
-                    // embed all rectangles in 75% transparent paint
-                    const drawinglayer::primitive2d::Primitive2DReference aUnifiedAlpha(
-                        new drawinglayer::primitive2d::UnifiedAlphaPrimitive2D(
-                            aRetval,
-                            0.75));
-
-                    // prepare merged PolyPoygon selection outline
-                    const basegfx::B2DPolyPolygon aPolyPolygon(impGetOverlayPolyPolygon());
-                    const drawinglayer::primitive2d::Primitive2DReference aSelectionOutline(
-                        new drawinglayer::primitive2d::PolyPolygonHairlinePrimitive2D(
-                            aPolyPolygon,
-                            aRGBColor));
-
-                    // add both to result
-                    aRetval.realloc(2);
-                    aRetval[0] = aUnifiedAlpha;
-                    aRetval[1] = aSelectionOutline;
-                }
-            }
-
-            return aRetval;
-        }
-
-        basegfx::B2DPolyPolygon OverlayObjectCell::impGetOverlayPolyPolygon() const
-        {
-            PolyPolygon aPolyPoly;
-            const sal_uInt32 nRectCount(maRectangles.size());
-
-            for(sal_uInt32 nRect(0); nRect < nRectCount; ++nRect)
-            {
-                const basegfx::B2DRange& rRange(maRectangles[nRect]);
-                const Rectangle aRectangle(
-                    FRound(rRange.getMinX()), FRound(rRange.getMinY()), 
-                    FRound(rRange.getMaxX()), FRound(rRange.getMaxY()));
-
-                if ( nRectCount == 1 || nRect+1 < nRectCount )
-                {
-                    // simply add for all except the last rect
-                    aPolyPoly.Insert( Polygon( aRectangle ) );
-                }
-                else
-                {
-                    PolyPolygon aTemp( aPolyPoly );
-                    aTemp.GetUnion( PolyPolygon( Polygon( aRectangle ) ), aPolyPoly );
-                }
-            }
-
-            return aPolyPoly.getB2DPolyPolygon();
-        }
-    } // end of namespace overlay
-} // end of namespace sdr
-
-// ---------------------------------------------------------------------------
-
 // eof
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index c99671d..76d6e02 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -2045,8 +2045,6 @@ void ScGridWindow::DataChanged( const DataChangedEvent& rDCEvt )
 
                 //	RepeatResize in case scroll bar sizes have changed
                 pView->RepeatResize();
-
-                pView->UpdateSelectionType();
                 pView->UpdateAllOverlays();
 
                 //	invalidate cell attribs in input handler, in case the
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index b8d2486..917d7ff 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -384,8 +384,7 @@ BOOL lcl_HasRowOutline( const ScViewData& rViewData )
             bInActivatePart( FALSE ),										\
             bInZoomUpdate( FALSE ),											\
             bMoveIsShift( FALSE ),											\
-            bNewStartIfMarking( FALSE ),                                    \
-            bOldSelection( FALSE )
+            bNewStartIfMarking( FALSE )
 
 
 ScTabView::ScTabView( Window* pParent, ScDocShell& rDocSh, ScTabViewShell* pViewShell ) :
diff --git a/sc/source/ui/view/tabview5.cxx b/sc/source/ui/view/tabview5.cxx
index 8aa9f78..9893ae8 100644
--- a/sc/source/ui/view/tabview5.cxx
+++ b/sc/source/ui/view/tabview5.cxx
@@ -148,16 +148,6 @@ void __EXPORT ScTabView::Init()
             //	Das gilt auch fuer ViewOptionsHasChanged()
 
     TestHintWindow();
-
-    UpdateSelectionType();
-}
-
-void ScTabView::UpdateSelectionType()
-{
-    // old selection in high contrast mode, or if transparent drawing isn't supported
-
-    bOldSelection = pFrameWin->GetSettings().GetStyleSettings().GetHighContrastMode() ||
-                    !pFrameWin->supportsOperation( OutDevSupport_TransparentRect );
 }
 
 __EXPORT ScTabView::~ScTabView()
commit 9c728d854da9f9eddee6dbc30da4bb98c880b387
Author: Vladimir Glazounov <vg at openoffice.org>
Date:   Wed Aug 26 13:37:34 2009 +0000

    CWS-TOOLING: integrate CWS swa11y32_2nd
    2009-08-13 13:04:09 +0200 mav  r274936 : #i104204# remove support for Ctrl-Tab
    2009-08-13 09:59:22 +0200 od  r274924 : #i93269# method <atk_wrapper_focus_idle_handler(..)>
    	 - emit also object:state-changed:focus, if cursor is inside <XAccessibleText> object
    2009-08-11 12:15:11 +0200 tl  r274851 : CWS-TOOLING: rebase CWS swa11y32_2nd to trunk at 274622 (milestone: DEV300:m54)
    2009-07-14 17:35:03 +0200 tl  r273982 : 2009-07-10 10:46:39 +0200 tl  r273879 : CWS-TOOLING: rebase CWS swa11y32 to trunk at 273468 (milestone: DEV300:m51)
    2009-07-01 14:00:25 +0200 mav  r273577 : #i102879# the text of the button should not change
    2009-07-01 13:16:19 +0200 od  r273574 : #159496# method <GetHelpAnchor_Impl(..)>
    	 - do not release the solar mutex
    2009-06-29 15:29:10 +0200 od  r273476 : #i95042# method <CreateXWindow(..)>
    	 - return instance <VCLXComboBox> for <Window> instance of type <MetricBox>.
    	   note: <MetricBox> is inherited from <ComboBox>
    2009-06-23 15:49:32 +0200 mav  r273283 : #i101967# fix tab-control implementation
    2009-06-22 13:56:22 +0200 od  r273229 : #i100938# method <text_wrapper_get_run_attributes(..)>
    	  - always provide start_offset and end_offset
    	  - do _not_ increment the end_offset provide by <accessibility::TextSegment> instance
    2009-06-02 12:09:03 +0200 mav  r272492 : #i101959# Let the additional dialog window add its childred to the parents tab-hierarchy
    2009-06-02 09:55:39 +0200 mav  r272484 : #i102015# allow to have indirect child windows in tab-hierarchy
    2009-06-02 09:49:42 +0200 mav  r272482 : #i102015# Let the windows containing the extension dialog controls add controls to the tab hierarchy
    2009-05-27 15:45:33 +0200 od  r272354 : #i101012# method <SvxIconChoiceCtrl_Impl::EntrySelected(..)>
    	  - emit vcl event LISTBOX_SELECT only in case that the given entry is selected.
    2009-05-27 09:54:36 +0200 od  r272333 : #i92103# map UNO-API accessible events list box entry expanded/collapsed
    	 to corresponding atk events.
    2009-05-27 09:52:15 +0200 od  r272331 : #i92103# process list box entry expanded/collapsed events
    2009-05-27 09:49:19 +0200 od  r272330 : #i92103# emit vcl event list box entry expanded/collapsed
    2009-05-26 10:42:05 +0200 od  r272283 : #i93269# correct fix: check success of <queryInterface> call
    2009-05-04 15:52:04 +0200 od  r271469 : #i92103# new vcl event ids VCLEVENT_LISTBOX_ENTRY_EXPANDED and VCLEVENT_LISTBOX_ENTRY_COLLAPSED
    2009-05-04 15:10:20 +0200 od  r271460 : #i92103# refine definition of new constants
    2009-05-04 14:36:44 +0200 od  r271454 : #i92103# new constants for indicating that a list box entry is
    	 expanded respectively collapsed.
    2009-04-30 16:09:40 +0200 od  r271421 : #i93269# method <atk_wrapper_focus_idle_handler(..)>
    	 - emit text_caret_moved event for <XAccessibleText> object,
    	   if cursor is inside the <XAccessibleText> object.
    2009-04-22 14:00:10 +0200 tl  r271105 : warning-free code
    2009-04-22 09:17:30 +0200 tl  r271073 : CWS-TOOLING: rebase CWS swa11y32 to trunk at 270723 (milestone: DEV300:m46)
    2009-04-20 12:53:03 +0200 cd  r270974 : #i83639# Check extendedhelp state to provide correct tool tip text
    2009-04-03 13:07:13 +0200 tl  r270471 : #i63983# changed accessible object names to empty strings
    2009-04-01 15:52:09 +0200 tl  r270336 : #i90991# accessible names and description for paragraphs should be empty
    2009-04-01 15:12:42 +0200 tl  r270333 : #i90991# accessible names and description for paragraphs should be empty
    2009-04-01 15:10:34 +0200 tl  r270331 : warning-free code
    2009-04-01 12:54:44 +0200 tl  r270319 : #i89176# Implementation of XAccessibleMultiLineText in EditEngine
    2009-04-01 12:52:56 +0200 tl  r270318 : #i89176# Implementation of XAccessibleMultiLineText in EditEngine
    2009-03-27 18:31:01 +0100 tbe  r270166 : #i92143# text getRangeExtents reports incorrect 'x' values for spreadsheet cells
    2009-03-13 13:43:54 +0100 tl  r269476 : #i94322# ImpEditView::ShowCursor and nPara == USHRT_MAX problem fixed
    2009-03-12 10:27:30 +0100 tl  r269366 : warning-free code; unresolved external dbg_out when compiling with debug=t
    2009-03-11 12:40:31 +0100 tl  r269312 : warning-free code Solaris x86
    2009-03-10 15:49:01 +0100 tl  r269279 : #i86443# handle GetColumnCount() == 0
    2009-03-10 10:48:32 +0100 cl  r269254 : #i91742# name cells for accessibility
    2009-03-09 17:06:33 +0100 cl  r269203 : #i91742# call init on accessible cells

diff --git a/sc/source/ui/Accessibility/AccessibleCell.cxx b/sc/source/ui/Accessibility/AccessibleCell.cxx
index 93a6882..0a1a00b 100644
--- a/sc/source/ui/Accessibility/AccessibleCell.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCell.cxx
@@ -371,7 +371,7 @@ ScDocument* ScAccessibleCell::GetDocument(ScTabViewShell* pViewShell)
 ::std::auto_ptr< SvxEditSource > ScAccessibleCell::CreateEditSource(ScTabViewShell* pViewShell, ScAddress aCell, ScSplitPos eSplitPos)
 {
     ::std::auto_ptr < ScAccessibleTextData > pAccessibleCellTextData
-        (new ScAccessibleCellTextData(pViewShell, aCell, eSplitPos));
+        ( new ScAccessibleCellTextData( pViewShell, aCell, eSplitPos, this ) );
     ::std::auto_ptr< SvxEditSource > pEditSource (new ScAccessibilityEditSource(pAccessibleCellTextData));
 
     return pEditSource;
diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx
index 3dc1f23..864168d 100644
--- a/sc/source/ui/Accessibility/AccessibleText.cxx
+++ b/sc/source/ui/Accessibility/AccessibleText.cxx
@@ -37,6 +37,7 @@
 
 #include <memory>
 #include "AccessibleText.hxx"
+#include "AccessibleCell.hxx"
 #include "tabvwsh.hxx"
 #include "editutil.hxx"
 #include "document.hxx"
@@ -54,6 +55,7 @@
 #include <svx/editobj.hxx>
 #include <svx/adjitem.hxx>
 #include <svx/svdmodel.hxx>
+#include <svx/algitem.hxx>
 
 
 // ============================================================================
@@ -753,13 +755,14 @@ void ScEditViewForwarder::SetInvalid()
 //	ScAccessibleCellTextData: shared data between sub objects of a accessible cell text object
 
 ScAccessibleCellTextData::ScAccessibleCellTextData(ScTabViewShell* pViewShell,
-                            const ScAddress& rP, ScSplitPos eSplitPos)
+        const ScAddress& rP, ScSplitPos eSplitPos, ScAccessibleCell* pAccCell)
     : ScAccessibleCellBaseTextData(GetDocShell(pViewShell), rP),
     mpViewForwarder(NULL),
     mpEditViewForwarder(NULL),
     mpViewShell(pViewShell),
     meSplitPos(eSplitPos),
-    mbViewEditEngine(sal_False)
+    mbViewEditEngine(sal_False),
+    mpAccessibleCell( pAccCell )
 {
 }
 
@@ -792,7 +795,7 @@ void ScAccessibleCellTextData::Notify( SfxBroadcaster& rBC, const SfxHint& rHint
 
 ScAccessibleTextData* ScAccessibleCellTextData::Clone() const
 {
-    return new ScAccessibleCellTextData(mpViewShell, aCellPos, meSplitPos);
+    return new ScAccessibleCellTextData( mpViewShell, aCellPos, meSplitPos, mpAccessibleCell );
 }
 
 void ScAccessibleCellTextData::GetCellText(const ScAddress& rCellPos, String& rText)
@@ -866,7 +869,8 @@ SvxTextForwarder* ScAccessibleCellTextData::GetTextForwarder()
     if (!bHasForwarder)*/
         ScCellTextData::GetTextForwarder(); // creates Forwarder and EditEngine
 
-    if (pEditEngine && mpViewShell)
+    ScDocument* pDoc = ( pDocShell ? pDocShell->GetDocument() : NULL );
+    if ( pDoc && pEditEngine && mpViewShell )
     {
         long nSizeX, nSizeY;
         mpViewShell->GetViewData()->GetMergeSizePixel(
@@ -874,9 +878,39 @@ SvxTextForwarder* ScAccessibleCellTextData::GetTextForwarder()
 
         Size aSize(nSizeX, nSizeY);
 
-        Window* pWin = mpViewShell->GetWindowByPos(meSplitPos);
-        if (pWin)
-            aSize = pWin->PixelToLogic(aSize, pEditEngine->GetRefMapMode());
+        // #i92143# text getRangeExtents reports incorrect 'x' values for spreadsheet cells
+        long nIndent = 0;
+        const SvxHorJustifyItem* pHorJustifyItem = static_cast< const SvxHorJustifyItem* >(
+            pDoc->GetAttr( aCellPos.Col(), aCellPos.Row(), aCellPos.Tab(), ATTR_HOR_JUSTIFY ) );
+        SvxCellHorJustify eHorJust = ( pHorJustifyItem ? static_cast< SvxCellHorJustify >( pHorJustifyItem->GetValue() ) : SVX_HOR_JUSTIFY_STANDARD );
+        if ( eHorJust == SVX_HOR_JUSTIFY_LEFT )
+        {
+            const SfxUInt16Item* pIndentItem = static_cast< const SfxUInt16Item* >(
+                pDoc->GetAttr( aCellPos.Col(), aCellPos.Row(), aCellPos.Tab(), ATTR_INDENT ) );
+            if ( pIndentItem )
+            {
+                nIndent = static_cast< long >( pIndentItem->GetValue() );
+            }
+        }
+
+        const SvxMarginItem* pMarginItem = static_cast< const SvxMarginItem* >(
+            pDoc->GetAttr( aCellPos.Col(), aCellPos.Row(), aCellPos.Tab(), ATTR_MARGIN ) );
+        ScViewData* pViewData = mpViewShell->GetViewData();
+        double nPPTX = ( pViewData ? pViewData->GetPPTX() : 0 );
+        double nPPTY = ( pViewData ? pViewData->GetPPTY() : 0 );
+        long nLeftM = ( pMarginItem ? static_cast< long >( ( pMarginItem->GetLeftMargin() + nIndent ) * nPPTX ) : 0 );
+        long nTopM = ( pMarginItem ? static_cast< long >( pMarginItem->GetTopMargin() * nPPTY ) : 0 );
+        long nRightM = ( pMarginItem ? static_cast< long >( pMarginItem->GetRightMargin() * nPPTX ) : 0 );
+        long nBottomM = ( pMarginItem ? static_cast< long >( pMarginItem->GetBottomMargin() * nPPTY ) : 0 );
+        long nWidth = aSize.getWidth() - nLeftM - nRightM;
+        aSize.setWidth( nWidth );
+        aSize.setHeight( aSize.getHeight() - nTopM - nBottomM );
+
+        Window* pWin = mpViewShell->GetWindowByPos( meSplitPos );
+        if ( pWin )
+        {
+            aSize = pWin->PixelToLogic( aSize, pEditEngine->GetRefMapMode() );
+        }
 
         /*  #i19430# Gnopernicus reads text partly if it sticks out of the cell
             boundaries. This leads to wrong results in cases where the cell text
@@ -888,20 +922,94 @@ SvxTextForwarder* ScAccessibleCellTextData::GetTextForwarder()
             return the size of the complete text then, which is used to expand
             the cell bounding box in ScAccessibleCell::GetBoundingBox()
             (see sc/source/ui/Accessibility/AccessibleCell.cxx). */
-        if (pDocShell && pDocShell->GetDocument())
+        const SfxInt32Item* pItem = static_cast< const SfxInt32Item* >(
+            pDoc->GetAttr( aCellPos.Col(), aCellPos.Row(), aCellPos.Tab(), ATTR_ROTATE_VALUE ) );
+        if( pItem && (pItem->GetValue() != 0) )
+        {
+            pEditEngine->SetPaperSize( Size( LONG_MAX, aSize.getHeight() ) );
+            long nTxtWidth = static_cast< long >( pEditEngine->CalcTextWidth() );
+            aSize.setWidth( std::max( aSize.getWidth(), nTxtWidth + 2 ) );
+        }
+        else
         {
-            const SfxInt32Item* pItem = static_cast< const SfxInt32Item* >(
-                pDocShell->GetDocument()->GetAttr( aCellPos.Col(), aCellPos.Row(), aCellPos.Tab(), ATTR_ROTATE_VALUE ) );
-            if( pItem && (pItem->GetValue() != 0) )
+            // #i92143# text getRangeExtents reports incorrect 'x' values for spreadsheet cells
+            const SfxBoolItem* pLineBreakItem = static_cast< const SfxBoolItem* >(
+                pDoc->GetAttr( aCellPos.Col(), aCellPos.Row(), aCellPos.Tab(), ATTR_LINEBREAK ) );
+            bool bLineBreak = ( pLineBreakItem && pLineBreakItem->GetValue() );
+            if ( !bLineBreak )
             {
-                pEditEngine->SetPaperSize( Size( LONG_MAX, aSize.getHeight() ) );
-                long nTextWidth = static_cast< long >( pEditEngine->CalcTextWidth() );
-                aSize.setWidth( std::max( aSize.getWidth(), nTextWidth + 2 ) );
+                long nTxtWidth = static_cast< long >( pEditEngine->CalcTextWidth() );
+                aSize.setWidth( ::std::max( aSize.getWidth(), nTxtWidth ) );
             }
         }
 
-        // #i70916# Text in spread sheet cells return the wrong extents
-        pEditEngine->SetPaperSize( Size( LONG_MAX, aSize.getHeight() ) );
+        pEditEngine->SetPaperSize( aSize );
+
+        // #i92143# text getRangeExtents reports incorrect 'x' values for spreadsheet cells
+        if ( eHorJust == SVX_HOR_JUSTIFY_STANDARD && pDoc->HasValueData( aCellPos.Col(), aCellPos.Row(), aCellPos.Tab() ) )
+        {
+            pEditEngine->SetDefaultItem( SvxAdjustItem( SVX_ADJUST_RIGHT, EE_PARA_JUST ) );
+        }
+
+        Size aTextSize;
+        if ( pWin )
+        {
+            aTextSize = pWin->LogicToPixel( Size( pEditEngine->CalcTextWidth(), pEditEngine->GetTextHeight() ), pEditEngine->GetRefMapMode() );
+        }
+        long nTextWidth = aTextSize.Width();
+        long nTextHeight = aTextSize.Height();
+
+        long nOffsetX = nLeftM;
+        long nDiffX = nTextWidth - nWidth;
+        if ( nDiffX > 0 )
+        {
+            switch ( eHorJust )
+            {
+                case SVX_HOR_JUSTIFY_RIGHT:
+                    {
+                        nOffsetX -= nDiffX;
+                    }
+                    break;
+                case SVX_HOR_JUSTIFY_CENTER:
+                    {
+                        nOffsetX -= nDiffX / 2;
+                    }
+                    break;
+                default:
+                    {
+                    }
+                    break;
+            }
+        }
+
+        long nOffsetY = 0;
+        const SvxVerJustifyItem* pVerJustifyItem = static_cast< const SvxVerJustifyItem* >(
+            pDoc->GetAttr( aCellPos.Col(), aCellPos.Row(), aCellPos.Tab(), ATTR_VER_JUSTIFY ) );
+        SvxCellVerJustify eVerJust = ( pVerJustifyItem ? static_cast< SvxCellVerJustify >( pVerJustifyItem->GetValue() ) : SVX_VER_JUSTIFY_STANDARD );
+        switch ( eVerJust )
+        {
+            case SVX_VER_JUSTIFY_STANDARD:
+            case SVX_VER_JUSTIFY_BOTTOM:
+                {
+                    nOffsetY = nSizeY - nBottomM - nTextHeight;
+                }
+                break;
+            case SVX_VER_JUSTIFY_CENTER:
+                {
+                    nOffsetY = ( nSizeY - nTopM - nBottomM - nTextHeight ) / 2 + nTopM;
+                }
+                break;
+            default:
+                {
+                    nOffsetY = nTopM;
+                }
+                break;
+        }
+
+        if ( mpAccessibleCell )
+        {
+            mpAccessibleCell->SetOffset( Point( nOffsetX, nOffsetY ) );
+        }
 
         pEditEngine->SetNotifyHdl( LINK(this, ScAccessibleCellTextData, NotifyHdl) );
     }
diff --git a/sc/source/ui/inc/AccessibleText.hxx b/sc/source/ui/inc/AccessibleText.hxx
index 1b44230..c500fd7 100644
--- a/sc/source/ui/inc/AccessibleText.hxx
+++ b/sc/source/ui/inc/AccessibleText.hxx
@@ -46,6 +46,7 @@ class ScEditViewForwarder;
 class ScPreviewShell;
 class EditTextObject;
 class ScCsvViewForwarder;
+class ScAccessibleCell;
 
 
 // ============================================================================
@@ -103,7 +104,7 @@ class ScAccessibleCellTextData : public ScAccessibleCellBaseTextData
 {
 public:
                         ScAccessibleCellTextData(ScTabViewShell* pViewShell,
-                            const ScAddress& rP, ScSplitPos eSplitPos);
+                            const ScAddress& rP, ScSplitPos eSplitPos, ScAccessibleCell* pAccCell);
     virtual				~ScAccessibleCellTextData();
 
     virtual	ScAccessibleTextData* Clone() const;
@@ -123,6 +124,7 @@ private:
     ScTabViewShell*	mpViewShell;
     ScSplitPos meSplitPos;
     sal_Bool mbViewEditEngine;
+    ScAccessibleCell* mpAccessibleCell;
 
     // prevent the using of this method of the base class
     ScSharedCellEditSource*	GetOriginalSource() { return NULL; }
commit 23f6a9d5f7ca9af7bf01492e962daa2e2381fdda
Author: Vladimir Glazounov <vg at openoffice.org>
Date:   Wed Aug 26 12:47:18 2009 +0000

    CWS-TOOLING: integrate CWS chart40
    2009-08-05 10:28:53 +0200 iha  r274640 : CWS-TOOLING: rebase CWS chart40 to trunk at 274622 (milestone: DEV300:m54)
    2009-07-31 18:03:11 +0200 iha  r274546 : #i91420# number of lines on chart type dialog is incorrect
    2009-07-23 15:51:13 +0200 iha  r274275 : correct detection of old chart files b6700820
    2009-07-23 15:10:30 +0200 iha  r274273 : #i103287# some lines vanish on import of some old files (opacity-problem)
    2009-07-23 13:42:10 +0200 iha  r274268 : #i103588# Chart in report cause crash
    2009-07-23 10:57:14 +0200 iha  r274264 : #i95503# Enter key does not work in source ranges dialog
    2009-07-22 10:25:02 +0200 iha  r274221 : #i103713# ambiguous && ||
    2009-07-20 12:59:02 +0200 iha  r274120 : #i103468# remove warning

diff --git a/chart2/source/controller/dialogs/dlg_DataSource.cxx b/chart2/source/controller/dialogs/dlg_DataSource.cxx
index fe2165c..dc18673 100644
--- a/chart2/source/controller/dialogs/dlg_DataSource.cxx
+++ b/chart2/source/controller/dialogs/dlg_DataSource.cxx
@@ -202,6 +202,19 @@ DataSourceDialog::~DataSourceDialog()
     delete m_pTabControl;
 }
 
+short DataSourceDialog::Execute()
+{
+    short nResult = TabDialog::Execute();
+    if( nResult == RET_OK )
+    {
+        if( m_pRangeChooserTabePage )
+            m_pRangeChooserTabePage->commitPage();
+        if( m_pDataSourceTabPage )
+            m_pDataSourceTabPage->commitPage();
+    }
+    return nResult;
+}
+
 void DataSourceDialog::setInvalidPage( TabPage * pTabPage )
 {
     if( pTabPage == m_pRangeChooserTabePage )
diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx
index 0acd696..4af112e 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.cxx
+++ b/chart2/source/controller/dialogs/tp_ChartType.cxx
@@ -995,7 +995,8 @@ IMPL_LINK( ChartTypeTabPage, SelectMainTypeHdl, void *, EMPTYARG )
 
         aParameter.bSortByXValues = lcl_getSortByXValues( m_xChartModel );
         this->fillAllControls( aParameter );
-        m_pCurrentMainType->fillExtraControls(aParameter,m_xChartModel);
+        uno::Reference< beans::XPropertySet > xTemplateProps( this->getCurrentTemplate(), uno::UNO_QUERY );
+        m_pCurrentMainType->fillExtraControls(aParameter,m_xChartModel,xTemplateProps);
     }
     return 0;
 }
diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx b/chart2/source/controller/dialogs/tp_DataSource.cxx
index 7466acd..b1703e4 100644
--- a/chart2/source/controller/dialogs/tp_DataSource.cxx
+++ b/chart2/source/controller/dialogs/tp_DataSource.cxx
@@ -377,6 +377,29 @@ void DataSourceTabPage::initializePage()
 {
 }
 
+void DataSourceTabPage::DeactivatePage()
+{
+    commitPage();
+    svt::OWizardPage::DeactivatePage();
+}
+
+void DataSourceTabPage::commitPage()
+{
+    commitPage(eFinish);
+}
+
+sal_Bool DataSourceTabPage::commitPage( CommitPageReason /*eReason*/ )
+{
+    //ranges may have been edited in the meanwhile (dirty is true in that case here)
+    if( isValid() )
+    {
+        updateModelFromControl( 0 /*update all*/ );
+        return sal_True;//return false if this page should not be left
+    }
+    else
+        return sal_False;
+}
+
 bool DataSourceTabPage::isRangeFieldContentValid( Edit & rEdit )
 {
     OUString aRange( rEdit.GetText());
diff --git a/chart2/source/controller/dialogs/tp_DataSource.hxx b/chart2/source/controller/dialogs/tp_DataSource.hxx
index 5e90707..1fe223a 100644
--- a/chart2/source/controller/dialogs/tp_DataSource.hxx
+++ b/chart2/source/controller/dialogs/tp_DataSource.hxx
@@ -87,8 +87,15 @@ public:
         bool bHideDescription = false );
     virtual ~DataSourceTabPage();
 
+    void commitPage();
+
+protected:
     // OWizardPage
     virtual void ActivatePage();
+    virtual sal_Bool commitPage( CommitPageReason eReason );
+
+    //TabPage
+    virtual void DeactivatePage();
 
     virtual void		initializePage();
 
diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.cxx b/chart2/source/controller/dialogs/tp_RangeChooser.cxx
index 66329e6..3061149 100644
--- a/chart2/source/controller/dialogs/tp_RangeChooser.cxx
+++ b/chart2/source/controller/dialogs/tp_RangeChooser.cxx
@@ -216,6 +216,29 @@ void RangeChooserTabPage::initControlsFromModel()
     m_nChangingControlCalls--;
 }
 
+void RangeChooserTabPage::DeactivatePage()
+{
+    commitPage();
+    svt::OWizardPage::DeactivatePage();
+}
+
+void RangeChooserTabPage::commitPage()
+{
+    commitPage(eFinish);
+}
+
+sal_Bool RangeChooserTabPage::commitPage( CommitPageReason /*eReason*/ )
+{
+    //ranges may have been edited in the meanwhile (dirty is true in that case here)
+    if( isValid() )
+    {
+        changeDialogModelAccordingToControls();
+        return sal_True;//return false if this page should not be left
+    }
+    else
+        return sal_False;
+}
+
 void RangeChooserTabPage::changeDialogModelAccordingToControls()
 {
     if(m_nChangingControlCalls>0)
diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.hxx b/chart2/source/controller/dialogs/tp_RangeChooser.hxx
index 1c31628..4ede2c6 100644
--- a/chart2/source/controller/dialogs/tp_RangeChooser.hxx
+++ b/chart2/source/controller/dialogs/tp_RangeChooser.hxx
@@ -70,10 +70,16 @@ virtual ~RangeChooserTabPage();
     virtual void listeningFinished( const ::rtl::OUString & rNewRange );
     virtual void disposingRangeSelection();
 
+    void commitPage();
+
 protected: //methods
 
     //OWizardPage
     virtual void ActivatePage();
+    virtual sal_Bool commitPage( CommitPageReason eReason );
+
+    //TabPage
+    virtual void DeactivatePage();
 
     void initControlsFromModel();
     void changeDialogModelAccordingToControls();
diff --git a/chart2/source/controller/inc/dlg_DataSource.hxx b/chart2/source/controller/inc/dlg_DataSource.hxx
index 393588e..a0492f2 100644
--- a/chart2/source/controller/inc/dlg_DataSource.hxx
+++ b/chart2/source/controller/inc/dlg_DataSource.hxx
@@ -68,6 +68,9 @@ public:
             ::com::sun::star::uno::XComponentContext > & xContext );
     virtual ~DataSourceDialog();
 
+    // from Dialog (base of TabDialog)
+    virtual short Execute();
+
     // TabPageNotifiable
     virtual void setInvalidPage( TabPage * pTabPage );
     virtual void setValidPage( TabPage * pTabPage );
diff --git a/chart2/source/view/charttypes/BubbleChart.cxx b/chart2/source/view/charttypes/BubbleChart.cxx
index 730828a..0189689 100644
--- a/chart2/source/view/charttypes/BubbleChart.cxx
+++ b/chart2/source/view/charttypes/BubbleChart.cxx
@@ -111,7 +111,7 @@ void BubbleChart::calculateMaximumLogicBubbleSize()
 
                     double fSize = pSeries->getBubble_Size( nIndex );
                     if( m_bShowNegativeValues )
-                        fSize = abs(fSize);
+                        fSize = fabs(fSize);
                     if( fSize > fMaxSize )
                         fMaxSize = fSize;
                 }
@@ -146,7 +146,7 @@ drawing::Direction3D BubbleChart::transformToScreenBubbleSize( double fLogicSize
         return aRet;
 
     if( m_bShowNegativeValues )
-        fLogicSize = abs(fLogicSize);
+        fLogicSize = fabs(fLogicSize);
 
     double fMaxSize = m_fMaxLogicBubbleSize;
 
diff --git a/chart2/source/view/main/VDataSeries.cxx b/chart2/source/view/main/VDataSeries.cxx
index 0628f09..8f7f0a5 100644
--- a/chart2/source/view/main/VDataSeries.cxx
+++ b/chart2/source/view/main/VDataSeries.cxx
@@ -151,7 +151,7 @@ void lcl_clearIfNoValuesButTextIsContained( VDataSequence& rData, const uno::Ref
 void lcl_maybeReplaceNanWithZero( double& rfValue, sal_Int32 nMissingValueTreatment )
 {
     if( nMissingValueTreatment == ::com::sun::star::chart::MissingValueTreatment::USE_ZERO
-        && ::rtl::math::isNan(rfValue) || ::rtl::math::isInf(rfValue) )
+        && (::rtl::math::isNan(rfValue) || ::rtl::math::isInf(rfValue)) )
             rfValue = 0.0;
 }
 
commit d888c1b0809eb3857b0cb7b9574bf4f455482be5
Author: Release Engineers <releng at openoffice.org>
Date:   Wed Aug 26 09:55:20 2009 +0000

    CWS-TOOLING: integrate CWS fillednetchart
    2009-07-22 17:48:07 +0200 oc  r274255 : #i103584# new testcase for fillednetchart added
    2009-07-22 17:42:41 +0200 oc  r274254 : #i103584# Case 8 set to maximum 4 because of new fillednetchart
    2009-07-13 17:29:40 +0200 iha  r273946 : CWS-TOOLING: rebase CWS fillednetchart to trunk at 273858 (milestone: DEV300:m52)
    2009-07-03 15:04:36 +0200 dr  r273704 : #i102667# import/export of filled radar charts
    2009-07-03 09:50:28 +0200 dr  r273680 : #i102677# import filled radar charts from MSOOXML
    2009-06-11 18:21:05 +0200 iha  r272896 : #i64752# filled net chart
    2009-06-11 17:30:46 +0200 iha  r272892 : #i64752# filled net chart
    2009-06-11 17:07:11 +0200 iha  r272889 : #i64752# filled net chart
    2009-06-11 16:25:01 +0200 iha  r272883 : #i64752# filled net chart
    2009-06-11 16:15:10 +0200 iha  r272878 : #i64752# filled net chart

diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
index 2b0fa4c..f665c93 100644
--- a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
@@ -95,6 +95,7 @@ enum eServiceType
     SERVICE_NAME_DONUT_DIAGRAM,
     SERVICE_NAME_LINE_DIAGRAM,
     SERVICE_NAME_NET_DIAGRAM,
+    SERVICE_NAME_FILLED_NET_DIAGRAM,
     SERVICE_NAME_PIE_DIAGRAM,
     SERVICE_NAME_STOCK_DIAGRAM,
     SERVICE_NAME_XY_DIAGRAM,
@@ -124,6 +125,7 @@ tServiceNameMap & lcl_getStaticServiceNameMap()
         ( C2U( "com.sun.star.chart.DonutDiagram" ),                   SERVICE_NAME_DONUT_DIAGRAM )
         ( C2U( "com.sun.star.chart.LineDiagram" ),                    SERVICE_NAME_LINE_DIAGRAM )
         ( C2U( "com.sun.star.chart.NetDiagram" ),                     SERVICE_NAME_NET_DIAGRAM )
+        ( C2U( "com.sun.star.chart.FilledNetDiagram" ),               SERVICE_NAME_FILLED_NET_DIAGRAM )
         ( C2U( "com.sun.star.chart.PieDiagram" ),                     SERVICE_NAME_PIE_DIAGRAM )
         ( C2U( "com.sun.star.chart.StockDiagram" ),                   SERVICE_NAME_STOCK_DIAGRAM )
         ( C2U( "com.sun.star.chart.XYDiagram" ),                      SERVICE_NAME_XY_DIAGRAM )
@@ -1341,6 +1343,14 @@ uno::Reference< uno::XInterface > SAL_CALL ChartDocumentWrapper::createInstance(
                     bCreateDiagram = true;
                 }
                 break;
+            case SERVICE_NAME_FILLED_NET_DIAGRAM:
+                if( xManagerFact.is())
+                {
+                    xTemplate.set(
+                        xManagerFact->createInstance(
+                            C2U( "com.sun.star.chart2.template.FilledNet" )), uno::UNO_QUERY );
+                    bCreateDiagram = true;
+                }
             case SERVICE_NAME_PIE_DIAGRAM:
                 if( xManagerFact.is())
                 {
diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
index 6a4420d..5faac56 100644
--- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
@@ -538,6 +538,10 @@ OUString lcl_getDiagramType( const OUString & rTemplateServiceName )
         if( aName.indexOf( C2U("Scatter") ) != -1 )
             return C2U( "com.sun.star.chart.XYDiagram" );
 
+        // "FilledNet" "StackedFilledNet" "PercentStackedFilledNet"
+        if( aName.indexOf( C2U("FilledNet") ) != -1 )
+            return C2U( "com.sun.star.chart.FilledNetDiagram" );
+
         // "Net" "NetSymbol" "NetLine" "StackedNet" "StackedNetSymbol"
         // "StackedNetLine" "PercentStackedNet" "PercentStackedNetSymbol"
         // "PercentStackedNetLine"
@@ -591,6 +595,9 @@ const tMakeStringStringMap& lcl_getChartTypeNameMap()
         ( ::rtl::OUString::createFromAscii( "com.sun.star.chart2.ScatterChartType" )
         , ::rtl::OUString::createFromAscii( "com.sun.star.chart.XYDiagram" ) )
 
+        ( ::rtl::OUString::createFromAscii( "com.sun.star.chart2.FilledNetChartType" )
+        , ::rtl::OUString::createFromAscii( "com.sun.star.chart.FilledNetDiagram" ) )
+
         ( ::rtl::OUString::createFromAscii( "com.sun.star.chart2.NetChartType" )
         , ::rtl::OUString::createFromAscii( "com.sun.star.chart.NetDiagram" ) )
 
diff --git a/chart2/source/controller/dialogs/Bitmaps.hrc b/chart2/source/controller/dialogs/Bitmaps.hrc
index 4d23b40..8f98ea8 100644
--- a/chart2/source/controller/dialogs/Bitmaps.hrc
+++ b/chart2/source/controller/dialogs/Bitmaps.hrc
@@ -173,8 +173,8 @@
 #define BMP_NET_SYMB_STACK (RID_APP_START + 77)
 #define BMP_NET_LINESYMB (RID_APP_START + 78)
 #define BMP_NET_LINESYMB_STACK (RID_APP_START + 79)
-#define BMP_NET_FILLED (RID_APP_START + 80)
-#define BMP_NET_FILLED_STACKED (RID_APP_START + 81)
+#define BMP_NET_FILL (RID_APP_START + 80)
+#define BMP_NET_FILL_STACK (RID_APP_START + 81)
 
 //----------------------
 // Stock Chart Subtypes
diff --git a/chart2/source/controller/dialogs/Bitmaps.src b/chart2/source/controller/dialogs/Bitmaps.src
index cadcd36..60fd8d2 100644
--- a/chart2/source/controller/dialogs/Bitmaps.src
+++ b/chart2/source/controller/dialogs/Bitmaps.src
@@ -359,13 +359,13 @@ Bitmap BMP_NET_LINESYMB_STACK
 {
     File = "netlinepointstack_52x60.png" ;
 };
-Bitmap BMP_NET_FILLED
+Bitmap BMP_NET_FILL
 {
-    File = "net_52x60.png" ;
+    File = "netfill_52x60.png" ;
 };
-Bitmap BMP_NET_FILLED_STACKED
+Bitmap BMP_NET_FILL_STACK
 {
-    File = "netstack_52x60.png" ;
+    File = "netstackfill_52x60.png" ;
 };
 //---------------------
 Bitmap BMP_PYRAMIDQ_3D_1
diff --git a/chart2/source/controller/dialogs/Bitmaps_HC.hrc b/chart2/source/controller/dialogs/Bitmaps_HC.hrc
index cdf702f..80497e4 100644
--- a/chart2/source/controller/dialogs/Bitmaps_HC.hrc
+++ b/chart2/source/controller/dialogs/Bitmaps_HC.hrc
@@ -173,8 +173,8 @@
 #define BMP_NET_SYMB_STACK_HC (RID_SCH_START + 77)
 #define BMP_NET_LINESYMB_HC (RID_SCH_START + 78)
 #define BMP_NET_LINESYMB_STACK_HC (RID_SCH_START + 79)
-#define BMP_NET_FILLED_HC (RID_SCH_START + 80)
-#define BMP_NET_FILLED_STACKED_HC (RID_SCH_START + 81)
+#define BMP_NET_FILL_HC (RID_SCH_START + 80)
+#define BMP_NET_FILL_STACK_HC (RID_SCH_START + 81)
 
 //----------------------
 // Stock Chart Subtypes
diff --git a/chart2/source/controller/dialogs/Bitmaps_HC.src b/chart2/source/controller/dialogs/Bitmaps_HC.src
index 634b9b1..6ece68c 100644
--- a/chart2/source/controller/dialogs/Bitmaps_HC.src
+++ b/chart2/source/controller/dialogs/Bitmaps_HC.src
@@ -359,13 +359,13 @@ Bitmap BMP_NET_LINESYMB_STACK_HC
 {
     File = "netlinepointstack_52x60_h.png" ;
 };
-Bitmap BMP_NET_FILLED_HC
+Bitmap BMP_NET_FILL_HC
 {
-    File = "net_52x60_h.png" ;
+    File = "netfill_52x60_h.png" ;
 };
-Bitmap BMP_NET_FILLED_STACKED_HC
+Bitmap BMP_NET_FILL_STACK_HC
 {
-    File = "netstack_52x60_h.png" ;
+    File = "netstackfill_52x60_h.png" ;
 };
 //---------------------
 Bitmap BMP_PYRAMIDQ_3D_1_HC
diff --git a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
index cf3ddf7..6276078 100644
--- a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
+++ b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
@@ -1000,6 +1000,10 @@ const tTemplateServiceChartTypeParameterMap& NetChartDialogController::getTempla
     ( C2U( "com.sun.star.chart2.template.NetLine" ),                ChartTypeParameter(3,false,false,GlobalStackMode_NONE,false,true) )
     ( C2U( "com.sun.star.chart2.template.StackedNetLine" ),         ChartTypeParameter(3,false,false,GlobalStackMode_STACK_Y,false,true) )
     ( C2U( "com.sun.star.chart2.template.PercentStackedNetLine" ),  ChartTypeParameter(3,false,false,GlobalStackMode_STACK_Y_PERCENT,false,true) )
+
+    ( C2U( "com.sun.star.chart2.template.FilledNet" ),            ChartTypeParameter(4,false,false,GlobalStackMode_NONE,false,false) )
+    ( C2U( "com.sun.star.chart2.template.StackedFilledNet" ),     ChartTypeParameter(4,false,false,GlobalStackMode_STACK_Y,false,false) )
+    ( C2U( "com.sun.star.chart2.template.PercentStackedFilledNet" ),ChartTypeParameter(4,false,false,GlobalStackMode_STACK_Y_PERCENT,false,false) )
     ;
     return m_aTemplateMap;
 }
@@ -1012,17 +1016,20 @@ void NetChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, bool bIs
         rSubTypeList.InsertItem( 1, SELECT_BITMAP( BMP_NET_SYMB ) );
         rSubTypeList.InsertItem( 2, SELECT_BITMAP( BMP_NET_LINESYMB ) );
         rSubTypeList.InsertItem( 3, SELECT_BITMAP( BMP_NET ) );
+        rSubTypeList.InsertItem( 4, SELECT_BITMAP( BMP_NET_FILL ) );
     }
     else
     {
         rSubTypeList.InsertItem( 1, SELECT_BITMAP( BMP_NET_SYMB_STACK ) );
         rSubTypeList.InsertItem( 2, SELECT_BITMAP( BMP_NET_LINESYMB_STACK ) );
         rSubTypeList.InsertItem( 3, SELECT_BITMAP( BMP_NET_STACK ) );
+        rSubTypeList.InsertItem( 4, SELECT_BITMAP( BMP_NET_FILL_STACK ) );
     }
 
     rSubTypeList.SetItemText( 1, String( SchResId( STR_POINTS_ONLY )) );
     rSubTypeList.SetItemText( 2, String( SchResId( STR_POINTS_AND_LINES )) );
     rSubTypeList.SetItemText( 3, String( SchResId( STR_LINES_ONLY )) );
+    rSubTypeList.SetItemText( 4, String( SchResId( STR_FILLED )) );
 }
 void NetChartDialogController::adjustParameterToSubType( ChartTypeParameter& rParameter )
 {
@@ -1040,6 +1047,10 @@ void NetChartDialogController::adjustParameterToSubType( ChartTypeParameter& rPa
             rParameter.bSymbols = false;
             rParameter.bLines = true;
             break;
+        case 4:
+            rParameter.bSymbols = false;
+            rParameter.bLines = false;
+            break;
         default:
             rParameter.bSymbols = true;
             rParameter.bLines = false;
diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx
index f2746ac..6a3fa6c 100644
--- a/chart2/source/controller/dialogs/DataBrowser.cxx
+++ b/chart2/source/controller/dialogs/DataBrowser.cxx
@@ -413,7 +413,8 @@ Image SeriesHeader::GetChartTypeImage(
     {
         aResult = SELECT_IMAGE( IMG_TYPE_PIE, bHC );
     }
-    else if( aChartTypeName.equals( CHART2_SERVICE_NAME_CHARTTYPE_NET ))
+    else if( aChartTypeName.equals( CHART2_SERVICE_NAME_CHARTTYPE_NET )
+          || aChartTypeName.equals( CHART2_SERVICE_NAME_CHARTTYPE_FILLED_NET ) )
     {
         aResult = SELECT_IMAGE( IMG_TYPE_NET, bHC );
     }
diff --git a/chart2/source/controller/dialogs/Strings_ChartTypes.src b/chart2/source/controller/dialogs/Strings_ChartTypes.src
index d5bbf1e..3ace2b9 100644
--- a/chart2/source/controller/dialogs/Strings_ChartTypes.src
+++ b/chart2/source/controller/dialogs/Strings_ChartTypes.src
@@ -139,6 +139,10 @@ String STR_DEEP
 {
     Text [ en-US ] = "Deep" ;
 };
+String STR_FILLED
+{
+    Text [ en-US ] = "Filled" ;
+};
 //-----------------------------------------------------------------------------
 String STR_TYPE_BUBBLE
 {
diff --git a/chart2/source/inc/ChartTypeHelper.hxx b/chart2/source/inc/ChartTypeHelper.hxx
index fb6beef..4aeba15 100644
--- a/chart2/source/inc/ChartTypeHelper.hxx
+++ b/chart2/source/inc/ChartTypeHelper.hxx
@@ -83,6 +83,8 @@ public:
     static sal_Int32 getNumberOfDisplayedSeries( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType, sal_Int32 nNumberOfSeries );
     SAL_DLLPRIVATE static bool noBordersForSimpleScheme( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType );
 
+    static bool isSeriesInFrontOfAxisLine( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType );
+
     static sal_Int32 //one of ::com::sun::star::chart2::AxisType
                     getAxisType( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType
                                 , sal_Int32 nDimensionIndex );
diff --git a/chart2/source/inc/CommonConverters.hxx b/chart2/source/inc/CommonConverters.hxx
index fbc561e..0d55825 100644
--- a/chart2/source/inc/CommonConverters.hxx
+++ b/chart2/source/inc/CommonConverters.hxx
@@ -121,6 +121,10 @@ OOO_DLLPUBLIC_CHARTTOOLS ::com::sun::star::drawing::Position3D getPointFromPoly(
                 , sal_Int32 nPointIndex, sal_Int32 nPolyIndex=0 );
 
 //-----------------------------------------------------------------------------
+OOO_DLLPUBLIC_CHARTTOOLS
+void addPolygon( com::sun::star::drawing::PolyPolygonShape3D& rRet
+                , const com::sun::star::drawing::PolyPolygonShape3D& rAdd );
+//-----------------------------------------------------------------------------
 /** PolyPolygonShape3D + PolyPolygonShape3D -> PolyPolygonShape3D
 */
 OOO_DLLPUBLIC_CHARTTOOLS
diff --git a/chart2/source/inc/Strings.hrc b/chart2/source/inc/Strings.hrc
index 37c4b17..29b5af9 100644
--- a/chart2/source/inc/Strings.hrc
+++ b/chart2/source/inc/Strings.hrc
@@ -33,7 +33,7 @@
 // this includes no link dependency
 #include <svtools/solar.hrc>
 
-//next free is 285
+//next free is 286
 //single free is: 134
 
 //#define RID_APP_START 30000
@@ -100,6 +100,7 @@
 #define STR_STACKED 						(RID_APP_START + 11)
 #define STR_PERCENT 						(RID_APP_START + 12)
 #define STR_DEEP                            (RID_APP_START + 13)
+#define STR_FILLED                          (RID_APP_START + 285)
 
 #define STR_DONUT   						(RID_APP_START + 8)
 #define STR_TYPE_PIE                        (RID_APP_START + 187)
diff --git a/chart2/source/inc/servicenames_charttypes.hxx b/chart2/source/inc/servicenames_charttypes.hxx
index bfe42de..4e5089b 100644
--- a/chart2/source/inc/servicenames_charttypes.hxx
+++ b/chart2/source/inc/servicenames_charttypes.hxx
@@ -42,6 +42,7 @@ namespace chart
 #define CHART2_SERVICE_NAME_CHARTTYPE_SCATTER ::rtl::OUString::createFromAscii("com.sun.star.chart2.ScatterChartType")
 #define CHART2_SERVICE_NAME_CHARTTYPE_PIE ::rtl::OUString::createFromAscii("com.sun.star.chart2.PieChartType")
 #define CHART2_SERVICE_NAME_CHARTTYPE_NET ::rtl::OUString::createFromAscii("com.sun.star.chart2.NetChartType")
+#define CHART2_SERVICE_NAME_CHARTTYPE_FILLED_NET ::rtl::OUString::createFromAscii("com.sun.star.chart2.FilledNetChartType")
 #define CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK ::rtl::OUString::createFromAscii("com.sun.star.chart2.CandleStickChartType")
 #define CHART2_SERVICE_NAME_CHARTTYPE_BUBBLE ::rtl::OUString::createFromAscii("com.sun.star.chart2.BubbleChartType")
 
diff --git a/chart2/source/model/template/ChartTypeManager.cxx b/chart2/source/model/template/ChartTypeManager.cxx
index 4190e51..5cfc124 100644
--- a/chart2/source/model/template/ChartTypeManager.cxx
+++ b/chart2/source/model/template/ChartTypeManager.cxx
@@ -128,6 +128,9 @@ enum TemplateId
     TEMPLATE_PERCENTSTACKEDNET,
     TEMPLATE_PERCENTSTACKEDNETSYMBOL,
     TEMPLATE_PERCENTSTACKEDNETLINE,
+    TEMPLATE_FILLEDNET,
+    TEMPLATE_STACKEDFILLEDNET,
+    TEMPLATE_PERCENTSTACKEDFILLEDNET,
     TEMPLATE_STOCKLOWHIGHCLOSE,
     TEMPLATE_STOCKOPENLOWHIGHCLOSE,
     TEMPLATE_STOCKVOLUMELOWHIGHCLOSE,
@@ -200,6 +203,9 @@ const tTemplateMapType & lcl_DefaultChartTypeMap()
         ( C2U( "com.sun.star.chart2.template.PercentStackedNet" ),              TEMPLATE_PERCENTSTACKEDNET )
         ( C2U( "com.sun.star.chart2.template.PercentStackedNetSymbol" ),        TEMPLATE_PERCENTSTACKEDNETSYMBOL )
         ( C2U( "com.sun.star.chart2.template.PercentStackedNetLine" ),          TEMPLATE_PERCENTSTACKEDNETLINE )
+        ( C2U( "com.sun.star.chart2.template.FilledNet" ),                      TEMPLATE_FILLEDNET )
+        ( C2U( "com.sun.star.chart2.template.StackedFilledNet" ),               TEMPLATE_STACKEDFILLEDNET )
+        ( C2U( "com.sun.star.chart2.template.PercentStackedFilledNet" ),        TEMPLATE_PERCENTSTACKEDFILLEDNET )
         ( C2U( "com.sun.star.chart2.template.StockLowHighClose" ),              TEMPLATE_STOCKLOWHIGHCLOSE )
         ( C2U( "com.sun.star.chart2.template.StockOpenLowHighClose" ),          TEMPLATE_STOCKOPENLOWHIGHCLOSE )
         ( C2U( "com.sun.star.chart2.template.StockVolumeLowHighClose" ),        TEMPLATE_STOCKVOLUMELOWHIGHCLOSE )
@@ -503,6 +509,18 @@ uno::Reference< uno::XInterface > SAL_CALL ChartTypeManager::createInstance(
                     StackMode_Y_STACKED_PERCENT, false, true ));
                 break;
 
+            case TEMPLATE_FILLEDNET:
+                xTemplate.set( new NetChartTypeTemplate( m_xContext, aServiceSpecifier,
+                    StackMode_NONE, false, false, true ));
+                break;
+            case TEMPLATE_STACKEDFILLEDNET:
+                xTemplate.set( new NetChartTypeTemplate( m_xContext, aServiceSpecifier,
+                    StackMode_Y_STACKED, false, false, true ));
+                break;
+            case TEMPLATE_PERCENTSTACKEDFILLEDNET:
+                xTemplate.set( new NetChartTypeTemplate( m_xContext, aServiceSpecifier,
+                    StackMode_Y_STACKED_PERCENT, false, false, true ));
+                break;
 
             case TEMPLATE_STOCKLOWHIGHCLOSE:
                 xTemplate.set( new StockChartTypeTemplate( m_xContext, aServiceSpecifier,
diff --git a/chart2/source/model/template/FilledNetChartType.cxx b/chart2/source/model/template/FilledNetChartType.cxx
new file mode 100644
index 0000000..e35b518
--- /dev/null
+++ b/chart2/source/model/template/FilledNetChartType.cxx
@@ -0,0 +1,97 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: FilledNetChartType.cxx,v $
+ * $Revision: 1.7 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_chart2.hxx"
+#include "FilledNetChartType.hxx"
+#include "PropertyHelper.hxx"
+#include "macros.hxx"
+#include "PolarCoordinateSystem.hxx"
+#include "Scaling.hxx"
+#include "servicenames_charttypes.hxx"
+#include "ContainerHelper.hxx"
+#include "AxisIndexDefines.hxx"
+#include <com/sun/star/beans/PropertyAttribute.hpp>
+#include <com/sun/star/chart2/AxisType.hpp>
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::chart2;
+
+using ::rtl::OUString;
+using ::com::sun::star::beans::Property;
+using ::com::sun::star::uno::Sequence;
+using ::com::sun::star::uno::Reference;
+using ::com::sun::star::uno::Any;
+using ::osl::MutexGuard;
+
+namespace chart
+{
+
+FilledNetChartType::FilledNetChartType(
+    const uno::Reference< uno::XComponentContext > & xContext ) :
+        NetChartType_Base( xContext )
+{}
+
+FilledNetChartType::FilledNetChartType( const FilledNetChartType & rOther ) :
+        NetChartType_Base( rOther )
+{
+}
+
+FilledNetChartType::~FilledNetChartType()
+{}
+
+// ____ XCloneable ____
+uno::Reference< util::XCloneable > SAL_CALL FilledNetChartType::createClone()
+    throw (uno::RuntimeException)
+{
+    return uno::Reference< util::XCloneable >( new FilledNetChartType( *this ));
+}
+
+// ____ XChartType ____
+::rtl::OUString SAL_CALL FilledNetChartType::getChartType()
+    throw (uno::RuntimeException)
+{
+    return CHART2_SERVICE_NAME_CHARTTYPE_FILLED_NET;
+}
+
+uno::Sequence< ::rtl::OUString > FilledNetChartType::getSupportedServiceNames_Static()
+{
+    uno::Sequence< ::rtl::OUString > aServices( 3 );
+    aServices[ 0 ] = CHART2_SERVICE_NAME_CHARTTYPE_FILLED_NET;
+    aServices[ 1 ] = C2U( "com.sun.star.chart2.ChartType" );
+    aServices[ 2 ] = C2U( "com.sun.star.beans.PropertySet" );
+    return aServices;
+}
+
+// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
+APPHELPER_XSERVICEINFO_IMPL( FilledNetChartType,
+                             C2U( "com.sun.star.comp.chart.FilledNetChartType" ));
+
+} //  namespace chart
diff --git a/chart2/source/model/template/FilledNetChartType.hxx b/chart2/source/model/template/FilledNetChartType.hxx
new file mode 100644
index 0000000..ed0f2a2
--- /dev/null
+++ b/chart2/source/model/template/FilledNetChartType.hxx
@@ -0,0 +1,66 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: FilledNetChartType.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef CHART_FILLEDNETCHARTTYPE_HXX
+#define CHART_FILLEDNETCHARTTYPE_HXX
+
+#include "NetChartType.hxx"
+#include "ServiceMacros.hxx"
+
+namespace chart
+{
+
+class FilledNetChartType : public NetChartType_Base
+{
+public:
+    FilledNetChartType( ::com::sun::star::uno::Reference<
+                      ::com::sun::star::uno::XComponentContext > const & xContext );
+    virtual ~FilledNetChartType();
+
+    APPHELPER_XSERVICEINFO_DECL()
+
+    /// establish methods for factory instatiation
+    APPHELPER_SERVICE_FACTORY_HELPER( FilledNetChartType )
+
+protected:
+    explicit FilledNetChartType( const FilledNetChartType & rOther );
+
+    // ____ XChartType ____
+    virtual ::rtl::OUString SAL_CALL getChartType()
+        throw (::com::sun::star::uno::RuntimeException);
+
+    // ____ XCloneable ____
+    virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone()
+        throw (::com::sun::star::uno::RuntimeException);
+};
+
+} //  namespace chart
+
+// CHART_FILLEDNETCHARTTYPE_HXX
+#endif
diff --git a/chart2/source/model/template/NetChartType.cxx b/chart2/source/model/template/NetChartType.cxx
index 2b022e7..18b290f 100644
--- a/chart2/source/model/template/NetChartType.cxx
+++ b/chart2/source/model/template/NetChartType.cxx
@@ -52,76 +52,24 @@ using ::com::sun::star::uno::Reference;
 using ::com::sun::star::uno::Any;
 using ::osl::MutexGuard;
 
-namespace
-{
-
-void lcl_AddPropertiesToVector(
-    ::std::vector< Property > & /* rOutProperties */ )
-{
-}
-
-void lcl_AddDefaultsToMap(
-    ::chart::tPropertyValueMap & /* rOutMap */ )
-{
-}
-
-const Sequence< Property > & lcl_GetPropertySequence()
-{
-    static Sequence< Property > aPropSeq;
-
-    // /--
-    ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
-    if( 0 == aPropSeq.getLength() )
-    {
-        // get properties
-        ::std::vector< ::com::sun::star::beans::Property > aProperties;
-        lcl_AddPropertiesToVector( aProperties );
-
-        // and sort them for access via bsearch
-        ::std::sort( aProperties.begin(), aProperties.end(),
-                     ::chart::PropertyNameLess() );
-
-        // transfer result to static Sequence
-        aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties );
-    }
-
-    return aPropSeq;
-}
-
-} // anonymous namespace
-
 namespace chart
 {
 
-NetChartType::NetChartType(
+NetChartType_Base::NetChartType_Base(
     const uno::Reference< uno::XComponentContext > & xContext ) :
         ChartType( xContext )
 {}
 
-NetChartType::NetChartType( const NetChartType & rOther ) :
+NetChartType_Base::NetChartType_Base( const NetChartType_Base & rOther ) :
         ChartType( rOther )
 {
 }
 
-NetChartType::~NetChartType()
+NetChartType_Base::~NetChartType_Base()
 {}
 
-// ____ XCloneable ____
-uno::Reference< util::XCloneable > SAL_CALL NetChartType::createClone()
-    throw (uno::RuntimeException)
-{
-    return uno::Reference< util::XCloneable >( new NetChartType( *this ));
-}
-
-// ____ XChartType ____
-::rtl::OUString SAL_CALL NetChartType::getChartType()
-    throw (uno::RuntimeException)
-{
-    return CHART2_SERVICE_NAME_CHARTTYPE_NET;
-}
-
 Reference< XCoordinateSystem > SAL_CALL
-    NetChartType::createCoordinateSystem( ::sal_Int32 DimensionCount )
+    NetChartType_Base::createCoordinateSystem( ::sal_Int32 DimensionCount )
     throw (lang::IllegalArgumentException,
            uno::RuntimeException)
 {
@@ -157,42 +105,23 @@ Reference< XCoordinateSystem > SAL_CALL
 }
 
 // ____ OPropertySet ____
-uno::Any NetChartType::GetDefaultValue( sal_Int32 nHandle ) const
+uno::Any NetChartType_Base::GetDefaultValue( sal_Int32 /*nHandle*/ ) const
     throw(beans::UnknownPropertyException)
 {
-    static tPropertyValueMap aStaticDefaults;
-
-    // /--
-    ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
-    if( 0 == aStaticDefaults.size() )
-    {
-        // initialize defaults
-        lcl_AddDefaultsToMap( aStaticDefaults );
-    }
-
-    tPropertyValueMap::const_iterator aFound(
-        aStaticDefaults.find( nHandle ));
-
-    if( aFound == aStaticDefaults.end())
-        return uno::Any();
-
-    return (*aFound).second;
-    // \--
+    return uno::Any();
 }
 
 // ____ OPropertySet ____
-::cppu::IPropertyArrayHelper & SAL_CALL NetChartType::getInfoHelper()
+::cppu::IPropertyArrayHelper & SAL_CALL NetChartType_Base::getInfoHelper()
 {
-    static ::cppu::OPropertyArrayHelper aArrayHelper( lcl_GetPropertySequence(),
-                                                      /* bSorted = */ sal_True );
-
+    uno::Sequence< beans::Property > aProps;
+    static ::cppu::OPropertyArrayHelper aArrayHelper(aProps);
     return aArrayHelper;
 }
 
-
 // ____ XPropertySet ____
 uno::Reference< beans::XPropertySetInfo > SAL_CALL
-    NetChartType::getPropertySetInfo()
+    NetChartType_Base::getPropertySetInfo()
     throw (uno::RuntimeException)
 {
     static uno::Reference< beans::XPropertySetInfo > xInfo;
@@ -209,6 +138,35 @@ uno::Reference< beans::XPropertySetInfo > SAL_CALL
     // \--
 }
 
+//-----------------------------------------------------------------------------
+
+NetChartType::NetChartType(
+    const uno::Reference< uno::XComponentContext > & xContext ) :
+        NetChartType_Base( xContext )
+{}
+
+NetChartType::NetChartType( const NetChartType & rOther ) :
+        NetChartType_Base( rOther )
+{
+}
+
+NetChartType::~NetChartType()
+{}
+
+// ____ XCloneable ____
+uno::Reference< util::XCloneable > SAL_CALL NetChartType::createClone()
+    throw (uno::RuntimeException)
+{
+    return uno::Reference< util::XCloneable >( new NetChartType( *this ));
+}
+
+// ____ XChartType ____
+::rtl::OUString SAL_CALL NetChartType::getChartType()
+    throw (uno::RuntimeException)
+{
+    return CHART2_SERVICE_NAME_CHARTTYPE_NET;
+}
+
 uno::Sequence< ::rtl::OUString > NetChartType::getSupportedServiceNames_Static()
 {
     uno::Sequence< ::rtl::OUString > aServices( 3 );
diff --git a/chart2/source/model/template/NetChartType.hxx b/chart2/source/model/template/NetChartType.hxx
index 4b47212..8f7d50f 100644
--- a/chart2/source/model/template/NetChartType.hxx
+++ b/chart2/source/model/template/NetChartType.hxx
@@ -6,7 +6,7 @@
  *
  * OpenOffice.org - a multi-platform office productivity suite
  *
- * $RCSfile: NetChartType.hxx,v $
+ * $RCSfile: NetChartType_Base.hxx,v $
  * $Revision: 1.4 $
  *
  * This file is part of OpenOffice.org.
@@ -36,24 +36,17 @@
 namespace chart
 {
 
-class NetChartType : public ChartType
+class NetChartType_Base : public ChartType
 {
 public:
-    NetChartType( ::com::sun::star::uno::Reference<
+    NetChartType_Base( ::com::sun::star::uno::Reference<
                       ::com::sun::star::uno::XComponentContext > const & xContext );
-    virtual ~NetChartType();
-
-    APPHELPER_XSERVICEINFO_DECL()
-
-    /// establish methods for factory instatiation
-    APPHELPER_SERVICE_FACTORY_HELPER( NetChartType )
+    virtual ~NetChartType_Base();
 
 protected:
-    explicit NetChartType( const NetChartType & rOther );
+    explicit NetChartType_Base( const NetChartType_Base & rOther );
 
     // ____ XChartType ____
-    virtual ::rtl::OUString SAL_CALL getChartType()
-        throw (::com::sun::star::uno::RuntimeException);
     virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XCoordinateSystem > SAL_CALL
         createCoordinateSystem( ::sal_Int32 DimensionCount )
         throw (::com::sun::star::lang::IllegalArgumentException,
@@ -63,13 +56,34 @@ protected:
     virtual ::com::sun::star::uno::Any GetDefaultValue( sal_Int32 nHandle ) const
         throw(::com::sun::star::beans::UnknownPropertyException);
 
-    // ____ OPropertySet ____
     virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper();
 
     // ____ XPropertySet ____
     virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL
         getPropertySetInfo()
         throw (::com::sun::star::uno::RuntimeException);
+};
+
+//-------------------------------------------------------------------------------------
+
+class NetChartType : public NetChartType_Base
+{
+public:
+    NetChartType( ::com::sun::star::uno::Reference<
+                      ::com::sun::star::uno::XComponentContext > const & xContext );
+    virtual ~NetChartType();
+
+    APPHELPER_XSERVICEINFO_DECL()
+
+    /// establish methods for factory instatiation
+    APPHELPER_SERVICE_FACTORY_HELPER( NetChartType )
+
+protected:
+    explicit NetChartType( const NetChartType & rOther );
+
+    // ____ XChartType ____
+    virtual ::rtl::OUString SAL_CALL getChartType()
+        throw (::com::sun::star::uno::RuntimeException);
 
     // ____ XCloneable ____
     virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone()
diff --git a/chart2/source/model/template/NetChartTypeTemplate.cxx b/chart2/source/model/template/NetChartTypeTemplate.cxx
index f175d27..f21857c 100644
--- a/chart2/source/model/template/NetChartTypeTemplate.cxx
+++ b/chart2/source/model/template/NetChartTypeTemplate.cxx
@@ -64,11 +64,13 @@ NetChartTypeTemplate::NetChartTypeTemplate(
     const ::rtl::OUString & rServiceName,
     StackMode eStackMode,
     bool bSymbols,
-    bool bHasLines ) :
+    bool bHasLines ,
+    bool bHasFilledArea ) :
         ChartTypeTemplate( xContext, rServiceName ),
         m_eStackMode( eStackMode ),
         m_bHasSymbols( bSymbols ),
-        m_bHasLines( bHasLines )
+        m_bHasLines( bHasLines ),
+        m_bHasFilledArea( bHasFilledArea )
 {}
 
 NetChartTypeTemplate::~NetChartTypeTemplate()
@@ -110,11 +112,18 @@ sal_Bool SAL_CALL NetChartTypeTemplate::matchesTemplate(
 {
     sal_Bool bResult = ChartTypeTemplate::matchesTemplate( xDiagram, bAdaptProperties );
 
-    // check symbol-style
-    // for a template with symbols it is ok, if there is at least one series
-    // with symbols, otherwise an unknown template is too easy to achieve
+    uno::Reference< beans::XPropertySet > xChartTypeProp(
+        DiagramHelper::getChartTypeByIndex( xDiagram, 0 ), uno::UNO_QUERY_THROW );
+
     if( bResult )
     {
+        //filled net chart?:
+        if( m_bHasFilledArea )
+            return sal_True;
+    
+        // check symbol-style
+        // for a template with symbols it is ok, if there is at least one series
+        // with symbols, otherwise an unknown template is too easy to achieve
         bool bSymbolFound = false;
         bool bLineFound = false;
 
@@ -182,8 +191,13 @@ Reference< chart2::XChartType > NetChartTypeTemplate::getChartTypeForIndex( sal_
     {
         Reference< lang::XMultiServiceFactory > xFact(
             GetComponentContext()->getServiceManager(), uno::UNO_QUERY_THROW );
-        xResult.set( xFact->createInstance(
-                         CHART2_SERVICE_NAME_CHARTTYPE_NET ), uno::UNO_QUERY_THROW );
+
+        if( m_bHasFilledArea )
+            xResult.set( xFact->createInstance(
+                             CHART2_SERVICE_NAME_CHARTTYPE_FILLED_NET ), uno::UNO_QUERY_THROW );
+        else
+            xResult.set( xFact->createInstance(
+                             CHART2_SERVICE_NAME_CHARTTYPE_NET ), uno::UNO_QUERY_THROW );
     }
     catch( uno::Exception & ex )
     {
diff --git a/chart2/source/model/template/NetChartTypeTemplate.hxx b/chart2/source/model/template/NetChartTypeTemplate.hxx
index c952897..69c9078 100644
--- a/chart2/source/model/template/NetChartTypeTemplate.hxx
+++ b/chart2/source/model/template/NetChartTypeTemplate.hxx
@@ -45,7 +45,8 @@ public:
         const ::rtl::OUString & rServiceName,
         StackMode eStackMode,
         bool bSymbols,
-        bool bHasLines = true
+        bool bHasLines = true,
+        bool bHasFilledArea = false
         );
     virtual ~NetChartTypeTemplate();
 
@@ -80,6 +81,7 @@ private:
     StackMode  m_eStackMode;
     bool                                 m_bHasSymbols;
     bool                                 m_bHasLines;
+    bool                                 m_bHasFilledArea;
 };
 
 } //  namespace chart
diff --git a/chart2/source/model/template/_serviceregistration_charttypes.cxx b/chart2/source/model/template/_serviceregistration_charttypes.cxx
index c019ec0..7256524 100644
--- a/chart2/source/model/template/_serviceregistration_charttypes.cxx
+++ b/chart2/source/model/template/_serviceregistration_charttypes.cxx
@@ -39,6 +39,7 @@
 #include "ColumnChartType.hxx"
 #include "LineChartType.hxx"
 #include "NetChartType.hxx"
+#include "FilledNetChartType.hxx"
 #include "PieChartType.hxx"
 #include "ScatterChartType.hxx"
 #include "BubbleChartType.hxx"
@@ -96,6 +97,14 @@ static struct ::cppu::ImplementationEntry g_entries_chart2_charttypes[] =
         , 0
     }
     ,{
+          ::chart::FilledNetChartType::create
+        , ::chart::FilledNetChartType::getImplementationName_Static
+        , ::chart::FilledNetChartType::getSupportedServiceNames_Static
+        , ::cppu::createSingleComponentFactory
+        , 0
+        , 0
+    }
+    ,{
           ::chart::PieChartType::create
         , ::chart::PieChartType::getImplementationName_Static
         , ::chart::PieChartType::getSupportedServiceNames_Static
diff --git a/chart2/source/model/template/makefile.mk b/chart2/source/model/template/makefile.mk
index ad8fcd5..6336701 100644
--- a/chart2/source/model/template/makefile.mk
+++ b/chart2/source/model/template/makefile.mk
@@ -63,6 +63,7 @@ SLOFILES=	\
     $(SLO)$/ColumnChartType.obj \
     $(SLO)$/ColumnLineChartTypeTemplate.obj \
     $(SLO)$/DataInterpreter.obj \
+    $(SLO)$/FilledNetChartType.obj \
     $(SLO)$/LineChartType.obj \
     $(SLO)$/LineChartTypeTemplate.obj \
     $(SLO)$/NetChartType.obj \
diff --git a/chart2/source/tools/ChartTypeHelper.cxx b/chart2/source/tools/ChartTypeHelper.cxx
index 452adbd..23aa141 100644
--- a/chart2/source/tools/ChartTypeHelper.cxx
+++ b/chart2/source/tools/ChartTypeHelper.cxx
@@ -106,6 +106,8 @@ sal_Bool ChartTypeHelper::isSupportingStatisticProperties( const uno::Reference<
             return sal_False;
         if( aChartTypeName.match(CHART2_SERVICE_NAME_CHARTTYPE_NET) )
             return sal_False;
+        if( aChartTypeName.match(CHART2_SERVICE_NAME_CHARTTYPE_FILLED_NET) )
+            return sal_False;
         if( aChartTypeName.match(CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK) )
             return sal_False;
         if( aChartTypeName.match(CHART2_SERVICE_NAME_CHARTTYPE_BUBBLE) ) //todo: BubbleChart support error bars and trend lines
@@ -197,6 +199,8 @@ sal_Bool ChartTypeHelper::isSupportingSecondaryAxis( const uno::Reference< XChar
             return sal_False;
         if( aChartTypeName.match(CHART2_SERVICE_NAME_CHARTTYPE_NET) )
             return sal_False;
+        if( aChartTypeName.match(CHART2_SERVICE_NAME_CHARTTYPE_FILLED_NET) )
+            return sal_False;
     }
     return sal_True;
 }
@@ -335,14 +339,21 @@ uno::Sequence < sal_Int32 > ChartTypeHelper::getSupportedLabelPlacements( const
     }
     else if( aChartTypeName.match(CHART2_SERVICE_NAME_CHARTTYPE_NET) )
     {
-        aRet.realloc(5);
+        aRet.realloc(6);
         sal_Int32* pSeq = aRet.getArray();
+        *pSeq++ = ::com::sun::star::chart::DataLabelPlacement::OUTSIDE;
         *pSeq++ = ::com::sun::star::chart::DataLabelPlacement::TOP;
         *pSeq++ = ::com::sun::star::chart::DataLabelPlacement::BOTTOM;
         *pSeq++ = ::com::sun::star::chart::DataLabelPlacement::LEFT;
         *pSeq++ = ::com::sun::star::chart::DataLabelPlacement::RIGHT;
         *pSeq++ = ::com::sun::star::chart::DataLabelPlacement::CENTER;
     }
+    else if( aChartTypeName.match(CHART2_SERVICE_NAME_CHARTTYPE_FILLED_NET) )
+    {
+        aRet.realloc(1);
+        sal_Int32* pSeq = aRet.getArray();
+        *pSeq++ = ::com::sun::star::chart::DataLabelPlacement::OUTSIDE;
+    }
     else if( aChartTypeName.match(CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK) )
     {
         aRet.realloc( 1 );
@@ -399,6 +410,8 @@ bool ChartTypeHelper::isSupportingAxisPositioning( const uno::Reference< chart2:
         rtl::OUString aChartTypeName = xChartType->getChartType();
         if( aChartTypeName.match(CHART2_SERVICE_NAME_CHARTTYPE_NET) )
             return false;
+        if( aChartTypeName.match(CHART2_SERVICE_NAME_CHARTTYPE_FILLED_NET) )
+            return false;
     }
     if( nDimensionCount==3 )
         return nDimensionIndex<2;
@@ -579,7 +592,8 @@ uno::Sequence < sal_Int32 > ChartTypeHelper::getSupportedMissingValueTreatments(
             *pSeq++ = ::com::sun::star::chart::MissingValueTreatment::CONTINUE;
     }
     else if( aChartTypeName.match(CHART2_SERVICE_NAME_CHARTTYPE_LINE) ||
-        aChartTypeName.match(CHART2_SERVICE_NAME_CHARTTYPE_NET))
+        aChartTypeName.match(CHART2_SERVICE_NAME_CHARTTYPE_NET) ||
+        aChartTypeName.match(CHART2_SERVICE_NAME_CHARTTYPE_FILLED_NET) )
     {
         aRet.realloc( bStacked ? 2 : 3 );
         sal_Int32* pSeq = aRet.getArray();
@@ -609,6 +623,17 @@ uno::Sequence < sal_Int32 > ChartTypeHelper::getSupportedMissingValueTreatments(
     return aRet;
 }
 
+bool ChartTypeHelper::isSeriesInFrontOfAxisLine( const uno::Reference< XChartType >& xChartType )
+{
+    if( xChartType.is() )
+    {
+        rtl::OUString aChartTypeName = xChartType->getChartType();
+        if( aChartTypeName.match( CHART2_SERVICE_NAME_CHARTTYPE_FILLED_NET ) )
+            return false;
+    }
+    return true;
+}
+
 rtl::OUString ChartTypeHelper::getRoleOfSequenceForYAxisNumberFormatDetection( const uno::Reference< XChartType >& xChartType )
 {
     rtl::OUString aRet( C2U( "values-y" ) );
diff --git a/chart2/source/tools/CommonConverters.cxx b/chart2/source/tools/CommonConverters.cxx
index 0e9d413..307fe22 100644
--- a/chart2/source/tools/CommonConverters.cxx
+++ b/chart2/source/tools/CommonConverters.cxx
@@ -223,6 +223,29 @@ drawing::Position3D getPointFromPoly( const drawing::PolyPolygonShape3D& rPolygo
     return aRet;
 }
 
+void addPolygon( drawing::PolyPolygonShape3D& rRet, const drawing::PolyPolygonShape3D& rAdd )
+{
+    sal_Int32 nAddOuterCount = rAdd.SequenceX.getLength();
+    sal_Int32 nOuterCount = rRet.SequenceX.getLength() + nAddOuterCount;
+    rRet.SequenceX.realloc( nOuterCount );
+    rRet.SequenceY.realloc( nOuterCount );
+    rRet.SequenceZ.realloc( nOuterCount );
+
+    sal_Int32 nIndex = 0;
+    sal_Int32 nOuter = nOuterCount - nAddOuterCount;
+    for( ; nOuter < nOuterCount; nOuter++ )
+    {
+        if( nIndex >= nAddOuterCount )
+            break;
+
+        rRet.SequenceX[nOuter] = rAdd.SequenceX[nIndex];
+        rRet.SequenceY[nOuter] = rAdd.SequenceY[nIndex];
+        rRet.SequenceZ[nOuter] = rAdd.SequenceZ[nIndex];
+
+        nIndex++;
+    }
+}
+
 void appendPoly( drawing::PolyPolygonShape3D& rRet, const drawing::PolyPolygonShape3D& rAdd )
 {
     sal_Int32 nOuterCount = Max( rRet.SequenceX.getLength(), rAdd.SequenceX.getLength() );
diff --git a/chart2/source/tools/DiagramHelper.cxx b/chart2/source/tools/DiagramHelper.cxx
index 4d3578a..a3beb62 100644
--- a/chart2/source/tools/DiagramHelper.cxx
+++ b/chart2/source/tools/DiagramHelper.cxx
@@ -1320,6 +1320,8 @@ bool DiagramHelper::isSupportingFloorAndWall( const Reference<
             return false;
         if( xType.is() && xType->getChartType().match(CHART2_SERVICE_NAME_CHARTTYPE_NET) )
             return false;
+        if( xType.is() && xType->getChartType().match(CHART2_SERVICE_NAME_CHARTTYPE_FILLED_NET) )
+            return false;
     }
     return true;
 }
diff --git a/chart2/source/view/axes/VCoordinateSystem.cxx b/chart2/source/view/axes/VCoordinateSystem.cxx
index 8fb0a56..1430e39 100644
--- a/chart2/source/view/axes/VCoordinateSystem.cxx
+++ b/chart2/source/view/axes/VCoordinateSystem.cxx
@@ -112,7 +112,8 @@ VCoordinateSystem::~VCoordinateSystem()
 
 void SAL_CALL VCoordinateSystem::initPlottingTargets(  const Reference< drawing::XShapes >& xLogicTarget
        , const Reference< drawing::XShapes >& xFinalTarget
-       , const Reference< lang::XMultiServiceFactory >& xShapeFactory )
+       , const Reference< lang::XMultiServiceFactory >& xShapeFactory
+       , Reference< drawing::XShapes >& xLogicTargetForSeriesBehindAxis )
             throw (uno::RuntimeException)
 {
     DBG_ASSERT(xLogicTarget.is()&&xFinalTarget.is()&&xShapeFactory.is(),"no proper initialization parameters");
@@ -125,12 +126,14 @@ void SAL_CALL VCoordinateSystem::initPlottingTargets(  const Reference< drawing:
     {
         //create and add to target
         m_xLogicTargetForGrids = aShapeFactory.createGroup2D( xLogicTarget );
+        xLogicTargetForSeriesBehindAxis = aShapeFactory.createGroup2D( xLogicTarget );
         m_xLogicTargetForAxes = aShapeFactory.createGroup2D( xLogicTarget );
     }
     else
     {
         //create and added to target
         m_xLogicTargetForGrids = aShapeFactory.createGroup3D( xLogicTarget );
+        xLogicTargetForSeriesBehindAxis = aShapeFactory.createGroup3D( xLogicTarget );
         m_xLogicTargetForAxes = aShapeFactory.createGroup3D( xLogicTarget );
     }
     m_xFinalTarget  = xFinalTarget;
diff --git a/chart2/source/view/charttypes/AreaChart.cxx b/chart2/source/view/charttypes/AreaChart.cxx
index 40bdda4..f8bc0f0 100644
--- a/chart2/source/view/charttypes/AreaChart.cxx
+++ b/chart2/source/view/charttypes/AreaChart.cxx
@@ -45,6 +45,7 @@
 #include "LabelPositionHelper.hxx"
 #include "Clipping.hxx"
 #include "Stripe.hxx"
+#include "PolarLabelPositionHelper.hxx"
 
 #include <com/sun/star/chart2/Symbol.hpp>
 #include <com/sun/star/chart/DataLabelPlacement.hpp>
@@ -84,6 +85,7 @@ AreaChart::AreaChart( const uno::Reference<XChartType>& xChartTypeModel
         , m_bArea(!bNoArea)
         , m_bLine(bNoArea)
         , m_bSymbol( ChartTypeHelper::isSupportingSymbolProperties(xChartTypeModel,nDimensionCount) )
+        , m_bIsPolarCooSys( bConnectLastToFirstPoint )
         , m_bConnectLastToFirstPoint( bConnectLastToFirstPoint )
         , m_bAddOneToXMax(bAddOneToXMax)
         , m_bExpandIfValuesCloseToBorder( bExpandIfValuesCloseToBorder )
@@ -230,7 +232,7 @@ bool AreaChart::keepAspectRatio() const
 
 void AreaChart::addSeries( VDataSeries* pSeries, sal_Int32 zSlot, sal_Int32 xSlot, sal_Int32 ySlot )
 {
-    if( m_bArea && pSeries )
+    if( m_bArea && !m_bIsPolarCooSys && pSeries )
     {
         sal_Int32 nMissingValueTreatment = pSeries->getMissingValueTreatment();
         if( nMissingValueTreatment == ::com::sun::star::chart::MissingValueTreatment::LEAVE_GAP  )
@@ -432,7 +434,12 @@ bool AreaChart::impl_createArea( VDataSeries* pSeries
 
     drawing::PolyPolygonShape3D aPoly( *pSeriesPoly );
     //add second part to the polygon (grounding points or previous series points)
-    if(!pPreviousSeriesPoly)
+    if( m_bConnectLastToFirstPoint && !ShapeFactory::isPolygonEmptyOrSinglePoint(*pSeriesPoly) )
+    {
+        if( pPreviousSeriesPoly )
+            addPolygon( aPoly, *pPreviousSeriesPoly );
+    }
+    else if(!pPreviousSeriesPoly)
     {
         double fMinX = pSeries->m_fLogicMinX;
         double fMaxX = pSeries->m_fLogicMaxX;
@@ -726,6 +733,22 @@ void AreaChart::createShapes()
                     double fLogicX = (*aSeriesIter)->getXValue(nIndex);
                     double fLogicY = (*aSeriesIter)->getYValue(nIndex);
 
+                    if( m_bIsPolarCooSys && m_bArea &&
+                        ( ::rtl::math::isNan(fLogicY) || ::rtl::math::isInf(fLogicY) ) )
+                    {
+                        if( (*aSeriesIter)->getMissingValueTreatment() == ::com::sun::star::chart::MissingValueTreatment::LEAVE_GAP )
+                        {
+                            if( pSeriesList->size() == 1 || nSeriesIndex == 0 )
+                            {
+                                fLogicY = pPosHelper->getLogicMinY();
+                                if( !pPosHelper->isMathematicalOrientationY() )
+                                    fLogicY = pPosHelper->getLogicMaxY();
+                            }
+                            else
+                                fLogicY = 0.0;
+                        }
+                    }
+
                     if( m_nDimension==3 && m_bArea && pSeriesList->size()!=1 )
                         fLogicY = fabs( fLogicY );
 
@@ -797,8 +820,22 @@ void AreaChart::createShapes()
                     //store point information for series polygon
                     //for area and/or line (symbols only do not need this)
                     if( isValidPosition(aScaledLogicPosition) )
+                    {
                         AddPointToPoly( (*aSeriesIter)->m_aPolyPolygonShape3D, aScaledLogicPosition, (*aSeriesIter)->m_nPolygonIndex );
 
+                        //prepare clipping for filled net charts
+                        if( !bIsVisible && m_bIsPolarCooSys && m_bArea )
+                        {
+                            drawing::Position3D aClippedPos(aScaledLogicPosition);
+                            pPosHelper->clipScaledLogicValues( 0, &aClippedPos.PositionY, 0 );
+                            if( pPosHelper->isLogicVisible( aClippedPos.PositionX, aClippedPos.PositionY, aClippedPos.PositionZ ) )
+                            {
+                                AddPointToPoly( (*aSeriesIter)->m_aPolyPolygonShape3D, aClippedPos, (*aSeriesIter)->m_nPolygonIndex );
+                                AddPointToPoly( (*aSeriesIter)->m_aPolyPolygonShape3D, aScaledLogicPosition, (*aSeriesIter)->m_nPolygonIndex );
+                            }
+                        }
+                    }
+
                     //create a single datapoint if point is visible
                     //apply clipping:
                     if( !bIsVisible )
@@ -909,12 +946,29 @@ void AreaChart::createShapes()
                                 break;
                             }
 
+                            awt::Point aScreenPosition2D;//get the screen position for the labels
+                            sal_Int32 nOffset = 100; //todo maybe calculate this font height dependent
+                            if( m_bIsPolarCooSys && nLabelPlacement == ::com::sun::star::chart::DataLabelPlacement::OUTSIDE )
+                            {
+                                PolarPlottingPositionHelper* pPolarPosHelper = dynamic_cast<PolarPlottingPositionHelper*>(pPosHelper);
+                                if( pPolarPosHelper )
+                                {
+                                    PolarLabelPositionHelper aPolarLabelPositionHelper(pPolarPosHelper,m_nDimension,m_xLogicTarget,m_pShapeFactory);
+                                    aScreenPosition2D = awt::Point( aPolarLabelPositionHelper.getLabelScreenPositionAndAlignmentForLogicValues(
+                                        eAlignment, fLogicX, fLogicY, fLogicZ, nOffset ));
+                                }
+                            }
+                            else
+                            {
+                                if(LABEL_ALIGN_CENTER==eAlignment || m_nDimension == 3 )
+                                    nOffset = 0;
+                                aScreenPosition2D = awt::Point( LabelPositionHelper(pPosHelper,m_nDimension,m_xLogicTarget,m_pShapeFactory)
+                                    .transformSceneToScreenPosition( aScenePosition3D ) );
+                            }
 
-                            awt::Point aScreenPosition2D( LabelPositionHelper(pPosHelper,m_nDimension,m_xLogicTarget,m_pShapeFactory)
-                                .transformSceneToScreenPosition( aScenePosition3D ) );
                             this->createDataLabel( m_xTextTarget, **aSeriesIter, nIndex
                                             , fLogicValueForLabeDisplay
-                                            , aLogicYSumMap[nAttachedAxisIndex], aScreenPosition2D, eAlignment );
+                                            , aLogicYSumMap[nAttachedAxisIndex], aScreenPosition2D, eAlignment, nOffset );
                         }
                     }
 
diff --git a/chart2/source/view/charttypes/AreaChart.hxx b/chart2/source/view/charttypes/AreaChart.hxx
index 6cae9d5..534a5ed 100644
--- a/chart2/source/view/charttypes/AreaChart.hxx
+++ b/chart2/source/view/charttypes/AreaChart.hxx
@@ -110,9 +110,11 @@ private: //member
     bool								m_bArea;//false -> line or symbol only
     bool								m_bLine;
     bool								m_bSymbol;
+    bool                                m_bIsPolarCooSys;//used e.g. for net chart (the data labels need to be placed different)
     bool								m_bConnectLastToFirstPoint;//used e.g. for net chart
     bool                                m_bAddOneToXMax;//used e.g. for net chart (the angle axis needs a different autoscaling)
     bool                                m_bExpandIfValuesCloseToBorder; // e.g. false for net charts
+    
     sal_Int32                           m_nKeepAspectRatio; //0->no 1->yes other value->automatic
     ::com::sun::star::drawing::Direction3D m_aGivenAspectRatio; //only used if nKeepAspectRatio==1
 
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index 2eeb131..67cac8b 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -1726,6 +1726,11 @@ bool VSeriesPlotter::PointsWereSkipped() const
     return m_bPointsWereSkipped;
 }
 
+bool VSeriesPlotter::WantToPlotInFrontOfAxisLine()
+{
+    return ChartTypeHelper::isSeriesInFrontOfAxisLine( m_xChartTypeModel );
+}
+
 Sequence< ViewLegendEntry > SAL_CALL VSeriesPlotter::createLegendEntries(
               LegendExpansion eLegendExpansion
             , const Reference< beans::XPropertySet >& xTextProperties
@@ -2070,6 +2075,8 @@ VSeriesPlotter* VSeriesPlotter::createSeriesPlotter(
         pRet = new PieChart(xChartTypeModel,nDimensionCount);
     else if( aChartType.equalsIgnoreAsciiCase(CHART2_SERVICE_NAME_CHARTTYPE_NET) )
         pRet = new AreaChart(xChartTypeModel,nDimensionCount,true,true,new PolarPlottingPositionHelper(),true,true,false,1,drawing::Direction3D(1,1,1) );
+    else if( aChartType.equalsIgnoreAsciiCase(CHART2_SERVICE_NAME_CHARTTYPE_FILLED_NET) )
+        pRet = new AreaChart(xChartTypeModel,nDimensionCount,true,false,new PolarPlottingPositionHelper(),true,true,false,1,drawing::Direction3D(1,1,1) );
     else if( aChartType.equalsIgnoreAsciiCase(CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK) )
         pRet = new CandleStickChart(xChartTypeModel,nDimensionCount);
     else
diff --git a/chart2/source/view/inc/VCoordinateSystem.hxx b/chart2/source/view/inc/VCoordinateSystem.hxx
index b97398d..b82757a 100644
--- a/chart2/source/view/inc/VCoordinateSystem.hxx
+++ b/chart2/source/view/inc/VCoordinateSystem.hxx
@@ -74,7 +74,9 @@ public:
                 , const ::com::sun::star::uno::Reference<
                         ::com::sun::star::drawing::XShapes >& xFinalTarget
                 , const ::com::sun::star::uno::Reference<
-                        ::com::sun::star::lang::XMultiServiceFactory >& xFactory )
+                        ::com::sun::star::lang::XMultiServiceFactory >& xFactory
+                , ::com::sun::star::uno::Reference<
+                        ::com::sun::star::drawing::XShapes >& xLogicTargetForSeriesBehindAxis )
                         throw (::com::sun::star::uno::RuntimeException);
 
     void setParticle( const rtl::OUString& rCooSysParticle );
diff --git a/chart2/source/view/inc/VSeriesPlotter.hxx b/chart2/source/view/inc/VSeriesPlotter.hxx
index b87c257..d23cbc2 100644
--- a/chart2/source/view/inc/VSeriesPlotter.hxx
+++ b/chart2/source/view/inc/VSeriesPlotter.hxx
@@ -296,6 +296,8 @@ public:
 
     virtual void rearrangeLabelToAvoidOverlapIfRequested( const ::com::sun::star::awt::Size& rPageSize );
 
+    bool WantToPlotInFrontOfAxisLine();
+
     //-------------------------------------------------------------------------
     //-------------------------------------------------------------------------
     //-------------------------------------------------------------------------
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index cd3e805..09d510f 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -1377,12 +1377,13 @@ void ChartView::impl_createDiagramAndContent( SeriesPlotterContainer& rSeriesPlo
     drawing::Direction3D aPreferredAspectRatio(
         rSeriesPlotterContainer.getPreferredAspectRatio() );
     
-    uno::Reference< drawing::XShapes > xCoordinateRegionTarget(0);
+    uno::Reference< drawing::XShapes > xSeriesTargetInFrontOfAxis(0);
+    uno::Reference< drawing::XShapes > xSeriesTargetBehindAxis(0);
     VDiagram aVDiagram(xDiagram, aPreferredAspectRatio, nDimensionCount);
     {//create diagram
         aVDiagram.init(xDiagramPlusAxes_Shapes,xDiagramPlusAxes_Shapes,m_xShapeFactory);
         aVDiagram.createShapes(rAvailablePos,rAvailableSize);
-        xCoordinateRegionTarget = aVDiagram.getCoordinateRegion();
+        xSeriesTargetInFrontOfAxis = aVDiagram.getCoordinateRegion();
         aVDiagram.reduceToMimimumSize();
     }
 
@@ -1394,7 +1395,7 @@ void ChartView::impl_createDiagramAndContent( SeriesPlotterContainer& rSeriesPlo
     for( nC=0; nC < rVCooSysList.size(); nC++)
     {
         VCoordinateSystem* pVCooSys = rVCooSysList[nC];
-        pVCooSys->initPlottingTargets(xCoordinateRegionTarget,xTextTargetShapes,m_xShapeFactory);
+        pVCooSys->initPlottingTargets(xSeriesTargetInFrontOfAxis,xTextTargetShapes,m_xShapeFactory,xSeriesTargetBehindAxis);
 
         pVCooSys->setTransformationSceneToScreen( B3DHomMatrixToHomogenMatrix(
             createTransformationSceneToScreen( aVDiagram.getCurrentRectangle() ) ));
@@ -1469,7 +1470,15 @@ void ChartView::impl_createDiagramAndContent( SeriesPlotterContainer& rSeriesPlo
         //------------ set transformation to plotter / create series
         VSeriesPlotter* pSeriesPlotter = *aPlotterIter;
         rtl::OUString aCID; //III
-        pSeriesPlotter->initPlotter(xCoordinateRegionTarget,xTextTargetShapes,m_xShapeFactory,aCID);
+        uno::Reference< drawing::XShapes > xSeriesTarget(0);
+        if( pSeriesPlotter->WantToPlotInFrontOfAxisLine() )
+            xSeriesTarget = xSeriesTargetInFrontOfAxis;
+        else
+        {
+            xSeriesTarget = xSeriesTargetBehindAxis;
+            DBG_ASSERT( !lcl_resizeAfterCompleteCreation(xDiagram), "not implemented yet! - during a complete recreation this shape is destroyed so no series can be created anymore" );
+        }
+        pSeriesPlotter->initPlotter( xSeriesTarget,xTextTargetShapes,m_xShapeFactory,aCID );
         pSeriesPlotter->setPageReferenceSize( rPageSize );
         VCoordinateSystem* pVCooSys = lcl_getCooSysForPlotter( rVCooSysList, pSeriesPlotter );
         if(2==nDimensionCount)
@@ -1503,7 +1512,8 @@ void ChartView::impl_createDiagramAndContent( SeriesPlotterContainer& rSeriesPlo
         }
 
         //clear and recreate
-        ShapeFactory::removeSubShapes( xCoordinateRegionTarget );
+        ShapeFactory::removeSubShapes( xSeriesTargetInFrontOfAxis ); //xSeriesTargetBehindAxis is a sub shape of xSeriesTargetInFrontOfAxis and will be removed here
+        xSeriesTargetBehindAxis.clear();
         ShapeFactory::removeSubShapes( xTextTargetShapes );
         
         //set new transformation
diff --git a/sc/source/filter/excel/xlchart.cxx b/sc/source/filter/excel/xlchart.cxx
index dfe7440..d5664c0 100644
--- a/sc/source/filter/excel/xlchart.cxx
+++ b/sc/source/filter/excel/xlchart.cxx
@@ -504,35 +504,36 @@ const XclChFormatInfo& XclChFormatInfoProvider::GetFormatInfo( XclChObjectType e
 namespace {
 
 // chart type service names
-const sal_Char SERVICE_CHART2_AREA[]    = "com.sun.star.chart2.AreaChartType";
-const sal_Char SERVICE_CHART2_CANDLE[]  = "com.sun.star.chart2.CandleStickChartType";
-const sal_Char SERVICE_CHART2_COLUMN[]  = "com.sun.star.chart2.ColumnChartType";
-const sal_Char SERVICE_CHART2_LINE[]    = "com.sun.star.chart2.LineChartType";
-const sal_Char SERVICE_CHART2_NET[]     = "com.sun.star.chart2.NetChartType";
-const sal_Char SERVICE_CHART2_PIE[]     = "com.sun.star.chart2.PieChartType";
-const sal_Char SERVICE_CHART2_SCATTER[] = "com.sun.star.chart2.ScatterChartType";
-const sal_Char SERVICE_CHART2_BUBBLE[]  = "com.sun.star.chart2.BubbleChartType";
-const sal_Char SERVICE_CHART2_SURFACE[] = "com.sun.star.chart2.ColumnChartType";    // Todo
+const sal_Char SERVICE_CHART2_AREA[]      = "com.sun.star.chart2.AreaChartType";
+const sal_Char SERVICE_CHART2_CANDLE[]    = "com.sun.star.chart2.CandleStickChartType";
+const sal_Char SERVICE_CHART2_COLUMN[]    = "com.sun.star.chart2.ColumnChartType";
+const sal_Char SERVICE_CHART2_LINE[]      = "com.sun.star.chart2.LineChartType";
+const sal_Char SERVICE_CHART2_NET[]       = "com.sun.star.chart2.NetChartType";
+const sal_Char SERVICE_CHART2_FILLEDNET[] = "com.sun.star.chart2.FilledNetChartType";
+const sal_Char SERVICE_CHART2_PIE[]       = "com.sun.star.chart2.PieChartType";
+const sal_Char SERVICE_CHART2_SCATTER[]   = "com.sun.star.chart2.ScatterChartType";
+const sal_Char SERVICE_CHART2_BUBBLE[]    = "com.sun.star.chart2.BubbleChartType";
+const sal_Char SERVICE_CHART2_SURFACE[]   = "com.sun.star.chart2.ColumnChartType";    // Todo
 
 namespace csscd = ::com::sun::star::chart::DataLabelPlacement;
 
 static const XclChTypeInfo spTypeInfos[] =
 {
-    // chart type             chart type category      record id           service                 varied point color     def label pos         comb2d 3d     polar  area2d area3d 1stvis xcateg swap   stack  revers betw
-    { EXC_CHTYPEID_BAR,       EXC_CHTYPECATEG_BAR,     EXC_ID_CHBAR,       SERVICE_CHART2_COLUMN,  EXC_CHVARPOINT_SINGLE, csscd::OUTSIDE,       true,  true,  false, true,  true,  false, true,  false, true,  false, true  },
-    { EXC_CHTYPEID_HORBAR,    EXC_CHTYPECATEG_BAR,     EXC_ID_CHBAR,       SERVICE_CHART2_COLUMN,  EXC_CHVARPOINT_SINGLE, csscd::OUTSIDE,       false, true,  false, true,  true,  false, true,  true,  true,  false, true  },
-    { EXC_CHTYPEID_LINE,      EXC_CHTYPECATEG_LINE,    EXC_ID_CHLINE,      SERVICE_CHART2_LINE,    EXC_CHVARPOINT_SINGLE, csscd::RIGHT,         true,  true,  false, false, true,  false, true,  false, true,  false, false },
-    { EXC_CHTYPEID_AREA,      EXC_CHTYPECATEG_LINE,    EXC_ID_CHAREA,      SERVICE_CHART2_AREA,    EXC_CHVARPOINT_NONE,   csscd::CENTER,        true,  true,  false, true,  true,  false, true,  false, true,  true,  false },
-    { EXC_CHTYPEID_STOCK,     EXC_CHTYPECATEG_LINE,    EXC_ID_CHLINE,      SERVICE_CHART2_CANDLE,  EXC_CHVARPOINT_NONE,   csscd::RIGHT,         true,  false, false, false, false, false, true,  false, true,  false, false },
-    { EXC_CHTYPEID_RADARLINE, EXC_CHTYPECATEG_RADAR,   EXC_ID_CHRADARLINE, SERVICE_CHART2_NET,     EXC_CHVARPOINT_SINGLE, csscd::TOP,           false, false, true,  false, true,  false, true,  false, false, false, false },
-    { EXC_CHTYPEID_RADARAREA, EXC_CHTYPECATEG_RADAR,   EXC_ID_CHRADARAREA, SERVICE_CHART2_NET,     EXC_CHVARPOINT_NONE,   csscd::TOP,           false, false, true,  true,  true,  false, true,  false, false, false, false },
-    { EXC_CHTYPEID_PIE,       EXC_CHTYPECATEG_PIE,     EXC_ID_CHPIE,       SERVICE_CHART2_PIE,     EXC_CHVARPOINT_MULTI,  csscd::AVOID_OVERLAP, false, true,  true,  true,  true,  true,  true,  false, false, false, false },
-    { EXC_CHTYPEID_DONUT,     EXC_CHTYPECATEG_PIE,     EXC_ID_CHPIE,       SERVICE_CHART2_PIE,     EXC_CHVARPOINT_MULTI,  csscd::AVOID_OVERLAP, false, true,  true,  true,  true,  false, true,  false, false, true,  false },
-    { EXC_CHTYPEID_PIEEXT,    EXC_CHTYPECATEG_PIE,     EXC_ID_CHPIEEXT,    SERVICE_CHART2_PIE,     EXC_CHVARPOINT_MULTI,  csscd::AVOID_OVERLAP, false, false, true,  true,  true,  true,  true,  false, false, false, false },
-    { EXC_CHTYPEID_SCATTER,   EXC_CHTYPECATEG_SCATTER, EXC_ID_CHSCATTER,   SERVICE_CHART2_SCATTER, EXC_CHVARPOINT_SINGLE, csscd::RIGHT,         true,  false, false, false, true,  false, false, false, false, false, false },
-    { EXC_CHTYPEID_BUBBLES,   EXC_CHTYPECATEG_SCATTER, EXC_ID_CHSCATTER,   SERVICE_CHART2_BUBBLE,  EXC_CHVARPOINT_SINGLE, csscd::RIGHT,         false, false, false, true,  true,  false, false, false, false, false, false },
-    { EXC_CHTYPEID_SURFACE,   EXC_CHTYPECATEG_SURFACE, EXC_ID_CHSURFACE,   SERVICE_CHART2_SURFACE, EXC_CHVARPOINT_NONE,   csscd::RIGHT,         false, true,  false, true,  true,  false, true,  false, false, false, false },
-    { EXC_CHTYPEID_UNKNOWN,   EXC_CHTYPECATEG_BAR,     EXC_ID_CHBAR,       SERVICE_CHART2_COLUMN,  EXC_CHVARPOINT_SINGLE, csscd::OUTSIDE,       true,  true,  false, true,  true,  false, true,  false, true,  false, true  }
+    // chart type             chart type category      record id           service                   varied point color     def label pos         comb2d 3d     polar  area2d area3d 1stvis xcateg swap   stack  revers betw
+    { EXC_CHTYPEID_BAR,       EXC_CHTYPECATEG_BAR,     EXC_ID_CHBAR,       SERVICE_CHART2_COLUMN,    EXC_CHVARPOINT_SINGLE, csscd::OUTSIDE,       true,  true,  false, true,  true,  false, true,  false, true,  false, true  },
+    { EXC_CHTYPEID_HORBAR,    EXC_CHTYPECATEG_BAR,     EXC_ID_CHBAR,       SERVICE_CHART2_COLUMN,    EXC_CHVARPOINT_SINGLE, csscd::OUTSIDE,       false, true,  false, true,  true,  false, true,  true,  true,  false, true  },
+    { EXC_CHTYPEID_LINE,      EXC_CHTYPECATEG_LINE,    EXC_ID_CHLINE,      SERVICE_CHART2_LINE,      EXC_CHVARPOINT_SINGLE, csscd::RIGHT,         true,  true,  false, false, true,  false, true,  false, true,  false, false },
+    { EXC_CHTYPEID_AREA,      EXC_CHTYPECATEG_LINE,    EXC_ID_CHAREA,      SERVICE_CHART2_AREA,      EXC_CHVARPOINT_NONE,   csscd::CENTER,        true,  true,  false, true,  true,  false, true,  false, true,  true,  false },
+    { EXC_CHTYPEID_STOCK,     EXC_CHTYPECATEG_LINE,    EXC_ID_CHLINE,      SERVICE_CHART2_CANDLE,    EXC_CHVARPOINT_NONE,   csscd::RIGHT,         true,  false, false, false, false, false, true,  false, true,  false, false },
+    { EXC_CHTYPEID_RADARLINE, EXC_CHTYPECATEG_RADAR,   EXC_ID_CHRADARLINE, SERVICE_CHART2_NET,       EXC_CHVARPOINT_SINGLE, csscd::TOP,           false, false, true,  false, true,  false, true,  false, false, false, false },
+    { EXC_CHTYPEID_RADARAREA, EXC_CHTYPECATEG_RADAR,   EXC_ID_CHRADARAREA, SERVICE_CHART2_FILLEDNET, EXC_CHVARPOINT_NONE,   csscd::TOP,           false, false, true,  true,  true,  false, true,  false, false, true,  false },
+    { EXC_CHTYPEID_PIE,       EXC_CHTYPECATEG_PIE,     EXC_ID_CHPIE,       SERVICE_CHART2_PIE,       EXC_CHVARPOINT_MULTI,  csscd::AVOID_OVERLAP, false, true,  true,  true,  true,  true,  true,  false, false, false, false },
+    { EXC_CHTYPEID_DONUT,     EXC_CHTYPECATEG_PIE,     EXC_ID_CHPIE,       SERVICE_CHART2_PIE,       EXC_CHVARPOINT_MULTI,  csscd::AVOID_OVERLAP, false, true,  true,  true,  true,  false, true,  false, false, true,  false },
+    { EXC_CHTYPEID_PIEEXT,    EXC_CHTYPECATEG_PIE,     EXC_ID_CHPIEEXT,    SERVICE_CHART2_PIE,       EXC_CHVARPOINT_MULTI,  csscd::AVOID_OVERLAP, false, false, true,  true,  true,  true,  true,  false, false, false, false },
+    { EXC_CHTYPEID_SCATTER,   EXC_CHTYPECATEG_SCATTER, EXC_ID_CHSCATTER,   SERVICE_CHART2_SCATTER,   EXC_CHVARPOINT_SINGLE, csscd::RIGHT,         true,  false, false, false, true,  false, false, false, false, false, false },
+    { EXC_CHTYPEID_BUBBLES,   EXC_CHTYPECATEG_SCATTER, EXC_ID_CHSCATTER,   SERVICE_CHART2_BUBBLE,    EXC_CHVARPOINT_SINGLE, csscd::RIGHT,         false, false, false, true,  true,  false, false, false, false, false, false },
+    { EXC_CHTYPEID_SURFACE,   EXC_CHTYPECATEG_SURFACE, EXC_ID_CHSURFACE,   SERVICE_CHART2_SURFACE,   EXC_CHVARPOINT_NONE,   csscd::RIGHT,         false, true,  false, true,  true,  false, true,  false, false, false, false },
+    { EXC_CHTYPEID_UNKNOWN,   EXC_CHTYPECATEG_BAR,     EXC_ID_CHBAR,       SERVICE_CHART2_COLUMN,    EXC_CHVARPOINT_SINGLE, csscd::OUTSIDE,       true,  true,  false, true,  true,  false, true,  false, true,  false, true  }
 };
 
 } // namespace


More information about the ooo-build-commit mailing list