LibreOffice Module sc (master)  1
xmlstyle.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 
20 #include "xmlstyle.hxx"
21 #include "xmlexprt.hxx"
22 
23 #include <rangeutl.hxx>
24 #include <unonames.hxx>
25 
26 #include <o3tl/safeint.hxx>
27 #include <xmloff/xmlnamespace.hxx>
28 #include <xmloff/xmltypes.hxx>
29 #include <xmloff/families.hxx>
30 #include <xmloff/contextid.hxx>
31 #include <xmloff/txtprmap.hxx>
32 #include <sax/tools/converter.hxx>
33 #include <com/sun/star/util/CellProtection.hpp>
34 #include <com/sun/star/table/CellOrientation.hpp>
35 #include <com/sun/star/table/CellVertJustify2.hpp>
36 #include <com/sun/star/table/CellHoriJustify.hpp>
37 #include <com/sun/star/table/CellJustifyMethod.hpp>
38 #include <com/sun/star/table/BorderLine2.hpp>
39 #include <com/sun/star/sheet/XSheetConditionalEntry.hpp>
40 #include <com/sun/star/sheet/XSheetCondition.hpp>
41 #include <com/sun/star/beans/XPropertySet.hpp>
42 #include <com/sun/star/container/XIndexAccess.hpp>
43 #include <comphelper/extract.hxx>
44 
45 #include <rtl/ustrbuf.hxx>
46 #include <osl/diagnose.h>
47 
48 using namespace com::sun::star;
49 using namespace ::xmloff::token;
50 using namespace ::formula;
51 
52 #define MAP(name,prefix,token,type,context) { name, sizeof(name)-1, prefix, token, type, context, SvtSaveOptions::ODFSVER_010, false }
53 #define MAP_ODF13(name,prefix,token,type,context) { name, sizeof(name)-1, prefix, token, type, context, SvtSaveOptions::ODFSVER_013, false }
54 // extensions import/export
55 #define MAP_EXT(name,prefix,token,type,context) { name, sizeof(name)-1, prefix, token, type, context, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED, false }
56 // extensions import only
57 #define MAP_EXT_I(name,prefix,token,type,context) { name, sizeof(name)-1, prefix, token, type, context, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED, true }
58 #define MAP_END() { nullptr, 0, 0, XML_TOKEN_INVALID, 0, 0, SvtSaveOptions::ODFSVER_010, false }
59 
61 {
80  // FIXME this was wrongly exported to STYLE namespace since 2013
112  MAP_END()
113 };
114 
116 {
120  MAP_END()
121 };
122 
124 {
125  // #i57867# Include background color (CellBackColor/IsCellBackgroundTransparent) for import only.
126  // Import and export should use the same map, with MID_FLAG_NO_PROPERTY_EXPORT for the background entries,
127  // but this doesn't work at the moment because SvXMLImportPropertyMapper compares MID_FLAG_NO_PROPERTY to 0.
128  // If this is changed (not for 2.0.x), a single map can be used again.
129 
135  MAP_END()
136 };
137 
139 {
143  MAP_END()
144 };
145 
147 {
151  MAP_END()
152 };
153 
155 {
156  // #i57869# Include background color (CellBackColor/IsCellBackgroundTransparent) for import only.
157  // Import and export should use the same map, with MID_FLAG_NO_PROPERTY_EXPORT for the background entries,
158  // but this doesn't work at the moment because SvXMLImportPropertyMapper compares MID_FLAG_NO_PROPERTY to 0.
159  // If this is changed (not for 2.0.x), a single map can be used again.
160 
168  MAP_END()
169 };
170 
172 {
176  // ODF 1.3 OFFICE-2173
179  MAP_END()
180 };
181 
184  : SvXMLExportPropertyMapper(rMapper)
185 {
186 }
187 
189 {
190 }
191 
193  bool bEnableFoFontFamily,
194  ::std::vector< XMLPropertyState >& rProperties,
195  const uno::Reference< beans::XPropertySet >& rPropSet ) const
196 {
197  XMLPropertyState* pPadding = nullptr;
198  XMLPropertyState* pPadding_Bottom = nullptr;
199  XMLPropertyState* pPadding_Left = nullptr;
200  XMLPropertyState* pPadding_Right = nullptr;
201  XMLPropertyState* pPadding_Top = nullptr;
202 
203  XMLPropertyState* pBorder = nullptr;
204  XMLPropertyState* pBorder_Bottom = nullptr;
205  XMLPropertyState* pBorder_Left = nullptr;
206  XMLPropertyState* pBorder_Right = nullptr;
207  XMLPropertyState* pBorder_Top = nullptr;
208  XMLPropertyState* pSWBorder = nullptr;
209  XMLPropertyState* pSWBorder_Bottom = nullptr;
210  XMLPropertyState* pSWBorder_Left = nullptr;
211  XMLPropertyState* pSWBorder_Right = nullptr;
212  XMLPropertyState* pSWBorder_Top = nullptr;
213 
214  XMLPropertyState* pAllBorderWidthState = nullptr;
215  XMLPropertyState* pLeftBorderWidthState = nullptr;
216  XMLPropertyState* pRightBorderWidthState = nullptr;
217  XMLPropertyState* pTopBorderWidthState = nullptr;
218  XMLPropertyState* pBottomBorderWidthState = nullptr;
219  XMLPropertyState* pSWAllBorderWidthState = nullptr;
220  XMLPropertyState* pSWLeftBorderWidthState = nullptr;
221  XMLPropertyState* pSWRightBorderWidthState = nullptr;
222  XMLPropertyState* pSWTopBorderWidthState = nullptr;
223  XMLPropertyState* pSWBottomBorderWidthState = nullptr;
224  XMLPropertyState* pDiagonalTLBRWidthState = nullptr;
225  XMLPropertyState* pDiagonalBLTRWidthState = nullptr;
226 
227  XMLPropertyState* pParaMarginLeft = nullptr;
228  XMLPropertyState* pParaMarginLeftRel = nullptr;
229  XMLPropertyState* pParaMarginRight = nullptr;
230  XMLPropertyState* pParaMarginRightRel = nullptr;
231  XMLPropertyState* pParaMarginTop = nullptr;
232  XMLPropertyState* pParaMarginTopRel = nullptr;
233  XMLPropertyState* pParaMarginBottom = nullptr;
234  XMLPropertyState* pParaMarginBottomRel = nullptr;
235 
236  XMLPropertyState* pParaAdjust = nullptr;
237  XMLPropertyState* pParaAdjustLast = nullptr;
238 
239  for( auto& rProperty : rProperties )
240  {
241  XMLPropertyState* propertyState = &rProperty;
242  if (propertyState->mnIndex != -1)
243  {
244  switch( getPropertySetMapper()->GetEntryContextId( propertyState->mnIndex ) )
245  {
246  case CTF_SC_ALLPADDING: pPadding = propertyState; break;
247  case CTF_SC_BOTTOMPADDING: pPadding_Bottom = propertyState; break;
248  case CTF_SC_LEFTPADDING: pPadding_Left = propertyState; break;
249  case CTF_SC_RIGHTPADDING: pPadding_Right = propertyState; break;
250  case CTF_SC_TOPPADDING: pPadding_Top = propertyState; break;
251  case CTF_SC_ALLBORDER: pBorder = propertyState; break;
252  case CTF_SC_LEFTBORDER: pBorder_Left = propertyState; break;
253  case CTF_SC_RIGHTBORDER: pBorder_Right = propertyState; break;
254  case CTF_SC_BOTTOMBORDER: pBorder_Bottom = propertyState; break;
255  case CTF_SC_TOPBORDER: pBorder_Top = propertyState; break;
256  case CTF_SC_ALLBORDERWIDTH: pAllBorderWidthState = propertyState; break;
257  case CTF_SC_LEFTBORDERWIDTH: pLeftBorderWidthState = propertyState; break;
258  case CTF_SC_RIGHTBORDERWIDTH: pRightBorderWidthState = propertyState; break;
259  case CTF_SC_TOPBORDERWIDTH: pTopBorderWidthState = propertyState; break;
260  case CTF_SC_BOTTOMBORDERWIDTH: pBottomBorderWidthState = propertyState; break;
261  case CTF_ALLBORDER: pSWBorder = propertyState; break;
262  case CTF_LEFTBORDER: pSWBorder_Left = propertyState; break;
263  case CTF_RIGHTBORDER: pSWBorder_Right = propertyState; break;
264  case CTF_BOTTOMBORDER: pSWBorder_Bottom = propertyState; break;
265  case CTF_TOPBORDER: pSWBorder_Top = propertyState; break;
266  case CTF_ALLBORDERWIDTH: pSWAllBorderWidthState = propertyState; break;
267  case CTF_LEFTBORDERWIDTH: pSWLeftBorderWidthState = propertyState; break;
268  case CTF_RIGHTBORDERWIDTH: pSWRightBorderWidthState = propertyState; break;
269  case CTF_TOPBORDERWIDTH: pSWTopBorderWidthState = propertyState; break;
270  case CTF_BOTTOMBORDERWIDTH: pSWBottomBorderWidthState = propertyState; break;
271  case CTF_SC_DIAGONALTLBR: break; //old diagonal line attribute names without "s" are only read, not written
272  case CTF_SC_DIAGONALTLBRWIDTH: pDiagonalTLBRWidthState = propertyState; break;
273  case CTF_SC_DIAGONALBLTR: break; //old diagonal line attribute names without "s" are only read, not written
274  case CTF_SC_DIAGONALBLTRWIDTH: pDiagonalBLTRWidthState = propertyState; break;
275  case CTF_SD_SHAPE_PARA_ADJUST: pParaAdjust = propertyState; break;
276  case CTF_PARA_ADJUSTLAST: pParaAdjustLast = propertyState; break;
277  case CTF_PARALEFTMARGIN: pParaMarginLeft = propertyState; break;
278  case CTF_PARALEFTMARGIN_REL: pParaMarginLeftRel = propertyState; break;
279  case CTF_PARARIGHTMARGIN: pParaMarginRight = propertyState; break;
280  case CTF_PARARIGHTMARGIN_REL: pParaMarginRightRel = propertyState; break;
281  case CTF_PARATOPMARGIN: pParaMarginTop = propertyState; break;
282  case CTF_PARATOPMARGIN_REL: pParaMarginTopRel = propertyState; break;
283  case CTF_PARABOTTOMMARGIN: pParaMarginBottom = propertyState; break;
284  case CTF_PARABOTTOMMARGIN_REL: pParaMarginBottomRel = propertyState; break;
285  }
286  }
287  }
288 
289  if (pPadding && pPadding_Bottom && pPadding_Left && pPadding_Right && pPadding_Top)
290  {
291  sal_Int32 nBottom = 0, nTop = 0, nLeft = 0, nRight = 0;
292  if ((pPadding_Bottom->maValue >>= nBottom) &&
293  (pPadding_Left->maValue >>= nLeft) &&
294  (pPadding_Right->maValue >>= nRight) &&
295  (pPadding_Top->maValue >>= nTop))
296  {
297  if ((nBottom == nTop) && (nLeft == nRight) && (nTop == nLeft))
298  {
299  pPadding_Bottom->mnIndex = -1;
300  pPadding_Bottom->maValue.clear();
301  pPadding_Left->mnIndex = -1;
302  pPadding_Left->maValue.clear();
303  pPadding_Right->mnIndex = -1;
304  pPadding_Right->maValue.clear();
305  pPadding_Top->mnIndex = -1;
306  pPadding_Top->maValue.clear();
307  }
308  else
309  {
310  pPadding->mnIndex = -1;
311  pPadding->maValue.clear();
312  }
313  }
314  }
315  if( pBorder )
316  {
317  if( pBorder_Left && pBorder_Right && pBorder_Top && pBorder_Bottom )
318  {
319  table::BorderLine2 aLeft, aRight, aTop, aBottom;
320 
321  pBorder_Left->maValue >>= aLeft;
322  pBorder_Right->maValue >>= aRight;
323  pBorder_Top->maValue >>= aTop;
324  pBorder_Bottom->maValue >>= aBottom;
325  if( aLeft.Color == aRight.Color && aLeft.InnerLineWidth == aRight.InnerLineWidth &&
326  aLeft.OuterLineWidth == aRight.OuterLineWidth && aLeft.LineDistance == aRight.LineDistance &&
327  aLeft.Color == aTop.Color && aLeft.InnerLineWidth == aTop.InnerLineWidth &&
328  aLeft.OuterLineWidth == aTop.OuterLineWidth && aLeft.LineDistance == aTop.LineDistance &&
329  aLeft.Color == aBottom.Color && aLeft.InnerLineWidth == aBottom.InnerLineWidth &&
330  aLeft.OuterLineWidth == aBottom.OuterLineWidth && aLeft.LineDistance == aBottom.LineDistance &&
331  aLeft.LineStyle == aRight.LineStyle && aLeft.LineStyle == aTop.LineStyle &&
332  aLeft.LineStyle == aBottom.LineStyle && aLeft.LineWidth == aRight.LineWidth &&
333  aLeft.LineWidth == aTop.LineWidth && aLeft.LineWidth == aBottom.LineWidth )
334  {
335  pBorder_Left->mnIndex = -1;
336  pBorder_Left->maValue.clear();
337  pBorder_Right->mnIndex = -1;
338  pBorder_Right->maValue.clear();
339  pBorder_Top->mnIndex = -1;
340  pBorder_Top->maValue.clear();
341  pBorder_Bottom->mnIndex = -1;
342  pBorder_Bottom->maValue.clear();
343  }
344  else
345  {
346  pBorder->mnIndex = -1;
347  pBorder->maValue.clear();
348  }
349  }
350  else
351  {
352  pBorder->mnIndex = -1;
353  pBorder->maValue.clear();
354  }
355  }
356  if( pAllBorderWidthState )
357  {
358  if( pLeftBorderWidthState && pRightBorderWidthState && pTopBorderWidthState && pBottomBorderWidthState )
359  {
360  table::BorderLine2 aLeft, aRight, aTop, aBottom;
361 
362  pLeftBorderWidthState->maValue >>= aLeft;
363  pRightBorderWidthState->maValue >>= aRight;
364  pTopBorderWidthState->maValue >>= aTop;
365  pBottomBorderWidthState->maValue >>= aBottom;
366  if( aLeft.InnerLineWidth == aRight.InnerLineWidth && aLeft.OuterLineWidth == aRight.OuterLineWidth &&
367  aLeft.LineDistance == aRight.LineDistance && aLeft.InnerLineWidth == aTop.InnerLineWidth &&
368  aLeft.OuterLineWidth == aTop.OuterLineWidth && aLeft.LineDistance == aTop.LineDistance &&
369  aLeft.InnerLineWidth == aBottom.InnerLineWidth && aLeft.OuterLineWidth == aBottom.OuterLineWidth &&
370  aLeft.LineDistance == aBottom.LineDistance && aLeft.LineWidth == aRight.LineWidth &&
371  aLeft.LineWidth == aTop.LineWidth && aLeft.LineWidth == aBottom.LineWidth )
372  {
373  pLeftBorderWidthState->mnIndex = -1;
374  pLeftBorderWidthState->maValue.clear();
375  pRightBorderWidthState->mnIndex = -1;
376  pRightBorderWidthState->maValue.clear();
377  pTopBorderWidthState->mnIndex = -1;
378  pTopBorderWidthState->maValue.clear();
379  pBottomBorderWidthState->mnIndex = -1;
380  pBottomBorderWidthState->maValue.clear();
381  }
382  else
383  {
384  pAllBorderWidthState->mnIndex = -1;
385  pAllBorderWidthState->maValue.clear();
386  }
387  }
388  else
389  {
390  pAllBorderWidthState->mnIndex = -1;
391  pAllBorderWidthState->maValue.clear();
392  }
393  }
394 
395  if (pParaAdjust)
396  {
397  pParaAdjust->mnIndex = -1;
398  pParaAdjust->maValue.clear();
399  }
400  if (pParaAdjustLast)
401  {
402  pParaAdjustLast->mnIndex = -1;
403  pParaAdjustLast->maValue.clear();
404  }
405  if (pSWBorder)
406  {
407  pSWBorder->mnIndex = -1;
408  pSWBorder->maValue.clear();
409  }
410  if (pSWBorder_Left)
411  {
412  pSWBorder_Left->mnIndex = -1;
413  pSWBorder_Left->maValue.clear();
414  }
415  if (pSWBorder_Right)
416  {
417  pSWBorder_Right->mnIndex = -1;
418  pSWBorder_Right->maValue.clear();
419  }
420  if (pSWBorder_Bottom)
421  {
422  pSWBorder_Bottom->mnIndex = -1;
423  pSWBorder_Bottom->maValue.clear();
424  }
425  if (pSWBorder_Top)
426  {
427  pSWBorder_Top->mnIndex = -1;
428  pSWBorder_Top->maValue.clear();
429  }
430  if (pSWAllBorderWidthState)
431  {
432  pSWAllBorderWidthState->mnIndex = -1;
433  pSWAllBorderWidthState->maValue.clear();
434  }
435  if (pSWLeftBorderWidthState)
436  {
437  pSWLeftBorderWidthState->mnIndex = -1;
438  pSWLeftBorderWidthState->maValue.clear();
439  }
440  if (pSWRightBorderWidthState)
441  {
442  pSWRightBorderWidthState->mnIndex = -1;
443  pSWRightBorderWidthState->maValue.clear();
444  }
445  if (pSWTopBorderWidthState)
446  {
447  pSWTopBorderWidthState->mnIndex = -1;
448  pSWTopBorderWidthState->maValue.clear();
449  }
450  if (pSWBottomBorderWidthState)
451  {
452  pSWBottomBorderWidthState->mnIndex = -1;
453  pSWBottomBorderWidthState->maValue.clear();
454  }
455 
456  if (pParaMarginLeft)
457  {
458  pParaMarginLeft->mnIndex = -1;
459  pParaMarginLeft->maValue.clear();
460  }
461  if (pParaMarginLeftRel)
462  {
463  pParaMarginLeftRel->mnIndex = -1;
464  pParaMarginLeftRel->maValue.clear();
465  }
466  if (pParaMarginRight)
467  {
468  pParaMarginRight->mnIndex = -1;
469  pParaMarginRight->maValue.clear();
470  }
471  if (pParaMarginRightRel)
472  {
473  pParaMarginRightRel->mnIndex = -1;
474  pParaMarginRightRel->maValue.clear();
475  }
476  if (pParaMarginTop)
477  {
478  pParaMarginTop->mnIndex = -1;
479  pParaMarginTop->maValue.clear();
480  }
481  if (pParaMarginTopRel)
482  {
483  pParaMarginTopRel->mnIndex = -1;
484  pParaMarginTopRel->maValue.clear();
485  }
486  if (pParaMarginBottom)
487  {
488  pParaMarginBottom->mnIndex = -1;
489  pParaMarginBottom->maValue.clear();
490  }
491  if (pParaMarginBottomRel)
492  {
493  pParaMarginBottomRel->mnIndex = -1;
494  pParaMarginBottomRel->maValue.clear();
495  }
496 
497  // #i102690# old diagonal line attribute names without "s" are only read, not written
498  if (pDiagonalTLBRWidthState)
499  {
500  pDiagonalTLBRWidthState->mnIndex = -1;
501  pDiagonalTLBRWidthState->maValue.clear();
502  }
503  if (pDiagonalBLTRWidthState)
504  {
505  pDiagonalBLTRWidthState->mnIndex = -1;
506  pDiagonalBLTRWidthState->maValue.clear();
507  }
508 
509  SvXMLExportPropertyMapper::ContextFilter(bEnableFoFontFamily, rProperties, rPropSet);
510 }
511 
514  SvXMLAttributeList& /* rAttrList */,
515  const XMLPropertyState& /* rProperty */,
516  const SvXMLUnitConverter& /* rUnitConverter */,
517  const SvXMLNamespaceMap& /* rNamespaceMap */,
518  const ::std::vector< XMLPropertyState > * /* pProperties */,
519  sal_uInt32 /* nIdx */ ) const
520 {
521  // the SpecialItem NumberFormat must not be handled by this method
522  // the SpecialItem ConditionlaFormat must not be handled by this method
523  // the SpecialItem CharBackColor must not be handled by this method
524 }
526  SvXMLExport& rExport,
527  const XMLPropertyState& rProperty,
528  SvXmlExportFlags /* nFlags */,
529  const ::std::vector< XMLPropertyState > * /* pProperties */,
530  sal_uInt32 /* nIdx */) const
531 {
532  sal_uInt32 nContextId = getPropertySetMapper()->GetEntryContextId( rProperty.mnIndex );
533  OUString sURL;
534  if ( ( nContextId == CTF_SC_HYPERLINK ) &&
535  ( rProperty.maValue >>= sURL ) &&
536  !sURL.isEmpty() )
537  {
538  rExport.AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, sURL );
540  XML_SIMPLE );
541  sal_uInt32 nPropIndex = rProperty.mnIndex;
542  sal_uInt16 nPrefix = getPropertySetMapper()->GetEntryNameSpace( nPropIndex );
543  OUString sLocalName = getPropertySetMapper()->GetEntryXMLName( nPropIndex );
544  SvXMLElementExport aElem( rExport, nPrefix, sLocalName, true, true );
545  }
546 }
547 
550  : SvXMLExportPropertyMapper(rMapper)
551 {
552 }
553 
555 {
556 }
557 
559  bool /* bEnableFoFontFamily */,
560  ::std::vector< XMLPropertyState >& /* rProperties */,
561  const uno::Reference< beans::XPropertySet >& /* rPropSet */ ) const
562 {
563  //#108550#; don't filter the height, so other applications know the calculated height
564 }
565 
568  : SvXMLExportPropertyMapper(rMapper)
569 {
570 }
571 
573 {
574 }
575 
578  SvXMLAttributeList& /* rAttrList */,
579  const XMLPropertyState& /* rProperty */,
580  const SvXMLUnitConverter& /* rUnitConverter */,
581  const SvXMLNamespaceMap& /* rNamespaceMap */,
582  const ::std::vector< XMLPropertyState > * /* pProperties */,
583  sal_uInt32 /* nIdx */ ) const
584 {
585  // the SpecialItem IsVisible must not be handled by this method
586 }
587 
590  : SvXMLExportPropertyMapper(rMapper)
591 {
592 }
593 
595 {
596 }
597 
600  SvXMLAttributeList& /* rAttrList */,
601  const XMLPropertyState& /* rProperty */,
602  const SvXMLUnitConverter& /* rUnitConverter */,
603  const SvXMLNamespaceMap& /* rNamespaceMap */,
604  const ::std::vector< XMLPropertyState > * /* pProperties */,
605  sal_uInt32 /* nIdx */ ) const
606 {
607  // the SpecialItem PageStyle must not be handled by this method
608 }
609 
611  SvXMLAttributeList& rAttrList,
612  XmlStyleFamily nFamily,
613  const ::std::vector< XMLPropertyState >& rProperties,
614  const SvXMLExportPropertyMapper& rPropExp
615  , const SvXMLUnitConverter& rUnitConverter,
616  const SvXMLNamespaceMap& rNamespaceMap
617  ) const
618 {
619  SvXMLAutoStylePoolP::exportStyleAttributes( rAttrList, nFamily, rProperties, rPropExp, rUnitConverter, rNamespaceMap );
620  if (nFamily == XmlStyleFamily::TABLE_CELL)
621  {
622  for(const auto& rProperty : rProperties)
623  {
625  sal_Int16 nContextID(aPropMapper->GetEntryContextId(rProperty.mnIndex));
626  switch (nContextID)
627  {
628  case CTF_SC_NUMBERFORMAT :
629  {
630  sal_Int32 nNumberFormat = 0;
631  if (rProperty.maValue >>= nNumberFormat)
632  {
633  OUString sAttrValue(rScXMLExport.getDataStyleName(nNumberFormat));
634  if (!sAttrValue.isEmpty())
635  {
637  aPropMapper->GetEntryNameSpace(rProperty.mnIndex),
638  aPropMapper->GetEntryXMLName(rProperty.mnIndex),
639  sAttrValue );
640  }
641  }
642  }
643  break;
644  }
645  }
646  }
647  else if (nFamily == XmlStyleFamily::TABLE_TABLE)
648  {
649  for(const auto& rProperty : rProperties)
650  {
652  sal_Int16 nContextID(aPropMapper->GetEntryContextId(rProperty.mnIndex));
653  switch (nContextID)
654  {
655  case CTF_SC_MASTERPAGENAME :
656  {
657  OUString sName;
658  if (rProperty.maValue >>= sName)
659  {
661  aPropMapper->GetEntryNameSpace(rProperty.mnIndex),
662  aPropMapper->GetEntryXMLName(rProperty.mnIndex),
663  GetExport().EncodeStyleName( sName ));
664  }
665  }
666  break;
667  }
668  }
669  }
670 }
671 
673  const css::uno::Reference< css::xml::sax::XDocumentHandler > & rHandler,
674  XmlStyleFamily nFamily,
675  const std::vector< XMLPropertyState >& rProperties,
676  const SvXMLExportPropertyMapper& rPropExp
677  , const SvXMLUnitConverter& rUnitConverter,
678  const SvXMLNamespaceMap& rNamespaceMap
679  ) const
680 {
681  SvXMLAutoStylePoolP::exportStyleContent( rHandler, nFamily, rProperties, rPropExp, rUnitConverter, rNamespaceMap );
682  if (nFamily != XmlStyleFamily::TABLE_CELL)
683  return;
684 
685  for(const auto& rProperty : rProperties)
686  {
687  if (rProperty.mnIndex != -1)
688  {
689  sal_Int16 nContextID = rScXMLExport.GetCellStylesPropertySetMapper()->GetEntryContextId(rProperty.mnIndex);
690  switch (nContextID)
691  {
692  case CTF_SC_MAP :
693  {
694  uno::Reference<container::XIndexAccess> xIndex( rProperty.maValue, uno::UNO_QUERY );
695  if ( xIndex.is() )
696  {
697  sal_Int32 nConditionCount(xIndex->getCount());
698  for (sal_Int32 nCondition = 0; nCondition < nConditionCount; ++nCondition)
699  {
700  uno::Reference <sheet::XSheetConditionalEntry> xSheetConditionalEntry(xIndex->getByIndex(nCondition), uno::UNO_QUERY);
701  if (xSheetConditionalEntry.is())
702  {
703  OUString sStyleName(xSheetConditionalEntry->getStyleName());
704  uno::Reference <sheet::XSheetCondition> xSheetCondition(xSheetConditionalEntry, uno::UNO_QUERY);
705  if (xSheetCondition.is())
706  {
707  sheet::ConditionOperator aOperator = xSheetCondition->getOperator();
708  if (aOperator != sheet::ConditionOperator_NONE)
709  {
710  if (aOperator == sheet::ConditionOperator_FORMULA)
711  {
712  OUString sCondition = "is-true-formula("
713  + xSheetCondition->getFormula1()
714  + ")";
717  OUString sOUBaseAddress;
720  xSheetCondition->getSourcePosition(), pDoc, FormulaGrammar::CONV_OOO );
723  }
724  else
725  {
726  OUString sCondition;
727  if (aOperator == sheet::ConditionOperator_BETWEEN ||
728  aOperator == sheet::ConditionOperator_NOT_BETWEEN)
729  {
730  if (aOperator == sheet::ConditionOperator_BETWEEN)
731  sCondition = "cell-content-is-between(";
732  else
733  sCondition = "cell-content-is-not-between(";
734  sCondition += xSheetCondition->getFormula1()
735  + ","
736  + xSheetCondition->getFormula2()
737  + ")";
738  }
739  else
740  {
741  sCondition = "cell-content()";
742  switch (aOperator)
743  {
744  case sheet::ConditionOperator_LESS:
745  sCondition += "<";
746  break;
747  case sheet::ConditionOperator_GREATER:
748  sCondition += ">";
749  break;
750  case sheet::ConditionOperator_LESS_EQUAL:
751  sCondition += "<=";
752  break;
753  case sheet::ConditionOperator_GREATER_EQUAL:
754  sCondition += ">=";
755  break;
756  case sheet::ConditionOperator_EQUAL:
757  sCondition += "=";
758  break;
759  case sheet::ConditionOperator_NOT_EQUAL:
760  sCondition += "!=";
761  break;
762  default:
763  {
764  // added to avoid warnings
765  }
766  }
767  sCondition += xSheetCondition->getFormula1();
768  }
771  OUString sOUBaseAddress;
773  xSheetCondition->getSourcePosition(), rScXMLExport.GetDocument(), FormulaGrammar::CONV_OOO );
776  }
777  }
778  }
779  }
780  }
781  }
782  }
783  break;
784  }
785  }
786  }
787 }
788 
790  SvXMLAutoStylePoolP(rTempScXMLExport),
791  rScXMLExport(rTempScXMLExport)
792 {
793 }
794 
796 {
797 }
798 
800 {
801 }
802 
804 {
805 }
806 
808 {
809  nType &= MID_FLAG_MASK;
810 
811  XMLPropertyHandler* pHdl(const_cast<XMLPropertyHandler*>(XMLPropertyHandlerFactory::GetPropertyHandler( nType )));
812  if(!pHdl)
813  {
814  switch(nType)
815  {
817  {
818  pHdl = new XmlScPropHdl_CellProtection;
819  }
820  break;
822  {
823  pHdl = new XmlScPropHdl_PrintContent;
824  }
825  break;
828  {
829  pHdl = new XmlScPropHdl_JustifyMethod;
830  }
831  break;
833  {
834  pHdl = new XmlScPropHdl_HoriJustify;
835  }
836  break;
838  {
840  }
841  break;
843  {
845  }
846  break;
848  {
849  pHdl = new XmlScPropHdl_Orientation;
850  }
851  break;
853  {
854  pHdl = new XmlScPropHdl_RotateAngle;
855  }
856  break;
858  {
859  pHdl = new XmlScPropHdl_RotateReference;
860  }
861  break;
863  {
864  pHdl = new XmlScPropHdl_VertJustify;
865  }
866  break;
868  {
869  pHdl = new XmlScPropHdl_BreakBefore;
870  }
871  break;
872  case XML_SC_ISTEXTWRAPPED :
873  {
874  pHdl = new XmlScPropHdl_IsTextWrapped;
875  }
876  break;
877  case XML_SC_TYPE_EQUAL :
878  {
879  pHdl = new XmlScPropHdl_IsEqual;
880  }
881  break;
882  case XML_SC_TYPE_VERTICAL :
883  {
884  pHdl = new XmlScPropHdl_Vertical;
885  }
886  break;
887  }
888 
889  if(pHdl)
890  PutHdlCache(nType, pHdl);
891  }
892 
893  return pHdl;
894 }
895 
897 {
898 }
899 
901  const css::uno::Any& r1,
902  const css::uno::Any& r2 ) const
903 {
904  util::CellProtection aCellProtection1, aCellProtection2;
905 
906  if((r1 >>= aCellProtection1) && (r2 >>= aCellProtection2))
907  {
908  return ((aCellProtection1.IsHidden == aCellProtection2.IsHidden) &&
909  (aCellProtection1.IsLocked == aCellProtection2.IsLocked) &&
910  (aCellProtection1.IsFormulaHidden == aCellProtection2.IsFormulaHidden));
911  }
912  return false;
913 }
914 
916  const OUString& rStrImpValue,
917  css::uno::Any& rValue,
918  const SvXMLUnitConverter& /* rUnitConverter */ ) const
919 {
920  bool bRetval(false);
921 
922  util::CellProtection aCellProtection;
923  bool bDefault(false);
924  if (!rValue.hasValue())
925  {
926  aCellProtection.IsHidden = false;
927  aCellProtection.IsLocked = true;
928  aCellProtection.IsFormulaHidden = false;
929  aCellProtection.IsPrintHidden = false;
930  bDefault = true;
931  }
932  if ((rValue >>= aCellProtection) || bDefault)
933  {
934  if (IsXMLToken(rStrImpValue, XML_NONE))
935  {
936  aCellProtection.IsFormulaHidden = false;
937  aCellProtection.IsHidden = false;
938  aCellProtection.IsLocked = false;
939  rValue <<= aCellProtection;
940  bRetval = true;
941  }
942  else if (IsXMLToken(rStrImpValue, XML_HIDDEN_AND_PROTECTED))
943  {
944  aCellProtection.IsFormulaHidden = true;
945  aCellProtection.IsHidden = true;
946  aCellProtection.IsLocked = true;
947  rValue <<= aCellProtection;
948  bRetval = true;
949  }
950  else if (IsXMLToken(rStrImpValue, XML_PROTECTED))
951  {
952  aCellProtection.IsFormulaHidden = false;
953  aCellProtection.IsHidden = false;
954  aCellProtection.IsLocked = true;
955  rValue <<= aCellProtection;
956  bRetval = true;
957  }
958  else if (IsXMLToken(rStrImpValue, XML_FORMULA_HIDDEN))
959  {
960  aCellProtection.IsFormulaHidden = true;
961  aCellProtection.IsHidden = false;
962  aCellProtection.IsLocked = false;
963  rValue <<= aCellProtection;
964  bRetval = true;
965  }
966  else
967  {
968  sal_Int32 i(0);
969  while (i < rStrImpValue.getLength() && rStrImpValue[i] != ' ')
970  ++i;
971  OUString sFirst(rStrImpValue.copy(0, i));
972  OUString sSecond(rStrImpValue.copy(i + 1));
973  aCellProtection.IsFormulaHidden = false;
974  aCellProtection.IsHidden = false;
975  aCellProtection.IsLocked = false;
976  if ((IsXMLToken(sFirst, XML_PROTECTED)) || (IsXMLToken(sSecond, XML_PROTECTED)))
977  aCellProtection.IsLocked = true;
978  if ((IsXMLToken(sFirst, XML_FORMULA_HIDDEN)) || (IsXMLToken(sSecond, XML_FORMULA_HIDDEN)))
979  aCellProtection.IsFormulaHidden = true;
980  rValue <<= aCellProtection;
981  bRetval = true;
982  }
983  }
984 
985  return bRetval;
986 }
987 
989  OUString& rStrExpValue,
990  const css::uno::Any& rValue,
991  const SvXMLUnitConverter& /* rUnitConverter */ ) const
992 {
993  bool bRetval(false);
994  util::CellProtection aCellProtection;
995 
996  if(rValue >>= aCellProtection)
997  {
998  if (!(aCellProtection.IsFormulaHidden || aCellProtection.IsHidden || aCellProtection.IsLocked))
999  {
1000  rStrExpValue = GetXMLToken(XML_NONE);
1001  bRetval = true;
1002  }
1003  else if (aCellProtection.IsHidden)
1004  {
1005  // #i105964# "Hide all" implies "Protected" in the UI, so it must be saved as "hidden-and-protected"
1006  // even if "IsLocked" is not set in the CellProtection struct.
1007  rStrExpValue = GetXMLToken(XML_HIDDEN_AND_PROTECTED);
1008  bRetval = true;
1009  }
1010  else if (aCellProtection.IsLocked && !aCellProtection.IsFormulaHidden)
1011  {
1012  rStrExpValue = GetXMLToken(XML_PROTECTED);
1013  bRetval = true;
1014  }
1015  else if (aCellProtection.IsFormulaHidden && !aCellProtection.IsLocked)
1016  {
1017  rStrExpValue = GetXMLToken(XML_FORMULA_HIDDEN);
1018  bRetval = true;
1019  }
1020  else if (aCellProtection.IsFormulaHidden && aCellProtection.IsLocked)
1021  {
1022  rStrExpValue = GetXMLToken(XML_PROTECTED);
1023  rStrExpValue += " ";
1024  rStrExpValue += GetXMLToken(XML_FORMULA_HIDDEN);
1025  bRetval = true;
1026  }
1027  }
1028 
1029  return bRetval;
1030 }
1031 
1033 {
1034 }
1035 
1037  const css::uno::Any& r1,
1038  const css::uno::Any& r2 ) const
1039 {
1040  util::CellProtection aCellProtection1, aCellProtection2;
1041 
1042  if((r1 >>= aCellProtection1) && (r2 >>= aCellProtection2))
1043  {
1044  return (aCellProtection1.IsPrintHidden == aCellProtection2.IsPrintHidden);
1045  }
1046  return false;
1047 }
1048 
1050  const OUString& rStrImpValue,
1051  css::uno::Any& rValue,
1052  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1053 {
1054  bool bRetval(false);
1055  util::CellProtection aCellProtection;
1056  bool bDefault(false);
1057  if (!rValue.hasValue())
1058  {
1059  aCellProtection.IsHidden = false;
1060  aCellProtection.IsLocked = true;
1061  aCellProtection.IsFormulaHidden = false;
1062  aCellProtection.IsPrintHidden = false;
1063  bDefault = true;
1064  }
1065  if ((rValue >>= aCellProtection) || bDefault)
1066  {
1067  bool bValue(false);
1068  if (::sax::Converter::convertBool(bValue, rStrImpValue))
1069  {
1070  aCellProtection.IsPrintHidden = !bValue;
1071  rValue <<= aCellProtection;
1072  bRetval = true;
1073  }
1074  }
1075 
1076  return bRetval;
1077 }
1078 
1080  OUString& rStrExpValue,
1081  const css::uno::Any& rValue,
1082  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1083 {
1084  bool bRetval(false);
1085 
1086  util::CellProtection aCellProtection;
1087  if(rValue >>= aCellProtection)
1088  {
1089  OUStringBuffer sValue;
1090  ::sax::Converter::convertBool(sValue, !aCellProtection.IsPrintHidden);
1091  rStrExpValue = sValue.makeStringAndClear();
1092  bRetval = true;
1093  }
1094 
1095  return bRetval;
1096 }
1097 
1099 {
1100 }
1101 
1103  const css::uno::Any& r1,
1104  const css::uno::Any& r2 ) const
1105 {
1106  sal_Int32 nVal1(0), nVal2(0);
1107 
1108  if((r1 >>= nVal1) && (r2 >>= nVal2))
1109  return (nVal1 == nVal2);
1110  return false;
1111 }
1112 
1114  const OUString& rStrImpValue,
1115  css::uno::Any& rValue,
1116  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1117 {
1118  bool bRetval = false;
1119 
1120  sal_Int32 nValue = table::CellJustifyMethod::AUTO;
1121  if (IsXMLToken(rStrImpValue, XML_AUTO))
1122  {
1123  nValue = table::CellJustifyMethod::AUTO;
1124  rValue <<= nValue;
1125  bRetval = true;
1126  }
1127  else if (IsXMLToken(rStrImpValue, XML_DISTRIBUTE))
1128  {
1129  nValue = table::CellJustifyMethod::DISTRIBUTE;
1130  rValue <<= nValue;
1131  bRetval = true;
1132  }
1133  else
1134  bRetval = true;
1135 
1136  return bRetval;
1137 }
1138 
1140  OUString& rStrExpValue,
1141  const css::uno::Any& rValue,
1142  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1143 {
1144  sal_Int32 nVal(0);
1145  bool bRetval = false;
1146 
1147  if (rValue >>= nVal)
1148  {
1149  switch (nVal)
1150  {
1151  case table::CellJustifyMethod::AUTO:
1152  {
1153  rStrExpValue = GetXMLToken(XML_AUTO);
1154  bRetval = true;
1155  }
1156  break;
1157  case table::CellJustifyMethod::DISTRIBUTE:
1158  {
1159  rStrExpValue = GetXMLToken(XML_DISTRIBUTE);
1160  bRetval = true;
1161  }
1162  break;
1163  default:
1164  {
1165  // added to avoid warnings
1166  }
1167  }
1168  }
1169  return bRetval;
1170 }
1171 
1173 {
1174 }
1175 
1177  const css::uno::Any& r1,
1178  const css::uno::Any& r2 ) const
1179 {
1180  table::CellHoriJustify aHoriJustify1, aHoriJustify2;
1181 
1182  if((r1 >>= aHoriJustify1) && (r2 >>= aHoriJustify2))
1183  return (aHoriJustify1 == aHoriJustify2);
1184  return false;
1185 }
1186 
1188  const OUString& rStrImpValue,
1189  css::uno::Any& rValue,
1190  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1191 {
1192  bool bRetval(false);
1193 
1194  table::CellHoriJustify nValue = table::CellHoriJustify_LEFT;
1195  rValue >>= nValue;
1196  if (nValue != table::CellHoriJustify_REPEAT)
1197  {
1198  if (IsXMLToken(rStrImpValue, XML_START))
1199  {
1200  nValue = table::CellHoriJustify_LEFT;
1201  rValue <<= nValue;
1202  bRetval = true;
1203  }
1204  else if (IsXMLToken(rStrImpValue, XML_END))
1205  {
1206  nValue = table::CellHoriJustify_RIGHT;
1207  rValue <<= nValue;
1208  bRetval = true;
1209  }
1210  else if (IsXMLToken(rStrImpValue, XML_CENTER))
1211  {
1212  nValue = table::CellHoriJustify_CENTER;
1213  rValue <<= nValue;
1214  bRetval = true;
1215  }
1216  else if (IsXMLToken(rStrImpValue, XML_JUSTIFY))
1217  {
1218  nValue = table::CellHoriJustify_BLOCK;
1219  rValue <<= nValue;
1220  bRetval = true;
1221  }
1222  }
1223  else
1224  bRetval = true;
1225 
1226  return bRetval;
1227 }
1228 
1230  OUString& rStrExpValue,
1231  const css::uno::Any& rValue,
1232  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1233 {
1234  table::CellHoriJustify nVal;
1235  bool bRetval(false);
1236 
1237  if(rValue >>= nVal)
1238  {
1239  switch (nVal)
1240  {
1241  case table::CellHoriJustify_REPEAT:
1242  case table::CellHoriJustify_LEFT:
1243  {
1244  rStrExpValue = GetXMLToken(XML_START);
1245  bRetval = true;
1246  }
1247  break;
1248  case table::CellHoriJustify_RIGHT:
1249  {
1250  rStrExpValue = GetXMLToken(XML_END);
1251  bRetval = true;
1252  }
1253  break;
1254  case table::CellHoriJustify_CENTER:
1255  {
1256  rStrExpValue = GetXMLToken(XML_CENTER);
1257  bRetval = true;
1258  }
1259  break;
1260  case table::CellHoriJustify_BLOCK:
1261  {
1262  rStrExpValue = GetXMLToken(XML_JUSTIFY);
1263  bRetval = true;
1264  }
1265  break;
1266  default:
1267  {
1268  // added to avoid warnings
1269  }
1270  }
1271  }
1272 
1273  return bRetval;
1274 }
1275 
1277 {
1278 }
1279 
1281  const css::uno::Any& r1,
1282  const css::uno::Any& r2 ) const
1283 {
1284  table::CellHoriJustify aHoriJustify1, aHoriJustify2;
1285 
1286  if((r1 >>= aHoriJustify1) && (r2 >>= aHoriJustify2))
1287  return (aHoriJustify1 == aHoriJustify2);
1288  return false;
1289 }
1290 
1292  const OUString& rStrImpValue,
1293  css::uno::Any& rValue,
1294  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1295 {
1296  bool bRetval(false);
1297 
1298  if (IsXMLToken(rStrImpValue, XML_FIX))
1299  {
1300  bRetval = true;
1301  }
1302  else if (IsXMLToken(rStrImpValue, XML_VALUE_TYPE))
1303  {
1304  rValue <<= table::CellHoriJustify_STANDARD;
1305  bRetval = true;
1306  }
1307 
1308  return bRetval;
1309 }
1310 
1312  OUString& rStrExpValue,
1313  const css::uno::Any& rValue,
1314  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1315 {
1316  table::CellHoriJustify nVal;
1317  bool bRetval(false);
1318 
1319  if(rValue >>= nVal)
1320  {
1321  if (nVal == table::CellHoriJustify_STANDARD)
1322  {
1323  rStrExpValue = GetXMLToken(XML_VALUE_TYPE);
1324  bRetval = true;
1325  }
1326  else
1327  {
1328  rStrExpValue = GetXMLToken(XML_FIX);
1329  bRetval = true;
1330  }
1331  }
1332 
1333  return bRetval;
1334 }
1335 
1337 {
1338 }
1339 
1341  const css::uno::Any& r1,
1342  const css::uno::Any& r2 ) const
1343 {
1344  table::CellHoriJustify aHoriJustify1, aHoriJustify2;
1345 
1346  if((r1 >>= aHoriJustify1) && (r2 >>= aHoriJustify2))
1347  return (aHoriJustify1 == aHoriJustify2);
1348  return false;
1349 }
1350 
1352  const OUString& rStrImpValue,
1353  css::uno::Any& rValue,
1354  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1355 {
1356  bool bRetval(false);
1357 
1358  if (IsXMLToken(rStrImpValue, XML_FALSE))
1359  {
1360  bRetval = true;
1361  }
1362  else if (IsXMLToken(rStrImpValue, XML_TRUE))
1363  {
1364  rValue <<= table::CellHoriJustify_REPEAT;
1365  bRetval = true;
1366  }
1367 
1368  return bRetval;
1369 }
1370 
1372  OUString& rStrExpValue,
1373  const css::uno::Any& rValue,
1374  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1375 {
1376  table::CellHoriJustify nVal;
1377  bool bRetval(false);
1378 
1379  if(rValue >>= nVal)
1380  {
1381  if (nVal == table::CellHoriJustify_REPEAT)
1382  {
1383  rStrExpValue = GetXMLToken(XML_TRUE);
1384  bRetval = true;
1385  }
1386  else
1387  {
1388  rStrExpValue = GetXMLToken(XML_FALSE);
1389  bRetval = true;
1390  }
1391  }
1392 
1393  return bRetval;
1394 }
1395 
1397 {
1398 }
1399 
1401  const css::uno::Any& r1,
1402  const css::uno::Any& r2 ) const
1403 {
1404  table::CellOrientation aOrientation1, aOrientation2;
1405 
1406  if((r1 >>= aOrientation1) && (r2 >>= aOrientation2))
1407  return (aOrientation1 == aOrientation2);
1408  return false;
1409 }
1410 
1412  const OUString& rStrImpValue,
1413  css::uno::Any& rValue,
1414  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1415 {
1416  bool bRetval(false);
1417 
1418  table::CellOrientation nValue;
1419  if (IsXMLToken(rStrImpValue, XML_LTR))
1420  {
1421  nValue = table::CellOrientation_STANDARD;
1422  rValue <<= nValue;
1423  bRetval = true;
1424  }
1425  else if (IsXMLToken(rStrImpValue, XML_TTB))
1426  {
1427  nValue = table::CellOrientation_STACKED;
1428  rValue <<= nValue;
1429  bRetval = true;
1430  }
1431 
1432  return bRetval;
1433 }
1434 
1436  OUString& rStrExpValue,
1437  const css::uno::Any& rValue,
1438  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1439 {
1440  table::CellOrientation nVal;
1441  bool bRetval(false);
1442 
1443  if(rValue >>= nVal)
1444  {
1445  switch (nVal)
1446  {
1447  case table::CellOrientation_STACKED :
1448  {
1449  rStrExpValue = GetXMLToken(XML_TTB);
1450  bRetval = true;
1451  }
1452  break;
1453  default:
1454  {
1455  rStrExpValue = GetXMLToken(XML_LTR);
1456  bRetval = true;
1457  }
1458  break;
1459  }
1460  }
1461 
1462  return bRetval;
1463 }
1464 
1466 {
1467 }
1468 
1470  const css::uno::Any& r1,
1471  const css::uno::Any& r2 ) const
1472 {
1473  sal_Int32 aAngle1 = 0, aAngle2 = 0;
1474 
1475  if((r1 >>= aAngle1) && (r2 >>= aAngle2))
1476  return (aAngle1 == aAngle2);
1477  return false;
1478 }
1479 
1481  const OUString& rStrImpValue,
1482  css::uno::Any& rValue,
1483  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1484 {
1485  bool bRetval(false);
1486 
1487  sal_Int32 nValue;
1488  if (::sax::Converter::convertNumber(nValue, rStrImpValue) && !o3tl::checked_multiply<sal_Int32>(nValue, 100, nValue))
1489  {
1490  rValue <<= nValue;
1491  bRetval = true;
1492  }
1493 
1494  return bRetval;
1495 }
1496 
1498  OUString& rStrExpValue,
1499  const css::uno::Any& rValue,
1500  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1501 {
1502  sal_Int32 nVal = 0;
1503  bool bRetval(false);
1504 
1505  if(rValue >>= nVal)
1506  {
1507  rStrExpValue = OUString::number(nVal / 100);
1508  bRetval = true;
1509  }
1510 
1511  return bRetval;
1512 }
1513 
1515 {
1516 }
1517 
1519  const css::uno::Any& r1,
1520  const css::uno::Any& r2 ) const
1521 {
1522  sal_Int32 aReference1(0), aReference2(0);
1523 
1524  if((r1 >>= aReference1) && (r2 >>= aReference2))
1525  return (aReference1 == aReference2);
1526  return false;
1527 }
1528 
1530  const OUString& rStrImpValue,
1531  css::uno::Any& rValue,
1532  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1533 {
1534  bool bRetval(false);
1535 
1536  sal_Int32 nValue;
1537  if (IsXMLToken(rStrImpValue, XML_NONE))
1538  {
1539  nValue = table::CellVertJustify2::STANDARD;
1540  rValue <<= nValue;
1541  bRetval = true;
1542  }
1543  else if (IsXMLToken(rStrImpValue, XML_BOTTOM))
1544  {
1545  nValue = table::CellVertJustify2::BOTTOM;
1546  rValue <<= nValue;
1547  bRetval = true;
1548  }
1549  else if (IsXMLToken(rStrImpValue, XML_TOP))
1550  {
1551  nValue = table::CellVertJustify2::TOP;
1552  rValue <<= nValue;
1553  bRetval = true;
1554  }
1555  else if (IsXMLToken(rStrImpValue, XML_CENTER))
1556  {
1557  nValue = table::CellVertJustify2::CENTER;
1558  rValue <<= nValue;
1559  bRetval = true;
1560  }
1561 
1562  return bRetval;
1563 }
1564 
1566  OUString& rStrExpValue,
1567  const css::uno::Any& rValue,
1568  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1569 {
1570  sal_Int32 nVal(0);
1571  bool bRetval(false);
1572 
1573  if(rValue >>= nVal)
1574  {
1575  switch (nVal)
1576  {
1577  case table::CellVertJustify2::BOTTOM :
1578  {
1579  rStrExpValue = GetXMLToken(XML_BOTTOM);
1580  bRetval = true;
1581  }
1582  break;
1583  case table::CellVertJustify2::CENTER :
1584  {
1585  rStrExpValue = GetXMLToken(XML_CENTER);
1586  bRetval = true;
1587  }
1588  break;
1589  case table::CellVertJustify2::STANDARD :
1590  {
1591  rStrExpValue = GetXMLToken(XML_NONE);
1592  bRetval = true;
1593  }
1594  break;
1595  case table::CellVertJustify2::TOP :
1596  {
1597  rStrExpValue = GetXMLToken(XML_TOP);
1598  bRetval = true;
1599  }
1600  break;
1601  default:
1602  {
1603  // added to avoid warnings
1604  }
1605  }
1606  }
1607 
1608  return bRetval;
1609 }
1610 
1612 {
1613 }
1614 
1616  const css::uno::Any& r1,
1617  const css::uno::Any& r2 ) const
1618 {
1619  sal_Int32 aReference1(0), aReference2(0);
1620 
1621  if((r1 >>= aReference1) && (r2 >>= aReference2))
1622  return (aReference1 == aReference2);
1623  return false;
1624 }
1625 
1627  const OUString& rStrImpValue,
1628  css::uno::Any& rValue,
1629  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1630 {
1631  bool bRetval(false);
1632 
1633  sal_Int32 nValue;
1634  if (IsXMLToken(rStrImpValue, XML_AUTOMATIC))
1635  {
1636  nValue = table::CellVertJustify2::STANDARD;
1637  rValue <<= nValue;
1638  bRetval = true;
1639  }
1640  else if (IsXMLToken(rStrImpValue, XML_BOTTOM))
1641  {
1642  nValue = table::CellVertJustify2::BOTTOM;
1643  rValue <<= nValue;
1644  bRetval = true;
1645  }
1646  else if (IsXMLToken(rStrImpValue, XML_TOP))
1647  {
1648  nValue = table::CellVertJustify2::TOP;
1649  rValue <<= nValue;
1650  bRetval = true;
1651  }
1652  else if (IsXMLToken(rStrImpValue, XML_MIDDLE))
1653  {
1654  nValue = table::CellVertJustify2::CENTER;
1655  rValue <<= nValue;
1656  bRetval = true;
1657  }
1658  else if (IsXMLToken(rStrImpValue, XML_JUSTIFY))
1659  {
1660  nValue = table::CellVertJustify2::BLOCK;
1661  rValue <<= nValue;
1662  bRetval = true;
1663  }
1664 
1665  return bRetval;
1666 }
1667 
1669  OUString& rStrExpValue,
1670  const css::uno::Any& rValue,
1671  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1672 {
1673  sal_Int32 nVal(0);
1674  bool bRetval(false);
1675 
1676  if(rValue >>= nVal)
1677  {
1678  switch (nVal)
1679  {
1680  case table::CellVertJustify2::BOTTOM :
1681  {
1682  rStrExpValue = GetXMLToken(XML_BOTTOM);
1683  bRetval = true;
1684  }
1685  break;
1686  case table::CellVertJustify2::CENTER :
1687  {
1688  rStrExpValue = GetXMLToken(XML_MIDDLE);
1689  bRetval = true;
1690  }
1691  break;
1692  case table::CellVertJustify2::STANDARD :
1693  {
1694  rStrExpValue = GetXMLToken(XML_AUTOMATIC);
1695  bRetval = true;
1696  }
1697  break;
1698  case table::CellVertJustify2::TOP :
1699  {
1700  rStrExpValue = GetXMLToken(XML_TOP);
1701  bRetval = true;
1702  }
1703  break;
1704  case table::CellVertJustify2::BLOCK :
1705  {
1706  rStrExpValue = GetXMLToken(XML_JUSTIFY);
1707  bRetval = true;
1708  }
1709  break;
1710  default:
1711  {
1712  // added to avoid warnings
1713  }
1714  }
1715  }
1716 
1717  return bRetval;
1718 }
1719 
1721 {
1722 }
1723 
1725  const css::uno::Any& r1,
1726  const css::uno::Any& r2 ) const
1727 {
1728  bool aBreak1 = false, aBreak2 = false;
1729 
1730  if((r1 >>= aBreak1) && (r2 >>= aBreak2))
1731  return (aBreak1 == aBreak2);
1732  return false;
1733 }
1734 
1736  const OUString& rStrImpValue,
1737  css::uno::Any& rValue,
1738  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1739 {
1740  bool bRetval(false);
1741 
1742  bool bValue;
1743  if (IsXMLToken(rStrImpValue, XML_AUTO))
1744  {
1745  bValue = false;
1746  rValue <<= bValue;
1747  bRetval = true;
1748  }
1749  else if (IsXMLToken(rStrImpValue, XML_PAGE))
1750  {
1751  bValue = true;
1752  rValue <<= bValue;
1753  bRetval = true;
1754  }
1755 
1756  return bRetval;
1757 }
1758 
1760  OUString& rStrExpValue,
1761  const css::uno::Any& rValue,
1762  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1763 {
1764  bool bRetval(false);
1765 
1766  if(::cppu::any2bool(rValue))
1767  {
1768  rStrExpValue = GetXMLToken(XML_PAGE);
1769  bRetval = true;
1770  }
1771  else
1772  {
1773  rStrExpValue = GetXMLToken(XML_AUTO);
1774  bRetval = true;
1775  }
1776 
1777  return bRetval;
1778 }
1779 
1781 {
1782 }
1783 
1785  const css::uno::Any& r1,
1786  const css::uno::Any& r2 ) const
1787 {
1788  return (::cppu::any2bool(r1) == ::cppu::any2bool(r2));
1789 }
1790 
1792  const OUString& rStrImpValue,
1793  css::uno::Any& rValue,
1794  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1795 {
1796  bool bRetval(false);
1797 
1798  if (IsXMLToken(rStrImpValue, XML_WRAP))
1799  {
1800  rValue <<= true;
1801  bRetval = true;
1802  }
1803  else if (IsXMLToken(rStrImpValue, XML_NO_WRAP))
1804  {
1805  rValue <<= false;
1806  bRetval = true;
1807  }
1808 
1809  return bRetval;
1810 }
1811 
1813  OUString& rStrExpValue,
1814  const css::uno::Any& rValue,
1815  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1816 {
1817  bool bRetval(false);
1818 
1819  if (::cppu::any2bool(rValue))
1820  {
1821  rStrExpValue = GetXMLToken(XML_WRAP);
1822  bRetval = true;
1823  }
1824  else
1825  {
1826  rStrExpValue = GetXMLToken(XML_NO_WRAP);
1827  bRetval = true;
1828  }
1829 
1830  return bRetval;
1831 }
1832 
1833 bool XmlScPropHdl_IsEqual::importXML( const OUString& /* rStrImpValue */,
1834  css::uno::Any& /* rValue */,
1835  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1836 {
1837  OSL_FAIL("should never be called");
1838  return false;
1839 }
1840 
1841 bool XmlScPropHdl_IsEqual::exportXML( OUString& /* rStrExpValue */,
1842  const css::uno::Any& /* rValue */,
1843  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1844 {
1845  OSL_FAIL("should never be called");
1846  return false;
1847 }
1848 
1850 {
1851 }
1852 
1854  const css::uno::Any& r1,
1855  const css::uno::Any& r2 ) const
1856 {
1857  return (::cppu::any2bool(r1) == ::cppu::any2bool(r2));
1858 }
1859 
1861  const OUString& rStrImpValue,
1862  css::uno::Any& rValue,
1863  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1864 {
1865  bool bRetval(false);
1866 
1867  if (IsXMLToken(rStrImpValue, XML_AUTO))
1868  {
1869  rValue <<= true;
1870  bRetval = true;
1871  }
1872  else if (IsXMLToken(rStrImpValue, XML_0))
1873  {
1874  rValue <<= false;
1875  bRetval = true;
1876  }
1877 
1878  return bRetval;
1879 }
1880 
1882  OUString& rStrExpValue,
1883  const css::uno::Any& rValue,
1884  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1885 {
1886  bool bRetval(false);
1887 
1888  if (::cppu::any2bool(rValue))
1889  {
1890  rStrExpValue = GetXMLToken(XML_AUTO);
1891  bRetval = true;
1892  }
1893  else
1894  {
1895  rStrExpValue = GetXMLToken(XML_0);
1896  bRetval = true;
1897  }
1898 
1899  return bRetval;
1900 }
1901 
1902 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define XML_SC_ISTEXTWRAPPED
Definition: xmlstyle.hxx:54
#define XML_TYPE_BORDER
virtual bool exportXML(OUString &rStrExpValue, const css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Definition: xmlstyle.cxx:1311
XML_FORMULA_HIDDEN
virtual bool equals(const css::uno::Any &r1, const css::uno::Any &r2) const override
Definition: xmlstyle.cxx:1176
virtual bool equals(const css::uno::Any &r1, const css::uno::Any &r2) const override
Definition: xmlstyle.cxx:1615
#define XML_TYPE_TEXT_SHADOW
virtual const XMLPropertyHandler * GetPropertyHandler(sal_Int32 nType) const
#define CTF_SC_RIGHTPADDING
Definition: xmlstyle.hxx:63
XML_DIAGONAL_TL_BR
#define CTF_BOTTOMBORDER
#define XML_TYPE_BUILDIN_CMP_ONLY
XML_DIAGONAL_BL_TR
#define MAP_ODF13(name, prefix, token, type, context)
Definition: xmlstyle.cxx:53
#define CTF_PARALEFTMARGIN_REL
XML_CELL_PROTECT
virtual void exportStyleAttributes(SvXMLAttributeList &rAttrList, XmlStyleFamily nFamily, const ::std::vector< XMLPropertyState > &rProperties, const SvXMLExportPropertyMapper &rPropExp, const SvXMLUnitConverter &rUnitConverter, const SvXMLNamespaceMap &rNamespaceMap) const
XML_APPLY_STYLE_NAME
virtual bool importXML(const OUString &rStrImpValue, css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Definition: xmlstyle.cxx:1113
SvXMLExport & GetExport() const
#define XML_TYPE_BORDER_WIDTH
XML_REPEAT_CONTENT
#define CTF_LEFTBORDER
virtual bool importXML(const OUString &rStrImpValue, css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Definition: xmlstyle.cxx:1735
XML_TEXT_ALIGN
#define XML_SC_TYPE_HORIJUSTIFY
Definition: xmlstyle.hxx:41
#define CTF_SC_DIAGONALBLTRWIDTHS
Definition: xmlstyle.hxx:87
XML_FIX
virtual bool exportXML(OUString &rStrExpValue, const css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Definition: xmlstyle.cxx:1841
XML_AUTO
#define CTF_SC_ROWHEIGHT
Definition: xmlstyle.hxx:89
XML_WRAP_OPTION
#define CTF_SC_BOTTOMBORDERWIDTH
Definition: xmlstyle.hxx:74
#define CTF_SC_BOTTOMBORDER
Definition: xmlstyle.hxx:69
XML_USE_OPTIMAL_ROW_HEIGHT
#define XML_SC_TYPE_BREAKBEFORE
Definition: xmlstyle.hxx:98
XML_CONTENT_VALIDATION
virtual void exportStyleContent(const css::uno::Reference< css::xml::sax::XDocumentHandler > &rHandler, XmlStyleFamily nFamily, const ::std::vector< XMLPropertyState > &rProperties, const SvXMLExportPropertyMapper &rPropExp, const SvXMLUnitConverter &rUnitConverter, const SvXMLNamespaceMap &rNamespaceMap) const
virtual ~XmlScPropHdl_IsTextWrapped() override
Definition: xmlstyle.cxx:1780
#define CTF_SC_MASTERPAGENAME
Definition: xmlstyle.hxx:94
#define XML_SC_TYPE_HORIJUSTIFYSOURCE
Definition: xmlstyle.hxx:43
XML_HIDDEN_AND_PROTECTED
virtual bool equals(const css::uno::Any &r1, const css::uno::Any &r2) const override
Definition: xmlstyle.cxx:1784
virtual bool equals(const css::uno::Any &r1, const css::uno::Any &r2) const override
Definition: xmlstyle.cxx:1469
virtual bool importXML(const OUString &rStrImpValue, css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Definition: xmlstyle.cxx:1860
const rtl::Reference< XMLPropertySetMapper > & GetCellStylesPropertySetMapper() const
Definition: xmlexprt.hxx:244
XML_BASE_CELL_ADDRESS
#define CTF_ALLBORDER
#define MAP_EXT_I(name, prefix, token, type, context)
Definition: xmlstyle.cxx:57
constexpr sal_uInt16 XML_NAMESPACE_XLINK
XML_VALUE_TYPE
sal_Int32 mnIndex
XML_CONDITION
virtual ~XmlScPropHdl_Orientation() override
Definition: xmlstyle.cxx:1396
virtual bool importXML(const OUString &rStrImpValue, css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Definition: xmlstyle.cxx:1351
#define CTF_SC_DIAGONALBLTR
Definition: xmlstyle.hxx:84
virtual void exportStyleAttributes(SvXMLAttributeList &rAttrList, XmlStyleFamily nFamily, const ::std::vector< XMLPropertyState > &rProperties, const SvXMLExportPropertyMapper &rPropExp, const SvXMLUnitConverter &rUnitConverter, const SvXMLNamespaceMap &rNamespaceMap) const override
Definition: xmlstyle.cxx:610
XML_PAGE
virtual ~ScXMLAutoStylePoolP() override
Definition: xmlstyle.cxx:795
constexpr sal_uInt16 XML_NAMESPACE_LO_EXT
bool IsXMLToken(std::u16string_view rString, enum XMLTokenEnum eToken)
XML_VERTICAL_JUSTIFY
XML_SHRINK_TO_FIT
constexpr sal_uInt16 XML_NAMESPACE_CSS3TEXT
XML_BORDER_RIGHT
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 ...
Definition: xmlstyle.cxx:577
XML_DATA_STYLE_NAME
virtual bool equals(const css::uno::Any &r1, const css::uno::Any &r2) const override
Definition: xmlstyle.cxx:1724
#define CTF_PARABOTTOMMARGIN_REL
#define CTF_SC_NUMBERFORMAT
Definition: xmlstyle.hxx:75
#define MAP(name, prefix, token, type, context)
Definition: xmlstyle.cxx:52
XML_TAB_COLOR
XML_AUTOMATIC
#define XML_TYPE_PROP_TABLE_ROW
virtual bool exportXML(OUString &rStrExpValue, const css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Definition: xmlstyle.cxx:1881
virtual bool importXML(const OUString &rStrImpValue, css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Definition: xmlstyle.cxx:1626
virtual bool exportXML(OUString &rStrExpValue, const css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Definition: xmlstyle.cxx:988
XML_DIAGONAL_TL_BR_WIDTHS
#define XML_SC_TYPE_CELLPROTECTION
Definition: xmlstyle.hxx:39
static void GetStringFromAddress(OUString &rString, const ScAddress &rAddress, const ScDocument *pDocument, formula::FormulaGrammar::AddressConvention eConv, sal_Unicode cSeparator= ' ', bool bAppendStr=false, ScRefFlags nFormatFlags=ScRefFlags::VALID|ScRefFlags::TAB_3D)
Range to String core.
XML_BORDER
#define XML_TYPE_PROP_TABLE_COLUMN
#define CTF_TOPBORDERWIDTH
#define CTF_RIGHTBORDER
#define MID_FLAG_MERGE_ATTRIBUTE
XML_BORDER_LINE_WIDTH_TOP
virtual bool equals(const css::uno::Any &r1, const css::uno::Any &r2) const override
Definition: xmlstyle.cxx:1280
virtual bool exportXML(OUString &rStrExpValue, const css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Definition: xmlstyle.cxx:1139
#define SC_UNONAME_CELLHJUS_METHOD
Definition: unonames.hxx:102
#define XML_SC_TYPE_VERTJUSTIFY_METHOD
Definition: xmlstyle.hxx:53
XmlStyleFamily
#define XML_TYPE_MEASURE16
#define XML_TYPE_PROP_PARAGRAPH
#define XML_SC_TYPE_ROTATEANGLE
Definition: xmlstyle.hxx:46
virtual void ContextFilter(bool bEnableFoFontFamily,::std::vector< XMLPropertyState > &rProperties, const css::uno::Reference< css::beans::XPropertySet > &rPropSet) const
virtual bool importXML(const OUString &rStrImpValue, css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Definition: xmlstyle.cxx:1833
#define CTF_SC_LEFTBORDER
Definition: xmlstyle.hxx:66
XML_MARGIN_LEFT
void AddAttribute(sal_uInt16 nPrefix, const char *pName, const OUString &rValue)
XML_BACKGROUND_COLOR
#define CTF_PARATOPMARGIN
virtual ~XmlScPropHdl_HoriJustify() override
Definition: xmlstyle.cxx:1172
XML_DISTRIBUTE
#define MAP_EXT(name, prefix, token, type, context)
Definition: xmlstyle.cxx:55
#define CTF_SC_ALLPADDING
Definition: xmlstyle.hxx:60
XML_PADDING_LEFT
#define MID_FLAG_MULTI_PROPERTY
ScXMLExport & rScXMLExport
Definition: xmlstyle.hxx:182
#define CTF_SC_TOPPADDING
Definition: xmlstyle.hxx:64
#define CTF_SC_LEFTPADDING
Definition: xmlstyle.hxx:62
#define XML_SC_TYPE_VERTJUSTIFY
Definition: xmlstyle.hxx:52
virtual OUString getDataStyleName(const sal_Int32 nNumberFormat, bool bTimeFormat=false) const
const XMLPropertyMapEntry aXMLScFromXLSRowStylesProperties[]
Definition: xmlstyle.cxx:146
XML_HREF
XML_XMLNS
const char * sName
#define MID_FLAG_ELEMENT_ITEM
virtual bool exportXML(OUString &rStrExpValue, const css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Definition: xmlstyle.cxx:1497
XML_BORDER_TOP
XML_TTB
XML_LTR
#define XML_TYPE_COLORAUTO
#define XML_SC_TYPE_HORIJUSTIFYREPEAT
Definition: xmlstyle.hxx:44
XML_MIDDLE
#define CTF_SC_ISVISIBLE
Definition: xmlstyle.hxx:92
virtual bool importXML(const OUString &rStrImpValue, css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Definition: xmlstyle.cxx:915
virtual void ContextFilter(bool bEnableFoFontFamily,::std::vector< XMLPropertyState > &rProperties, const css::uno::Reference< css::beans::XPropertySet > &rPropSet) const override
Application-specific filter.
Definition: xmlstyle.cxx:558
virtual ~XMLScPropHdlFactory() override
Definition: xmlstyle.cxx:803
virtual ~XmlScPropHdl_BreakBefore() override
Definition: xmlstyle.cxx:1720
XML_ROTATION_ALIGN
XML_PROTECTED
#define XML_SC_TYPE_VERTICAL
Definition: xmlstyle.hxx:56
XML_BORDER_LEFT
virtual ~ScXMLRowExportPropertyMapper() override
Definition: xmlstyle.cxx:554
#define CTF_SC_MAP
Definition: xmlstyle.hxx:76
const rtl::Reference< XMLPropertySetMapper > & GetTableStylesPropertySetMapper() const
Definition: xmlexprt.hxx:245
#define XML_TYPE_BOOL_FALSE
XML_END
virtual void exportStyleContent(const css::uno::Reference< css::xml::sax::XDocumentHandler > &rHandler, XmlStyleFamily nFamily, const ::std::vector< XMLPropertyState > &rProperties, const SvXMLExportPropertyMapper &rPropExp, const SvXMLUnitConverter &rUnitConverter, const SvXMLNamespaceMap &rNamespaceMap) const override
Definition: xmlstyle.cxx:672
const XMLPropertyMapEntry aXMLScTableStylesImportProperties[]
Definition: xmlstyle.cxx:154
constexpr sal_uInt16 XML_NAMESPACE_TABLE_EXT
#define CTF_LEFTBORDERWIDTH
virtual bool exportXML(OUString &rStrExpValue, const css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Definition: xmlstyle.cxx:1759
constexpr sal_uInt16 XML_NAMESPACE_FO
XML_PADDING_BOTTOM
XML_START
virtual void handleElementItem(SvXMLExport &rExport, const XMLPropertyState &rProperty, SvXmlExportFlags nFlags, const ::std::vector< XMLPropertyState > *pProperties, sal_uInt32 nIdx) const override
Definition: xmlstyle.cxx:525
int i
#define XML_SC_TYPE_EQUAL
Definition: xmlstyle.hxx:55
XML_ROTATION_ANGLE
virtual bool importXML(const OUString &rStrImpValue, css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Definition: xmlstyle.cxx:1187
constexpr sal_uInt16 XML_NAMESPACE_TEXT
virtual ~XmlScPropHdl_HoriJustifyRepeat() override
Definition: xmlstyle.cxx:1336
#define CTF_PARATOPMARGIN_REL
#define CTF_SC_ALLBORDERWIDTH
Definition: xmlstyle.hxx:70
#define CTF_SC_ROWBREAKBEFORE
Definition: xmlstyle.hxx:91
#define CTF_SC_DIAGONALTLBR
Definition: xmlstyle.hxx:82
#define XML_TYPE_ATTRIBUTE_CONTAINER
XML_TOP
virtual bool equals(const css::uno::Any &r1, const css::uno::Any &r2) const override
Definition: xmlstyle.cxx:1036
virtual ~ScXMLCellExportPropertyMapper() override
Definition: xmlstyle.cxx:188
ScXMLAutoStylePoolP(ScXMLExport &rScXMLExport)
Definition: xmlstyle.cxx:789
virtual bool importXML(const OUString &rStrImpValue, css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Definition: xmlstyle.cxx:1480
XML_BORDER_LINE_WIDTH_BOTTOM
virtual bool importXML(const OUString &rStrImpValue, css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Definition: xmlstyle.cxx:1529
const XMLPropertyMapEntry aXMLScColumnStylesProperties[]
Definition: xmlstyle.cxx:115
#define CTF_SC_TOPBORDERWIDTH
Definition: xmlstyle.hxx:73
#define XML_TYPE_NUMBER
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 ...
Definition: xmlstyle.cxx:513
XML_BREAK_BEFORE
XML_SIMPLE
XML_DISPLAY
virtual bool exportXML(OUString &rStrExpValue, const css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Definition: xmlstyle.cxx:1812
#define CTF_SC_HYPERLINK
Definition: xmlstyle.hxx:95
virtual bool importXML(const OUString &rStrImpValue, css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Definition: xmlstyle.cxx:1291
#define SC_UNONAME_CELLVJUS_METHOD
Definition: unonames.hxx:103
#define MID_FLAG_SPECIAL_ITEM
virtual bool exportXML(OUString &rStrExpValue, const css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Definition: xmlstyle.cxx:1435
XML_DECIMAL_PLACES
#define CTF_SC_LEFTBORDERWIDTH
Definition: xmlstyle.hxx:71
virtual bool importXML(const OUString &rStrImpValue, css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Definition: xmlstyle.cxx:1049
virtual bool equals(const css::uno::Any &r1, const css::uno::Any &r2) const override
Definition: xmlstyle.cxx:1853
#define XML_TYPE_NUMBER16
virtual ~XmlScPropHdl_Vertical() override
Definition: xmlstyle.cxx:1849
virtual bool exportXML(OUString &rStrExpValue, const css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Definition: xmlstyle.cxx:1668
#define CTF_SC_RIGHTBORDER
Definition: xmlstyle.hxx:67
virtual bool importXML(const OUString &rStrImpValue, css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Definition: xmlstyle.cxx:1411
virtual bool exportXML(OUString &rStrExpValue, const css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Definition: xmlstyle.cxx:1565
XML_PADDING
XML_PADDING_TOP
virtual bool equals(const css::uno::Any &r1, const css::uno::Any &r2) const override
Definition: xmlstyle.cxx:1518
XML_SHADOW
XML_BOTTOM
#define XML_TYPE_TEXT_WRITING_MODE
#define XML_TYPE_PROP_TABLE
virtual bool equals(const css::uno::Any &r1, const css::uno::Any &r2) const override
Definition: xmlstyle.cxx:1400
static bool convertBool(bool &rBool, std::u16string_view rString)
XML_WRAP
#define MID_FLAG_MERGE_PROPERTY
XML_TRUE
#define XML_SC_TYPE_PRINTCONTENT
Definition: xmlstyle.hxx:40
OUString EncodeStyleName(const OUString &rName, bool *pEncoded=nullptr) const
virtual bool equals(const css::uno::Any &r1, const css::uno::Any &r2) const override
Definition: xmlstyle.cxx:1102
ScXMLRowExportPropertyMapper(const rtl::Reference< XMLPropertySetMapper > &rMapper)
Definition: xmlstyle.cxx:548
ScDocument * GetDocument()
Definition: xmlexprt.hxx:239
#define XML_SC_TYPE_ORIENTATION
Definition: xmlstyle.hxx:45
#define CTF_SC_VALIDATION
Definition: xmlstyle.hxx:81
#define XML_TYPE_ISTRANSPARENT
#define XML_TYPE_STRING
#define CTF_SC_DIAGONALTLBRWIDTH
Definition: xmlstyle.hxx:83
#define CTF_PARALEFTMARGIN
#define CTF_SC_ROWOPTIMALHEIGHT
Definition: xmlstyle.hxx:90
XML_DIAGONAL_TL_BR_WIDTH
virtual ~XmlScPropHdl_PrintContent() override
Definition: xmlstyle.cxx:1032
css::uno::Any maValue
XML_FALSE
constexpr sal_uInt16 XML_NAMESPACE_TABLE
ScXMLTableExportPropertyMapper(const rtl::Reference< XMLPropertySetMapper > &rMapper)
Definition: xmlstyle.cxx:588
XML_HYPERLINK
#define CTF_SC_DIAGONALBLTRWIDTH
Definition: xmlstyle.hxx:85
#define XML_TYPE_PROP_TABLE_CELL
SvXmlExportFlags
XML_ROW_HEIGHT
#define CTF_SC_IMPORT_MAP
Definition: xmlstyle.hxx:79
XML_COLUMN_WIDTH
const OUString & GetXMLToken(enum XMLTokenEnum eToken)
#define MID_FLAG_MASK
XML_NONE
#define CTF_SC_CELLSTYLE
Definition: xmlstyle.hxx:80
#define CTF_PARARIGHTMARGIN_REL
XML_DIAGONAL_BL_TR_WIDTHS
XML_CENTER
XML_0
XML_TYPE
ScXMLColumnExportPropertyMapper(const rtl::Reference< XMLPropertySetMapper > &rMapper)
Definition: xmlstyle.cxx:566
ScXMLCellExportPropertyMapper(const rtl::Reference< XMLPropertySetMapper > &rMapper)
Definition: xmlstyle.cxx:182
#define MAP_END()
Definition: xmlstyle.cxx:58
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 ...
Definition: xmlstyle.cxx:599
#define XML_TYPE_MEASURE
#define SC_UNONAME_HYPERLINK
Definition: unonames.hxx:197
virtual bool exportXML(OUString &rStrExpValue, const css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Definition: xmlstyle.cxx:1371
XML_MASTER_PAGE_NAME
const XMLPropertyMapEntry aXMLScRowStylesImportProperties[]
Definition: xmlstyle.cxx:123
XML_TEXT_JUSTIFY
QPRO_FUNC_TYPE nType
Definition: qproform.cxx:398
#define CTF_PARARIGHTMARGIN
virtual ~ScXMLTableExportPropertyMapper() override
Definition: xmlstyle.cxx:594
virtual bool exportXML(OUString &rStrExpValue, const css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Definition: xmlstyle.cxx:1079
XML_BORDER_LINE_WIDTH_RIGHT
XML_DIRECTION
const XMLPropertyMapEntry aXMLScCellStylesProperties[]
Definition: xmlstyle.cxx:60
#define XML_TYPE_COLORTRANSPARENT
XML_BORDER_LINE_WIDTH
XML_PRINT_CONTENT
virtual ~XmlScPropHdl_RotateAngle() override
Definition: xmlstyle.cxx:1465
virtual ~XmlScPropHdl_HoriJustifySource() override
Definition: xmlstyle.cxx:1276
XML_TEXT_ALIGN_SOURCE
virtual bool equals(const css::uno::Any &r1, const css::uno::Any &r2) const override
Definition: xmlstyle.cxx:1340
XML_BORDER_BOTTOM
XML_WRITING_MODE
#define CTF_ALLBORDERWIDTH
#define CTF_BOTTOMBORDERWIDTH
#define XML_TYPE_BOOL
virtual ~ScXMLColumnExportPropertyMapper() override
Definition: xmlstyle.cxx:572
XML_PADDING_RIGHT
virtual bool exportXML(OUString &rStrExpValue, const css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Definition: xmlstyle.cxx:1229
#define CTF_SC_TOPBORDER
Definition: xmlstyle.hxx:68
XML_NO_WRAP
virtual void ContextFilter(bool bEnableFoFontFamily,::std::vector< XMLPropertyState > &rProperties, const css::uno::Reference< css::beans::XPropertySet > &rPropSet) const override
Application-specific filter.
Definition: xmlstyle.cxx:192
virtual ~XmlScPropHdl_CellProtection() override
Definition: xmlstyle.cxx:896
const XMLPropertyMapEntry aXMLScTableStylesProperties[]
Definition: xmlstyle.cxx:171
#define CTF_PARABOTTOMMARGIN
#define CTF_RIGHTBORDERWIDTH
XML_DIAGONAL_BL_TR_WIDTH
XML_GLYPH_ORIENTATION_VERTICAL
XML_BORDER_LINE_WIDTH_LEFT
#define CTF_SC_DIAGONALTLBRWIDTHS
Definition: xmlstyle.hxx:86
virtual ~XmlScPropHdl_RotateReference() override
Definition: xmlstyle.cxx:1514
virtual ~XmlScPropHdl_VertJustify() override
Definition: xmlstyle.cxx:1611
XML_JUSTIFY
#define CTF_SD_SHAPE_PARA_ADJUST
constexpr sal_uInt16 XML_NAMESPACE_STYLE
#define CTF_SC_RIGHTBORDERWIDTH
Definition: xmlstyle.hxx:72
virtual bool equals(const css::uno::Any &r1, const css::uno::Any &r2) const override
Definition: xmlstyle.cxx:900
#define CTF_SC_ALLBORDER
Definition: xmlstyle.hxx:65
virtual bool importXML(const OUString &rStrImpValue, css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Definition: xmlstyle.cxx:1791
XML_MAP
XML_STYLE
#define XML_SC_TYPE_ROTATEREFERENCE
Definition: xmlstyle.hxx:47
bool any2bool(const css::uno::Any &rAny)
virtual ~XmlScPropHdl_JustifyMethod() override
Definition: xmlstyle.cxx:1098
XML_VERTICAL_ALIGN
sal_Int16 nValue
const rtl::Reference< XMLPropertySetMapper > & getPropertySetMapper() const
#define CTF_PARA_ADJUSTLAST
const XMLPropertyMapEntry aXMLScRowStylesProperties[]
Definition: xmlstyle.cxx:138
virtual const XMLPropertyHandler * GetPropertyHandler(sal_Int32 nType) const override
Definition: xmlstyle.cxx:807
#define XML_SC_TYPE_HORIJUSTIFY_METHOD
Definition: xmlstyle.hxx:42
void PutHdlCache(sal_Int32 nType, const XMLPropertyHandler *pHdl) const
static bool convertNumber(sal_Int32 &rValue, std::u16string_view aString, sal_Int32 nMin=SAL_MIN_INT32, sal_Int32 nMax=SAL_MAX_INT32)
#define CTF_SC_BOTTOMPADDING
Definition: xmlstyle.hxx:61
#define CTF_TOPBORDER