LibreOffice Module xmloff (master)  1
xmlnumi.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 <com/sun/star/beans/PropertyValue.hpp>
21 #include <com/sun/star/beans/XPropertySet.hpp>
22 #include <com/sun/star/awt/Size.hpp>
23 #include <com/sun/star/frame/XModel.hpp>
24 #include <com/sun/star/graphic/XGraphic.hpp>
25 #include <com/sun/star/awt/FontDescriptor.hpp>
26 #include <com/sun/star/text/HoriOrientation.hpp>
27 #include <com/sun/star/text/VertOrientation.hpp>
28 #include <com/sun/star/text/PositionAndSpaceMode.hpp>
29 #include <com/sun/star/text/LabelFollow.hpp>
30 #include <com/sun/star/container/XNameContainer.hpp>
31 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
32 #include <com/sun/star/style/XStyle.hpp>
33 #include <com/sun/star/io/XOutputStream.hpp>
34 #include <com/sun/star/awt/XBitmap.hpp>
35 #include <com/sun/star/style/NumberingType.hpp>
36 #include <com/sun/star/container/XIndexReplace.hpp>
37 
38 #include <o3tl/any.hxx>
39 #include <o3tl/temporary.hxx>
40 #include <rtl/ustrbuf.hxx>
41 #include <sal/log.hxx>
42 #include <tools/diagnose_ex.h>
43 
44 #include <tools/fontenum.hxx>
45 #include <tools/color.hxx>
46 
47 #include <sax/tools/converter.hxx>
48 
49 #include <vcl/vclenum.hxx>
50 
51 #include <xmloff/xmltkmap.hxx>
52 #include <xmloff/namespacemap.hxx>
53 #include <xmloff/xmlnamespace.hxx>
54 #include <xmloff/xmlimp.hxx>
56 #include <xmloff/xmltoken.hxx>
57 
58 #include <xmloff/xmluconv.hxx>
59 #include "fonthdl.hxx"
61 #include <xmloff/families.hxx>
62 #include <xmloff/maptype.hxx>
63 
64 #include <xmloff/xmlnumi.hxx>
65 
66 using namespace ::com::sun::star;
67 using namespace ::com::sun::star::uno;
68 using namespace ::com::sun::star::style;
69 using namespace ::com::sun::star::text;
70 using namespace ::com::sun::star::beans;
71 using namespace ::com::sun::star::container;
72 using namespace ::com::sun::star::lang;
73 using namespace ::com::sun::star::frame;
74 using namespace ::xmloff::token;
75 using namespace ::com::sun::star::io;
76 
78 
79 namespace {
80 
82 {
84 
85 public:
86 
88  SvXMLImport& rImport, sal_Int32 nElement,
89  const Reference< xml::sax::XFastAttributeList >& xAttrList,
91 
92  virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
93  sal_Int32 nElement,
94  const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
95 };
96 
97 class SvxXMLListLevelStyleLabelAlignmentAttrContext_Impl : public SvXMLImportContext
98 {
99 public:
100 
101  SvxXMLListLevelStyleLabelAlignmentAttrContext_Impl(
102  SvXMLImport& rImport, sal_Int32 nElement,
103  const Reference< xml::sax::XFastAttributeList >& xAttrList,
105 };
106 
107 }
108 
110 {
112 
113  OUString sPrefix;
114  OUString sSuffix;
115  OUString sTextStyleName;
116  OUString sNumFormat;
117  OUString sNumLetterSync;
118  OUString sBulletFontName;
120  OUString sImageURL;
121 
122  Reference < XOutputStream > xBase64Stream;
123 
124  sal_Int32 nLevel;
125  sal_Int32 nSpaceBefore;
126  sal_Int32 nMinLabelWidth;
127  sal_Int32 nMinLabelDist;
128  sal_Int32 nImageWidth;
129  sal_Int32 nImageHeight;
130  sal_Int16 nNumStartValue;
131  sal_Int16 nNumDisplayLevels;
132 
133  sal_Int16 eAdjust;
134  sal_Int16 eBulletFontFamily;
135  sal_Int16 eBulletFontPitch;
136  rtl_TextEncoding eBulletFontEncoding;
137  sal_Int16 eImageVertOrient;
138 
140 
141  sal_Int16 nRelSize;
143 
144  sal_Int16 ePosAndSpaceMode;
145  sal_Int16 eLabelFollowedBy;
147  sal_Int32 nFirstLineIndent;
148  sal_Int32 nIndentAt;
149 
150  bool bBullet : 1;
151  bool bImage : 1;
152  bool bNum : 1;
153  bool bHasColor : 1;
154 
155  void SetRelSize( sal_Int16 nRel ) { nRelSize = nRel; }
156  void SetColor( Color nColor )
157  { m_nColor = nColor; bHasColor = true; }
158  void SetSpaceBefore( sal_Int32 nSet ) { nSpaceBefore = nSet; }
159  void SetMinLabelWidth( sal_Int32 nSet ) { nMinLabelWidth = nSet; }
160  void SetMinLabelDist( sal_Int32 nSet ) { nMinLabelDist = nSet; }
161  void SetAdjust( sal_Int16 eSet ) { eAdjust = eSet; }
162 
163  void SetBulletFontName( const OUString& rSet ) { sBulletFontName = rSet; }
164  void SetBulletFontStyleName( const OUString& rSet )
165  { sBulletFontStyleName = rSet; }
166  void SetBulletFontFamily( sal_Int16 eSet ) { eBulletFontFamily = eSet; }
167  void SetBulletFontPitch( sal_Int16 eSet ) { eBulletFontPitch = eSet; }
168  void SetBulletFontEncoding( rtl_TextEncoding eSet )
169  { eBulletFontEncoding = eSet; }
170 
171  void SetImageWidth( sal_Int32 nSet ) { nImageWidth = nSet; }
172  void SetImageHeight( sal_Int32 nSet ) { nImageHeight = nSet; }
173  void SetImageVertOrient( sal_Int16 eSet )
174  { eImageVertOrient = eSet; }
175 
176 public:
177 
179  SvXMLImport& rImport, sal_Int32 nElement,
180  const Reference< xml::sax::XFastAttributeList > & xAttrList );
181 
182  virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
183  sal_Int32 nElement,
184  const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
185 
186  sal_Int32 GetLevel() const { return nLevel; }
188 
189  void SetPosAndSpaceMode( sal_Int16 eValue )
190  {
191  ePosAndSpaceMode = eValue;
192  }
193  void SetLabelFollowedBy( sal_Int16 eValue )
194  {
195  eLabelFollowedBy = eValue;
196  }
197  void SetListtabStopPosition( sal_Int32 nValue )
198  {
199  nListtabStopPosition = nValue;
200  }
201  void SetFirstLineIndent( sal_Int32 nValue )
202  {
203  nFirstLineIndent = nValue;
204  }
205  void SetIndentAt( sal_Int32 nValue )
206  {
207  nIndentAt = nValue;
208  }
209 };
210 
211 constexpr OUStringLiteral gsStarBats( u"StarBats" );
212 constexpr OUStringLiteral gsStarMath( u"StarMath" );
213 
215  SvXMLImport& rImport, sal_Int32 nElement,
216  const Reference< xml::sax::XFastAttributeList > & xAttrList )
217 
218 : SvXMLImportContext( rImport )
219 , sNumFormat( "1" )
220 , nLevel( -1 )
221 , nSpaceBefore( 0 )
222 , nMinLabelWidth( 0 )
223 , nMinLabelDist( 0 )
224 , nImageWidth( 0 )
225 , nImageHeight( 0 )
226 , nNumStartValue( 1 )
227 , nNumDisplayLevels( 1 )
228 , eAdjust( HoriOrientation::LEFT )
229 , eBulletFontFamily( FAMILY_DONTKNOW )
230 , eBulletFontPitch( PITCH_DONTKNOW )
231 , eBulletFontEncoding( RTL_TEXTENCODING_DONTKNOW )
232 , eImageVertOrient(0)
233 , cBullet( 0 )
234 , nRelSize(0)
235 , m_nColor(0)
236 , ePosAndSpaceMode( PositionAndSpaceMode::LABEL_WIDTH_AND_POSITION )
237 , eLabelFollowedBy( LabelFollow::LISTTAB )
238 , nListtabStopPosition( 0 )
239 , nFirstLineIndent( 0 )
240 , nIndentAt( 0 )
241 , bBullet( false )
242 , bImage( false )
243 , bNum( false )
244 , bHasColor( false )
245 {
246  switch (nElement & TOKEN_MASK)
247  {
250  bNum = true;
251  break;
253  bBullet = true;
254  break;
256  bImage = true;
257  break;
258  }
259 
260  for( auto& aIter : sax_fastparser::castToFastAttributeList(xAttrList) )
261  {
262  switch( aIter.getToken() )
263  {
264  case XML_ELEMENT(TEXT, XML_LEVEL):
265  nLevel = aIter.toInt32();
266  if( nLevel >= 1 )
267  nLevel--;
268  else
269  nLevel = 0;
270  break;
272  sTextStyleName = aIter.toString();
273  break;
275  if (!aIter.isEmpty())
276  {
277  cBullet = aIter.toString().iterateCodePoints(&o3tl::temporary(sal_Int32(0)));
278  }
279  break;
280  case XML_ELEMENT(XLINK, XML_HREF):
281  if( bImage )
282  sImageURL = aIter.toString();
283  break;
284  case XML_ELEMENT(XLINK, XML_TYPE):
285  case XML_ELEMENT(XLINK, XML_SHOW):
286  case XML_ELEMENT(XLINK, XML_ACTUATE):
287  // This properties will be ignored
288  break;
290  if( bNum )
291  sNumFormat = aIter.toString();
292  break;
294  sPrefix = aIter.toString();
295  break;
297  sSuffix = aIter.toString();
298  break;
300  if( bNum )
301  sNumLetterSync = aIter.toString();
302  break;
304  if( bNum )
305  {
306  sal_Int32 nTmp = aIter.toInt32();
308  (nTmp < 0) ? 1 : ( (nTmp>SHRT_MAX) ? SHRT_MAX
309  : static_cast<sal_Int16>(nTmp) );
310  }
311  break;
313  if( bNum )
314  {
315  sal_Int32 nTmp = aIter.toInt32();
317  (nTmp < 1) ? 1 : ( (nTmp>SHRT_MAX) ? SHRT_MAX
318  : static_cast<sal_Int16>(nTmp) );
319  }
320  break;
321  default:
322  XMLOFF_WARN_UNKNOWN("xmloff", aIter);
323  }
324  }
325 }
326 
327 css::uno::Reference< css::xml::sax::XFastContextHandler > SvxXMLListLevelStyleContext_Impl::createFastChildContext(
328  sal_Int32 nElement,
329  const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
330 {
331  if( nElement == XML_ELEMENT(STYLE, XML_LIST_LEVEL_PROPERTIES) ||
332  nElement == XML_ELEMENT(STYLE, XML_TEXT_PROPERTIES) )
333  {
335  nElement,
336  xAttrList,
337  *this );
338  }
339  else if( nElement == XML_ELEMENT(OFFICE, XML_BINARY_DATA) )
340  {
341  if( bImage && sImageURL.isEmpty() && !xBase64Stream.is() )
342  {
344  if( xBase64Stream.is() )
346  }
347  }
348  XMLOFF_WARN_UNKNOWN_ELEMENT("xmloff", nElement);
349  return nullptr;
350 }
351 
353 {
354  sal_Int16 eType = NumberingType::NUMBER_NONE;
355 
356  sal_Int32 nCount = 0;
357  if( bBullet )
358  {
359  eType = NumberingType::CHAR_SPECIAL;
360  nCount = 15; // 'cBullet' will be written anyway if 'bBullet' is true
361  }
362  if( bImage )
363  {
364  eType = NumberingType::BITMAP;
365  nCount = 15;
366 
367  if( !sImageURL.isEmpty() || xBase64Stream.is() )
368  nCount++;
369  }
370  if( bNum )
371  {
372  eType = NumberingType::ARABIC;
374  eType, sNumFormat, sNumLetterSync, true );
375  nCount = 15;
376  }
377 
378  if( ( bBullet || bNum ) && nRelSize )
379  nCount++;
380 
381  if( !bImage && bHasColor )
382  {
383  nCount++;
384  }
385 
386  if (bBullet && !sSuffix.isEmpty())
387  {
388  sal_uInt16 const nVersion(GetImport().getGeneratorVersion());
389  sal_Int32 nUPD;
390  sal_Int32 nBuildId;
391  if (GetImport().getBuildIds(nUPD, nBuildId)
392  && ( (SvXMLImport::OOo_1x == nVersion)
393  || (SvXMLImport::OOo_2x == nVersion)
394  || (310 == nUPD) || (320 == nUPD) || (330 == nUPD)
395  || ((300 == nUPD) && (nBuildId <= 9573))))
396  {
397  // #i93908# OOo < 3.4 wrote a bogus suffix for bullet chars
398  sSuffix.clear(); // clear it
399  }
400  }
401 
402  Sequence<beans::PropertyValue> aPropSeq( nCount );
403  if( nCount > 0 )
404  {
405  beans::PropertyValue *pProps = aPropSeq.getArray();
406  sal_Int32 nPos = 0;
407  pProps[nPos].Name = "NumberingType";
408  pProps[nPos++].Value <<= eType ;
409 
410  pProps[nPos].Name = "Prefix";
411  pProps[nPos++].Value <<= sPrefix;
412 
413  pProps[nPos].Name = "Suffix";
414  pProps[nPos++].Value <<= sSuffix;
415 
416  pProps[nPos].Name = "Adjust";
417  pProps[nPos++].Value <<= eAdjust;
418 
420  pProps[nPos].Name = "LeftMargin";
421  pProps[nPos++].Value <<= nLeftMargin;
422 
423  sal_Int32 nFirstLineOffset = -nMinLabelWidth;
424 
425  pProps[nPos].Name = "FirstLineOffset";
426  pProps[nPos++].Value <<= nFirstLineOffset;
427 
428  pProps[nPos].Name = "SymbolTextDistance";
429  pProps[nPos++].Value <<= static_cast<sal_Int16>(nMinLabelDist);
430 
431  pProps[nPos].Name = "PositionAndSpaceMode";
432  pProps[nPos++].Value <<= ePosAndSpaceMode;
433  pProps[nPos].Name = "LabelFollowedBy";
434  pProps[nPos++].Value <<= eLabelFollowedBy;
435  pProps[nPos].Name = "ListtabStopPosition";
436  pProps[nPos++].Value <<= nListtabStopPosition;
437  pProps[nPos].Name = "FirstLineIndent";
438  pProps[nPos++].Value <<= nFirstLineIndent;
439  pProps[nPos].Name = "IndentAt";
440  pProps[nPos++].Value <<= nIndentAt;
441 
442  OUString sDisplayTextStyleName = GetImport().GetStyleDisplayName(
444  pProps[nPos].Name = "CharStyleName";
445  pProps[nPos++].Value <<= sDisplayTextStyleName;
446 
447  if( bBullet )
448  {
449  awt::FontDescriptor aFDesc;
450  aFDesc.Name = sBulletFontName;
451  if( !sBulletFontName.isEmpty() )
452  {
453  aFDesc.StyleName = sBulletFontStyleName;
454  aFDesc.Family = eBulletFontFamily;
455  aFDesc.Pitch = eBulletFontPitch;
456  aFDesc.CharSet = eBulletFontEncoding;
457  aFDesc.Weight = WEIGHT_DONTKNOW;
458  bool bStarSymbol = false;
459  if( aFDesc.Name.equalsIgnoreAsciiCase( gsStarBats ) )
460  {
462  bStarSymbol = true;
463  }
464  else if( aFDesc.Name.equalsIgnoreAsciiCase( gsStarMath ) )
465  {
467  bStarSymbol = true;
468  }
469  if( bStarSymbol )
470  aFDesc.Name = "StarSymbol" ;
471  }
472 
473  // Must append 'cBullet' even if it is zero
474  // if 'bBullet' is true and 'cBullet' is zero - BulletChar property must be 0.
475  pProps[nPos].Name = "BulletChar";
476  pProps[nPos++].Value <<= OUString(&cBullet, 1);
477 
478  pProps[nPos].Name = "BulletFont";
479  pProps[nPos++].Value <<= aFDesc;
480 
481  }
482 
483  if( bImage )
484  {
485  uno::Reference<graphic::XGraphic> xGraphic;
486  if (!sImageURL.isEmpty())
487  {
488  xGraphic = GetImport().loadGraphicByURL(sImageURL);
489  }
490  else if( xBase64Stream.is() )
491  {
493  }
494 
495  uno::Reference<awt::XBitmap> xBitmap;
496  if (xGraphic.is())
497  xBitmap.set(xGraphic, uno::UNO_QUERY);
498 
499  if (xBitmap.is())
500  {
501  pProps[nPos].Name = "GraphicBitmap";
502  pProps[nPos++].Value <<= xBitmap;
503  }
504 
505  awt::Size aSize(nImageWidth, nImageHeight);
506  pProps[nPos].Name = "GraphicSize";
507  pProps[nPos++].Value <<= aSize;
508 
509  pProps[nPos].Name = "VertOrient";
510  pProps[nPos++].Value <<= eImageVertOrient;
511  }
512 
513  if( bNum )
514  {
515  pProps[nPos].Name = "StartWith";
516  pProps[nPos++].Value <<= nNumStartValue;
517 
518  pProps[nPos].Name = "ParentNumbering";
519  pProps[nPos++].Value <<= nNumDisplayLevels;
520  }
521 
522  if( ( bNum || bBullet ) && nRelSize )
523  {
524  pProps[nPos].Name = "BulletRelSize";
525  pProps[nPos++].Value <<= nRelSize;
526  }
527 
528  if( !bImage && bHasColor )
529  {
530  pProps[nPos].Name = "BulletColor";
531  pProps[nPos++].Value <<= m_nColor;
532  }
533 
534  SAL_WARN_IF( nPos != nCount, "xmloff", "array under/overflow" );
535  }
536 
537  return aPropSeq;
538 }
539 
540 SvxXMLListLevelStyleAttrContext_Impl::SvxXMLListLevelStyleAttrContext_Impl(
541  SvXMLImport& rImport, sal_Int32 /*nElement*/,
542  const Reference< xml::sax::XFastAttributeList > & xAttrList,
544  SvXMLImportContext( rImport ),
545  rListLevel( rLLevel )
546 {
548 
549  OUString sFontName, sFontFamily, sFontStyleName, sFontFamilyGeneric,
550  sFontPitch, sFontCharset;
551  OUString sVerticalPos, sVerticalRel;
552 
553  for( auto& aIter : sax_fastparser::castToFastAttributeList(xAttrList) )
554  {
555  sal_Int32 nVal;
556  switch( aIter.getToken() )
557  {
558  case XML_ELEMENT(TEXT, XML_SPACE_BEFORE):
559  if (rUnitConv.convertMeasureToCore(nVal, aIter.toView(), SHRT_MIN, SHRT_MAX))
560  rListLevel.SetSpaceBefore( nVal );
561  break;
562  case XML_ELEMENT(TEXT, XML_MIN_LABEL_WIDTH):
563  if (rUnitConv.convertMeasureToCore( nVal, aIter.toView(), 0, SHRT_MAX ))
564  rListLevel.SetMinLabelWidth( nVal );
565  break;
567  if (rUnitConv.convertMeasureToCore( nVal, aIter.toView(), 0, USHRT_MAX ))
568  rListLevel.SetMinLabelDist( nVal );
569  break;
570  case XML_ELEMENT(FO, XML_TEXT_ALIGN):
571  case XML_ELEMENT(FO_COMPAT, XML_TEXT_ALIGN):
572  if( !aIter.isEmpty() )
573  {
574  sal_Int16 eAdjust = HoriOrientation::LEFT;
575  if( IsXMLToken( aIter, XML_CENTER ) )
576  eAdjust = HoriOrientation::CENTER;
577  else if( IsXMLToken( aIter, XML_END ) )
578  eAdjust = HoriOrientation::RIGHT;
579  rListLevel.SetAdjust( eAdjust );
580  }
581  break;
582  case XML_ELEMENT(STYLE, XML_FONT_NAME):
583  sFontName = aIter.toString();
584  break;
585  case XML_ELEMENT(FO, XML_FONT_FAMILY):
586  case XML_ELEMENT(FO_COMPAT, XML_FONT_FAMILY):
587  sFontFamily = aIter.toString();
588  break;
590  sFontFamilyGeneric = aIter.toString();
591  break;
592  case XML_ELEMENT(STYLE, XML_FONT_STYLE_NAME):
593  sFontStyleName = aIter.toString();
594  break;
595  case XML_ELEMENT(STYLE, XML_FONT_PITCH):
596  sFontPitch = aIter.toString();
597  break;
598  case XML_ELEMENT(STYLE, XML_FONT_CHARSET):
599  sFontCharset = aIter.toString();
600  break;
601  case XML_ELEMENT(STYLE, XML_VERTICAL_POS):
602  sVerticalPos = aIter.toString();
603  break;
604  case XML_ELEMENT(STYLE, XML_VERTICAL_REL):
605  sVerticalRel = aIter.toString();
606  break;
607  case XML_ELEMENT(FO, XML_WIDTH):
608  case XML_ELEMENT(FO_COMPAT, XML_WIDTH):
609  if (rUnitConv.convertMeasureToCore(nVal, aIter.toView()))
610  rListLevel.SetImageWidth( nVal );
611  break;
612  case XML_ELEMENT(FO, XML_HEIGHT):
613  case XML_ELEMENT(FO_COMPAT, XML_HEIGHT):
614  if (rUnitConv.convertMeasureToCore(nVal, aIter.toView()))
615  rListLevel.SetImageHeight( nVal );
616  break;
617  case XML_ELEMENT(FO, XML_COLOR):
618  case XML_ELEMENT(FO_COMPAT, XML_COLOR):
619  {
620  Color nColor;
621  if (::sax::Converter::convertColor( nColor, aIter.toView() ))
622  rListLevel.SetColor( nColor );
623  }
624  break;
626  {
627  if( IsXMLToken( aIter, XML_TRUE ) )
628  rListLevel.SetColor(COL_AUTO);
629  }
630  break;
631  case XML_ELEMENT(FO, XML_FONT_SIZE):
632  case XML_ELEMENT(FO_COMPAT, XML_FONT_SIZE):
633  if (::sax::Converter::convertPercent( nVal, aIter.toView() ))
634  rListLevel.SetRelSize( static_cast<sal_Int16>(nVal) );
635  break;
637  {
638  sal_Int16 ePosAndSpaceMode = PositionAndSpaceMode::LABEL_WIDTH_AND_POSITION;
639  if( IsXMLToken( aIter, XML_LABEL_ALIGNMENT ) )
640  ePosAndSpaceMode = PositionAndSpaceMode::LABEL_ALIGNMENT;
641  rListLevel.SetPosAndSpaceMode( ePosAndSpaceMode );
642  }
643  break;
644  default:
645  XMLOFF_WARN_UNKNOWN("xmloff", aIter);
646  }
647  }
648 
649  if( !sFontName.isEmpty() )
650  {
651  const XMLFontStylesContext *pFontDecls =
653  if( pFontDecls )
654  {
655  ::std::vector < XMLPropertyState > aProps;
656  if( pFontDecls->FillProperties( sFontName, aProps, 0, 1, 2, 3, 4 ) )
657  {
658  OUString sTmp;
659  sal_Int16 nTmp = 0;
660  for( const auto& rProp : aProps )
661  {
662  switch( rProp.mnIndex )
663  {
664  case 0:
665  rProp.maValue >>= sTmp;
666  rListLevel.SetBulletFontName( sTmp);
667  break;
668  case 1:
669  rProp.maValue >>= sTmp;
670  rListLevel.SetBulletFontStyleName( sTmp );
671  break;
672  case 2:
673  rProp.maValue >>= nTmp;
674  rListLevel.SetBulletFontFamily( nTmp );
675  break;
676  case 3:
677  rProp.maValue >>= nTmp;
678  rListLevel.SetBulletFontPitch( nTmp );
679  break;
680  case 4:
681  rProp.maValue >>= nTmp;
682  rListLevel.SetBulletFontEncoding( nTmp );
683  break;
684  }
685  }
686  }
687  }
688  }
689  if( !sFontFamily.isEmpty() )
690  {
691  Any aAny;
692 
693  XMLFontFamilyNamePropHdl aFamilyNameHdl;
694  if( aFamilyNameHdl.importXML( sFontFamily, aAny, rUnitConv ) )
695  {
696  OUString sTmp;
697  aAny >>= sTmp;
698  rListLevel.SetBulletFontName( sTmp);
699  }
700 
701  XMLFontFamilyPropHdl aFamilyHdl;
702  if( !sFontFamilyGeneric.isEmpty() &&
703  aFamilyHdl.importXML( sFontFamilyGeneric, aAny, rUnitConv ) )
704  {
705  sal_Int16 nTmp = 0;
706  aAny >>= nTmp;
707  rListLevel.SetBulletFontFamily( nTmp );
708  }
709 
710  if( !sFontStyleName.isEmpty() )
711  rListLevel.SetBulletFontStyleName( sFontStyleName );
712 
713  XMLFontPitchPropHdl aPitchHdl;
714  if( !sFontPitch.isEmpty() &&
715  aPitchHdl.importXML( sFontPitch, aAny, rUnitConv ) )
716  {
717  sal_Int16 nTmp = 0;
718  aAny >>= nTmp;
719  rListLevel.SetBulletFontPitch( nTmp );
720  }
721 
722  XMLFontEncodingPropHdl aEncHdl;
723  if( !sFontCharset.isEmpty() &&
724  aEncHdl.importXML( sFontCharset, aAny, rUnitConv ) )
725  {
726  sal_Int16 nTmp = 0;
727  aAny >>= nTmp;
728  rListLevel.SetBulletFontEncoding( nTmp );
729  }
730  }
731 
732  sal_Int16 eVertOrient = VertOrientation::LINE_CENTER;
733  if( !sVerticalPos.isEmpty() )
734  {
735  if( IsXMLToken( sVerticalPos, XML_TOP ) )
736  eVertOrient = VertOrientation::LINE_TOP;
737  else if( IsXMLToken( sVerticalPos, XML_BOTTOM ) )
738  eVertOrient = VertOrientation::LINE_BOTTOM;
739  }
740  if( !sVerticalRel.isEmpty() )
741  {
742  if( IsXMLToken( sVerticalRel, XML_BASELINE ) )
743  {
744  // TOP and BOTTOM are exchanged for a baseline relation
745  switch( eVertOrient )
746  {
747  case VertOrientation::LINE_TOP:
748  eVertOrient = VertOrientation::BOTTOM;
749  break;
750  case VertOrientation::LINE_CENTER:
751  eVertOrient = VertOrientation::CENTER;
752  break;
753  case VertOrientation::LINE_BOTTOM:
754  eVertOrient = VertOrientation::TOP;
755  break;
756  }
757  }
758  else if( IsXMLToken( sVerticalRel, XML_CHAR ) )
759  {
760  switch( eVertOrient )
761  {
762  case VertOrientation::LINE_TOP:
763  eVertOrient = VertOrientation::CHAR_TOP;
764  break;
765  case VertOrientation::LINE_CENTER:
766  eVertOrient = VertOrientation::CHAR_CENTER;
767  break;
768  case VertOrientation::LINE_BOTTOM:
769  eVertOrient = VertOrientation::CHAR_BOTTOM;
770  break;
771  }
772  }
773  }
774  rListLevel.SetImageVertOrient( eVertOrient );
775 }
776 
777 css::uno::Reference< css::xml::sax::XFastContextHandler > SvxXMLListLevelStyleAttrContext_Impl::createFastChildContext(
778  sal_Int32 nElement,
779  const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
780 {
781  if ( nElement == XML_ELEMENT(STYLE, XML_LIST_LEVEL_LABEL_ALIGNMENT) )
782  {
783  return new SvxXMLListLevelStyleLabelAlignmentAttrContext_Impl( GetImport(),
784  nElement,
785  xAttrList,
786  rListLevel );
787  }
788  XMLOFF_WARN_UNKNOWN_ELEMENT("xmloff", nElement);
789  return nullptr;
790 }
791 
792 
793 SvxXMLListLevelStyleLabelAlignmentAttrContext_Impl::SvxXMLListLevelStyleLabelAlignmentAttrContext_Impl(
794  SvXMLImport& rImport, sal_Int32 /*nElement*/,
795  const Reference< xml::sax::XFastAttributeList > & xAttrList,
797  SvXMLImportContext( rImport )
798 {
800 
801  sal_Int16 eLabelFollowedBy = LabelFollow::LISTTAB;
802  for( auto& aIter : sax_fastparser::castToFastAttributeList(xAttrList) )
803  {
804  sal_Int32 nVal;
805  switch( aIter.getToken() )
806  {
808  case XML_ELEMENT(LO_EXT, XML_LABEL_FOLLOWED_BY):
809  {
810  if( eLabelFollowedBy == LabelFollow::NEWLINE)
811  //NewLine from LO_EXT has precedence over other values of the Non LO_EXT namespace
812  break;
813  if( IsXMLToken( aIter, XML_SPACE ) )
814  eLabelFollowedBy = LabelFollow::SPACE;
815  else if( IsXMLToken( aIter, XML_NOTHING ) )
816  eLabelFollowedBy = LabelFollow::NOTHING;
817  else if( IsXMLToken( aIter, XML_NEWLINE ) )
818  eLabelFollowedBy = LabelFollow::NEWLINE;
819  }
820  break;
822  if (rUnitConv.convertMeasureToCore(nVal, aIter.toView(), 0, SHRT_MAX))
823  rLLevel.SetListtabStopPosition( nVal );
824  break;
825  case XML_ELEMENT(FO, XML_TEXT_INDENT):
826  case XML_ELEMENT(FO_COMPAT, XML_TEXT_INDENT):
827  if (rUnitConv.convertMeasureToCore(nVal, aIter.toView(), SHRT_MIN, SHRT_MAX))
828  rLLevel.SetFirstLineIndent( nVal );
829  break;
830  case XML_ELEMENT(FO, XML_MARGIN_LEFT):
831  case XML_ELEMENT(FO_COMPAT, XML_MARGIN_LEFT):
832  if (rUnitConv.convertMeasureToCore(nVal, aIter.toView(), SHRT_MIN, SHRT_MAX))
833  rLLevel.SetIndentAt( nVal );
834  break;
835  default:
836  XMLOFF_WARN_UNKNOWN("xmloff", aIter);
837  }
838  }
839  rLLevel.SetLabelFollowedBy( eLabelFollowedBy );
840 }
841 
842 void SvxXMLListStyleContext::SetAttribute( sal_Int32 nElement,
843  const OUString& rValue )
844 {
845  if( nElement == XML_ELEMENT(TEXT, XML_CONSECUTIVE_NUMBERING) )
846  {
847  bConsecutive = IsXMLToken( rValue, XML_TRUE );
848  }
849  else
850  {
851  SvXMLStyleContext::SetAttribute( nElement, rValue );
852  }
853 }
854 
855 constexpr OUStringLiteral sIsPhysical( u"IsPhysical" );
856 constexpr OUStringLiteral sNumberingRules( u"NumberingRules" );
857 constexpr OUStringLiteral sIsContinuousNumbering( u"IsContinuousNumbering" );
858 
860  bool bOutl )
862 , bConsecutive( false )
863 , bOutline( bOutl )
864 {
865 }
866 
868 
869 css::uno::Reference< css::xml::sax::XFastContextHandler > SvxXMLListStyleContext::createFastChildContext(
870  sal_Int32 nElement,
871  const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
872 {
873  if( bOutline
875  : ( nElement == XML_ELEMENT(TEXT, XML_LIST_LEVEL_STYLE_NUMBER) ||
877  nElement == XML_ELEMENT(TEXT, XML_LIST_LEVEL_STYLE_IMAGE ) ) )
878  {
880  new SvxXMLListLevelStyleContext_Impl( GetImport(), nElement, xAttrList )};
881  if( !pLevelStyles )
882  pLevelStyles = std::make_unique<SvxXMLListStyle_Impl>();
883  pLevelStyles->push_back( xLevelStyle );
884 
885  return xLevelStyle;
886  }
887  XMLOFF_WARN_UNKNOWN_ELEMENT("xmloff", nElement);
888  return nullptr;
889 }
890 
892  const Reference<container::XIndexReplace> & rNumRule) const
893 {
894  try
895  {
896  if( pLevelStyles && rNumRule.is() )
897  {
898  sal_Int32 l_nLevels = rNumRule->getCount();
899  for (const auto& pLevelStyle : *pLevelStyles)
900  {
901  sal_Int32 nLevel = pLevelStyle->GetLevel();
902  if( nLevel >= 0 && nLevel < l_nLevels )
903  {
905  pLevelStyle->GetProperties();
906  rNumRule->replaceByIndex( nLevel, Any(aProps) );
907  }
908  }
909  }
910 
911  Reference < XPropertySet > xPropSet( rNumRule, UNO_QUERY );
912  Reference< XPropertySetInfo > xPropSetInfo;
913  if (xPropSet.is())
914  xPropSetInfo = xPropSet->getPropertySetInfo();
915  if( xPropSetInfo.is() &&
916  xPropSetInfo->hasPropertyByName( sIsContinuousNumbering ) )
917  {
918  xPropSet->setPropertyValue( sIsContinuousNumbering, Any(bConsecutive) );
919  }
920  }
921  catch (const Exception&)
922  {
923  TOOLS_WARN_EXCEPTION("xmloff.style", "" );
924  }
925 }
926 
928 {
929  if( bOutline )
930  {
931  if( bOverwrite )
932  {
933  const Reference< XIndexReplace >& rNumRule =
934  GetImport().GetTextImport()->GetChapterNumbering();
935  // We don't set xNumberingRules here, to avoid using them
936  // as numbering rules.
937  if( rNumRule.is() )
938  FillUnoNumRule(rNumRule);
939  }
940  }
941  else
942  {
943  Reference < XStyle > xStyle;
944  const OUString& rName = GetDisplayName();
945  if( rName.isEmpty() )
946  {
947  SetValid( false );
948  return;
949  }
950 
951  const Reference < XNameContainer >& rNumStyles =
952  GetImport().GetTextImport()->GetNumberingStyles();
953  if( !rNumStyles.is() )
954  {
955  SetValid( false );
956  return;
957  }
958 
959  bool bNew = false;
960  if( rNumStyles->hasByName( rName ) )
961  {
962  Any aAny = rNumStyles->getByName( rName );
963  aAny >>= xStyle;
964  }
965  else
966  {
967  Reference< XMultiServiceFactory > xFactory( GetImport().GetModel(),
968  UNO_QUERY );
969  SAL_WARN_IF( !xFactory.is(), "xmloff", "no factory" );
970  if( !xFactory.is() )
971  return;
972 
973  Reference < XInterface > xIfc = xFactory->createInstance("com.sun.star.style.NumberingStyle");
974  if( !xIfc.is() )
975  return;
976  Reference < XStyle > xTmp( xIfc, UNO_QUERY );
977  xStyle = xTmp;
978  if( !xStyle.is() )
979  return;
980 
981  rNumStyles->insertByName( rName, Any(xStyle) );
982  bNew = true;
983  }
984 
985  Reference < XPropertySet > xPropSet( xStyle, UNO_QUERY );
986  Reference< XPropertySetInfo > xPropSetInfo =
987  xPropSet->getPropertySetInfo();
988  if( !bNew && xPropSetInfo->hasPropertyByName( sIsPhysical ) )
989  {
990  Any aAny = xPropSet->getPropertyValue( sIsPhysical );
991  bNew = !*o3tl::doAccess<bool>(aAny);
992  }
993 
994  if ( xPropSetInfo->hasPropertyByName( "Hidden" ) )
995  xPropSet->setPropertyValue( "Hidden", uno::makeAny( IsHidden( ) ) );
996 
997  if( rName != GetName() )
999  GetName(), rName );
1000 
1001  Any aAny = xPropSet->getPropertyValue( sNumberingRules );
1002  aAny >>= xNumRules;
1003  if( bOverwrite || bNew )
1004  {
1006  xPropSet->setPropertyValue( sNumberingRules, Any(xNumRules) );
1007  }
1008  else
1009  {
1010  SetValid( false );
1011  }
1012 
1013  SetNew( bNew );
1014  }
1015 }
1016 
1018 {
1019  SAL_WARN_IF( bOutline, "xmloff", "Outlines cannot be inserted here" );
1020  SAL_WARN_IF( xNumRules.is(), "xmloff", "Numbering Rule is existing already" );
1021 
1022  const OUString& rName = GetName();
1023  if( bOutline || xNumRules.is() || rName.isEmpty() )
1024  {
1025  const_cast<SvxXMLListStyleContext *>(this)->SetValid( false );
1026  return;
1027  }
1028 
1029  const_cast<SvxXMLListStyleContext *>(this)->xNumRules = CreateNumRule(
1030  GetImport().GetModel() );
1031 
1033 }
1034 
1035 Reference < XIndexReplace > SvxXMLListStyleContext::CreateNumRule(
1036  const Reference < XModel > & rModel )
1037 {
1038  Reference<XIndexReplace> xNumRule;
1039 
1040  Reference< XMultiServiceFactory > xFactory( rModel, UNO_QUERY );
1041  SAL_WARN_IF( !xFactory.is(), "xmloff", "no factory" );
1042  if( !xFactory.is() )
1043  return xNumRule;
1044 
1045  Reference < XInterface > xIfc = xFactory->createInstance("com.sun.star.text.NumberingRules");
1046  if( !xIfc.is() )
1047  return xNumRule;
1048 
1049  xNumRule.set( xIfc, UNO_QUERY );
1050  SAL_WARN_IF( !xNumRule.is(), "xmloff", "go no numbering rule" );
1051 
1052  return xNumRule;
1053 }
1054 
1056  const Reference < XIndexReplace > & rNumRule,
1057  sal_Int16 nLevel,
1058  bool bOrdered )
1059 {
1060  Sequence<beans::PropertyValue> aPropSeq( bOrdered ? 1 : 4 );
1061  beans::PropertyValue *pProps = aPropSeq.getArray();
1062 
1063  pProps->Name = "NumberingType";
1064  (pProps++)->Value <<= static_cast<sal_Int16>(bOrdered ? NumberingType::ARABIC
1065  : NumberingType::CHAR_SPECIAL );
1066  if( !bOrdered )
1067  {
1068  // TODO: Bullet-Font
1069  awt::FontDescriptor aFDesc;
1070  aFDesc.Name =
1071 #ifdef _WIN32
1072  "StarBats"
1073 #else
1074  "starbats"
1075 #endif
1076  ;
1077  aFDesc.Family = FAMILY_DONTKNOW ;
1078  aFDesc.Pitch = PITCH_DONTKNOW ;
1079  aFDesc.CharSet = RTL_TEXTENCODING_SYMBOL ;
1080  aFDesc.Weight = WEIGHT_DONTKNOW;
1081  pProps->Name = "BulletFont";
1082  (pProps++)->Value <<= aFDesc;
1083 
1084  pProps->Name = "BulletChar";
1085  (pProps++)->Value <<= OUString(sal_Unicode(0xF000 + 149));
1086  pProps->Name = "CharStyleName";
1087  (pProps++)->Value <<= OUString( "Numbering Symbols" );
1088  }
1089 
1090  rNumRule->replaceByIndex( nLevel, Any(aPropSeq) );
1091 }
1092 
1093 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &AttrList) override
Definition: xmlnumi.cxx:869
SvxXMLListLevelStyleContext_Impl(SvXMLImport &rImport, sal_Int32 nElement, const Reference< xml::sax::XFastAttributeList > &xAttrList)
Definition: xmlnumi.cxx:214
css::uno::Reference< css::graphic::XGraphic > loadGraphicFromBase64(css::uno::Reference< css::io::XOutputStream > const &rxOutputStream)
Definition: xmlimp.cxx:1280
bool FillProperties(const OUString &rName,::std::vector< XMLPropertyState > &rProps, sal_Int32 nFamilyNameIdx, sal_Int32 nStyleNameIdx, sal_Int32 nFamilyIdx, sal_Int32 nPitchIdx, sal_Int32 nCharsetIdx) const
void SetRelSize(sal_Int16 nRel)
Definition: xmlnumi.cxx:155
sal_uInt32 sal_UCS4
PropertyHandler for the XML-data-type:
Definition: fonthdl.hxx:64
void SetMinLabelWidth(sal_Int32 nSet)
Definition: xmlnumi.cxx:159
virtual bool importXML(const OUString &rStrImpValue, css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Imports the given value according to the XML-data-type corresponding to the derived class...
Definition: fonthdl.cxx:197
the SvXMLTypeConverter converts values of various types from their internal representation to the tex...
Definition: xmluconv.hxx:80
void SetNew(bool b)
Definition: xmlstyle.hxx:89
tools::Long const nLeftMargin
void FillUnoNumRule(const css::uno::Reference< css::container::XIndexReplace > &rNumRule) const
Definition: xmlnumi.cxx:891
virtual void CreateAndInsertLate(bool bOverwrite) override
Definition: xmlnumi.cxx:927
FAMILY_DONTKNOW
sal_Unicode ConvStarMathCharToStarSymbol(sal_Unicode c)
Definition: xmlimp.cxx:1694
SvXMLImport & GetImport()
Definition: xmlictxt.hxx:56
void SetIndentAt(sal_Int32 nValue)
Definition: xmlnumi.cxx:205
void SetBulletFontStyleName(const OUString &rSet)
Definition: xmlnumi.cxx:164
void SetSpaceBefore(sal_Int32 nSet)
Definition: xmlnumi.cxx:158
bool IsXMLToken(std::u16string_view rString, enum XMLTokenEnum eToken)
compare eToken to the string
Definition: xmltoken.cxx:3464
FastAttributeList & castToFastAttributeList(const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
constexpr OUStringLiteral sIsPhysical(u"IsPhysical")
css::uno::Reference< css::graphic::XGraphic > loadGraphicByURL(OUString const &rURL)
Definition: xmlimp.cxx:1258
rtl::Reference< XMLTextImportHelper > const & GetTextImport()
Definition: xmlimp.hxx:595
sal_Int32 nFirstLineOffset
constexpr OUStringLiteral sIsContinuousNumbering(u"IsContinuousNumbering")
Sequence< beans::PropertyValue > GetProperties()
Definition: xmlnumi.cxx:352
~SvxXMLListStyleContext() override
Definition: xmlnumi.cxx:867
virtual bool importXML(const OUString &rStrImpValue, css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Imports the given value according to the XML-data-type corresponding to the derived class...
Definition: fonthdl.cxx:262
Value
css::uno::Any const & rValue
Definition: ImageStyle.hxx:38
XmlStyleFamily
Definition: families.hxx:47
sal_uInt16 sal_Unicode
SvxXMLListStyleContext(SvXMLImport &rImport, bool bOutl=false)
Definition: xmlnumi.cxx:859
static const sal_uInt16 OOo_2x
Definition: xmlimp.hxx:531
void CreateAndInsertAuto() const
Definition: xmlnumi.cxx:1017
int nCount
#define XMLOFF_WARN_UNKNOWN(area, rIter)
Definition: xmlictxt.hxx:110
std::unique_ptr< SvxXMLListStyle_Impl > pLevelStyles
Definition: xmlnumi.hxx:41
virtual bool importXML(const OUString &rStrImpValue, css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Imports the given value according to the XML-data-type corresponding to the derived class...
Definition: fonthdl.cxx:231
css::uno::Reference< css::io::XOutputStream > GetStreamForGraphicObjectURLFromBase64() const
Definition: xmlimp.cxx:1292
sal_Int32 GetLevel() const
Definition: xmlnumi.cxx:186
bool convertNumFormat(sal_Int16 &rType, const OUString &rNumFormat, std::u16string_view rNumLetterSync, bool bNumberNone=false) const
convert num-format and num-letter-sync values to NumberingType
Definition: xmluconv.cxx:686
PropertyHandler for the XML-data-type:
Definition: fonthdl.hxx:28
static css::uno::Reference< css::container::XIndexReplace > CreateNumRule(const css::uno::Reference< css::frame::XModel > &rModel)
Definition: xmlnumi.cxx:1035
DocumentType eType
WEIGHT_DONTKNOW
PropertyHandler for the XML-data-type:
Definition: fonthdl.hxx:52
#define TOOLS_WARN_EXCEPTION(area, stream)
css::uno::Reference< css::container::XIndexReplace > xNumRules
Definition: xmlnumi.hxx:39
constexpr OUStringLiteral sNumberingRules(u"NumberingRules")
bool IsHidden() const
Definition: xmlstyle.hxx:91
const OUString & GetDisplayName() const
Definition: xmlstyle.hxx:78
void SetBulletFontFamily(sal_Int16 eSet)
Definition: xmlnumi.cxx:166
virtual SAL_DLLPRIVATE void SetAttribute(sal_Int32 nElement, const OUString &rValue) override
Definition: xmlnumi.cxx:842
void SetBulletFontName(const OUString &rSet)
Definition: xmlnumi.cxx:163
sal_Unicode ConvStarBatsCharToStarSymbol(sal_Unicode c)
Definition: xmlimp.cxx:1677
virtual bool importXML(const OUString &rStrImpValue, css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Imports the given value according to the XML-data-type corresponding to the derived class...
Definition: fonthdl.cxx:67
void SetLabelFollowedBy(sal_Int16 eValue)
Definition: xmlnumi.cxx:193
void SetBulletFontPitch(sal_Int16 eSet)
Definition: xmlnumi.cxx:167
void SetPosAndSpaceMode(sal_Int16 eValue)
Definition: xmlnumi.cxx:189
rtl_TextEncoding eBulletFontEncoding
Definition: xmlnumi.cxx:136
virtual void SetAttribute(sal_Int32 nElement, const OUString &rValue)
Definition: xmlstyle.cxx:66
void SetListtabStopPosition(sal_Int32 nValue)
Definition: xmlnumi.cxx:197
static bool convertColor(sal_Int32 &rColor, std::u16string_view rValue)
void SetMinLabelDist(sal_Int32 nSet)
Definition: xmlnumi.cxx:160
PITCH_DONTKNOW
constexpr OUStringLiteral gsStarMath(u"StarMath")
sal_Int16 nVersion
constexpr T & temporary(T &&x)
void SetValid(bool b)
Definition: xmlstyle.hxx:86
This class deliberately does not support XWeak, to improve performance when loading large documents...
Definition: xmlictxt.hxx:45
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
Definition: xmlnumi.cxx:327
const sal_uInt32 LEFT
void SetImageHeight(sal_Int32 nSet)
Definition: xmlnumi.cxx:172
OUString GetStyleDisplayName(XmlStyleFamily nFamily, const OUString &rName) const
Definition: xmlimp.cxx:1393
#define SAL_WARN_IF(condition, area, stream)
const OUString & GetName() const
Definition: xmlstyle.hxx:77
const o3tl::enumarray< SvxAdjust, unsigned short > aSvxToUnoAdjust USHRT_MAX
Handling of tokens in XML:
void SetBulletFontEncoding(rtl_TextEncoding eSet)
Definition: xmlnumi.cxx:168
static const sal_uInt16 OOo_1x
Definition: xmlimp.hxx:530
#define XML_ELEMENT(prefix, name)
Definition: xmlimp.hxx:96
const SvXMLUnitConverter & GetMM100UnitConverter() const
Definition: xmlimp.hxx:395
const css::uno::Reference< css::frame::XModel > & GetModel() const
Definition: xmlimp.hxx:399
Reference< XOutputStream > xBase64Stream
Definition: xmlnumi.cxx:122
void AddStyleDisplayName(XmlStyleFamily nFamily, const OUString &rName, const OUString &rDisplayName)
Definition: xmlimp.cxx:1362
void SetImageWidth(sal_Int32 nSet)
Definition: xmlnumi.cxx:171
Reference< XSingleServiceFactory > xFactory
constexpr sal_Int32 TOKEN_MASK
Definition: xmlimp.hxx:93
#define XMLOFF_WARN_UNKNOWN_ELEMENT(area, token)
Definition: xmlictxt.hxx:116
if(!pCandidateA->getEnd().equal(pCandidateB->getStart()))
static void SetDefaultStyle(const css::uno::Reference< css::container::XIndexReplace > &rNumRule, sal_Int16 nLevel, bool bOrdered)
Definition: xmlnumi.cxx:1055
XMLFontStylesContext * GetFontDecls()
Definition: xmlimp.cxx:1559
PropertyHandler for the XML-data-type:
Definition: fonthdl.hxx:40
void SetImageVertOrient(sal_Int16 eSet)
Definition: xmlnumi.cxx:173
Reference< XGraphic > xGraphic
TEXT
void SetFirstLineIndent(sal_Int32 nValue)
Definition: xmlnumi.cxx:201
void SetAdjust(sal_Int16 eSet)
Definition: xmlnumi.cxx:161
sal_uInt16 nPos
void SetColor(Color nColor)
Definition: xmlnumi.cxx:156
OUString toString(OptionInfo const *info)
constexpr OUStringLiteral gsStarBats(u"StarBats")