24#include <servicenames.hxx>
59#include <com/sun/star/drawing/ShapeCollection.hpp>
60#include <com/sun/star/beans/PropertyAttribute.hpp>
61#include <com/sun/star/lang/DisposedException.hpp>
62#include <com/sun/star/lang/XInitialization.hpp>
63#include <com/sun/star/util/XRefreshable.hpp>
72using ::com::sun::star::uno::Any;
73using ::com::sun::star::uno::UNO_QUERY_THROW;
74using ::com::sun::star::uno::Reference;
75using ::com::sun::star::uno::Sequence;
76using ::com::sun::star::beans::Property;
82 SERVICE_NAME_AREA_DIAGRAM = 0,
83 SERVICE_NAME_BAR_DIAGRAM,
84 SERVICE_NAME_DONUT_DIAGRAM,
85 SERVICE_NAME_LINE_DIAGRAM,
86 SERVICE_NAME_NET_DIAGRAM,
87 SERVICE_NAME_FILLED_NET_DIAGRAM,
88 SERVICE_NAME_PIE_DIAGRAM,
89 SERVICE_NAME_STOCK_DIAGRAM,
90 SERVICE_NAME_XY_DIAGRAM,
91 SERVICE_NAME_BUBBLE_DIAGRAM,
93 SERVICE_NAME_DASH_TABLE,
94 SERVICE_NAME_GRADIENT_TABLE,
95 SERVICE_NAME_HATCH_TABLE,
96 SERVICE_NAME_BITMAP_TABLE,
97 SERVICE_NAME_TRANSP_GRADIENT_TABLE,
98 SERVICE_NAME_MARKER_TABLE,
100 SERVICE_NAME_NAMESPACE_MAP,
101 SERVICE_NAME_EXPORT_GRAPHIC_STORAGE_RESOLVER,
102 SERVICE_NAME_IMPORT_GRAPHIC_STORAGE_RESOLVER
105typedef std::map< OUString, enum eServiceType > tServiceNameMap;
107tServiceNameMap & lcl_getStaticServiceNameMap()
109 static tServiceNameMap aServiceNameMap {
110 {
"com.sun.star.chart.AreaDiagram", SERVICE_NAME_AREA_DIAGRAM},
111 {
"com.sun.star.chart.BarDiagram", SERVICE_NAME_BAR_DIAGRAM},
112 {
"com.sun.star.chart.DonutDiagram", SERVICE_NAME_DONUT_DIAGRAM},
113 {
"com.sun.star.chart.LineDiagram", SERVICE_NAME_LINE_DIAGRAM},
114 {
"com.sun.star.chart.NetDiagram", SERVICE_NAME_NET_DIAGRAM},
115 {
"com.sun.star.chart.FilledNetDiagram", SERVICE_NAME_FILLED_NET_DIAGRAM},
116 {
"com.sun.star.chart.PieDiagram", SERVICE_NAME_PIE_DIAGRAM},
117 {
"com.sun.star.chart.StockDiagram", SERVICE_NAME_STOCK_DIAGRAM},
118 {
"com.sun.star.chart.XYDiagram", SERVICE_NAME_XY_DIAGRAM},
119 {
"com.sun.star.chart.BubbleDiagram", SERVICE_NAME_BUBBLE_DIAGRAM},
121 {
"com.sun.star.drawing.DashTable", SERVICE_NAME_DASH_TABLE},
122 {
"com.sun.star.drawing.GradientTable", SERVICE_NAME_GRADIENT_TABLE},
123 {
"com.sun.star.drawing.HatchTable", SERVICE_NAME_HATCH_TABLE},
124 {
"com.sun.star.drawing.BitmapTable", SERVICE_NAME_BITMAP_TABLE},
125 {
"com.sun.star.drawing.TransparencyGradientTable", SERVICE_NAME_TRANSP_GRADIENT_TABLE},
126 {
"com.sun.star.drawing.MarkerTable", SERVICE_NAME_MARKER_TABLE},
128 {
"com.sun.star.xml.NamespaceMap", SERVICE_NAME_NAMESPACE_MAP},
129 {
"com.sun.star.document.ExportGraphicStorageHandler", SERVICE_NAME_EXPORT_GRAPHIC_STORAGE_RESOLVER},
130 {
"com.sun.star.document.ImportGraphicStorageHandler", SERVICE_NAME_IMPORT_GRAPHIC_STORAGE_RESOLVER}
133 return aServiceNameMap;
138 PROP_DOCUMENT_HAS_MAIN_TITLE,
139 PROP_DOCUMENT_HAS_SUB_TITLE,
140 PROP_DOCUMENT_HAS_LEGEND,
141 PROP_DOCUMENT_LABELS_IN_FIRST_ROW,
142 PROP_DOCUMENT_LABELS_IN_FIRST_COLUMN,
144 PROP_DOCUMENT_BASEDIAGRAM,
145 PROP_DOCUMENT_ADDITIONAL_SHAPES,
146 PROP_DOCUMENT_UPDATE_ADDIN,
147 PROP_DOCUMENT_NULL_DATE,
148 PROP_DOCUMENT_ENABLE_COMPLEX_CHARTTYPES,
149 PROP_DOCUMENT_ENABLE_DATATABLE_DIALOG
152void lcl_AddPropertiesToVector(
153 std::vector< Property > & rOutProperties )
155 rOutProperties.emplace_back(
"HasMainTitle",
156 PROP_DOCUMENT_HAS_MAIN_TITLE,
159 beans::PropertyAttribute::MAYBEDEFAULT );
160 rOutProperties.emplace_back(
"HasSubTitle",
161 PROP_DOCUMENT_HAS_SUB_TITLE,
164 beans::PropertyAttribute::MAYBEDEFAULT );
165 rOutProperties.emplace_back(
"HasLegend",
166 PROP_DOCUMENT_HAS_LEGEND,
169 beans::PropertyAttribute::MAYBEDEFAULT );
172 rOutProperties.emplace_back(
"DataSourceLabelsInFirstRow",
173 PROP_DOCUMENT_LABELS_IN_FIRST_ROW,
175 beans::PropertyAttribute::BOUND
176 | beans::PropertyAttribute::MAYBEDEFAULT );
177 rOutProperties.emplace_back(
"DataSourceLabelsInFirstColumn",
178 PROP_DOCUMENT_LABELS_IN_FIRST_COLUMN,
181 beans::PropertyAttribute::MAYBEDEFAULT );
184 rOutProperties.emplace_back(
"AddIn",
187 beans::PropertyAttribute::BOUND
188 | beans::PropertyAttribute::MAYBEVOID );
189 rOutProperties.emplace_back(
"BaseDiagram",
190 PROP_DOCUMENT_BASEDIAGRAM,
192 beans::PropertyAttribute::BOUND
193 | beans::PropertyAttribute::MAYBEVOID );
194 rOutProperties.emplace_back(
"AdditionalShapes",
195 PROP_DOCUMENT_ADDITIONAL_SHAPES,
197 beans::PropertyAttribute::BOUND
198 | beans::PropertyAttribute::MAYBEVOID
199 | beans::PropertyAttribute::READONLY );
200 rOutProperties.emplace_back(
"RefreshAddInAllowed",
201 PROP_DOCUMENT_UPDATE_ADDIN,
204 beans::PropertyAttribute::TRANSIENT );
207 rOutProperties.emplace_back(
"NullDate",
208 PROP_DOCUMENT_NULL_DATE,
210 beans::PropertyAttribute::MAYBEVOID );
212 rOutProperties.emplace_back(
"EnableComplexChartTypes",
213 PROP_DOCUMENT_ENABLE_COMPLEX_CHARTTYPES,
216 beans::PropertyAttribute::MAYBEDEFAULT );
217 rOutProperties.emplace_back(
"EnableDataTableDialog",
218 PROP_DOCUMENT_ENABLE_DATATABLE_DIALOG,
221 beans::PropertyAttribute::MAYBEDEFAULT );
224const Sequence< Property > & StaticChartDocumentWrapperPropertyArray()
226 static Sequence< Property > aPropSeq = []()
229 lcl_AddPropertiesToVector( aProperties );
247class WrappedDataSourceLabelsInFirstRowProperty :
public WrappedProperty
250 explicit WrappedDataSourceLabelsInFirstRowProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact);
252 virtual void setPropertyValue(
const css::uno::Any& rOuterValue,
const css::uno::Reference< css::beans::XPropertySet >& xInnerPropertySet )
const override;
254 virtual css::uno::Any
getPropertyValue(
const css::uno::Reference< css::beans::XPropertySet >& xInnerPropertySet )
const override;
256 virtual css::uno::Any getPropertyDefault(
const css::uno::Reference< css::beans::XPropertyState >& xInnerPropertyState )
const override;
265WrappedDataSourceLabelsInFirstRowProperty::WrappedDataSourceLabelsInFirstRowProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact)
266 : WrappedProperty(
"DataSourceLabelsInFirstRow",OUString())
269 m_aOuterValue = WrappedDataSourceLabelsInFirstRowProperty::getPropertyDefault(
nullptr );
274 bool bLabelsInFirstRow =
true;
275 if( ! (rOuterValue >>= bLabelsInFirstRow) )
276 throw lang::IllegalArgumentException(
"Property DataSourceLabelsInFirstRow requires value of type boolean",
nullptr, 0 );
279 bool bNewValue = bLabelsInFirstRow;
281 OUString aRangeString;
282 bool bUseColumns =
true;
283 bool bFirstCellAsLabel =
true;
284 bool bHasCategories =
true;
285 uno::Sequence< sal_Int32 > aSequenceMapping;
287 if( !DataSourceHelper::detectRangeSegmentation(
289 , bFirstCellAsLabel, bHasCategories ) )
292 if( bUseColumns && bNewValue != bFirstCellAsLabel )
294 DataSourceHelper::setRangeSegmentation(
297 else if( !bUseColumns && bNewValue != bHasCategories )
299 DataSourceHelper::setRangeSegmentation(
300 m_spChart2ModelContact->getDocumentModel(), aSequenceMapping, bUseColumns , bFirstCellAsLabel, bNewValue );
304Any WrappedDataSourceLabelsInFirstRowProperty::getPropertyValue(
const Reference< beans::XPropertySet >& )
const
306 OUString aRangeString;
307 bool bUseColumns =
true;
308 bool bFirstCellAsLabel =
true;
309 bool bHasCategories =
true;
310 uno::Sequence< sal_Int32 > aSequenceMapping;
312 if( DataSourceHelper::detectRangeSegmentation(
314 , bFirstCellAsLabel, bHasCategories ) )
316 bool bLabelsInFirstRow =
true;
318 bLabelsInFirstRow = bFirstCellAsLabel;
320 bLabelsInFirstRow = bHasCategories;
327Any WrappedDataSourceLabelsInFirstRowProperty::getPropertyDefault(
const Reference< beans::XPropertyState >& )
const
337class WrappedDataSourceLabelsInFirstColumnProperty :
public WrappedProperty
340 explicit WrappedDataSourceLabelsInFirstColumnProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact);
342 virtual void setPropertyValue(
const css::uno::Any& rOuterValue,
const css::uno::Reference< css::beans::XPropertySet >& xInnerPropertySet )
const override;
344 virtual css::uno::Any
getPropertyValue(
const css::uno::Reference< css::beans::XPropertySet >& xInnerPropertySet )
const override;
346 virtual css::uno::Any getPropertyDefault(
const css::uno::Reference< css::beans::XPropertyState >& xInnerPropertyState )
const override;
355WrappedDataSourceLabelsInFirstColumnProperty::WrappedDataSourceLabelsInFirstColumnProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact)
356 : WrappedProperty(
"DataSourceLabelsInFirstColumn",OUString())
359 m_aOuterValue = WrappedDataSourceLabelsInFirstColumnProperty::getPropertyDefault(
nullptr );
364 bool bLabelsInFirstRow =
true;
365 if( ! (rOuterValue >>= bLabelsInFirstRow) )
366 throw lang::IllegalArgumentException(
"Property DataSourceLabelsInFirstRow requires value of type boolean",
nullptr, 0 );
369 bool bNewValue = bLabelsInFirstRow;
371 OUString aRangeString;
372 bool bUseColumns =
true;
373 bool bFirstCellAsLabel =
true;
374 bool bHasCategories =
true;
375 uno::Sequence< sal_Int32 > aSequenceMapping;
377 if( !DataSourceHelper::detectRangeSegmentation(
379 , bFirstCellAsLabel, bHasCategories ) )
382 if( bUseColumns && bNewValue != bHasCategories )
384 DataSourceHelper::setRangeSegmentation(
385 m_spChart2ModelContact->getDocumentModel(), aSequenceMapping, bUseColumns, bFirstCellAsLabel, bNewValue );
387 else if( !bUseColumns && bNewValue != bFirstCellAsLabel )
389 DataSourceHelper::setRangeSegmentation(
394Any WrappedDataSourceLabelsInFirstColumnProperty::getPropertyValue(
const Reference< beans::XPropertySet >& )
const
396 OUString aRangeString;
397 bool bUseColumns =
true;
398 bool bFirstCellAsLabel =
true;
399 bool bHasCategories =
true;
400 uno::Sequence< sal_Int32 > aSequenceMapping;
402 if( DataSourceHelper::detectRangeSegmentation(
404 , bFirstCellAsLabel, bHasCategories ) )
406 bool bLabelsInFirstColumn =
true;
408 bLabelsInFirstColumn = bHasCategories;
410 bLabelsInFirstColumn = bFirstCellAsLabel;
417Any WrappedDataSourceLabelsInFirstColumnProperty::getPropertyDefault(
const Reference< beans::XPropertyState >& )
const
427class WrappedHasLegendProperty :
public WrappedProperty
430 explicit WrappedHasLegendProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact);
432 virtual void setPropertyValue(
const css::uno::Any& rOuterValue,
const css::uno::Reference< css::beans::XPropertySet >& xInnerPropertySet )
const override;
434 virtual css::uno::Any
getPropertyValue(
const css::uno::Reference< css::beans::XPropertySet >& xInnerPropertySet )
const override;
436 virtual css::uno::Any getPropertyDefault(
const css::uno::Reference< css::beans::XPropertyState >& xInnerPropertyState )
const override;
444WrappedHasLegendProperty::WrappedHasLegendProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact)
445 : WrappedProperty(
"HasLegend",OUString())
452 bool bNewValue =
true;
453 if( ! (rOuterValue >>= bNewValue) )
454 throw lang::IllegalArgumentException(
"Property HasLegend requires value of type boolean",
nullptr, 0 );
461 bool bOldValue =
true;
462 Any aAOld = xLegend->getPropertyValue(
"Show");
464 if( bOldValue != bNewValue )
465 xLegend->setPropertyValue(
"Show",
uno::Any( bNewValue ));
468 catch (
const uno::Exception&)
474Any WrappedHasLegendProperty::getPropertyValue(
const Reference< beans::XPropertySet >& )
const
482 aRet = xLegend->getPropertyValue(
"Show");
486 catch (
const uno::Exception&)
493Any WrappedHasLegendProperty::getPropertyDefault(
const Reference< beans::XPropertyState >& )
const
503class WrappedHasMainTitleProperty :
public WrappedProperty
506 explicit WrappedHasMainTitleProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact);
508 virtual void setPropertyValue(
const css::uno::Any& rOuterValue,
const css::uno::Reference< css::beans::XPropertySet >& xInnerPropertySet )
const override;
510 virtual css::uno::Any
getPropertyValue(
const css::uno::Reference< css::beans::XPropertySet >& xInnerPropertySet )
const override;
512 virtual css::uno::Any getPropertyDefault(
const css::uno::Reference< css::beans::XPropertyState >& xInnerPropertyState )
const override;
520WrappedHasMainTitleProperty::WrappedHasMainTitleProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact)
521 : WrappedProperty(
"HasMainTitle",OUString())
528 bool bNewValue =
true;
529 if( ! (rOuterValue >>= bNewValue) )
530 throw lang::IllegalArgumentException(
"Property HasMainTitle requires value of type boolean",
nullptr, 0 );
539 catch (
const uno::Exception&)
545Any WrappedHasMainTitleProperty::getPropertyValue(
const Reference< beans::XPropertySet >& )
const
550 aRet <<= TitleHelper::getTitle( TitleHelper::MAIN_TITLE,
m_spChart2ModelContact->getDocumentModel() ).is();
552 catch (
const uno::Exception&)
559Any WrappedHasMainTitleProperty::getPropertyDefault(
const Reference< beans::XPropertyState >& )
const
569class WrappedHasSubTitleProperty :
public WrappedProperty
572 explicit WrappedHasSubTitleProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact);
574 virtual void setPropertyValue(
const css::uno::Any& rOuterValue,
const css::uno::Reference< css::beans::XPropertySet >& xInnerPropertySet )
const override;
576 virtual css::uno::Any
getPropertyValue(
const css::uno::Reference< css::beans::XPropertySet >& xInnerPropertySet )
const override;
578 virtual css::uno::Any getPropertyDefault(
const css::uno::Reference< css::beans::XPropertyState >& xInnerPropertyState )
const override;
586WrappedHasSubTitleProperty::WrappedHasSubTitleProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact)
587 : WrappedProperty(
"HasSubTitle",OUString())
594 bool bNewValue =
true;
595 if( ! (rOuterValue >>= bNewValue) )
596 throw lang::IllegalArgumentException(
"Property HasSubTitle requires value of type boolean",
nullptr, 0 );
605 catch (
const uno::Exception&)
611Any WrappedHasSubTitleProperty::getPropertyValue(
const Reference< beans::XPropertySet >& )
const
616 aRet <<= TitleHelper::getTitle( TitleHelper::SUB_TITLE,
m_spChart2ModelContact->getDocumentModel() ).is();
618 catch (
const uno::Exception&)
625Any WrappedHasSubTitleProperty::getPropertyDefault(
const Reference< beans::XPropertyState >& )
const
632ChartDocumentWrapper::ChartDocumentWrapper(
635 m_bUpdateAddIn( true ),
636 m_bIsDisposed( false )
705 catch (
const uno::Exception&)
721 else if( xDiagram.is() && xDiagram !=
m_xDiagram )
735 xChartDoc->setFirstDiagram( xNewDia );
739 catch (
const uno::Exception&)
773 return xModel->attachResource(
URL, Arguments );
797 xModel->connectController( Controller );
805 xModel->disconnectController( Controller );
812 xModel->lockControllers();
819 xModel->unlockControllers();
826 return xModel->hasControllersLocked();
834 return xModel->getCurrentController();
843 xModel->setCurrentController( Controller );
850 return xModel->getCurrentSelection();
875 clearWrappedPropertySet();
883 if( xFormerDelegator.is())
884 xFormerDelegator->dispose();
886 catch (
const lang::DisposedException&)
891 catch (
const uno::Exception &)
920 xInit->initialize(
aSeq );
924 catch (
const uno::RuntimeException&)
928 catch (
const uno::Exception&)
960 xInit->initialize(
aSeq );
975 if( !xDrawPage.is() )
982 std::vector< uno::Reference< drawing::XShape > > aShapeVector;
983 sal_Int32 nSubCount = xDrawPage->getCount();
985 for( sal_Int32 nS = 0; nS < nSubCount; nS++ )
987 if( xDrawPage->getByIndex( nS ) >>= xShape )
989 if( xShape.is() && xChartRoot!=xShape )
990 aShapeVector.push_back( xShape );
994 if( !aShapeVector.empty() )
997 xFoundShapes = drawing::ShapeCollection::create(
1000 OSL_ENSURE( xFoundShapes.is(),
"Couldn't create a shape collection!" );
1001 if( xFoundShapes.is())
1003 for (
auto const& shape : aShapeVector)
1004 xFoundShapes->add(shape);
1008 return xFoundShapes;
1015 xModel->addEventListener( xListener );
1022 xModel->removeEventListener( aListener );
1041 return xChartView->getDrawModelWrapper()->getShapeFactory();
1050 const OUString& aServiceSpecifier )
1055 if( !xChartDoc.is() )
1058 bool bServiceFound =
false;
1059 tServiceNameMap & rMap = lcl_getStaticServiceNameMap();
1061 tServiceNameMap::const_iterator aIt( rMap.find( aServiceSpecifier ));
1062 if( aIt != rMap.end())
1064 bool bCreateDiagram =
false;
1066 xChartDoc->getTypeManager();
1069 switch( (*aIt).second )
1071 case SERVICE_NAME_AREA_DIAGRAM:
1072 if( xChartTypeManager.is())
1075 xChartTypeManager->createTemplate(
"com.sun.star.chart2.template.Area");
1076 bCreateDiagram =
true;
1079 case SERVICE_NAME_BAR_DIAGRAM:
1080 if( xChartTypeManager.is())
1085 xChartTypeManager->createTemplate(
"com.sun.star.chart2.template.Column");
1086 bCreateDiagram =
true;
1089 case SERVICE_NAME_DONUT_DIAGRAM:
1090 if( xChartTypeManager.is())
1093 xChartTypeManager->createTemplate(
"com.sun.star.chart2.template.Donut");
1094 bCreateDiagram =
true;
1097 case SERVICE_NAME_LINE_DIAGRAM:
1098 if( xChartTypeManager.is())
1101 xChartTypeManager->createTemplate(
"com.sun.star.chart2.template.Line");
1102 bCreateDiagram =
true;
1105 case SERVICE_NAME_NET_DIAGRAM:
1106 if( xChartTypeManager.is())
1109 xChartTypeManager->createTemplate(
"com.sun.star.chart2.template.Net");
1110 bCreateDiagram =
true;
1113 case SERVICE_NAME_FILLED_NET_DIAGRAM:
1114 if( xChartTypeManager.is())
1117 xChartTypeManager->createTemplate(
"com.sun.star.chart2.template.FilledNet");
1118 bCreateDiagram =
true;
1121 case SERVICE_NAME_PIE_DIAGRAM:
1122 if( xChartTypeManager.is())
1125 xChartTypeManager->createTemplate(
"com.sun.star.chart2.template.Pie");
1126 bCreateDiagram =
true;
1129 case SERVICE_NAME_STOCK_DIAGRAM:
1130 if( xChartTypeManager.is())
1133 xChartTypeManager->createTemplate(
"com.sun.star.chart2.template.StockLowHighClose");
1134 bCreateDiagram =
true;
1137 case SERVICE_NAME_XY_DIAGRAM:
1138 if( xChartTypeManager.is())
1141 xChartTypeManager->createTemplate(
"com.sun.star.chart2.template.ScatterLineSymbol");
1142 bCreateDiagram =
true;
1146 case SERVICE_NAME_BUBBLE_DIAGRAM:
1147 if( xChartTypeManager.is())
1150 xChartTypeManager->createTemplate(
"com.sun.star.chart2.template.Bubble");
1151 bCreateDiagram =
true;
1155 case SERVICE_NAME_DASH_TABLE:
1156 case SERVICE_NAME_GRADIENT_TABLE:
1157 case SERVICE_NAME_HATCH_TABLE:
1158 case SERVICE_NAME_BITMAP_TABLE:
1159 case SERVICE_NAME_TRANSP_GRADIENT_TABLE:
1160 case SERVICE_NAME_MARKER_TABLE:
1161 xResult.set( xChartDoc->createInstance( aIt->first ), uno::UNO_QUERY );
1164 case SERVICE_NAME_NAMESPACE_MAP:
1166 case SERVICE_NAME_EXPORT_GRAPHIC_STORAGE_RESOLVER:
1168 case SERVICE_NAME_IMPORT_GRAPHIC_STORAGE_RESOLVER:
1172 if( bCreateDiagram && xTemplate.is() )
1185 xDiagram->getTemplate( xTemplateManager ));
1188 xTemplate->changeDiagram( xDiagram );
1191 xDiagram->setScheme( e3DScheme );
1197 xDia.set( xTemplate->createDiagramByDataSource(
1200 xChartDoc->setFirstDiagram( xDia );
1205 catch (
const uno::Exception&)
1211 bServiceFound =
true;
1213 else if( aServiceSpecifier ==
"com.sun.star.comp.chart2.DataSeriesWrapper" )
1216 xResult.set( xDataSeries );
1217 bServiceFound =
true;
1234 catch (
const uno::Exception&)
1240 bServiceFound =
true;
1264 bServiceFound =
true;
1267 catch (
const uno::Exception&)
1274 if( !bServiceFound )
1281 xFact->createInstance( aServiceSpecifier ), uno::UNO_QUERY );
1287 catch (
const uno::Exception&)
1297 const OUString& ServiceSpecifier,
1300 OSL_ENSURE( Arguments.hasElements(),
"createInstanceWithArguments: Warning: Arguments are ignored" );
1316 if( rDelegator.is() )
1317 throw lang::DisposedException(
"ChartDocumentWrapper is disposed",
1322 if( rDelegator.is())
1325 ChartModel* pChartModel =
dynamic_cast<ChartModel*
>(rDelegator.get());
1326 assert(pChartModel);
1336 catch (
const uno::Exception&)
1345 return ChartDocumentWrapper_Base::queryInterface( rType );
1361 else if( rSource.Source ==
m_xArea )
1363 else if( rSource.Source ==
m_xAddIn )
1376 return StaticChartDocumentWrapperPropertyArray();
1381 std::vector< std::unique_ptr<WrappedProperty> > aWrappedProperties;
1382 aWrappedProperties.emplace_back(
new WrappedDataSourceLabelsInFirstRowProperty(
m_spChart2ModelContact ) );
1383 aWrappedProperties.emplace_back(
new WrappedDataSourceLabelsInFirstColumnProperty(
m_spChart2ModelContact ) );
1395 return aWrappedProperties;
1411 "com.sun.star.chart.ChartDocument",
1413 "com.sun.star.xml.UserDefinedAttributesSupplier",
1414 "com.sun.star.beans.PropertySet"
1420extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
1422 css::uno::Sequence<css::uno::Any>
const &)
1424 return cppu::acquire(new ::chart::wrapper::ChartDocumentWrapper(context));
std::shared_ptr< Chart2ModelContact > m_spChart2ModelContact
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * com_sun_star_comp_chart2_ChartDocumentWrapper_get_implementation(css::uno::XComponentContext *context, css::uno::Sequence< css::uno::Any > const &)
PropertiesInfo aProperties
static bool GetMathLayoutRTL()
static rtl::Reference< ::chart::BaseCoordinateSystem > getCoordinateSystemByIndex(const rtl::Reference< ::chart::Diagram > &xDiagram, sal_Int32 nIndex)
static void setRTLAxisLayout(const rtl::Reference< ::chart::BaseCoordinateSystem > &xCooSys)
This guard calls lockControllers at the given Model in the CTOR and unlockControllers in the DTOR.
static rtl::Reference< SvxShapeGroupAnyD > getChartRootShape(const rtl::Reference< SvxDrawPage > &xPage)
virtual void SAL_CALL lockControllers() override
virtual void SAL_CALL setDelegator(const css::uno::Reference< css::uno::XInterface > &rDelegator) override
virtual OUString SAL_CALL getURL() override
void setAddIn(const css::uno::Reference< css::util::XRefreshable > &xAddIn)
css::uno::Reference< css::uno::XInterface > m_xDelegator
virtual OUString SAL_CALL getImplementationName() override
XServiceInfo declarations.
css::uno::Reference< css::lang::XMultiServiceFactory > m_xShapeFactory
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
css::uno::Reference< css::drawing::XShape > m_xSubTitle
void setUpdateAddIn(bool bUpdateAddIn)
virtual css::uno::Reference< css::chart::XChartData > SAL_CALL getData() override
rtl::Reference< SvxDrawPage > impl_getDrawPage() const
void setBaseDiagram(const OUString &rBaseDiagram)
virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getArea() override
css::uno::Reference< css::chart::XDiagram > m_xDiagram
virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &aType) override
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance(const OUString &aServiceSpecifier) override
virtual css::uno::Reference< css::drawing::XShape > SAL_CALL getSubTitle() override
virtual css::uno::Sequence< OUString > SAL_CALL getAvailableServiceNames() override
virtual css::uno::Reference< css::beans::XPropertySet > getInnerPropertySet() override
virtual css::uno::Reference< css::drawing::XShape > SAL_CALL getLegend() override
virtual void SAL_CALL connectController(const css::uno::Reference< css::frame::XController > &Controller) override
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getCurrentSelection() override
virtual sal_Bool SAL_CALL hasControllersLocked() override
virtual ~ChartDocumentWrapper() override
virtual css::uno::Reference< css::frame::XController > SAL_CALL getCurrentController() override
css::uno::Reference< css::drawing::XShape > m_xTitle
virtual void SAL_CALL setDiagram(const css::uno::Reference< css::chart::XDiagram > &xDiagram) override
virtual css::uno::Reference< css::drawing::XShape > SAL_CALL getTitle() override
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &aListener) override
virtual sal_Bool SAL_CALL attachResource(const OUString &URL, const css::uno::Sequence< css::beans::PropertyValue > &Arguments) override
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstanceWithArguments(const OUString &ServiceSpecifier, const css::uno::Sequence< css::uno::Any > &Arguments) override
css::uno::Reference< css::util::XRefreshable > m_xAddIn
virtual css::uno::Reference< css::drawing::XDrawPage > SAL_CALL getDrawPage() override
css::uno::Reference< css::beans::XPropertySet > m_xArea
css::uno::Reference< css::drawing::XShape > m_xLegend
virtual std::vector< std::unique_ptr< WrappedProperty > > createWrappedProperties() override
virtual void SAL_CALL setCurrentController(const css::uno::Reference< css::frame::XController > &Controller) override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual void SAL_CALL dispose() override
std::shared_ptr< Chart2ModelContact > m_spChart2ModelContact
virtual void SAL_CALL unlockControllers() override
virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getArgs() override
rtl::Reference< ChartView > m_xChartView
css::uno::Reference< css::drawing::XShapes > getAdditionalShapes() const
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &aType) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual css::uno::Reference< css::chart::XDiagram > SAL_CALL getDiagram() override
virtual void SAL_CALL attachData(const css::uno::Reference< css::chart::XChartData > &xData) override
css::uno::Reference< css::chart::XChartData > m_xChartData
virtual const css::uno::Sequence< css::beans::Property > & getPropertySequence() override
virtual void SAL_CALL disconnectController(const css::uno::Reference< css::frame::XController > &Controller) override
virtual void _disposing(const css::lang::EventObject &rSource) override
void stopAllComponentListening()
#define DBG_UNHANDLED_EXCEPTION(...)
Sequence< PropertyValue > aArguments
Sequence< sal_Int8 > aSeq
void DisposeAndClear(css::uno::Reference< T > &rInterface)
void setPropertyValue(tPropertyValueMap &rOutMap, tPropertyValueMapKey key, const Value &value)
Set a property to a certain value in the given map.
css::uno::Sequence< typename M::key_type > mapKeysToSequence(M const &map)
css::uno::Sequence< DstElementType > containerToSequence(const SrcType &i_Container)
Reference< XComponentContext > getProcessComponentContext()
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
std::shared_ptr< T > make_shared(Args &&... args)
bool getPropertyValue(ValueType &rValue, css::uno::Reference< css::beans::XPropertySet > const &xPropSet, OUString const &propName)
constexpr OUStringLiteral CHART_VIEW_SERVICE_NAME
constexpr OUStringLiteral CHART_CHARTAPIWRAPPER_IMPLEMENTATION_NAME
constexpr OUStringLiteral CHART_CHARTAPIWRAPPER_SERVICE_NAME
rtl::Reference< ::chart::ChartTypeTemplate > xChartTypeTemplate
Reference< XModel > xModel