remove css::chart::XChartTypeTemplate

these are purely internal interfaces, they cannot be used
from outside chart2.

Change-Id: Ib89e98e8099c34a530951bd85236fced216aff18
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128784
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2022-01-22 20:26:06 +01:00
committed by Noel Grandin
parent 75495067f6
commit 58766f997d
59 changed files with 205 additions and 429 deletions
-4
View File
@@ -73,9 +73,6 @@ excludelist:
- com/sun/star/chart2/data/XDataSink.hpp
- com/sun/star/chart2/data/XDataSource.hpp
- com/sun/star/lang/XServiceInfo.hpp
chart2/source/inc/DiagramHelper.hxx:
# # typedef in base class needs a complete type
- com/sun/star/chart2/XChartTypeTemplate.hpp
chart2/source/inc/ErrorBar.hxx:
# base class has to be a complete type
- com/sun/star/beans/XPropertySet.hpp
@@ -291,7 +288,6 @@ excludelist:
- com/sun/star/util/XModifyListener.hpp
chart2/source/model/template/ChartTypeTemplate.hxx:
# base class has to be a complete type
- com/sun/star/chart2/XChartTypeTemplate.hpp
- com/sun/star/lang/XServiceName.hpp
chart2/source/model/template/DataInterpreter.hxx:
# base class has to be a complete type
+2 -2
View File
@@ -57,7 +57,6 @@
#include <memory>
namespace com::sun::star::awt { class XRequestCallback; }
namespace com::sun::star::chart2 { class XChartTypeTemplate; }
namespace com::sun::star::chart2::data { class XDataProvider; }
namespace com::sun::star::document { class XFilter; }
namespace com::sun::star::embed { class XStorage; }
@@ -72,6 +71,7 @@ namespace chart
{
class Diagram;
class ChartTypeManager;
class ChartTypeTemplate;
class InternalDataProvider;
class NameContainer;
class PageBackground;
@@ -205,7 +205,7 @@ private:
css::uno::Reference< css::document::XFilter >
impl_createFilter( const css::uno::Sequence< css::beans::PropertyValue > & rMediaDescriptor );
css::uno::Reference< css::chart2::XChartTypeTemplate > impl_createDefaultChartTypeTemplate();
rtl::Reference< ::chart::ChartTypeTemplate > impl_createDefaultChartTypeTemplate();
css::uno::Reference< css::chart2::data::XDataSource > impl_createDefaultData();
void impl_adjustAdditionalShapesPositionAndSize(
@@ -32,6 +32,7 @@
#include <ChartModel.hxx>
#include <com/sun/star/chart2/XDataSeries.hpp>
#include <comphelper/servicehelper.hxx>
#include <tools/diagnose_ex.h>
@@ -46,6 +46,7 @@
#include <com/sun/star/chart/ChartAxisAssign.hpp>
#include <com/sun/star/chart/ChartErrorCategory.hpp>
#include <com/sun/star/chart/ChartSymbolType.hpp>
#include <com/sun/star/chart2/XDataSeries.hpp>
#include <com/sun/star/drawing/LineJoint.hpp>
#include <com/sun/star/drawing/LineStyle.hpp>
#include <com/sun/star/drawing/FillStyle.hpp>
@@ -52,6 +52,8 @@
#include <com/sun/star/chart2/RelativeSize.hpp>
#include <com/sun/star/chart2/RelativePosition.hpp>
#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/chart2/XChartType.hpp>
#include <com/sun/star/chart2/XDataSeries.hpp>
#include <com/sun/star/chart/ChartSolidType.hpp>
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
@@ -21,6 +21,7 @@
#include "Chart2ModelContact.hxx"
#include <ChartType.hxx>
#include <DiagramHelper.hxx>
#include <com/sun/star/chart2/XChartType.hpp>
#include <tools/long.hxx>
using namespace ::com::sun::star;
@@ -21,6 +21,7 @@
#include <WrappedProperty.hxx>
#include "Chart2ModelContact.hxx"
#include <DiagramHelper.hxx>
#include <com/sun/star/chart2/XDataSeries.hpp>
#include <memory>
#include <vector>
@@ -28,6 +28,7 @@
#include <sal/log.hxx>
#include <com/sun/star/chart2/CurveStyle.hpp>
#include <com/sun/star/chart2/XChartType.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
@@ -50,7 +50,7 @@ public:
css::uno::Any getPropertyDefault( const css::uno::Reference< css::beans::XPropertyState >& xInnerPropertyState ) const override;
virtual uno::Reference< chart2::XChartTypeTemplate > getNewTemplate( bool bNewValue, const OUString& rCurrentTemplate, const Reference< lang::XMultiServiceFactory >& xFactory ) const = 0;
virtual rtl::Reference< ::chart::ChartTypeTemplate > getNewTemplate( bool bNewValue, const OUString& rCurrentTemplate, const rtl::Reference< ::chart::ChartTypeManager >& xFactory ) const = 0;
protected:
std::shared_ptr< Chart2ModelContact > m_spChart2ModelContact;
@@ -87,7 +87,7 @@ void WrappedStockProperty::setPropertyValue( const css::uno::Any& rOuterValue, c
DiagramHelper::tTemplateWithServiceName aTemplateAndService =
DiagramHelper::getTemplateForDiagram( xDiagram, xChartTypeManager );
uno::Reference< chart2::XChartTypeTemplate > xTemplate =
rtl::Reference< ::chart::ChartTypeTemplate > xTemplate =
getNewTemplate( bNewValue, aTemplateAndService.sServiceName, xChartTypeManager );
if(!xTemplate.is())
@@ -119,7 +119,7 @@ public:
css::uno::Any getPropertyValue( const css::uno::Reference< css::beans::XPropertySet >& xInnerPropertySet ) const override;
uno::Reference< chart2::XChartTypeTemplate > getNewTemplate( bool bNewValue, const OUString& rCurrentTemplate, const Reference< lang::XMultiServiceFactory >& xFactory ) const override;
rtl::Reference< ::chart::ChartTypeTemplate > getNewTemplate( bool bNewValue, const OUString& rCurrentTemplate, const rtl::Reference< ::chart::ChartTypeManager >& xFactory ) const override;
};
}
@@ -155,9 +155,9 @@ css::uno::Any WrappedVolumeProperty::getPropertyValue( const css::uno::Reference
return m_aOuterValue;
}
uno::Reference< chart2::XChartTypeTemplate > WrappedVolumeProperty::getNewTemplate( bool bNewValue, const OUString& rCurrentTemplate, const Reference< lang::XMultiServiceFactory >& xFactory ) const
rtl::Reference< ::chart::ChartTypeTemplate > WrappedVolumeProperty::getNewTemplate( bool bNewValue, const OUString& rCurrentTemplate, const rtl::Reference< ::chart::ChartTypeManager >& xFactory ) const
{
uno::Reference< chart2::XChartTypeTemplate > xTemplate;
rtl::Reference< ::chart::ChartTypeTemplate > xTemplate;
if(!xFactory.is())
return xTemplate;
@@ -165,16 +165,16 @@ uno::Reference< chart2::XChartTypeTemplate > WrappedVolumeProperty::getNewTempla
if( bNewValue ) //add volume
{
if( rCurrentTemplate == "com.sun.star.chart2.template.StockLowHighClose" )
xTemplate.set( xFactory->createInstance( "com.sun.star.chart2.template.StockVolumeLowHighClose" ), uno::UNO_QUERY );
xTemplate = xFactory->createTemplate( "com.sun.star.chart2.template.StockVolumeLowHighClose" );
else if( rCurrentTemplate == "com.sun.star.chart2.template.StockOpenLowHighClose" )
xTemplate.set( xFactory->createInstance( "com.sun.star.chart2.template.StockVolumeOpenLowHighClose" ), uno::UNO_QUERY );
xTemplate = xFactory->createTemplate( "com.sun.star.chart2.template.StockVolumeOpenLowHighClose" );
}
else //remove volume
{
if( rCurrentTemplate == "com.sun.star.chart2.template.StockVolumeLowHighClose" )
xTemplate.set( xFactory->createInstance( "com.sun.star.chart2.template.StockLowHighClose" ), uno::UNO_QUERY );
xTemplate = xFactory->createTemplate( "com.sun.star.chart2.template.StockLowHighClose" );
else if( rCurrentTemplate == "com.sun.star.chart2.template.StockVolumeOpenLowHighClose" )
xTemplate.set( xFactory->createInstance( "com.sun.star.chart2.template.StockOpenLowHighClose" ), uno::UNO_QUERY );
xTemplate = xFactory->createTemplate( "com.sun.star.chart2.template.StockOpenLowHighClose" );
}
return xTemplate;
}
@@ -188,7 +188,7 @@ public:
css::uno::Any getPropertyValue( const css::uno::Reference< css::beans::XPropertySet >& xInnerPropertySet ) const override;
uno::Reference< chart2::XChartTypeTemplate > getNewTemplate( bool bNewValue, const OUString& rCurrentTemplate, const Reference< lang::XMultiServiceFactory >& xFactory ) const override;
rtl::Reference< ::chart::ChartTypeTemplate > getNewTemplate( bool bNewValue, const OUString& rCurrentTemplate, const rtl::Reference< ChartTypeManager >& xFactory ) const override;
};
}
@@ -223,22 +223,22 @@ css::uno::Any WrappedUpDownProperty::getPropertyValue( const css::uno::Reference
}
return m_aOuterValue;
}
uno::Reference< chart2::XChartTypeTemplate > WrappedUpDownProperty::getNewTemplate( bool bNewValue, const OUString& rCurrentTemplate, const Reference< lang::XMultiServiceFactory >& xFactory ) const
rtl::Reference< ::chart::ChartTypeTemplate > WrappedUpDownProperty::getNewTemplate( bool bNewValue, const OUString& rCurrentTemplate, const rtl::Reference< ChartTypeManager >& xFactory ) const
{
uno::Reference< chart2::XChartTypeTemplate > xTemplate;
rtl::Reference< ::chart::ChartTypeTemplate > xTemplate;
if( bNewValue ) //add open series
{
if( rCurrentTemplate == "com.sun.star.chart2.template.StockLowHighClose" )
xTemplate.set( xFactory->createInstance( "com.sun.star.chart2.template.StockOpenLowHighClose" ), uno::UNO_QUERY );
xTemplate = xFactory->createTemplate( "com.sun.star.chart2.template.StockOpenLowHighClose" );
else if( rCurrentTemplate == "com.sun.star.chart2.template.StockVolumeLowHighClose" )
xTemplate.set( xFactory->createInstance( "com.sun.star.chart2.template.StockVolumeOpenLowHighClose" ), uno::UNO_QUERY );
xTemplate = xFactory->createTemplate( "com.sun.star.chart2.template.StockVolumeOpenLowHighClose" );
}
else //remove open series
{
if( rCurrentTemplate == "com.sun.star.chart2.template.StockOpenLowHighClose" )
xTemplate.set( xFactory->createInstance( "com.sun.star.chart2.template.StockLowHighClose" ), uno::UNO_QUERY );
xTemplate = xFactory->createTemplate( "com.sun.star.chart2.template.StockLowHighClose" );
else if( rCurrentTemplate == "com.sun.star.chart2.template.StockVolumeOpenLowHighClose" )
xTemplate.set( xFactory->createInstance( "com.sun.star.chart2.template.StockVolumeLowHighClose" ), uno::UNO_QUERY );
xTemplate = xFactory->createTemplate( "com.sun.star.chart2.template.StockVolumeLowHighClose" );
}
return xTemplate;
}
@@ -309,7 +309,7 @@ void ChartTypeDialogController::commitToModel( const ChartTypeParameter& rParame
, const rtl::Reference<::chart::ChartModel>& xChartModel )
{
rtl::Reference< ::chart::ChartTypeManager > xTemplateManager = xChartModel->getTypeManager();
uno::Reference< XChartTypeTemplate > xTemplate( getCurrentTemplate( rParameter, xTemplateManager ) );
rtl::Reference< ::chart::ChartTypeTemplate > xTemplate( getCurrentTemplate( rParameter, xTemplateManager ) );
if(!xTemplate.is())
return;
@@ -43,6 +43,7 @@
#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/chart2/XChartType.hpp>
#include <com/sun/star/chart2/XDataSeries.hpp>
#include <com/sun/star/container/XIndexReplace.hpp>
#include <algorithm>
@@ -39,6 +39,7 @@
#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/chart2/XChartTypeContainer.hpp>
#include <com/sun/star/chart2/XDataSeriesContainer.hpp>
#include <com/sun/star/chart2/XDataInterpreter.hpp>
#include <com/sun/star/chart2/data/XDataSink.hpp>
#include <comphelper/sequence.hxx>
#include <tools/diagnose_ex.h>
@@ -295,7 +296,7 @@ Reference< XDataSeries > lcl_CreateNewSeries(
sal_Int32 nNewSeriesIndex,
sal_Int32 nTotalNumberOfSeriesInCTGroup,
const Reference< XDiagram > & xDiagram,
const Reference< XChartTypeTemplate > & xTemplate,
const rtl::Reference< ::chart::ChartTypeTemplate > & xTemplate,
bool bCreateDataCachedSequences )
{
// create plain series
@@ -37,7 +37,6 @@ namespace com::sun::star::chart2 {
class XDataSeriesContainer;
class XDataSeries;
class XChartType;
class XChartTypeTemplate;
struct InterpretedData;
namespace data {
class XDataProvider;
@@ -155,8 +154,7 @@ private:
rtl::Reference<::chart::ChartModel>
m_xChartDocument;
css::uno::Reference< css::chart2::XChartTypeTemplate >
m_xTemplate;
rtl::Reference< ::chart::ChartTypeTemplate > m_xTemplate;
css::uno::Reference< css::uno::XComponentContext >
m_xContext;
@@ -45,6 +45,7 @@
#include <com/sun/star/chart2/XTitle.hpp>
#include <com/sun/star/chart2/MovingAverageType.hpp>
#include <com/sun/star/chart2/XDataSeries.hpp>
#include <com/sun/star/chart2/XRegressionCurveContainer.hpp>
#include <tools/diagnose_ex.h>
@@ -49,6 +49,7 @@
#include <com/sun/star/chart2/AxisType.hpp>
#include <com/sun/star/chart2/XAxis.hpp>
#include <com/sun/star/chart2/XDataSeries.hpp>
#include <svl/intitem.hxx>
#include <svl/ctloptions.hxx>
@@ -24,6 +24,8 @@
#include <ChartTypeHelper.hxx>
#include <ThreeDHelper.hxx>
#include <ControllerLockGuard.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/chart2/XDiagram.hpp>
#include <com/sun/star/drawing/ProjectionMode.hpp>
#include <tools/diagnose_ex.h>
#include <tools/helpers.hxx>
@@ -24,7 +24,6 @@
#include <vcl/wizardmachine.hxx>
namespace chart { class TabPageNotifiable; }
namespace com::sun::star::chart2 { class XChartTypeTemplate; }
namespace chart
{
@@ -39,6 +39,7 @@
#include <com/sun/star/chart2/DataPointLabel.hpp>
#include <com/sun/star/chart2/Symbol.hpp>
#include <com/sun/star/chart2/RelativePosition.hpp>
#include <com/sun/star/chart2/XDataSeries.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/frame/XModel.hpp>
@@ -47,6 +47,7 @@
#include <com/sun/star/chart2/DataPointLabel.hpp>
#include <com/sun/star/chart2/Symbol.hpp>
#include <com/sun/star/chart2/RelativePosition.hpp>
#include <com/sun/star/chart2/XDataSeries.hpp>
#include <com/sun/star/frame/XModel.hpp>
#include <memory>
@@ -55,6 +55,7 @@
#include <com/sun/star/chart2/XRegressionCurve.hpp>
#include <com/sun/star/chart2/XRegressionCurveContainer.hpp>
#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/chart2/XDataSeries.hpp>
#include <com/sun/star/chart/ErrorBarStyle.hpp>
#include <svx/ActionDescriptionProvider.hxx>
@@ -54,8 +54,9 @@
#include <ReferenceSizeProvider.hxx>
#include <RegressionCurveHelper.hxx>
#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/util/CloseVetoException.hpp>
#include <com/sun/star/chart2/XDataSeries.hpp>
#include <com/sun/star/chart2/XRegressionCurveContainer.hpp>
#include <com/sun/star/util/CloseVetoException.hpp>
#include <comphelper/servicehelper.hxx>
#include <memory>
@@ -57,6 +57,8 @@
#include <com/sun/star/chart2/XRegressionCurveContainer.hpp>
#include <com/sun/star/chart2/data/XPivotTableDataProvider.hpp>
#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/chart2/XChartType.hpp>
#include <com/sun/star/chart2/XDataSeries.hpp>
#include <com/sun/star/awt/PopupMenuDirection.hpp>
#include <com/sun/star/frame/DispatchHelper.hpp>
@@ -47,6 +47,7 @@
#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/chart2/XRegressionCurve.hpp>
#include <com/sun/star/chart2/XRegressionCurveContainer.hpp>
#include <com/sun/star/chart2/XDataSeries.hpp>
#include <com/sun/star/chart2/XDataProviderAccess.hpp>
// only needed until #i68864# is fixed
@@ -37,10 +37,6 @@ namespace com::sun::star::chart2
{
class XChartDocument;
}
namespace com::sun::star::chart2
{
class XChartTypeTemplate;
}
namespace com::sun::star::lang
{
class XMultiServiceFactory;
+23 -19
View File
@@ -20,15 +20,20 @@
#include <cppuhelper/implbase.hxx>
#include "StackMode.hxx"
#include <com/sun/star/chart2/XChartTypeTemplate.hpp>
#include <com/sun/star/lang/XServiceName.hpp>
#include "charttoolsdllapi.hxx"
#include <rtl/ref.hxx>
#include <vector>
namespace com::sun::star::beans { struct PropertyValue; }
namespace com::sun::star::chart2 { class XChartType; }
namespace com::sun::star::chart2 { class XCoordinateSystem; }
namespace com::sun::star::chart2 { class XCoordinateSystemContainer; }
namespace com::sun::star::chart2 { class XDataSeries; }
namespace com::sun::star::chart2 { class XDataInterpreter; }
namespace com::sun::star::chart2 { class XDiagram; }
namespace com::sun::star::chart2::data { class XDataSource; }
namespace com::sun::star::chart2::data { class XLabeledDataSequence; }
namespace com::sun::star::uno { class XComponentContext; }
namespace chart
@@ -70,7 +75,6 @@ class ChartType;
* create an XLegend via the global service factory, set it at the diagram.
*/
class SAL_DLLPUBLIC_RTTI ChartTypeTemplate : public ::cppu::WeakImplHelper<
css::chart2::XChartTypeTemplate,
css::lang::XServiceName >
{
public:
@@ -78,32 +82,33 @@ public:
const OUString & rServiceName );
virtual ~ChartTypeTemplate() override;
// ____ XChartTypeTemplate ____
virtual css::uno::Reference< css::chart2::XDiagram > SAL_CALL createDiagramByDataSource(
virtual css::uno::Reference< css::chart2::XDiagram > createDiagramByDataSource(
const css::uno::Reference< css::chart2::data::XDataSource >& xDataSource,
const css::uno::Sequence< css::beans::PropertyValue >& aArguments ) override;
const css::uno::Sequence< css::beans::PropertyValue >& aArguments );
/// denotes if the chart needs categories at the first scale
virtual sal_Bool SAL_CALL supportsCategories() override;
virtual bool supportsCategories();
virtual void SAL_CALL changeDiagram(
const css::uno::Reference< css::chart2::XDiagram >& xDiagram ) override;
virtual void SAL_CALL changeDiagramData(
virtual void changeDiagram(
const css::uno::Reference< css::chart2::XDiagram >& xDiagram );
virtual void changeDiagramData(
const css::uno::Reference< css::chart2::XDiagram >& xDiagram,
const css::uno::Reference< css::chart2::data::XDataSource >& xDataSource,
const css::uno::Sequence< css::beans::PropertyValue >& aArguments ) override;
virtual sal_Bool SAL_CALL matchesTemplate(
const css::uno::Sequence< css::beans::PropertyValue >& aArguments );
virtual bool matchesTemplate(
const css::uno::Reference<
css::chart2::XDiagram >& xDiagram,
sal_Bool bAdaptProperties ) override;
// still abstract: getChartTypeForNewSeries()
virtual css::uno::Reference< css::chart2::XDataInterpreter > SAL_CALL getDataInterpreter() override;
virtual void SAL_CALL applyStyle(
bool bAdaptProperties );
virtual css::uno::Reference< css::chart2::XChartType >
getChartTypeForNewSeries( const css::uno::Sequence<
css::uno::Reference< css::chart2::XChartType > >& aFormerlyUsedChartTypes ) = 0;
virtual css::uno::Reference< css::chart2::XDataInterpreter > getDataInterpreter();
virtual void applyStyle(
const css::uno::Reference< css::chart2::XDataSeries >& xSeries,
::sal_Int32 nChartTypeIndex,
::sal_Int32 nSeriesIndex,
::sal_Int32 nSeriesCount ) override;
virtual void SAL_CALL resetStyles(
const css::uno::Reference< css::chart2::XDiagram >& xDiagram ) override;
::sal_Int32 nSeriesCount );
virtual void resetStyles(
const css::uno::Reference< css::chart2::XDiagram >& xDiagram );
/// @throws css::uno::RuntimeException
void applyStyles(
@@ -248,7 +253,6 @@ private:
css::chart2::data::XLabeledDataSequence >& xCategories,
const std::vector< rtl::Reference< ChartType > > & aOldChartTypesSeq);
using XChartTypeTemplate::getChartTypeForNewSeries;
rtl::Reference< ChartType > getChartTypeForNewSeries( const std::vector< rtl::Reference< ChartType > >& aFormerlyUsedChartTypes );
};
+3 -1
View File
@@ -21,7 +21,6 @@
#include "StackMode.hxx"
#include "charttoolsdllapi.hxx"
#include <com/sun/star/awt/Rectangle.hpp>
#include <com/sun/star/chart2/XChartTypeTemplate.hpp>
#include <rtl/ref.hxx>
#include <utility>
@@ -30,8 +29,11 @@
namespace chart { class ChartModel; }
namespace com::sun::star::chart2 { class XAxis; }
namespace com::sun::star::chart2 { class XChartDocument; }
namespace com::sun::star::chart2 { class XChartType; }
namespace com::sun::star::chart2 { class XCoordinateSystem; }
namespace com::sun::star::chart2 { class XDiagram; }
namespace com::sun::star::chart2 { class XDataSeries; }
namespace com::sun::star::chart2::data { class XLabeledDataSequence; }
namespace com::sun::star::frame { class XModel; }
namespace com::sun::star::lang { class XMultiServiceFactory; }
namespace com::sun::star::uno { class XComponentContext; }
+5 -5
View File
@@ -19,6 +19,7 @@
#include <ChartModel.hxx>
#include <ChartTypeManager.hxx>
#include <ChartTypeTemplate.hxx>
#include <servicenames.hxx>
#include <DataSourceHelper.hxx>
#include <ChartModelHelper.hxx>
@@ -55,7 +56,6 @@
#include <com/sun/star/document/DocumentProperties.hpp>
#include <com/sun/star/util/CloseVetoException.hpp>
#include <com/sun/star/util/XModifyBroadcaster.hpp>
#include <com/sun/star/chart2/XChartTypeTemplate.hpp>
#include <sal/log.hxx>
#include <tools/diagnose_ex.h>
@@ -839,7 +839,7 @@ void SAL_CALL ChartModel::setArguments( const Sequence< beans::PropertyValue >&
Reference< chart2::XDiagram > xDia( getFirstDiagram() );
if( !xDia.is() )
{
Reference< chart2::XChartTypeTemplate > xTemplate( impl_createDefaultChartTypeTemplate() );
rtl::Reference< ::chart::ChartTypeTemplate > xTemplate( impl_createDefaultChartTypeTemplate() );
if( xTemplate.is())
setFirstDiagram( xTemplate->createDiagramByDataSource( xDataSource, aArguments ) );
}
@@ -888,11 +888,11 @@ Reference<awt::XRequestCallback> SAL_CALL ChartModel::getPopupRequest()
return m_xPopupRequest;
}
Reference< chart2::XChartTypeTemplate > ChartModel::impl_createDefaultChartTypeTemplate()
rtl::Reference< ::chart::ChartTypeTemplate > ChartModel::impl_createDefaultChartTypeTemplate()
{
Reference< chart2::XChartTypeTemplate > xTemplate;
rtl::Reference< ::chart::ChartTypeTemplate > xTemplate;
if( m_xChartTypeManager.is() )
xTemplate.set( m_xChartTypeManager->createInstance( "com.sun.star.chart2.template.Column" ), uno::UNO_QUERY );
xTemplate = m_xChartTypeManager->createTemplate( "com.sun.star.chart2.template.Column" );
return xTemplate;
}
@@ -387,7 +387,7 @@ void ChartModel::insertDefaultChart()
try
{
// create default chart
Reference< chart2::XChartTypeTemplate > xTemplate( impl_createDefaultChartTypeTemplate() );
rtl::Reference< ::chart::ChartTypeTemplate > xTemplate( impl_createDefaultChartTypeTemplate() );
if( xTemplate.is())
{
try
@@ -23,6 +23,8 @@
#include <DataSeriesHelper.hxx>
#include <PropertyHelper.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/chart2/XChartType.hpp>
#include <com/sun/star/chart2/XDataSeries.hpp>
#include <com/sun/star/drawing/LineStyle.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
@@ -173,8 +175,8 @@ StackMode AreaChartTypeTemplate::getStackMode( sal_Int32 /* nChartTypeIndex */ )
return m_eStackMode;
}
// ____ XChartTypeTemplate ____
void SAL_CALL AreaChartTypeTemplate::applyStyle(
// ____ ChartTypeTemplate ____
void AreaChartTypeTemplate::applyStyle(
const Reference< chart2::XDataSeries >& xSeries,
::sal_Int32 nChartTypeIndex,
::sal_Int32 nSeriesIndex,
@@ -184,7 +186,7 @@ void SAL_CALL AreaChartTypeTemplate::applyStyle(
DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, "BorderStyle", uno::Any( drawing::LineStyle_NONE ) );
}
void SAL_CALL AreaChartTypeTemplate::resetStyles( const Reference< chart2::XDiagram >& xDiagram )
void AreaChartTypeTemplate::resetStyles( const Reference< chart2::XDiagram >& xDiagram )
{
ChartTypeTemplate::resetStyles( xDiagram );
std::vector< Reference< chart2::XDataSeries > > aSeriesVec(
@@ -222,7 +224,7 @@ Reference< chart2::XChartType > AreaChartTypeTemplate::getChartTypeForIndex( sal
return xResult;
}
Reference< chart2::XChartType > SAL_CALL AreaChartTypeTemplate::getChartTypeForNewSeries(
Reference< chart2::XChartType > AreaChartTypeTemplate::getChartTypeForNewSeries(
const uno::Sequence< Reference< chart2::XChartType > >& aFormerlyUsedChartTypes )
{
Reference< chart2::XChartType > xResult( getChartTypeForIndex( 0 ) );
@@ -55,16 +55,16 @@ protected:
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
getPropertySetInfo() override;
// ____ XChartTypeTemplate ____
virtual css::uno::Reference< css::chart2::XChartType > SAL_CALL
// ____ ChartTypeTemplate ____
virtual css::uno::Reference< css::chart2::XChartType >
getChartTypeForNewSeries( const css::uno::Sequence<
css::uno::Reference< css::chart2::XChartType > >& aFormerlyUsedChartTypes ) override;
virtual void SAL_CALL applyStyle(
virtual void applyStyle(
const css::uno::Reference< css::chart2::XDataSeries >& xSeries,
::sal_Int32 nChartTypeGroupIndex,
::sal_Int32 nSeriesIndex,
::sal_Int32 nSeriesCount ) override;
virtual void SAL_CALL resetStyles(
virtual void resetStyles(
const css::uno::Reference< css::chart2::XDiagram >& xDiagram ) override;
// ____ ChartTypeTemplate ____
@@ -25,7 +25,10 @@
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/drawing/LineStyle.hpp>
#include <com/sun/star/chart2/DataPointGeometry3D.hpp>
#include <com/sun/star/chart2/XChartType.hpp>
#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
#include <com/sun/star/chart2/XDataSeries.hpp>
#include <com/sun/star/chart2/XDiagram.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <tools/diagnose_ex.h>
@@ -159,10 +162,10 @@ bool BarChartTypeTemplate::isSwapXAndY() const
return (m_eBarDirection == HORIZONTAL);
}
// ____ XChartTypeTemplate ____
sal_Bool SAL_CALL BarChartTypeTemplate::matchesTemplate(
// ____ ChartTypeTemplate ____
bool BarChartTypeTemplate::matchesTemplate(
const Reference< chart2::XDiagram >& xDiagram,
sal_Bool bAdaptProperties )
bool bAdaptProperties )
{
bool bResult = ChartTypeTemplate::matchesTemplate( xDiagram, bAdaptProperties );
@@ -215,7 +218,7 @@ Reference< chart2::XChartType > BarChartTypeTemplate::getChartTypeForIndex( sal_
return xResult;
}
Reference< chart2::XChartType > SAL_CALL BarChartTypeTemplate::getChartTypeForNewSeries(
Reference< chart2::XChartType > BarChartTypeTemplate::getChartTypeForNewSeries(
const uno::Sequence< Reference< chart2::XChartType > >& aFormerlyUsedChartTypes )
{
Reference< chart2::XChartType > xResult( getChartTypeForIndex( 0 ) );
@@ -245,7 +248,7 @@ Reference< beans::XPropertySetInfo > SAL_CALL BarChartTypeTemplate::getPropertyS
return *StaticBarChartTypeTemplateInfo::get();
}
void SAL_CALL BarChartTypeTemplate::applyStyle(
void BarChartTypeTemplate::applyStyle(
const Reference< chart2::XDataSeries >& xSeries,
::sal_Int32 nChartTypeIndex,
::sal_Int32 nSeriesIndex,
@@ -269,7 +272,7 @@ void SAL_CALL BarChartTypeTemplate::applyStyle(
}
}
void SAL_CALL BarChartTypeTemplate::resetStyles(
void BarChartTypeTemplate::resetStyles(
const Reference< chart2::XDiagram >& xDiagram )
{
ChartTypeTemplate::resetStyles( xDiagram );
@@ -62,19 +62,19 @@ protected:
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
getPropertySetInfo() override;
// ____ XChartTypeTemplate ____
virtual sal_Bool SAL_CALL matchesTemplate(
// ____ ChartTypeTemplate ____
virtual bool matchesTemplate(
const css::uno::Reference< css::chart2::XDiagram >& xDiagram,
sal_Bool bAdaptProperties ) override;
virtual css::uno::Reference< css::chart2::XChartType > SAL_CALL
bool bAdaptProperties ) override;
virtual css::uno::Reference< css::chart2::XChartType >
getChartTypeForNewSeries( const css::uno::Sequence<
css::uno::Reference< css::chart2::XChartType > >& aFormerlyUsedChartTypes ) override;
virtual void SAL_CALL applyStyle(
virtual void applyStyle(
const css::uno::Reference< css::chart2::XDataSeries >& xSeries,
::sal_Int32 nChartTypeGroupIndex,
::sal_Int32 nSeriesIndex,
::sal_Int32 nSeriesCount ) override;
virtual void SAL_CALL resetStyles(
virtual void resetStyles(
const css::uno::Reference< css::chart2::XDiagram >& xDiagram ) override;
// ____ ChartTypeTemplate ____
@@ -21,6 +21,7 @@
#include "BubbleDataInterpreter.hxx"
#include <servicenames_charttypes.hxx>
#include <DataSeriesHelper.hxx>
#include <com/sun/star/chart2/XChartType.hpp>
#include <com/sun/star/drawing/LineStyle.hpp>
#include <PropertyHelper.hxx>
#include <com/sun/star/uno/XComponentContext.hpp>
@@ -139,7 +140,7 @@ StackMode BubbleChartTypeTemplate::getStackMode( sal_Int32 /* nChartTypeIndex */
return StackMode::NONE;
}
void SAL_CALL BubbleChartTypeTemplate::applyStyle(
void BubbleChartTypeTemplate::applyStyle(
const Reference< chart2::XDataSeries >& xSeries,
::sal_Int32 nChartTypeIndex,
::sal_Int32 nSeriesIndex,
@@ -149,8 +150,8 @@ void SAL_CALL BubbleChartTypeTemplate::applyStyle(
DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, "BorderStyle", uno::Any( drawing::LineStyle_NONE ) );
}
// ____ XChartTypeTemplate ____
sal_Bool SAL_CALL BubbleChartTypeTemplate::supportsCategories()
// ____ ChartTypeTemplate ____
bool BubbleChartTypeTemplate::supportsCategories()
{
return false;
}
@@ -174,7 +175,7 @@ Reference< chart2::XChartType > BubbleChartTypeTemplate::getChartTypeForIndex( s
return xResult;
}
Reference< chart2::XChartType > SAL_CALL BubbleChartTypeTemplate::getChartTypeForNewSeries(
Reference< chart2::XChartType > BubbleChartTypeTemplate::getChartTypeForNewSeries(
const uno::Sequence< Reference< chart2::XChartType > >& aFormerlyUsedChartTypes )
{
Reference< chart2::XChartType > xResult;
@@ -196,7 +197,7 @@ Reference< chart2::XChartType > SAL_CALL BubbleChartTypeTemplate::getChartTypeFo
return xResult;
}
Reference< chart2::XDataInterpreter > SAL_CALL BubbleChartTypeTemplate::getDataInterpreter()
Reference< chart2::XDataInterpreter > BubbleChartTypeTemplate::getDataInterpreter()
{
if( ! m_xDataInterpreter.is())
m_xDataInterpreter.set( new BubbleDataInterpreter );
@@ -51,12 +51,12 @@ protected:
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
getPropertySetInfo() override;
// ____ XChartTypeTemplate ____
virtual sal_Bool SAL_CALL supportsCategories() override;
virtual css::uno::Reference< css::chart2::XChartType > SAL_CALL
// ____ ChartTypeTemplate ____
virtual bool supportsCategories() override;
virtual css::uno::Reference< css::chart2::XChartType >
getChartTypeForNewSeries( const css::uno::Sequence< css::uno::Reference< css::chart2::XChartType > >& aFormerlyUsedChartTypes ) override;
virtual css::uno::Reference< css::chart2::XDataInterpreter > SAL_CALL getDataInterpreter() override;
virtual void SAL_CALL applyStyle(
virtual css::uno::Reference< css::chart2::XDataInterpreter > getDataInterpreter() override;
virtual void applyStyle(
const css::uno::Reference< css::chart2::XDataSeries >& xSeries,
::sal_Int32 nChartTypeGroupIndex,
::sal_Int32 nSeriesIndex,
@@ -34,6 +34,8 @@
#include <com/sun/star/chart2/XDataSeriesContainer.hpp>
#include <com/sun/star/chart2/XChartTypeContainer.hpp>
#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
#include <com/sun/star/chart2/XColorScheme.hpp>
#include <com/sun/star/chart2/XDiagram.hpp>
#include <tools/diagnose_ex.h>
#include <comphelper/property.hxx>
#include <comphelper/sequence.hxx>
@@ -134,8 +136,8 @@ ChartTypeTemplate::ChartTypeTemplate(
ChartTypeTemplate::~ChartTypeTemplate()
{}
// ____ XChartTypeTemplate ____
uno::Reference< XDiagram > SAL_CALL ChartTypeTemplate::createDiagramByDataSource(
// ____ ChartTypeTemplate ____
uno::Reference< XDiagram > ChartTypeTemplate::createDiagramByDataSource(
const uno::Reference< data::XDataSource >& xDataSource,
const uno::Sequence< beans::PropertyValue >& aArguments )
{
@@ -173,12 +175,12 @@ uno::Reference< XDiagram > SAL_CALL ChartTypeTemplate::createDiagramByDataSource
return xDia;
}
sal_Bool SAL_CALL ChartTypeTemplate::supportsCategories()
bool ChartTypeTemplate::supportsCategories()
{
return true;
}
void SAL_CALL ChartTypeTemplate::changeDiagram( const uno::Reference< XDiagram >& xDiagram )
void ChartTypeTemplate::changeDiagram( const uno::Reference< XDiagram >& xDiagram )
{
if( ! xDiagram.is())
return;
@@ -251,7 +253,7 @@ void SAL_CALL ChartTypeTemplate::changeDiagram( const uno::Reference< XDiagram >
}
}
void SAL_CALL ChartTypeTemplate::changeDiagramData(
void ChartTypeTemplate::changeDiagramData(
const Reference< chart2::XDiagram >& xDiagram,
const Reference< chart2::data::XDataSource >& xDataSource,
const Sequence< beans::PropertyValue >& aArguments )
@@ -301,9 +303,9 @@ void SAL_CALL ChartTypeTemplate::changeDiagramData(
}
}
sal_Bool SAL_CALL ChartTypeTemplate::matchesTemplate(
bool ChartTypeTemplate::matchesTemplate(
const Reference< chart2::XDiagram >& xDiagram,
sal_Bool /* bAdaptProperties */ )
bool /* bAdaptProperties */ )
{
bool bResult = false;
@@ -362,7 +364,7 @@ sal_Bool SAL_CALL ChartTypeTemplate::matchesTemplate(
return bResult;
}
Reference< chart2::XDataInterpreter > SAL_CALL ChartTypeTemplate::getDataInterpreter()
Reference< chart2::XDataInterpreter > ChartTypeTemplate::getDataInterpreter()
{
if( ! m_xDataInterpreter.is())
m_xDataInterpreter.set( new DataInterpreter );
@@ -370,7 +372,7 @@ Reference< chart2::XDataInterpreter > SAL_CALL ChartTypeTemplate::getDataInterpr
return m_xDataInterpreter;
}
void SAL_CALL ChartTypeTemplate::applyStyle(
void ChartTypeTemplate::applyStyle(
const Reference< chart2::XDataSeries >& xSeries,
::sal_Int32 nChartTypeIndex,
::sal_Int32 /* nSeriesIndex */,
@@ -427,7 +429,7 @@ void ChartTypeTemplate::applyStyles( const Reference< chart2::XDiagram >& xDiagr
lcl_ensureCorrectMissingValueTreatment( xDiagram, getChartTypeForIndex( 0 ) );
}
void SAL_CALL ChartTypeTemplate::resetStyles( const Reference< chart2::XDiagram >& xDiagram )
void ChartTypeTemplate::resetStyles( const Reference< chart2::XDiagram >& xDiagram )
{
// reset number format if we had percent stacking on
bool bPercent = (getStackMode(0) == StackMode::YStackedPercent);
@@ -28,6 +28,7 @@
#include <com/sun/star/chart2/XChartTypeContainer.hpp>
#include <com/sun/star/chart2/XDataSeriesContainer.hpp>
#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
#include <com/sun/star/chart2/XDiagram.hpp>
#include <com/sun/star/drawing/LineStyle.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
@@ -235,7 +236,7 @@ void ColumnLineChartTypeTemplate::createChartTypes(
}
}
void SAL_CALL ColumnLineChartTypeTemplate::applyStyle(
void ColumnLineChartTypeTemplate::applyStyle(
const Reference< chart2::XDataSeries >& xSeries,
::sal_Int32 nChartTypeIndex,
::sal_Int32 nSeriesIndex,
@@ -267,9 +268,9 @@ StackMode ColumnLineChartTypeTemplate::getStackMode( sal_Int32 nChartTypeIndex )
}
// ____ XChartTypeTemplate ____
sal_Bool SAL_CALL ColumnLineChartTypeTemplate::matchesTemplate(
bool ColumnLineChartTypeTemplate::matchesTemplate(
const uno::Reference< XDiagram >& xDiagram,
sal_Bool bAdaptProperties )
bool bAdaptProperties )
{
bool bResult = false;
@@ -364,7 +365,7 @@ Reference< chart2::XChartType > ColumnLineChartTypeTemplate::getChartTypeForInde
return xCT;
}
Reference< XChartType > SAL_CALL ColumnLineChartTypeTemplate::getChartTypeForNewSeries(
Reference< XChartType > ColumnLineChartTypeTemplate::getChartTypeForNewSeries(
const uno::Sequence< Reference< chart2::XChartType > >& aFormerlyUsedChartTypes )
{
Reference< chart2::XChartType > xResult;
@@ -385,7 +386,7 @@ Reference< XChartType > SAL_CALL ColumnLineChartTypeTemplate::getChartTypeForNew
return xResult;
}
Reference< XDataInterpreter > SAL_CALL ColumnLineChartTypeTemplate::getDataInterpreter()
Reference< XDataInterpreter > ColumnLineChartTypeTemplate::getDataInterpreter()
{
if( ! m_xDataInterpreter.is())
{
@@ -56,18 +56,18 @@ protected:
getPropertySetInfo() override;
// ____ XChartTypeTemplate ____
virtual sal_Bool SAL_CALL matchesTemplate(
virtual bool matchesTemplate(
const css::uno::Reference< css::chart2::XDiagram >& xDiagram,
sal_Bool bAdaptProperties ) override;
virtual css::uno::Reference< css::chart2::XChartType > SAL_CALL
bool bAdaptProperties ) override;
virtual css::uno::Reference< css::chart2::XChartType >
getChartTypeForNewSeries( const css::uno::Sequence<
css::uno::Reference< css::chart2::XChartType > >& aFormerlyUsedChartTypes ) override;
virtual void SAL_CALL applyStyle(
virtual void applyStyle(
const css::uno::Reference< css::chart2::XDataSeries >& xSeries,
::sal_Int32 nChartTypeGroupIndex,
::sal_Int32 nSeriesIndex,
::sal_Int32 nSeriesCount ) override;
virtual css::uno::Reference< css::chart2::XDataInterpreter > SAL_CALL getDataInterpreter() override;
virtual css::uno::Reference< css::chart2::XDataInterpreter > getDataInterpreter() override;
// ____ ChartTypeTemplate ____
virtual void createChartTypes(
@@ -28,6 +28,8 @@
#include <com/sun/star/chart2/CurveStyle.hpp>
#include <com/sun/star/chart2/SymbolStyle.hpp>
#include <com/sun/star/chart2/Symbol.hpp>
#include <com/sun/star/chart2/XChartType.hpp>
#include <com/sun/star/chart2/XDataSeries.hpp>
#include <com/sun/star/drawing/LineStyle.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
@@ -196,10 +198,10 @@ StackMode LineChartTypeTemplate::getStackMode( sal_Int32 /* nChartTypeIndex */ )
return m_eStackMode;
}
// ____ XChartTypeTemplate ____
sal_Bool SAL_CALL LineChartTypeTemplate::matchesTemplate(
// ____ ChartTypeTemplate ____
bool LineChartTypeTemplate::matchesTemplate(
const uno::Reference< chart2::XDiagram >& xDiagram,
sal_Bool bAdaptProperties )
bool bAdaptProperties )
{
bool bResult = ChartTypeTemplate::matchesTemplate( xDiagram, bAdaptProperties );
@@ -313,7 +315,7 @@ Reference< chart2::XChartType > LineChartTypeTemplate::getChartTypeForIndex( sal
return xResult;
}
Reference< chart2::XChartType > SAL_CALL LineChartTypeTemplate::getChartTypeForNewSeries(
Reference< chart2::XChartType > LineChartTypeTemplate::getChartTypeForNewSeries(
const uno::Sequence< Reference< chart2::XChartType > >& aFormerlyUsedChartTypes )
{
Reference< chart2::XChartType > xResult;
@@ -346,7 +348,7 @@ Reference< chart2::XChartType > SAL_CALL LineChartTypeTemplate::getChartTypeForN
return xResult;
}
void SAL_CALL LineChartTypeTemplate::applyStyle(
void LineChartTypeTemplate::applyStyle(
const Reference< chart2::XDataSeries >& xSeries,
::sal_Int32 nChartTypeIndex,
::sal_Int32 nSeriesIndex,
@@ -57,12 +57,12 @@ protected:
getPropertySetInfo() override;
// ____ XChartTypeTemplate ____
virtual sal_Bool SAL_CALL matchesTemplate(
virtual bool matchesTemplate(
const css::uno::Reference< css::chart2::XDiagram >& xDiagram,
sal_Bool bAdaptProperties ) override;
virtual css::uno::Reference< css::chart2::XChartType > SAL_CALL
bool bAdaptProperties ) override;
virtual css::uno::Reference< css::chart2::XChartType >
getChartTypeForNewSeries( const css::uno::Sequence< css::uno::Reference< css::chart2::XChartType > >& aFormerlyUsedChartTypes ) override;
virtual void SAL_CALL applyStyle(
virtual void applyStyle(
const css::uno::Reference< css::chart2::XDataSeries >& xSeries,
::sal_Int32 nChartTypeGroupIndex,
::sal_Int32 nSeriesIndex,
@@ -25,6 +25,8 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/chart2/SymbolStyle.hpp>
#include <com/sun/star/chart2/Symbol.hpp>
#include <com/sun/star/chart2/XChartType.hpp>
#include <com/sun/star/chart2/XDataSeries.hpp>
#include <com/sun/star/drawing/LineStyle.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <tools/diagnose_ex.h>
@@ -59,7 +61,7 @@ StackMode NetChartTypeTemplate::getStackMode( sal_Int32 /* nChartTypeIndex */ )
return m_eStackMode;
}
void SAL_CALL NetChartTypeTemplate::applyStyle(
void NetChartTypeTemplate::applyStyle(
const Reference< chart2::XDataSeries >& xSeries,
::sal_Int32 nChartTypeIndex,
::sal_Int32 nSeriesIndex,
@@ -81,10 +83,10 @@ void SAL_CALL NetChartTypeTemplate::applyStyle(
}
}
// ____ XChartTypeTemplate ____
sal_Bool SAL_CALL NetChartTypeTemplate::matchesTemplate(
// ____ ChartTypeTemplate ____
bool NetChartTypeTemplate::matchesTemplate(
const Reference< chart2::XDiagram >& xDiagram,
sal_Bool bAdaptProperties )
bool bAdaptProperties )
{
bool bResult = ChartTypeTemplate::matchesTemplate( xDiagram, bAdaptProperties );
@@ -182,7 +184,7 @@ Reference< chart2::XChartType > NetChartTypeTemplate::getChartTypeForIndex( sal_
return xResult;
}
Reference< chart2::XChartType > SAL_CALL NetChartTypeTemplate::getChartTypeForNewSeries(
Reference< chart2::XChartType > NetChartTypeTemplate::getChartTypeForNewSeries(
const uno::Sequence< Reference< chart2::XChartType > >& aFormerlyUsedChartTypes )
{
Reference< chart2::XChartType > xResult( getChartTypeForIndex( 0 ) );
@@ -38,13 +38,13 @@ public:
virtual ~NetChartTypeTemplate() override;
protected:
// ____ XChartTypeTemplate ____
virtual sal_Bool SAL_CALL matchesTemplate(
// ____ ChartTypeTemplate ____
virtual bool matchesTemplate(
const css::uno::Reference< css::chart2::XDiagram >& xDiagram,
sal_Bool bAdaptProperties ) override;
virtual css::uno::Reference< css::chart2::XChartType > SAL_CALL
bool bAdaptProperties ) override;
virtual css::uno::Reference< css::chart2::XChartType >
getChartTypeForNewSeries( const css::uno::Sequence< css::uno::Reference< css::chart2::XChartType > >& aFormerlyUsedChartTypes ) override;
virtual void SAL_CALL applyStyle(
virtual void applyStyle(
const css::uno::Reference< css::chart2::XDataSeries >& xSeries,
::sal_Int32 nChartTypeGroupIndex,
::sal_Int32 nSeriesIndex,
@@ -31,6 +31,7 @@
#include <com/sun/star/chart2/XChartTypeContainer.hpp>
#include <com/sun/star/chart2/XDataSeriesContainer.hpp>
#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
#include <com/sun/star/chart2/XDiagram.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <officecfg/Office/Compatibility.hxx>
@@ -314,9 +315,9 @@ void PieChartTypeTemplate::createChartTypes(
}
// ____ XChartTypeTemplate ____
sal_Bool SAL_CALL PieChartTypeTemplate::matchesTemplate(
bool PieChartTypeTemplate::matchesTemplate(
const uno::Reference< chart2::XDiagram >& xDiagram,
sal_Bool bAdaptProperties )
bool bAdaptProperties )
{
bool bResult = ChartTypeTemplate::matchesTemplate( xDiagram, bAdaptProperties );
@@ -430,7 +431,7 @@ Reference< chart2::XChartType > PieChartTypeTemplate::getChartTypeForIndex( sal_
return xResult;
}
Reference< chart2::XChartType > SAL_CALL PieChartTypeTemplate::getChartTypeForNewSeries(
Reference< chart2::XChartType > PieChartTypeTemplate::getChartTypeForNewSeries(
const uno::Sequence< Reference< chart2::XChartType > >& aFormerlyUsedChartTypes )
{
Reference< chart2::XChartType > xResult;
@@ -458,7 +459,7 @@ Reference< chart2::XChartType > SAL_CALL PieChartTypeTemplate::getChartTypeForNe
return xResult;
}
void SAL_CALL PieChartTypeTemplate::applyStyle(
void PieChartTypeTemplate::applyStyle(
const Reference< chart2::XDataSeries >& xSeries,
::sal_Int32 nChartTypeIndex,
::sal_Int32 nSeriesIndex,
@@ -553,7 +554,7 @@ void SAL_CALL PieChartTypeTemplate::applyStyle(
}
}
void SAL_CALL PieChartTypeTemplate::resetStyles( const Reference< chart2::XDiagram >& xDiagram )
void PieChartTypeTemplate::resetStyles( const Reference< chart2::XDiagram >& xDiagram )
{
// reset axes and grids
Reference< chart2::XCoordinateSystemContainer > xCooSysCnt( xDiagram, uno::UNO_QUERY );
@@ -57,18 +57,18 @@ protected:
getPropertySetInfo() override;
// ____ XChartTypeTemplate ____
virtual sal_Bool SAL_CALL matchesTemplate(
virtual bool matchesTemplate(
const css::uno::Reference< css::chart2::XDiagram >& xDiagram,
sal_Bool bAdaptProperties ) override;
virtual css::uno::Reference< css::chart2::XChartType > SAL_CALL
bool bAdaptProperties ) override;
virtual css::uno::Reference< css::chart2::XChartType >
getChartTypeForNewSeries( const css::uno::Sequence<
css::uno::Reference< css::chart2::XChartType > >& aFormerlyUsedChartTypes ) override;
virtual void SAL_CALL applyStyle(
virtual void applyStyle(
const css::uno::Reference< css::chart2::XDataSeries >& xSeries,
::sal_Int32 nChartTypeGroupIndex,
::sal_Int32 nSeriesIndex,
::sal_Int32 nSeriesCount ) override;
virtual void SAL_CALL resetStyles(
virtual void resetStyles(
const css::uno::Reference< css::chart2::XDiagram >& xDiagram ) override;
// ____ ChartTypeTemplate ____
@@ -29,6 +29,7 @@
#include <com/sun/star/chart2/CurveStyle.hpp>
#include <com/sun/star/chart2/SymbolStyle.hpp>
#include <com/sun/star/chart2/Symbol.hpp>
#include <com/sun/star/chart2/XChartType.hpp>
#include <com/sun/star/drawing/LineStyle.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
@@ -197,7 +198,7 @@ StackMode ScatterChartTypeTemplate::getStackMode( sal_Int32 /* nChartTypeIndex *
return StackMode::NONE;
}
void SAL_CALL ScatterChartTypeTemplate::applyStyle(
void ScatterChartTypeTemplate::applyStyle(
const Reference< chart2::XDataSeries >& xSeries,
::sal_Int32 nChartTypeIndex,
::sal_Int32 nSeriesIndex,
@@ -221,15 +222,15 @@ void SAL_CALL ScatterChartTypeTemplate::applyStyle(
}
}
// ____ XChartTypeTemplate ____
sal_Bool SAL_CALL ScatterChartTypeTemplate::supportsCategories()
// ____ ChartTypeTemplate ____
bool ScatterChartTypeTemplate::supportsCategories()
{
return false;
}
sal_Bool SAL_CALL ScatterChartTypeTemplate::matchesTemplate(
bool ScatterChartTypeTemplate::matchesTemplate(
const Reference< chart2::XDiagram >& xDiagram,
sal_Bool bAdaptProperties )
bool bAdaptProperties )
{
bool bResult = ChartTypeTemplate::matchesTemplate( xDiagram, bAdaptProperties );
@@ -343,7 +344,7 @@ Reference< chart2::XChartType > ScatterChartTypeTemplate::getChartTypeForIndex(
return xResult;
}
Reference< chart2::XChartType > SAL_CALL ScatterChartTypeTemplate::getChartTypeForNewSeries(
Reference< chart2::XChartType > ScatterChartTypeTemplate::getChartTypeForNewSeries(
const uno::Sequence< Reference< chart2::XChartType > >& aFormerlyUsedChartTypes )
{
Reference< chart2::XChartType > xResult;
@@ -376,7 +377,7 @@ Reference< chart2::XChartType > SAL_CALL ScatterChartTypeTemplate::getChartTypeF
return xResult;
}
Reference< chart2::XDataInterpreter > SAL_CALL ScatterChartTypeTemplate::getDataInterpreter()
Reference< chart2::XDataInterpreter > ScatterChartTypeTemplate::getDataInterpreter()
{
if( ! m_xDataInterpreter.is())
m_xDataInterpreter.set( new XYDataInterpreter );
@@ -55,15 +55,15 @@ protected:
getPropertySetInfo() override;
// ____ XChartTypeTemplate ____
virtual sal_Bool SAL_CALL supportsCategories() override;
virtual sal_Bool SAL_CALL matchesTemplate(
virtual bool supportsCategories() override;
virtual bool matchesTemplate(
const css::uno::Reference< css::chart2::XDiagram >& xDiagram,
sal_Bool bAdaptProperties ) override;
virtual css::uno::Reference< css::chart2::XChartType > SAL_CALL
bool bAdaptProperties ) override;
virtual css::uno::Reference< css::chart2::XChartType >
getChartTypeForNewSeries( const css::uno::Sequence<
css::uno::Reference< css::chart2::XChartType > >& aFormerlyUsedChartTypes ) override;
virtual css::uno::Reference< css::chart2::XDataInterpreter > SAL_CALL getDataInterpreter() override;
virtual void SAL_CALL applyStyle(
virtual css::uno::Reference< css::chart2::XDataInterpreter > getDataInterpreter() override;
virtual void applyStyle(
const css::uno::Reference< css::chart2::XDataSeries >& xSeries,
::sal_Int32 nChartTypeGroupIndex,
::sal_Int32 nSeriesIndex,
@@ -186,7 +186,7 @@ sal_Int32 StockChartTypeTemplate::getAxisCountByDimension( sal_Int32 nDimension
return bHasVolume ? 2 : 1;
}
void SAL_CALL StockChartTypeTemplate::applyStyle(
void StockChartTypeTemplate::applyStyle(
const Reference< chart2::XDataSeries >& xSeries,
::sal_Int32 nChartTypeIndex,
::sal_Int32 nSeriesIndex,
@@ -230,7 +230,7 @@ void SAL_CALL StockChartTypeTemplate::applyStyle(
}
}
void SAL_CALL StockChartTypeTemplate::resetStyles(
void StockChartTypeTemplate::resetStyles(
const Reference< chart2::XDiagram >& xDiagram )
{
ChartTypeTemplate::resetStyles( xDiagram );
@@ -364,10 +364,10 @@ void StockChartTypeTemplate::createChartTypes(
}
}
// ____ XChartTypeTemplate ____
sal_Bool SAL_CALL StockChartTypeTemplate::matchesTemplate(
// ____ ChartTypeTemplate ____
bool StockChartTypeTemplate::matchesTemplate(
const uno::Reference< XDiagram >& xDiagram,
sal_Bool /* bAdaptProperties */ )
bool /* bAdaptProperties */ )
{
bool bResult = false;
@@ -439,7 +439,7 @@ sal_Bool SAL_CALL StockChartTypeTemplate::matchesTemplate(
return bResult;
}
Reference< XChartType > SAL_CALL StockChartTypeTemplate::getChartTypeForNewSeries(
Reference< XChartType > StockChartTypeTemplate::getChartTypeForNewSeries(
const uno::Sequence< Reference< chart2::XChartType > >& aFormerlyUsedChartTypes )
{
Reference< chart2::XChartType > xResult;
@@ -460,7 +460,7 @@ Reference< XChartType > SAL_CALL StockChartTypeTemplate::getChartTypeForNewSerie
return xResult;
}
Reference< XDataInterpreter > SAL_CALL StockChartTypeTemplate::getDataInterpreter()
Reference< XDataInterpreter > StockChartTypeTemplate::getDataInterpreter()
{
if( ! m_xDataInterpreter.is())
m_xDataInterpreter.set( new StockDataInterpreter( m_eStockVariant ) );
@@ -70,20 +70,20 @@ protected:
getPropertySetInfo() override;
// ____ XChartTypeTemplate ____
virtual sal_Bool SAL_CALL matchesTemplate(
virtual bool matchesTemplate(
const css::uno::Reference< css::chart2::XDiagram >& xDiagram,
sal_Bool bAdaptProperties ) override;
virtual css::uno::Reference< css::chart2::XChartType > SAL_CALL
bool bAdaptProperties ) override;
virtual css::uno::Reference< css::chart2::XChartType >
getChartTypeForNewSeries( const css::uno::Sequence<
css::uno::Reference<
css::chart2::XChartType > >& aFormerlyUsedChartTypes ) override;
virtual css::uno::Reference< css::chart2::XDataInterpreter > SAL_CALL getDataInterpreter() override;
virtual void SAL_CALL applyStyle(
virtual css::uno::Reference< css::chart2::XDataInterpreter > getDataInterpreter() override;
virtual void applyStyle(
const css::uno::Reference< css::chart2::XDataSeries >& xSeries,
::sal_Int32 nChartTypeIndex,
::sal_Int32 nSeriesIndex,
::sal_Int32 nSeriesCount ) override;
virtual void SAL_CALL resetStyles(
virtual void resetStyles(
const css::uno::Reference< css::chart2::XDiagram >& xDiagram ) override;
// ChartTypeTemplate
+3 -1
View File
@@ -24,9 +24,11 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/chart/DataLabelPlacement.hpp>
#include <com/sun/star/chart/MissingValueTreatment.hpp>
#include <com/sun/star/chart2/AxisType.hpp>
#include <com/sun/star/chart2/StackingDirection.hpp>
#include <com/sun/star/chart/MissingValueTreatment.hpp>
#include <com/sun/star/chart2/XChartType.hpp>
#include <com/sun/star/chart2/XDataSeries.hpp>
#include <tools/diagnose_ex.h>
using namespace ::com::sun::star;
+1
View File
@@ -30,6 +30,7 @@
#include <unonames.hxx>
#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/chart2/XDataSeries.hpp>
#include <com/sun/star/chart2/data/XDataSource.hpp>
#include <com/sun/star/chart2/data/XLabeledDataSequence.hpp>
-1
View File
@@ -40,7 +40,6 @@
#include <com/sun/star/chart2/XAnyDescriptionAccess.hpp>
#include <com/sun/star/chart2/XTitled.hpp>
#include <com/sun/star/chart2/XChartTypeContainer.hpp>
#include <com/sun/star/chart2/XChartTypeTemplate.hpp>
#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
#include <com/sun/star/chart2/XDataSeriesContainer.hpp>
#include <com/sun/star/chart2/AxisType.hpp>
@@ -30,6 +30,7 @@
#include <BaseCoordinateSystem.hxx>
#include <com/sun/star/chart2/AxisType.hpp>
#include <com/sun/star/chart2/XDataSeries.hpp>
#include <o3tl/safeint.hxx>
#include <rtl/ustrbuf.hxx>
#include <tools/diagnose_ex.h>
@@ -34,6 +34,7 @@
#include <BaseCoordinateSystem.hxx>
#include <com/sun/star/chart2/data/XDataSequence.hpp>
#include <com/sun/star/chart2/XDataSeries.hpp>
#include <com/sun/star/chart/ChartDataRowSource.hpp>
#include <cppuhelper/supportsservice.hxx>
#include <comphelper/sequenceashashmap.hxx>
@@ -36,6 +36,8 @@
#include <com/sun/star/chart2/AxisType.hpp>
#include <com/sun/star/chart2/XRegressionCurveCalculator.hpp>
#include <com/sun/star/chart2/XRegressionCurveContainer.hpp>
#include <com/sun/star/chart2/XDataSeries.hpp>
#include <com/sun/star/chart2/data/XDataSource.hpp>
#include <tools/diagnose_ex.h>
#include <comphelper/property.hxx>
+1
View File
@@ -28,6 +28,7 @@
#include <editeng/unoprnms.hxx>
#include <com/sun/star/beans/XPropertyState.hpp>
#include <com/sun/star/chart2/XDiagram.hpp>
#include <com/sun/star/chart2/XDataSeries.hpp>
#include <com/sun/star/drawing/LineStyle.hpp>
#include <com/sun/star/drawing/ShadeMode.hpp>
#include <tools/diagnose_ex.h>
@@ -61,6 +61,7 @@
#include <com/sun/star/chart/TimeUnit.hpp>
#include <com/sun/star/chart2/MovingAverageType.hpp>
#include <com/sun/star/chart2/XDataPointCustomLabelField.hpp>
#include <com/sun/star/chart2/XDataSeries.hpp>
#include <com/sun/star/chart2/XRegressionCurveContainer.hpp>
#include <com/sun/star/container/XChild.hpp>
#include <com/sun/star/chart2/RelativePosition.hpp>
+1
View File
@@ -33,6 +33,7 @@
#include <svx/scene3d.hxx>
#include <svx/e3dsceneupdater.hxx>
#include <tools/diagnose_ex.h>
#include <com/sun/star/chart2/XDiagram.hpp>
namespace chart
{
-2
View File
@@ -642,7 +642,6 @@ $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,com/sun/star/chart2,\
ChartDocumentWrapper \
ChartType \
ChartTypeManager \
ChartTypeTemplate\
CoordinateSystem \
CoordinateSystemType \
DataPoint \
@@ -2031,7 +2030,6 @@ $(eval $(call gb_UnoApi_add_idlfiles,offapi,com/sun/star/chart2,\
XChartType \
XChartTypeContainer \
XChartTypeManager \
XChartTypeTemplate \
XColorScheme \
XCoordinateSystem \
XCoordinateSystemContainer \
@@ -1,46 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef com_sun_star_chart2_ChartTypeTemplate_idl
#define com_sun_star_chart2_ChartTypeTemplate_idl
#include <com/sun/star/chart2/XChartTypeTemplate.idl>
module com
{
module sun
{
module star
{
module chart2
{
service ChartTypeTemplate
{
interface ::com::sun::star::chart2::XChartTypeTemplate;
};
} ; // chart2
} ; // com
} ; // sun
} ; // star
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
@@ -1,215 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef com_sun_star_chart2_XChartTypeTemplate_idl
#define com_sun_star_chart2_XChartTypeTemplate_idl
#include <com/sun/star/uno/XInterface.idl>
#include <com/sun/star/beans/PropertyValue.idl>
#include <com/sun/star/lang/IllegalArgumentException.idl>
#include <com/sun/star/chart2/XDiagram.idl>
#include <com/sun/star/chart2/data/XDataSource.idl>
#include <com/sun/star/chart2/XChartType.idl>
#include <com/sun/star/chart2/XDataInterpreter.idl>
module com
{
module sun
{
module star
{
module chart2
{
interface XChartTypeTemplate : ::com::sun::star::uno::XInterface
{
/** Creates a new diagram based upon the given data .
@param xDataSource
This data source will be interpreted in a chart-type
specific way and appropriate DataSeries will
be created which serve as input for the new diagram.
@param aArguments
Arguments that tell the template how to slice the given
range. The properties should be defined in a separate
service.
<p>For standard parameters that may be used, see the
service StandardDiagramCreationParameters.
</p>
@return
The new diagram which represents this
ChartTypeTemplate.
*/
XDiagram createDiagramByDataSource(
[in] com::sun::star::chart2::data::XDataSource xDataSource,
[in] sequence< com::sun::star::beans::PropertyValue > aArguments );
/** @return
`TRUE` if the template does support categories
*/
boolean supportsCategories();
/** Analyses the given diagram and reinterprets its
DataSeries and Categories and
creates a new diagram based on these series.
<p>Note, that if matchesTemplate() returns
`TRUE` for the given XDiagram, the latter should
not be changed.</p>
@param xDiagram
The diagram given will be modified such that it represents
this ChartTypeTemplate.
*/
void changeDiagram( [in] XDiagram xDiagram );
/** Changes the given diagram <code>xDiagram</code> by using the
new data given in <code>xDataSource</code>.
<p>Note that the data is interpreted in a way that fits this
template, but not necessarily the chart-types of the diagram.
This method should only be called if the data-format of the
diagram is compatible with the data-format of this
template.</p>
<p>Ideally a matchesTemplate() call for the
given diagram should return `TRUE` before this method is
called.</p>
@param xDiagram
The diagram to be changed.
@param xDataSource
This data source will be interpreted in a chart-type
specific way and the DataSeries found in
<code>xDiagram</code> will be adapted to the new data.
Missing data series will be created and unused ones will
be deleted in <code>xDiagram</code>.
@param aArguments
Arguments that tell the template how to slice the given
range. The properties should be defined in a separate
service.
<p>For standard parameters that may be used, see the
service StandardDiagramCreationParameters.
</p>
*/
void changeDiagramData(
[in] XDiagram xDiagram,
[in] com::sun::star::chart2::data::XDataSource xDataSource,
[in] sequence< com::sun::star::beans::PropertyValue > aArguments );
/** States whether the given diagram could have been created by
the template.
<p>The template will parse the DataSeriesTree of
the diagram to determine if the structure matches the one
which would have been created by
createDiagramByDataSource().</p>
<p>For analysis all parts of the diagram may be used,
e.g. also properties set at the data series (like symbols)./p>
@param xDiagram
The diagram to be analyzed.
@param bAdaptProperties
If `TRUE` the properties of the template are set, such
that the template matches more accurately. E.g. for a
line-chart with symbols the property "Symbol" would be set
to `TRUE`. If this parameter is `FALSE` the template
itself stays unmodified.
@return
`TRUE` if the diagram given is structurally identical to
a diagram that was created using
createDiagramByDataSource() or
changeDiagram(). If `FALSE` is returned
the template stays unmodified even if
<code>bAdaptProperties</code> is `TRUE`.
*/
boolean matchesTemplate( [in] XDiagram xDiagram,
[in] boolean bAdaptProperties );
/** Provides a chart type object that can be used to create new
series.
@param aFormerlyUsedChartTypes
The list can be used to copy some aspects from old chart types during the creation of a new chart type.
The list might be empty.
*/
XChartType getChartTypeForNewSeries( [in] sequence< XChartType > aFormerlyUsedChartTypes );
XDataInterpreter getDataInterpreter();
/** Applies a chart-type specific style (e.g. symbols) to all series in the
sequence aSeries.
@param xSeries
a single data series to which a style will be applied
@param nChartTypeGroupIndex
Denotes in which chart-type group the series lies, such this method
can apply different styles for different chart-type groups
@param nSeriesIndex
The index of the series inside the current chart-type group.
nSeriesIndex does not uniquely identify a data series alone, but
only together with nChartTypeGroupIndex
@param nSeriesCount
The number of series in the current chart-type group.
@todo In the future, this should only change the "Style" property and no
hard attributes.
*/
void applyStyle( [in] XDataSeries xSeries,
[in] long nChartTypeGroupIndex,
[in] long nSeriesIndex,
[in] long nSeriesCount );
/** Resets all styles that were changed from the default at any
object in the chart and have not been later modified.
<p>In createDiagramByDataSource() or
changeDiagram() a template might e.g. change
the page background color or the line style of all data
series. This method should reset all objects that still have
the changed settings to the default.</p>
<p>If for example the template changed the
com::sun::star::drawing::LineStyle of all
series to NONE, this method should reset all series with
LineStyle NONE back to SOLID. If a series has a style DASH,
it must not be changed.</p>
*/
void resetStyles( [in] XDiagram xDiagram );
};
} ; // chart2
} ; // com
} ; // sun
} ; // star
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */