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