Commits

Anonymous committed 79a58d4

CWS-TOOLING: integrate CWS koheichart01
2009-05-15 06:32:38 +0200 hde r271925 : header fixed
2009-04-14 16:23:35 +0200 hde r270792 : #100231#
2009-04-14 16:13:48 +0200 hde r270790 : #100231#
2009-04-14 15:56:14 +0200 hde r270787 : #100231#
2009-04-14 14:28:40 +0200 hde r270767 : #100231#
2009-04-14 14:27:30 +0200 hde r270766 : #100231#
2009-04-14 09:43:07 +0200 hde r270749 : #100231#
2009-04-14 09:25:52 +0200 hde r270748 : #100231#
2009-03-25 16:18:26 +0100 iha r270034 : #i91578# removed compiler warning
2009-03-25 03:20:36 +0100 kohei r269992 : fixed a silly typo in in-line comment.
2009-03-24 17:03:57 +0100 kohei r269977 : Let's use row and column's hidden flags, instead of width/height, to determine cell's
hidden state.
2009-03-24 16:53:10 +0100 kohei r269973 : The chart positioner no longer needs to skip hidden cells, as hidden cells are handled
elsewhere.
2009-03-24 16:50:12 +0100 kohei r269971 : the index should be 0-based (although chart2 doesn't appear to make use of this data any more).
2009-03-24 16:47:56 +0100 kohei r269969 : Skip hidden cells during cache (re-)build, when the include hidden cells flag is
false. Also avoid adding data cache when the cell is hidden.
2009-03-24 06:05:53 +0100 kohei r269909 : fixed the build breakage after the resync.
2009-03-24 06:05:34 +0100 kohei r269908 : fixed the build breakage after the resync.
2009-03-23 23:38:36 +0100 kohei r269900 : CWS-TOOLING: rebase CWS koheichart01 to trunk@269781 (milestone: DEV300:m44)
2009-03-17 13:11:40 +0100 iha r269597 : #i91578# import IncludeHiddenCells from xlsx
2009-03-17 12:56:09 +0100 iha r269594 : #i91578# import IncludeHiddenCells from xls correctly
2009-03-17 12:49:13 +0100 iha r269592 : #i91578# import IncludeHiddenCells from xls correctly
2009-03-16 17:03:55 +0100 iha r269561 : #i91578# remove unused variable
2009-03-16 10:22:30 +0100 iha r269509 : #i91578# changed wording
2009-03-04 17:07:16 +0100 iha r268846 : #i91578# display of hidden cells - remove unused property 'IsHidden'
2009-03-04 17:04:22 +0100 iha r268845 : #i91578# display of hidden cells - remove unused property 'IsHidden'
2009-03-04 17:03:43 +0100 iha r268844 : #i91578# display of hidden cells - remove unused property 'IsHidden'
2009-03-04 16:24:30 +0100 iha r268843 : #i91578# display of hidden cells - added missing property description
2009-03-04 15:13:04 +0100 iha r268835 : #i91578# display of hidden cells - remove unused code
2009-03-04 14:38:44 +0100 iha r268832 : #i91578# display of hidden cells - reset state corretly when doing undo/redo
2009-03-04 13:42:10 +0100 iha r268822 : #i81209# #i91578# display of hidden cells - don't show hidden cells per default but keep the hidden ranges
2009-03-04 13:40:10 +0100 iha r268821 : #i81209# #i91578# display of hidden cells - don't show hidden cells per default but keep the hidden ranges
2009-03-04 13:37:05 +0100 iha r268820 : #i81209# #i91578# display of hidden cells - don't show hidden cells per default but keep the hidden ranges
2009-03-03 11:18:39 +0100 iha r268713 : #i91578# display of hidden cells - hide control if the functionality is not offered by the data provider
2009-03-02 17:41:37 +0100 kohei r268684 : removed unintended change from DEV300_m38, which was probably introduced due to some sort of
problem during rebase.
2009-02-27 18:51:34 +0100 iha r268613 : #i91578# display of hidden cells - interface redesign: data provider+sequences are now controlled by the chart via a new parameter 'IncludeHiddenCells' thus unwanted values can be removed early in the communication
2009-02-27 18:45:48 +0100 iha r268612 : #i91578# display of hidden cells - interface redesign: data provider+sequences are now controlled by the chart via a new parameter 'IncludeHiddenCells' thus unwanted values can be removed early in the communication
2009-02-27 18:44:17 +0100 iha r268611 : #i91578# display of hidden cells - interface redesign: data provider+sequences are now controlled by the chart via a new parameter 'IncludeHiddenCells' thus unwanted values can be removed early in the communication
2009-02-27 18:35:09 +0100 iha r268610 : #i91578# display of hidden cells - copy-paste-scenario: export hidden flag per column on copy for migration to locale table during import upon paste
2009-02-19 06:47:56 +0100 kohei r268257 : also, set the default value of a cached cell to NaN just in case.
2009-02-19 06:42:08 +0100 kohei r268256 : Set the IsValue flag to false by default so that an empty cell is properly flaged as non-value.
This fixes the broken missing value treatment.
2009-02-18 20:16:30 +0100 iha r268255 : #i91578# display of hidden cells - radio button 'leave gap' was not clickable anymore
2009-02-17 17:57:24 +0100 iha r268185 : #i91578# display of hidden cells - corrected range highlighting
2009-02-17 15:39:52 +0100 iha r268174 : #i91578# display of hidden cells - still display data point value in tip help of data points in writer
2009-02-17 11:21:00 +0100 iha r267861 : #i91578# display of hidden cells - do not show a space nor a legend entry for hidden series
2009-02-17 11:15:14 +0100 iha r267853 : #i91578# display of hidden cells - do not show a space nor a legend entry for hidden series
2009-02-16 16:48:10 +0100 iha r267826 : #i91578# display of hidden cells - group related ids and minimize changes
2009-02-16 14:32:11 +0100 iha r267813 : #i91578# display of hidden cells - don't share resource identifier as this easily produces conflicts -> move IDs for series options page into a separate file
2009-02-16 13:21:44 +0100 iha r267795 : #i91578# display of hidden cells - remove unused member
2009-02-16 13:13:40 +0100 iha r267794 : #i91578# display of hidden cells - remove unused methods
2009-02-16 13:00:10 +0100 iha r267792 : #i91578# display of hidden - avoid unnecessary data copy
2009-02-16 11:40:41 +0100 iha r267785 : #i91578# display of hidden - corrected typo
2009-02-16 11:28:39 +0100 iha r267783 : #i91578# display of hidden - set correct dirty state in method setIncludeHiddenCells
2009-02-13 17:04:50 +0100 iha r267734 : #i91578# corrected position and visibility of the controls for display of hidden cells in case of stock charts
2009-02-13 15:30:17 +0100 iha r267724 : #i91578# charts without category range and charts with data from writer table were broken causes by features changes for display of hidden cells
2009-01-14 19:47:28 +0100 kohei r266330 : #i91578# Fixed the issue with incorrect tooltip category values.
2009-01-05 22:27:03 +0100 kohei r265887 : fixed a regression where the x-axis failed to display values when they were numeric or dates.
2008-12-24 17:01:15 +0100 kohei r265800 : CWS-TOOLING: rebase CWS koheichart01 to trunk@265758 (milestone: DEV300:m38)
2008-12-24 16:03:08 +0100 kohei r265799 : a little more code cleanup, mostly on tab to whitespace conversion on
modified lines and removal of unnecessary 'using' statements.
2008-12-24 15:52:00 +0100 kohei r265798 : removed unnecessary header inclusion & remove hidden data *only when* the 'include hidden cells'
options it false! I'm glad I caught this.
2008-12-24 07:41:23 +0100 kohei r265796 : replaced duplicated local functions with a single template function.
2008-12-24 06:37:15 +0100 kohei r265795 : reverted my last commit, because it was not the right approach.
Instead of using the original data point index in the object name,
leave that index alone, and remove hidden data in the tooltip text
value lookup code.
2008-12-23 23:10:42 +0100 kohei r265793 : fixed the tooltips so that they would display correct values, taking into account
the hidden data points (if any).
2008-12-20 05:26:07 +0100 kohei r265739 : CWS-TOOLING: rebase CWS koheichart01 to trunk@264807 (milestone: DEV300:m37)
2008-12-18 15:49:59 +0100 kohei r265696 : removed markRangeDirty() for now, since that method is still a bit controvertial per Niklas's comment in i#91578.
2008-12-05 20:27:24 +0100 kohei r264918 : removed a compiler warning.
2008-12-05 20:24:02 +0100 kohei r264917 : removed a compilar warning.
2008-12-03 17:06:22 +0100 kohei r264800 : recovered the original keyword file before it was stripped.
2008-12-01 22:00:24 +0100 kohei r264640 : by default, "include hidden cells" attribute is true.
2008-12-01 19:03:07 +0100 kohei r264628 : added accelerator for the plot hidden values check box.
2008-12-01 18:32:02 +0100 kohei r264626 : changed wording per Ingrid's suggestion.
2008-11-26 08:09:36 +0100 kohei r264341 : the 'Starnding angle' fixed line was 6 pixel short.
2008-11-26 08:02:47 +0100 kohei r264340 : added include-hidden-cells check box for the pie chart type too & some code cleanup.
2008-11-26 07:41:45 +0100 kohei r264339 : relocate the controls correctly for line chart types.
2008-11-26 07:14:26 +0100 kohei r264337 : #i95714# fixed typos that caused incorrect scaling of the y-axis under some conditions.
2008-11-26 07:11:54 +0100 kohei r264336 : added "Include hidden cells" check box in the data series options tab page.
2008-11-25 21:04:58 +0100 kohei r264333 : don't check for the number of charts; when importing from xls, the count may be
zero even when the document has charts.
2008-11-25 19:55:50 +0100 kohei r264332 : patch from ooo-build applied. This implements chart listener
that listens on cells show/hide state for the chart's data areas.
2008-11-25 19:52:38 +0100 kohei r264331 : patch from ooo-build applied.
2008-11-25 19:29:54 +0100 kohei r264329 : new xml token for include-hidden-cells attribute.

Comments (0)

Files changed (58)

chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx

     PROP_DIAGRAM_DATAROW_SOURCE,
 
     PROP_DIAGRAM_GROUP_BARS_PER_AXIS,
+    PROP_DIAGRAM_INCLUDE_HIDDEN_CELLS,
 
     PROP_DIAGRAM_SORT_BY_X_VALUES,
 
                   beans::PropertyAttribute::BOUND
                   | beans::PropertyAttribute::MAYBEDEFAULT ));
 
