1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_OOX_DRAWINGML_CHART_TITLECONVERTER_HXX
21 #define INCLUDED_OOX_DRAWINGML_CHART_TITLECONVERTER_HXX
23 #include <drawingml/chart/converterbase.hxx>
25 namespace com
{ namespace sun
{ namespace star
{
26 namespace chart2
{ class XDiagram
; }
27 namespace chart2
{ class XFormattedString
; }
28 namespace chart2
{ class XTitled
; }
29 namespace chart2
{ namespace data
{ class XDataSequence
; } }
32 namespace oox
{ namespace drawingml
{ struct TextCharacterProperties
; } }
41 class TextConverter
: public ConverterBase
< TextModel
>
44 explicit TextConverter( const ConverterRoot
& rParent
, TextModel
& rModel
);
45 virtual ~TextConverter() override
;
47 /** Creates a data sequence object from the contained text data. */
48 css::uno::Reference
< css::chart2::data::XDataSequence
>
49 createDataSequence( const OUString
& rRole
);
50 /** Creates a sequence of formatted string objects. */
51 css::uno::Sequence
< css::uno::Reference
< css::chart2::XFormattedString
> >
53 const OUString
& rDefaultText
,
54 const ModelRef
< TextBody
>& rxTextProp
,
55 ObjectType eObjType
);
58 css::uno::Reference
< css::chart2::XFormattedString
>
59 appendFormattedString(
60 ::std::vector
< css::uno::Reference
< css::chart2::XFormattedString
> >& orStringVec
,
61 const OUString
& rString
,
62 bool bAddNewLine
) const;
68 class TitleConverter
: public ConverterBase
< TitleModel
>
71 explicit TitleConverter( const ConverterRoot
& rParent
, TitleModel
& rModel
);
72 virtual ~TitleConverter() override
;
74 /** Creates a title text object and attaches it at the passed interface. */
75 void convertFromModel(
76 const css::uno::Reference
< css::chart2::XTitled
>& rxTitled
,
77 const OUString
& rAutoTitle
, ObjectType eObjType
,
78 sal_Int32 nMainIdx
= -1, sal_Int32 nSubIdx
= -1 );
84 class LegendConverter
: public ConverterBase
< LegendModel
>
87 explicit LegendConverter( const ConverterRoot
& rParent
, LegendModel
& rModel
);
88 virtual ~LegendConverter() override
;
90 /** Creates a legend object and attaches it at the passed diagram. */
91 void convertFromModel(
92 const css::uno::Reference
< css::chart2::XDiagram
>& rxDiagram
);
97 } // namespace drawingml
102 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */