ooo-build r14715 - in trunk: . patches/dev300
- From: kyoshida svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r14715 - in trunk: . patches/dev300
- Date: Wed, 3 Dec 2008 18:10:40 +0000 (UTC)
Author: kyoshida
Date: Wed Dec 3 18:10:40 2008
New Revision: 14715
URL: http://svn.gnome.org/viewvc/ooo-build?rev=14715&view=rev
Log:
2008-12-03 Kohei Yoshida <kyoshida novell com>
* patches/dev300/chart-skip-hidden-cells-chart2.diff:
* patches/dev300/chart-skip-hidden-cells-sc.diff:
* patches/dev300/chart-skip-hidden-cells-xmloff.diff: latest patches
extracted from koheichart01 CWS, to implement the UI option in the data
series options dialog.
* patches/dev300/apply:
* patches/dev300/chart-maximum-minimum-typo.diff: removed; combined
with chart-skip-hidden-cells-sc.diff.
Removed:
trunk/patches/dev300/chart-maximum-minimum-typo.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 Wed Dec 3 18:10:40 2008
@@ -825,9 +825,6 @@
calc-dp-no-drilldown-when-readonly.diff, i#90402, kohei
[ CalcFixes ]
-# Fix a typo in chart2 that causes incorrect scaling under certain conditions.
-chart-maximum-minimum-typo.diff, i#95714, kohei
-
# Pivot cache field import fix.
calc-dp-pivotcache-fix.diff, n#433658, i#96326, 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 Wed Dec 3 18:10:40 2008
@@ -1,52 +1,8 @@
-diff --git chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
-index df18ec8..3d4e9a9 100644
---- chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
-+++ chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
-@@ -113,6 +113,7 @@ enum
- PROP_DIAGRAM_DATAROW_SOURCE,
-
- PROP_DIAGRAM_GROUP_BARS_PER_AXIS,
-+ PROP_DIAGRAM_INCLUDE_HIDDEN_CELLS,
-
- PROP_DIAGRAM_SORT_BY_X_VALUES,
-
-@@ -230,6 +231,13 @@ void lcl_AddPropertiesToVector(
- 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" ),
-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/model/main/Diagram.cxx chart2/source/model/main/Diagram.cxx
-index b7c1eb7..cc6dc2c 100644
---- chart2/source/model/main/Diagram.cxx
-+++ chart2/source/model/main/Diagram.cxx
-@@ -79,6 +79,7 @@ enum
+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,
PROP_DIAGRAM_GROUP_BARS_PER_AXIS,
@@ -54,7 +10,7 @@
PROP_DIAGRAM_STARTING_ANGLE,
PROP_DIAGRAM_RIGHT_ANGLED_AXES,
PROP_DIAGRAM_PERSPECTIVE,
-@@ -125,6 +126,13 @@ void lcl_AddPropertiesToVector(
+@@ -125,6 +126,13 @@
| beans::PropertyAttribute::MAYBEDEFAULT ));
rOutProperties.push_back(
@@ -68,30 +24,31 @@
Property( C2U( "StartingAngle" ),
PROP_DIAGRAM_STARTING_ANGLE,
::getCppuType( reinterpret_cast< const sal_Int32 * >(0) ),
-@@ -163,6 +171,7 @@ void lcl_AddDefaultsToMap(
+@@ -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, false );
++ ::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..efc130b 100644
---- chart2/source/tools/ExplicitCategoriesProvider.cxx
-+++ chart2/source/tools/ExplicitCategoriesProvider.cxx
-@@ -34,6 +34,10 @@
+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"
-+
+
+#include <hash_set>
+#include <vector>
-
++
//.............................................................................
namespace chart
-@@ -45,9 +49,12 @@ using namespace ::com::sun::star::chart2;
+ {
+@@ -45,9 +49,12 @@
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
using rtl::OUString;
@@ -104,7 +61,7 @@
, m_xCooSysModel( xCooSysModel )
, m_xCategories()
{
-@@ -63,20 +70,75 @@ ExplicitCategoriesProvider::~ExplicitCategoriesProvider()
+@@ -63,20 +70,75 @@
{
}
@@ -184,11 +141,11 @@
// 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(
+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()),
@@ -197,7 +154,7 @@
m_xDataProvider( xIntDataProv ),
m_aSourceRepresentation( rRangeRepresentation ),
m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder())
-@@ -93,7 +93,7 @@ UncachedDataSequence::UncachedDataSequence(
+@@ -93,7 +93,7 @@
const OUString & rRole )
: OPropertyContainer( GetBroadcastHelper()),
UncachedDataSequence_Base( GetMutex()),
@@ -206,87 +163,481 @@
m_xDataProvider( xIntDataProv ),
m_aSourceRepresentation( rRangeRepresentation ),
m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder())
-diff --git chart2/source/view/axes/VCoordinateSystem.cxx chart2/source/view/axes/VCoordinateSystem.cxx
-index 148b28c..82a4538 100644
---- chart2/source/view/axes/VCoordinateSystem.cxx
-+++ chart2/source/view/axes/VCoordinateSystem.cxx
-@@ -598,6 +598,16 @@ void VCoordinateSystem::setSeriesNamesForAxis( const Sequence< rtl::OUString >&
- m_aSeriesNamesForZAxis = rSeriesNames;
+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 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
+@@ -75,4 +75,17 @@
+ Maximum = 359 ;
+ SpinSize = 5 ;
+ };
++ FixedLine FL_PLOT_OPTIONS
++ {
++ Pos = MAP_APPFONT ( 6 , 90 ) ;
++ Size = MAP_APPFONT ( 248 , 8 ) ;
++ Text [ en-US ] = "Plot options";
++ };
++ CheckBox CB_INCLUDE_HIDDEN_CELLS
++ {
++ Pos = MAP_APPFONT ( 12 , 104 ) ;
++ Size = MAP_APPFONT ( 200 , 10 ) ;
++ TabStop = TRUE ;
++ 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 @@
+ 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)
+ {
+@@ -123,6 +125,9 @@
+ 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;
}
-+void VCoordinateSystem::setIncludeHiddenCells(bool b)
-+{
-+ m_aExplicitCategoriesProvider->setIncludeHiddenCells(b);
-+}
+@@ -215,10 +220,17 @@
+ 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);
+ }
+ }
+
++ // 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);
++ }
+
-+bool VCoordinateSystem::getIncludeHiddenCells() const
+ AdaptControlPositionsAndVisibility();
+ }
+
+@@ -231,6 +243,12 @@
+ AdaptControlPositionsAndVisibility();
+ }
+
++static void lcl_offsetControl(Control& rCtrl, long nYOffset)
+{
-+ return m_aExplicitCategoriesProvider->getIncludeHiddenCells();
++ Point aPos = rCtrl.GetPosPixel();
++ rCtrl.SetPosPixel( Point(aPos.getX(), aPos.getY() + nYOffset) );
+}
+
- 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 cc0f512..d816e2e 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 135fcf8..11a5bd8 100644
---- chart2/source/view/inc/VDataSeries.hxx
-+++ chart2/source/view/inc/VDataSeries.hxx
-@@ -59,7 +59,7 @@ class VDataSequence
+ void SchOptionTabPage::AdaptControlPositionsAndVisibility()
{
- 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
+ aRbtAxis1.Show(m_bProvidesSecondaryYAxis);
+@@ -254,14 +272,13 @@
+ 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, nYOffset);
++ lcl_offsetControl(m_aFT_MissingValues, nYOffset);
++ lcl_offsetControl(m_aRB_DontPaint, nYOffset);
++ lcl_offsetControl(m_aRB_AssumeZero, nYOffset);
++ lcl_offsetControl(m_aRB_ContinueLine, nYOffset);
++ lcl_offsetControl(m_aCBIncludeHiddenCells, nYOffset);
+ }
+
+ 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 ) )
{
- public:
- VDataSeries( const ::com::sun::star::uno::Reference<
-- ::com::sun::star::chart2::XDataSeries >& xDataSeries );
-+ ::com::sun::star::chart2::XDataSeries >& xDataSeries, bool bIncludeHiddenCells );
- virtual ~VDataSeries();
+ FreeResource();
- ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeries >
-@@ -138,6 +138,9 @@ public:
- void setGroupBarsPerAxis( sal_Bool bGroupBarsPerAxis );
- sal_Bool getGroupBarsPerAxis() const;
+@@ -78,6 +80,9 @@
+ if( m_aCB_Clockwise.IsVisible() )
+ rOutAttrs.Put(SfxInt32Item(SCHATTR_CLOCKWISE,m_aCB_Clockwise.IsChecked()));
-+ void setIncludeHiddenCells( sal_Bool bIncludeHiddenCells );
-+ sal_Bool getIncludeHiddenCells() const;
++ if (m_aCB_IncludeHiddenCells.IsVisible())
++ rOutAttrs.Put(SfxBoolItem(SCHATTR_INCLUDE_HIDDEN_CELLS, m_aCB_IncludeHiddenCells.IsChecked()));
+
- void setStartingAngle( sal_Int32 nStartingAngle );
- sal_Int32 getStartingAngle() const;
+ 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);
++ }
+ }
+
+ //.............................................................................
+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 @@
+ 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
+@@ -131,16 +131,23 @@
+ 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 ( 248 , 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";
+@@ -148,7 +155,7 @@
+
+ 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";
+@@ -156,9 +163,17 @@
-@@ -217,6 +220,8 @@ private: //member
+ 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 ] = "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 @@
+
+ ::com::sun::star::uno::Sequence< sal_Int32 > m_aSupportedMissingValueTreatments;
+ sal_Int32 m_nMissingValueTreatment;
++
++ bool m_bIncludeHiddenCells;
+ };
+
+ } // 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 @@
+ 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
- sal_Bool m_bGroupBarsPerAxis;
+ 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 @@
+ , m_bClockwise(false)
+ , m_aSupportedMissingValueTreatments()
+ , m_nMissingValueTreatment(0)
++ , m_bIncludeHiddenCells(true)
+ {
+ try
+ {
+@@ -159,6 +160,8 @@
+ m_aSupportedMissingValueTreatments = ChartTypeHelper::getSupportedMissingValueTreatments( xChartType );
+ m_nMissingValueTreatment = DiagramHelper::getCorrectedMissingValueTreatment(
+ ChartModelHelper::findDiagram(m_xChartModel), xChartType );
++
++ xDiagramProperties->getPropertyValue( C2U("IncludeHiddenCells") ) >>= m_bIncludeHiddenCells;
+ }
+ catch( uno::Exception ex )
+ {
+@@ -341,6 +344,27 @@
+ }
+ }
+ break;
++ case SCHATTR_INCLUDE_HIDDEN_CELLS:
++ {
++ bool bIncludeHiddenCells = static_cast<const SfxBoolItem &>(rItemSet.Get(nWhichId)).GetValue();
++ if (bIncludeHiddenCells != m_bIncludeHiddenCells)
++ {
++ try
++ {
++ uno::Reference< beans::XPropertySet > xDiagramProperties( ChartModelHelper::findDiagram(m_xChartModel), uno::UNO_QUERY );
++ if (xDiagramProperties.is())
++ {
++ xDiagramProperties->setPropertyValue( C2U("IncludeHiddenCells"), uno::makeAny(bIncludeHiddenCells));
++ bChanged = true;
++ }
++ }
++ catch (uno::Exception& e)
++ {
++ ASSERT_EXCEPTION(e);
++ }
++ }
++ }
++ break;
+ }
+ return bChanged;
+ }
+@@ -412,6 +436,11 @@
+ rOutItemSet.Put( SfxIntegerListItem( nWhichId, aList ) );
+ break;
+ }
++ case SCHATTR_INCLUDE_HIDDEN_CELLS:
++ {
++ rOutItemSet.Put( SfxBoolItem(nWhichId, m_bIncludeHiddenCells) );
++ break;
++ }
+ 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,
-+ sal_Bool m_bIncludeHiddenCells;
+ PROP_DIAGRAM_GROUP_BARS_PER_AXIS,
++ PROP_DIAGRAM_INCLUDE_HIDDEN_CELLS,
+
+ PROP_DIAGRAM_SORT_BY_X_VALUES,
+
+@@ -233,6 +234,13 @@
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::MAYBEDEFAULT ));
+
++ rOutProperties.push_back(
++ Property( C2U( "IncludeHiddenCells" ),
++ PROP_DIAGRAM_INCLUDE_HIDDEN_CELLS,
++ ::getBooleanCppuType(),
++ beans::PropertyAttribute::BOUND
++ | beans::PropertyAttribute::MAYBEDEFAULT ));
+
- sal_Int32 m_nStartingAngle;
+ //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 @@
+ #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)
+-#define SCHATTR_STARTING_ANGLE (SCHATTR_CHARTTYPE_START + 9)
+-#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 + 9)
++#define SCHATTR_STARTING_ANGLE (SCHATTR_CHARTTYPE_START + 10)
++#define SCHATTR_CLOCKWISE (SCHATTR_CHARTTYPE_START + 11)
++#define SCHATTR_MISSING_VALUE_TREATMENT (SCHATTR_CHARTTYPE_START + 12)
++#define SCHATTR_AVAILABLE_MISSING_VALUE_TREATMENTS (SCHATTR_CHARTTYPE_START + 13)
+
+ #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 );
- rtl::OUString m_aSeriesParticle;
-diff --git chart2/source/view/main/ChartView.cxx chart2/source/view/main/ChartView.cxx
-index a16fffd..63075dc 100644
---- chart2/source/view/main/ChartView.cxx
-+++ chart2/source/view/main/ChartView.cxx
-@@ -621,6 +621,7 @@ void SeriesPlotterContainer::initializeCooSysAndSeriesPlotter(
++ 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;
+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;
+ }
+
++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 )
+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 @@
+ 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;
+ }
+@@ -143,7 +143,7 @@
+ 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
+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 @@
sal_Bool bSortByXValues = sal_False;
sal_Bool bConnectBars = sal_False;
sal_Bool bGroupBarsPerAxis = sal_True;
@@ -294,7 +645,7 @@
sal_Int32 nStartingAngle = 90;
try
{
-@@ -628,6 +629,7 @@ void SeriesPlotterContainer::initializeCooSysAndSeriesPlotter(
+@@ -630,6 +631,7 @@
xDiaProp->getPropertyValue( C2U( "SortByXValues" ) ) >>= bSortByXValues;
xDiaProp->getPropertyValue( C2U( "ConnectBars" ) ) >>= bConnectBars;
xDiaProp->getPropertyValue( C2U( "GroupBarsPerAxis" ) ) >>= bGroupBarsPerAxis;
@@ -302,7 +653,7 @@
xDiaProp->getPropertyValue( C2U( "StartingAngle" ) ) >>= nStartingAngle;
}
catch( const uno::Exception & ex )
-@@ -653,6 +655,7 @@ void SeriesPlotterContainer::initializeCooSysAndSeriesPlotter(
+@@ -655,6 +657,7 @@
{
uno::Reference< XCoordinateSystem > xCooSys( aCooSysList[nCS] );
VCoordinateSystem* pVCooSys = addCooSysToList(m_rVCooSysList,xCooSys,xChartModel);
@@ -310,7 +661,7 @@
//iterate through all chart types in the current coordinate system
uno::Reference< XChartTypeContainer > xChartTypeContainer( xCooSys, uno::UNO_QUERY );
-@@ -692,7 +695,7 @@ void SeriesPlotterContainer::initializeCooSysAndSeriesPlotter(
+@@ -695,7 +698,7 @@
uno::Reference< XDataSeries > xDataSeries( aSeriesList[nS], uno::UNO_QUERY );
if(!xDataSeries.is())
continue;
@@ -319,11 +670,23 @@
pSeries->setGlobalSeriesIndex(nGlobalSeriesIndex);
nGlobalSeriesIndex++;
-diff --git chart2/source/view/main/VDataSeries.cxx chart2/source/view/main/VDataSeries.cxx
-index fdee8d7..c0e7f52 100644
---- chart2/source/view/main/VDataSeries.cxx
-+++ chart2/source/view/main/VDataSeries.cxx
-@@ -108,12 +108,11 @@ namespace
+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 @@
}
}
@@ -338,7 +701,7 @@
{
uno::Reference<beans::XPropertySet> xProp(xModel, uno::UNO_QUERY );
if( xProp.is())
-@@ -131,10 +130,10 @@ void VDataSequence::init( const uno::Reference< data::XDataSequence >& xModel )
+@@ -132,10 +131,10 @@
}
Model = xModel;
@@ -351,7 +714,7 @@
{
if( bIsHidden )
Doubles.realloc(0);
-@@ -205,7 +204,7 @@ VDataSeries::VDataSeries()
+@@ -206,7 +205,7 @@
DBG_ERROR("not implemented");
}
@@ -360,7 +723,7 @@
: m_nPolygonIndex(0)
, m_fLogicMinX(0.0)
, m_fLogicMaxX(0.0)
-@@ -235,6 +234,7 @@ VDataSeries::VDataSeries( const uno::Reference< XDataSeries >& xDataSeries )
+@@ -236,6 +235,7 @@
, m_nAxisIndex(0)
, m_bConnectBars(sal_False)
, m_bGroupBarsPerAxis(sal_True)
@@ -368,7 +731,7 @@
, m_nStartingAngle(90)
, m_aSeriesParticle()
-@@ -278,17 +278,17 @@ VDataSeries::VDataSeries( const uno::Reference< XDataSeries >& xDataSeries )
+@@ -280,17 +280,17 @@
aARole >>= aRole;
if( aRole.equals(C2U("values-x")) )
@@ -392,7 +755,7 @@
//@todo assign the other roles (+ error for unknown?)
}
catch( uno::Exception& e )
-@@ -483,6 +483,16 @@ sal_Bool VDataSeries::getGroupBarsPerAxis() const
+@@ -485,6 +485,16 @@
return m_bGroupBarsPerAxis;
}
@@ -409,3 +772,58 @@
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 Wed Dec 3 18:10:40 2008
@@ -1,169 +1,112 @@
-diff --git sc/inc/chart2uno.hxx sc/inc/chart2uno.hxx
-index aa13bef..5a7769b 100644
---- sc/inc/chart2uno.hxx
-+++ sc/inc/chart2uno.hxx
-@@ -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;
+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 );
-@@ -379,6 +382,10 @@ public:
- // static ScChart2DataSequence* getImplementation( const com::sun::star::uno::Reference<
- // com::sun::star::uno::XInterface> xObj );
+- // 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 @@
-+private:
-+ void markRangeDirty(const ScRange& rRange) const;
-+ void setDataChangedHint(bool b);
+ if( xChartDoc.is() )
+ {
++ Reference< XDiagram > xDiagram = xChartDoc->getFirstDiagram();
+
- // Implementation --------------------------------------------------------
-
- ScRangeListRef GetRangeList() { return m_xRanges; }
-@@ -386,8 +393,38 @@ public:
- void RefChanged();
- DECL_LINK( ValueListenerHdl, SfxHint* );
-
-+ /**
-+ * Build an internal data array and other information such as hidden
-+ * values.
-+ */
-+ void BuildDataArray();
++ // 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 );
++ }
+
- private:
+ // initialize API conversion (remembers xChartDoc internally)
+ InitConversion( xChartDoc );
-+ // 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 @@ private:
- com::sun::star::uno::Reference < com::sun::star::chart2::data::XDataProvider > m_xDataProvider;
- SfxItemPropertySet m_aPropSet;
+@@ -2685,7 +2697,6 @@
+ mxTitle = lclCreateTitle( GetChRoot(), xTitled, EXC_CHOBJLINK_TITLE );
-+ ::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"
+ // 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() );
-+#include <list>
++ // 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);
++ }
+
- class ScDocument;
- class ScChartUnoData;
- #include <com/sun/star/chart/XChartData.hpp>
-@@ -97,9 +99,31 @@ public:
- { return !operator==( r ); }
- };
+ // unlock the model
+ FinishConversion( rProgress );
+ }
+@@ -3378,6 +3388,11 @@
+ maSeries.push_back( xSeries );
+ }
-+// ============================================================================
-+
-+class ScChartHiddenRangeListener
++void XclImpChChart::ReadChProperties( XclImpStream& rStrm )
+{
-+public:
-+ ScChartHiddenRangeListener();
-+ virtual ~ScChartHiddenRangeListener();
-+ virtual void notify() = 0;
-+};
-+
-+// ============================================================================
++ rStrm >> maProps.mnFlags >> maProps.mnEmptyMode;
++}
+
- class ScChartListenerCollection : public StrCollection
+ void XclImpChChart::ReadChAxesSet( XclImpStream& rStrm )
{
-+public:
-+ struct RangeListenerItem
-+ {
-+ ScRange maRange;
-+ ScChartHiddenRangeListener* mpListener;
-+ explicit RangeListenerItem(const ScRange& rRange, ScChartHiddenRangeListener* p);
-+ };
-+
+ 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 @@
private:
-+ ::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 ad84ca3..18c858b 100644
---- sc/inc/unonames.hxx
-+++ sc/inc/unonames.hxx
-@@ -610,6 +610,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 2ed8dbc..9bcc2b7 100644
---- sc/source/core/data/table2.cxx
-+++ sc/source/core/data/table2.cxx
-@@ -2196,7 +2196,7 @@ void ScTable::ShowCol(SCCOL nCol, BOOL bShow)
+ /** 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 @@
+ {
+ // Charts muessen beim Ein-/Ausblenden angepasst werden
+ ScChartListenerCollection* pCharts = pDestTab->pDocument->GetChartListenerCollection();
+- if ( pCharts && !pCharts->GetCount() )
+- pCharts = NULL;
+
+ if (nRow1==0 && nRow2==MAXROW && pColWidth && pDestTab->pColWidth)
+ for (SCCOL i=nCol1; i<=nCol2; i++)
+@@ -2215,7 +2213,7 @@
SetDrawPageSize();
ScChartListenerCollection* pCharts = pDocument->GetChartListenerCollection();
@@ -172,7 +115,7 @@
pCharts->SetRangeDirty(ScRange( nCol, 0, nTab, nCol, MAXROW, nTab ));
}
}
-@@ -2233,7 +2233,7 @@ void ScTable::ShowRow(SCROW nRow, BOOL bShow)
+@@ -2252,7 +2250,7 @@
SetDrawPageSize();
ScChartListenerCollection* pCharts = pDocument->GetChartListenerCollection();
@@ -181,7 +124,7 @@
pCharts->SetRangeDirty(ScRange( 0, nRow, nTab, MAXCOL, nRow, nTab ));
}
}
-@@ -2274,7 +2274,7 @@ void ScTable::DBShowRow(SCROW nRow, BOOL bShow)
+@@ -2293,7 +2291,7 @@
if (bWasVis != bShow)
{
ScChartListenerCollection* pCharts = pDocument->GetChartListenerCollection();
@@ -190,7 +133,7 @@
pCharts->SetRangeDirty(ScRange( 0, nRow, nTab, MAXCOL, nRow, nTab ));
if (pOutlineTable)
-@@ -2322,7 +2322,7 @@ void ScTable::DBShowRows(SCROW nRow1, SCROW nRow2, BOOL bShow)
+@@ -2341,7 +2339,7 @@
if ( bChanged )
{
ScChartListenerCollection* pCharts = pDocument->GetChartListenerCollection();
@@ -199,7 +142,7 @@
pCharts->SetRangeDirty(ScRange( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab ));
}
-@@ -2374,7 +2374,7 @@ void ScTable::ShowRows(SCROW nRow1, SCROW nRow2, BOOL bShow)
+@@ -2393,7 +2391,7 @@
if ( bChanged )
{
ScChartListenerCollection* pCharts = pDocument->GetChartListenerCollection();
@@ -208,25 +151,26 @@
pCharts->SetRangeDirty(ScRange( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab ));
}
-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 @@
+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 @@
#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 @@ BOOL ScChartListener::operator==( const ScChartListener& r )
+
+@@ -265,9 +265,24 @@
;
}
+// ============================================================================
-+
+
+ScChartHiddenRangeListener::ScChartHiddenRangeListener()
+{
+}
@@ -235,7 +179,7 @@
+{
+ // empty d'tor
+}
-
++
// === ScChartListenerCollection ======================================
+ScChartListenerCollection::RangeListenerItem::RangeListenerItem(const ScRange& rRange, ScChartHiddenRangeListener* p) :
@@ -246,7 +190,7 @@
ScChartListenerCollection::ScChartListenerCollection( ScDocument* pDocP ) :
StrCollection( 4, 4, FALSE ),
pDoc( pDocP )
-@@ -454,6 +469,14 @@ void ScChartListenerCollection::SetRangeDirty( const ScRange& rRange )
+@@ -454,6 +469,14 @@
}
if ( bDirty )
StartTimer();
@@ -261,7 +205,7 @@
}
-@@ -493,6 +516,34 @@ BOOL ScChartListenerCollection::operator==( const ScChartListenerCollection& r )
+@@ -493,6 +516,34 @@
return TRUE;
}
@@ -280,7 +224,7 @@
+ mpMatch(pMatch)
+ {
+ }
-+
+
+ bool operator() (const ScChartListenerCollection::RangeListenerItem& rItem) const
+ {
+ return mpMatch == rItem.mpListener;
@@ -295,106 +239,11 @@
+{
+ maHiddenListeners.remove_if(MatchListener(pListener));
+}
-
-diff --git sc/source/filter/excel/xechart.cxx sc/source/filter/excel/xechart.cxx
-index f04d57a..7fff80d 100644
---- sc/source/filter/excel/xechart.cxx
-+++ sc/source/filter/excel/xechart.cxx
-@@ -2659,7 +2659,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;
-@@ -2670,6 +2670,18 @@ XclExpChChart::XclExpChChart( const XclExpRoot& rRoot,
-
- 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 );
-+ }
-+
- // initialize API conversion (remembers xChartDoc internally)
- InitConversion( xChartDoc );
-
-@@ -2685,7 +2697,6 @@ XclExpChChart::XclExpChChart( const XclExpRoot& rRoot,
- aSubTitle.Len() ? &aSubTitle : NULL );
-
- // 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 46cb411..441f699 100644
---- sc/source/filter/excel/xichart.cxx
-+++ sc/source/filter/excel/xichart.cxx
-@@ -3227,7 +3227,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 );
-@@ -3329,6 +3329,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 );
- }
-@@ -3341,6 +3351,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 ada3f4e..2e79767 100644
---- sc/source/filter/inc/xichart.hxx
-+++ sc/source/filter/inc/xichart.hxx
-@@ -1337,6 +1337,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 28223a8..0d561fd 100644
---- sc/source/ui/unoobj/chart2uno.cxx
-+++ sc/source/ui/unoobj/chart2uno.cxx
+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)
@@ -43,6 +43,7 @@
#include "rangeutl.hxx"
#include "hints.hxx"
@@ -403,7 +252,7 @@
#include <sfx2/objsh.hxx>
-@@ -1319,6 +1320,25 @@ void SAL_CALL ScChart2LabeledDataSequence::removeModifyListener( const uno::Refe
+@@ -1315,6 +1316,25 @@
// DataSequence ==============================================================
@@ -429,7 +278,7 @@
ScChart2DataSequence::ScChart2DataSequence( ScDocument* pDoc,
const uno::Reference < chart2::data::XDataProvider >& xDP,
const ScRangeListRef& rRangeList)
-@@ -1328,6 +1348,7 @@ ScChart2DataSequence::ScChart2DataSequence( ScDocument* pDoc,
+@@ -1324,6 +1344,7 @@
, m_pDocument( pDoc)
, m_xDataProvider( xDP)
, m_aPropSet(lcl_GetDataSequencePropertyMap())
@@ -437,7 +286,7 @@
, m_pValueListener( NULL )
, m_bGotDataChangedHint( FALSE )
{
-@@ -1353,7 +1374,15 @@ ScChart2DataSequence::ScChart2DataSequence( ScDocument* pDoc,
+@@ -1349,7 +1370,15 @@
ScChart2DataSequence::~ScChart2DataSequence()
{
if ( m_pDocument )
@@ -453,7 +302,7 @@
delete m_pValueListener;
}
-@@ -1361,7 +1390,10 @@ ScChart2DataSequence::~ScChart2DataSequence()
+@@ -1357,7 +1386,10 @@
void ScChart2DataSequence::RefChanged()
{
@@ -465,7 +314,7 @@
{
m_pValueListener->EndListeningAll();
-@@ -1372,8 +1404,87 @@ void ScChart2DataSequence::RefChanged()
+@@ -1368,9 +1400,88 @@
m_pDocument->StartListeningArea( *m_xRanges->GetObject(i), m_pValueListener );
}
}
@@ -487,7 +336,7 @@
+{
+ if (!m_aDataArray.empty())
+ return;
-+
+
+ ::std::list<sal_Int32> aHiddenValues;
+ sal_Int32 nDataCount = 0;
+ sal_Int32 nHiddenValueCount = 0;
@@ -550,10 +399,11 @@
+ for (;itr != itrEnd; ++itr, ++pArr)
+ *pArr = *itr;
+}
-
++
void ScChart2DataSequence::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint)
{
-@@ -1389,7 +1500,8 @@ void ScChart2DataSequence::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint
+ if ( rHint.ISA( SfxSimpleHint ) )
+@@ -1385,7 +1496,8 @@
// delayed broadcast as in ScCellRangesBase
if ( m_bGotDataChangedHint && m_pDocument )
@@ -563,7 +413,7 @@
lang::EventObject aEvent;
aEvent.Source.set((cppu::OWeakObject*)this);
-@@ -1452,7 +1564,7 @@ IMPL_LINK( ScChart2DataSequence, ValueListenerHdl, SfxHint*, pHint )
+@@ -1448,7 +1560,7 @@
// in the range are notified. So only a flag is set that is checked when
// SFX_HINT_DATACHANGED is received.
@@ -572,7 +422,7 @@
}
return 0;
}
-@@ -1465,72 +1577,19 @@ uno::Sequence< uno::Any> SAL_CALL ScChart2DataSequence::getData()
+@@ -1461,72 +1573,19 @@
if ( !m_pDocument)
throw uno::RuntimeException();
@@ -655,7 +505,7 @@
return aSeq;
}
-@@ -1543,67 +1602,18 @@ uno::Sequence< double > SAL_CALL ScChart2DataSequence::getNumericalData()
+@@ -1539,67 +1598,18 @@
if ( !m_pDocument)
throw uno::RuntimeException();
@@ -731,7 +581,7 @@
return aSeq;
}
-@@ -1615,49 +1625,15 @@ uno::Sequence< rtl::OUString > SAL_CALL ScChart2DataSequence::getTextualData( )
+@@ -1611,49 +1621,15 @@
if ( !m_pDocument)
throw uno::RuntimeException();
@@ -789,7 +639,7 @@
return aSeq;
}
-@@ -1882,11 +1858,22 @@ void SAL_CALL ScChart2DataSequence::addModifyListener( const uno::Reference< uti
+@@ -1878,11 +1854,22 @@
if (!m_pValueListener)
m_pValueListener = new ScLinkListener( LINK( this, ScChart2DataSequence, ValueListenerHdl ) );
@@ -813,7 +663,7 @@
}
acquire(); // don't lose this object (one ref for all listeners)
-@@ -1918,6 +1905,13 @@ void SAL_CALL ScChart2DataSequence::removeModifyListener( const uno::Reference<
+@@ -1914,6 +1901,13 @@
if (m_pValueListener)
m_pValueListener->EndListeningAll();
@@ -827,7 +677,7 @@
release(); // release the ref for the listeners
}
-@@ -1973,6 +1967,13 @@ uno::Any SAL_CALL ScChart2DataSequence::getPropertyValue(
+@@ -1969,6 +1963,13 @@
aRet <<= m_aRole;
else if ( rPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_ISHIDDEN)))
aRet <<= m_bHidden;
@@ -841,7 +691,7 @@
else
throw beans::UnknownPropertyException();
// TODO: support optional properties
-@@ -2027,6 +2028,42 @@ void SAL_CALL ScChart2DataSequence::removeVetoableChangeListener(
+@@ -2023,6 +2024,42 @@
OSL_ENSURE( false, "Not yet implemented" );
}
@@ -884,3 +734,164 @@
// 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"
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 Wed Dec 3 18:10:40 2008
@@ -1,36 +1,36 @@
-diff --git xmloff/inc/xmloff/xmltoken.hxx xmloff/inc/xmloff/xmltoken.hxx
-index b012bb7..6f4141c 100644
---- xmloff/inc/xmloff/xmltoken.hxx
-+++ xmloff/inc/xmloff/xmltoken.hxx
-@@ -2972,6 +2972,7 @@ namespace xmloff { namespace token {
- XML_PERCENTAGE_DATA_STYLE_NAME,
- XML_VALUE_AND_PERCENTAGE,
- XML_GROUP_BARS_PER_AXIS,
-+ XML_INCLUDE_HIDEEN_CELLS,
- XML_AUTOMATIC_POSITION,
- XML_AUTOMATIC_SIZE,
- XML_REVERSE_DIRECTION,
-diff --git xmloff/source/chart/PropertyMap.hxx xmloff/source/chart/PropertyMap.hxx
-index c745746..37d9663 100644
---- xmloff/source/chart/PropertyMap.hxx
-+++ xmloff/source/chart/PropertyMap.hxx
-@@ -130,6 +130,7 @@ const XMLPropertyMapEntry aXMLChartPropMap[] =
- MAP_CONTEXT( "NumberOfLines", CHART, XML_LINES_USED, XML_TYPE_NUMBER, LINES_USED ),
+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 @@
MAP_ENTRY( "StackedBarsConnected", CHART, XML_CONNECT_BARS, XML_TYPE_BOOL ),
+
MAP_ENTRY_ODF12( "GroupBarsPerAxis", CHART, XML_GROUP_BARS_PER_AXIS, XML_TYPE_BOOL ),
-+ MAP_ENTRY_ODF12( "IncludeHiddenCells", CHART, XML_INCLUDE_HIDEEN_CELLS, XML_TYPE_BOOL ),
++ MAP_ENTRY_ODF12( "IncludeHiddenCells", CHART, XML_INCLUDE_HIDDEN_CELLS, XML_TYPE_BOOL ),
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 ),
-diff --git xmloff/source/core/xmltoken.cxx xmloff/source/core/xmltoken.cxx
-index 651a3d4..e7b035a 100644
---- xmloff/source/core/xmltoken.cxx
-+++ xmloff/source/core/xmltoken.cxx
-@@ -2972,6 +2972,7 @@ namespace xmloff { namespace token {
+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 @@
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 ),
-+ TOKEN( "include-hidden-cells", XML_INCLUDE_HIDEEN_CELLS ),
++ TOKEN( "include-hidden-cells", XML_INCLUDE_HIDDEN_CELLS ),
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]