+    rOutProperties.push_back(
+        Property( C2U( "IncludeHiddenCells" ),
+                  PROP_DIAGRAM_INCLUDE_HIDDEN_CELLS,
+                  ::getBooleanCppuType(),
+                  beans::PropertyAttribute::BOUND
+                  | beans::PropertyAttribute::MAYBEDEFAULT ));
+
     //new for XY charts
     rOutProperties.push_back(
         Property( C2U( "SortByXValues" ),
 //-----------------------------------------------------------------------------------------------------------------
 //-----------------------------------------------------------------------------------------------------------------
 
+//PROP_DIAGRAM_INCLUDE_HIDDEN_CELLS
+class WrappedIncludeHiddenCellsProperty : public WrappedProperty
+{
+public:
+    WrappedIncludeHiddenCellsProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact );
+    virtual ~WrappedIncludeHiddenCellsProperty();
+
+    virtual void setPropertyValue( const ::com::sun::star::uno::Any& rOuterValue, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xInnerPropertySet ) const
+                        throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+private: //member
+    ::boost::shared_ptr< Chart2ModelContact >   m_spChart2ModelContact;
+};
+
+WrappedIncludeHiddenCellsProperty::WrappedIncludeHiddenCellsProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
+            : WrappedProperty(C2U("IncludeHiddenCells"),C2U("IncludeHiddenCells"))
+            , m_spChart2ModelContact( spChart2ModelContact )
+{
+}
+
+WrappedIncludeHiddenCellsProperty::~WrappedIncludeHiddenCellsProperty()
+{
+}
+
+void WrappedIncludeHiddenCellsProperty::setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& /*xInnerPropertySet*/ ) const
+                throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
+{
+    sal_Bool bNewValue = false;
+    if( ! (rOuterValue >>= bNewValue) )
+        throw lang::IllegalArgumentException( C2U("Property Dim3D requires boolean value"), 0, 0 );
+
+    ChartModelHelper::setIncludeHiddenCells( bNewValue, m_spChart2ModelContact->getChartModel() );
+}
+
+//-----------------------------------------------------------------------------------------------------------------
+//-----------------------------------------------------------------------------------------------------------------
+//-----------------------------------------------------------------------------------------------------------------
+
 // ____ XDiagramProvider ____
 Reference< chart2::XDiagram > SAL_CALL DiagramWrapper::getDiagram()
     throw (uno::RuntimeException)
     aWrappedProperties.push_back( new WrappedProperty( C2U( "StackedBarsConnected" ), C2U( "ConnectBars" ) ) );
     aWrappedProperties.push_back( new WrappedSolidTypeProperty( m_spChart2ModelContact ) );
     aWrappedProperties.push_back( new WrappedAutomaticSizeProperty() );
+    aWrappedProperties.push_back( new WrappedIncludeHiddenCellsProperty( m_spChart2ModelContact ) );
+
     return aWrappedProperties;
 }
 

chart2/source/controller/dialogs/TabPages.hrc

 #define CTL_BITMAP_PREVIEW          6
 */
 
-//#define TP_OPTIONS                 908
-#define GRP_OPT_AXIS				1
-#define RBT_OPT_AXIS_1				2
-#define RBT_OPT_AXIS_2				3
-#define MT_GAP						4
-#define MT_OVERLAP					5
-#define FT_GAP						6
-#define FT_OVERLAP					7
-#define GB_BAR						8
-#define CB_CONNECTOR				9
-#define CB_BARS_SIDE_BY_SIDE       10
-#define FL_PLOT_MISSING_VALUES     11
-#define RB_DONT_PAINT              12
-#define RB_ASSUME_ZERO             13
-#define RB_CONTINUE_LINE           14
-
 //------------
 //from old chart tplabel.hrc
 

chart2/source/controller/dialogs/tp_PolarOptions.cxx

 #include "tp_PolarOptions.hxx"
 #include "tp_PolarOptions.hrc"
 #include "ResId.hxx"
-#include "TabPages.hrc"
 #include "chartview/ChartSfxItemIds.hxx"
 #include "NoWarningThisInCTOR.hxx"
 
     m_aFL_StartingAngle( this, SchResId( FL_STARTING_ANGLE ) ),
     m_aAngleDial( this, SchResId( CT_ANGLE_DIAL ) ),
     m_aFT_Degrees( this, SchResId( FT_ROTATION_DEGREES ) ),
-    m_aNF_StartingAngle( this, SchResId( NF_STARTING_ANGLE ) )
+    m_aNF_StartingAngle( this, SchResId( NF_STARTING_ANGLE ) ),
+    m_aFL_PlotOptions( this, SchResId( FL_PLOT_OPTIONS_POLAR ) ),
+    m_aCB_IncludeHiddenCells( this, SchResId( CB_INCLUDE_HIDDEN_CELLS_POLAR ) )
 {
     FreeResource();
 
     if( m_aCB_Clockwise.IsVisible() )
         rOutAttrs.Put(SfxBoolItem(SCHATTR_CLOCKWISE,m_aCB_Clockwise.IsChecked()));
 
+    if (m_aCB_IncludeHiddenCells.IsVisible())
+        rOutAttrs.Put(SfxBoolItem(SCHATTR_INCLUDE_HIDDEN_CELLS, m_aCB_IncludeHiddenCells.IsChecked()));
+
     return TRUE;
 }
 
     {
         m_aCB_Clockwise.Show(FALSE);
     }
+    if (rInAttrs.GetItemState(SCHATTR_INCLUDE_HIDDEN_CELLS, TRUE, &pPoolItem) == SFX_ITEM_SET)
+    {
+        bool bVal = static_cast<const SfxBoolItem*>(pPoolItem)->GetValue();
+        m_aCB_IncludeHiddenCells.Check(bVal);
+    }
+    else
+    {
+        m_aCB_IncludeHiddenCells.Show(FALSE);
+        m_aFL_PlotOptions.Show(FALSE);
+    }
 }
 
 //.............................................................................

chart2/source/controller/dialogs/tp_PolarOptions.hrc

  *
  ************************************************************************/
 
+#include "ResourceIds.hrc"
+
 #define CB_CLOCKWISE 1
+#define CB_INCLUDE_HIDDEN_CELLS_POLAR 2
 
 #define FL_STARTING_ANGLE 1
+#define FL_PLOT_OPTIONS_POLAR 2
 
 #define CT_ANGLE_DIAL 1
 

chart2/source/controller/dialogs/tp_PolarOptions.hxx

     svx::DialControl m_aAngleDial;
     FixedText        m_aFT_Degrees;
     NumericField     m_aNF_StartingAngle;
+
+    FixedLine        m_aFL_PlotOptions;
+    CheckBox         m_aCB_IncludeHiddenCells;
 };
 
 //.............................................................................

chart2/source/controller/dialogs/tp_PolarOptions.src

  *
  ************************************************************************/
 
-#include "TabPages.hrc"
 #include "tp_PolarOptions.hrc"
 #include "HelpIds.hrc"
 
     };
     FixedLine FL_STARTING_ANGLE
     {
-        Pos = MAP_APPFONT ( 12 , 21  ) ;
-        Size = MAP_APPFONT ( 242 , 12 ) ;
+        Pos = MAP_APPFONT ( 6 , 21  ) ;
+        Size = MAP_APPFONT ( 248 , 12 ) ;
         Text [ en-US ] = "Starting angle" ;
     };
     Control CT_ANGLE_DIAL
         Maximum = 359 ;
         SpinSize = 5 ;
     };
+    FixedLine FL_PLOT_OPTIONS_POLAR
+    {
+        Pos = MAP_APPFONT ( 6 , 90  ) ;
+        Size = MAP_APPFONT ( 248 , 8 ) ;
+        Text [ en-US ] = "Plot options";
+    };
+    CheckBox CB_INCLUDE_HIDDEN_CELLS_POLAR
+    {
+        Pos = MAP_APPFONT ( 12 , 104 ) ;
+        Size = MAP_APPFONT ( 200 , 10 ) ;
+        TabStop = TRUE ;
+        Text [ en-US ] = "Include ~values from hidden cells";
+    };
 };

chart2/source/controller/dialogs/tp_SeriesToAxis.cxx

 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_chart2.hxx"
 #include "tp_SeriesToAxis.hxx"
+#include "tp_SeriesToAxis.hrc"
 
 #include "ResId.hxx"
-#include "TabPages.hrc"
 #include "chartview/ChartSfxItemIds.hxx"
 #include "NoWarningThisInCTOR.hxx"
 
 #include <svtools/intitem.hxx>
 //SfxIntegerListItem
 #include <svtools/ilstitem.hxx>
+#include <svtools/controldims.hrc>
+
 #include <com/sun/star/chart/MissingValueTreatment.hpp>
 
 //.............................................................................
 	aMTOverlap(this,SchResId(MT_OVERLAP)),
 	aCBConnect(this,SchResId(CB_CONNECTOR)),
     aCBAxisSideBySide(this,SchResId(CB_BARS_SIDE_BY_SIDE)),
-    m_aFL_EmptyCells(this,SchResId(FL_PLOT_MISSING_VALUES)),
+    m_aFL_PlotOptions(this,SchResId(FL_PLOT_OPTIONS)),
+    m_aFT_MissingValues(this,SchResId(FT_MISSING_VALUES)), 
     m_aRB_DontPaint(this,SchResId(RB_DONT_PAINT)),
     m_aRB_AssumeZero(this,SchResId(RB_ASSUME_ZERO)),
     m_aRB_ContinueLine(this,SchResId(RB_CONTINUE_LINE)),
