LibreOffice Module oox (master) 1
titleconverter.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
20#ifndef INCLUDED_OOX_DRAWINGML_CHART_TITLECONVERTER_HXX
21#define INCLUDED_OOX_DRAWINGML_CHART_TITLECONVERTER_HXX
22
24
25namespace com::sun::star {
26 namespace chart2 { class XDiagram; }
27 namespace chart2 { class XFormattedString; }
28 namespace chart2 { class XTitled; }
29 namespace chart2::data { class XDataSequence; }
30}
31
32namespace oox::drawingml { struct TextCharacterProperties; }
33
34namespace oox::drawingml::chart {
35
36
37struct TextModel;
38
39class TextConverter final : public ConverterBase< TextModel >
40{
41public:
42 explicit TextConverter( const ConverterRoot& rParent, TextModel& rModel );
43 virtual ~TextConverter() override;
44
46 css::uno::Reference< css::chart2::data::XDataSequence >
47 createDataSequence( const OUString& rRole );
49 css::uno::Sequence< css::uno::Reference< css::chart2::XFormattedString > >
51 const OUString& rDefaultText,
52 const ModelRef< TextBody >& rxTextProp,
53 ObjectType eObjType );
54
55private:
56 css::uno::Reference< css::chart2::XFormattedString >
58 ::std::vector< css::uno::Reference< css::chart2::XFormattedString > >& orStringVec,
59 const OUString& rString,
60 bool bAddNewLine ) const;
61};
62
63
64struct TitleModel;
65
66class TitleConverter final : public ConverterBase< TitleModel >
67{
68public:
69 explicit TitleConverter( const ConverterRoot& rParent, TitleModel& rModel );
70 virtual ~TitleConverter() override;
71
74 const css::uno::Reference< css::chart2::XTitled >& rxTitled,
75 const OUString& rAutoTitle, ObjectType eObjType,
76 sal_Int32 nMainIdx = -1, sal_Int32 nSubIdx = -1 );
77};
78
79
80struct LegendModel;
81
82class LegendConverter final : public ConverterBase< LegendModel >
83{
84public:
85 explicit LegendConverter( const ConverterRoot& rParent, LegendModel& rModel );
86 virtual ~LegendConverter() override;
87
90 const css::uno::Reference< css::chart2::XDiagram >& rxDiagram );
91
92private:
93 void legendEntriesFormatting(const css::uno::Reference<css::chart2::XDiagram>& rxDiagram);
94};
95
96
97} // namespace oox::drawingml::chart
98
99#endif
100
101/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Base class of all converter classes.
void legendEntriesFormatting(const css::uno::Reference< css::chart2::XDiagram > &rxDiagram)
void convertFromModel(const css::uno::Reference< css::chart2::XDiagram > &rxDiagram)
Creates a legend object and attaches it at the passed diagram.
LegendConverter(const ConverterRoot &rParent, LegendModel &rModel)
css::uno::Sequence< css::uno::Reference< css::chart2::XFormattedString > > createStringSequence(const OUString &rDefaultText, const ModelRef< TextBody > &rxTextProp, ObjectType eObjType)
Creates a sequence of formatted string objects.
TextConverter(const ConverterRoot &rParent, TextModel &rModel)
css::uno::Reference< css::chart2::XFormattedString > appendFormattedString(::std::vector< css::uno::Reference< css::chart2::XFormattedString > > &orStringVec, const OUString &rString, bool bAddNewLine) const
css::uno::Reference< css::chart2::data::XDataSequence > createDataSequence(const OUString &rRole)
Creates a data sequence object from the contained text data.
void convertFromModel(const css::uno::Reference< css::chart2::XTitled > &rxTitled, const OUString &rAutoTitle, ObjectType eObjType, sal_Int32 nMainIdx=-1, sal_Int32 nSubIdx=-1)
Creates a title text object and attaches it at the passed interface.
TitleConverter(const ConverterRoot &rParent, TitleModel &rModel)
ObjectType
Enumerates different object types for specific automatic formatting behaviour.