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 
801 {
802 }
803 
805 {
806 }
807 
809 {
810  nType &= MID_FLAG_MASK;
811 
812  XMLPropertyHandler* pHdl(const_cast<XMLPropertyHandler*>(XMLPropertyHandlerFactory::GetPropertyHandler( nType )));
813  if(!pHdl)
814  {
815  switch(nType)
816  {
818  {
819  pHdl = new XmlScPropHdl_CellProtection;
820  }
821  break;
823  {
824  pHdl = new XmlScPropHdl_PrintContent;
825  }
826  break;
829  {
830  pHdl = new XmlScPropHdl_JustifyMethod;
831  }
832  break;
834  {
835  pHdl = new XmlScPropHdl_HoriJustify;
836  }
837  break;
839  {
841  }
842  break;
844  {
846  }
847  break;
849  {
850  pHdl = new XmlScPropHdl_Orientation;
851  }
852  break;
854  {
855  pHdl = new XmlScPropHdl_RotateAngle;
856  }
857  break;
859  {
860  pHdl = new XmlScPropHdl_RotateReference;
861  }
862  break;
864  {
865  pHdl = new XmlScPropHdl_VertJustify;
866  }
867  break;
869  {
870  pHdl = new XmlScPropHdl_BreakBefore;
871  }
872  break;
873  case XML_SC_ISTEXTWRAPPED :
874  {
875  pHdl = new XmlScPropHdl_IsTextWrapped;
876  }
877  break;
878  case XML_SC_TYPE_EQUAL :
879  {
880  pHdl = new XmlScPropHdl_IsEqual;
881  }
882  break;
883  case XML_SC_TYPE_VERTICAL :
884  {
885  pHdl = new XmlScPropHdl_Vertical;
886  }
887  break;
888  }
889 
890  if(pHdl)
891  PutHdlCache(nType, pHdl);
892  }
893 
894  return pHdl;
895 }
896 
898 {
899 }
900 
902  const css::uno::Any& r1,
903  const css::uno::Any& r2 ) const
904 {
905  util::CellProtection aCellProtection1, aCellProtection2;
906 
907  if((r1 >>= aCellProtection1) && (r2 >>= aCellProtection2))
908  {
909  return ((aCellProtection1.IsHidden == aCellProtection2.IsHidden) &&
910  (aCellProtection1.IsLocked == aCellProtection2.IsLocked) &&
911  (aCellProtection1.IsFormulaHidden == aCellProtection2.IsFormulaHidden));
912  }
913  return false;
914 }
915 
917  const OUString& rStrImpValue,
918  css::uno::Any& rValue,
919  const SvXMLUnitConverter& /* rUnitConverter */ ) const
920 {
921  bool bRetval(false);
922 
923  util::CellProtection aCellProtection;
924  bool bDefault(false);
925  if (!rValue.hasValue())
926  {
927  aCellProtection.IsHidden = false;
928  aCellProtection.IsLocked = true;
929  aCellProtection.IsFormulaHidden = false;
930  aCellProtection.IsPrintHidden = false;
931  bDefault = true;
932  }
933  if ((rValue >>= aCellProtection) || bDefault)
934  {
935  if (IsXMLToken(rStrImpValue, XML_NONE))
936  {
937  aCellProtection.IsFormulaHidden = false;
938  aCellProtection.IsHidden = false;
939  aCellProtection.IsLocked = false;
940  rValue <<= aCellProtection;
941  bRetval = true;
942  }
943  else if (IsXMLToken(rStrImpValue, XML_HIDDEN_AND_PROTECTED))
944  {
945  aCellProtection.IsFormulaHidden = true;
946  aCellProtection.IsHidden = true;
947  aCellProtection.IsLocked = true;
948  rValue <<= aCellProtection;
949  bRetval = true;
950  }
951  else if (IsXMLToken(rStrImpValue, XML_PROTECTED))
952  {
953  aCellProtection.IsFormulaHidden = false;
954  aCellProtection.IsHidden = false;
955  aCellProtection.IsLocked = true;
956  rValue <<= aCellProtection;
957  bRetval = true;
958  }
959  else if (IsXMLToken(rStrImpValue, XML_FORMULA_HIDDEN))
960  {
961  aCellProtection.IsFormulaHidden = true;
962  aCellProtection.IsHidden = false;
963  aCellProtection.IsLocked = false;
964  rValue <<= aCellProtection;
965  bRetval = true;
966  }
967  else
968  {
969  sal_Int32 i(0);
970  while (i < rStrImpValue.getLength() && rStrImpValue[i] != ' ')
971  ++i;
972  OUString sFirst(rStrImpValue.copy(0, i));
973  OUString sSecond(rStrImpValue.copy(i + 1));
974  aCellProtection.IsFormulaHidden = false;
975  aCellProtection.IsHidden = false;
976  aCellProtection.IsLocked = false;
977  if ((IsXMLToken(sFirst, XML_PROTECTED)) || (IsXMLToken(sSecond, XML_PROTECTED)))
978  aCellProtection.IsLocked = true;
979  if ((IsXMLToken(sFirst, XML_FORMULA_HIDDEN)) || (IsXMLToken(sSecond, XML_FORMULA_HIDDEN)))
980  aCellProtection.IsFormulaHidden = true;
981  rValue <<= aCellProtection;
982  bRetval = true;
983  }
984  }
985 
986  return bRetval;
987 }
988 
990  OUString& rStrExpValue,
991  const css::uno::Any& rValue,
992  const SvXMLUnitConverter& /* rUnitConverter */ ) const
993 {
994  bool bRetval(false);
995  util::CellProtection aCellProtection;
996 
997  if(rValue >>= aCellProtection)
998  {
999  if (!(aCellProtection.IsFormulaHidden || aCellProtection.IsHidden || aCellProtection.IsLocked))
1000  {
1001  rStrExpValue = GetXMLToken(XML_NONE);
1002  bRetval = true;
1003  }
1004  else if (aCellProtection.IsHidden)
1005  {
1006  // #i105964# "Hide all" implies "Protected" in the UI, so it must be saved as "hidden-and-protected"
1007  // even if "IsLocked" is not set in the CellProtection struct.
1008  rStrExpValue = GetXMLToken(XML_HIDDEN_AND_PROTECTED);
1009  bRetval = true;
1010  }
1011  else if (aCellProtection.IsLocked && !aCellProtection.IsFormulaHidden)
1012  {
1013  rStrExpValue = GetXMLToken(XML_PROTECTED);
1014  bRetval = true;
1015  }
1016  else if (aCellProtection.IsFormulaHidden && !aCellProtection.IsLocked)
1017  {
1018  rStrExpValue = GetXMLToken(XML_FORMULA_HIDDEN);
1019  bRetval = true;
1020  }
1021  else if (aCellProtection.IsFormulaHidden && aCellProtection.IsLocked)
1022  {
1023  rStrExpValue = GetXMLToken(XML_PROTECTED);
1024  rStrExpValue += " ";
1025  rStrExpValue += GetXMLToken(XML_FORMULA_HIDDEN);
1026  bRetval = true;
1027  }
1028  }
1029 
1030  return bRetval;
1031 }
1032 
1034 {
1035 }
1036 
1038  const css::uno::Any& r1,
1039  const css::uno::Any& r2 ) const
1040 {
1041  util::CellProtection aCellProtection1, aCellProtection2;
1042 
1043  if((r1 >>= aCellProtection1) && (r2 >>= aCellProtection2))
1044  {
1045  return (aCellProtection1.IsPrintHidden == aCellProtection2.IsPrintHidden);
1046  }
1047  return false;
1048 }
1049 
1051  const OUString& rStrImpValue,
1052  css::uno::Any& rValue,
1053  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1054 {
1055  bool bRetval(false);
1056  util::CellProtection aCellProtection;
1057  bool bDefault(false);
1058  if (!rValue.hasValue())
1059  {
1060  aCellProtection.IsHidden = false;
1061  aCellProtection.IsLocked = true;
1062  aCellProtection.IsFormulaHidden = false;
1063  aCellProtection.IsPrintHidden = false;
1064  bDefault = true;
1065  }
1066  if ((rValue >>= aCellProtection) || bDefault)
1067  {
1068  bool bValue(false);
1069  if (::sax::Converter::convertBool(bValue, rStrImpValue))
1070  {
1071  aCellProtection.IsPrintHidden = !bValue;
1072  rValue <<= aCellProtection;
1073  bRetval = true;
1074  }
1075  }
1076 
1077  return bRetval;
1078 }
1079 
1081  OUString& rStrExpValue,
1082  const css::uno::Any& rValue,
1083  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1084 {
1085  bool bRetval(false);
1086 
1087  util::CellProtection aCellProtection;
1088  if(rValue >>= aCellProtection)
1089  {
1090  OUStringBuffer sValue;
1091  ::sax::Converter::convertBool(sValue, !aCellProtection.IsPrintHidden);
1092  rStrExpValue = sValue.makeStringAndClear();
1093  bRetval = true;
1094  }
1095 
1096  return bRetval;
1097 }
1098 
1100 {
1101 }
1102 
1104  const css::uno::Any& r1,
1105  const css::uno::Any& r2 ) const
1106 {
1107  sal_Int32 nVal1(0), nVal2(0);
1108 
1109  if((r1 >>= nVal1) && (r2 >>= nVal2))
1110  return (nVal1 == nVal2);
1111  return false;
1112 }
1113 
1115  const OUString& rStrImpValue,
1116  css::uno::Any& rValue,
1117  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1118 {
1119  bool bRetval = false;
1120 
1121  sal_Int32 nValue = table::CellJustifyMethod::AUTO;
1122  if (IsXMLToken(rStrImpValue, XML_AUTO))
1123  {
1124  nValue = table::CellJustifyMethod::AUTO;
1125  rValue <<= nValue;
1126  bRetval = true;
1127  }
1128  else if (IsXMLToken(rStrImpValue, XML_DISTRIBUTE))
1129  {
1130  nValue = table::CellJustifyMethod::DISTRIBUTE;
1131  rValue <<= nValue;
1132  bRetval = true;
1133  }
1134  else
1135  bRetval = true;
1136 
1137  return bRetval;
1138 }
1139 
1141  OUString& rStrExpValue,
1142  const css::uno::Any& rValue,
1143  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1144 {
1145  sal_Int32 nVal(0);
1146  bool bRetval = false;
1147 
1148  if (rValue >>= nVal)
1149  {
1150  switch (nVal)
1151  {
1152  case table::CellJustifyMethod::AUTO:
1153  {
1154  rStrExpValue = GetXMLToken(XML_AUTO);
1155  bRetval = true;
1156  }
1157  break;
1158  case table::CellJustifyMethod::DISTRIBUTE:
1159  {
1160  rStrExpValue = GetXMLToken(XML_DISTRIBUTE);
1161  bRetval = true;
1162  }
1163  break;
1164  default:
1165  {
1166  // added to avoid warnings
1167  }
1168  }
1169  }
1170  return bRetval;
1171 }
1172 
1174 {
1175 }
1176 
1178  const css::uno::Any& r1,
1179  const css::uno::Any& r2 ) const
1180 {
1181  table::CellHoriJustify aHoriJustify1, aHoriJustify2;
1182 
1183  if((r1 >>= aHoriJustify1) && (r2 >>= aHoriJustify2))
1184  return (aHoriJustify1 == aHoriJustify2);
1185  return false;
1186 }
1187 
1189  const OUString& rStrImpValue,
1190  css::uno::Any& rValue,
1191  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1192 {
1193  bool bRetval(false);
1194 
1195  table::CellHoriJustify nValue = table::CellHoriJustify_LEFT;
1196  rValue >>= nValue;
1197  if (nValue != table::CellHoriJustify_REPEAT)
1198  {
1199  if (IsXMLToken(rStrImpValue, XML_START))
1200  {
1201  nValue = table::CellHoriJustify_LEFT;
1202  rValue <<= nValue;
1203  bRetval = true;
1204  }
1205  else if (IsXMLToken(rStrImpValue, XML_END))
1206  {
1207  nValue = table::CellHoriJustify_RIGHT;
1208  rValue <<= nValue;
1209  bRetval = true;
1210  }
1211  else if (IsXMLToken(rStrImpValue, XML_CENTER))
1212  {
1213  nValue = table::CellHoriJustify_CENTER;
1214  rValue <<= nValue;
1215  bRetval = true;
1216  }
1217  else if (IsXMLToken(rStrImpValue, XML_JUSTIFY))
1218  {
1219  nValue = table::CellHoriJustify_BLOCK;
1220  rValue <<= nValue;
1221  bRetval = true;
1222  }
1223  }
1224  else
1225  bRetval = true;
1226 
1227  return bRetval;
1228 }
1229 
1231  OUString& rStrExpValue,
1232  const css::uno::Any& rValue,
1233  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1234 {
1235  table::CellHoriJustify nVal;
1236  bool bRetval(false);
1237 
1238  if(rValue >>= nVal)
1239  {
1240  switch (nVal)
1241  {
1242  case table::CellHoriJustify_REPEAT:
1243  case table::CellHoriJustify_LEFT:
1244  {
1245  rStrExpValue = GetXMLToken(XML_START);
1246  bRetval = true;
1247  }
1248  break;
1249  case table::CellHoriJustify_RIGHT:
1250  {
1251  rStrExpValue = GetXMLToken(XML_END);
1252  bRetval = true;
1253  }
1254  break;
1255  case table::CellHoriJustify_CENTER:
1256  {
1257  rStrExpValue = GetXMLToken(XML_CENTER);
1258  bRetval = true;
1259  }
1260  break;
1261  case table::CellHoriJustify_BLOCK:
1262  {
1263  rStrExpValue = GetXMLToken(XML_JUSTIFY);
1264  bRetval = true;
1265  }
1266  break;
1267  default:
1268  {
1269  // added to avoid warnings
1270  }
1271  }
1272  }
1273 
1274  return bRetval;
1275 }
1276 
1278 {
1279 }
1280 
1282  const css::uno::Any& r1,
1283  const css::uno::Any& r2 ) const
1284 {
1285  table::CellHoriJustify aHoriJustify1, aHoriJustify2;
1286 
1287  if((r1 >>= aHoriJustify1) && (r2 >>= aHoriJustify2))
1288  return (aHoriJustify1 == aHoriJustify2);
1289  return false;
1290 }
1291 
1293  const OUString& rStrImpValue,
1294  css::uno::Any& rValue,
1295  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1296 {
1297  bool bRetval(false);
1298 
1299  if (IsXMLToken(rStrImpValue, XML_FIX))
1300  {
1301  bRetval = true;
1302  }
1303  else if (IsXMLToken(rStrImpValue, XML_VALUE_TYPE))
1304  {
1305  rValue <<= table::CellHoriJustify_STANDARD;
1306  bRetval = true;
1307  }
1308 
1309  return bRetval;
1310 }
1311 
1313  OUString& rStrExpValue,
1314  const css::uno::Any& rValue,
1315  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1316 {
1317  table::CellHoriJustify nVal;
1318  bool bRetval(false);
1319 
1320  if(rValue >>= nVal)
1321  {
1322  if (nVal == table::CellHoriJustify_STANDARD)
1323  {
1324  rStrExpValue = GetXMLToken(XML_VALUE_TYPE);
1325  bRetval = true;
1326  }
1327  else
1328  {
1329  rStrExpValue = GetXMLToken(XML_FIX);
1330  bRetval = true;
1331  }
1332  }
1333 
1334  return bRetval;
1335 }
1336 
1338 {
1339 }
1340 
1342  const css::uno::Any& r1,
1343  const css::uno::Any& r2 ) const
1344 {
1345  table::CellHoriJustify aHoriJustify1, aHoriJustify2;
1346 
1347  if((r1 >>= aHoriJustify1) && (r2 >>= aHoriJustify2))
1348  return (aHoriJustify1 == aHoriJustify2);
1349  return false;
1350 }
1351 
1353  const OUString& rStrImpValue,
1354  css::uno::Any& rValue,
1355  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1356 {
1357  bool bRetval(false);
1358 
1359  if (IsXMLToken(rStrImpValue, XML_FALSE))
1360  {
1361  bRetval = true;
1362  }
1363  else if (IsXMLToken(rStrImpValue, XML_TRUE))
1364  {
1365  rValue <<= table::CellHoriJustify_REPEAT;
1366  bRetval = true;
1367  }
1368 
1369  return bRetval;
1370 }
1371 
1373  OUString& rStrExpValue,
1374  const css::uno::Any& rValue,
1375  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1376 {
1377  table::CellHoriJustify nVal;
1378  bool bRetval(false);
1379 
1380  if(rValue >>= nVal)
1381  {
1382  if (nVal == table::CellHoriJustify_REPEAT)
1383  {
1384  rStrExpValue = GetXMLToken(XML_TRUE);
1385  bRetval = true;
1386  }
1387  else
1388  {
1389  rStrExpValue = GetXMLToken(XML_FALSE);
1390  bRetval = true;
1391  }
1392  }
1393 
1394  return bRetval;
1395 }
1396 
1398 {
1399 }
1400 
1402  const css::uno::Any& r1,
1403  const css::uno::Any& r2 ) const
1404 {
1405  table::CellOrientation aOrientation1, aOrientation2;
1406 
1407  if((r1 >>= aOrientation1) && (r2 >>= aOrientation2))
1408  return (aOrientation1 == aOrientation2);
1409  return false;
1410 }
1411 
1413  const OUString& rStrImpValue,
1414  css::uno::Any& rValue,
1415  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1416 {
1417  bool bRetval(false);
1418 
1419  table::CellOrientation nValue;
1420  if (IsXMLToken(rStrImpValue, XML_LTR))
1421  {
1422  nValue = table::CellOrientation_STANDARD;
1423  rValue <<= nValue;
1424  bRetval = true;
1425  }
1426  else if (IsXMLToken(rStrImpValue, XML_TTB))
1427  {
1428  nValue = table::CellOrientation_STACKED;
1429  rValue <<= nValue;
1430  bRetval = true;
1431  }
1432 
1433  return bRetval;
1434 }
1435 
1437  OUString& rStrExpValue,
1438  const css::uno::Any& rValue,
1439  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1440 {
1441  table::CellOrientation nVal;
1442  bool bRetval(false);
1443 
1444  if(rValue >>= nVal)
1445  {
1446  switch (nVal)
1447  {
1448  case table::CellOrientation_STACKED :
1449  {
1450  rStrExpValue = GetXMLToken(XML_TTB);
1451  bRetval = true;
1452  }
1453  break;
1454  default:
1455  {
1456  rStrExpValue = GetXMLToken(XML_LTR);
1457  bRetval = true;
1458  }
1459  break;
1460  }
1461  }
1462 
1463  return bRetval;
1464 }
1465 
1467 {
1468 }
1469 
1471  const css::uno::Any& r1,
1472  const css::uno::Any& r2 ) const
1473 {
1474  sal_Int32 aAngle1 = 0, aAngle2 = 0;
1475 
1476  if((r1 >>= aAngle1) && (r2 >>= aAngle2))
1477  return (aAngle1 == aAngle2);
1478  return false;
1479 }
1480 
1482  const OUString& rStrImpValue,
1483  css::uno::Any& rValue,
1484  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1485 {
1486  bool bRetval(false);
1487 
1488  sal_Int32 nValue;
1489  if (::sax::Converter::convertNumber(nValue, rStrImpValue) && !o3tl::checked_multiply<sal_Int32>(nValue, 100, nValue))
1490  {
1491  rValue <<= nValue;
1492  bRetval = true;
1493  }
1494 
1495  return bRetval;
1496 }
1497 
1499  OUString& rStrExpValue,
1500  const css::uno::Any& rValue,
1501  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1502 {
1503  sal_Int32 nVal = 0;
1504  bool bRetval(false);
1505 
1506  if(rValue >>= nVal)
1507  {
1508  rStrExpValue = OUString::number(nVal / 100);
1509  bRetval = true;
1510  }
1511 
1512  return bRetval;
1513 }
1514 
1516 {
1517 }
1518 
1520  const css::uno::Any& r1,
1521  const css::uno::Any& r2 ) const
1522 {
1523  sal_Int32 aReference1(0), aReference2(0);
1524 
1525  if((r1 >>= aReference1) && (r2 >>= aReference2))
1526  return (aReference1 == aReference2);
1527  return false;
1528 }
1529 
1531  const OUString& rStrImpValue,
1532  css::uno::Any& rValue,
1533  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1534 {
1535  bool bRetval(false);
1536 
1537  sal_Int32 nValue;
1538  if (IsXMLToken(rStrImpValue, XML_NONE))
1539  {
1540  nValue = table::CellVertJustify2::STANDARD;
1541  rValue <<= nValue;
1542  bRetval = true;
1543  }
1544  else if (IsXMLToken(rStrImpValue, XML_BOTTOM))
1545  {
1546  nValue = table::CellVertJustify2::BOTTOM;
1547  rValue <<= nValue;
1548  bRetval = true;
1549  }
1550  else if (IsXMLToken(rStrImpValue, XML_TOP))
1551  {
1552  nValue = table::CellVertJustify2::TOP;
1553  rValue <<= nValue;
1554  bRetval = true;
1555  }
1556  else if (IsXMLToken(rStrImpValue, XML_CENTER))
1557  {
1558  nValue = table::CellVertJustify2::CENTER;
1559  rValue <<= nValue;
1560  bRetval = true;
1561  }
1562 
1563  return bRetval;
1564 }
1565 
1567  OUString& rStrExpValue,
1568  const css::uno::Any& rValue,
1569  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1570 {
1571  sal_Int32 nVal(0);
1572  bool bRetval(false);
1573 
1574  if(rValue >>= nVal)
1575  {
1576  switch (nVal)
1577  {
1578  case table::CellVertJustify2::BOTTOM :
1579  {
1580  rStrExpValue = GetXMLToken(XML_BOTTOM);
1581  bRetval = true;
1582  }
1583  break;
1584  case table::CellVertJustify2::CENTER :
1585  {
1586  rStrExpValue = GetXMLToken(XML_CENTER);
1587  bRetval = true;
1588  }
1589  break;
1590  case table::CellVertJustify2::STANDARD :
1591  {
1592  rStrExpValue = GetXMLToken(XML_NONE);
1593  bRetval = true;
1594  }
1595  break;
1596  case table::CellVertJustify2::TOP :
1597  {
1598  rStrExpValue = GetXMLToken(XML_TOP);
1599  bRetval = true;
1600  }
1601  break;
1602  default:
1603  {
1604  // added to avoid warnings
1605  }
1606  }
1607  }
1608 
1609  return bRetval;
1610 }
1611 
1613 {
1614 }
1615 
1617  const css::uno::Any& r1,
1618  const css::uno::Any& r2 ) const
1619 {
1620  sal_Int32 aReference1(0), aReference2(0);
1621 
1622  if((r1 >>= aReference1) && (r2 >>= aReference2))
1623  return (aReference1 == aReference2);
1624  return false;
1625 }
1626 
1628  const OUString& rStrImpValue,
1629  css::uno::Any& rValue,
1630  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1631 {
1632  bool bRetval(false);
1633 
1634  sal_Int32 nValue;
1635  if (IsXMLToken(rStrImpValue, XML_AUTOMATIC))
1636  {
1637  nValue = table::CellVertJustify2::STANDARD;
1638  rValue <<= nValue;
1639  bRetval = true;
1640  }
1641  else if (IsXMLToken(rStrImpValue, XML_BOTTOM))
1642  {
1643  nValue = table::CellVertJustify2::BOTTOM;
1644  rValue <<= nValue;
1645  bRetval = true;
1646  }
1647  else if (IsXMLToken(rStrImpValue, XML_TOP))
1648  {
1649  nValue = table::CellVertJustify2::TOP;
1650  rValue <<= nValue;
1651  bRetval = true;
1652  }
1653  else if (IsXMLToken(rStrImpValue, XML_MIDDLE))
1654  {
1655  nValue = table::CellVertJustify2::CENTER;
1656  rValue <<= nValue;
1657  bRetval = true;
1658  }
1659  else if (IsXMLToken(rStrImpValue, XML_JUSTIFY))
1660  {
1661  nValue = table::CellVertJustify2::BLOCK;
1662  rValue <<= nValue;
1663  bRetval = true;
1664  }
1665 
1666  return bRetval;
1667 }
1668 
1670  OUString& rStrExpValue,
1671  const css::uno::Any& rValue,
1672  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1673 {
1674  sal_Int32 nVal(0);
1675  bool bRetval(false);
1676 
1677  if(rValue >>= nVal)
1678  {
1679  switch (nVal)
1680  {
1681  case table::CellVertJustify2::BOTTOM :
1682  {
1683  rStrExpValue = GetXMLToken(XML_BOTTOM);
1684  bRetval = true;
1685  }
1686  break;
1687  case table::CellVertJustify2::CENTER :
1688  {
1689  rStrExpValue = GetXMLToken(XML_MIDDLE);
1690  bRetval = true;
1691  }
1692  break;
1693  case table::CellVertJustify2::STANDARD :
1694  {
1695  rStrExpValue = GetXMLToken(XML_AUTOMATIC);
1696  bRetval = true;
1697  }
1698  break;
1699  case table::CellVertJustify2::TOP :
1700  {
1701  rStrExpValue = GetXMLToken(XML_TOP);
1702  bRetval = true;
1703  }
1704  break;
1705  case table::CellVertJustify2::BLOCK :
1706  {
1707  rStrExpValue = GetXMLToken(XML_JUSTIFY);
1708  bRetval = true;
1709  }
1710  break;
1711  default:
1712  {
1713  // added to avoid warnings
1714  }
1715  }
1716  }
1717 
1718  return bRetval;
1719 }
1720 
1722 {
1723 }
1724 
1726  const css::uno::Any& r1,
1727  const css::uno::Any& r2 ) const
1728 {
1729  bool aBreak1 = false, aBreak2 = false;
1730 
1731  if((r1 >>= aBreak1) && (r2 >>= aBreak2))
1732  return (aBreak1 == aBreak2);
1733  return false;
1734 }
1735 
1737  const OUString& rStrImpValue,
1738  css::uno::Any& rValue,
1739  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1740 {
1741  bool bRetval(false);
1742 
1743  bool bValue;
1744  if (IsXMLToken(rStrImpValue, XML_AUTO))
1745  {
1746  bValue = false;
1747  rValue <<= bValue;
1748  bRetval = true;
1749  }
1750  else if (IsXMLToken(rStrImpValue, XML_PAGE))
1751  {
1752  bValue = true;
1753  rValue <<= bValue;
1754  bRetval = true;
1755  }
1756 
1757  return bRetval;
1758 }
1759 
1761  OUString& rStrExpValue,
1762  const css::uno::Any& rValue,
1763  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1764 {
1765  bool bRetval(false);
1766 
1767  if(::cppu::any2bool(rValue))
1768  {
1769  rStrExpValue = GetXMLToken(XML_PAGE);
1770  bRetval = true;
1771  }
1772  else
1773  {
1774  rStrExpValue = GetXMLToken(XML_AUTO);
1775  bRetval = true;
1776  }
1777 
1778  return bRetval;
1779 }
1780 
1782 {
1783 }
1784 
1786  const css::uno::Any& r1,
1787  const css::uno::Any& r2 ) const
1788 {
1789  return (::cppu::any2bool(r1) == ::cppu::any2bool(r2));
1790 }
1791 
1793  const OUString& rStrImpValue,
1794  css::uno::Any& rValue,
1795  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1796 {
1797  bool bRetval(false);
1798 
1799  if (IsXMLToken(rStrImpValue, XML_WRAP))
1800  {
1801  rValue <<= true;
1802  bRetval = true;
1803  }
1804  else if (IsXMLToken(rStrImpValue, XML_NO_WRAP))
1805  {
1806  rValue <<= false;
1807  bRetval = true;
1808  }
1809 
1810  return bRetval;
1811 }
1812 
1814  OUString& rStrExpValue,
1815  const css::uno::Any& rValue,
1816  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1817 {
1818  bool bRetval(false);
1819 
1820  if (::cppu::any2bool(rValue))
1821  {
1822  rStrExpValue = GetXMLToken(XML_WRAP);
1823  bRetval = true;
1824  }
1825  else
1826  {
1827  rStrExpValue = GetXMLToken(XML_NO_WRAP);
1828  bRetval = true;
1829  }
1830 
1831  return bRetval;
1832 }
1833 
1834 bool XmlScPropHdl_IsEqual::importXML( const OUString& /* rStrImpValue */,
1835  css::uno::Any& /* rValue */,
1836  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1837 {
1838  OSL_FAIL("should never be called");
1839  return false;
1840 }
1841 
1842 bool XmlScPropHdl_IsEqual::exportXML( OUString& /* rStrExpValue */,
1843  const css::uno::Any& /* rValue */,
1844  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1845 {
1846  OSL_FAIL("should never be called");
1847  return false;
1848 }
1849 
1851 {
1852 }
1853 
1855  const css::uno::Any& r1,
1856  const css::uno::Any& r2 ) const
1857 {
1858  return (::cppu::any2bool(r1) == ::cppu::any2bool(r2));
1859 }
1860 
1862  const OUString& rStrImpValue,
1863  css::uno::Any& rValue,
1864  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1865 {
1866  bool bRetval(false);
1867 
1868  if (IsXMLToken(rStrImpValue, XML_AUTO))
1869  {
1870  rValue <<= true;
1871  bRetval = true;
1872  }
1873  else if (IsXMLToken(rStrImpValue, XML_0))
1874  {
1875  rValue <<= false;
1876  bRetval = true;
1877  }
1878 
1879  return bRetval;
1880 }
1881 
1883  OUString& rStrExpValue,
1884  const css::uno::Any& rValue,
1885  const SvXMLUnitConverter& /* rUnitConverter */ ) const
1886 {
1887  bool bRetval(false);
1888 
1889  if (::cppu::any2bool(rValue))
1890  {
1891  rStrExpValue = GetXMLToken(XML_AUTO);
1892  bRetval = true;
1893  }
1894  else
1895  {
1896  rStrExpValue = GetXMLToken(XML_0);
1897  bRetval = true;
1898  }
1899 
1900  return bRetval;
1901 }
1902 
1903 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define XML_SC_ISTEXTWRAPPED
Definition: xmlstyle.hxx:54
#define XML_TYPE_BORDER
XML_MAP
virtual bool exportXML(OUString &rStrExpValue, const css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Definition: xmlstyle.cxx:1312
XML_BOTTOM
XML_FORMULA_HIDDEN
virtual bool equals(const css::uno::Any &r1, const css::uno::Any &r2) const override
Definition: xmlstyle.cxx:1177
virtual bool equals(const css::uno::Any &r1, const css::uno::Any &r2) const override
Definition: xmlstyle.cxx:1616
#define XML_TYPE_TEXT_SHADOW
XML_VALUE_TYPE
virtual const XMLPropertyHandler * GetPropertyHandler(sal_Int32 nType) const
#define CTF_SC_RIGHTPADDING
Definition: xmlstyle.hxx:63
XML_BORDER_LINE_WIDTH_LEFT
#define CTF_BOTTOMBORDER
XML_DISPLAY
#define XML_TYPE_BUILDIN_CMP_ONLY
#define MAP_ODF13(name, prefix, token, type, context)
Definition: xmlstyle.cxx:53
#define CTF_PARALEFTMARGIN_REL
XML_WRITING_MODE
virtual void exportStyleAttributes(SvXMLAttributeList &rAttrList, XmlStyleFamily nFamily, const ::std::vector< XMLPropertyState > &rProperties, const SvXMLExportPropertyMapper &rPropExp, const SvXMLUnitConverter &rUnitConverter, const SvXMLNamespaceMap &rNamespaceMap) const
virtual bool importXML(const OUString &rStrImpValue, css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Definition: xmlstyle.cxx:1114
SvXMLExport & GetExport() const
#define XML_TYPE_BORDER_WIDTH
#define CTF_LEFTBORDER
XML_JUSTIFY
virtual bool importXML(const OUString &rStrImpValue, css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Definition: xmlstyle.cxx:1736
XML_ROTATION_ALIGN
#define XML_SC_TYPE_HORIJUSTIFY
Definition: xmlstyle.hxx:41
#define CTF_SC_DIAGONALBLTRWIDTHS
Definition: xmlstyle.hxx:87
virtual bool exportXML(OUString &rStrExpValue, const css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Definition: xmlstyle.cxx:1842
#define CTF_SC_ROWHEIGHT
Definition: xmlstyle.hxx:89
#define CTF_SC_BOTTOMBORDERWIDTH
Definition: xmlstyle.hxx:74
#define CTF_SC_BOTTOMBORDER
Definition: xmlstyle.hxx:69
XML_BREAK_BEFORE
#define XML_SC_TYPE_BREAKBEFORE
Definition: xmlstyle.hxx:98
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:1781
#define CTF_SC_MASTERPAGENAME
Definition: xmlstyle.hxx:94
#define XML_SC_TYPE_HORIJUSTIFYSOURCE
Definition: xmlstyle.hxx:43
XML_APPLY_STYLE_NAME
virtual bool equals(const css::uno::Any &r1, const css::uno::Any &r2) const override
Definition: xmlstyle.cxx:1785
virtual bool equals(const css::uno::Any &r1, const css::uno::Any &r2) const override
Definition: xmlstyle.cxx:1470
XML_REPEAT_CONTENT
virtual bool importXML(const OUString &rStrImpValue, css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Definition: xmlstyle.cxx:1861
const rtl::Reference< XMLPropertySetMapper > & GetCellStylesPropertySetMapper() const
Definition: xmlexprt.hxx:244
XML_MASTER_PAGE_NAME
XML_BORDER_LEFT
#define CTF_ALLBORDER
#define MAP_EXT_I(name, prefix, token, type, context)
Definition: xmlstyle.cxx:57
constexpr sal_uInt16 XML_NAMESPACE_XLINK
sal_Int32 mnIndex
virtual ~XmlScPropHdl_Orientation() override
Definition: xmlstyle.cxx:1397
XML_BORDER
XML_VERTICAL_ALIGN
XML_BACKGROUND_COLOR
virtual bool importXML(const OUString &rStrImpValue, css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Definition: xmlstyle.cxx:1352
#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
virtual ~ScXMLAutoStylePoolP() override
Definition: xmlstyle.cxx:795
XML_PRINT_CONTENT
constexpr sal_uInt16 XML_NAMESPACE_LO_EXT
bool IsXMLToken(std::u16string_view rString, enum XMLTokenEnum eToken)
constexpr sal_uInt16 XML_NAMESPACE_CSS3TEXT
XML_MIDDLE
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
virtual bool equals(const css::uno::Any &r1, const css::uno::Any &r2) const override
Definition: xmlstyle.cxx:1725
#define CTF_PARABOTTOMMARGIN_REL
XML_VERTICAL_JUSTIFY
XML_BORDER_TOP
#define CTF_SC_NUMBERFORMAT
Definition: xmlstyle.hxx:75
#define MAP(name, prefix, token, type, context)
Definition: xmlstyle.cxx:52
#define XML_TYPE_PROP_TABLE_ROW
virtual bool exportXML(OUString &rStrExpValue, const css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Definition: xmlstyle.cxx:1882
XML_USE_OPTIMAL_ROW_HEIGHT
XML_0
virtual bool importXML(const OUString &rStrImpValue, css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Definition: xmlstyle.cxx:1627
XML_WRAP_OPTION
virtual bool exportXML(OUString &rStrExpValue, const css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Definition: xmlstyle.cxx:989
#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.
#define XML_TYPE_PROP_TABLE_COLUMN
#define CTF_TOPBORDERWIDTH
#define CTF_RIGHTBORDER
#define MID_FLAG_MERGE_ATTRIBUTE
virtual bool equals(const css::uno::Any &r1, const css::uno::Any &r2) const override
Definition: xmlstyle.cxx:1281
virtual bool exportXML(OUString &rStrExpValue, const css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Definition: xmlstyle.cxx:1140
#define SC_UNONAME_CELLHJUS_METHOD
Definition: unonames.hxx:102
#define XML_SC_TYPE_VERTJUSTIFY_METHOD
Definition: xmlstyle.hxx:53
XmlStyleFamily
XML_FIX
#define XML_TYPE_MEASURE16
XML_STYLE
#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:1834
#define CTF_SC_LEFTBORDER
Definition: xmlstyle.hxx:66
XML_HIDDEN_AND_PROTECTED
XML_TYPE
XML_PROTECTED
void AddAttribute(sal_uInt16 nPrefix, const char *pName, const OUString &rValue)
#define CTF_PARATOPMARGIN
virtual ~XmlScPropHdl_HoriJustify() override
Definition: xmlstyle.cxx:1173
#define MAP_EXT(name, prefix, token, type, context)
Definition: xmlstyle.cxx:55
#define CTF_SC_ALLPADDING
Definition: xmlstyle.hxx:60
#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_PADDING
XML_FALSE
const char * sName
#define MID_FLAG_ELEMENT_ITEM
XML_TEXT_JUSTIFY
virtual bool exportXML(OUString &rStrExpValue, const css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Definition: xmlstyle.cxx:1498
XML_TEXT_ALIGN
#define XML_TYPE_COLORAUTO
XML_TAB_COLOR
XML_DATA_STYLE_NAME
#define XML_SC_TYPE_HORIJUSTIFYREPEAT
Definition: xmlstyle.hxx:44
#define CTF_SC_ISVISIBLE
Definition: xmlstyle.hxx:92
XML_DIAGONAL_BL_TR
virtual bool importXML(const OUString &rStrImpValue, css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Definition: xmlstyle.cxx:916
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:804
virtual ~XmlScPropHdl_BreakBefore() override
Definition: xmlstyle.cxx:1721
#define XML_SC_TYPE_VERTICAL
Definition: xmlstyle.hxx:56
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
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:1760
constexpr sal_uInt16 XML_NAMESPACE_FO
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_PADDING_BOTTOM
virtual bool importXML(const OUString &rStrImpValue, css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Definition: xmlstyle.cxx:1188
constexpr sal_uInt16 XML_NAMESPACE_TEXT
virtual ~XmlScPropHdl_HoriJustifyRepeat() override
Definition: xmlstyle.cxx:1337
#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
XML_DIAGONAL_BL_TR_WIDTHS
#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:1037
virtual ~ScXMLCellExportPropertyMapper() override
Definition: xmlstyle.cxx:188
XML_DECIMAL_PLACES
XML_DIAGONAL_TL_BR_WIDTHS
XML_PADDING_LEFT
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:1481
XML_HREF
virtual bool importXML(const OUString &rStrImpValue, css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Definition: xmlstyle.cxx:1530
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_SHADOW
virtual bool exportXML(OUString &rStrExpValue, const css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Definition: xmlstyle.cxx:1813
XML_CENTER
#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:1292
#define SC_UNONAME_CELLVJUS_METHOD
Definition: unonames.hxx:103
XML_DISTRIBUTE
#define MID_FLAG_SPECIAL_ITEM
XML_NO_WRAP
virtual bool exportXML(OUString &rStrExpValue, const css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Definition: xmlstyle.cxx:1436
XML_MARGIN_LEFT
XML_AUTOMATIC
#define CTF_SC_LEFTBORDERWIDTH
Definition: xmlstyle.hxx:71
XML_SHRINK_TO_FIT
virtual bool importXML(const OUString &rStrImpValue, css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Definition: xmlstyle.cxx:1050
virtual bool equals(const css::uno::Any &r1, const css::uno::Any &r2) const override
Definition: xmlstyle.cxx:1854
#define XML_TYPE_NUMBER16
XML_TEXT_ALIGN_SOURCE
virtual ~XmlScPropHdl_Vertical() override
Definition: xmlstyle.cxx:1850
virtual bool exportXML(OUString &rStrExpValue, const css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Definition: xmlstyle.cxx:1669
#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:1412
virtual bool exportXML(OUString &rStrExpValue, const css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Definition: xmlstyle.cxx:1566
virtual bool equals(const css::uno::Any &r1, const css::uno::Any &r2) const override
Definition: xmlstyle.cxx:1519
#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:1401
static bool convertBool(bool &rBool, std::u16string_view rString)
#define MID_FLAG_MERGE_PROPERTY
XML_WRAP
#define XML_SC_TYPE_PRINTCONTENT
Definition: xmlstyle.hxx:40
XML_COLUMN_WIDTH
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:1103
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
XML_BORDER_BOTTOM
XML_BORDER_LINE_WIDTH_RIGHT
#define CTF_SC_DIAGONALTLBRWIDTH
Definition: xmlstyle.hxx:83
#define CTF_PARALEFTMARGIN
#define CTF_SC_ROWOPTIMALHEIGHT
Definition: xmlstyle.hxx:90
virtual ~XmlScPropHdl_PrintContent() override
Definition: xmlstyle.cxx:1033
XML_DIAGONAL_BL_TR_WIDTH
css::uno::Any maValue
constexpr sal_uInt16 XML_NAMESPACE_TABLE
ScXMLTableExportPropertyMapper(const rtl::Reference< XMLPropertySetMapper > &rMapper)
Definition: xmlstyle.cxx:588
#define CTF_SC_DIAGONALBLTRWIDTH
Definition: xmlstyle.hxx:85
#define XML_TYPE_PROP_TABLE_CELL
SvXmlExportFlags
XML_BORDER_RIGHT
#define CTF_SC_IMPORT_MAP
Definition: xmlstyle.hxx:79
const OUString & GetXMLToken(enum XMLTokenEnum eToken)
#define MID_FLAG_MASK
#define CTF_SC_CELLSTYLE
Definition: xmlstyle.hxx:80
#define CTF_PARARIGHTMARGIN_REL
XML_PADDING_RIGHT
XML_DIAGONAL_TL_BR_WIDTH
XML_ROW_HEIGHT
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:1372
XML_SIMPLE
const XMLPropertyMapEntry aXMLScRowStylesImportProperties[]
Definition: xmlstyle.cxx:123
XML_START
QPRO_FUNC_TYPE nType
Definition: qproform.cxx:400
#define CTF_PARARIGHTMARGIN
XML_DIRECTION
virtual ~ScXMLTableExportPropertyMapper() override
Definition: xmlstyle.cxx:594
XML_BORDER_LINE_WIDTH_BOTTOM
XML_PAGE
virtual bool exportXML(OUString &rStrExpValue, const css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Definition: xmlstyle.cxx:1080
XML_NONE
const XMLPropertyMapEntry aXMLScCellStylesProperties[]
Definition: xmlstyle.cxx:60
XML_TRUE
XML_GLYPH_ORIENTATION_VERTICAL
XML_BASE_CELL_ADDRESS
#define XML_TYPE_COLORTRANSPARENT
virtual ~XmlScPropHdl_RotateAngle() override
Definition: xmlstyle.cxx:1466
virtual ~XmlScPropHdl_HoriJustifySource() override
Definition: xmlstyle.cxx:1277
XML_HYPERLINK
virtual bool equals(const css::uno::Any &r1, const css::uno::Any &r2) const override
Definition: xmlstyle.cxx:1341
#define CTF_ALLBORDERWIDTH
#define CTF_BOTTOMBORDERWIDTH
#define XML_TYPE_BOOL
virtual ~ScXMLColumnExportPropertyMapper() override
Definition: xmlstyle.cxx:572
virtual bool exportXML(OUString &rStrExpValue, const css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Definition: xmlstyle.cxx:1230
#define CTF_SC_TOPBORDER
Definition: xmlstyle.hxx:68
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:897
XML_LTR
XML_END
const XMLPropertyMapEntry aXMLScTableStylesProperties[]
Definition: xmlstyle.cxx:171
XML_CONTENT_VALIDATION
XML_ROTATION_ANGLE
#define CTF_PARABOTTOMMARGIN
#define CTF_RIGHTBORDERWIDTH
XML_XMLNS
XML_CELL_PROTECT
XML_AUTO
#define CTF_SC_DIAGONALTLBRWIDTHS
Definition: xmlstyle.hxx:86
virtual ~XmlScPropHdl_RotateReference() override
Definition: xmlstyle.cxx:1515
virtual ~XmlScPropHdl_VertJustify() override
Definition: xmlstyle.cxx:1612
XML_BORDER_LINE_WIDTH_TOP
#define CTF_SD_SHAPE_PARA_ADJUST
XML_TTB
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:901
XML_DIAGONAL_TL_BR
#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:1792
#define XML_SC_TYPE_ROTATEREFERENCE
Definition: xmlstyle.hxx:47
bool any2bool(const css::uno::Any &rAny)
virtual ~XmlScPropHdl_JustifyMethod() override
Definition: xmlstyle.cxx:1099
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:808
#define XML_SC_TYPE_HORIJUSTIFY_METHOD
Definition: xmlstyle.hxx:42
void PutHdlCache(sal_Int32 nType, const XMLPropertyHandler *pHdl) const
XML_CONDITION
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
XML_BORDER_LINE_WIDTH
XML_PADDING_TOP