+    m_aCBIncludeHiddenCells(this,SchResId(CB_INCLUDE_HIDDEN_CELLS)), 
     m_bProvidesSecondaryYAxis(true),
     m_bProvidesOverlapAndGapWidth(false)
 {
     else if(m_aRB_ContinueLine.IsChecked())
         rOutAttrs.Put(SfxInt32Item(SCHATTR_MISSING_VALUE_TREATMENT,::com::sun::star::chart::MissingValueTreatment::CONTINUE));
 
+    if (m_aCBIncludeHiddenCells.IsVisible())
+        rOutAttrs.Put(SfxBoolItem(SCHATTR_INCLUDE_HIDDEN_CELLS, m_aCBIncludeHiddenCells.IsChecked()));
+
 	return TRUE;
 }
 
         }
         else
         {
+            m_aFT_MissingValues.Show(FALSE);
             m_aRB_DontPaint.Show(FALSE);
             m_aRB_AssumeZero.Show(FALSE);
             m_aRB_ContinueLine.Show(FALSE);
-		    m_aFL_EmptyCells.Show(FALSE);
         }
     }
 
+    // Include hidden cells
+    if (rInAttrs.GetItemState(SCHATTR_INCLUDE_HIDDEN_CELLS, TRUE, &pPoolItem) == SFX_ITEM_SET)
+    {
+        bool bVal = static_cast<const SfxBoolItem*>(pPoolItem)->GetValue();
+        m_aCBIncludeHiddenCells.Check(bVal);
+    }
+    else
+    {
+        m_aCBIncludeHiddenCells.Show(FALSE);
+        if(!m_aFT_MissingValues.IsVisible())
+            m_aFL_PlotOptions.Show(FALSE);
+    }
+
     AdaptControlPositionsAndVisibility();
 }
 
     AdaptControlPositionsAndVisibility();
 }
 
+void lcl_offsetControl(Control& rCtrl, long nXOffset, long nYOffset )
+{
+    Point aPos = rCtrl.GetPosPixel();
+    rCtrl.SetPosPixel( Point(aPos.getX() + nXOffset, aPos.getY() + nYOffset) );
+}
+
+void lcl_optimzeRadioButtonSize( RadioButton& rCtrl )
+{
+    rCtrl.SetSizePixel( rCtrl.CalcMinimumSize() );
+}
+
 void SchOptionTabPage::AdaptControlPositionsAndVisibility()
 {
     aRbtAxis1.Show(m_bProvidesSecondaryYAxis);
 	    else
             aPos = aGrpBar.GetPosPixel();
 
-        long nDiffX = aRbtAxis1.GetPosPixel().getX() - aGrpAxis.GetPosPixel().getX();
-        long nDiffY = aRbtAxis1.GetPosPixel().getY() - aGrpAxis.GetPosPixel().getY();
-        long nDiffY1 = aRbtAxis2.GetPosPixel().getY() - aRbtAxis1.GetPosPixel().getY();
-
-        m_aFL_EmptyCells.SetPosPixel( aPos );
-        m_aRB_DontPaint.SetPosPixel( Point( aPos.getX() + nDiffX, aPos.getY() + nDiffY ) );
-        m_aRB_AssumeZero.SetPosPixel( Point( aPos.getX() + nDiffX, aPos.getY() + nDiffY + nDiffY1  ) );
-        m_aRB_ContinueLine.SetPosPixel( Point( aPos.getX() + nDiffX, aPos.getY() + nDiffY + nDiffY1 * 2 ) );
+        long nYOffset = aPos.getY() - m_aFL_PlotOptions.GetPosPixel().getY();
+        lcl_offsetControl(m_aFL_PlotOptions,       0, nYOffset);
+        lcl_offsetControl(m_aFT_MissingValues,     0, nYOffset);
+        lcl_offsetControl(m_aRB_DontPaint,         0, nYOffset);
+        lcl_offsetControl(m_aRB_AssumeZero,        0, nYOffset);
+        lcl_offsetControl(m_aRB_ContinueLine,      0, nYOffset);
+        lcl_offsetControl(m_aCBIncludeHiddenCells, 0, nYOffset);
     }
 
-    if( !m_aRB_DontPaint.IsVisible() )
+    m_aFT_MissingValues.SetSizePixel( m_aFT_MissingValues.CalcMinimumSize() );
+    lcl_optimzeRadioButtonSize( m_aRB_DontPaint );
+    lcl_optimzeRadioButtonSize( m_aRB_AssumeZero );
+    lcl_optimzeRadioButtonSize( m_aRB_ContinueLine );
+
+    Size aControlDistance( m_aFT_MissingValues.LogicToPixel( Size(RSC_SP_CTRL_DESC_X,RSC_SP_CTRL_GROUP_Y), MapMode(MAP_APPFONT) ) );
+    long nXOffset = m_aFT_MissingValues.GetPosPixel().getX() + m_aFT_MissingValues.GetSizePixel().getWidth() + aControlDistance.getWidth() - m_aRB_DontPaint.GetPosPixel().getX();
+    lcl_offsetControl(m_aRB_DontPaint,         nXOffset, 0);
+    lcl_offsetControl(m_aRB_AssumeZero,        nXOffset, 0);
+    lcl_offsetControl(m_aRB_ContinueLine,      nXOffset, 0);
+    
+    if( !m_aFT_MissingValues.IsVisible() )
     {
-        m_aRB_ContinueLine.SetPosPixel( m_aRB_AssumeZero.GetPosPixel() );
-        m_aRB_AssumeZero.SetPosPixel( m_aRB_DontPaint.GetPosPixel() );
+        //for example for stock charts
+        m_aCBIncludeHiddenCells.SetPosPixel( m_aFT_MissingValues.GetPosPixel() );
     }
 }
 //.............................................................................

chart2/source/controller/dialogs/tp_SeriesToAxis.hrc

+/*************************************************************************
+ *
+ * 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: ,v $
+ * $Revision: $
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+#include "ResourceIds.hrc"
+
+#define GRP_OPT_AXIS				1
+#define RBT_OPT_AXIS_1				2
+#define RBT_OPT_AXIS_2				3
+#define MT_GAP						4
+#define MT_OVERLAP					5
+#define FT_GAP						6
+#define FT_OVERLAP					7
+#define GB_BAR						8
+#define CB_CONNECTOR				9
+#define CB_BARS_SIDE_BY_SIDE       10
+#define FL_PLOT_OPTIONS            11
+#define FT_MISSING_VALUES          12
+#define RB_DONT_PAINT              13
+#define RB_ASSUME_ZERO             14
+#define RB_CONTINUE_LINE           15
+#define CB_INCLUDE_HIDDEN_CELLS    16

chart2/source/controller/dialogs/tp_SeriesToAxis.hxx

     CheckBox	aCBConnect;
     CheckBox    aCBAxisSideBySide;
 
-    FixedLine   m_aFL_EmptyCells;
+    FixedLine   m_aFL_PlotOptions;
+    FixedText   m_aFT_MissingValues;
     RadioButton m_aRB_DontPaint;
     RadioButton m_aRB_AssumeZero;
     RadioButton m_aRB_ContinueLine;
 
+    CheckBox    m_aCBIncludeHiddenCells;
+
     DECL_LINK(EnableHdl, RadioButton * );
 
     sal_Int32   m_nAllSeriesAxisIndex;

chart2/source/controller/dialogs/tp_SeriesToAxis.src

  *
  ************************************************************************/
 #include "HelpIds.hrc"
-#include "TabPages.hrc"
+#include "tp_SeriesToAxis.hrc"
 
 TabPage TP_OPTIONS
 {
         Pos = MAP_APPFONT ( 12 , 97 ) ;
 		Size = MAP_APPFONT ( 200 , 10 ) ;
 		TabStop = TRUE ;
-		Text [ en-US ] = "Connection Lines";
+        Text [ en-US ] = "Connection lines";
 	};
 
     CheckBox CB_BARS_SIDE_BY_SIDE
         Text [ en-US ] = "Show ~bars side by side";
     };
     
-    FixedLine FL_PLOT_MISSING_VALUES
+    FixedLine FL_PLOT_OPTIONS
     {
         Pos = MAP_APPFONT ( 6 , 113  ) ;
         Size = MAP_APPFONT ( 248 , 8 ) ;
+        Text [ en-US ] = "Plot options";
+    };
+
+    FixedText FT_MISSING_VALUES
+    {
+        Pos = MAP_APPFONT ( 12 , 127  ) ;
+        Size = MAP_APPFONT ( 80 , 8 ) ;
         Text [ en-US ] = "Plot missing values";
     };
     
     RadioButton RB_DONT_PAINT
     {
-        Pos = MAP_APPFONT ( 12 , 127  ) ;
+        Pos = MAP_APPFONT ( 82 , 127  ) ;
         Size = MAP_APPFONT ( 80 , 10 ) ;
         TabStop = TRUE ;
         Text [ en-US ] = "~Leave gap";  
     
     RadioButton RB_ASSUME_ZERO
     {
-        Pos = MAP_APPFONT ( 12 , 141  ) ;
+        Pos = MAP_APPFONT ( 82 , 141  ) ;
         Size = MAP_APPFONT ( 80 , 10 ) ;
         TabStop = TRUE ;
         Text [ en-US ] = "~Assume zero";  
     
     RadioButton RB_CONTINUE_LINE
     {
-        Pos = MAP_APPFONT ( 12 , 155  ) ;
+        Pos = MAP_APPFONT ( 82 , 155  ) ;
         Size = MAP_APPFONT ( 80 , 10 ) ;
         TabStop = TRUE ;
         Text [ en-US ] = "~Continue line";  
-    };  
+    };
+      
+    CheckBox CB_INCLUDE_HIDDEN_CELLS
+    {
+        Pos = MAP_APPFONT ( 12 , 172 ) ;
+        Size = MAP_APPFONT ( 200 , 10 ) ;
+        TabStop = TRUE ;
+        Text [ en-US ] = "Include ~values from hidden cells";
+    };
 };

chart2/source/controller/inc/SeriesOptionsItemConverter.hxx

 
     ::com::sun::star::uno::Sequence< sal_Int32 > m_aSupportedMissingValueTreatments;
     sal_Int32 m_nMissingValueTreatment;
+
+    bool m_bSupportingPlottingOfHiddenCells;
+    bool m_bIncludeHiddenCells;
 };
 
 } //  namespace wrapper

chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx

     SCHATTR_STARTING_ANGLE,SCHATTR_STARTING_ANGLE, \
     SCHATTR_CLOCKWISE,SCHATTR_CLOCKWISE, \
     SCHATTR_MISSING_VALUE_TREATMENT,SCHATTR_MISSING_VALUE_TREATMENT, \
-    SCHATTR_AVAILABLE_MISSING_VALUE_TREATMENTS,SCHATTR_AVAILABLE_MISSING_VALUE_TREATMENTS
+    SCHATTR_AVAILABLE_MISSING_VALUE_TREATMENTS,SCHATTR_AVAILABLE_MISSING_VALUE_TREATMENTS, \
+    SCHATTR_INCLUDE_HIDDEN_CELLS,SCHATTR_INCLUDE_HIDDEN_CELLS
 
 const USHORT nSeriesOptionsWhichPairs[] =
 {

chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx

         , m_bClockwise(false)
         , m_aSupportedMissingValueTreatments()
         , m_nMissingValueTreatment(0)
+        , m_bSupportingPlottingOfHiddenCells(false)
+        , m_bIncludeHiddenCells(true)
 {
     try
     {
         m_aSupportedMissingValueTreatments = ChartTypeHelper::getSupportedMissingValueTreatments( xChartType );
         m_nMissingValueTreatment = DiagramHelper::getCorrectedMissingValueTreatment(
             ChartModelHelper::findDiagram(m_xChartModel), xChartType );
+
+        uno::Reference< XChartDocument > xChartDoc( m_xChartModel, uno::UNO_QUERY );
+        uno::Reference< beans::XPropertySet > xProp( xChartDoc->getDataProvider(), uno::UNO_QUERY );
+        if( xProp.is() )
+        {
+            try
+            {
+                //test whether the data provider offers this property
+                xProp->getPropertyValue(C2U("IncludeHiddenCells"));
+                //if not exception is thrown the property is offered
+                m_bSupportingPlottingOfHiddenCells = true;
+                xDiagramProperties->getPropertyValue( C2U("IncludeHiddenCells") ) >>= m_bIncludeHiddenCells;
+            }
+            catch( const beans::UnknownPropertyException& )
+            {
+            }
+        }
     }
     catch( uno::Exception ex )
     {
             }
         }
         break;
+        case SCHATTR_INCLUDE_HIDDEN_CELLS:
+        {
+            if( m_bSupportingPlottingOfHiddenCells )
+            {
+                bool bIncludeHiddenCells = static_cast<const SfxBoolItem &>(rItemSet.Get(nWhichId)).GetValue();
+                if (bIncludeHiddenCells != m_bIncludeHiddenCells)
+                    bChanged = ChartModelHelper::setIncludeHiddenCells( bIncludeHiddenCells, m_xChartModel );
+            }
+        }
+        break;
     }
     return bChanged;
 }
             rOutItemSet.Put( SfxIntegerListItem( nWhichId, aList ) );
             break;
         }
+        case SCHATTR_INCLUDE_HIDDEN_CELLS:
+        {
+            if( m_bSupportingPlottingOfHiddenCells )
+                rOutItemSet.Put( SfxBoolItem(nWhichId, m_bIncludeHiddenCells) );
+            break;
+        }
         default:
             break;
    }

chart2/source/inc/CachedDataSequence.hxx

     // <properties>
     sal_Int32                                       m_nNumberFormatKey;
     ::rtl::OUString                                 m_sRole;
-    sal_Bool                                        m_bIsHidden;
-    ::com::sun::star::uno::Sequence< sal_Int32 >    m_aHiddenValues;
     // </properties>
 
     enum DataType

chart2/source/inc/ChartModelHelper.hxx

 
     static void triggerRangeHighlighting( const ::com::sun::star::uno::Reference<
                                 ::com::sun::star::frame::XModel >& xModel );
+
+    static bool isIncludeHiddenCells( const ::com::sun::star::uno::Reference<
+                                ::com::sun::star::frame::XModel >& xChartModel );
+
+    static bool setIncludeHiddenCells( bool bIncludeHiddenCells, const ::com::sun::star::uno::Reference<
+                                ::com::sun::star::frame::XModel >& xChartModel );
 };
 
 //.............................................................................

chart2/source/inc/DataSeriesHelper.hxx

 
 #include <vector>
 #include <functional>
+#include <hash_set>
 
 namespace chart
 {
         const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType,
         sal_Int32 & rOutAxisIndex );
 
+OOO_DLLPUBLIC_CHARTTOOLS bool hasUnhiddenData( const ::com::sun::star::uno::Reference<
+        ::com::sun::star::chart2::XDataSeries >& xSeries );
+
+OOO_DLLPUBLIC_CHARTTOOLS
+sal_Int32 translateIndexFromHiddenToFullSequence( sal_Int32 nClippedIndex, const ::com::sun::star::uno::Reference<
+        ::com::sun::star::chart2::data::XDataSequence >& xDataSequence, bool bTranslate );
+
 } //  namespace DataSeriesHelper
 } //  namespace chart
 

chart2/source/inc/RangeHighlighter.hxx

     ::com::sun::star::uno::Sequence< ::com::sun::star::chart2::data::HighlightedRange >
         m_aSelectedRanges;
     sal_Int32 m_nAddedListenerCount;
+    bool m_bIncludeHiddenCells;
 };
 
 } //  namespace chart

chart2/source/inc/UncachedDataSequence.hxx

     // <properties>
     sal_Int32                                       m_nNumberFormatKey;
     ::rtl::OUString                                 m_sRole;
-    sal_Bool                                        m_bIsHidden;
-    ::com::sun::star::uno::Sequence< sal_Int32 >    m_aHiddenValues;
     ::rtl::OUString                                 m_aXMLRange;
     // </properties>
 

chart2/source/inc/chartview/ChartSfxItemIds.hxx

 #define SCHATTR_CLOCKWISE               (SCHATTR_CHARTTYPE_START + 10)
 #define SCHATTR_MISSING_VALUE_TREATMENT     (SCHATTR_CHARTTYPE_START + 11)
 #define SCHATTR_AVAILABLE_MISSING_VALUE_TREATMENTS (SCHATTR_CHARTTYPE_START + 12)
+#define SCHATTR_INCLUDE_HIDDEN_CELLS    (SCHATTR_CHARTTYPE_START + 13)
 
-#define SCHATTR_CHARTTYPE_END           SCHATTR_AVAILABLE_MISSING_VALUE_TREATMENTS
+#define SCHATTR_CHARTTYPE_END           SCHATTR_INCLUDE_HIDDEN_CELLS
 
 // items for transporting information to dialogs
 #define SCHATTR_MISC_START              (SCHATTR_CHARTTYPE_END + 1)

chart2/source/model/main/ChartModel.cxx

 #include "DisposeHelper.hxx"
 #include "ControllerLockGuard.hxx"
 #include "ObjectIdentifier.hxx"
+#include "ChartModelHelper.hxx"
+
 #include <comphelper/InlineContainer.hxx>
 #include <comphelper/processfactory.hxx>
 
     {
         // /--
         MutexGuard aGuard( m_aModelMutex );
+        uno::Reference< beans::XPropertySet > xProp( xProvider, uno::UNO_QUERY );
+        if( xProp.is() )
+        {
+            try
+            {
+                sal_Bool bIncludeHiddenCells = ChartModelHelper::isIncludeHiddenCells( Reference< frame::XModel >(this) );
+                xProp->setPropertyValue(C2U("IncludeHiddenCells"), uno::makeAny(bIncludeHiddenCells));
+            }
+            catch( const beans::UnknownPropertyException& )
+            {
+            }
+        }
+
         m_pImplChartModel->SetDataProvider( xProvider );
         // \--
     }

chart2/source/model/main/ChartModel_Persistence.cxx

 #include "ChartDebugTrace.hxx"
 #include "macros.hxx"
 #include "ChartViewHelper.hxx"
+#include "ChartModelHelper.hxx"
 #include <com/sun/star/container/XNameAccess.hpp>
 #include <com/sun/star/document/XExporter.hpp>
 #include <com/sun/star/document/XImporter.hpp>
     try
     {
         m_pImplChartModel->CreateDefaultChart();
+        ChartModelHelper::setIncludeHiddenCells( false, this );
     }
     catch( uno::Exception & ex )
     {

chart2/source/model/main/Diagram.cxx

     PROP_DIAGRAM_SORT_BY_X_VALUES,
     PROP_DIAGRAM_CONNECT_BARS,
     PROP_DIAGRAM_GROUP_BARS_PER_AXIS,
+    PROP_DIAGRAM_INCLUDE_HIDDEN_CELLS,
     PROP_DIAGRAM_STARTING_ANGLE,
     PROP_DIAGRAM_RIGHT_ANGLED_AXES,
     PROP_DIAGRAM_PERSPECTIVE,
                   | beans::PropertyAttribute::MAYBEDEFAULT ));
 
     rOutProperties.push_back(
+        Property( C2U("IncludeHiddenCells"),
+                  PROP_DIAGRAM_INCLUDE_HIDDEN_CELLS,
+                  ::getBooleanCppuType(),
+                  beans::PropertyAttribute::BOUND
+                  | beans::PropertyAttribute::MAYBEDEFAULT ));
+
+    rOutProperties.push_back(
         Property( C2U( "StartingAngle" ),
                   PROP_DIAGRAM_STARTING_ANGLE,
                   ::getCppuType( reinterpret_cast< const sal_Int32 * >(0) ),
     ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DIAGRAM_SORT_BY_X_VALUES, false );
     ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DIAGRAM_CONNECT_BARS, false );
     ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DIAGRAM_GROUP_BARS_PER_AXIS, true );
