ooo-build r14949 - in trunk: . patches/dev300
- From: kyoshida svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r14949 - in trunk: . patches/dev300
- Date: Mon, 29 Dec 2008 17:37:16 +0000 (UTC)
Author: kyoshida
Date: Mon Dec 29 17:37:16 2008
New Revision: 14949
URL: http://svn.gnome.org/viewvc/ooo-build?rev=14949&view=rev
Log:
2008-12-29 Kohei Yoshida <kyoshida novell com>
* patches/dev300/chart-skip-hidden-cells-chart2-m37.diff:
* patches/dev300/chart-skip-hidden-cells-sc-m37.diff:
* patches/dev300/chart-skip-hidden-cells-xmloff-m37.diff:
* patches/dev300/chart-skip-hidden-cells-chart2.diff:
* patches/dev300/chart-skip-hidden-cells-sc.diff:
* patches/dev300/chart-skip-hidden-cells-xmloff.diff:
* patches/dev300/apply: more dev300-m38 work.
Added:
trunk/patches/dev300/chart-skip-hidden-cells-chart2-m37.diff (props changed)
- copied unchanged from r14946, /trunk/patches/dev300/chart-skip-hidden-cells-chart2.diff
trunk/patches/dev300/chart-skip-hidden-cells-sc-m37.diff (props changed)
- copied unchanged from r14946, /trunk/patches/dev300/chart-skip-hidden-cells-sc.diff
trunk/patches/dev300/chart-skip-hidden-cells-xmloff-m37.diff (props changed)
- copied unchanged from r14946, /trunk/patches/dev300/chart-skip-hidden-cells-xmloff.diff
Modified:
trunk/ChangeLog
trunk/patches/dev300/apply
trunk/patches/dev300/chart-skip-hidden-cells-chart2.diff
trunk/patches/dev300/chart-skip-hidden-cells-sc.diff
trunk/patches/dev300/chart-skip-hidden-cells-xmloff.diff
Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply (original)
+++ trunk/patches/dev300/apply Mon Dec 29 17:37:16 2008
@@ -896,11 +896,19 @@
# reduce the delta value for improved precision.
sc-goalseek-higher-precision.diff, i#92552, kohei
+[ CalcFixes < dev300-m38 ]
+# skip data in hidden cells when rendering charts.
+chart-skip-hidden-cells-chart2-m37.diff, n#404190, i#81209, n#427545, kohei
+chart-skip-hidden-cells-sc.diff-m37, n#404190, i#81209, n#425617, kohei
+chart-skip-hidden-cells-xmloff-m37.diff, n#404190, i#81209, n#425617, kohei
+
+[ CalcFixes >= dev300-m38 ]
# skip data in hidden cells when rendering charts.
chart-skip-hidden-cells-chart2.diff, n#404190, i#81209, n#427545, kohei
chart-skip-hidden-cells-sc.diff, n#404190, i#81209, n#425617, kohei
chart-skip-hidden-cells-xmloff.diff, n#404190, i#81209, n#425617, kohei
+[ CalcFixes ]
# render charts with multiple chart types correctly for xls interop.
chart-axis-multi-chart-types-chart2.diff, n#437322, i#95934, kohei
chart-axis-multi-chart-types-sc.diff, n#437322, i#95934, kohei
Modified: trunk/patches/dev300/chart-skip-hidden-cells-chart2.diff
==============================================================================
--- trunk/patches/dev300/chart-skip-hidden-cells-chart2.diff (original)
+++ trunk/patches/dev300/chart-skip-hidden-cells-chart2.diff Mon Dec 29 17:37:16 2008
@@ -1,173 +1,197 @@
-Index: source/model/main/Diagram.cxx
-===================================================================
---- chart2/source/model/main/Diagram.cxx (.../tags/DEV300_m35/chart2) (revision 264806)
-+++ chart2/source/model/main/Diagram.cxx (.../cws/koheichart01/chart2) (revision 264806)
-@@ -78,6 +78,7 @@
- PROP_DIAGRAM_SORT_BY_X_VALUES,
- PROP_DIAGRAM_CONNECT_BARS,
+diff --git chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
+index 439a2b5..f451855 100644
+--- chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
++++ chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
+@@ -112,6 +112,7 @@ enum
+ PROP_DIAGRAM_DATAROW_SOURCE,
+
PROP_DIAGRAM_GROUP_BARS_PER_AXIS,
+ PROP_DIAGRAM_INCLUDE_HIDDEN_CELLS,
- PROP_DIAGRAM_STARTING_ANGLE,
- PROP_DIAGRAM_RIGHT_ANGLED_AXES,
- PROP_DIAGRAM_PERSPECTIVE,
-@@ -125,6 +126,13 @@
+
+ PROP_DIAGRAM_SORT_BY_X_VALUES,
+
+@@ -233,6 +234,13 @@ void lcl_AddPropertiesToVector(
+ beans::PropertyAttribute::BOUND
| beans::PropertyAttribute::MAYBEDEFAULT ));
- rOutProperties.push_back(
-+ Property( C2U("IncludeHiddenCells"),
++ 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) ),
-@@ -170,6 +178,7 @@
- ::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 );
- }
-Index: source/tools/ExplicitCategoriesProvider.cxx
-===================================================================
---- chart2/source/tools/ExplicitCategoriesProvider.cxx (.../tags/DEV300_m35/chart2) (revision 264806)
-+++ chart2/source/tools/ExplicitCategoriesProvider.cxx (.../cws/koheichart01/chart2) (revision 264806)
-@@ -34,7 +34,11 @@
- #include "ExplicitCategoriesProvider.hxx"
- #include "DiagramHelper.hxx"
- #include "CommonConverters.hxx"
-+#include "macros.hxx"
+ //new for XY charts
+ rOutProperties.push_back(
+ Property( C2U( "SortByXValues" ),
+diff --git chart2/source/controller/dialogs/ObjectNameProvider.cxx chart2/source/controller/dialogs/ObjectNameProvider.cxx
+index d477a34..b70e1df 100644
+--- chart2/source/controller/dialogs/ObjectNameProvider.cxx
++++ chart2/source/controller/dialogs/ObjectNameProvider.cxx
+@@ -53,6 +53,8 @@
+
+ #include <com/sun/star/chart2/XTitle.hpp>
+ #include <com/sun/star/chart2/XRegressionCurveContainer.hpp>
++#include <com/sun/star/chart2/XDiagram.hpp>
++#include <com/sun/star/beans/XPropertySet.hpp>
-+#include <hash_set>
-+#include <vector>
-+
//.............................................................................
namespace chart
- {
-@@ -45,9 +49,12 @@
+@@ -63,6 +65,10 @@ using namespace ::com::sun::star::chart2;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
+ using ::com::sun::star::uno::Any;
++using ::com::sun::star::uno::UNO_QUERY;
++using ::com::sun::star::chart2::XDiagram;
++using ::com::sun::star::beans::XPropertySet;
++using ::com::sun::star::beans::UnknownPropertyException;
using rtl::OUString;
-+using ::std::hash_set;
-+using ::std::vector;
- ExplicitCategoriesProvider::ExplicitCategoriesProvider( const Reference< chart2::XCoordinateSystem >& xCooSysModel )
- : m_bDirty(true)
-+ , m_bIncludeHiddelCells(true)
- , m_xCooSysModel( xCooSysModel )
- , m_xCategories()
- {
-@@ -63,20 +70,75 @@
- {
+ namespace
+@@ -95,6 +101,29 @@ void lcl_addText( OUString& rOut, const OUString& rSeparator, const OUString& rN
+ rOut+=rNext;
}
-+static void lcl_removeHiddenIndices(Sequence<OUString>& rCategories, const Sequence<sal_Int32>& rHiddenValues)
++bool lcl_isHiddenCellsIncluded( const Reference<frame::XModel>& xChartModel )
+{
-+ hash_set<sal_Int32> aIndices;
-+ sal_Int32 n = rHiddenValues.getLength();
-+ for (sal_Int32 i = 0; i < n; ++i)
-+ aIndices.insert(rHiddenValues[i]);
++ bool bIncluded = true; // hidden cells are included by default.
+
-+ vector<OUString> aNewCatsVector;
-+ n = rCategories.getLength();
-+ aNewCatsVector.reserve(n);
-+ for (sal_Int32 i = 0; i < n; ++i)
-+ {
-+ if (aIndices.count(i))
-+ // skip this value.
-+ continue;
++ Reference< XDiagram > xDiagram( ChartModelHelper::findDiagram(xChartModel) );
++ if (!xDiagram.is())
++ return bIncluded;
++
++ Reference< XPropertySet > xProp( xDiagram, UNO_QUERY );
++ if (!xProp.is())
++ return bIncluded;
+
-+ aNewCatsVector.push_back(rCategories[i]);
++ try
++ {
++ xProp->getPropertyValue(C2U("IncludeHiddenCells")) >>= bIncluded;
++ }
++ catch (const UnknownPropertyException&)
++ {
+ }
+
-+ n = aNewCatsVector.size();
-+ rCategories.realloc(n);
-+ for (size_t i = 0; i < n; ++i)
-+ rCategories[i] = aNewCatsVector[i];
++ return bIncluded;
+}
+
- //XTextualDataSequence
- Sequence< ::rtl::OUString > SAL_CALL ExplicitCategoriesProvider::getTextualData() throw( uno::RuntimeException)
- {
- if( m_bDirty )
- {
-- if( m_xCategories.is() )
-- m_aExplicitCategories = DataSequenceToStringSequence(m_xCategories->getValues());
-- if(!m_aExplicitCategories.getLength())
-- m_aExplicitCategories = DiagramHelper::generateAutomaticCategories( uno::Reference< chart2::XCoordinateSystem >( m_xCooSysModel.get(), uno::UNO_QUERY ) );
-+ if (!m_xCategories.is())
-+ return m_aExplicitCategories;
-+
-+ uno::Reference< data::XDataSequence > xValues = m_xCategories->getValues();
-+ uno::Reference< beans::XPropertySet > xProp(xValues, uno::UNO_QUERY);
-+ bool bIsHidden = false;
-+ Sequence<sal_Int32> aHiddenValues;
-+ if (xProp.is())
-+ {
-+ xProp->getPropertyValue( C2U( "IsHidden" ) ) >>= bIsHidden;
-+ xProp->getPropertyValue( C2U( "HiddenValues" ) ) >>= aHiddenValues;
-+ }
-+
-+ if (!bIsHidden || m_bIncludeHiddelCells)
-+ {
-+ m_aExplicitCategories = DataSequenceToStringSequence(xValues);
-+ if (!m_bIncludeHiddelCells)
-+ lcl_removeHiddenIndices(m_aExplicitCategories, aHiddenValues);
+ OUString lcl_getDataPointValueText( const Reference< XDataSeries >& xSeries, sal_Int32 nPointIndex,
+ const Reference< XCoordinateSystem >& xCooSys,
+ const Reference< frame::XModel >& xChartModel )
+@@ -111,6 +140,7 @@ OUString lcl_getDataPointValueText( const Reference< XDataSeries >& xSeries, sal
+
+ rtl::OUString aX, aY, aY_Min, aY_Max, aY_First, aY_Last;
+ double fValue = 0;
++ bool bIncludeHiddenCells = lcl_isHiddenCellsIncluded(xChartModel);
+
+ uno::Reference< util::XNumberFormatsSupplier > xNumberFormatsSupplier( xChartModel, uno::UNO_QUERY );
+ NumberFormatterWrapper aNumberFormatterWrapper( xNumberFormatsSupplier );
+@@ -130,6 +160,14 @@ OUString lcl_getDataPointValueText( const Reference< XDataSeries >& xSeries, sal
+ {
+ try
+ {
++ if (!bIncludeHiddenCells)
++ {
++ Sequence<sal_Int32> aHiddenValues;
++ xProp->getPropertyValue( C2U("HiddenValues") ) >>= aHiddenValues;
++ if (aHiddenValues.getLength())
++ DataSeriesHelper::removeHiddenDataPoints(aData, aHiddenValues);
++ }
+
-+ if(!m_aExplicitCategories.getLength())
-+ m_aExplicitCategories = DiagramHelper::generateAutomaticCategories(
-+ uno::Reference< chart2::XCoordinateSystem >( m_xCooSysModel.get(), uno::UNO_QUERY ) );
-+ }
+ uno::Any aARole = xProp->getPropertyValue( C2U( "Role" ) );
+ rtl::OUString aRole;
+ aARole >>= aRole;
+@@ -535,8 +573,11 @@ rtl::OUString ObjectNameProvider::getHelpText( const rtl::OUString& rObjectCID,
+ aWildcard = C2U("%POINTVALUES");
+ nIndex = aRet.indexOf( aWildcard );
+ if( nIndex != -1 )
+- aRet = aRet.replaceAt( nIndex, aWildcard.getLength(), lcl_getDataPointValueText(
+- xSeries,nPointIndex, DataSeriesHelper::getCoordinateSystemOfSeries(xSeries, xDiagram), xChartModel ) );
++ {
++ OUString aValueText = lcl_getDataPointValueText(
++ xSeries, nPointIndex, DataSeriesHelper::getCoordinateSystemOfSeries(xSeries, xDiagram), xChartModel);
++ aRet = aRet.replaceAt( nIndex, aWildcard.getLength(), aValueText );
++ }
+
+ //replace series name
+ aWildcard = C2U("%SERIESNAME");
+diff --git chart2/source/controller/dialogs/TabPages.hrc chart2/source/controller/dialogs/TabPages.hrc
+index a9fb1ab..494190f 100644
+--- chart2/source/controller/dialogs/TabPages.hrc
++++ chart2/source/controller/dialogs/TabPages.hrc
+@@ -94,10 +94,12 @@
+ #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
++#define CB_INCLUDE_HIDDEN_CELLS 11
++#define FL_PLOT_OPTIONS 12
++#define RB_DONT_PAINT 13
++#define RB_ASSUME_ZERO 14
++#define RB_CONTINUE_LINE 15
++#define FT_MISSING_VALUES 16
+
+ //------------
+ //from old chart tplabel.hrc
+diff --git chart2/source/controller/dialogs/tp_PolarOptions.cxx chart2/source/controller/dialogs/tp_PolarOptions.cxx
+index 56b6907..df1c971 100644
+--- chart2/source/controller/dialogs/tp_PolarOptions.cxx
++++ chart2/source/controller/dialogs/tp_PolarOptions.cxx
+@@ -51,7 +51,9 @@ PolarOptionsTabPage::PolarOptionsTabPage( Window* pWindow,const SfxItemSet& rInA
+ 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 ) ),
++ m_aCB_IncludeHiddenCells( this, SchResId( CB_INCLUDE_HIDDEN_CELLS ) )
+ {
+ FreeResource();
+
+@@ -78,6 +80,9 @@ BOOL PolarOptionsTabPage::FillItemSet( SfxItemSet& rOutAttrs )
+ if( m_aCB_Clockwise.IsVisible() )
+ rOutAttrs.Put(SfxInt32Item(SCHATTR_CLOCKWISE,m_aCB_Clockwise.IsChecked()));
+
++ if (m_aCB_IncludeHiddenCells.IsVisible())
++ rOutAttrs.Put(SfxBoolItem(SCHATTR_INCLUDE_HIDDEN_CELLS, m_aCB_IncludeHiddenCells.IsChecked()));
+
- m_bDirty = false;
+ return TRUE;
+ }
+
+@@ -108,6 +113,11 @@ void PolarOptionsTabPage::Reset(const SfxItemSet& rInAttrs)
+ {
+ m_aCB_Clockwise.Show(FALSE);
}
- return m_aExplicitCategories;
++ 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);
++ }
}
-+void ExplicitCategoriesProvider::setIncludeHiddenCells(bool b)
-+{
-+ m_bIncludeHiddelCells = b;
-+}
-+
-+bool ExplicitCategoriesProvider::getIncludeHiddenCells() const
-+{
-+ return m_bIncludeHiddelCells;
-+}
+ //.............................................................................
+diff --git chart2/source/controller/dialogs/tp_PolarOptions.hxx chart2/source/controller/dialogs/tp_PolarOptions.hxx
+index cd1f8e5..77f7a2e 100644
+--- chart2/source/controller/dialogs/tp_PolarOptions.hxx
++++ chart2/source/controller/dialogs/tp_PolarOptions.hxx
+@@ -58,6 +58,9 @@ private:
+ svx::DialControl m_aAngleDial;
+ FixedText m_aFT_Degrees;
+ NumericField m_aNF_StartingAngle;
+
- // static
- OUString ExplicitCategoriesProvider::getCategoryByIndex(
- const Reference< XCoordinateSystem >& xCooSysModel,
-Index: source/tools/UncachedDataSequence.cxx
-===================================================================
---- chart2/source/tools/UncachedDataSequence.cxx (.../tags/DEV300_m35/chart2) (revision 264806)
-+++ chart2/source/tools/UncachedDataSequence.cxx (.../cws/koheichart01/chart2) (revision 264806)
-@@ -79,7 +79,7 @@
- const OUString & rRangeRepresentation )
- : OPropertyContainer( GetBroadcastHelper()),
- UncachedDataSequence_Base( GetMutex()),
-- m_bIsHidden( true ),
-+ m_bIsHidden( false ),
- m_xDataProvider( xIntDataProv ),
- m_aSourceRepresentation( rRangeRepresentation ),
- m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder())
-@@ -93,7 +93,7 @@
- const OUString & rRole )
- : OPropertyContainer( GetBroadcastHelper()),
- UncachedDataSequence_Base( GetMutex()),
-- m_bIsHidden( true ),
-+ m_bIsHidden( false ),
- m_xDataProvider( xIntDataProv ),
- m_aSourceRepresentation( rRangeRepresentation ),
- m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder())
-Index: source/controller/dialogs/tp_PolarOptions.src
-===================================================================
---- chart2/source/controller/dialogs/tp_PolarOptions.src (.../tags/DEV300_m35/chart2) (revision 264806)
-+++ chart2/source/controller/dialogs/tp_PolarOptions.src (.../cws/koheichart01/chart2) (revision 264806)
-@@ -47,8 +47,8 @@
++ FixedLine m_aFL_PlotOptions;
++ CheckBox m_aCB_IncludeHiddenCells;
+ };
+
+ //.............................................................................
+diff --git chart2/source/controller/dialogs/tp_PolarOptions.src chart2/source/controller/dialogs/tp_PolarOptions.src
+index b01ba74..bdbf7c5 100644
+--- chart2/source/controller/dialogs/tp_PolarOptions.src
++++ chart2/source/controller/dialogs/tp_PolarOptions.src
+@@ -47,8 +47,8 @@ TabPage TP_POLAROPTIONS
};
FixedLine FL_STARTING_ANGLE
{
@@ -178,7 +202,7 @@
Text [ en-US ] = "Starting angle" ;
};
Control CT_ANGLE_DIAL
-@@ -75,4 +75,17 @@
+@@ -75,4 +75,17 @@ TabPage TP_POLAROPTIONS
Maximum = 359 ;
SpinSize = 5 ;
};
@@ -196,66 +220,11 @@
+ Text [ en-US ] = "Plot ~values from hidden cells";
+ };
};
-Index: source/controller/dialogs/tp_SeriesToAxis.hxx
-===================================================================
---- chart2/source/controller/dialogs/tp_SeriesToAxis.hxx (.../tags/DEV300_m35/chart2) (revision 264806)
-+++ chart2/source/controller/dialogs/tp_SeriesToAxis.hxx (.../cws/koheichart01/chart2) (revision 264806)
-@@ -74,11 +74,14 @@
- 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;
-Index: source/controller/dialogs/tp_PolarOptions.hxx
-===================================================================
---- chart2/source/controller/dialogs/tp_PolarOptions.hxx (.../tags/DEV300_m35/chart2) (revision 264806)
-+++ chart2/source/controller/dialogs/tp_PolarOptions.hxx (.../cws/koheichart01/chart2) (revision 264806)
-@@ -58,6 +58,9 @@
- svx::DialControl m_aAngleDial;
- FixedText m_aFT_Degrees;
- NumericField m_aNF_StartingAngle;
-+
-+ FixedLine m_aFL_PlotOptions;
-+ CheckBox m_aCB_IncludeHiddenCells;
- };
-
- //.............................................................................
-Index: source/controller/dialogs/TabPages.hrc
-===================================================================
---- chart2/source/controller/dialogs/TabPages.hrc (.../tags/DEV300_m35/chart2) (revision 264806)
-+++ chart2/source/controller/dialogs/TabPages.hrc (.../cws/koheichart01/chart2) (revision 264806)
-@@ -89,10 +89,12 @@
- #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
-+#define CB_INCLUDE_HIDDEN_CELLS 11
-+#define FL_PLOT_OPTIONS 12
-+#define RB_DONT_PAINT 13
-+#define RB_ASSUME_ZERO 14
-+#define RB_CONTINUE_LINE 15
-+#define FT_MISSING_VALUES 16
-
- //------------
- //from old chart tplabel.hrc
-Index: source/controller/dialogs/tp_SeriesToAxis.cxx
-===================================================================
---- chart2/source/controller/dialogs/tp_SeriesToAxis.cxx (.../tags/DEV300_m35/chart2) (revision 264806)
-+++ chart2/source/controller/dialogs/tp_SeriesToAxis.cxx (.../cws/koheichart01/chart2) (revision 264806)
-@@ -63,10 +63,12 @@
+diff --git chart2/source/controller/dialogs/tp_SeriesToAxis.cxx chart2/source/controller/dialogs/tp_SeriesToAxis.cxx
+index 9b11c6b..e0987b3 100644
+--- chart2/source/controller/dialogs/tp_SeriesToAxis.cxx
++++ chart2/source/controller/dialogs/tp_SeriesToAxis.cxx
+@@ -63,10 +63,12 @@ SchOptionTabPage::SchOptionTabPage(Window* pWindow,const SfxItemSet& rInAttrs) :
aMTOverlap(this,SchResId(MT_OVERLAP)),
aCBConnect(this,SchResId(CB_CONNECTOR)),
aCBAxisSideBySide(this,SchResId(CB_BARS_SIDE_BY_SIDE)),
@@ -269,7 +238,7 @@
m_bProvidesSecondaryYAxis(true),
m_bProvidesOverlapAndGapWidth(false)
{
-@@ -123,6 +125,9 @@
+@@ -123,6 +125,9 @@ BOOL SchOptionTabPage::FillItemSet(SfxItemSet& rOutAttrs)
else if(m_aRB_ContinueLine.IsChecked())
rOutAttrs.Put(SfxInt32Item(SCHATTR_MISSING_VALUE_TREATMENT,::com::sun::star::chart::MissingValueTreatment::CONTINUE));
@@ -279,12 +248,12 @@
return TRUE;
}
-@@ -215,10 +220,17 @@
+@@ -215,10 +220,17 @@ void SchOptionTabPage::Reset(const SfxItemSet& rInAttrs)
m_aRB_DontPaint.Show(FALSE);
m_aRB_AssumeZero.Show(FALSE);
m_aRB_ContinueLine.Show(FALSE);
- m_aFL_EmptyCells.Show(FALSE);
-+ m_aFL_PlotOptions.Show(FALSE);
++ m_aFL_PlotOptions.Show(FALSE);
}
}
@@ -298,7 +267,7 @@
AdaptControlPositionsAndVisibility();
}
-@@ -231,6 +243,12 @@
+@@ -231,6 +243,12 @@ void SchOptionTabPage::Init( bool bProvidesSecondaryYAxis, bool bProvidesOverlap
AdaptControlPositionsAndVisibility();
}
@@ -311,7 +280,7 @@
void SchOptionTabPage::AdaptControlPositionsAndVisibility()
{
aRbtAxis1.Show(m_bProvidesSecondaryYAxis);
-@@ -254,14 +272,13 @@
+@@ -254,14 +272,13 @@ void SchOptionTabPage::AdaptControlPositionsAndVisibility()
else
aPos = aGrpBar.GetPosPixel();
@@ -333,57 +302,40 @@
}
if( !m_aRB_DontPaint.IsVisible() )
-Index: source/controller/dialogs/tp_PolarOptions.cxx
-===================================================================
---- chart2/source/controller/dialogs/tp_PolarOptions.cxx (.../tags/DEV300_m35/chart2) (revision 264806)
-+++ chart2/source/controller/dialogs/tp_PolarOptions.cxx (.../cws/koheichart01/chart2) (revision 264806)
-@@ -51,7 +51,9 @@
- 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 ) ),
-+ m_aCB_IncludeHiddenCells( this, SchResId( CB_INCLUDE_HIDDEN_CELLS ) )
- {
- FreeResource();
+diff --git chart2/source/controller/dialogs/tp_SeriesToAxis.hxx chart2/source/controller/dialogs/tp_SeriesToAxis.hxx
+index af1f703..d6516a0 100644
+--- chart2/source/controller/dialogs/tp_SeriesToAxis.hxx
++++ chart2/source/controller/dialogs/tp_SeriesToAxis.hxx
+@@ -74,11 +74,14 @@ private: //member
+ CheckBox aCBConnect;
+ CheckBox aCBAxisSideBySide;
-@@ -78,6 +80,9 @@
- if( m_aCB_Clockwise.IsVisible() )
- rOutAttrs.Put(SfxInt32Item(SCHATTR_CLOCKWISE,m_aCB_Clockwise.IsChecked()));
+- FixedLine m_aFL_EmptyCells;
++ FixedLine m_aFL_PlotOptions;
++ FixedText m_aFT_MissingValues;
+ RadioButton m_aRB_DontPaint;
+ RadioButton m_aRB_AssumeZero;
+ RadioButton m_aRB_ContinueLine;
-+ if (m_aCB_IncludeHiddenCells.IsVisible())
-+ rOutAttrs.Put(SfxBoolItem(SCHATTR_INCLUDE_HIDDEN_CELLS, m_aCB_IncludeHiddenCells.IsChecked()));
++ CheckBox m_aCBIncludeHiddenCells;
+
- return TRUE;
- }
-
-@@ -108,6 +113,11 @@
- {
- 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);
-+ }
- }
+ DECL_LINK(EnableHdl, RadioButton * );
- //.............................................................................
-Index: source/controller/dialogs/tp_SeriesToAxis.src
-===================================================================
---- chart2/source/controller/dialogs/tp_SeriesToAxis.src (.../tags/DEV300_m35/chart2) (revision 264806)
-+++ chart2/source/controller/dialogs/tp_SeriesToAxis.src (.../cws/koheichart01/chart2) (revision 264806)
-@@ -120,7 +120,7 @@
+ sal_Int32 m_nAllSeriesAxisIndex;
+diff --git chart2/source/controller/dialogs/tp_SeriesToAxis.src chart2/source/controller/dialogs/tp_SeriesToAxis.src
+index 9729f8a..58ea22a 100644
+--- chart2/source/controller/dialogs/tp_SeriesToAxis.src
++++ chart2/source/controller/dialogs/tp_SeriesToAxis.src
+@@ -120,7 +120,7 @@ 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";
++ Text [ en-US ] = "Connection lines";
};
CheckBox CB_BARS_SIDE_BY_SIDE
-@@ -131,16 +131,23 @@
+@@ -131,16 +131,23 @@ TabPage TP_OPTIONS
Text [ en-US ] = "Show ~bars side by side";
};
@@ -409,7 +361,7 @@
Size = MAP_APPFONT ( 80 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "~Leave gap";
-@@ -148,7 +155,7 @@
+@@ -148,7 +155,7 @@ TabPage TP_OPTIONS
RadioButton RB_ASSUME_ZERO
{
@@ -418,7 +370,7 @@
Size = MAP_APPFONT ( 80 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "~Assume zero";
-@@ -156,9 +163,17 @@
+@@ -156,9 +163,17 @@ TabPage TP_OPTIONS
RadioButton RB_CONTINUE_LINE
{
@@ -438,11 +390,11 @@
+ Text [ en-US ] = "Plot ~values from hidden cells";
+ };
};
-Index: source/controller/inc/SeriesOptionsItemConverter.hxx
-===================================================================
---- chart2/source/controller/inc/SeriesOptionsItemConverter.hxx (.../tags/DEV300_m35/chart2) (revision 264806)
-+++ chart2/source/controller/inc/SeriesOptionsItemConverter.hxx (.../cws/koheichart01/chart2) (revision 264806)
-@@ -93,6 +93,8 @@
+diff --git chart2/source/controller/inc/SeriesOptionsItemConverter.hxx chart2/source/controller/inc/SeriesOptionsItemConverter.hxx
+index 5966449..2653a13 100644
+--- chart2/source/controller/inc/SeriesOptionsItemConverter.hxx
++++ chart2/source/controller/inc/SeriesOptionsItemConverter.hxx
+@@ -93,6 +93,8 @@ private:
::com::sun::star::uno::Sequence< sal_Int32 > m_aSupportedMissingValueTreatments;
sal_Int32 m_nMissingValueTreatment;
@@ -451,11 +403,11 @@
};
} // namespace wrapper
-Index: source/controller/itemsetwrapper/SchWhichPairs.hxx
-===================================================================
---- chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx (.../tags/DEV300_m35/chart2) (revision 264806)
-+++ chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx (.../cws/koheichart01/chart2) (revision 264806)
-@@ -163,7 +163,8 @@
+diff --git chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx
+index 9b51d5d..d6215b2 100644
+--- chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx
++++ chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx
+@@ -163,7 +163,8 @@ const USHORT nDataPointWhichPairs[] =
SCHATTR_STARTING_ANGLE,SCHATTR_STARTING_ANGLE, \
SCHATTR_CLOCKWISE,SCHATTR_CLOCKWISE, \
SCHATTR_MISSING_VALUE_TREATMENT,SCHATTR_MISSING_VALUE_TREATMENT, \
@@ -465,11 +417,11 @@
const USHORT nSeriesOptionsWhichPairs[] =
{
-Index: source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
-===================================================================
---- chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx (.../tags/DEV300_m35/chart2) (revision 264806)
-+++ chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx (.../cws/koheichart01/chart2) (revision 264806)
-@@ -93,6 +93,7 @@
+diff --git chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
+index eae94e8..10a580c 100644
+--- chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
++++ chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
+@@ -93,6 +93,7 @@ SeriesOptionsItemConverter::SeriesOptionsItemConverter(
, m_bClockwise(false)
, m_aSupportedMissingValueTreatments()
, m_nMissingValueTreatment(0)
@@ -477,7 +429,7 @@
{
try
{
-@@ -159,6 +160,8 @@
+@@ -159,6 +160,8 @@ SeriesOptionsItemConverter::SeriesOptionsItemConverter(
m_aSupportedMissingValueTreatments = ChartTypeHelper::getSupportedMissingValueTreatments( xChartType );
m_nMissingValueTreatment = DiagramHelper::getCorrectedMissingValueTreatment(
ChartModelHelper::findDiagram(m_xChartModel), xChartType );
@@ -486,7 +438,7 @@
}
catch( uno::Exception ex )
{
-@@ -341,6 +344,27 @@
+@@ -341,6 +344,27 @@ bool SeriesOptionsItemConverter::ApplySpecialItem( USHORT nWhichId, const SfxIte
}
}
break;
@@ -514,7 +466,7 @@
}
return bChanged;
}
-@@ -412,6 +436,11 @@
+@@ -412,6 +436,11 @@ void SeriesOptionsItemConverter::FillSpecialItem(
rOutItemSet.Put( SfxIntegerListItem( nWhichId, aList ) );
break;
}
@@ -526,37 +478,76 @@
default:
break;
}
-Index: source/controller/chartapiwrapper/DiagramWrapper.cxx
-===================================================================
---- chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx (.../tags/DEV300_m35/chart2) (revision 264806)
-+++ chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx (.../cws/koheichart01/chart2) (revision 264806)
-@@ -112,6 +112,7 @@
- PROP_DIAGRAM_DATAROW_SOURCE,
-
- PROP_DIAGRAM_GROUP_BARS_PER_AXIS,
-+ PROP_DIAGRAM_INCLUDE_HIDDEN_CELLS,
-
- PROP_DIAGRAM_SORT_BY_X_VALUES,
+diff --git chart2/source/inc/DataSeriesHelper.hxx chart2/source/inc/DataSeriesHelper.hxx
+index 226e902..7169987 100644
+--- chart2/source/inc/DataSeriesHelper.hxx
++++ chart2/source/inc/DataSeriesHelper.hxx
+@@ -41,6 +41,7 @@
-@@ -233,6 +234,13 @@
- beans::PropertyAttribute::BOUND
- | beans::PropertyAttribute::MAYBEDEFAULT ));
+ #include <vector>
+ #include <functional>
++#include <hash_set>
-+ rOutProperties.push_back(
-+ Property( C2U( "IncludeHiddenCells" ),
-+ PROP_DIAGRAM_INCLUDE_HIDDEN_CELLS,
-+ ::getBooleanCppuType(),
-+ beans::PropertyAttribute::BOUND
-+ | beans::PropertyAttribute::MAYBEDEFAULT ));
+ namespace chart
+ {
+@@ -176,6 +177,34 @@ bool areAllSeriesAttachedToSameAxis(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType,
+ sal_Int32 & rOutAxisIndex );
+
++template<typename T>
++void removeHiddenDataPoints(
++ ::com::sun::star::uno::Sequence<T>& rDataPoints,
++ const ::com::sun::star::uno::Sequence<sal_Int32>& rHiddenIndices )
++{
++ ::std::hash_set<sal_Int32> aIndices;
++ sal_Int32 n = rHiddenIndices.getLength();
++ for (sal_Int32 i = 0; i < n; ++i)
++ aIndices.insert(rHiddenIndices[i]);
+
- //new for XY charts
- rOutProperties.push_back(
- Property( C2U( "SortByXValues" ),
-Index: source/inc/chartview/ChartSfxItemIds.hxx
-===================================================================
---- chart2/source/inc/chartview/ChartSfxItemIds.hxx (.../tags/DEV300_m35/chart2) (revision 264806)
-+++ chart2/source/inc/chartview/ChartSfxItemIds.hxx (.../cws/koheichart01/chart2) (revision 264806)
-@@ -200,10 +200,11 @@
++ ::std::vector<T> aNewDataVector;
++ n = rDataPoints.getLength();
++ aNewDataVector.reserve(n);
++ for (sal_Int32 i = 0; i < n; ++i)
++ {
++ if (aIndices.count(i))
++ // skip this value.
++ continue;
++
++ aNewDataVector.push_back(rDataPoints[i]);
++ }
++
++ n = aNewDataVector.size();
++ rDataPoints.realloc(n);
++ for (size_t i = 0; i < static_cast<size_t>(n); ++i)
++ rDataPoints[i] = aNewDataVector[i];
++}
++
+ } // namespace DataSeriesHelper
+ } // namespace chart
+
+diff --git chart2/source/inc/ExplicitCategoriesProvider.hxx chart2/source/inc/ExplicitCategoriesProvider.hxx
+index e6bf4fc..401aa1d 100644
+--- chart2/source/inc/ExplicitCategoriesProvider.hxx
++++ chart2/source/inc/ExplicitCategoriesProvider.hxx
+@@ -58,9 +58,13 @@ public:
+ ::com::sun::star::chart2::XCoordinateSystem >& xCooSysModel,
+ sal_Int32 nIndex );
+
++ void setIncludeHiddenCells(bool b);
++ bool getIncludeHiddenCells() const;
++
+ private: //member
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > m_aExplicitCategories;
+ bool volatile m_bDirty;
++ bool m_bIncludeHiddelCells;
+
+ ::com::sun::star::uno::WeakReference<
+ ::com::sun::star::chart2::XCoordinateSystem > m_xCooSysModel;
+diff --git chart2/source/inc/chartview/ChartSfxItemIds.hxx chart2/source/inc/chartview/ChartSfxItemIds.hxx
+index 52e47c0..b586e1c 100644
+--- chart2/source/inc/chartview/ChartSfxItemIds.hxx
++++ chart2/source/inc/chartview/ChartSfxItemIds.hxx
+@@ -205,10 +205,11 @@
#define SCHATTR_DIAGRAM_STYLE (SCHATTR_CHARTTYPE_START + 6)
#define SCHATTR_TEXTBREAK (SCHATTR_CHARTTYPE_START + 7)
#define SCHATTR_GROUP_BARS_PER_AXIS (SCHATTR_CHARTTYPE_START + 8)
@@ -572,50 +563,144 @@
#define SCHATTR_CHARTTYPE_END SCHATTR_AVAILABLE_MISSING_VALUE_TREATMENTS
-Index: source/inc/ExplicitCategoriesProvider.hxx
-===================================================================
---- chart2/source/inc/ExplicitCategoriesProvider.hxx (.../tags/DEV300_m35/chart2) (revision 264806)
-+++ chart2/source/inc/ExplicitCategoriesProvider.hxx (.../cws/koheichart01/chart2) (revision 264806)
-@@ -58,9 +58,13 @@
- ::com::sun::star::chart2::XCoordinateSystem >& xCooSysModel,
- sal_Int32 nIndex );
+diff --git chart2/source/model/main/Diagram.cxx chart2/source/model/main/Diagram.cxx
+index 02bf2b7..308ed19 100644
+--- chart2/source/model/main/Diagram.cxx
++++ chart2/source/model/main/Diagram.cxx
+@@ -78,6 +78,7 @@ enum
+ 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,
+@@ -125,6 +126,13 @@ void lcl_AddPropertiesToVector(
+ | beans::PropertyAttribute::MAYBEDEFAULT ));
-+ void setIncludeHiddenCells(bool b);
-+ bool getIncludeHiddenCells() const;
+ rOutProperties.push_back(
++ Property( C2U("IncludeHiddenCells"),
++ PROP_DIAGRAM_INCLUDE_HIDDEN_CELLS,
++ ::getBooleanCppuType(),
++ beans::PropertyAttribute::BOUND
++ | beans::PropertyAttribute::MAYBEDEFAULT ));
+
- private: //member
- ::com::sun::star::uno::Sequence< ::rtl::OUString > m_aExplicitCategories;
- bool volatile m_bDirty;
-+ bool m_bIncludeHiddelCells;
++ rOutProperties.push_back(
+ Property( C2U( "StartingAngle" ),
+ PROP_DIAGRAM_STARTING_ANGLE,
+ ::getCppuType( reinterpret_cast< const sal_Int32 * >(0) ),
+@@ -170,6 +178,7 @@ void lcl_AddDefaultsToMap(
+ ::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 );
+ }
+diff --git chart2/source/tools/ExplicitCategoriesProvider.cxx chart2/source/tools/ExplicitCategoriesProvider.cxx
+index acd9585..177cf71 100644
+--- chart2/source/tools/ExplicitCategoriesProvider.cxx
++++ chart2/source/tools/ExplicitCategoriesProvider.cxx
+@@ -33,7 +33,9 @@
- ::com::sun::star::uno::WeakReference<
- ::com::sun::star::chart2::XCoordinateSystem > m_xCooSysModel;
-Index: source/view/axes/VCoordinateSystem.cxx
-===================================================================
---- chart2/source/view/axes/VCoordinateSystem.cxx (.../tags/DEV300_m35/chart2) (revision 264806)
-+++ chart2/source/view/axes/VCoordinateSystem.cxx (.../cws/koheichart01/chart2) (revision 264806)
-@@ -581,6 +581,16 @@
- m_aSeriesNamesForZAxis = rSeriesNames;
+ #include "ExplicitCategoriesProvider.hxx"
+ #include "DiagramHelper.hxx"
++#include "DataSeriesHelper.hxx"
+ #include "CommonConverters.hxx"
++#include "macros.hxx"
+
+ //.............................................................................
+ namespace chart
+@@ -45,9 +47,12 @@ using namespace ::com::sun::star::chart2;
+ using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::uno::Sequence;
+ using rtl::OUString;
++using ::std::hash_set;
++using ::std::vector;
+
+ ExplicitCategoriesProvider::ExplicitCategoriesProvider( const Reference< chart2::XCoordinateSystem >& xCooSysModel )
+ : m_bDirty(true)
++ , m_bIncludeHiddelCells(true)
+ , m_xCooSysModel( xCooSysModel )
+ , m_xCategories()
+ {
+@@ -68,15 +73,45 @@ Sequence< ::rtl::OUString > SAL_CALL ExplicitCategoriesProvider::getTextualData(
+ {
+ if( m_bDirty )
+ {
+- if( m_xCategories.is() )
+- m_aExplicitCategories = DataSequenceToStringSequence(m_xCategories->getValues());
+- if(!m_aExplicitCategories.getLength())
+- m_aExplicitCategories = DiagramHelper::generateAutomaticCategories( uno::Reference< chart2::XCoordinateSystem >( m_xCooSysModel.get(), uno::UNO_QUERY ) );
++ if (!m_xCategories.is())
++ return m_aExplicitCategories;
++
++ uno::Reference< data::XDataSequence > xValues = m_xCategories->getValues();
++ uno::Reference< beans::XPropertySet > xProp(xValues, uno::UNO_QUERY);
++ bool bIsHidden = false;
++ Sequence<sal_Int32> aHiddenValues;
++ if (xProp.is())
++ {
++ xProp->getPropertyValue( C2U( "IsHidden" ) ) >>= bIsHidden;
++ xProp->getPropertyValue( C2U( "HiddenValues" ) ) >>= aHiddenValues;
++ }
++
++ if (!bIsHidden || m_bIncludeHiddelCells)
++ {
++ m_aExplicitCategories = DataSequenceToStringSequence(xValues);
++ if (!m_bIncludeHiddelCells)
++ DataSeriesHelper::removeHiddenDataPoints(m_aExplicitCategories, aHiddenValues);
++
++ if(!m_aExplicitCategories.getLength())
++ m_aExplicitCategories = DiagramHelper::generateAutomaticCategories(
++ uno::Reference< chart2::XCoordinateSystem >( m_xCooSysModel.get(), uno::UNO_QUERY ) );
++ }
++
+ m_bDirty = false;
+ }
+ return m_aExplicitCategories;
}
-+void VCoordinateSystem::setIncludeHiddenCells(bool b)
++void ExplicitCategoriesProvider::setIncludeHiddenCells(bool b)
+{
-+ m_aExplicitCategoriesProvider->setIncludeHiddenCells(b);
++ m_bIncludeHiddelCells = b;
+}
+
-+bool VCoordinateSystem::getIncludeHiddenCells() const
++bool ExplicitCategoriesProvider::getIncludeHiddenCells() const
+{
-+ return m_aExplicitCategoriesProvider->getIncludeHiddenCells();
++ return m_bIncludeHiddelCells;
+}
+
- sal_Int32 VCoordinateSystem::getNumberFormatKeyForAxis(
- const Reference< chart2::XAxis >& xAxis
- , const Reference< util::XNumberFormatsSupplier >& xNumberFormatsSupplier )
-Index: source/view/axes/ScaleAutomatism.cxx
-===================================================================
---- chart2/source/view/axes/ScaleAutomatism.cxx (.../tags/DEV300_m35/chart2) (revision 264806)
-+++ chart2/source/view/axes/ScaleAutomatism.cxx (.../cws/koheichart01/chart2) (revision 264806)
-@@ -134,7 +134,7 @@
+ // static
+ OUString ExplicitCategoriesProvider::getCategoryByIndex(
+ const Reference< XCoordinateSystem >& xCooSysModel,
+diff --git chart2/source/tools/UncachedDataSequence.cxx chart2/source/tools/UncachedDataSequence.cxx
+index bcf99f7..1fa3b00 100644
+--- chart2/source/tools/UncachedDataSequence.cxx
++++ chart2/source/tools/UncachedDataSequence.cxx
+@@ -79,7 +79,7 @@ UncachedDataSequence::UncachedDataSequence(
+ const OUString & rRangeRepresentation )
+ : OPropertyContainer( GetBroadcastHelper()),
+ UncachedDataSequence_Base( GetMutex()),
+- m_bIsHidden( true ),
++ m_bIsHidden( false ),
+ m_xDataProvider( xIntDataProv ),
+ m_aSourceRepresentation( rRangeRepresentation ),
+ m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder())
+@@ -93,7 +93,7 @@ UncachedDataSequence::UncachedDataSequence(
+ const OUString & rRole )
+ : OPropertyContainer( GetBroadcastHelper()),
+ UncachedDataSequence_Base( GetMutex()),
+- m_bIsHidden( true ),
++ m_bIsHidden( false ),
+ m_xDataProvider( xIntDataProv ),
+ m_aSourceRepresentation( rRangeRepresentation ),
+ m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder())
+diff --git chart2/source/view/axes/ScaleAutomatism.cxx chart2/source/view/axes/ScaleAutomatism.cxx
+index 7c58236..3e412c4 100644
+--- chart2/source/view/axes/ScaleAutomatism.cxx
++++ chart2/source/view/axes/ScaleAutomatism.cxx
+@@ -134,7 +134,7 @@ void ScaleAutomatism::calculateExplicitScaleAndIncrement(
if( m_aSourceScale.AxisType==AxisType::PERCENT )
rExplicitScale.Minimum = 0.0;
else if( ::rtl::math::isNan( m_fValueMinimum ) )
@@ -624,7 +709,7 @@
else
rExplicitScale.Minimum = m_fValueMinimum;
}
-@@ -143,7 +143,7 @@
+@@ -143,7 +143,7 @@ void ScaleAutomatism::calculateExplicitScaleAndIncrement(
if( bAutoMaximum )
{
if( m_aSourceScale.AxisType==AxisType::PERCENT )
@@ -633,11 +718,99 @@
else if( ::rtl::math::isNan( m_fValueMaximum ) )
rExplicitScale.Maximum = 10.0; //@todo get Maximum from scaling or from plotter????
else
-Index: source/view/main/ChartView.cxx
-===================================================================
---- chart2/source/view/main/ChartView.cxx (.../tags/DEV300_m35/chart2) (revision 264806)
-+++ chart2/source/view/main/ChartView.cxx (.../cws/koheichart01/chart2) (revision 264806)
-@@ -623,6 +623,7 @@
+diff --git chart2/source/view/axes/VCoordinateSystem.cxx chart2/source/view/axes/VCoordinateSystem.cxx
+index 335538b..28ccfe4 100644
+--- chart2/source/view/axes/VCoordinateSystem.cxx
++++ chart2/source/view/axes/VCoordinateSystem.cxx
+@@ -581,6 +581,16 @@ void VCoordinateSystem::setSeriesNamesForAxis( const Sequence< rtl::OUString >&
+ m_aSeriesNamesForZAxis = rSeriesNames;
+ }
+
++void VCoordinateSystem::setIncludeHiddenCells(bool b)
++{
++ m_aExplicitCategoriesProvider->setIncludeHiddenCells(b);
++}
++
++bool VCoordinateSystem::getIncludeHiddenCells() const
++{
++ return m_aExplicitCategoriesProvider->getIncludeHiddenCells();
++}
++
+ sal_Int32 VCoordinateSystem::getNumberFormatKeyForAxis(
+ const Reference< chart2::XAxis >& xAxis
+ , const Reference< util::XNumberFormatsSupplier >& xNumberFormatsSupplier )
+diff --git chart2/source/view/inc/VCoordinateSystem.hxx chart2/source/view/inc/VCoordinateSystem.hxx
+index 811f349..dae78bf 100644
+--- chart2/source/view/inc/VCoordinateSystem.hxx
++++ chart2/source/view/inc/VCoordinateSystem.hxx
+@@ -133,6 +133,9 @@ public:
+ virtual bool needSeriesNamesForAxis() const;
+ void setSeriesNamesForAxis( const ::com::sun::star::uno::Sequence< rtl::OUString >& rSeriesNames );
+
++ void setIncludeHiddenCells(bool b);
++ bool getIncludeHiddenCells() const;
++
+ protected: //methods
+ VCoordinateSystem( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::XCoordinateSystem >& xCooSys );
+diff --git chart2/source/view/inc/VDataSeries.hxx chart2/source/view/inc/VDataSeries.hxx
+index e41340c..7bc8ca3 100644
+--- chart2/source/view/inc/VDataSeries.hxx
++++ chart2/source/view/inc/VDataSeries.hxx
+@@ -59,7 +59,7 @@ class VDataSequence
+ {
+ public:
+ void init( const ::com::sun::star::uno::Reference<
+- ::com::sun::star::chart2::data::XDataSequence >& xModel);
++ ::com::sun::star::chart2::data::XDataSequence >& xModel, bool bIncludeHiddenCells );
+ bool is() const;
+ void clear();
+ double getValue( sal_Int32 index ) const;
+@@ -77,7 +77,7 @@ class VDataSeries
+ {
+ public:
+ VDataSeries( const ::com::sun::star::uno::Reference<
+- ::com::sun::star::chart2::XDataSeries >& xDataSeries );
++ ::com::sun::star::chart2::XDataSeries >& xDataSeries, bool bIncludeHiddenCells );
+ virtual ~VDataSeries();
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeries >
+@@ -138,6 +138,9 @@ public:
+ void setGroupBarsPerAxis( sal_Bool bGroupBarsPerAxis );
+ sal_Bool getGroupBarsPerAxis() const;
+
++ void setIncludeHiddenCells( sal_Bool bIncludeHiddenCells );
++ sal_Bool getIncludeHiddenCells() const;
++
+ void setStartingAngle( sal_Int32 nStartingAngle );
+ sal_Int32 getStartingAngle() const;
+
+@@ -220,6 +223,8 @@ private: //member
+
+ sal_Bool m_bGroupBarsPerAxis;
+
++ sal_Bool m_bIncludeHiddenCells;
++
+ sal_Int32 m_nStartingAngle;
+
+ rtl::OUString m_aSeriesParticle;
+diff --git chart2/source/view/main/ChartItemPool.cxx chart2/source/view/main/ChartItemPool.cxx
+index df6da6c..a678c8c 100644
+--- chart2/source/view/main/ChartItemPool.cxx
++++ chart2/source/view/main/ChartItemPool.cxx
+@@ -203,6 +203,7 @@ ChartItemPool::ChartItemPool():
+ 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 );
+
+diff --git chart2/source/view/main/ChartView.cxx chart2/source/view/main/ChartView.cxx
+index 03cd100..0433596 100644
+--- chart2/source/view/main/ChartView.cxx
++++ chart2/source/view/main/ChartView.cxx
+@@ -631,6 +631,7 @@ void SeriesPlotterContainer::initializeCooSysAndSeriesPlotter(
sal_Bool bSortByXValues = sal_False;
sal_Bool bConnectBars = sal_False;
sal_Bool bGroupBarsPerAxis = sal_True;
@@ -645,7 +818,7 @@
sal_Int32 nStartingAngle = 90;
try
{
-@@ -630,6 +631,7 @@
+@@ -638,6 +639,7 @@ void SeriesPlotterContainer::initializeCooSysAndSeriesPlotter(
xDiaProp->getPropertyValue( C2U( "SortByXValues" ) ) >>= bSortByXValues;
xDiaProp->getPropertyValue( C2U( "ConnectBars" ) ) >>= bConnectBars;
xDiaProp->getPropertyValue( C2U( "GroupBarsPerAxis" ) ) >>= bGroupBarsPerAxis;
@@ -653,7 +826,7 @@
xDiaProp->getPropertyValue( C2U( "StartingAngle" ) ) >>= nStartingAngle;
}
catch( const uno::Exception & ex )
-@@ -655,6 +657,7 @@
+@@ -663,6 +665,7 @@ void SeriesPlotterContainer::initializeCooSysAndSeriesPlotter(
{
uno::Reference< XCoordinateSystem > xCooSys( aCooSysList[nCS] );
VCoordinateSystem* pVCooSys = addCooSysToList(m_rVCooSysList,xCooSys,xChartModel);
@@ -661,35 +834,79 @@
//iterate through all chart types in the current coordinate system
uno::Reference< XChartTypeContainer > xChartTypeContainer( xCooSys, uno::UNO_QUERY );
-@@ -695,7 +698,7 @@
+@@ -703,7 +706,7 @@ void SeriesPlotterContainer::initializeCooSysAndSeriesPlotter(
uno::Reference< XDataSeries > xDataSeries( aSeriesList[nS], uno::UNO_QUERY );
if(!xDataSeries.is())
continue;
- VDataSeries* pSeries = new VDataSeries( xDataSeries );
-+ VDataSeries* pSeries = new VDataSeries( xDataSeries, bIncludeHiddenCells );
++ VDataSeries* pSeries = new VDataSeries( xDataSeries, bIncludeHiddenCells );
pSeries->setGlobalSeriesIndex(nGlobalSeriesIndex);
nGlobalSeriesIndex++;
-Index: source/view/main/ChartItemPool.cxx
-===================================================================
---- chart2/source/view/main/ChartItemPool.cxx (.../tags/DEV300_m35/chart2) (revision 264806)
-+++ chart2/source/view/main/ChartItemPool.cxx (.../cws/koheichart01/chart2) (revision 264806)
-@@ -197,6 +197,7 @@
- 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 );
-
-Index: source/view/main/VDataSeries.cxx
-===================================================================
---- chart2/source/view/main/VDataSeries.cxx (.../tags/DEV300_m35/chart2) (revision 264806)
-+++ chart2/source/view/main/VDataSeries.cxx (.../cws/koheichart01/chart2) (revision 264806)
-@@ -109,12 +109,11 @@
- }
- }
+diff --git chart2/source/view/main/VDataSeries.cxx chart2/source/view/main/VDataSeries.cxx
+index cb2f652..ed307ac 100644
+--- chart2/source/view/main/VDataSeries.cxx
++++ chart2/source/view/main/VDataSeries.cxx
+@@ -37,6 +37,7 @@
+ #include "LabelPositionHelper.hxx"
+ #include "ChartTypeHelper.hxx"
+ #include "ContainerHelper.hxx"
++#include "DataSeriesHelper.hxx"
+ #include "MeanValueRegressionCurveCalculator.hxx"
+
+ #include <com/sun/star/chart/MissingValueTreatment.hpp>
+@@ -61,60 +62,11 @@ using namespace ::com::sun::star;
+ 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 )
+void VDataSequence::init( const uno::Reference< data::XDataSequence >& xModel, bool bIncludeHiddenCells )
{
@@ -701,7 +918,7 @@
{
uno::Reference<beans::XPropertySet> xProp(xModel, uno::UNO_QUERY );
if( xProp.is())
-@@ -132,10 +131,10 @@
+@@ -132,15 +84,15 @@ void VDataSequence::init( const uno::Reference< data::XDataSequence >& xModel )
}
Model = xModel;
@@ -714,7 +931,13 @@
{
if( bIsHidden )
Doubles.realloc(0);
-@@ -206,7 +205,7 @@
+ else if( aHiddenValues.getLength() )
+- lcl_removeIndices( Doubles, aHiddenValues );
++ DataSeriesHelper::removeHiddenDataPoints(Doubles, aHiddenValues);
+ }
+ }
+
+@@ -206,7 +158,7 @@ VDataSeries::VDataSeries()
DBG_ERROR("not implemented");
}
@@ -723,7 +946,7 @@
: m_nPolygonIndex(0)
, m_fLogicMinX(0.0)
, m_fLogicMaxX(0.0)
-@@ -236,6 +235,7 @@
+@@ -236,6 +188,7 @@ VDataSeries::VDataSeries( const uno::Reference< XDataSeries >& xDataSeries )
, m_nAxisIndex(0)
, m_bConnectBars(sal_False)
, m_bGroupBarsPerAxis(sal_True)
@@ -731,7 +954,7 @@
, m_nStartingAngle(90)
, m_aSeriesParticle()
-@@ -280,17 +280,17 @@
+@@ -280,17 +233,17 @@ VDataSeries::VDataSeries( const uno::Reference< XDataSeries >& xDataSeries )
aARole >>= aRole;
if( aRole.equals(C2U("values-x")) )
@@ -755,7 +978,7 @@
//@todo assign the other roles (+ error for unknown?)
}
catch( uno::Exception& e )
-@@ -485,6 +485,16 @@
+@@ -485,6 +438,16 @@ sal_Bool VDataSeries::getGroupBarsPerAxis() const
return m_bGroupBarsPerAxis;
}
@@ -772,58 +995,3 @@
void VDataSeries::setStartingAngle( sal_Int32 nStartingAngle )
{
m_nStartingAngle = nStartingAngle;
-Index: source/view/inc/VDataSeries.hxx
-===================================================================
---- chart2/source/view/inc/VDataSeries.hxx (.../tags/DEV300_m35/chart2) (revision 264806)
-+++ chart2/source/view/inc/VDataSeries.hxx (.../cws/koheichart01/chart2) (revision 264806)
-@@ -59,7 +59,7 @@
- {
- public:
- void init( const ::com::sun::star::uno::Reference<
-- ::com::sun::star::chart2::data::XDataSequence >& xModel);
-+ ::com::sun::star::chart2::data::XDataSequence >& xModel, bool bIncludeHiddenCells );
- bool is() const;
- void clear();
- double getValue( sal_Int32 index ) const;
-@@ -77,7 +77,7 @@
- {
- public:
- VDataSeries( const ::com::sun::star::uno::Reference<
-- ::com::sun::star::chart2::XDataSeries >& xDataSeries );
-+ ::com::sun::star::chart2::XDataSeries >& xDataSeries, bool bIncludeHiddenCells );
- virtual ~VDataSeries();
-
- ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeries >
-@@ -138,6 +138,9 @@
- void setGroupBarsPerAxis( sal_Bool bGroupBarsPerAxis );
- sal_Bool getGroupBarsPerAxis() const;
-
-+ void setIncludeHiddenCells( sal_Bool bIncludeHiddenCells );
-+ sal_Bool getIncludeHiddenCells() const;
-+
- void setStartingAngle( sal_Int32 nStartingAngle );
- sal_Int32 getStartingAngle() const;
-
-@@ -220,6 +223,8 @@
-
- sal_Bool m_bGroupBarsPerAxis;
-
-+ sal_Bool m_bIncludeHiddenCells;
-+
- sal_Int32 m_nStartingAngle;
-
- rtl::OUString m_aSeriesParticle;
-Index: source/view/inc/VCoordinateSystem.hxx
-===================================================================
---- chart2/source/view/inc/VCoordinateSystem.hxx (.../tags/DEV300_m35/chart2) (revision 264806)
-+++ chart2/source/view/inc/VCoordinateSystem.hxx (.../cws/koheichart01/chart2) (revision 264806)
-@@ -133,6 +133,9 @@
- virtual bool needSeriesNamesForAxis() const;
- void setSeriesNamesForAxis( const ::com::sun::star::uno::Sequence< rtl::OUString >& rSeriesNames );
-
-+ void setIncludeHiddenCells(bool b);
-+ bool getIncludeHiddenCells() const;
-+
- protected: //methods
- VCoordinateSystem( const ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::XCoordinateSystem >& xCooSys );
Modified: trunk/patches/dev300/chart-skip-hidden-cells-sc.diff
==============================================================================
--- trunk/patches/dev300/chart-skip-hidden-cells-sc.diff (original)
+++ trunk/patches/dev300/chart-skip-hidden-cells-sc.diff Mon Dec 29 17:37:16 2008
@@ -1,103 +1,168 @@
-Index: source/filter/excel/xechart.cxx
-===================================================================
---- sc/source/filter/excel/xechart.cxx (.../tags/DEV300_m35/sc) (revision 264806)
-+++ sc/source/filter/excel/xechart.cxx (.../cws/koheichart01/sc) (revision 264806)
-@@ -2662,7 +2662,7 @@
- maRect.mnWidth = static_cast< sal_Int32 >( aPtSize.Width() << 16 );
- maRect.mnHeight = static_cast< sal_Int32 >( aPtSize.Height() << 16 );
+diff --git sc/inc/chart2uno.hxx sc/inc/chart2uno.hxx
+index aa13bef..2757a62 100644
+--- sc/inc/chart2uno.hxx
++++ sc/inc/chart2uno.hxx
+@@ -33,6 +33,7 @@
-- // global chart properties
-+ // global chart properties (default values)
- ::set_flag( maProps.mnFlags, EXC_CHPROPS_MANSERIES );
- ::set_flag( maProps.mnFlags, EXC_CHPROPS_SHOWVISCELLS, false );
- maProps.mnEmptyMode = EXC_CHPROPS_EMPTY_SKIP;
-@@ -2673,6 +2673,18 @@
+ #include "cellsuno.hxx" // for XModifyListenerArr_Impl / ScLinkListener
+ #include "rangelst.hxx"
++#include "chartlis.hxx"
+ #include <svtools/lstner.hxx>
+ #include <com/sun/star/chart2/data/XDataProvider.hpp>
+ #include <com/sun/star/chart2/data/XRangeXMLConversion.hpp>
+@@ -59,6 +60,8 @@
- if( xChartDoc.is() )
- {
-+ Reference< XDiagram > xDiagram = xChartDoc->getFirstDiagram();
-+
-+ // global chart properties (only 'include hidden cells' attribute for now)
-+ Reference< XPropertySet > xPropSet( xDiagram, UNO_QUERY );
-+ if (xPropSet.is())
-+ {
-+ Any any = xPropSet->getPropertyValue( OUString::createFromAscii("IncludeHiddenCells") );
-+ sal_Bool b = sal_True;
-+ any >>= b;
-+ ::set_flag( maProps.mnFlags, EXC_CHPROPS_SHOWVISCELLS, !b );
-+ }
+ #include <map>
+ #include <list>
++#include <vector>
++#include <memory>
+
+ class ScDocument;
+
+@@ -379,6 +382,9 @@ public:
+ // static ScChart2DataSequence* getImplementation( const com::sun::star::uno::Reference<
+ // com::sun::star::uno::XInterface> xObj );
+
++private:
++ void setDataChangedHint(bool b);
+
- // initialize API conversion (remembers xChartDoc internally)
- InitConversion( xChartDoc );
+ // Implementation --------------------------------------------------------
-@@ -2685,7 +2697,6 @@
- mxTitle = lclCreateTitle( GetChRoot(), xTitled, EXC_CHOBJLINK_TITLE );
+ ScRangeListRef GetRangeList() { return m_xRanges; }
+@@ -386,8 +392,38 @@ public:
+ void RefChanged();
+ DECL_LINK( ValueListenerHdl, SfxHint* );
- // diagrams (axes sets)
-- Reference< XDiagram > xDiagram = xChartDoc->getFirstDiagram();
- sal_uInt16 nFreeGroupIdx = mxPrimAxesSet->Convert( xDiagram, 0 );
- if( !mxPrimAxesSet->Is3dChart() )
- mxSecnAxesSet->Convert( xDiagram, nFreeGroupIdx );
-Index: source/filter/excel/xichart.cxx
-===================================================================
---- sc/source/filter/excel/xichart.cxx (.../tags/DEV300_m35/sc) (revision 264806)
-+++ sc/source/filter/excel/xichart.cxx (.../cws/koheichart01/sc) (revision 264806)
-@@ -3262,7 +3262,7 @@
- ReadChSeries( rStrm );
- break;
- case EXC_ID_CHPROPERTIES:
-- rStrm >> maProps.mnFlags >> maProps.mnEmptyMode;
-+ ReadChProperties( rStrm );
- break;
- case EXC_ID_CHDEFAULTTEXT:
- ReadChDefaultText( rStrm );
-@@ -3366,6 +3366,16 @@
- if( xDiagram.is() && mxLegend.is() )
- xDiagram->setLegend( mxLegend->CreateLegend() );
++ /**
++ * Build an internal data array and other information such as hidden
++ * values.
++ */
++ void BuildDataArray();
++
+ private:
-+ // properties
-+ Reference< XPropertySet > xPropSet(xDiagram, UNO_QUERY);
-+ if (xPropSet.is())
++ // data array
++ struct Item
+ {
-+ bool bShowVisCells = (maProps.mnFlags & EXC_CHPROPS_SHOWVISCELLS);
-+ Any any;
-+ any <<= static_cast<sal_Bool>(!bShowVisCells);
-+ xPropSet->setPropertyValue(OUString::createFromAscii("IncludeHiddenCells"), any);
-+ }
++ double mfValue;
++ ::rtl::OUString maString;
++ bool mbIsValue;
++ Item();
++ };
+
- // unlock the model
- FinishConversion( rProgress );
- }
-@@ -3378,6 +3388,11 @@
- maSeries.push_back( xSeries );
- }
++ 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;
+@@ -398,6 +434,7 @@ private:
+ com::sun::star::uno::Reference < com::sun::star::chart2::data::XDataProvider > m_xDataProvider;
+ SfxItemPropertySet m_aPropSet;
-+void XclImpChChart::ReadChProperties( XclImpStream& rStrm )
++ ::std::auto_ptr<HiddenRangeListener> m_pHiddenListener;
+ ScLinkListener* m_pValueListener;
+ sal_Bool m_bGotDataChangedHint;
+ XModifyListenerArr_Impl m_aValueListeners;
+diff --git sc/inc/chartlis.hxx sc/inc/chartlis.hxx
+index 0069085..60e77ce 100644
+--- sc/inc/chartlis.hxx
++++ sc/inc/chartlis.hxx
+@@ -37,6 +37,8 @@
+ #include "collect.hxx"
+ #include "rangelst.hxx"
+
++#include <list>
++
+ class ScDocument;
+ class ScChartUnoData;
+ #include <com/sun/star/chart/XChartData.hpp>
+@@ -97,9 +99,31 @@ public:
+ { return !operator==( r ); }
+ };
+
++// ============================================================================
++
++class ScChartHiddenRangeListener
+{
-+ rStrm >> maProps.mnFlags >> maProps.mnEmptyMode;
-+}
++public:
++ ScChartHiddenRangeListener();
++ virtual ~ScChartHiddenRangeListener();
++ virtual void notify() = 0;
++};
+
- void XclImpChChart::ReadChAxesSet( XclImpStream& rStrm )
++// ============================================================================
++
+ class ScChartListenerCollection : public StrCollection
{
- XclImpChAxesSetRef xAxesSet( new XclImpChAxesSet( GetChRoot(), EXC_CHAXESSET_NONE ) );
-Index: source/filter/inc/xichart.hxx
-===================================================================
---- sc/source/filter/inc/xichart.hxx (.../tags/DEV300_m35/sc) (revision 264806)
-+++ sc/source/filter/inc/xichart.hxx (.../cws/koheichart01/sc) (revision 264806)
-@@ -1341,6 +1341,8 @@
++public:
++ struct RangeListenerItem
++ {
++ ScRange maRange;
++ ScChartHiddenRangeListener* mpListener;
++ explicit RangeListenerItem(const ScRange& rRange, ScChartHiddenRangeListener* p);
++ };
++
private:
- /** Reads a CHSERIES group (data series source and formatting). */
- void ReadChSeries( XclImpStream& rStrm );
-+ /** Reads a CHPROPERTIES record. */
-+ void ReadChProperties( XclImpStream& rStrm );
- /** Reads a CHAXESSET group (primary/secondary axes set). */
- void ReadChAxesSet( XclImpStream& rStrm );
- /** Reads a CHTEXT group (chart title and series/point captions). */
-Index: source/core/data/table2.cxx
-===================================================================
---- sc/source/core/data/table2.cxx (.../tags/DEV300_m35/sc) (revision 264806)
-+++ sc/source/core/data/table2.cxx (.../cws/koheichart01/sc) (revision 264806)
-@@ -626,8 +626,6 @@
++ ::std::list<RangeListenerItem> maHiddenListeners;
++
+ Timer aTimer;
+ ScDocument* pDoc;
+
+@@ -139,6 +163,24 @@ public:
+ 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 );
+ };
+
+
+diff --git sc/inc/unonames.hxx sc/inc/unonames.hxx
+index 35cf347..7cd2954 100644
+--- sc/inc/unonames.hxx
++++ sc/inc/unonames.hxx
+@@ -608,6 +608,7 @@
+ // Chart2
+ #define SC_UNONAME_ISHIDDEN "IsHidden"
+ #define SC_UNONAME_ROLE "Role"
++#define SC_UNONAME_HIDDENVALUES "HiddenValues"
+
+ // Solver
+ #define SC_UNONAME_TIMEOUT "Timeout"
+diff --git sc/source/core/data/table2.cxx sc/source/core/data/table2.cxx
+index 1aad7a0..0e00586 100644
+--- sc/source/core/data/table2.cxx
++++ sc/source/core/data/table2.cxx
+@@ -626,8 +626,6 @@ void ScTable::CopyToTable(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
{
// Charts muessen beim Ein-/Ausblenden angepasst werden
ScChartListenerCollection* pCharts = pDestTab->pDocument->GetChartListenerCollection();
@@ -106,7 +171,7 @@
if (nRow1==0 && nRow2==MAXROW && pColWidth && pDestTab->pColWidth)
for (SCCOL i=nCol1; i<=nCol2; i++)
-@@ -2215,7 +2213,7 @@
+@@ -2222,7 +2220,7 @@ void ScTable::ShowCol(SCCOL nCol, BOOL bShow)
SetDrawPageSize();
ScChartListenerCollection* pCharts = pDocument->GetChartListenerCollection();
@@ -115,7 +180,7 @@
pCharts->SetRangeDirty(ScRange( nCol, 0, nTab, nCol, MAXROW, nTab ));
}
}
-@@ -2252,7 +2250,7 @@
+@@ -2259,7 +2257,7 @@ void ScTable::ShowRow(SCROW nRow, BOOL bShow)
SetDrawPageSize();
ScChartListenerCollection* pCharts = pDocument->GetChartListenerCollection();
@@ -124,7 +189,7 @@
pCharts->SetRangeDirty(ScRange( 0, nRow, nTab, MAXCOL, nRow, nTab ));
}
}
-@@ -2293,7 +2291,7 @@
+@@ -2300,7 +2298,7 @@ void ScTable::DBShowRow(SCROW nRow, BOOL bShow)
if (bWasVis != bShow)
{
ScChartListenerCollection* pCharts = pDocument->GetChartListenerCollection();
@@ -133,7 +198,7 @@
pCharts->SetRangeDirty(ScRange( 0, nRow, nTab, MAXCOL, nRow, nTab ));
if (pOutlineTable)
-@@ -2341,7 +2339,7 @@
+@@ -2348,7 +2346,7 @@ void ScTable::DBShowRows(SCROW nRow1, SCROW nRow2, BOOL bShow)
if ( bChanged )
{
ScChartListenerCollection* pCharts = pDocument->GetChartListenerCollection();
@@ -142,7 +207,7 @@
pCharts->SetRangeDirty(ScRange( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab ));
}
-@@ -2393,7 +2391,7 @@
+@@ -2400,7 +2398,7 @@ void ScTable::ShowRows(SCROW nRow1, SCROW nRow2, BOOL bShow)
if ( bChanged )
{
ScChartListenerCollection* pCharts = pDocument->GetChartListenerCollection();
@@ -151,26 +216,25 @@
pCharts->SetRangeDirty(ScRange( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab ));
}
-Index: source/core/tool/chartlis.cxx
-===================================================================
---- sc/source/core/tool/chartlis.cxx (.../tags/DEV300_m35/sc) (revision 264806)
-+++ sc/source/core/tool/chartlis.cxx (.../cws/koheichart01/sc) (revision 264806)
-@@ -40,8 +40,8 @@
+diff --git sc/source/core/tool/chartlis.cxx sc/source/core/tool/chartlis.cxx
+index 4d6b1b3..0196c9e 100644
+--- sc/source/core/tool/chartlis.cxx
++++ sc/source/core/tool/chartlis.cxx
+@@ -40,7 +40,7 @@
#include "document.hxx"
using namespace com::sun::star;
+-
+using ::std::list;
--
//2do: DocOption TimeOut?
//#define SC_CHARTTIMEOUT 1000 // eine Sekunde keine Aenderung/KeyEvent
-
-@@ -265,9 +265,24 @@
+@@ -265,9 +265,24 @@ BOOL ScChartListener::operator==( const ScChartListener& r )
;
}
+// ============================================================================
-
++
+ScChartHiddenRangeListener::ScChartHiddenRangeListener()
+{
+}
@@ -179,7 +243,7 @@
+{
+ // empty d'tor
+}
-+
+
// === ScChartListenerCollection ======================================
+ScChartListenerCollection::RangeListenerItem::RangeListenerItem(const ScRange& rRange, ScChartHiddenRangeListener* p) :
@@ -190,7 +254,7 @@
ScChartListenerCollection::ScChartListenerCollection( ScDocument* pDocP ) :
StrCollection( 4, 4, FALSE ),
pDoc( pDocP )
-@@ -454,6 +469,14 @@
+@@ -454,6 +469,14 @@ void ScChartListenerCollection::SetRangeDirty( const ScRange& rRange )
}
if ( bDirty )
StartTimer();
@@ -205,7 +269,7 @@
}
-@@ -493,6 +516,34 @@
+@@ -493,6 +516,34 @@ BOOL ScChartListenerCollection::operator==( const ScChartListenerCollection& r )
return TRUE;
}
@@ -224,7 +288,7 @@
+ mpMatch(pMatch)
+ {
+ }
-
++
+ bool operator() (const ScChartListenerCollection::RangeListenerItem& rItem) const
+ {
+ return mpMatch == rItem.mpListener;
@@ -239,11 +303,106 @@
+{
+ maHiddenListeners.remove_if(MatchListener(pListener));
+}
+
+diff --git sc/source/filter/excel/xechart.cxx sc/source/filter/excel/xechart.cxx
+index eaf9437..8216502 100644
+--- sc/source/filter/excel/xechart.cxx
++++ sc/source/filter/excel/xechart.cxx
+@@ -2662,7 +2662,7 @@ XclExpChChart::XclExpChChart( const XclExpRoot& rRoot,
+ maRect.mnWidth = static_cast< sal_Int32 >( aPtSize.Width() << 16 );
+ maRect.mnHeight = static_cast< sal_Int32 >( aPtSize.Height() << 16 );
+
+- // global chart properties
++ // global chart properties (default values)
+ ::set_flag( maProps.mnFlags, EXC_CHPROPS_MANSERIES );
+ ::set_flag( maProps.mnFlags, EXC_CHPROPS_SHOWVISCELLS, false );
+ maProps.mnEmptyMode = EXC_CHPROPS_EMPTY_SKIP;
+@@ -2673,6 +2673,18 @@ XclExpChChart::XclExpChChart( const XclExpRoot& rRoot,
+
+ if( xChartDoc.is() )
+ {
++ Reference< XDiagram > xDiagram = xChartDoc->getFirstDiagram();
+
-Index: source/ui/unoobj/chart2uno.cxx
-===================================================================
---- sc/source/ui/unoobj/chart2uno.cxx (.../tags/DEV300_m35/sc) (revision 264806)
-+++ sc/source/ui/unoobj/chart2uno.cxx (.../cws/koheichart01/sc) (revision 264806)
++ // global chart properties (only 'include hidden cells' attribute for now)
++ Reference< XPropertySet > xPropSet( xDiagram, UNO_QUERY );
++ if (xPropSet.is())
++ {
++ Any any = xPropSet->getPropertyValue( OUString::createFromAscii("IncludeHiddenCells") );
++ sal_Bool b = sal_True;
++ any >>= b;
++ ::set_flag( maProps.mnFlags, EXC_CHPROPS_SHOWVISCELLS, !b );
++ }
++
+ // initialize API conversion (remembers xChartDoc internally)
+ InitConversion( xChartDoc );
+
+@@ -2685,7 +2697,6 @@ XclExpChChart::XclExpChChart( const XclExpRoot& rRoot,
+ mxTitle = lclCreateTitle( GetChRoot(), xTitled, EXC_CHOBJLINK_TITLE );
+
+ // diagrams (axes sets)
+- Reference< XDiagram > xDiagram = xChartDoc->getFirstDiagram();
+ sal_uInt16 nFreeGroupIdx = mxPrimAxesSet->Convert( xDiagram, 0 );
+ if( !mxPrimAxesSet->Is3dChart() )
+ mxSecnAxesSet->Convert( xDiagram, nFreeGroupIdx );
+diff --git sc/source/filter/excel/xichart.cxx sc/source/filter/excel/xichart.cxx
+index 054da3a..eb3aaf5 100644
+--- sc/source/filter/excel/xichart.cxx
++++ sc/source/filter/excel/xichart.cxx
+@@ -3261,7 +3261,7 @@ void XclImpChChart::ReadSubRecord( XclImpStream& rStrm )
+ ReadChSeries( rStrm );
+ break;
+ case EXC_ID_CHPROPERTIES:
+- rStrm >> maProps.mnFlags >> maProps.mnEmptyMode;
++ ReadChProperties( rStrm );
+ break;
+ case EXC_ID_CHDEFAULTTEXT:
+ ReadChDefaultText( rStrm );
+@@ -3365,6 +3365,16 @@ void XclImpChChart::Convert( Reference< XChartDocument > xChartDoc, ScfProgressB
+ if( xDiagram.is() && mxLegend.is() )
+ xDiagram->setLegend( mxLegend->CreateLegend() );
+
++ // properties
++ Reference< XPropertySet > xPropSet(xDiagram, UNO_QUERY);
++ if (xPropSet.is())
++ {
++ bool bShowVisCells = (maProps.mnFlags & EXC_CHPROPS_SHOWVISCELLS);
++ Any any;
++ any <<= static_cast<sal_Bool>(!bShowVisCells);
++ xPropSet->setPropertyValue(OUString::createFromAscii("IncludeHiddenCells"), any);
++ }
++
+ // unlock the model
+ FinishConversion( rProgress );
+ }
+@@ -3377,6 +3387,11 @@ void XclImpChChart::ReadChSeries( XclImpStream& rStrm )
+ maSeries.push_back( xSeries );
+ }
+
++void XclImpChChart::ReadChProperties( XclImpStream& rStrm )
++{
++ rStrm >> maProps.mnFlags >> maProps.mnEmptyMode;
++}
++
+ void XclImpChChart::ReadChAxesSet( XclImpStream& rStrm )
+ {
+ XclImpChAxesSetRef xAxesSet( new XclImpChAxesSet( GetChRoot(), EXC_CHAXESSET_NONE ) );
+diff --git sc/source/filter/inc/xichart.hxx sc/source/filter/inc/xichart.hxx
+index 676e394..8cbc6b9 100644
+--- sc/source/filter/inc/xichart.hxx
++++ sc/source/filter/inc/xichart.hxx
+@@ -1341,6 +1341,8 @@ public:
+ private:
+ /** Reads a CHSERIES group (data series source and formatting). */
+ void ReadChSeries( XclImpStream& rStrm );
++ /** Reads a CHPROPERTIES record. */
++ void ReadChProperties( XclImpStream& rStrm );
+ /** Reads a CHAXESSET group (primary/secondary axes set). */
+ void ReadChAxesSet( XclImpStream& rStrm );
+ /** Reads a CHTEXT group (chart title and series/point captions). */
+diff --git sc/source/ui/unoobj/chart2uno.cxx sc/source/ui/unoobj/chart2uno.cxx
+index 9f7dd8a..439700f 100644
+--- sc/source/ui/unoobj/chart2uno.cxx
++++ sc/source/ui/unoobj/chart2uno.cxx
@@ -43,6 +43,7 @@
#include "rangeutl.hxx"
#include "hints.hxx"
@@ -252,7 +411,7 @@
#include <sfx2/objsh.hxx>
-@@ -1315,6 +1316,25 @@
+@@ -1315,6 +1316,25 @@ void SAL_CALL ScChart2LabeledDataSequence::removeModifyListener( const uno::Refe
// DataSequence ==============================================================
@@ -278,7 +437,7 @@
ScChart2DataSequence::ScChart2DataSequence( ScDocument* pDoc,
const uno::Reference < chart2::data::XDataProvider >& xDP,
const ScRangeListRef& rRangeList)
-@@ -1324,6 +1344,7 @@
+@@ -1324,6 +1344,7 @@ ScChart2DataSequence::ScChart2DataSequence( ScDocument* pDoc,
, m_pDocument( pDoc)
, m_xDataProvider( xDP)
, m_aPropSet(lcl_GetDataSequencePropertyMap())
@@ -286,7 +445,7 @@
, m_pValueListener( NULL )
, m_bGotDataChangedHint( FALSE )
{
-@@ -1349,7 +1370,15 @@
+@@ -1349,7 +1370,15 @@ ScChart2DataSequence::ScChart2DataSequence( ScDocument* pDoc,
ScChart2DataSequence::~ScChart2DataSequence()
{
if ( m_pDocument )
@@ -302,7 +461,7 @@
delete m_pValueListener;
}
-@@ -1357,7 +1386,10 @@
+@@ -1357,7 +1386,10 @@ ScChart2DataSequence::~ScChart2DataSequence()
void ScChart2DataSequence::RefChanged()
{
@@ -314,7 +473,7 @@
{
m_pValueListener->EndListeningAll();
-@@ -1368,9 +1400,88 @@
+@@ -1368,8 +1400,96 @@ void ScChart2DataSequence::RefChanged()
m_pDocument->StartListeningArea( *m_xRanges->GetObject(i), m_pValueListener );
}
}
@@ -336,7 +495,7 @@
+{
+ if (!m_aDataArray.empty())
+ return;
-
++
+ ::std::list<sal_Int32> aHiddenValues;
+ sal_Int32 nDataCount = 0;
+ sal_Int32 nHiddenValueCount = 0;
@@ -386,6 +545,15 @@
+ rItem.mfValue = pFCell->GetValue();
+ rItem.mbIsValue = true;
+ }
++ break;
++ case CELLTYPE_DESTROYED:
++ case CELLTYPE_EDIT:
++ case CELLTYPE_NONE:
++ case CELLTYPE_NOTE:
++ case CELLTYPE_STRING:
++ case CELLTYPE_SYMBOLS:
++ default:
++ ; // do nothing
+ }
+ }
+ }
@@ -399,11 +567,10 @@
+ for (;itr != itrEnd; ++itr, ++pArr)
+ *pArr = *itr;
+}
-+
+
void ScChart2DataSequence::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint)
{
- if ( rHint.ISA( SfxSimpleHint ) )
-@@ -1385,7 +1496,8 @@
+@@ -1385,7 +1505,8 @@ void ScChart2DataSequence::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint
// delayed broadcast as in ScCellRangesBase
if ( m_bGotDataChangedHint && m_pDocument )
@@ -413,7 +580,7 @@
lang::EventObject aEvent;
aEvent.Source.set((cppu::OWeakObject*)this);
-@@ -1448,7 +1560,7 @@
+@@ -1448,7 +1569,7 @@ IMPL_LINK( ScChart2DataSequence, ValueListenerHdl, SfxHint*, pHint )
// in the range are notified. So only a flag is set that is checked when
// SFX_HINT_DATACHANGED is received.
@@ -422,7 +589,7 @@
}
return 0;
}
-@@ -1461,72 +1573,19 @@
+@@ -1461,72 +1582,19 @@ uno::Sequence< uno::Any> SAL_CALL ScChart2DataSequence::getData()
if ( !m_pDocument)
throw uno::RuntimeException();
@@ -505,7 +672,7 @@
return aSeq;
}
-@@ -1539,67 +1598,18 @@
+@@ -1539,67 +1607,18 @@ uno::Sequence< double > SAL_CALL ScChart2DataSequence::getNumericalData()
if ( !m_pDocument)
throw uno::RuntimeException();
@@ -581,7 +748,7 @@
return aSeq;
}
-@@ -1611,49 +1621,15 @@
+@@ -1611,49 +1630,15 @@ uno::Sequence< rtl::OUString > SAL_CALL ScChart2DataSequence::getTextualData( )
if ( !m_pDocument)
throw uno::RuntimeException();
@@ -639,7 +806,7 @@
return aSeq;
}
-@@ -1878,11 +1854,22 @@
+@@ -1878,11 +1863,20 @@ void SAL_CALL ScChart2DataSequence::addModifyListener( const uno::Reference< uti
if (!m_pValueListener)
m_pValueListener = new ScLinkListener( LINK( this, ScChart2DataSequence, ValueListenerHdl ) );
@@ -657,13 +824,11 @@
+ ScChartListenerCollection* pCLC = m_pDocument->GetChartListenerCollection();
+ if (pCLC)
+ pCLC->StartListeningHiddenRange(aRange, m_pHiddenListener.get());
-+
-+ markRangeDirty(aRange);
+ }
}
acquire(); // don't lose this object (one ref for all listeners)
-@@ -1914,6 +1901,13 @@
+@@ -1914,6 +1908,13 @@ void SAL_CALL ScChart2DataSequence::removeModifyListener( const uno::Reference<
if (m_pValueListener)
m_pValueListener->EndListeningAll();
@@ -677,7 +842,7 @@
release(); // release the ref for the listeners
}
-@@ -1969,6 +1963,13 @@
+@@ -1969,6 +1970,13 @@ uno::Any SAL_CALL ScChart2DataSequence::getPropertyValue(
aRet <<= m_aRole;
else if ( rPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_ISHIDDEN)))
aRet <<= m_bHidden;
@@ -691,41 +856,10 @@
else
throw beans::UnknownPropertyException();
// TODO: support optional properties
-@@ -2023,6 +2024,42 @@
+@@ -2023,6 +2031,11 @@ void SAL_CALL ScChart2DataSequence::removeVetoableChangeListener(
OSL_ENSURE( false, "Not yet implemented" );
}
-+void ScChart2DataSequence::markRangeDirty(const ScRange& rRange) const
-+{
-+ if (!m_pDocument)
-+ return;
-+
-+ const ScAddress &s = rRange.aStart, &e = rRange.aEnd;
-+ SCTAB nTab1 = s.Tab(), nTab2 = e.Tab();
-+ SCCOL nCol1 = s.Col(), nCol2 = e.Col();
-+ SCROW nRow1 = s.Row(), nRow2 = e.Row();
-+ for (SCTAB nTab = nTab1; nTab <= nTab2; ++nTab)
-+ {
-+ for (SCCOL nCol = nCol1; nCol <= nCol2; ++nCol)
-+ {
-+ for (SCROW nRow = nRow1; nRow <= nRow2; ++nRow)
-+ {
-+ ScAddress aAddr(nCol, nRow, nTab);
-+ ScBaseCell* pBaseCell = m_pDocument->GetCell(aAddr);
-+ if (!pBaseCell || pBaseCell->GetCellType() != CELLTYPE_FORMULA)
-+ continue;
-+
-+ ScFormulaCell* pFCell = static_cast<ScFormulaCell*>(pBaseCell);
-+ ScTokenArray* pArray = pFCell->GetCode();
-+ if (!pArray)
-+ continue;
-+
-+ pFCell->SetDirty();
-+ }
-+ }
-+ }
-+}
-+
+void ScChart2DataSequence::setDataChangedHint(bool b)
+{
+ m_bGotDataChangedHint = b;
@@ -734,164 +868,6 @@
// XUnoTunnel
// sal_Int64 SAL_CALL ScChart2DataSequence::getSomething(
-Index: inc/chartlis.hxx
-===================================================================
---- sc/inc/chartlis.hxx (.../tags/DEV300_m35/sc) (revision 264806)
-+++ sc/inc/chartlis.hxx (.../cws/koheichart01/sc) (revision 264806)
-@@ -37,6 +37,8 @@
- #include "collect.hxx"
- #include "rangelst.hxx"
-
-+#include <list>
-+
- class ScDocument;
- class ScChartUnoData;
- #include <com/sun/star/chart/XChartData.hpp>
-@@ -97,9 +99,31 @@
- { return !operator==( r ); }
- };
-
-+// ============================================================================
-+
-+class ScChartHiddenRangeListener
-+{
-+public:
-+ ScChartHiddenRangeListener();
-+ virtual ~ScChartHiddenRangeListener();
-+ virtual void notify() = 0;
-+};
-+
-+// ============================================================================
-+
- class ScChartListenerCollection : public StrCollection
- {
-+public:
-+ struct RangeListenerItem
-+ {
-+ ScRange maRange;
-+ ScChartHiddenRangeListener* mpListener;
-+ explicit RangeListenerItem(const ScRange& rRange, ScChartHiddenRangeListener* p);
-+ };
-+
- private:
-+ ::std::list<RangeListenerItem> maHiddenListeners;
-+
- Timer aTimer;
- ScDocument* pDoc;
-
-@@ -139,6 +163,24 @@
- 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 );
- };
-
-
-Index: inc/chart2uno.hxx
-===================================================================
---- sc/inc/chart2uno.hxx (.../tags/DEV300_m35/sc) (revision 264806)
-+++ sc/inc/chart2uno.hxx (.../cws/koheichart01/sc) (revision 264806)
-@@ -33,6 +33,7 @@
-
- #include "cellsuno.hxx" // for XModifyListenerArr_Impl / ScLinkListener
- #include "rangelst.hxx"
-+#include "chartlis.hxx"
- #include <svtools/lstner.hxx>
- #include <com/sun/star/chart2/data/XDataProvider.hpp>
- #include <com/sun/star/chart2/data/XRangeXMLConversion.hpp>
-@@ -59,6 +60,8 @@
-
- #include <map>
- #include <list>
-+#include <vector>
-+#include <memory>
-
- class ScDocument;
-
-@@ -379,6 +382,10 @@
- // static ScChart2DataSequence* getImplementation( const com::sun::star::uno::Reference<
- // com::sun::star::uno::XInterface> xObj );
-
-+private:
-+ void markRangeDirty(const ScRange& rRange) const;
-+ void setDataChangedHint(bool b);
-+
- // Implementation --------------------------------------------------------
-
- ScRangeListRef GetRangeList() { return m_xRanges; }
-@@ -386,8 +393,38 @@
- void RefChanged();
- DECL_LINK( ValueListenerHdl, SfxHint* );
-
-+ /**
-+ * Build an internal data array and other information such as hidden
-+ * values.
-+ */
-+ void BuildDataArray();
-+
- private:
-
-+ // data array
-+ struct Item
-+ {
-+ double mfValue;
-+ ::rtl::OUString maString;
-+ bool mbIsValue;
-+ 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;
-@@ -398,6 +435,7 @@
- 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;
- sal_Bool m_bGotDataChangedHint;
- XModifyListenerArr_Impl m_aValueListeners;
-Index: inc/unonames.hxx
-===================================================================
---- sc/inc/unonames.hxx (.../tags/DEV300_m35/sc) (revision 264806)
-+++ sc/inc/unonames.hxx (.../cws/koheichart01/sc) (revision 264806)
-@@ -604,6 +604,7 @@
- // Chart2
- #define SC_UNONAME_ISHIDDEN "IsHidden"
- #define SC_UNONAME_ROLE "Role"
-+#define SC_UNONAME_HIDDENVALUES "HiddenValues"
-
- // Solver
- #define SC_UNONAME_TIMEOUT "Timeout"
+diff --git sc/workben/celltrans/keywords_utf16.txt sc/workben/celltrans/keywords_utf16.txt
+index 52e71ed..b563c8d 100644
+Binary files sc/workben/celltrans/keywords_utf16.txt and sc/workben/celltrans/keywords_utf16.txt differ
Modified: trunk/patches/dev300/chart-skip-hidden-cells-xmloff.diff
==============================================================================
--- trunk/patches/dev300/chart-skip-hidden-cells-xmloff.diff (original)
+++ trunk/patches/dev300/chart-skip-hidden-cells-xmloff.diff Mon Dec 29 17:37:16 2008
@@ -1,8 +1,20 @@
-Index: source/chart/PropertyMap.hxx
-===================================================================
---- xmloff/source/chart/PropertyMap.hxx (.../tags/DEV300_m35/xmloff) (revision 264806)
-+++ xmloff/source/chart/PropertyMap.hxx (.../cws/koheichart01/xmloff) (revision 264806)
-@@ -133,6 +133,7 @@
+diff --git xmloff/inc/xmloff/xmltoken.hxx xmloff/inc/xmloff/xmltoken.hxx
+index e15041f..f75053d 100644
+--- xmloff/inc/xmloff/xmltoken.hxx
++++ xmloff/inc/xmloff/xmltoken.hxx
+@@ -2970,6 +2970,7 @@ namespace xmloff { namespace token {
+ XML_PERCENTAGE_DATA_STYLE_NAME,
+ XML_VALUE_AND_PERCENTAGE,
+ XML_GROUP_BARS_PER_AXIS,
++ XML_INCLUDE_HIDDEN_CELLS,
+ XML_AUTOMATIC_POSITION,
+ XML_AUTOMATIC_SIZE,
+ XML_REVERSE_DIRECTION,
+diff --git xmloff/source/chart/PropertyMap.hxx xmloff/source/chart/PropertyMap.hxx
+index b1671d8..84c3d58 100644
+--- xmloff/source/chart/PropertyMap.hxx
++++ xmloff/source/chart/PropertyMap.hxx
+@@ -139,6 +139,7 @@ const XMLPropertyMapEntry aXMLChartPropMap[] =
MAP_ENTRY( "StackedBarsConnected", CHART, XML_CONNECT_BARS, XML_TYPE_BOOL ),
MAP_ENTRY_ODF12( "GroupBarsPerAxis", CHART, XML_GROUP_BARS_PER_AXIS, XML_TYPE_BOOL ),
@@ -10,11 +22,11 @@
MAP_ENTRY_ODF12( "AutomaticPosition", CHART, XML_AUTOMATIC_POSITION, XML_TYPE_BOOL ),
MAP_ENTRY_ODF12( "AutomaticSize", CHART, XML_AUTOMATIC_SIZE, XML_TYPE_BOOL ),
MAP_ENTRY_ODF12( "StartingAngle", CHART, XML_ANGLE_OFFSET, XML_TYPE_NUMBER ),
-Index: source/core/xmltoken.cxx
-===================================================================
---- xmloff/source/core/xmltoken.cxx (.../tags/DEV300_m35/xmloff) (revision 264806)
-+++ xmloff/source/core/xmltoken.cxx (.../cws/koheichart01/xmloff) (revision 264806)
-@@ -2961,6 +2961,7 @@
+diff --git xmloff/source/core/xmltoken.cxx xmloff/source/core/xmltoken.cxx
+index 474d0f4..11df02c 100644
+--- xmloff/source/core/xmltoken.cxx
++++ xmloff/source/core/xmltoken.cxx
+@@ -2970,6 +2970,7 @@ namespace xmloff { namespace token {
TOKEN( "percentage-data-style-name", XML_PERCENTAGE_DATA_STYLE_NAME ),
TOKEN( "value-and-percentage", XML_VALUE_AND_PERCENTAGE ),
TOKEN( "group-bars-per-axis", XML_GROUP_BARS_PER_AXIS ),
@@ -22,15 +34,3 @@
TOKEN( "auto-position", XML_AUTOMATIC_POSITION ),
TOKEN( "auto-size", XML_AUTOMATIC_SIZE ),
TOKEN( "reverse-direction", XML_REVERSE_DIRECTION ),
-Index: inc/xmloff/xmltoken.hxx
-===================================================================
---- xmloff/inc/xmloff/xmltoken.hxx (.../tags/DEV300_m35/xmloff) (revision 264806)
-+++ xmloff/inc/xmloff/xmltoken.hxx (.../cws/koheichart01/xmloff) (revision 264806)
-@@ -2961,6 +2961,7 @@
- XML_PERCENTAGE_DATA_STYLE_NAME,
- XML_VALUE_AND_PERCENTAGE,
- XML_GROUP_BARS_PER_AXIS,
-+ XML_INCLUDE_HIDDEN_CELLS,
- XML_AUTOMATIC_POSITION,
- XML_AUTOMATIC_SIZE,
- XML_REVERSE_DIRECTION,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]