LibreOffice Module writerfilter (master) 1
PropertyMap.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 <tools/ref.hxx>
23#include <com/sun/star/uno/Sequence.hxx>
24#include <com/sun/star/beans/PropertyValue.hpp>
25#include <com/sun/star/beans/XPropertySet.hpp>
26#include <com/sun/star/table/BorderLine2.hpp>
27#include <com/sun/star/text/WrapTextMode.hpp>
28#include <com/sun/star/uno/Any.h>
29#include <com/sun/star/drawing/XShape.hpp>
30#include "PropertyIds.hxx"
31#include <memory>
32#include <optional>
33#include <map>
34#include <utility>
35#include <vector>
36#include <set>
37#include <deque>
38
39namespace com::sun::star {
40 namespace beans {
41 struct PropertyValue;
42 }
43 namespace container {
44 class XNameContainer;
45 }
46 namespace lang {
47 class XMultiServiceFactory;
48 }
49 namespace text {
50 class XTextRange;
51 class XTextColumns;
52 class XFootnote;
53 }
54 namespace table {
55 struct BorderLine2;
56 struct ShadowFormat;
57 }
58}
59
60namespace writerfilter::dmapper {
61
62class DomainMapper_Impl;
63struct AnchoredObjectInfo;
64
66{
71};
72
74{
80};
81
82struct RedlineParams : public SvRefBase
83{
84 OUString m_sAuthor;
85 OUString m_sDate;
86 sal_Int32 m_nToken;
87
88 // This can hold properties of runs that had formatted 'track changes' properties
89 css::uno::Sequence< css::beans::PropertyValue > m_aRevertProperties;
90};
91
93
95{
96private:
97 css::uno::Any m_aValue;
100
101public:
102 PropValue( css::uno::Any aValue, GrabBagType i_GrabBagType, bool bDocDefault )
103 : m_aValue(std::move( aValue ))
104 , m_GrabBagType( i_GrabBagType )
105 , m_bIsDocDefault( bDocDefault )
106 {
107 }
108
109 PropValue( css::uno::Any aValue, GrabBagType i_GrabBagType )
110 : m_aValue(std::move( aValue ))
111 , m_GrabBagType( i_GrabBagType )
112 , m_bIsDocDefault( false )
113 {
114 }
115
117 : m_aValue()
119 , m_bIsDocDefault( false )
120 {
121 }
122
123 const css::uno::Any& getValue() const { return m_aValue; }
124
126
127 bool getIsDocDefault() const { return m_bIsDocDefault; }
128};
129
130class PropertyMap;
132
133class PropertyMap : public SvRefBase
134{
135private:
136 // Cache the property values for the GetPropertyValues() call(s).
137 std::vector< css::beans::PropertyValue > m_aValues;
138
139 // marks context as footnote context - ::text( ) events contain either the footnote character or can be ignored
140 // depending on sprmCSymbol
141 css::uno::Reference< css::text::XFootnote > m_xFootnote;
143 std::map< PropertyIds, PropValue > m_vMap;
144 std::vector< RedlineParamsPtr > m_aRedlines;
145
146public:
147 typedef std::pair< PropertyIds, css::uno::Any > Property;
148
150
151 // Sequence: Grab Bags: The CHAR_GRAB_BAG has Name "CharInteropGrabBag" and the PARA_GRAB_BAG has Name "ParaInteropGrabBag"
152 // the contained properties are their Value.
153 css::uno::Sequence< css::beans::PropertyValue > GetPropertyValues( bool bCharGrabBag = true );
154
155 std::vector< PropertyIds > GetPropertyIds();
156
157 // Add property, optionally overwriting existing attributes
158 void Insert( PropertyIds eId, const css::uno::Any& rAny, bool bOverwrite = true, GrabBagType i_GrabBagType = NO_GRAB_BAG, bool bDocDefault = false );
159
160 // Remove a named property from *this, does nothing if the property id has not been set
161 void Erase( PropertyIds eId);
162
163 // Imports properties from pMap (bOverwrite==false means m_bIsDocDefault=true setting)
164 void InsertProps( const PropertyMapPtr& rMap, const bool bOverwrite = true );
165
166 // Returns a copy of the property if it exists, .first is its PropertyIds and .second is its Value (type css::uno::Any)
167 std::optional< Property > getProperty( PropertyIds eId ) const;
168
169 // Has the property named been set (via Insert)?
170 bool isSet( PropertyIds eId ) const;
171 bool isDocDefault( PropertyIds eId ) const;
172
173 const css::uno::Reference< css::text::XFootnote >& GetFootnote() const { return m_xFootnote; }
174 const OUString& GetFootnoteStyle() const { return m_sFootnoteCharStyleName; }
175
176 void SetFootnote(const css::uno::Reference< css::text::XFootnote >& xFootnote, const OUString& sStyleName)
177 {
178 m_xFootnote = xFootnote;
179 m_sFootnoteCharStyleName = sStyleName;
180 }
181
182 virtual void insertTableProperties( const PropertyMap*, const bool bOverwrite = true );
183
184 const std::vector< RedlineParamsPtr >& Redlines() const { return m_aRedlines; }
185
186 std::vector< RedlineParamsPtr >& Redlines() { return m_aRedlines; }
187
188 void printProperties();
189
190#ifdef DBG_UTIL
191 void dumpXml() const;
192#endif
193
194 static css::table::ShadowFormat getShadowFromBorder( const css::table::BorderLine2& rBorder );
195
196protected:
198 {
199 if ( m_aValues.size() )
200 m_aValues.clear();
201 }
202};
203
205{
206public:
207 enum class BorderApply
208 {
209 ToAllInSection = 0,
210 ToFirstPageInSection = 1,
211 ToAllButFirstInSection = 2
212 };
214 {
215 Text = 0,
216 Edge = 1,
217 };
218private:
219#ifdef DBG_UTIL
221#endif
222
223 // 'temporarily' the section page settings are imported as page styles
224 // empty strings mark page settings as not yet imported
225
227 css::uno::Reference< css::text::XTextRange > m_xStartingRange;
228
231 css::uno::Reference< css::beans::XPropertySet > m_aFirstPageStyle;
232 css::uno::Reference< css::beans::XPropertySet > m_aFollowPageStyle;
233
234 std::optional< css::table::BorderLine2 > m_oBorderLines[4];
235 sal_Int32 m_nBorderDistances[4];
239
241 sal_Int16 m_nColumnCount;
243 css::uno::Reference< css::beans::XPropertySet > m_xColumnContainer;
244 std::vector< sal_Int32 > m_aColWidth;
245 std::vector< sal_Int32 > m_aColDistance;
246
249
250 sal_Int32 m_nPageNumber;
251 // Page number type is a value from css::style::NumberingType.
253 sal_Int32 m_nBreakType;
254
255 sal_Int32 m_nLeftMargin;
256 sal_Int32 m_nRightMargin;
258 sal_Int32 m_nTopMargin;
260 sal_Int32 m_nHeaderTop;
262
263 sal_Int32 m_nGridType;
267
268 // line numbering
269 sal_Int32 m_nLnnMod;
270 sal_uInt32 m_nLnc;
271 sal_Int32 m_ndxaLnn;
272 sal_Int32 m_nLnnMin;
273
276
277 std::vector<css::uno::Reference<css::drawing::XShape>> m_xRelativeWidthShapes;
278
279 // The "Link To Previous" flag indicates whether the header/footer
280 // content should be taken from the previous section
287
288 void ApplyProperties_( const css::uno::Reference< css::beans::XPropertySet >& xStyle );
289
291
293 void ApplySectionProperties( const css::uno::Reference< css::beans::XPropertySet >& xSection, DomainMapper_Impl& rDM_Impl );
294
296 void ApplyProtectionProperties( css::uno::Reference< css::beans::XPropertySet >& xSection, DomainMapper_Impl& rDM_Impl );
297
298 css::uno::Reference< css::text::XTextColumns > ApplyColumnProperties( const css::uno::Reference< css::beans::XPropertySet >& xFollowPageStyle,
299 DomainMapper_Impl& rDM_Impl);
300
301 void CopyLastHeaderFooter( bool bFirstPage, DomainMapper_Impl& rDM_Impl );
302
303 static void CopyHeaderFooter( const DomainMapper_Impl& rDM_Impl,
304 const css::uno::Reference< css::beans::XPropertySet >& xPrevStyle,
305 const css::uno::Reference< css::beans::XPropertySet >& xStyle,
306 bool bOmitRightHeader = false, bool bOmitLeftHeader = false,
307 bool bOmitRightFooter = false, bool bOmitLeftFooter = false );
308
309 static void CopyHeaderFooterTextProperty( const css::uno::Reference< css::beans::XPropertySet >& xPrevStyle,
310 const css::uno::Reference< css::beans::XPropertySet >& xStyle,
311 PropertyIds ePropId );
312
313 void PrepareHeaderFooterProperties( bool bFirstPage );
314
315 bool HasHeader( bool bFirstPage ) const;
316 bool HasFooter( bool bFirstPage ) const;
317
318 static void SetBorderDistance( const css::uno::Reference< css::beans::XPropertySet >& xStyle,
319 PropertyIds eMarginId,
320 PropertyIds eDistId,
321 sal_Int32 nDistance,
322 BorderOffsetFrom eOffsetFrom,
323 sal_uInt32 nLineWidth,
324 DomainMapper_Impl& rDM_Impl );
325
328
329public:
331 {
335 };
336
337 explicit SectionPropertyMap( bool bIsFirstSection );
338
339 bool IsFirstSection() const { return m_bIsFirstSection; }
340
341 void SetStart( const css::uno::Reference< css::text::XTextRange >& xRange ) { m_xStartingRange = xRange; }
342
343 const css::uno::Reference< css::text::XTextRange >& GetStartingRange() const { return m_xStartingRange; }
344
345 css::uno::Reference< css::beans::XPropertySet > GetPageStyle( DomainMapper_Impl& rDM_Impl, bool bFirst );
346
347 const OUString& GetPageStyleName( bool bFirstPage = false )
348 {
349 return bFirstPage ? m_sFirstPageStyleName : m_sFollowPageStyleName;
350 }
351
352 // @throws css::beans::UnknownPropertyException
353 // @throws css::beans::PropertyVetoException
354 // @throws css::lang::IllegalArgumentException
355 // @throws css::lang::WrappedTargetException
356 // @throws css::uno::RuntimeException
358
359 void SetBorder( BorderPosition ePos, sal_Int32 nLineDistance, const css::table::BorderLine2& rBorderLine, bool bShadow );
362
363 void SetColumnCount( sal_Int16 nCount ) { m_nColumnCount = nCount; }
364 sal_Int16 ColumnCount() const { return m_nColumnCount; }
365
366 void SetColumnDistance( sal_Int32 nDist ) { m_nColumnDistance = nDist; }
367 void AppendColumnWidth( sal_Int32 nWidth ) { m_aColWidth.push_back( nWidth ); }
368 void AppendColumnSpacing( sal_Int32 nDist ) { m_aColDistance.push_back( nDist ); }
369
370 void SetTitlePage( bool bSet ) { m_bTitlePage = bSet; }
371 void SetSeparatorLine( bool bSet ) { m_bSeparatorLineIsOn = bSet; }
372 void SetEvenlySpaced( bool bSet ) { m_bEvenlySpaced = bSet; }
373 void SetPageNumber( sal_Int32 nSet ) { m_nPageNumber = nSet; }
374 void SetPageNumberType( sal_Int32 nSet ) { m_nPageNumberType = nSet; }
375 void SetBreakType( sal_Int32 nSet ) { m_nBreakType = nSet; }
376 // GetBreakType returns -1 if the breakType has not yet been identified for the section
377 sal_Int32 GetBreakType() const { return m_nBreakType; }
378
379 void SetLeftMargin( sal_Int32 nSet ) { m_nLeftMargin = nSet; }
380 sal_Int32 GetLeftMargin() const { return m_nLeftMargin; }
381 void SetRightMargin( sal_Int32 nSet ) { m_nRightMargin = nSet; }
382 sal_Int32 GetRightMargin() const { return m_nRightMargin; }
383 void SetTopMargin(sal_Int32 nSet) { m_bDynamicHeightTop = nSet >= 0; m_nTopMargin = std::abs(nSet); }
384 void SetBottomMargin( sal_Int32 nSet ) { m_bDynamicHeightBottom = nSet >= 0; m_nBottomMargin = std::abs(nSet); }
385 void SetHeaderTop( sal_Int32 nSet ) { m_nHeaderTop = nSet; }
386 void SetHeaderBottom( sal_Int32 nSet ) { m_nHeaderBottom = nSet; }
387 void SetGutterMargin( sal_Int32 nGutterMargin ) { m_nGutterMargin = nGutterMargin; }
388 sal_Int32 GetPageWidth() const;
389
390 void SetGridType( sal_Int32 nSet ) { m_nGridType = nSet; }
391 void SetGridLinePitch( sal_Int32 nSet ) { m_nGridLinePitch = nSet; }
392 void SetGridSnapToChars( bool bSet ) { m_bGridSnapToChars = bSet; }
393 void SetDxtCharSpace( sal_Int32 nSet ) { m_nDxtCharSpace = nSet; }
394
395 void SetLnnMod( sal_Int32 nValue ) { m_nLnnMod = nValue; }
396 void SetLnc( sal_Int32 nValue ) { m_nLnc = nValue; }
397 void SetdxaLnn( sal_Int32 nValue ) { m_ndxaLnn = nValue; }
398 void SetLnnMin( sal_Int32 nValue ) { m_nLnnMin = nValue; }
399
400 void addRelativeWidthShape( css::uno::Reference<css::drawing::XShape> xShape ) { m_xRelativeWidthShapes.push_back( xShape ); }
401
402 // determine which style gets the borders
404 BorderApply eBorderApply, BorderOffsetFrom eOffsetFrom );
405
406 void CloseSectionGroup( DomainMapper_Impl& rDM_Impl );
407 // Handling of margins, header and footer for any kind of sections breaks.
408 void HandleMarginsHeaderFooter( bool bFirstPage, DomainMapper_Impl& rDM_Impl );
409 void ClearHeaderFooterLinkToPrevious( bool bHeader, PageType eType );
410};
411
412void BeforeConvertToTextFrame(std::deque<css::uno::Any>& rFramedRedlines, std::vector<sal_Int32>& redPos, std::vector<sal_Int32>& redLen, std::vector<OUString>& redCell, std::vector<OUString>& redTable);
413
414void AfterConvertToTextFrame(DomainMapper_Impl& rDM_Impl, std::deque<css::uno::Any>& aFramedRedlines, std::vector<sal_Int32>& redPos, std::vector<sal_Int32>& redLen, std::vector<OUString>& redCell, std::vector<OUString>& redTable);
415
417{
418private:
420 sal_Int32 m_nDropCap; // drop, margin ST_DropCap
421 sal_Int32 m_nLines; // number of lines of the drop cap
422 sal_Int32 m_w; // width
423 sal_Int32 m_h; // height
424 css::text::WrapTextMode m_nWrap; // from ST_Wrap around, auto, none, notBeside, through, tight
425 sal_Int32 m_hAnchor; // page, from ST_HAnchor margin, page, text
426 sal_Int32 m_vAnchor; // around from ST_VAnchor margin, page, text
427 sal_Int32 m_x; // x-position
429 sal_Int32 m_y; // y-position
431 sal_Int32 m_hSpace; // frame padding h
432 sal_Int32 m_vSpace; // frame padding v
433 sal_Int32 m_hRule; // from ST_HeightRule exact, atLeast, auto
434 sal_Int32 m_xAlign; // from ST_XAlign center, inside, left, outside, right
435 sal_Int32 m_yAlign; // from ST_YAlign bottom, center, inline, inside, outside, top
436 sal_Int8 m_nDropCapLength; // number of characters
438 OUString m_sParaId; // [MS-DOCX] sect. 2.2.4 "p and tr Extensions"
439
440 css::uno::Reference< css::text::XTextRange > m_xStartingRange; // start of a frame
441 css::uno::Reference< css::text::XTextRange > m_xEndingRange; // end of the frame
442 sal_Int32 m_nListId = -1;
443
444public:
446
451
452 sal_Int32 GetListId() const { return m_nListId; }
453 void SetListId( sal_Int32 nId ) { m_nListId = nId; }
454
455 bool IsFrameMode() const { return m_bFrameMode; }
456 void SetFrameMode( bool set = true ) { m_bFrameMode = set; }
457
458 sal_Int32 GetDropCap() const { return m_nDropCap; }
459 void SetDropCap( sal_Int32 nSet ) { m_nDropCap = nSet; }
460
461 sal_Int32 GetLines() const { return m_nLines; }
462 void SetLines( sal_Int32 nSet ) { m_nLines = nSet; }
463
464 sal_Int32 Getw() const { return m_w; }
465 void Setw( sal_Int32 nSet ) { m_w = nSet; }
466
467 sal_Int32 Geth() const { return m_h; }
468 void Seth( sal_Int32 nSet ) { m_h = nSet; }
469
470 css::text::WrapTextMode GetWrap() const { return m_nWrap; }
471 void SetWrap( css::text::WrapTextMode nSet ) { m_nWrap = nSet; }
472
473 sal_Int32 GethAnchor() const { return m_hAnchor; }
474 void SethAnchor( sal_Int32 nSet ) { m_hAnchor = nSet; }
475
476 sal_Int32 GetvAnchor() const { return m_vAnchor; }
477 void SetvAnchor( sal_Int32 nSet ) { m_vAnchor = nSet; }
478
479 sal_Int32 Getx() const { return m_x; }
480 void Setx( sal_Int32 nSet ) { m_x = nSet; m_bxValid = true; }
481 bool IsxValid() const { return m_bxValid; }
482
483 sal_Int32 Gety() const { return m_y; }
484 void Sety( sal_Int32 nSet ) { m_y = nSet; m_byValid = true; }
485 bool IsyValid() const { return m_byValid; }
486
487 void SethSpace( sal_Int32 nSet ) { m_hSpace = nSet; }
488 sal_Int32 GethSpace() const { return m_hSpace; }
489
490 sal_Int32 GetvSpace() const { return m_vSpace; }
491 void SetvSpace( sal_Int32 nSet ) { m_vSpace = nSet; }
492
493 sal_Int32 GethRule() const { return m_hRule; }
494 void SethRule( sal_Int32 nSet ) { m_hRule = nSet; }
495
496 sal_Int32 GetxAlign() const { return m_xAlign; }
497 void SetxAlign( sal_Int32 nSet ) { m_xAlign = nSet; }
498
499 sal_Int32 GetyAlign() const { return m_yAlign; }
500 void SetyAlign( sal_Int32 nSet ) { m_yAlign = nSet; }
501
504
505 const css::uno::Reference< css::text::XTextRange >& GetStartingRange() const { return m_xStartingRange; }
506 void SetStartingRange( const css::uno::Reference< css::text::XTextRange >& xSet ) { m_xStartingRange = xSet; }
507
508 const css::uno::Reference< css::text::XTextRange >& GetEndingRange() const { return m_xEndingRange; }
509 void SetEndingRange( const css::uno::Reference< css::text::XTextRange >& xSet ) { m_xEndingRange = xSet; }
510
511 const OUString& GetParaStyleName() const { return m_sParaStyleName; }
512 void SetParaStyleName( const OUString& rSet ) { m_sParaStyleName = rSet; }
513
514 const OUString& GetParaId() const { return m_sParaId; }
515 void SetParaId(const OUString& rSet) { m_sParaId = rSet; }
516
518};
519
521
523public:
525
526 ParagraphProperties const & props() const { return m_props; }
527
528private:
530};
531
532/*-------------------------------------------------------------------------
533 property map of a stylesheet
534 -----------------------------------------------------------------------*/
535
536#define WW_OUTLINE_MAX sal_Int16( 9 )
537#define WW_OUTLINE_MIN sal_Int16( 0 )
538
541{
542private:
543 sal_Int16 mnListLevel;
544 sal_Int16 mnOutlineLevel;
545
546public:
547 explicit StyleSheetPropertyMap();
548
549 sal_Int16 GetListLevel() const { return mnListLevel; }
550 void SetListLevel( sal_Int16 nLevel ) { mnListLevel = nLevel; }
551
552 sal_Int16 GetOutlineLevel() const { return mnOutlineLevel; }
553 void SetOutlineLevel(sal_Int16 nLevel) { if (nLevel <= WW_OUTLINE_MAX) mnOutlineLevel = nLevel; }
554};
555
558{
559public:
561};
562
564 : public PropertyMap
565{
566public:
568 {
579 };
580
581private:
583 {
584 sal_Int32 nValue;
585 bool bValid;
586
588 : nValue( 0 )
589 , bValid( false )
590 {
591 }
592 };
593
595
596public:
597 explicit TablePropertyMap() {}
598
599 bool getValue( TablePropertyMapTarget eWhich, sal_Int32& nFill );
600 void setValue( TablePropertyMapTarget eWhich, sal_Int32 nSet );
601
602 virtual void insertTableProperties( const PropertyMap*, const bool bOverwrite = true ) override;
603};
604
606
609{
610 css::uno::Reference<css::text::XTextRange> m_rStartParagraph;
611 css::uno::Reference<css::text::XTextRange> m_rEndParagraph;
613 css::uno::Reference<css::beans::XPropertySet> m_rPropertySet;
614};
615
616typedef std::shared_ptr< std::vector<TableParagraph> > TableParagraphVectorPtr;
617
618} // namespace writerfilter::dmapper
619
620/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal_Int32 nLineWidth
#define WW_OUTLINE_MAX
std::vector< beans::PropertyValue > m_aValues
css::uno::Any getProperty(sal_Int32 nPropId)
ParagraphProperties const & props() const
const OUString & GetParaStyleName() const
css::uno::Reference< css::text::XTextRange > m_xEndingRange
void SetParaId(const OUString &rSet)
ParagraphProperties(ParagraphProperties const &)=default
css::uno::Reference< css::text::XTextRange > m_xStartingRange
const css::uno::Reference< css::text::XTextRange > & GetEndingRange() const
void SetWrap(css::text::WrapTextMode nSet)
const css::uno::Reference< css::text::XTextRange > & GetStartingRange() const
ParagraphProperties & operator=(ParagraphProperties const &)=default
void SetParaStyleName(const OUString &rSet)
void SetEndingRange(const css::uno::Reference< css::text::XTextRange > &xSet)
css::text::WrapTextMode GetWrap() const
ParagraphProperties(ParagraphProperties &&)=default
void SetStartingRange(const css::uno::Reference< css::text::XTextRange > &xSet)
PropValue(css::uno::Any aValue, GrabBagType i_GrabBagType, bool bDocDefault)
PropValue(css::uno::Any aValue, GrabBagType i_GrabBagType)
GrabBagType getGrabBagType() const
const css::uno::Any & getValue() const
void SetFootnote(const css::uno::Reference< css::text::XFootnote > &xFootnote, const OUString &sStyleName)
std::pair< PropertyIds, css::uno::Any > Property
const OUString & GetFootnoteStyle() const
const css::uno::Reference< css::text::XFootnote > & GetFootnote() const
css::uno::Reference< css::text::XFootnote > m_xFootnote
std::map< PropertyIds, PropValue > m_vMap
std::vector< RedlineParamsPtr > m_aRedlines
std::vector< RedlineParamsPtr > & Redlines()
const std::vector< RedlineParamsPtr > & Redlines() const
std::vector< css::beans::PropertyValue > m_aValues
css::uno::Reference< css::text::XTextRange > m_xStartingRange
static void CopyHeaderFooterTextProperty(const css::uno::Reference< css::beans::XPropertySet > &xPrevStyle, const css::uno::Reference< css::beans::XPropertySet > &xStyle, PropertyIds ePropId)
css::uno::Reference< css::text::XTextColumns > ApplyColumnProperties(const css::uno::Reference< css::beans::XPropertySet > &xFollowPageStyle, DomainMapper_Impl &rDM_Impl)
const css::uno::Reference< css::text::XTextRange > & GetStartingRange() const
void PrepareHeaderFooterProperties(bool bFirstPage)
css::uno::Reference< css::beans::XPropertySet > m_aFollowPageStyle
void ApplyBorderToPageStyles(DomainMapper_Impl &rDM_Impl, BorderApply eBorderApply, BorderOffsetFrom eOffsetFrom)
void ApplyProtectionProperties(css::uno::Reference< css::beans::XPropertySet > &xSection, DomainMapper_Impl &rDM_Impl)
Check if document is protected. If so, ensure a section exists, and apply its protected value.
std::vector< sal_Int32 > m_aColDistance
static void CopyHeaderFooter(const DomainMapper_Impl &rDM_Impl, const css::uno::Reference< css::beans::XPropertySet > &xPrevStyle, const css::uno::Reference< css::beans::XPropertySet > &xStyle, bool bOmitRightHeader=false, bool bOmitLeftHeader=false, bool bOmitRightFooter=false, bool bOmitLeftFooter=false)
static void SetBorderDistance(const css::uno::Reference< css::beans::XPropertySet > &xStyle, PropertyIds eMarginId, PropertyIds eDistId, sal_Int32 nDistance, BorderOffsetFrom eOffsetFrom, sal_uInt32 nLineWidth, DomainMapper_Impl &rDM_Impl)
void SetBorder(BorderPosition ePos, sal_Int32 nLineDistance, const css::table::BorderLine2 &rBorderLine, bool bShadow)
void ClearHeaderFooterLinkToPrevious(bool bHeader, PageType eType)
void CopyLastHeaderFooter(bool bFirstPage, DomainMapper_Impl &rDM_Impl)
void ApplySectionProperties(const css::uno::Reference< css::beans::XPropertySet > &xSection, DomainMapper_Impl &rDM_Impl)
Apply section-specific properties: only valid to use after PageStyle has been determined by InheritOr...
void ApplyProperties_(const css::uno::Reference< css::beans::XPropertySet > &xStyle)
void HandleIncreasedAnchoredObjectSpacing(DomainMapper_Impl &rDM_Impl)
Increases paragraph spacing according to Word 2013+ needs if necessary.
css::uno::Reference< css::beans::XPropertySet > m_aFirstPageStyle
void CloseSectionGroup(DomainMapper_Impl &rDM_Impl)
void SetGutterMargin(sal_Int32 nGutterMargin)
void InheritOrFinalizePageStyles(DomainMapper_Impl &rDM_Impl)
void addRelativeWidthShape(css::uno::Reference< css::drawing::XShape > xShape)
void HandleMarginsHeaderFooter(bool bFirstPage, DomainMapper_Impl &rDM_Impl)
const OUString & GetPageStyleName(bool bFirstPage=false)
css::uno::Reference< css::beans::XPropertySet > GetPageStyle(DomainMapper_Impl &rDM_Impl, bool bFirst)
void SetStart(const css::uno::Reference< css::text::XTextRange > &xRange)
bool HasHeader(bool bFirstPage) const
void SetBorderOffsetFrom(BorderOffsetFrom nSet)
std::vector< css::uno::Reference< css::drawing::XShape > > m_xRelativeWidthShapes
css::uno::Reference< css::beans::XPropertySet > m_xColumnContainer
std::optional< css::table::BorderLine2 > m_oBorderLines[4]
bool HasFooter(bool bFirstPage) const
virtual void insertTableProperties(const PropertyMap *, const bool bOverwrite=true) override
bool getValue(TablePropertyMapTarget eWhich, sal_Int32 &nFill)
void setValue(TablePropertyMapTarget eWhich, sal_Int32 nSet)
ValidValue m_aValidValues[TablePropertyMapTarget_MAX]
int nCount
PageType
sal_Int16 nValue
def text(shape, orig_st)
@ table
void set(css::uno::UnoInterfaceReference const &value)
std::map< sal_Int32, STLPropertyMapEntry > PropertyMap
std::shared_ptr< std::vector< TableParagraph > > TableParagraphVectorPtr
tools::SvRef< RedlineParams > RedlineParamsPtr
Definition: PropertyMap.hxx:92
tools::SvRef< ParagraphProperties > ParagraphPropertiesPtr
void BeforeConvertToTextFrame(std::deque< css::uno::Any > &rFramedRedlines, std::vector< sal_Int32 > &redPos, std::vector< sal_Int32 > &redLen, std::vector< OUString > &redCell, std::vector< OUString > &redTable)
tools::SvRef< PropertyMap > PropertyMapPtr
void AfterConvertToTextFrame(DomainMapper_Impl &rDM_Impl, std::deque< css::uno::Any > &aFramedRedlines, std::vector< sal_Int32 > &redPos, std::vector< sal_Int32 > &redLen, std::vector< OUString > &redCell, std::vector< OUString > &redTable)
tools::SvRef< TablePropertyMap > TablePropertyMapPtr
sal_Int16 nId
static SfxItemSet & rSet
css::uno::Sequence< css::beans::PropertyValue > m_aRevertProperties
Definition: PropertyMap.hxx:89
Information about a paragraph to be finished after a table end.
css::uno::Reference< css::text::XTextRange > m_rEndParagraph
css::uno::Reference< css::text::XTextRange > m_rStartParagraph
css::uno::Reference< css::beans::XPropertySet > m_rPropertySet
signed char sal_Int8