+    ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DIAGRAM_INCLUDE_HIDDEN_CELLS, true );
     ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DIAGRAM_RIGHT_ANGLED_AXES, false );
     ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_DIAGRAM_STARTING_ANGLE, 90 );
 }

chart2/source/tools/CachedDataSequence.cxx

 {
 //     PROP_SOURCE_IDENTIFIER,
     PROP_NUMBERFORMAT_KEY,
-    PROP_PROPOSED_ROLE,
-    PROP_HIDDEN,
-    PROP_HIDDEN_VALUES
+    PROP_PROPOSED_ROLE
 };
 }  // anonymous namespace
 
 CachedDataSequence::CachedDataSequence()
         : OPropertyContainer( GetBroadcastHelper()),
           CachedDataSequence_Base( GetMutex()),
-          m_bIsHidden( true ),
           m_eCurrentDataType( NUMERICAL ),
           m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder())
 {
 CachedDataSequence::CachedDataSequence( const Reference< uno::XComponentContext > & /*xContext*/ )
         : OPropertyContainer( GetBroadcastHelper()),
           CachedDataSequence_Base( GetMutex()),
-          m_bIsHidden( true ),
           m_eCurrentDataType( MIXED ),
           m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder( ))
 {
 CachedDataSequence::CachedDataSequence( const ::std::vector< double > & rVector )
         : OPropertyContainer( GetBroadcastHelper()),
           CachedDataSequence_Base( GetMutex()),
-          m_bIsHidden( true ),
           m_eCurrentDataType( NUMERICAL ),
           m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder())
 {
 CachedDataSequence::CachedDataSequence( const ::std::vector< OUString > & rVector )
         : OPropertyContainer( GetBroadcastHelper()),
           CachedDataSequence_Base( GetMutex()),
-          m_bIsHidden( true ),
           m_eCurrentDataType( TEXTUAL ),
           m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder())
 {
 CachedDataSequence::CachedDataSequence( const OUString & rSingleText )
         : OPropertyContainer( GetBroadcastHelper()),
           CachedDataSequence_Base( GetMutex()),
-          m_bIsHidden( true ),
           m_eCurrentDataType( TEXTUAL ),
           m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder())
 {
 CachedDataSequence::CachedDataSequence( const ::std::vector< Any > & rVector )
         : OPropertyContainer( GetBroadcastHelper()),
           CachedDataSequence_Base( GetMutex()),
-          m_bIsHidden( true ),
           m_eCurrentDataType( MIXED ),
           m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder())
 {
           CachedDataSequence_Base( GetMutex()),
           m_nNumberFormatKey( rSource.m_nNumberFormatKey ),
           m_sRole( rSource.m_sRole ),
-          m_bIsHidden( rSource.m_bIsHidden ),
-          m_aHiddenValues( rSource.m_aHiddenValues ),
           m_eCurrentDataType( rSource.m_eCurrentDataType ),
           m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder())
 {
                       0,   // PropertyAttributes
                       & m_sRole,
                       ::getCppuType( & m_sRole ) );
-
-    registerProperty( C2U( "IsHidden" ),
-                      PROP_HIDDEN,
-                      0,   // PropertyAttributes
-                      & m_bIsHidden,
-                      ::getCppuType( & m_bIsHidden ) );
-
-    registerProperty( C2U( "HiddenValues" ),
-                      PROP_HIDDEN_VALUES,
-                      0,   // PropertyAttributes
-                      & m_aHiddenValues,
-                      ::getCppuType( & m_aHiddenValues ) );
 }
 
 Sequence< double > CachedDataSequence::Impl_getNumericalData() const

chart2/source/tools/ChartModelHelper.cxx

 #include "ChartModelHelper.hxx"
 #include "macros.hxx"
 #include "DiagramHelper.hxx"
+#include "DataSourceHelper.hxx"
+#include "ControllerLockGuard.hxx"
+
 #include <com/sun/star/chart2/data/XDataReceiver.hpp>
 #include <com/sun/star/chart2/XChartDocument.hpp>
 #include <com/sun/star/chart2/XChartTypeContainer.hpp>
     }
 }
 
+bool ChartModelHelper::isIncludeHiddenCells( const uno::Reference< frame::XModel >& xChartModel )
+{
+    bool bIncluded = true;  // hidden cells are included by default.
+
+    uno::Reference< chart2::XDiagram > xDiagram( ChartModelHelper::findDiagram(xChartModel) );
+    if (!xDiagram.is())
+        return bIncluded;
+
+    uno::Reference< beans::XPropertySet > xProp( xDiagram, uno::UNO_QUERY );
+    if (!xProp.is())
+        return bIncluded;
+
+    try
+    {
+        xProp->getPropertyValue(C2U("IncludeHiddenCells")) >>= bIncluded;
+    }
+    catch( const beans::UnknownPropertyException& )
+    {
+    }
+
+    return bIncluded;
+}
+
+bool ChartModelHelper::setIncludeHiddenCells( bool bIncludeHiddenCells, const uno::Reference< frame::XModel >& xChartModel )
+{
+    bool bChanged = false;
+    try
+    {
+        ControllerLockGuard aLockedControllers( xChartModel );
+
+        uno::Reference< beans::XPropertySet > xDiagramProperties( ChartModelHelper::findDiagram(xChartModel), uno::UNO_QUERY );
+        if (xDiagramProperties.is())
+        {
+            bool bOldValue = bIncludeHiddenCells;
+            xDiagramProperties->getPropertyValue( C2U("IncludeHiddenCells") ) >>= bOldValue;
+            if( bOldValue == bIncludeHiddenCells )
+                bChanged = true;
+
+            //set the property on all instances in all cases to get the different objects in sync!
+
+            uno::Any aNewValue = uno::makeAny(bIncludeHiddenCells);
+
+            try
+            {
+                uno::Reference< chart2::XChartDocument > xChartDoc( xChartModel, uno::UNO_QUERY );
+                if( xChartDoc.is() )
+                {
+                    uno::Reference< beans::XPropertySet > xDataProviderProperties( xChartDoc->getDataProvider(), uno::UNO_QUERY );
+                    if( xDataProviderProperties.is() )
+                        xDataProviderProperties->setPropertyValue(C2U("IncludeHiddenCells"), aNewValue );
+                }
+            }
+            catch( const beans::UnknownPropertyException& )
+            {
+                //the property is optional!
+            }
+
+            try
+            {
+                uno::Reference< chart2::data::XDataSource > xUsedData( DataSourceHelper::getUsedData( xChartModel ) );
+                if( xUsedData.is() )
+                {
+                    uno::Reference< beans::XPropertySet > xProp;
+                    uno::Sequence< uno::Reference< chart2::data::XLabeledDataSequence > > aData( xUsedData->getDataSequences());
+                    for( sal_Int32 i=0; i<aData.getLength(); ++i )
+                    {
+                        xProp.set( uno::Reference< beans::XPropertySet >( aData[i]->getValues(), uno::UNO_QUERY ) );
+                        if(xProp.is())
+                            xProp->setPropertyValue(C2U("IncludeHiddenCells"), aNewValue );
+                        xProp.set( uno::Reference< beans::XPropertySet >( aData[i]->getLabel(), uno::UNO_QUERY ) );
+                        if(xProp.is())
+                            xProp->setPropertyValue(C2U("IncludeHiddenCells"), aNewValue );
+                    }
+                }
+            }
+            catch( const beans::UnknownPropertyException& )
+            {
+                //the property is optional!
+            }
+            
+            xDiagramProperties->setPropertyValue( C2U("IncludeHiddenCells"), aNewValue);
+        }
+    }
+    catch (uno::Exception& e)
+    {
+        ASSERT_EXCEPTION(e);
+    }
+    return bChanged;
+}
+
 //.............................................................................
 } //namespace chart
 //.............................................................................

chart2/source/tools/DataSeriesHelper.cxx

     }
 }
 
+namespace
+{
+
+bool lcl_SequenceHasUnhiddenData( const uno::Reference< chart2::data::XDataSequence >& xDataSequence )
+{
+    if( !xDataSequence.is() )
+        return false;
+    uno::Reference< beans::XPropertySet > xProp( xDataSequence, uno::UNO_QUERY );
+    if( xProp.is() )
+    {
+        uno::Sequence< sal_Int32 > aHiddenValues;
+        try
+        {
+            xProp->getPropertyValue( C2U( "HiddenValues" ) ) >>= aHiddenValues;
+            if( !aHiddenValues.getLength() )
+                return true;
+        }
+        catch( uno::Exception& e )
+        {
+            (void)e; // avoid warning
+            return true;
+        }
+    }
+    if( xDataSequence->getData().getLength() )
+        return true;
+    return false;
+}
+
+}
+
+bool hasUnhiddenData( const uno::Reference< chart2::XDataSeries >& xSeries )
+{
+    uno::Reference< chart2::data::XDataSource > xDataSource =
+        uno::Reference< chart2::data::XDataSource >( xSeries, uno::UNO_QUERY );
+
+    uno::Sequence< uno::Reference< chart2::data::XLabeledDataSequence > > aDataSequences = xDataSource->getDataSequences();
+
+    for(sal_Int32 nN = aDataSequences.getLength();nN--;)
+    {
+        if( !aDataSequences[nN].is() )
+            continue;
+        if( lcl_SequenceHasUnhiddenData( aDataSequences[nN]->getValues() ) )
+            return true;
+        if( lcl_SequenceHasUnhiddenData( aDataSequences[nN]->getLabel() ) )
+            return true;
+    }
+    return false;
+}
+
+struct lcl_LessIndex
+{
+    inline bool operator() ( const sal_Int32& first, const sal_Int32& second )
+    {
+        return ( first < second );
+    }
+};
+
+sal_Int32 translateIndexFromHiddenToFullSequence( sal_Int32 nIndex, const Reference< chart2::data::XDataSequence >& xDataSequence, bool bTranslate )
+{
+    if( !bTranslate )
+        return nIndex;
+
+    try
+    {
+        uno::Reference<beans::XPropertySet> xProp( xDataSequence, uno::UNO_QUERY );
+	    if( xProp.is())
+        {
+            Sequence<sal_Int32> aHiddenIndicesSeq;
+            xProp->getPropertyValue( C2U("HiddenValues") ) >>= aHiddenIndicesSeq;
+            if( aHiddenIndicesSeq.getLength() )
+            {
+                ::std::vector< sal_Int32 > aHiddenIndices( ContainerHelper::SequenceToVector( aHiddenIndicesSeq ) );
+                ::std::sort( aHiddenIndices.begin(), aHiddenIndices.end(), lcl_LessIndex() );
+
+                sal_Int32 nHiddenCount = static_cast<sal_Int32>(aHiddenIndices.size());
+                for( sal_Int32 nN = 0; nN < nHiddenCount; ++nN)
+                {
+                    if( aHiddenIndices[nN] <= nIndex )
+                        nIndex += 1;
+                    else
+                        break;
+                }
+            }
+        }
+    }
+    catch (const beans::UnknownPropertyException&)
+    {
+    }
+    return nIndex;
+}
+
 } //  namespace DataSeriesHelper
 } //  namespace chart

chart2/source/tools/ImplUndoManager.cxx

 #include "ControllerLockGuard.hxx"
 #include "PropertyHelper.hxx"
 #include "DataSourceHelper.hxx"
+#include "ChartModelHelper.hxx"
 
 #include <com/sun/star/chart/XChartDataArray.hpp>
 #include <com/sun/star/chart2/XChartDocument.hpp>
             Reference< chart2::XChartDocument > xSource( xModelToCopyFrom, uno::UNO_QUERY_THROW );
             Reference< chart2::XChartDocument > xDestination( xInOutModelToChange, uno::UNO_QUERY_THROW );
 
+            // propagate the correct flag for plotting of hidden values to the data provider and all used sequences
+            ChartModelHelper::setIncludeHiddenCells( ChartModelHelper::isIncludeHiddenCells( xModelToCopyFrom ) , xInOutModelToChange );
+
             // diagram
             xDestination->setFirstDiagram( xSource->getFirstDiagram());
 

chart2/source/tools/RangeHighlighter.cxx

 #include "ContainerHelper.hxx"
 #include "macros.hxx"
 #include "ObjectIdentifier.hxx"
+#include "DataSeriesHelper.hxx"
 
 #include <com/sun/star/chart2/XDataSeries.hpp>
 #include <com/sun/star/chart/ErrorBarStyle.hpp>
     const Reference< view::XSelectionSupplier > & xSelectionSupplier ) :
         impl::RangeHighlighter_Base( m_aMutex ),
         m_xSelectionSupplier( xSelectionSupplier ),
-        m_nAddedListenerCount( 0 )
+        m_nAddedListenerCount( 0 ),
+        m_bIncludeHiddenCells(true)
 {
 }
 
             if( xController.is())
                 xChartModel.set( xController->getModel());
 
+            m_bIncludeHiddenCells = ChartModelHelper::isIncludeHiddenCells( xChartModel );
+
             uno::Any aSelection( m_xSelectionSupplier->getSelection());
             OUString aCID;
             if(( aSelection >>= aCID ) &&
                             -1,
                             nPreferredColor,
                             sal_False ));
+
+                sal_Int32 nUnhiddenIndex = DataSeriesHelper::translateIndexFromHiddenToFullSequence( nIndex, xValues, !m_bIncludeHiddenCells );
                 if( xValues.is())
                     aHilightedRanges.push_back(
                         chart2::data::HighlightedRange(
                             xValues->getSourceRangeRepresentation(),
-                            nIndex,
+                            nUnhiddenIndex,
                             nPreferredColor,
                             sal_False ));
             }

chart2/source/tools/UncachedDataSequence.cxx

 //     PROP_SOURCE_IDENTIFIER,
     PROP_NUMBERFORMAT_KEY,
     PROP_PROPOSED_ROLE,
-    PROP_HIDDEN,
-    PROP_HIDDEN_VALUES,
     PROP_XML_RANGE
 };
 }  // anonymous namespace
     const OUString & rRangeRepresentation )
         : OPropertyContainer( GetBroadcastHelper()),
           UncachedDataSequence_Base( GetMutex()),
-          m_bIsHidden( true ),
           m_xDataProvider( xIntDataProv ),
           m_aSourceRepresentation( rRangeRepresentation ),
           m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder())
     const OUString & rRole )
         : OPropertyContainer( GetBroadcastHelper()),
           UncachedDataSequence_Base( GetMutex()),
-          m_bIsHidden( true ),
           m_xDataProvider( xIntDataProv ),
           m_aSourceRepresentation( rRangeRepresentation ),
           m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder())
           UncachedDataSequence_Base( GetMutex()),
           m_nNumberFormatKey( rSource.m_nNumberFormatKey ),
           m_sRole( rSource.m_sRole ),
-          m_bIsHidden( rSource.m_bIsHidden ),
-          m_aHiddenValues( rSource.m_aHiddenValues ),
           m_xDataProvider( rSource.m_xDataProvider ),
           m_aSourceRepresentation( rSource.m_aSourceRepresentation ),
           m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder())
                       & m_sRole,
                       ::getCppuType( & m_sRole ) );
 
-    registerProperty( C2U( "IsHidden" ),
-                      PROP_HIDDEN,
-                      0,   // PropertyAttributes
-                      & m_bIsHidden,
-                      ::getCppuType( & m_bIsHidden ) );
-
-    registerProperty( C2U( "HiddenValues" ),
-                      PROP_HIDDEN_VALUES,
-                      0,   // PropertyAttributes
-                      & m_aHiddenValues,
-                      ::getCppuType( & m_aHiddenValues ) );
-
     registerProperty( C2U( "CachedXMLRange" ),
                       PROP_XML_RANGE,
                       0,   // PropertyAttributes

chart2/source/view/axes/ScaleAutomatism.cxx

         if( m_aSourceScale.AxisType==AxisType::PERCENT )
             rExplicitScale.Minimum = 0.0;
         else if( ::rtl::math::isNan( m_fValueMinimum ) )
-            rExplicitScale.Minimum = 0.0;   //@todo get Minimum from scsaling or from plotter????
+            rExplicitScale.Minimum = 0.0;   //@todo get Minimum from scaling or from plotter????
         else
             rExplicitScale.Minimum = m_fValueMinimum;
     }
     if( bAutoMaximum )
     {
         if( m_aSourceScale.AxisType==AxisType::PERCENT )
-            rExplicitScale.Minimum = 1.0;
+            rExplicitScale.Maximum = 1.0;
         else if( ::rtl::math::isNan( m_fValueMaximum ) )
             rExplicitScale.Maximum = 10.0;  //@todo get Maximum from scaling or from plotter????
         else

chart2/source/view/inc/VDataSeries.hxx

 {
 public:
     void init( const ::com::sun::star::uno::Reference<
-        ::com::sun::star::chart2::data::XDataSequence >& xModel);
+        ::com::sun::star::chart2::data::XDataSequence >& xModel );
     bool is() const;
     void clear();
     double getValue( sal_Int32 index ) const;

chart2/source/view/main/ChartItemPool.cxx

     ppPoolDefaults[SCHATTR_DIAGRAM_STYLE        - SCHATTR_START] = new SvxChartStyleItem( CHSTYLE_2D_COLUMN, SCHATTR_DIAGRAM_STYLE );
     ppPoolDefaults[SCHATTR_TEXTBREAK            - SCHATTR_START] = new SfxBoolItem( SCHATTR_TEXTBREAK, FALSE );
     ppPoolDefaults[SCHATTR_GROUP_BARS_PER_AXIS  - SCHATTR_START] = new SfxBoolItem(SCHATTR_GROUP_BARS_PER_AXIS, FALSE);
+    ppPoolDefaults[SCHATTR_INCLUDE_HIDDEN_CELLS - SCHATTR_START] = new SfxBoolItem(SCHATTR_INCLUDE_HIDDEN_CELLS, TRUE);
     ppPoolDefaults[SCHATTR_STARTING_ANGLE       - SCHATTR_START] = new SfxInt32Item( SCHATTR_STARTING_ANGLE, 90 );
     ppPoolDefaults[SCHATTR_CLOCKWISE            - SCHATTR_START] = new SfxBoolItem( SCHATTR_CLOCKWISE, FALSE );
 

chart2/source/view/main/ChartView.cxx

     sal_Bool bSortByXValues = sal_False;
     sal_Bool bConnectBars = sal_False;
     sal_Bool bGroupBarsPerAxis = sal_True;
+    sal_Bool bIncludeHiddenCells = sal_True;
     sal_Int32 nStartingAngle = 90;
     try
     {
         xDiaProp->getPropertyValue( C2U( "SortByXValues" ) ) >>= bSortByXValues;
         xDiaProp->getPropertyValue( C2U( "ConnectBars" ) ) >>= bConnectBars;
         xDiaProp->getPropertyValue( C2U( "GroupBarsPerAxis" ) ) >>= bGroupBarsPerAxis;
+        xDiaProp->getPropertyValue( C2U( "IncludeHiddenCells" ) ) >>= bIncludeHiddenCells;
         xDiaProp->getPropertyValue( C2U( "StartingAngle" ) ) >>= nStartingAngle;
     }
     catch( const uno::Exception & ex )
                 uno::Reference< XDataSeries > xDataSeries( aSeriesList[nS], uno::UNO_QUERY );
 		        if(!xDataSeries.is())
 			        continue;
+                if( !bIncludeHiddenCells && !DataSeriesHelper::hasUnhiddenData(xDataSeries) )
+                    continue;
+
 		        VDataSeries* pSeries = new VDataSeries( xDataSeries );
 
                 pSeries->setGlobalSeriesIndex(nGlobalSeriesIndex);

chart2/source/view/main/VDataSeries.cxx

 #include "LabelPositionHelper.hxx"
 #include "ChartTypeHelper.hxx"
 #include "ContainerHelper.hxx"
+#include "DataSeriesHelper.hxx"
 #include "MeanValueRegressionCurveCalculator.hxx"
 
 #include <com/sun/star/chart/MissingValueTreatment.hpp>
 using namespace ::com::sun::star::chart2;
 using ::com::sun::star::uno::Reference;
 
-namespace
-{
-    struct lcl_LessIndex
-    {
-        inline bool operator() ( const sal_Int32& first,
-                             const sal_Int32& second )
-        {
-            return ( first < second );
-        }
-    };
-
-    void lcl_removeIndices( uno::Sequence< double >& rValues, const uno::Sequence< sal_Int32 >& rIndicesToRemove )
-    {
-        if( !rIndicesToRemove.getLength() )
-            return;
-
-        ::std::vector< sal_Int32 > aIndicesToRemove( ContainerHelper::SequenceToVector( rIndicesToRemove) );
-        ::std::sort( aIndicesToRemove.begin(), aIndicesToRemove.end(), lcl_LessIndex() );
-        
-        sal_Int32 nTarget=0;
-        sal_Int32 nR = 0;
-        sal_Int32 nRemove = aIndicesToRemove[nR];
-        for( sal_Int32 nSource=0; nSource<rValues.getLength(); nSource++ )
-        {
-            if( nSource<nRemove || nRemove==-1 )
-            {
-                if( nTarget < nSource )
-                    rValues[nTarget]=rValues[nSource];
-                nTarget++;
-                continue;
-            }
-            if( nSource==nRemove )
-            {
-                ++nR;
-                if( nR<static_cast<sal_Int32>(aIndicesToRemove.size()) )
-                    nRemove = aIndicesToRemove[nR];
-                else
-                    nRemove = -1;
-            }
-        }
-
-        if( nTarget>0 )
-            rValues.realloc( nTarget );
-        else
-            rValues.realloc(0);
-    }
-}
-
 void VDataSequence::init( const uno::Reference< data::XDataSequence >& xModel )
 {
-    bool bDisplayHiddenCells = true; //todo: make this configurable in future
-    bool bIsHidden = false;
-    uno::Sequence< sal_Int32 > aHiddenValues;
-    if( !bDisplayHiddenCells )
-    {
-        uno::Reference<beans::XPropertySet> xProp(xModel, uno::UNO_QUERY );
-        if( xProp.is())
-        {
-            try
-            {
-                xProp->getPropertyValue( C2U( "IsHidden" ) ) >>= bIsHidden;
-                xProp->getPropertyValue( C2U( "HiddenValues" ) ) >>= aHiddenValues;
-            }
-            catch( uno::Exception& e )
-            {
-                ASSERT_EXCEPTION( e );
-            }
-        }
-    }
-
     Model = xModel;
-    if( bDisplayHiddenCells || !bIsHidden )
-        Doubles = DataSequenceToDoubleSequence( xModel );
-
-    if( !bDisplayHiddenCells )
-    {
-        if( bIsHidden )
-            Doubles.realloc(0);
-        else if( aHiddenValues.getLength() )
-            lcl_removeIndices( Doubles, aHiddenValues );
-    }
+    Doubles = DataSequenceToDoubleSequence( xModel );
 }
 
 bool VDataSequence::is() const

offapi/com/sun/star/chart2/data/DataProvider.idl

         internally into valid XML.
      */
     [optional] interface ::com::sun::star::chart2::data::XRangeXMLConversion;
+
+    /** If set to false <FALSE/>, values from hidden cells are not returned.
+     */
+    [optional, property] boolean                  IncludeHiddenCells;
 };
 
 } ; // data

