LibreOffice Module oox (master) 1
textparagraphproperties.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_TEXTPARAGRAPHPROPERTIES_HXX
21#define INCLUDED_OOX_DRAWINGML_TEXTPARAGRAPHPROPERTIES_HXX
22
23#include <com/sun/star/beans/XPropertySet.hpp>
25#include <com/sun/star/style/ParagraphAdjust.hpp>
28#include <optional>
29
30namespace com::sun::star {
31 namespace graphic { class XGraphic; }
32}
33
34namespace oox::drawingml {
35
37{
38public:
39 BulletList( );
40 bool is() const;
41 void apply( const BulletList& );
42 void pushToPropMap( const ::oox::core::XmlFilterBase* pFilterBase, PropertyMap& xPropMap ) const;
43 void setBulletChar( const OUString & sChar );
44 void setStartAt( sal_Int32 nStartAt ){ mnStartAt <<= static_cast< sal_Int16 >( nStartAt ); }
45 void setType( sal_Int32 nType );
46 void setNone( );
47 void setSuffixParenBoth();
49 void setSuffixPeriod();
50 void setSuffixNone();
52 void setBulletSize(sal_Int16 nSize);
53 void setBulletAspectRatio(double nAspectRatio);
54 void setFontSize(sal_Int16 nSize);
55 void setStyleName( const OUString& rStyleName ) { maStyleName <<= rStyleName; }
56 void setGraphic( css::uno::Reference< css::graphic::XGraphic > const & rXGraphic );
57
58 std::shared_ptr< ::oox::drawingml::Color > maBulletColorPtr;
63 css::uno::Any msBulletChar;
64 css::uno::Any mnStartAt;
65 css::uno::Any mnNumberingType;
66 css::uno::Any msNumberingPrefix;
67 css::uno::Any msNumberingSuffix;
68 css::uno::Any mnSize;
69 css::uno::Any mnAspectRatio; // Width/Height
70 css::uno::Any mnFontSize;
71 css::uno::Any maStyleName;
72 css::uno::Any maGraphic;
73};
74
76{
77public:
78
80
81 void setLevel( sal_Int16 nLevel ) { mnLevel = nLevel; }
82 sal_Int16 getLevel( ) const { return mnLevel; }
87
90 std::optional< sal_Int32 >& getParaLeftMargin(){ return moParaLeftMargin; }
91 std::optional< sal_Int32 >& getFirstLineIndentation(){ return moFirstLineIndentation; }
92 std::optional<sal_Int32>& getDefaultTabSize() { return moDefaultTabSize; }
93
94 std::optional< css::style::ParagraphAdjust >& getParaAdjust() { return moParaAdjust; }
95 void setParaAdjust( css::style::ParagraphAdjust nParaAdjust ) { moParaAdjust = nParaAdjust; }
96
98 void setLineSpacing( const TextSpacing& rLineSpacing ) { maLineSpacing = rLineSpacing; }
99
100 void apply( const TextParagraphProperties& rSourceProps );
101 void pushToPropSet( const ::oox::core::XmlFilterBase* pFilterBase,
102 const css::uno::Reference < css::beans::XPropertySet > & xPropSet,
103 PropertyMap& rioBulletList,
104 const BulletList* pMasterBuList,
105 bool bApplyBulletList,
106 float fFontSize,
107 bool bPushDefaultValues = false ) const;
108
112 float getCharHeightPoints( float fDefault ) const;
113
114#ifdef DBG_UTIL
115 void dump() const;
116#endif
117
118private:
119
125 std::optional< sal_Int32 > moParaLeftMargin;
126 std::optional< sal_Int32 > moFirstLineIndentation;
127 std::optional< css::style::ParagraphAdjust > moParaAdjust;
128 std::optional< sal_Int32 > moDefaultTabSize;
129 sal_Int16 mnLevel;
131};
132
133}
134
135#endif // INCLUDED_OOX_DRAWINGML_TEXTPARAGRAPHPROPERTIES_HXX
136
137/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
A helper that maps property identifiers to property values.
Definition: propertymap.hxx:52
void setBulletAspectRatio(double nAspectRatio)
void pushToPropMap(const ::oox::core::XmlFilterBase *pFilterBase, PropertyMap &xPropMap) const
void setStartAt(sal_Int32 nStartAt)
void setBulletChar(const OUString &sChar)
void setGraphic(css::uno::Reference< css::graphic::XGraphic > const &rXGraphic)
void setStyleName(const OUString &rStyleName)
::oox::drawingml::TextFont maBulletFont
std::shared_ptr< ::oox::drawingml::Color > maBulletColorPtr
carries a CT_TextFont
Definition: textfont.hxx:34
const TextCharacterProperties & getTextCharacterProperties() const
std::optional< sal_Int32 > & getParaLeftMargin()
std::optional< sal_Int32 > & getFirstLineIndentation()
std::optional< sal_Int32 > & getDefaultTabSize()
float getCharHeightPoints(float fDefault) const
Returns the largest character size of this paragraph.
std::optional< css::style::ParagraphAdjust > moParaAdjust
void setLineSpacing(const TextSpacing &rLineSpacing)
void apply(const TextParagraphProperties &rSourceProps)
std::optional< css::style::ParagraphAdjust > & getParaAdjust()
TextCharacterProperties & getTextCharacterProperties()
void pushToPropSet(const ::oox::core::XmlFilterBase *pFilterBase, const css::uno::Reference< css::beans::XPropertySet > &xPropSet, PropertyMap &rioBulletList, const BulletList *pMasterBuList, bool bApplyBulletList, float fFontSize, bool bPushDefaultValues=false) const
void setParaAdjust(css::style::ParagraphAdjust nParaAdjust)
carries a CT_TextSpacing
Definition: textspacing.hxx:32