summaryrefslogtreecommitdiff
path: root/chart2/source/view/main/ChartView.cxx
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2011-03-18 15:33:40 +0100
committerJan Holesovsky <kendy@suse.cz>2011-03-18 15:33:40 +0100
commite6064484fae8aa2797f86c68e9a8d23d2e213367 (patch)
treedb2f4d140efca43ab01dee4fc053fff0829d106b /chart2/source/view/main/ChartView.cxx
parent9e0a09e89c38774dd1af902387a8b25de158b634 (diff)
parent378c75a798c8baa34cb26e7f07fe28cb5ee2a85f (diff)
Merge remote-tracking branch 'origin/integration/dev300_m101'
Conflicts: chart2/source/controller/main/UndoManager.cxx chart2/source/tools/RegressionCurveHelper.cxx sc/inc/address.hxx sc/inc/attrib.hxx sc/inc/bigrange.hxx sc/inc/callform.hxx sc/inc/cell.hxx sc/inc/chartarr.hxx sc/inc/chartlis.hxx sc/inc/chgtrack.hxx sc/inc/collect.hxx sc/inc/compiler.hxx sc/inc/detdata.hxx sc/inc/document.hxx sc/inc/fillinfo.hxx sc/inc/olinetab.hxx sc/inc/prnsave.hxx sc/inc/queryparam.hxx sc/inc/sc.hrc sc/inc/scabstdlg.hxx sc/inc/table.hxx sc/inc/validat.hxx sc/inc/zforauto.hxx sc/source/core/data/documen2.cxx sc/source/core/data/document.cxx sc/source/core/data/table1.cxx sc/source/core/tool/address.cxx sc/source/core/tool/token.cxx sc/source/filter/excel/frmbase.cxx sc/source/filter/excel/impop.cxx sc/source/filter/excel/xename.cxx sc/source/filter/inc/formel.hxx sc/source/filter/inc/xename.hxx sc/source/filter/xml/xmlexprt.cxx sc/source/filter/xml/xmlnexpi.cxx sc/source/filter/xml/xmlnexpi.hxx sc/source/ui/dbgui/filtdlg.cxx sc/source/ui/inc/docfunc.hxx sc/source/ui/inc/namedlg.hxx sc/source/ui/namedlg/namedlg.cxx sc/source/ui/src/namedlg.src
Diffstat (limited to 'chart2/source/view/main/ChartView.cxx')
-rw-r--r--chart2/source/view/main/ChartView.cxx245
1 files changed, 70 insertions, 175 deletions
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index 3940e35bf902..e54a7ab59f66 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -32,6 +32,7 @@
#include "ChartView.hxx"
#include "chartview/DrawModelWrapper.hxx"
+#include "NumberFormatterWrapper.hxx"
#include "ViewDefines.hxx"
#include "VDiagram.hxx"
#include "VTitle.hxx"
@@ -57,6 +58,7 @@
#include "ControllerLockGuard.hxx"
#include "BaseGFXHelper.hxx"
#include "DataSeriesHelper.hxx"
+#include "DateHelper.hxx"
#include <comphelper/scopeguard.hxx>
#include <boost/bind.hpp>
@@ -79,7 +81,6 @@
#include <com/sun/star/chart/ChartAxisPosition.hpp>
#include <com/sun/star/chart/DataLabelPlacement.hpp>
#include <com/sun/star/chart/MissingValueTreatment.hpp>
-#include <com/sun/star/chart2/ExplicitSubIncrement.hpp>
#include <com/sun/star/chart2/StackingDirection.hpp>
#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
@@ -201,7 +202,7 @@ void SAL_CALL ChartView::initialize( const uno::Sequence< uno::Any >& aArguments
m_pDrawModelWrapper = ::boost::shared_ptr< DrawModelWrapper >( new DrawModelWrapper( m_xCC ) );
m_xShapeFactory = m_pDrawModelWrapper->getShapeFactory();
m_xDrawPage = m_pDrawModelWrapper->getMainDrawPage();
- StartListening( m_pDrawModelWrapper->getSdrModel(), FALSE /*bPreventDups*/ );
+ StartListening( m_pDrawModelWrapper->getSdrModel(), false /*bPreventDups*/ );
}
}
@@ -209,7 +210,7 @@ ChartView::~ChartView()
{
if( m_pDrawModelWrapper.get() )
{
- EndListening( m_pDrawModelWrapper->getSdrModel(), FALSE /*bAllDups*/ );
+ EndListening( m_pDrawModelWrapper->getSdrModel(), false /*bAllDups*/ );
SolarMutexGuard aSolarGuard;
m_pDrawModelWrapper.reset();
}
@@ -470,7 +471,7 @@ private:
};
AxisUsage::AxisUsage()
- : aScaleAutomatism(AxisHelper::createDefaultScale())
+ : aScaleAutomatism(AxisHelper::createDefaultScale(),Date())
{
}
@@ -548,7 +549,7 @@ public:
~SeriesPlotterContainer();
void initializeCooSysAndSeriesPlotter( const uno::Reference< frame::XModel >& xChartModel );
- void initAxisUsageList();
+ void initAxisUsageList(const Date& rNullDate);
void doAutoScaling( const uno::Reference< frame::XModel >& xChartModel );
void updateScalesAndIncrementsOnAxes();
void setScalesFromCooSysToPlotter();
@@ -566,13 +567,15 @@ private:
std::vector< VCoordinateSystem* >& m_rVCooSysList;
::std::map< uno::Reference< XAxis >, AxisUsage > m_aAxisUsageList;
sal_Int32 m_nMaxAxisIndex;
- bool m_bChartTypeUsesShiftedXAxisTicksPerDefault;
+ bool m_bChartTypeUsesShiftedCategoryPositionPerDefault;
+ sal_Int32 m_nDefaultDateNumberFormat;
};
SeriesPlotterContainer::SeriesPlotterContainer( std::vector< VCoordinateSystem* >& rVCooSysList )
: m_rVCooSysList( rVCooSysList )
, m_nMaxAxisIndex(0)
- , m_bChartTypeUsesShiftedXAxisTicksPerDefault(false)
+ , m_bChartTypeUsesShiftedCategoryPositionPerDefault(false)
+ , m_nDefaultDateNumberFormat(0)
{
}
@@ -610,6 +613,10 @@ void SeriesPlotterContainer::initializeCooSysAndSeriesPlotter(
return;
uno::Reference< util::XNumberFormatsSupplier > xNumberFormatsSupplier( xChartModel, uno::UNO_QUERY );
+ uno::Reference< chart2::XChartDocument > xChartDoc( xChartModel, uno::UNO_QUERY );
+ if( xChartDoc.is() && xChartDoc->hasInternalDataProvider()
+ && DiagramHelper::isSupportingDateAxis( xDiagram ) )
+ m_nDefaultDateNumberFormat=DiagramHelper::getDateNumberFormat( xNumberFormatsSupplier );
sal_Int32 nDimensionCount = DiagramHelper::getDimension( xDiagram );
if(!nDimensionCount)
@@ -667,7 +674,7 @@ void SeriesPlotterContainer::initializeCooSysAndSeriesPlotter(
uno::Reference< XChartType > xChartType( aChartTypeList[nT] );
if(nT==0)
- m_bChartTypeUsesShiftedXAxisTicksPerDefault = ChartTypeHelper::shiftTicksAtXAxisPerDefault( xChartType );
+ m_bChartTypeUsesShiftedCategoryPositionPerDefault = ChartTypeHelper::shiftCategoryPosAtXAxisPerDefault( xChartType );
bool bExcludingPositioning = DiagramPositioningMode_EXCLUDING == DiagramHelper::getDiagramPositioningMode( xDiagram );
VSeriesPlotter* pPlotter = VSeriesPlotter::createSeriesPlotter( xChartType, nDimensionCount, bExcludingPositioning );
@@ -779,7 +786,7 @@ void SeriesPlotterContainer::initializeCooSysAndSeriesPlotter(
}
}
-void SeriesPlotterContainer::initAxisUsageList()
+void SeriesPlotterContainer::initAxisUsageList(const Date& rNullDate)
{
m_aAxisUsageList.clear();
size_t nC;
@@ -789,8 +796,10 @@ void SeriesPlotterContainer::initAxisUsageList()
for(sal_Int32 nDimensionIndex=0; nDimensionIndex<3; nDimensionIndex++)
{
uno::Reference< XCoordinateSystem > xCooSys = pVCooSys->getModel();
- if( nDimensionIndex >= xCooSys->getDimension() )
+ sal_Int32 nDimensionCount = xCooSys->getDimension();
+ if( nDimensionIndex >= nDimensionCount )
continue;
+ bool bChartTypeAllowsDateAxis = ChartTypeHelper::isSupportingDateAxis( AxisHelper::getChartTypeByIndex( xCooSys, 0 ), nDimensionCount, nDimensionIndex );
const sal_Int32 nMaximumAxisIndex = xCooSys->getMaximumAxisIndexByDimension(nDimensionIndex);
for(sal_Int32 nAxisIndex=0; nAxisIndex<=nMaximumAxisIndex; ++nAxisIndex)
{
@@ -799,7 +808,20 @@ void SeriesPlotterContainer::initAxisUsageList()
if( xAxis.is())
{
if(m_aAxisUsageList.find(xAxis)==m_aAxisUsageList.end())
- m_aAxisUsageList[xAxis].aScaleAutomatism = ScaleAutomatism(xAxis->getScaleData());
+ {
+ chart2::ScaleData aSourceScale = xAxis->getScaleData();
+ ExplicitCategoriesProvider* pExplicitCategoriesProvider = pVCooSys->getExplicitCategoriesProvider();
+ if( nDimensionIndex==0 )
+ AxisHelper::checkDateAxis( aSourceScale, pExplicitCategoriesProvider, bChartTypeAllowsDateAxis );
+ if( (aSourceScale.AxisType == AxisType::CATEGORY && m_bChartTypeUsesShiftedCategoryPositionPerDefault)
+ || (aSourceScale.AxisType==AxisType::CATEGORY && pExplicitCategoriesProvider && pExplicitCategoriesProvider->hasComplexCategories() )
+ || aSourceScale.AxisType == AxisType::DATE
+ || aSourceScale.AxisType == AxisType::SERIES )
+ aSourceScale.ShiftedCategoryPosition = true;
+ else
+ aSourceScale.ShiftedCategoryPosition = false;
+ m_aAxisUsageList[xAxis].aScaleAutomatism = ScaleAutomatism(aSourceScale,rNullDate);
+ }
AxisUsage& rAxisUsage = m_aAxisUsageList[xAxis];
rAxisUsage.addCoordinateSystem(pVCooSys,nDimensionIndex,nAxisIndex);
}
@@ -872,6 +894,11 @@ void SeriesPlotterContainer::setNumberFormatsFromAxes()
{
aAxesNumberFormats.setFormat( nNumberFormatKey, nDimensionIndex, nAxisIndex );
}
+ else if( nDimensionIndex==0 )
+ {
+ //provide a default date format for date axis with own data
+ aAxesNumberFormats.setFormat( m_nDefaultDateNumberFormat, nDimensionIndex, nAxisIndex );
+ }
}
}
catch( lang::IndexOutOfBoundsException& e )
@@ -922,13 +949,7 @@ void SeriesPlotterContainer::doAutoScaling( const uno::Reference< frame::XModel
rAxisUsage.aScaleAutomatism.calculateExplicitScaleAndIncrement( aExplicitScale, aExplicitIncrement );
for( nC=0; nC < aVCooSysList_X.size(); nC++)
- {
- ExplicitCategoriesProvider* pExplicitCategoriesProvider = aVCooSysList_X[nC]->getExplicitCategoriesProvider();
-
- if( m_bChartTypeUsesShiftedXAxisTicksPerDefault || (aExplicitScale.AxisType==AxisType::CATEGORY && pExplicitCategoriesProvider && pExplicitCategoriesProvider->hasComplexCategories() ) )
- aExplicitIncrement.ShiftedPosition = true;
aVCooSysList_X[nC]->setExplicitScaleAndIncrement( 0, nAxisIndex, aExplicitScale, aExplicitIncrement );
- }
for( nC=0; nC < aVCooSysList_Z.size(); nC++)
aVCooSysList_Z[nC]->setExplicitScaleAndIncrement( 2, nAxisIndex, aExplicitScale, aExplicitIncrement );
}
@@ -1013,7 +1034,6 @@ void SeriesPlotterContainer::AdaptScaleOfYAxisWithoutAttachedSeries( const uno::
aExplicitScaleDest.Orientation = aExplicitScaleSource.Orientation;
aExplicitScaleDest.Scaling = aExplicitScaleSource.Scaling;
- aExplicitScaleDest.Breaks = aExplicitScaleSource.Breaks;
aExplicitScaleDest.AxisType = aExplicitScaleSource.AxisType;
aExplicitIncrementDest.BaseValue = aExplicitIncrementSource.BaseValue;
@@ -1051,7 +1071,7 @@ void SeriesPlotterContainer::AdaptScaleOfYAxisWithoutAttachedSeries( const uno::
bAutoMinorInterval = !( aScale.IncrementData.SubIncrements[0].IntervalCount.hasValue() );
if( bAutoMinorInterval )
{
- if( aExplicitIncrementDest.SubIncrements.getLength() && aExplicitIncrementSource.SubIncrements.getLength() )
+ if( !aExplicitIncrementDest.SubIncrements.empty() && !aExplicitIncrementSource.SubIncrements.empty() )
aExplicitIncrementDest.SubIncrements[0].IntervalCount =
aExplicitIncrementSource.SubIncrements[0].IntervalCount;
}
@@ -1366,7 +1386,8 @@ awt::Rectangle ChartView::impl_createDiagramAndContent( SeriesPlotterContainer&
// - prepare list of all axis and how they are used
- rSeriesPlotterContainer.initAxisUsageList();
+ Date aNullDate = NumberFormatterWrapper( uno::Reference< util::XNumberFormatsSupplier >( m_xChartModel, uno::UNO_QUERY ) ).getNullDate();
+ rSeriesPlotterContainer.initAxisUsageList(aNullDate);
rSeriesPlotterContainer.doAutoScaling( m_xChartModel );
rSeriesPlotterContainer.setScalesFromCooSysToPlotter();
rSeriesPlotterContainer.setNumberFormatsFromAxes();
@@ -1629,6 +1650,31 @@ sal_Bool ChartView::getExplicitValuesForAxis(
{
rExplicitScale = pVCooSys->getExplicitScale(nDimensionIndex,nAxisIndex);
rExplicitIncrement = pVCooSys->getExplicitIncrement(nDimensionIndex,nAxisIndex);
+ if( rExplicitScale.ShiftedCategoryPosition )
+ {
+ //remove 'one' from max
+ if( rExplicitScale.AxisType == ::com::sun::star::chart2::AxisType::DATE )
+ {
+ Date aMaxDate(rExplicitScale.NullDate); aMaxDate += static_cast<long>(::rtl::math::approxFloor(rExplicitScale.Maximum));
+ //for explicit scales with shifted categories we need one interval more
+ switch( rExplicitScale.TimeResolution )
+ {
+ case ::com::sun::star::chart::TimeUnit::DAY:
+ aMaxDate--;break;
+ case ::com::sun::star::chart::TimeUnit::MONTH:
+ aMaxDate = DateHelper::GetDateSomeMonthsAway(aMaxDate,-1);
+ break;
+ case ::com::sun::star::chart::TimeUnit::YEAR:
+ aMaxDate = DateHelper::GetDateSomeYearsAway(aMaxDate,-1);
+ break;
+ }
+ rExplicitScale.Maximum = aMaxDate - rExplicitScale.NullDate;
+ }
+ else if( rExplicitScale.AxisType == ::com::sun::star::chart2::AxisType::CATEGORY )
+ rExplicitScale.Maximum -= 1.0;
+ else if( rExplicitScale.AxisType == ::com::sun::star::chart2::AxisType::SERIES )
+ rExplicitScale.Maximum -= 1.0;
+ }
return sal_True;
}
return sal_False;
@@ -1757,166 +1803,15 @@ bool lcl_getPropertySwapXAndYAxis( const uno::Reference< XDiagram >& xDiagram )
}
-sal_Int32 lcl_getExplicitNumberFormatKeyForAxis(
- const Reference< chart2::XAxis >& xAxis
- , const Reference< chart2::XCoordinateSystem > & xCorrespondingCoordinateSystem
- , const Reference< util::XNumberFormatsSupplier >& xNumberFormatsSupplier
- , bool bSearchForParallelAxisIfNothingIsFound )
-{
- sal_Int32 nNumberFormatKey(0);
- Reference< beans::XPropertySet > xProp( xAxis, uno::UNO_QUERY );
- if( xProp.is() && !( xProp->getPropertyValue( C2U( "NumberFormat" ) ) >>= nNumberFormatKey ) )
- {
- bool bPercentFormatSet = false;
- //check wether we have a percent scale -> use percent format
- if( xNumberFormatsSupplier.is() )
- {
- ScaleData aData = xAxis->getScaleData();
- if( aData.AxisType==AxisType::PERCENT )
- {
- sal_Int32 nPercentFormat = ExplicitValueProvider::getPercentNumberFormat( xNumberFormatsSupplier );
- if( nPercentFormat != -1 )
- {
- nNumberFormatKey = nPercentFormat;
- bPercentFormatSet = true;
- }
- }
- }
-
- if( !bPercentFormatSet )
- {
- typedef ::std::map< sal_Int32, sal_Int32 > tNumberformatFrequency;
- tNumberformatFrequency aKeyMap;
-
- bool bNumberFormatKeyFoundViaAttachedData = false;
- sal_Int32 nAxisIndex = 0;
- sal_Int32 nDimensionIndex = 1;
-
- try
- {
- Reference< XChartTypeContainer > xCTCnt( xCorrespondingCoordinateSystem, uno::UNO_QUERY_THROW );
- if( xCTCnt.is() )
- {
- AxisHelper::getIndicesForAxis( xAxis, xCorrespondingCoordinateSystem, nDimensionIndex, nAxisIndex );
- ::rtl::OUString aRoleToMatch;
- if( nDimensionIndex == 0 )
- aRoleToMatch = C2U("values-x");
- Sequence< Reference< XChartType > > aChartTypes( xCTCnt->getChartTypes());
- for( sal_Int32 nCTIdx=0; nCTIdx<aChartTypes.getLength(); ++nCTIdx )
- {
- if( nDimensionIndex != 0 )
- aRoleToMatch = ChartTypeHelper::getRoleOfSequenceForYAxisNumberFormatDetection( aChartTypes[nCTIdx] );
- Reference< XDataSeriesContainer > xDSCnt( aChartTypes[nCTIdx], uno::UNO_QUERY_THROW );
- Sequence< Reference< XDataSeries > > aDataSeriesSeq( xDSCnt->getDataSeries());
- for( sal_Int32 nSeriesIdx=0; nSeriesIdx<aDataSeriesSeq.getLength(); ++nSeriesIdx )
- {
- Reference< chart2::XDataSeries > xDataSeries(aDataSeriesSeq[nSeriesIdx]);
- Reference< data::XDataSource > xSource( xDataSeries, uno::UNO_QUERY_THROW );
-
- if( nDimensionIndex == 1 )
- {
- //only take those series into account that are attached to this axis
- sal_Int32 nAttachedAxisIndex = DataSeriesHelper::getAttachedAxisIndex(xDataSeries);
- if( nAttachedAxisIndex != nAxisIndex )
- continue;
- }
-
- Sequence< Reference< data::XLabeledDataSequence > > aLabeledSeq( xSource->getDataSequences());
- for( sal_Int32 nLSeqIdx=0; nLSeqIdx<aLabeledSeq.getLength(); ++nLSeqIdx )
- {
- if(!aLabeledSeq[nLSeqIdx].is())
- continue;
- Reference< data::XDataSequence > xSeq( aLabeledSeq[nLSeqIdx]->getValues());
- if(!xSeq.is())
- continue;
- Reference< beans::XPropertySet > xSeqProp( xSeq, uno::UNO_QUERY );
- ::rtl::OUString aRole;
- bool bTakeIntoAccount =
- ( xSeqProp.is() && (aRoleToMatch.getLength() > 0) &&
- (xSeqProp->getPropertyValue(C2U("Role")) >>= aRole ) &&
- aRole.equals( aRoleToMatch ));
-
- if( bTakeIntoAccount )
- {
- sal_Int32 nKey = xSeq->getNumberFormatKeyByIndex( -1 );
- // initialize the value
- if( aKeyMap.find( nKey ) == aKeyMap.end())
- aKeyMap[ nKey ] = 0;
- // increase frequency
- aKeyMap[ nKey ] = (aKeyMap[ nKey ] + 1);
- }
- }
- }
- }
- }
- }
- catch( const uno::Exception & ex )
- {
- ASSERT_EXCEPTION( ex );
- }
-
- if( ! aKeyMap.empty())
- {
- sal_Int32 nMaxFreq = 0;
- // find most frequent key
- for( tNumberformatFrequency::const_iterator aIt = aKeyMap.begin();
- aIt != aKeyMap.end(); ++aIt )
- {
- OSL_TRACE( "NumberFormatKey %d appears %d times", (*aIt).first, (*aIt).second );
- // all values must at least be 1
- if( (*aIt).second > nMaxFreq )
- {
- nNumberFormatKey = (*aIt).first;
- bNumberFormatKeyFoundViaAttachedData = true;
- nMaxFreq = (*aIt).second;
- }
- }
- }
-
- if( bSearchForParallelAxisIfNothingIsFound )
- {
- //no format is set to this axis and no data is set to this axis
- //--> try to obtain the format from the parallel y-axis
- if( !bNumberFormatKeyFoundViaAttachedData && nDimensionIndex == 1 )
- {
- sal_Int32 nParallelAxisIndex = (nAxisIndex==1) ?0 :1;
- Reference< XAxis > xParallelAxis( AxisHelper::getAxis( 1, nParallelAxisIndex, xCorrespondingCoordinateSystem ) );
- nNumberFormatKey = lcl_getExplicitNumberFormatKeyForAxis( xParallelAxis, xCorrespondingCoordinateSystem, xNumberFormatsSupplier, false );
- }
- }
- }
- }
- return nNumberFormatKey;
-}
-
sal_Int32 ExplicitValueProvider::getExplicitNumberFormatKeyForAxis(
const Reference< chart2::XAxis >& xAxis
, const Reference< chart2::XCoordinateSystem > & xCorrespondingCoordinateSystem
, const Reference< util::XNumberFormatsSupplier >& xNumberFormatsSupplier )
{
- return lcl_getExplicitNumberFormatKeyForAxis( xAxis, xCorrespondingCoordinateSystem, xNumberFormatsSupplier
+ return AxisHelper::getExplicitNumberFormatKeyForAxis( xAxis, xCorrespondingCoordinateSystem, xNumberFormatsSupplier
, true /*bSearchForParallelAxisIfNothingIsFound*/ );
}
-sal_Int32 ExplicitValueProvider::getPercentNumberFormat( const Reference< util::XNumberFormatsSupplier >& xNumberFormatsSupplier )
-{
- sal_Int32 nRet=-1;
- Reference< util::XNumberFormats > xNumberFormats( xNumberFormatsSupplier->getNumberFormats() );
- if( xNumberFormats.is() )
- {
- sal_Bool bCreate = sal_True;
- const LocaleDataWrapper& rLocaleDataWrapper = Application::GetSettings().GetLocaleDataWrapper();
- Sequence<sal_Int32> aKeySeq = xNumberFormats->queryKeys( util::NumberFormat::PERCENT,
- rLocaleDataWrapper.getLocale(), bCreate );
- if( aKeySeq.getLength() )
- {
- nRet = aKeySeq[0];
- }
- }
- return nRet;
-}
-
-
sal_Int32 ExplicitValueProvider::getExplicitNumberFormatKeyForDataLabel(
const uno::Reference< beans::XPropertySet >& xSeriesOrPointProp,
const uno::Reference< XDataSeries >& xSeries,
@@ -1969,7 +1864,7 @@ sal_Int32 ExplicitValueProvider::getExplicitPercentageNumberFormatKeyForDataLabe
return nFormat;
if( !(xSeriesOrPointProp->getPropertyValue(C2U( "PercentageNumberFormat" )) >>= nFormat) )
{
- nFormat = ExplicitValueProvider::getPercentNumberFormat( xNumberFormatsSupplier );
+ nFormat = DiagramHelper::getPercentNumberFormat( xNumberFormatsSupplier );
}
if(nFormat<0)
nFormat=0;
@@ -2544,7 +2439,7 @@ void ChartView::createShapes()
{
SolarMutexGuard aSolarGuard;
// #i12587# support for shapes in chart
- m_pDrawModelWrapper->getSdrModel().EnableUndo( FALSE );
+ m_pDrawModelWrapper->getSdrModel().EnableUndo( sal_False );
m_pDrawModelWrapper->clearMainDrawPage();
}
@@ -2707,7 +2602,7 @@ void ChartView::createShapes()
if ( m_pDrawModelWrapper )
{
SolarMutexGuard aSolarGuard;
- m_pDrawModelWrapper->getSdrModel().EnableUndo( TRUE );
+ m_pDrawModelWrapper->getSdrModel().EnableUndo( true );
}
#if OSL_DEBUG_LEVEL > 0