offapi/com/sun/star/chart2/data/DataSequence.idl

      */
     [property] DataSequenceRole                   Role;
 
-    /** If <TRUE/>, the values are hidden, and should therefore not be
-        used.  This may result in omitting a complete data series
-        object on rendering.
+    /** If set to false <FALSE/>, values from hidden cells are not returned.
      */
-    [optional, property] boolean                  IsHidden;
+    [optional, property] boolean                  IncludeHiddenCells;
 
-    /** a sequence of indexes that identify data points that should
-        not be rendered, because they are hidden in the underlying
+    /** a sequence of indexes that identify values that are hidden in the underlying
         data provider.
      */
     [optional, property] sequence< long >         HiddenValues;

oox/source/drawingml/chart/chartspaceconverter.cxx

  ************************************************************************/
 
 #include "oox/drawingml/chart/chartspaceconverter.hxx"
+#include <com/sun/star/chart/XChartDocument.hpp>
 #include <com/sun/star/chart2/XChartDocument.hpp>
 #include <com/sun/star/chart2/XTitled.hpp>
 #include <com/sun/star/chart2/data/XDataReceiver.hpp>
 using ::rtl::OUString;
 using ::com::sun::star::uno::Reference;
 using ::com::sun::star::uno::Exception;
+using ::com::sun::star::uno::UNO_QUERY;
 using ::com::sun::star::uno::UNO_QUERY_THROW;
 using ::com::sun::star::util::XNumberFormatsSupplier;
 using ::com::sun::star::chart2::XDiagram;
         PropertySet aDiaProp( xDiagram );
         aDiaProp.setProperty( PROP_MissingValueTreatment, nMissingValues );
     }
+
+    // set the IncludeHiddenCells property via the old API as only this ensures that the data provider and al created sequences get this flag correctly
+    Reference< com::sun::star::chart::XChartDocument > xStandardApiChartDoc( getChartDocument(), UNO_QUERY );
+    if( xStandardApiChartDoc.is() )
+    {
+        PropertySet aStandardApiDiagramProp( xStandardApiChartDoc->getDiagram() );
+        aStandardApiDiagramProp.setProperty( CREATE_OUSTRING("IncludeHiddenCells"), !mrModel.mbPlotVisOnly );
+    }
 }
 
 // ============================================================================

sc/inc/chart2uno.hxx

 #include "rangelst.hxx"
 #include "externalrefmgr.hxx"
 #include "token.hxx"
+#include "chartlis.hxx"
 
 #include <svtools/lstner.hxx>
 #include <com/sun/star/chart/ChartDataRowSource.hpp>
 // #include <com/sun/star/lang/XUnoTunnel.hpp>
 // #endif
 #include <cppuhelper/implbase2.hxx>
-#include <cppuhelper/implbase3.hxx>
 #include <cppuhelper/implbase4.hxx>
 #include <cppuhelper/implbase6.hxx>
 #include <cppuhelper/implbase7.hxx>
 // DataProvider ==============================================================
 
 class ScChart2DataProvider : public
-                ::cppu::WeakImplHelper3<
+                ::cppu::WeakImplHelper4<
                     ::com::sun::star::chart2::data::XDataProvider,
                     ::com::sun::star::chart2::data::XRangeXMLConversion,
+                    ::com::sun::star::beans::XPropertySet,
                     ::com::sun::star::lang::XServiceInfo>,
                 SfxListener
 {
     virtual ::rtl::OUString SAL_CALL convertRangeFromXML( const ::rtl::OUString& sXMLRange )
         throw ( ::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IllegalArgumentException );
 
+    // XPropertySet ----------------------------------------------------------
+
+    virtual ::com::sun::star::uno::Reference<
+        ::com::sun::star::beans::XPropertySetInfo> SAL_CALL
+        getPropertySetInfo() throw( ::com::sun::star::uno::RuntimeException);
+
+    virtual void SAL_CALL setPropertyValue(
+            const ::rtl::OUString& rPropertyName,
+            const ::com::sun::star::uno::Any& rValue)
+        throw( ::com::sun::star::beans::UnknownPropertyException,
+                ::com::sun::star::beans::PropertyVetoException,
+                ::com::sun::star::lang::IllegalArgumentException,
+                ::com::sun::star::lang::WrappedTargetException,
+                ::com::sun::star::uno::RuntimeException);
+
+    virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
+            const ::rtl::OUString& rPropertyName)
+        throw( ::com::sun::star::beans::UnknownPropertyException,
+                ::com::sun::star::lang::WrappedTargetException,
+                ::com::sun::star::uno::RuntimeException);
+
+    virtual void SAL_CALL addPropertyChangeListener(
+            const ::rtl::OUString& rPropertyName,
+            const ::com::sun::star::uno::Reference<
+            ::com::sun::star::beans::XPropertyChangeListener>& xListener)
+        throw( ::com::sun::star::beans::UnknownPropertyException,
+                ::com::sun::star::lang::WrappedTargetException,
+                ::com::sun::star::uno::RuntimeException);
+
+    virtual void SAL_CALL removePropertyChangeListener(
+            const ::rtl::OUString& rPropertyName,
+            const ::com::sun::star::uno::Reference<
+            ::com::sun::star::beans::XPropertyChangeListener>& rListener)
+        throw( ::com::sun::star::beans::UnknownPropertyException,
+                ::com::sun::star::lang::WrappedTargetException,
+                ::com::sun::star::uno::RuntimeException);
+
+    virtual void SAL_CALL addVetoableChangeListener(
+            const ::rtl::OUString& rPropertyName,
+            const ::com::sun::star::uno::Reference<
+            ::com::sun::star::beans::XVetoableChangeListener>& rListener)
+        throw( ::com::sun::star::beans::UnknownPropertyException,
+                ::com::sun::star::lang::WrappedTargetException,
+                ::com::sun::star::uno::RuntimeException);
+
+    virtual void SAL_CALL removeVetoableChangeListener(
+            const ::rtl::OUString& rPropertyName,
+            const ::com::sun::star::uno::Reference<
+            ::com::sun::star::beans::XVetoableChangeListener>& rListener)
+        throw( ::com::sun::star::beans::UnknownPropertyException,
+                ::com::sun::star::lang::WrappedTargetException,
+                ::com::sun::star::uno::RuntimeException);
+
     // XServiceInfo ----------------------------------------------------------
 
     virtual ::rtl::OUString SAL_CALL getImplementationName() throw(
 private:
 
     ScDocument*                 m_pDocument;
+    SfxItemPropertySet          m_aPropSet;
+    sal_Bool                    m_bIncludeHiddenCells;
 };
 
 
 public:
     explicit ScChart2DataSequence( ScDocument* pDoc,
             const com::sun::star::uno::Reference< com::sun::star::chart2::data::XDataProvider >& xDP,
-            ::std::vector<ScSharedTokenRef>* pTokens);
+            ::std::vector<ScSharedTokenRef>* pTokens, bool bIncludeHiddenCells );
 
     virtual ~ScChart2DataSequence();
     virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
 // 	static ScChart2DataSequence* getImplementation( const com::sun::star::uno::Reference<
 // 									com::sun::star::uno::XInterface> xObj );
 
