LibreOffice Module xmloff (master) 1
SchXMLTools.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19#pragma once
20
21#include <rtl/ustring.hxx>
22#include <xmloff/xmltoken.hxx>
23#include "transporttypes.hxx"
24
25#include <com/sun/star/frame/XModel.hpp>
26#include <com/sun/star/chart2/data/XLabeledDataSequence2.hpp>
27
28namespace com::sun::star {
29 namespace chart2 {
30 class XChartDocument;
31 class XRegressionCurve;
32 namespace data {
33 class XDataProvider;
34 }
35 }
36}
37
40class SvXMLExport;
41
42namespace SchXMLTools
43{
44 bool isDocumentGeneratedWithOpenOfficeOlderThan2_0( const css::uno::Reference< css::frame::XModel >& xChartModel);
45 bool isDocumentGeneratedWithOpenOfficeOlderThan2_3( const css::uno::Reference< css::frame::XModel >& xChartModel);
46 bool isDocumentGeneratedWithOpenOfficeOlderThan2_4( const css::uno::Reference< css::frame::XModel >& xChartModel);
47 bool isDocumentGeneratedWithOpenOfficeOlderThan3_0( const css::uno::Reference< css::frame::XModel >& xChartModel);
48 bool isDocumentGeneratedWithOpenOfficeOlderThan3_3( const css::uno::Reference< css::frame::XModel >& xChartModel);
49
50 void setBuildIDAtImportInfo( const css::uno::Reference< css::frame::XModel >& xModel
51 , const css::uno::Reference< css::beans::XPropertySet >& xImportInfo );
52
54 {
67 };
68
69 SchXMLChartTypeEnum GetChartTypeEnum( std::u16string_view rClassName );
70
72 std::u16string_view rClassName, bool bUseOldNames );
73
75 std::u16string_view rChartTypeService, bool bUseOldNames );
76
77 OUString GetNewChartTypeName( const OUString & rOldChartTypeName );
78
79 css::uno::Reference<
80 css::chart2::data::XLabeledDataSequence2 > GetNewLabeledDataSequence();
81
82 css::uno::Reference< css::chart2::data::XDataSequence > CreateDataSequence(
83 const OUString& rRange,
84 const css::uno::Reference< css::chart2::XChartDocument >& xChartDoc );
85
86 css::uno::Reference< css::chart2::data::XDataSequence > CreateDataSequenceWithoutConvert(
87 const OUString& rRange,
88 const css::uno::Reference< css::chart2::XChartDocument >& xChartDoc );
89
91 const css::uno::Reference< css::chart2::data::XDataProvider > & xDataProvider,
92 const css::uno::Reference< css::chart2::XChartDocument > & xNewDoc,
93 const OUString & rRangeAddress,
94 sal_Int32 nCooSysIndex,
95 sal_Int32 nDimensionIndex,
96 tSchXMLLSequencesPerIndex * pLSequencesPerIndex = nullptr );
97
98 css::uno::Any getPropertyFromContext( std::u16string_view rPropertyName, const XMLPropStyleContext * pPropStyleContext, const SvXMLStylesContext* pStylesCtxt );
99
100 void exportText( SvXMLExport& rExport, const OUString& rText, bool bConvertTabsLFs );
101
102 void exportRangeToSomewhere( SvXMLExport& rExport, const OUString& rValue );
103
109 const css::uno::Reference< css::chart2::data::XDataSequence > & xDataSequence,
110 const OUString & rXMLRange );
111
122 const css::uno::Reference< css::chart2::data::XDataSequence > & xDataSequence,
123 OUString & rOutXMLRange,
124 bool bClearProp );
125
126 css::uno::Reference< css::chart2::data::XDataProvider > getDataProviderFromParent( const css::uno::Reference< css::chart2::XChartDocument >& xChartDoc );
127
128 bool switchBackToDataProviderFromParent( const css::uno::Reference< css::chart2::XChartDocument >& xChartDoc
129 , const tSchXMLLSequencesPerIndex & rLSequencesPerIndex );
130
132 const css::uno::Reference< css::beans::XPropertySet > & xSource,
133 const css::uno::Reference< css::beans::XPropertySet > & xDestination );
134}
135
136/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void CreateCategories(const uno::Reference< chart2::data::XDataProvider > &xDataProvider, const uno::Reference< chart2::XChartDocument > &xNewDoc, const OUString &rRangeAddress, sal_Int32 nCooSysIndex, sal_Int32 nDimensionIndex, tSchXMLLSequencesPerIndex *pLSequencesPerIndex)
Reference< chart2::data::XDataProvider > getDataProviderFromParent(const Reference< chart2::XChartDocument > &xChartDoc)
Reference< chart2::data::XLabeledDataSequence2 > GetNewLabeledDataSequence()
SchXMLChartTypeEnum GetChartTypeEnum(std::u16string_view rClassName)
Reference< chart2::data::XDataSequence > CreateDataSequenceWithoutConvert(const OUString &rRange, const Reference< chart2::XChartDocument > &xChartDoc)
bool isDocumentGeneratedWithOpenOfficeOlderThan2_3(const uno::Reference< frame::XModel > &xChartModel)
@ XML_CHART_CLASS_STOCK
Definition: SchXMLTools.hxx:63
@ XML_CHART_CLASS_SCATTER
Definition: SchXMLTools.hxx:59
@ XML_CHART_CLASS_LINE
Definition: SchXMLTools.hxx:55
@ XML_CHART_CLASS_BUBBLE
Definition: SchXMLTools.hxx:64
@ XML_CHART_CLASS_UNKNOWN
Definition: SchXMLTools.hxx:66
@ XML_CHART_CLASS_CIRCLE
Definition: SchXMLTools.hxx:57
@ XML_CHART_CLASS_RADAR
Definition: SchXMLTools.hxx:60
@ XML_CHART_CLASS_ADDIN
Definition: SchXMLTools.hxx:65
@ XML_CHART_CLASS_AREA
Definition: SchXMLTools.hxx:56
@ XML_CHART_CLASS_FILLED_RADAR
Definition: SchXMLTools.hxx:61
@ XML_CHART_CLASS_RING
Definition: SchXMLTools.hxx:58
bool getXMLRangePropertyFromDataSequence(const Reference< chart2::data::XDataSequence > &xDataSequence, OUString &rOutXMLRange, bool bClearProp)
void copyProperties(const Reference< beans::XPropertySet > &xSource, const Reference< beans::XPropertySet > &xDestination)
bool isDocumentGeneratedWithOpenOfficeOlderThan3_0(const uno::Reference< frame::XModel > &xChartModel)
bool isDocumentGeneratedWithOpenOfficeOlderThan2_4(const uno::Reference< frame::XModel > &xChartModel)
uno::Any getPropertyFromContext(std::u16string_view rPropertyName, const XMLPropStyleContext *pPropStyleContext, const SvXMLStylesContext *pStylesCtxt)
OUString GetChartTypeByClassName(std::u16string_view rClassName, bool bUseOldNames)
Reference< chart2::data::XDataSequence > CreateDataSequence(const OUString &rRange, const Reference< chart2::XChartDocument > &xChartDoc)
void exportText(SvXMLExport &rExport, const OUString &rText, bool bConvertTabsLFs)
void setBuildIDAtImportInfo(const uno::Reference< frame::XModel > &xModel, const Reference< beans::XPropertySet > &xImportInfo)
bool switchBackToDataProviderFromParent(const Reference< chart2::XChartDocument > &xChartDoc, const tSchXMLLSequencesPerIndex &rLSequencesPerIndex)
XMLTokenEnum getTokenByChartType(std::u16string_view rChartTypeService, bool bUseOldNames)
OUString GetNewChartTypeName(const OUString &rOldChartTypeName)
bool isDocumentGeneratedWithOpenOfficeOlderThan2_0(const css::uno::Reference< css::frame::XModel > &xChartModel)
void setXMLRangePropertyAtDataSequence(const Reference< chart2::data::XDataSequence > &xDataSequence, const OUString &rXMLRange)
bool isDocumentGeneratedWithOpenOfficeOlderThan3_3(const uno::Reference< frame::XModel > &xChartModel)
void exportRangeToSomewhere(SvXMLExport &rExport, const OUString &rValue)
XMLTokenEnum
The enumeration of all XML tokens.
Definition: xmltoken.hxx:50
::std::multimap< tSchXMLIndexWithPart, css::uno::Reference< css::chart2::data::XLabeledDataSequence > > tSchXMLLSequencesPerIndex