LibreOffice Module xmloff (master)  1
PageMasterExportPropMapper.cxx
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 
21 #include <xmloff/xmlprmap.hxx>
22 #include <xmloff/xmltoken.hxx>
23 #include <comphelper/types.hxx>
24 #include <com/sun/star/beans/XPropertySet.hpp>
25 #include <com/sun/star/table/BorderLine2.hpp>
26 #include <PageMasterStyleMap.hxx>
27 #include <rtl/ref.hxx>
28 #include <comphelper/extract.hxx>
29 
30 using namespace ::com::sun::star;
31 using namespace ::com::sun::star::uno;
32 using namespace ::com::sun::star::beans;
33 using namespace ::comphelper;
34 using namespace ::xmloff::token;
35 
36 static bool lcl_HasSameLineWidth( const table::BorderLine2& rLine1, const table::BorderLine2& rLine2 )
37 {
38  return (rLine1.InnerLineWidth == rLine2.InnerLineWidth) &&
39  (rLine1.OuterLineWidth == rLine2.OuterLineWidth) &&
40  (rLine1.LineDistance == rLine2.LineDistance) &&
41  (rLine1.LineWidth == rLine2.LineWidth);
42 }
43 
44 static void lcl_RemoveState( XMLPropertyState* pState )
45 {
46  pState->mnIndex = -1;
47  pState->maValue.clear();
48 }
49 
51 {
52  sal_Int16 nValue = sal_Int16();
53  if( (pState->maValue >>= nValue) && !nValue )
54  lcl_RemoveState( pState );
55 }
56 
57 static void lcl_AddState(::std::vector< XMLPropertyState >& rPropState, sal_Int32 nIndex, const OUString& rProperty, const uno::Reference< beans::XPropertySet >& xProps)
58 {
59  if(::cppu::any2bool(xProps->getPropertyValue(rProperty)))
60  rPropState.emplace_back(nIndex, css::uno::Any(true));
61 }
62 
63 // helper struct to handle equal XMLPropertyState's for page, header and footer
64 
65 namespace {
66 
67 struct XMLPropertyStateBuffer
68 {
69  XMLPropertyState* pPMMarginAll;
70 
71  XMLPropertyState* pPMBorderAll;
72  XMLPropertyState* pPMBorderTop;
73  XMLPropertyState* pPMBorderBottom;
74  XMLPropertyState* pPMBorderLeft;
75  XMLPropertyState* pPMBorderRight;
76 
77  XMLPropertyState* pPMBorderWidthAll;
78  XMLPropertyState* pPMBorderWidthTop;
79  XMLPropertyState* pPMBorderWidthBottom;
80  XMLPropertyState* pPMBorderWidthLeft;
81  XMLPropertyState* pPMBorderWidthRight;
82 
83  XMLPropertyState* pPMPaddingAll;
84  XMLPropertyState* pPMPaddingTop;
85  XMLPropertyState* pPMPaddingBottom;
86  XMLPropertyState* pPMPaddingLeft;
87  XMLPropertyState* pPMPaddingRight;
88 
89  XMLPropertyStateBuffer();
90  void ContextFilter( ::std::vector< XMLPropertyState >& rPropState );
91 };
92 
93 }
94 
95 XMLPropertyStateBuffer::XMLPropertyStateBuffer()
96  : pPMMarginAll( nullptr )
97  ,
98  pPMBorderAll( nullptr ),
99  pPMBorderTop( nullptr ),
100  pPMBorderBottom( nullptr ),
101  pPMBorderLeft( nullptr ),
102  pPMBorderRight( nullptr ),
103 
104  pPMBorderWidthAll( nullptr ),
105  pPMBorderWidthTop( nullptr ),
106  pPMBorderWidthBottom( nullptr ),
107  pPMBorderWidthLeft( nullptr ),
108  pPMBorderWidthRight( nullptr ),
109 
110  pPMPaddingAll( nullptr ),
111  pPMPaddingTop( nullptr ),
112  pPMPaddingBottom( nullptr ),
113  pPMPaddingLeft( nullptr ),
114  pPMPaddingRight( nullptr )
115 {
116 }
117 
118 void XMLPropertyStateBuffer::ContextFilter( ::std::vector< XMLPropertyState >& )
119 {
120  if (pPMMarginAll)
121  {
122  lcl_RemoveState(pPMMarginAll); // #i117696# do not write fo:margin
123  }
124 
125  if( pPMBorderAll )
126  {
127  if( pPMBorderTop && pPMBorderBottom && pPMBorderLeft && pPMBorderRight )
128  {
129  table::BorderLine2 aLineTop, aLineBottom, aLineLeft, aLineRight;
130 
131  pPMBorderTop->maValue >>= aLineTop;
132  pPMBorderBottom->maValue >>= aLineBottom;
133  pPMBorderLeft->maValue >>= aLineLeft;
134  pPMBorderRight->maValue >>= aLineRight;
135 
136  if( (aLineTop == aLineBottom) && (aLineBottom == aLineLeft) && (aLineLeft == aLineRight) )
137  {
138  lcl_RemoveState( pPMBorderTop );
139  lcl_RemoveState( pPMBorderBottom );
140  lcl_RemoveState( pPMBorderLeft );
141  lcl_RemoveState( pPMBorderRight );
142  }
143  else
144  lcl_RemoveState( pPMBorderAll );
145  }
146  else
147  lcl_RemoveState( pPMBorderAll );
148  }
149 
150  if( pPMBorderWidthAll )
151  {
152  if( pPMBorderWidthTop && pPMBorderWidthBottom && pPMBorderWidthLeft && pPMBorderWidthRight )
153  {
154  table::BorderLine2 aLineTop, aLineBottom, aLineLeft, aLineRight;
155 
156  pPMBorderWidthTop->maValue >>= aLineTop;
157  pPMBorderWidthBottom->maValue >>= aLineBottom;
158  pPMBorderWidthLeft->maValue >>= aLineLeft;
159  pPMBorderWidthRight->maValue >>= aLineRight;
160 
161  if( lcl_HasSameLineWidth( aLineTop, aLineBottom ) &&
162  lcl_HasSameLineWidth( aLineBottom, aLineLeft ) &&
163  lcl_HasSameLineWidth( aLineLeft, aLineRight ) )
164  {
165  lcl_RemoveState( pPMBorderWidthTop );
166  lcl_RemoveState( pPMBorderWidthBottom );
167  lcl_RemoveState( pPMBorderWidthLeft );
168  lcl_RemoveState( pPMBorderWidthRight );
169  }
170  else
171  lcl_RemoveState( pPMBorderWidthAll );
172  }
173  else
174  lcl_RemoveState( pPMBorderWidthAll );
175  }
176 
177  if( pPMPaddingAll )
178  {
179  if( pPMPaddingTop && pPMPaddingBottom && pPMPaddingLeft && pPMPaddingRight )
180  {
181  sal_Int32 nTop = 0, nBottom = 0, nLeft = 0, nRight = 0;
182 
183  pPMPaddingTop->maValue >>= nTop;
184  pPMPaddingBottom->maValue >>= nBottom;
185  pPMPaddingLeft->maValue >>= nLeft;
186  pPMPaddingRight->maValue >>= nRight;
187 
188  if( (nTop == nBottom) && (nBottom == nLeft) && (nLeft == nRight) )
189  {
190  lcl_RemoveState( pPMPaddingTop );
191  lcl_RemoveState( pPMPaddingBottom );
192  lcl_RemoveState( pPMPaddingLeft );
193  lcl_RemoveState( pPMPaddingRight );
194  }
195  else
196  lcl_RemoveState( pPMPaddingAll );
197  }
198  else
199  lcl_RemoveState( pPMPaddingAll );
200  }
201 }
202 
205  SvXMLExport& rExport ) :
206  SvXMLExportPropertyMapper( rMapper ),
207  aBackgroundImageExport( rExport ),
208  aTextColumnsExport( rExport ),
209  aFootnoteSeparatorExport( rExport )
210 {
211 }
212 
214 {
215 }
216 
218  SvXMLExport&,
219  const XMLPropertyState& rProperty,
220  SvXmlExportFlags /*nFlags*/,
221  const ::std::vector< XMLPropertyState >* pProperties,
222  sal_uInt32 nIdx ) const
223 {
225 
226  sal_uInt32 nContextId = getPropertySetMapper()->GetEntryContextId( rProperty.mnIndex );
227  switch( nContextId )
228  {
229  case CTF_PM_GRAPHICURL:
232  {
233  assert(pProperties);
234  assert(nIdx >= 2 && "horrible array ordering borked again");
235  sal_Int32 nPos(-1);
236  sal_Int32 nFilter(-1);
237  switch( nContextId )
238  {
239  case CTF_PM_GRAPHICURL:
240  nPos = CTF_PM_GRAPHICPOSITION;
241  nFilter = CTF_PM_GRAPHICFILTER;
242  break;
245  nFilter = CTF_PM_HEADERGRAPHICFILTER;
246  break;
249  nFilter = CTF_PM_FOOTERGRAPHICFILTER;
250  break;
251  default:
252  assert(false);
253  }
254  const Any* pPos = nullptr;
255  const Any* pFilter = nullptr;
256  sal_uInt32 nIndex(nIdx - 1);
257  const XMLPropertyState& rFilter = (*pProperties)[nIndex];
258  if (getPropertySetMapper()->GetEntryContextId(rFilter.mnIndex) == nFilter)
259  {
260  pFilter = &rFilter.maValue;
261  --nIndex;
262  }
263  const XMLPropertyState& rPos = (*pProperties)[nIndex];
264  if (getPropertySetMapper()->GetEntryContextId(rPos.mnIndex) == nPos)
265  {
266  pPos = &rPos.maValue;
267  --nIndex;
268  }
269  sal_uInt32 nPropIndex = rProperty.mnIndex;
270  pThis->aBackgroundImageExport.exportXML( rProperty.maValue, pPos, pFilter, nullptr,
271  getPropertySetMapper()->GetEntryNameSpace( nPropIndex ),
272  getPropertySetMapper()->GetEntryXMLName( nPropIndex ) );
273  }
274  break;
275  case CTF_PM_TEXTCOLUMNS:
276  pThis->aTextColumnsExport.exportXML( rProperty.maValue );
277  break;
279  pThis->aFootnoteSeparatorExport.exportXML( pProperties, nIdx,
281  break;
282  }
283 }
284 
287  const XMLPropertyState&,
288  const SvXMLUnitConverter&,
289  const SvXMLNamespaceMap&,
290  const ::std::vector< XMLPropertyState >*,
291  sal_uInt32 /*nIdx*/) const
292 {
293 }
294 
296  bool bEnableFoFontFamily,
297  ::std::vector< XMLPropertyState >& rPropState,
298  const Reference< XPropertySet >& rPropSet ) const
299 {
300  XMLPropertyStateBuffer aPageBuffer;
301  XMLPropertyStateBuffer aHeaderBuffer;
302  XMLPropertyStateBuffer aFooterBuffer;
303 
304  XMLPropertyState* pPMHeaderHeight = nullptr;
305  XMLPropertyState* pPMHeaderMinHeight = nullptr;
306  XMLPropertyState* pPMHeaderDynamic = nullptr;
307 
308  XMLPropertyState* pPMFooterHeight = nullptr;
309  XMLPropertyState* pPMFooterMinHeight = nullptr;
310  XMLPropertyState* pPMFooterDynamic = nullptr;
311 
312  XMLPropertyState* pPMScaleTo = nullptr;
313  XMLPropertyState* pPMScaleToPages = nullptr;
314  XMLPropertyState* pPMScaleToX = nullptr;
315  XMLPropertyState* pPMScaleToY = nullptr;
316  XMLPropertyState* pPMStandardMode = nullptr;
317  XMLPropertyState* pPMGridBaseWidth = nullptr;
318  // same as pPMGridSnapTo but for backward compatibility only
319  XMLPropertyState* pPMGridSnapToChars = nullptr;
320  XMLPropertyState* pPMGridSnapTo = nullptr;
321 
322  XMLPropertyState* pPrint = nullptr;
323 
324  XMLPropertyState* pRepeatOffsetX = nullptr;
325  XMLPropertyState* pRepeatOffsetY = nullptr;
326  XMLPropertyState* pHeaderRepeatOffsetX = nullptr;
327  XMLPropertyState* pHeaderRepeatOffsetY = nullptr;
328  XMLPropertyState* pFooterRepeatOffsetX = nullptr;
329  XMLPropertyState* pFooterRepeatOffsetY = nullptr;
330 
332 
333  for( auto& rProp : rPropState )
334  {
335  XMLPropertyState *pProp = &rProp;
336  sal_Int16 nContextId = aPropMapper->GetEntryContextId( pProp->mnIndex );
337  sal_Int16 nFlag = nContextId & CTF_PM_FLAGMASK;
338  sal_Int16 nSimpleId = nContextId & (~CTF_PM_FLAGMASK | XML_PM_CTF_START);
339  sal_Int16 nPrintId = nContextId & CTF_PM_PRINTMASK;
340 
341  XMLPropertyStateBuffer* pBuffer;
342  switch( nFlag )
343  {
344  case CTF_PM_HEADERFLAG: pBuffer = &aHeaderBuffer; break;
345  case CTF_PM_FOOTERFLAG: pBuffer = &aFooterBuffer; break;
346  default: pBuffer = &aPageBuffer; break;
347  }
348 
349  switch( nSimpleId )
350  {
351  case CTF_PM_MARGINALL: pBuffer->pPMMarginAll = pProp; break;
352  case CTF_PM_BORDERALL: pBuffer->pPMBorderAll = pProp; break;
353  case CTF_PM_BORDERTOP: pBuffer->pPMBorderTop = pProp; break;
354  case CTF_PM_BORDERBOTTOM: pBuffer->pPMBorderBottom = pProp; break;
355  case CTF_PM_BORDERLEFT: pBuffer->pPMBorderLeft = pProp; break;
356  case CTF_PM_BORDERRIGHT: pBuffer->pPMBorderRight = pProp; break;
357  case CTF_PM_BORDERWIDTHALL: pBuffer->pPMBorderWidthAll = pProp; break;
358  case CTF_PM_BORDERWIDTHTOP: pBuffer->pPMBorderWidthTop = pProp; break;
359  case CTF_PM_BORDERWIDTHBOTTOM: pBuffer->pPMBorderWidthBottom = pProp; break;
360  case CTF_PM_BORDERWIDTHLEFT: pBuffer->pPMBorderWidthLeft = pProp; break;
361  case CTF_PM_BORDERWIDTHRIGHT: pBuffer->pPMBorderWidthRight = pProp; break;
362  case CTF_PM_PADDINGALL: pBuffer->pPMPaddingAll = pProp; break;
363  case CTF_PM_PADDINGTOP: pBuffer->pPMPaddingTop = pProp; break;
364  case CTF_PM_PADDINGBOTTOM: pBuffer->pPMPaddingBottom = pProp; break;
365  case CTF_PM_PADDINGLEFT: pBuffer->pPMPaddingLeft = pProp; break;
366  case CTF_PM_PADDINGRIGHT: pBuffer->pPMPaddingRight = pProp; break;
367  }
368 
369  switch( nContextId )
370  {
371  case CTF_PM_HEADERHEIGHT: pPMHeaderHeight = pProp; break;
372  case CTF_PM_HEADERMINHEIGHT: pPMHeaderMinHeight = pProp; break;
373  case CTF_PM_HEADERDYNAMIC: pPMHeaderDynamic = pProp; break;
374  case CTF_PM_FOOTERHEIGHT: pPMFooterHeight = pProp; break;
375  case CTF_PM_FOOTERMINHEIGHT: pPMFooterMinHeight = pProp; break;
376  case CTF_PM_FOOTERDYNAMIC: pPMFooterDynamic = pProp; break;
377  case CTF_PM_SCALETO: pPMScaleTo = pProp; break;
378  case CTF_PM_SCALETOPAGES: pPMScaleToPages = pProp; break;
379  case CTF_PM_SCALETOX: pPMScaleToX = pProp; break;
380  case CTF_PM_SCALETOY: pPMScaleToY = pProp; break;
381  case CTF_PM_STANDARD_MODE: pPMStandardMode = pProp; break;
382  case CTP_PM_GRID_BASE_WIDTH: pPMGridBaseWidth = pProp; break;
383  case CTP_PM_GRID_SNAP_TO_CHARS: pPMGridSnapToChars = pProp; break;
384  case CTP_PM_GRID_SNAP_TO: pPMGridSnapTo = pProp; break;
385 
387  pRepeatOffsetX = pProp;
388  break;
389 
391  pRepeatOffsetY = pProp;
392  break;
393 
395  pHeaderRepeatOffsetX = pProp;
396  break;
397 
399  pHeaderRepeatOffsetY = pProp;
400  break;
401 
403  pFooterRepeatOffsetX = pProp;
404  break;
405 
407  pFooterRepeatOffsetY = pProp;
408  break;
409 
410  // Sort out empty entries
415 
420 
425  {
426  OUString aStr;
427 
428  if( (pProp->maValue >>= aStr) && 0 == aStr.getLength() )
429  {
430  pProp->mnIndex = -1;
431  }
432 
433  break;
434  }
435  }
436 
437  if (nPrintId == CTF_PM_PRINTMASK)
438  {
439  pPrint = pProp;
440  lcl_RemoveState(pPrint);
441  }
442  }
443 
444  // These entries need to be reduced to a single one for XML export.
445  // Both would be exported as 'draw:tile-repeat-offset' following a percent
446  // value and a 'vertical' or 'horizontal' tag as mark. If both would be active
447  // and both would be exported this would create an XML error (same property twice)
448  if(pRepeatOffsetX && pRepeatOffsetY)
449  {
450  sal_Int32 nOffset(0);
451 
452  if((pRepeatOffsetX->maValue >>= nOffset) && (!nOffset))
453  {
454  pRepeatOffsetX->mnIndex = -1;
455  }
456  else
457  {
458  pRepeatOffsetY->mnIndex = -1;
459  }
460  }
461 
462  // Same as above for Header
463  if(pHeaderRepeatOffsetX && pHeaderRepeatOffsetY)
464  {
465  sal_Int32 nOffset(0);
466 
467  if((pHeaderRepeatOffsetX->maValue >>= nOffset) && (!nOffset))
468  {
469  pHeaderRepeatOffsetX->mnIndex = -1;
470  }
471  else
472  {
473  pHeaderRepeatOffsetY->mnIndex = -1;
474  }
475  }
476 
477  // Same as above for Footer
478  if(pFooterRepeatOffsetX && pFooterRepeatOffsetY)
479  {
480  sal_Int32 nOffset(0);
481 
482  if((pFooterRepeatOffsetX->maValue >>= nOffset) && (!nOffset))
483  {
484  pFooterRepeatOffsetX->mnIndex = -1;
485  }
486  else
487  {
488  pFooterRepeatOffsetY->mnIndex = -1;
489  }
490  }
491 
492  if( pPMStandardMode && !getBOOL(pPMStandardMode->maValue) )
493  {
494  lcl_RemoveState(pPMStandardMode);
495  if( pPMGridBaseWidth )
496  lcl_RemoveState(pPMGridBaseWidth);
497  if( pPMGridSnapToChars )
498  lcl_RemoveState(pPMGridSnapToChars);
499  if (pPMGridSnapTo)
500  {
501  lcl_RemoveState(pPMGridSnapTo);
502  }
503  }
504 
505  if( pPMGridBaseWidth && pPMStandardMode )
506  lcl_RemoveState(pPMStandardMode);
507 
508  aPageBuffer.ContextFilter( rPropState );
509  aHeaderBuffer.ContextFilter( rPropState );
510  aFooterBuffer.ContextFilter( rPropState );
511 
512  if( pPMHeaderHeight && (!pPMHeaderDynamic || getBOOL( pPMHeaderDynamic->maValue )) )
513  lcl_RemoveState( pPMHeaderHeight );
514  if( pPMHeaderMinHeight && pPMHeaderDynamic && !getBOOL( pPMHeaderDynamic->maValue ) )
515  lcl_RemoveState( pPMHeaderMinHeight );
516  if( pPMHeaderDynamic )
517  lcl_RemoveState( pPMHeaderDynamic );
518 
519  if( pPMFooterHeight && (!pPMFooterDynamic || getBOOL( pPMFooterDynamic->maValue )) )
520  lcl_RemoveState( pPMFooterHeight );
521  if( pPMFooterMinHeight && pPMFooterDynamic && !getBOOL( pPMFooterDynamic->maValue ) )
522  lcl_RemoveState( pPMFooterMinHeight );
523  if( pPMFooterDynamic )
524  lcl_RemoveState( pPMFooterDynamic );
525 
526  if( pPMScaleTo )
527  lcl_RemoveStateIfZero16( pPMScaleTo );
528  if( pPMScaleToPages )
529  lcl_RemoveStateIfZero16( pPMScaleToPages );
530  if( pPMScaleToX )
531  lcl_RemoveStateIfZero16( pPMScaleToX );
532  if( pPMScaleToY )
533  lcl_RemoveStateIfZero16( pPMScaleToY );
534 
535  if (pPrint)
536  {
537  lcl_AddState(rPropState, aPropMapper->FindEntryIndex(CTF_PM_PRINT_ANNOTATIONS), "PrintAnnotations", rPropSet);
538  lcl_AddState(rPropState, aPropMapper->FindEntryIndex(CTF_PM_PRINT_CHARTS), "PrintCharts", rPropSet);
539  lcl_AddState(rPropState, aPropMapper->FindEntryIndex(CTF_PM_PRINT_DRAWING), "PrintDrawing", rPropSet);
540  lcl_AddState(rPropState, aPropMapper->FindEntryIndex(CTF_PM_PRINT_FORMULAS), "PrintFormulas", rPropSet);
541  lcl_AddState(rPropState, aPropMapper->FindEntryIndex(CTF_PM_PRINT_GRID), "PrintGrid", rPropSet);
542  lcl_AddState(rPropState, aPropMapper->FindEntryIndex(CTF_PM_PRINT_HEADERS), "PrintHeaders", rPropSet);
543  lcl_AddState(rPropState, aPropMapper->FindEntryIndex(CTF_PM_PRINT_OBJECTS), "PrintObjects", rPropSet);
544  lcl_AddState(rPropState, aPropMapper->FindEntryIndex(CTF_PM_PRINT_ZEROVALUES), "PrintZeroValues", rPropSet);
545  }
546 
547  SvXMLExportPropertyMapper::ContextFilter(bEnableFoFontFamily, rPropState, rPropSet);
548 }
549 
550 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define CTF_PM_HEADERGRAPHICPOSITION
#define CTP_PM_GRID_SNAP_TO_CHARS
#define CTF_PM_HEADERHEIGHT
#define CTF_PM_HEADERFILLTRANSNAME
#define CTF_PM_FOOTERDYNAMIC
#define CTF_PM_FLAGMASK
sal_Int32 nIndex
#define CTF_PM_FILLGRADIENTNAME
#define CTF_PM_HEADERFILLHATCHNAME
#define CTF_PM_PADDINGTOP
XMLBackgroundImageExport aBackgroundImageExport
#define CTF_PM_FOOTERREPEAT_OFFSET_Y
virtual void ContextFilter(bool bEnableFoFontFamily,::std::vector< XMLPropertyState > &rProperties, const css::uno::Reference< css::beans::XPropertySet > &rPropSet) const override
Application-specific filter.
the SvXMLTypeConverter converts values of various types from their internal representation to the tex...
Definition: xmluconv.hxx:77
#define CTF_PM_HEADERFILLBITMAPNAME
static void lcl_AddState(::std::vector< XMLPropertyState > &rPropState, sal_Int32 nIndex, const OUString &rProperty, const uno::Reference< beans::XPropertySet > &xProps)
XMLFootnoteSeparatorExport aFootnoteSeparatorExport
#define CTF_PM_FTN_LINE_WEIGHT
static bool lcl_HasSameLineWidth(const table::BorderLine2 &rLine1, const table::BorderLine2 &rLine2)
#define CTF_PM_PRINT_DRAWING
bool getBOOL(const Any &_rAny)
#define CTF_PM_HEADERGRAPHICURL
sal_Int32 mnIndex
Definition: maptype.hxx:106
#define CTF_PM_PADDINGRIGHT
static void lcl_RemoveState(XMLPropertyState *pState)
#define CTF_PM_BORDERLEFT
#define CTF_PM_FOOTERGRAPHICURL
#define CTF_PM_GRAPHICFILTER
#define CTF_PM_PADDINGBOTTOM
#define CTF_PM_HEADERMINHEIGHT
#define CTF_PM_MARGINALL
#define CTF_PM_GRAPHICURL
#define CTF_PM_FOOTERGRAPHICPOSITION
virtual void ContextFilter(bool bEnableFoFontFamily,::std::vector< XMLPropertyState > &rProperties, const css::uno::Reference< css::beans::XPropertySet > &rPropSet) const
Application-specific filter.
Definition: xmlexppr.cxx:638
#define CTF_PM_SCALETO
#define CTF_PM_BORDERTOP
#define CTF_PM_FOOTERFILLBITMAPNAME
#define CTF_PM_BORDERWIDTHLEFT
#define XML_PM_CTF_START
Definition: contextid.hxx:30
#define CTF_PM_FOOTERFILLGRADIENTNAME
#define CTF_PM_PRINT_GRID
#define CTF_PM_PRINT_HEADERS
#define CTF_PM_SCALETOX
#define CTF_PM_FILLBITMAPNAME
#define CTF_PM_HEADERREPEAT_OFFSET_Y
#define CTF_PM_BORDERWIDTHTOP
#define CTF_PM_PRINT_ZEROVALUES
virtual void handleElementItem(SvXMLExport &rExport, const XMLPropertyState &rProperty, SvXmlExportFlags nFlags, const ::std::vector< XMLPropertyState > *pProperties, sal_uInt32 nIdx) const override
this method is called for every item that has the MID_FLAG_ELEMENT_EXPORT flag set ...
#define CTF_PM_FOOTERREPEAT_OFFSET_X
virtual void handleSpecialItem(SvXMLAttributeList &rAttrList, const XMLPropertyState &rProperty, const SvXMLUnitConverter &rUnitConverter, const SvXMLNamespaceMap &rNamespaceMap, const ::std::vector< XMLPropertyState > *pProperties, sal_uInt32 nIdx) const override
this method is called for every item that has the MID_FLAG_SPECIAL_ITEM_EXPORT flag set ...
static void lcl_RemoveStateIfZero16(XMLPropertyState *pState)
void exportXML(const ::std::vector< XMLPropertyState > *pProperties, sal_uInt32 nIdx, const rtl::Reference< XMLPropertySetMapper > &rMapper)
#define CTF_PM_HEADERFILLGRADIENTNAME
#define CTF_PM_BORDERWIDTHRIGHT
#define CTF_PM_PRINTMASK
#define CTF_PM_BORDERWIDTHBOTTOM
#define CTF_PM_REPEAT_OFFSET_X
#define CTF_PM_FOOTERGRAPHICFILTER
#define CTF_PM_PRINT_CHARTS
#define CTF_PM_PRINT_OBJECTS
#define CTF_PM_HEADERFLAG
void exportXML(const css::uno::Any &rURL, const css::uno::Any *pPos, const css::uno::Any *pFilter, const css::uno::Any *pTransparency, sal_uInt16 nPrefix, const OUString &rLocalName)
#define CTF_PM_FILLHATCHNAME
#define CTF_PM_FOOTERFILLTRANSNAME
#define CTF_PM_FOOTERFILLHATCHNAME
#define CTF_PM_GRAPHICPOSITION
css::uno::Any maValue
Definition: maptype.hxx:107
SvXmlExportFlags
Definition: xmlexppr.hxx:39
#define CTF_PM_HEADERDYNAMIC
#define CTF_PM_BORDERWIDTHALL
#define CTF_PM_FOOTERMINHEIGHT
Handling of tokens in XML:
#define CTF_PM_SCALETOPAGES
#define CTP_PM_GRID_BASE_WIDTH
Smart struct to transport an Any with an index to the appropriate property-name.
Definition: maptype.hxx:104
#define CTF_PM_PRINT_ANNOTATIONS
XMLPageMasterExportPropMapper(const rtl::Reference< XMLPropertySetMapper > &rMapper, SvXMLExport &rExport)
#define CTF_PM_FOOTERHEIGHT
#define CTF_PM_PADDINGALL
#define CTF_PM_STANDARD_MODE
#define CTF_PM_PADDINGLEFT
#define CTP_PM_GRID_SNAP_TO
#define CTF_PM_FOOTERFLAG
#define CTF_PM_HEADERGRAPHICFILTER
#define CTF_PM_FILLTRANSNAME
#define CTF_PM_SCALETOY
#define CTF_PM_BORDERBOTTOM
#define CTF_PM_BORDERALL
css::uno::Any const SvXMLExport & rExport
Definition: ImageStyle.hxx:38
aStr
#define CTF_PM_TEXTCOLUMNS
#define CTF_PM_REPEAT_OFFSET_Y
sal_uInt16 nPos
bool any2bool(const css::uno::Any &rAny)
#define CTF_PM_PRINT_FORMULAS
sal_Int16 nValue
const rtl::Reference< XMLPropertySetMapper > & getPropertySetMapper() const
Definition: xmlexppr.cxx:1082
#define CTF_PM_HEADERREPEAT_OFFSET_X
#define CTF_PM_BORDERRIGHT
void exportXML(const css::uno::Any &rAny)