+private:
+    void setDataChangedHint(bool b);
+
     // Implementation --------------------------------------------------------
 
     void    RefChanged();
         Item();
     };
 
+    class HiddenRangeListener : public ScChartHiddenRangeListener
+    {
+    public:
+        HiddenRangeListener(ScChart2DataSequence& rParent);
+        virtual ~HiddenRangeListener();
+
+        virtual void notify();
+
+    private:
+        ScChart2DataSequence& mrParent;
+    };
+
     ::std::list<Item>           m_aDataArray;
     ::com::sun::star::uno::Sequence<sal_Int32>  m_aHiddenValues;
 
     // properties
     ::com::sun::star::chart2::data::DataSequenceRole  m_aRole;
-    sal_Bool                    m_bHidden;
+    sal_Bool                    m_bIncludeHiddenCells;
 
     // internals
     typedef ::std::auto_ptr< ::std::vector<ScSharedTokenRef> >  TokenListPtr;
     com::sun::star::uno::Reference < com::sun::star::chart2::data::XDataProvider > m_xDataProvider;
 	SfxItemPropertySet		    m_aPropSet;
 
+    ::std::auto_ptr<HiddenRangeListener> m_pHiddenListener;
     ScLinkListener*             m_pValueListener;
     XModifyListenerArr_Impl     m_aValueListeners;
 
 
     // properties
     ::com::sun::star::chart2::data::DataSequenceRole  m_aRole;
-    sal_Bool                    m_bHidden;
+    sal_Bool                    m_bIncludeHiddenCells;
     // internals
     ScRangeListRef              m_xRanges;
     ScDocument*                 m_pDocument;

sc/inc/chartlis.hxx

 
 #include <memory>
 #include <vector>
+#include <list>
 #include <hash_set>
 
 class ScDocument;
 						{ return !operator==( r ); }
 };
 
+// ============================================================================
+
+class ScChartHiddenRangeListener
+{
+public:
+    ScChartHiddenRangeListener();
+    virtual ~ScChartHiddenRangeListener();
+    virtual void notify() = 0;
+};
+
+// ============================================================================
+
 class ScChartListenerCollection : public ScStrCollection
 {
+public:
+    struct RangeListenerItem
+    {
+        ScRange                     maRange;
+        ScChartHiddenRangeListener* mpListener;
+        explicit RangeListenerItem(const ScRange& rRange, ScChartHiddenRangeListener* p);
+    };
+
 private:
+    ::std::list<RangeListenerItem> maHiddenListeners;
+
 	Timer			aTimer;
 	ScDocument*		pDoc;
 
     void            UpdateChartsContainingTab( SCTAB nTab );
 
 	BOOL			operator==( const ScChartListenerCollection& );
+
+    /** 
+     * Start listening on hide/show change within specified cell range.  A 
+     * single listener may listen on multiple ranges when the caller passes 
+     * the same pointer multiple times with different ranges. 
+     *  
+     * Note that the caller is responsible for managing the life-cycle of the 
+     * listener instance. 
+     */
+    void            StartListeningHiddenRange( const ScRange& rRange, 
+                                               ScChartHiddenRangeListener* pListener );
+
+    /** 
+     * Remove all ranges associated with passed listener instance from the 
+     * list of hidden range listeners.  This does not delete the passed 
+     * listener instance. 
+     */
+    void            EndListeningHiddenRange( ScChartHiddenRangeListener* pListener );
 };
 
 

sc/inc/unonames.hxx

 #define SC_UNO_COMPILEFAP           "CompileFAP"
 
 // Chart2
-#define SC_UNONAME_ISHIDDEN         "IsHidden"
-#define SC_UNONAME_ROLE             "Role"
+#define SC_UNONAME_ROLE                 "Role"
+#define SC_UNONAME_HIDDENVALUES         "HiddenValues"
+#define SC_UNONAME_INCLUDEHIDDENCELLS   "IncludeHiddenCells"
 #define SC_UNONAME_HIDDENVALUES     "HiddenValues"
 
 // Solver

sc/source/core/data/table2.cxx

 		{
 			//	Charts muessen beim Ein-/Ausblenden angepasst werden
 			ScChartListenerCollection* pCharts = pDestTab->pDocument->GetChartListenerCollection();
-			if ( pCharts && !pCharts->GetCount() )
-				pCharts = NULL;
 
 			BOOL bWidth  = (nRow1==0 && nRow2==MAXROW && pColWidth && pDestTab->pColWidth);
 			BOOL bHeight = (nCol1==0 && nCol2==MAXCOL && pRowHeight && pDestTab->pRowHeight);
 				SetDrawPageSize();
 
 			ScChartListenerCollection* pCharts = pDocument->GetChartListenerCollection();
-			if ( pCharts && pCharts->GetCount() )
+			if ( pCharts )
 				pCharts->SetRangeDirty(ScRange( nCol, 0, nTab, nCol, MAXROW, nTab ));
 		}
 	}
 				SetDrawPageSize();
 
 			ScChartListenerCollection* pCharts = pDocument->GetChartListenerCollection();
-			if ( pCharts && pCharts->GetCount() )
+			if ( pCharts )
 				pCharts->SetRangeDirty(ScRange( 0, nRow, nTab, MAXCOL, nRow, nTab ));
 		}
 	}
 		if (bWasVis != bShow)
 		{
 			ScChartListenerCollection* pCharts = pDocument->GetChartListenerCollection();
-			if ( pCharts && pCharts->GetCount() )
+			if ( pCharts )
 				pCharts->SetRangeDirty(ScRange( 0, nRow, nTab, MAXCOL, nRow, nTab ));
 
 			if (pOutlineTable)
 		if ( bChanged )
 		{
 			ScChartListenerCollection* pCharts = pDocument->GetChartListenerCollection();
-			if ( pCharts && pCharts->GetCount() )
+			if ( pCharts )
 				pCharts->SetRangeDirty(ScRange( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab ));
 		}
 
 		if ( bChanged )
 		{
 			ScChartListenerCollection* pCharts = pDocument->GetChartListenerCollection();
-			if ( pCharts && pCharts->GetCount() )
+			if ( pCharts )
 				pCharts->SetRangeDirty(ScRange( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab ));
 		}
 

sc/source/core/tool/chartlis.cxx

 
 using namespace com::sun::star;
 using ::std::vector;
+using ::std::list;
 using ::std::hash_set;
 using ::std::auto_ptr;
 using ::std::unary_function;
     return *mpTokens == *r.mpTokens;
 }
 
+// ============================================================================
+
+ScChartHiddenRangeListener::ScChartHiddenRangeListener()
+{
+}
+
+ScChartHiddenRangeListener::~ScChartHiddenRangeListener()
+{
+    // empty d'tor
+}
 
 // === ScChartListenerCollection ======================================
 
+ScChartListenerCollection::RangeListenerItem::RangeListenerItem(const ScRange& rRange, ScChartHiddenRangeListener* p) :
+    maRange(rRange), mpListener(p)
+{
+}
+
 ScChartListenerCollection::ScChartListenerCollection( ScDocument* pDocP ) :
 	ScStrCollection( 4, 4, FALSE ),
 	pDoc( pDocP )
 	}
 	if ( bDirty )
 		StartTimer();
+
+    // New hidden range listener implementation
+    for (list<RangeListenerItem>::iterator itr = maHiddenListeners.begin(), itrEnd = maHiddenListeners.end();
+          itr != itrEnd; ++itr)
+    {
+        if (itr->maRange.Intersects(rRange))
+            itr->mpListener->notify();
+    }
 }
 
 
 	return TRUE;
 }
 
+void ScChartListenerCollection::StartListeningHiddenRange( const ScRange& rRange, ScChartHiddenRangeListener* pListener )
+{
+    RangeListenerItem aItem(rRange, pListener);
+    maHiddenListeners.push_back(aItem);
+}
 
+namespace {
 
+struct MatchListener : public ::std::unary_function<
+        ScChartListenerCollection::RangeListenerItem, bool>
+{
+    MatchListener(const ScChartHiddenRangeListener* pMatch) :
+        mpMatch(pMatch)
+    {
+    }
 
+    bool operator() (const ScChartListenerCollection::RangeListenerItem& rItem) const
+    {
+        return mpMatch == rItem.mpListener;
+    }
+
+private:
+    const ScChartHiddenRangeListener* mpMatch;
+};
+
+}
+void ScChartListenerCollection::EndListeningHiddenRange( ScChartHiddenRangeListener* pListener )
+{
+    maHiddenListeners.remove_if(MatchListener(pListener));
+}
+

sc/source/core/tool/chartpos.cxx

 	if ( aRangeListRef->Count() == 1 )
 	{
 		aRangeListRef->First()->GetVars( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 );
-		// Beschriftungen auch nach hidden Cols/Rows finden
-		while ( nCol1 <= nCol2 && (pDocument->GetColFlags(
-				nCol1, nTab1) & CR_HIDDEN) != 0 )
-			nCol1++;
-		while ( nRow1 <= nRow2 && (pDocument->GetRowFlags(
-				nRow1, nTab1) & CR_HIDDEN) != 0 )