--- Orig/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx 2007-08-16 16:09:52.000000000 +0800 +++ new/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx 2007-08-30 16:19:02.000000000 +0800 @@ -138,6 +138,8 @@ PROP_DIAGRAM_STACKED_BARS_CONNECTED, PROP_DIAGRAM_DATAROW_SOURCE, + PROP_DIAGRAM_GROUP_BARS_PER_AXIS, + PROP_DIAGRAM_SORT_BY_X_VALUES, PROP_DIAGRAM_HAS_X_AXIS, @@ -229,6 +231,13 @@ beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); + rOutProperties.push_back( + Property( C2U( "GroupBarsPerAxis" ), + PROP_DIAGRAM_GROUP_BARS_PER_AXIS, + ::getBooleanCppuType(), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT )); + //new for XY charts rOutProperties.push_back( Property( C2U( "SortByXValues" ), --- Orig/chart2/source/controller/dialogs/TabPages.hrc 2007-08-16 16:09:52.000000000 +0800 +++ new/chart2/source/controller/dialogs/TabPages.hrc 2007-08-29 10:02:24.000000000 +0800 @@ -116,6 +116,7 @@ #define FT_OVERLAP 7 #define GB_BAR 8 #define CB_CONNECTOR 9 +#define CB_GROUP_BARS_PER_AXIS 10 //------------ //from old chart tplabel.hrc --- Orig/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx 2007-08-16 16:09:52.000000000 +0800 +++ new/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx 2007-08-30 16:30:20.000000000 +0800 @@ -42,6 +42,8 @@ #include "chartview/ChartSfxItemIds.hxx" #include "NoWarningThisInCTOR.hxx" +#include "DataSeriesHelper.hxx" + // header for class SfxBoolItem #ifndef _SFXENUMITEM_HXX #include @@ -67,10 +69,18 @@ aMTGap(this,SchResId(MT_GAP)), aFTOverlap(this,SchResId(FT_OVERLAP)), aMTOverlap(this,SchResId(MT_OVERLAP)), - aCBConnect(this,SchResId(CB_CONNECTOR)) + aCBConnect(this,SchResId(CB_CONNECTOR)), + aCBGroupBarsPerAxis(this,SchResId(CB_GROUP_BARS_PER_AXIS)) { FreeResource(); + aRbtAxis1.SetClickHdl( LINK( this, SchOptionTabPage, EnableHdl )); + aRbtAxis2.SetClickHdl( LINK( this, SchOptionTabPage, EnableHdl )); + + if( AllSeriesHelper::isAllSeriesAttachedToMainAxis() || AllSeriesHelper::isAllSeriesNotAttachedToMainAxis() ) + aCBGroupBarsPerAxis.Disable(); + else + aCBGroupBarsPerAxis.Enable(); } /************************************************************************* |* @@ -82,6 +92,16 @@ { } +IMPL_LINK( SchOptionTabPage, EnableHdl, RadioButton *, EMPTYARG ) +{ + if( AllSeriesHelper::isAllSeriesNotAttachedToMainAxis() ) + aCBGroupBarsPerAxis.Enable( aRbtAxis1.IsChecked() ); + + if( AllSeriesHelper::isAllSeriesAttachedToMainAxis() ) + aCBGroupBarsPerAxis.Enable( aRbtAxis2.IsChecked() ); + + return 0; +} /************************************************************************* |* |* Erzeugung @@ -113,6 +133,9 @@ if(aCBConnect.IsVisible()) rOutAttrs.Put(SfxBoolItem(SCHATTR_BAR_CONNECT,aCBConnect.IsChecked())); + + if(aCBGroupBarsPerAxis.IsVisible()) + rOutAttrs.Put(SfxBoolItem(SCHATTR_GROUP_BARS_PER_AXIS,aCBGroupBarsPerAxis.IsChecked())); return TRUE; } @@ -169,10 +192,17 @@ { aCBConnect.Show(FALSE); } - + if (rInAttrs.GetItemState(SCHATTR_GROUP_BARS_PER_AXIS, TRUE, &pPoolItem) == SFX_ITEM_SET) + { + nTmp = (long)((const SfxInt32Item*)pPoolItem)->GetValue(); + aCBGroupBarsPerAxis.Check(BOOL(nTmp)); + } + else + { + aCBGroupBarsPerAxis.Show(FALSE); + } } - //............................................................................. } //namespace chart //............................................................................. --- Orig/chart2/source/controller/dialogs/tp_SeriesToAxis.hxx 2007-08-16 16:09:52.000000000 +0800 +++ new/chart2/source/controller/dialogs/tp_SeriesToAxis.hxx 2007-08-30 16:14:28.000000000 +0800 @@ -70,6 +70,9 @@ FixedText aFTOverlap; MetricField aMTOverlap; CheckBox aCBConnect; + CheckBox aCBGroupBarsPerAxis; + + DECL_LINK(EnableHdl, RadioButton * ); public: SchOptionTabPage(Window* pParent, const SfxItemSet& rInAttrs); --- Orig/chart2/source/controller/dialogs/tp_SeriesToAxis.src 2007-08-16 16:09:52.000000000 +0800 +++ new/chart2/source/controller/dialogs/tp_SeriesToAxis.src 2007-08-29 10:02:24.000000000 +0800 @@ -127,5 +127,13 @@ TabStop = TRUE ; Text [ en-US ] = "Connection Lines"; }; + + CheckBox CB_GROUP_BARS_PER_AXIS + { + Pos = MAP_APPFONT ( 12 , 90 ) ; + Size = MAP_APPFONT ( 200 , 10 ) ; + TabStop = TRUE ; + Text [ en-US ] = "Group bars per axis"; + }; }; --- Orig/chart2/source/controller/inc/SeriesOptionsItemConverter.hxx 2007-08-16 16:09:52.000000000 +0800 +++ new/chart2/source/controller/inc/SeriesOptionsItemConverter.hxx 2007-08-30 13:42:24.000000000 +0800 @@ -82,6 +82,11 @@ bool m_bAttachToMainAxis; bool m_bSupportingOverlapAndGapWidthProperties; bool m_bSupportingBarConnectors; + + bool m_bSupportingNotToGroupBarsPerAxis; + bool m_bGroupBarsPerAxis; + bool m_bAllSeriesAttachedToSameAxis; + sal_Int32 m_nBarOverlap; sal_Int32 m_nGapWidth; sal_Bool m_bConnectBars; --- Orig/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx 2007-08-16 16:09:52.000000000 +0800 +++ new/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx 2007-08-29 10:02:24.000000000 +0800 @@ -155,7 +155,8 @@ #define CHART_SERIES_OPTIONS_WHICHPAIRS \ SCHATTR_AXIS,SCHATTR_AXIS, /* 69 sch/schattr.hxx*/ \ - SCHATTR_BAR_OVERLAP,SCHATTR_BAR_CONNECT /* 98 - 100 (incl. SCHATTR_GAPWIDTH) */ \ + SCHATTR_BAR_OVERLAP,SCHATTR_BAR_CONNECT, /* 98 - 100 (incl. SCHATTR_GAPWIDTH) */ \ + SCHATTR_GROUP_BARS_PER_AXIS,SCHATTR_GROUP_BARS_PER_AXIS \ const USHORT nSeriesOptionsWhichPairs[] = --- Orig/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx 2007-08-16 16:09:52.000000000 +0800 +++ new/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx 2007-08-30 16:10:14.000000000 +0800 @@ -90,6 +90,9 @@ , m_nBarOverlap(0) , m_nGapWidth(100) , m_bConnectBars(false) + , m_bSupportingNotToGroupBarsPerAxis(false) + , m_bGroupBarsPerAxis(true) + , m_bAllSeriesAttachedToSameAxis(true) { try { @@ -104,6 +107,8 @@ sal_Int32 nDimensionCount = DiagramHelper::getDimension( xDiagram ); m_bSupportingOverlapAndGapWidthProperties = ChartTypeHelper::isSupportingOverlapAndGapWidthProperties( xChartType, nDimensionCount ); + m_bAllSeriesAttachedToSameAxis = AllSeriesHelper::isAllSeriesAttachedToSameAxis( xChartType ); + if( m_bSupportingOverlapAndGapWidthProperties ) { @@ -131,6 +136,14 @@ { xDiagramProperties->getPropertyValue( C2U("ConnectBars")) >>= m_bConnectBars; } + + m_bSupportingNotToGroupBarsPerAxis = ChartTypeHelper::isSupportingNotToGroupBarsPerAxis( xChartType, nDimensionCount ); + if( m_bSupportingNotToGroupBarsPerAxis && xDiagramProperties.is() ) + { + if( m_bAllSeriesAttachedToSameAxis ) + xDiagramProperties->setPropertyValue( C2U("GroupBarsPerAxis"), uno::makeAny( m_bAllSeriesAttachedToSameAxis ) ); + xDiagramProperties->getPropertyValue( C2U("GroupBarsPerAxis")) >>= m_bGroupBarsPerAxis; + } } catch( uno::Exception ex ) { @@ -228,6 +241,24 @@ } } break; + + case SCHATTR_GROUP_BARS_PER_AXIS: + { + sal_Bool bOldGroupBarsPerAxis = sal_True; + m_bGroupBarsPerAxis = reinterpret_cast< const SfxBoolItem & >( + rItemSet.Get( nWhichId )).GetValue(); + if( m_bSupportingNotToGroupBarsPerAxis ) + { + uno::Reference< beans::XPropertySet > xDiagramProperties( ChartModelHelper::findDiagram(m_xChartModel), uno::UNO_QUERY ); + if( xDiagramProperties.is() && + (xDiagramProperties->getPropertyValue( C2U("GroupBarsPerAxis")) >>= bOldGroupBarsPerAxis) && + bOldGroupBarsPerAxis != m_bGroupBarsPerAxis ) + { + xDiagramProperties->setPropertyValue( C2U("GroupBarsPerAxis"), uno::makeAny(m_bGroupBarsPerAxis) ); + } + } + } + break; } return bChanged; } @@ -262,6 +293,12 @@ rOutItemSet.Put( SfxBoolItem(nWhichId,m_bConnectBars)); break; } + case SCHATTR_GROUP_BARS_PER_AXIS: + { + if( m_bSupportingNotToGroupBarsPerAxis ) + rOutItemSet.Put( SfxBoolItem(nWhichId,m_bGroupBarsPerAxis) ); + break; + } } } --- Orig/chart2/source/inc/ChartTypeHelper.hxx 2007-08-16 16:09:52.000000000 +0800 +++ new/chart2/source/inc/ChartTypeHelper.hxx 2007-08-29 10:02:24.000000000 +0800 @@ -65,6 +65,7 @@ static sal_Bool isSupportingSymbolProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType, sal_Int32 nDimensionCount ); static sal_Bool isSupportingOverlapAndGapWidthProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType, sal_Int32 nDimensionCount ); static sal_Bool isSupportingBarConnectors( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType, sal_Int32 nDimensionCount ); + static sal_Bool isSupportingNotToGroupBarsPerAxis( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType, sal_Int32 nDimensionCount ); static sal_Int32 //one of ::com::sun::star::chart2::AxisType getAxisType( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType --- Orig/chart2/source/inc/DataSeriesHelper.hxx 2007-08-16 16:09:52.000000000 +0800 +++ new/chart2/source/inc/DataSeriesHelper.hxx 2007-08-30 16:31:48.000000000 +0800 @@ -202,6 +202,23 @@ const ::com::sun::star::uno::Any& rPropertyValue ); } // namespace DataSeriesHelper + +class AllSeriesHelper +{ +public: + static bool isAllSeriesAttachedToSameAxis( const ::com::sun::star::uno::Reference< + ::com::sun::star::chart2::XChartType > & xChartType ); + + static bool isAllSeriesAttachedToMainAxis(); + + static bool isAllSeriesNotAttachedToMainAxis(); + +private: + static bool m_bAllSeriesAttachedToMainAxis; + + static bool m_bAllSeriesNotAttachedToMainAxis; +}; + } // namespace chart // CHART2_DATASERIESHELPER_HXX --- Orig/chart2/source/inc/chartview/ChartSfxItemIds.hxx 2007-08-16 16:09:52.000000000 +0800 +++ new/chart2/source/inc/chartview/ChartSfxItemIds.hxx 2007-08-29 10:02:24.000000000 +0800 @@ -213,8 +213,9 @@ #define SCHATTR_SPLINE_RESOLUTION (SCHATTR_CHARTTYPE_START + 5) //103 #define SCHATTR_DIAGRAM_STYLE (SCHATTR_CHARTTYPE_START + 6) //104 #define SCHATTR_TEXTBREAK (SCHATTR_CHARTTYPE_START + 7) //105 +#define SCHATTR_GROUP_BARS_PER_AXIS (SCHATTR_CHARTTYPE_START + 8) //106 -#define SCHATTR_END SCHATTR_TEXTBREAK +#define SCHATTR_END SCHATTR_GROUP_BARS_PER_AXIS // ============================================================ // values for Items --- Orig/chart2/source/model/main/Diagram.cxx 2007-08-16 16:09:52.000000000 +0800 +++ new/chart2/source/model/main/Diagram.cxx 2007-08-29 10:02:24.000000000 +0800 @@ -88,7 +88,8 @@ PROP_DIAGRAM_REL_POS, PROP_DIAGRAM_REL_SIZE, PROP_DIAGRAM_SORT_BY_X_VALUES, - PROP_DIAGRAM_CONNECT_BARS + PROP_DIAGRAM_CONNECT_BARS, + PROP_DIAGRAM_GROUP_BARS_PER_AXIS }; void lcl_AddPropertiesToVector( @@ -121,6 +122,12 @@ ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); + rOutProperties.push_back( + Property( C2U("GroupBarsPerAxis"), + PROP_DIAGRAM_GROUP_BARS_PER_AXIS, + ::getBooleanCppuType(), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT )); } void lcl_AddDefaultsToMap( @@ -133,6 +140,10 @@ OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_DIAGRAM_CONNECT_BARS )); rOutMap[ PROP_DIAGRAM_CONNECT_BARS ] = uno::makeAny( false ); + + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_DIAGRAM_GROUP_BARS_PER_AXIS )); + rOutMap[ PROP_DIAGRAM_GROUP_BARS_PER_AXIS ] = + uno::makeAny( true ); } const Sequence< Property > & lcl_GetPropertySequence() --- Orig/chart2/source/tools/ChartTypeHelper.cxx 2007-08-16 16:09:52.000000000 +0800 +++ new/chart2/source/tools/ChartTypeHelper.cxx 2007-08-29 10:02:24.000000000 +0800 @@ -230,6 +230,27 @@ return sal_False; } +sal_Bool ChartTypeHelper::isSupportingNotToGroupBarsPerAxis( + const uno::Reference< chart2::XChartType >& xChartType, sal_Int32 nDimensionCount ) +{ + if( xChartType.is() ) + { + if( nDimensionCount==3 ) + return sal_False; + + StackMode eStackMode = DiagramHelper::getStackModeFromChartType( xChartType, 0 ); + if( eStackMode != StackMode_NONE ) + return sal_False; + + rtl::OUString aChartTypeName = xChartType->getChartType(); + if( aChartTypeName.match(CHART2_SERVICE_NAME_CHARTTYPE_COLUMN) ) + return sal_True; + if( aChartTypeName.match(CHART2_SERVICE_NAME_CHARTTYPE_BAR) ) + return sal_True; + } + return sal_False; +} + sal_Int32 ChartTypeHelper::getAxisType( const uno::Reference< XChartType >& xChartType, sal_Int32 nDimensionIndex ) --- Orig/chart2/source/tools/DataSeriesHelper.cxx 2007-08-16 16:09:52.000000000 +0800 +++ new/chart2/source/tools/DataSeriesHelper.cxx 2007-08-30 16:33:22.000000000 +0800 @@ -680,6 +680,49 @@ } } - } // namespace DataSeriesHelper + +bool AllSeriesHelper::m_bAllSeriesAttachedToMainAxis = true; +bool AllSeriesHelper::m_bAllSeriesNotAttachedToMainAxis = false; + +bool AllSeriesHelper::isAllSeriesAttachedToSameAxis( const Reference< chart2::XChartType > & xChartType ) +{ + bool bAttachedToSameAxis = true; + sal_Int32 nAttachedToMainAxis = 0; + + Reference< chart2::XDataSeriesContainer > xDataSeriesContainer( xChartType, uno::UNO_QUERY ); + Sequence< Reference< chart2::XDataSeries > > aSeriesList( xDataSeriesContainer->getDataSeries() ); + for( sal_Int32 nS = 0; nS < aSeriesList.getLength(); ++nS ) + { + Reference< chart2::XDataSeries > xSimpleSeries( aSeriesList[nS], uno::UNO_QUERY ); + sal_Int32 nAxisIndex = DataSeriesHelper::getAttachedAxisIndex( xSimpleSeries ); + if( nAxisIndex == 0 ) + nAttachedToMainAxis++; + } + if( 0 < nAttachedToMainAxis && nAttachedToMainAxis < aSeriesList.getLength() ) + bAttachedToSameAxis = false; + + if( nAttachedToMainAxis == aSeriesList.getLength() ) + m_bAllSeriesAttachedToMainAxis = true; + else + m_bAllSeriesAttachedToMainAxis = false; + + if( nAttachedToMainAxis == 0 ) + m_bAllSeriesNotAttachedToMainAxis = true; + else + m_bAllSeriesNotAttachedToMainAxis = false; + + return bAttachedToSameAxis; +} + +bool AllSeriesHelper::isAllSeriesAttachedToMainAxis() +{ + return m_bAllSeriesAttachedToMainAxis; +} + +bool AllSeriesHelper::isAllSeriesNotAttachedToMainAxis() +{ + return m_bAllSeriesNotAttachedToMainAxis; +} + } // namespace chart --- Orig/chart2/source/view/charttypes/BarChart.cxx 2007-08-16 16:09:52.000000000 +0800 +++ new/chart2/source/view/charttypes/BarChart.cxx 2007-08-29 10:02:24.000000000 +0800 @@ -308,6 +308,9 @@ sal_Int32 nAxisIndex = pSeries->getAttachedAxisIndex(); zSlot = nAxisIndex; + + if( !pSeries->getGroupBarsPerAxis() ) + zSlot = 0; ////if( bars side by side ) zSlot = 0; //@todo uncomment this later on dependent on new flag if(zSlot>=static_cast(m_aZSlots.size())) m_aZSlots.resize(zSlot+1); --- Orig/chart2/source/view/inc/VDataSeries.hxx 2007-08-16 16:09:52.000000000 +0800 +++ new/chart2/source/view/inc/VDataSeries.hxx 2007-08-29 10:02:24.000000000 +0800 @@ -152,6 +152,9 @@ void setConnectBars( sal_Bool bConnectBars ); sal_Bool getConnectBars() const; + + void setGroupBarsPerAxis( sal_Bool bGroupBarsPerAxis ); + sal_Bool getGroupBarsPerAxis() const; //this is only temporarily here for area chart: ::com::sun::star::drawing::PolyPolygonShape3D m_aPolyPolygonShape3D; @@ -224,6 +227,8 @@ sal_Bool m_bConnectBars; + sal_Bool m_bGroupBarsPerAxis; + rtl::OUString m_aSeriesParticle; rtl::OUString m_aCID; rtl::OUString m_aPointCID_Stub; --- Orig/chart2/source/view/main/ChartItemPool.cxx 2007-08-16 16:09:52.000000000 +0800 +++ new/chart2/source/view/main/ChartItemPool.cxx 2007-08-29 10:02:24.000000000 +0800 @@ -213,6 +213,7 @@ ppPoolDefaults[SCHATTR_BAR_OVERLAP - SCHATTR_START] = new SfxInt32Item(SCHATTR_BAR_OVERLAP,0); ppPoolDefaults[SCHATTR_BAR_GAPWIDTH - SCHATTR_START] = new SfxInt32Item(SCHATTR_BAR_GAPWIDTH,0); ppPoolDefaults[SCHATTR_BAR_CONNECT - SCHATTR_START] = new SfxBoolItem(SCHATTR_BAR_CONNECT,0); + ppPoolDefaults[SCHATTR_GROUP_BARS_PER_AXIS - SCHATTR_START] = new SfxBoolItem(SCHATTR_GROUP_BARS_PER_AXIS,0); ppPoolDefaults[SCHATTR_NUM_OF_LINES_FOR_BAR - SCHATTR_START] = new SfxInt32Item( SCHATTR_NUM_OF_LINES_FOR_BAR, 0 ); ppPoolDefaults[SCHATTR_SPLINE_ORDER - SCHATTR_START] = new SfxInt32Item( SCHATTR_SPLINE_ORDER, 3 ); ppPoolDefaults[SCHATTR_SPLINE_RESOLUTION - SCHATTR_START] = new SfxInt32Item( SCHATTR_SPLINE_RESOLUTION, 20 ); @@ -474,6 +475,8 @@ delete ppPoolDefaults[SCHATTR_BAR_GAPWIDTH - SCHATTR_START]; SetRefCount(*ppPoolDefaults[SCHATTR_BAR_CONNECT - SCHATTR_START], 0); delete ppPoolDefaults[SCHATTR_BAR_CONNECT - SCHATTR_START]; + SetRefCount(*ppPoolDefaults[SCHATTR_GROUP_BARS_PER_AXIS - SCHATTR_START], 0); + delete ppPoolDefaults[SCHATTR_GROUP_BARS_PER_AXIS - SCHATTR_START]; SetRefCount(*ppPoolDefaults[SCHATTR_NUM_OF_LINES_FOR_BAR - SCHATTR_START], 0); delete ppPoolDefaults[SCHATTR_NUM_OF_LINES_FOR_BAR - SCHATTR_START]; --- Orig/chart2/source/view/main/ChartView.cxx 2007-08-16 16:09:52.000000000 +0800 +++ new/chart2/source/view/main/ChartView.cxx 2007-08-29 10:02:24.000000000 +0800 @@ -649,11 +649,13 @@ sal_Bool bSortByXValues = sal_False; sal_Bool bConnectBars = sal_False; + sal_Bool bGroupBarsPerAxis = sal_True; try { uno::Reference< beans::XPropertySet > xDiaProp( xDiagram, uno::UNO_QUERY_THROW ); xDiaProp->getPropertyValue( C2U( "SortByXValues" ) ) >>= bSortByXValues; xDiaProp->getPropertyValue( C2U( "ConnectBars" ) ) >>= bConnectBars; + xDiaProp->getPropertyValue( C2U( "GroupBarsPerAxis" ) ) >>= bGroupBarsPerAxis; } catch( const uno::Exception & ex ) { @@ -720,6 +722,8 @@ pSeries->setConnectBars( bConnectBars ); + pSeries->setGroupBarsPerAxis( bGroupBarsPerAxis ); + rtl::OUString aSeriesParticle( ObjectIdentifier::createParticleForSeries( nDiagramIndex, nCS, nT, nS ) ); pSeries->setParticle(aSeriesParticle); --- Orig/chart2/source/view/main/VDataSeries.cxx 2007-08-16 16:09:52.000000000 +0800 +++ new/chart2/source/view/main/VDataSeries.cxx 2007-08-29 10:02:24.000000000 +0800 @@ -177,6 +177,7 @@ , m_eStackingDirection(StackingDirection_NO_STACKING) , m_nAxisIndex(0) , m_bConnectBars(sal_False) + , m_bGroupBarsPerAxis(sal_True) , m_aSeriesParticle() , m_aCID() @@ -400,6 +401,14 @@ { return m_bConnectBars; } +void VDataSeries::setGroupBarsPerAxis( sal_Bool bGroupBarsPerAxis ) +{ + m_bGroupBarsPerAxis = bGroupBarsPerAxis; +} +sal_Bool VDataSeries::getGroupBarsPerAxis() const +{ + return m_bGroupBarsPerAxis; +} void VDataSeries::setAttachedAxisIndex( sal_Int32 nAttachedAxisIndex ) { --- Orig/offapi/com/sun/star/chart/BarDiagram.idl 2007-08-16 16:09:54.000000000 +0800 +++ new/offapi/com/sun/star/chart/BarDiagram.idl 2007-08-29 10:02:26.000000000 +0800 @@ -110,7 +110,16 @@ [optional, property] boolean StackedBarsConnected; //------------------------------------------------------------------------- + + //------------------------------------------------------------------------- + /** determines the bars display mode. If , group bars per axis. + If , display bars side by side. + */ + [optional, property] boolean GroupBarsPerAxis; + + //------------------------------------------------------------------------- + /** Determines how many data rows are displayed as lines rather than bars. --- Orig/offapi/com/sun/star/chart2/Diagram.idl 2007-08-16 16:09:54.000000000 +0800 +++ new/offapi/com/sun/star/chart2/Diagram.idl 2007-08-29 10:02:26.000000000 +0800 @@ -87,6 +87,8 @@ /** Draw connection lines for stacked bar charts. */ [optional, property] boolean ConnectBars; + + [optional, property] boolean GroupBarsPerAxis; }; } ; // chart2 --- Orig/xmloff/inc/xmlkywd.hxx 2007-08-16 16:09:54.000000000 +0800 +++ new/xmloff/inc/xmlkywd.hxx 2007-08-29 10:02:26.000000000 +0800 @@ -1998,4 +1998,6 @@ XML_CONSTASCII_ACTION( sXML_source_code, "source-code" ); XML_CONSTASCII_ACTION( sXML_readonly, "readonly" ); +XML_CONSTASCII_ACTION( sXML_group_bars_per_axis, "group-bars-per-axis" ); + #endif --- Orig/xmloff/inc/xmloff/xmltoken.hxx 2007-08-16 16:09:54.000000000 +0800 +++ new/xmloff/inc/xmloff/xmltoken.hxx 2007-08-29 10:02:26.000000000 +0800 @@ -2874,6 +2874,8 @@ XML_SORT_BY_X_VALUES, + XML_GROUP_BARS_PER_AXIS, + XML_TOKEN_END }; --- Orig/xmloff/source/chart/PropertyMap.hxx 2007-08-16 16:09:54.000000000 +0800 +++ new/xmloff/source/chart/PropertyMap.hxx 2007-08-29 10:02:26.000000000 +0800 @@ -211,6 +211,8 @@ // Oasis proposal, see http://lists.oasis-open.org/archives/office/200312/msg00000.html MAP_SPECIAL_IMP( "StepHelp", CHART, XML_INTERVAL_MINOR_DIVISOR, XML_TYPE_NUMBER, STEP_HELP ), + MAP_ENTRY( "GroupBarsPerAxis", CHART, XML_GROUP_BARS_PER_AXIS, XML_TYPE_BOOL ), + MAP_ENTRY_END }; --- Orig/xmloff/source/core/xmltoken.cxx 2007-08-16 16:09:54.000000000 +0800 +++ new/xmloff/source/core/xmltoken.cxx 2007-08-29 10:02:26.000000000 +0800 @@ -2872,6 +2872,8 @@ // <-- TOKEN( "sort-by-x-values", XML_SORT_BY_X_VALUES ), + TOKEN( "group-bars-per-axis", XML_GROUP_BARS_PER_AXIS ), + #if OSL_DEBUG_LEVEL > 0 { 0, NULL, NULL, XML_TOKEN_END } #else