LibreOffice Module xmloff (master)  1
txtstyli.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 
22 #include <xmloff/xmlnmspe.hxx>
24 #include <xmloff/families.hxx>
25 #include <xmloff/txtprmap.hxx>
26 #include <xmloff/txtstyli.hxx>
27 #include <xmloff/xmlimp.hxx>
28 #include <xmloff/xmltoken.hxx>
29 #include <xmloff/xmluconv.hxx>
30 #include <xmloff/maptype.hxx>
31 #include <xmloff/xmlimppr.hxx>
32 #include <xmloff/xmlement.hxx>
33 
34 #include <com/sun/star/beans/XPropertySet.hpp>
35 #include <com/sun/star/container/XNameContainer.hpp>
36 #include <com/sun/star/document/XEventsSupplier.hpp>
37 #include <com/sun/star/frame/XModel.hpp>
38 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
39 #include <com/sun/star/style/ParagraphStyleCategory.hpp>
40 #include <com/sun/star/style/XStyle.hpp>
41 
42 #include <o3tl/any.hxx>
43 
44 #include <sax/tools/converter.hxx>
45 
46 #include <tools/debug.hxx>
47 #include <tools/diagnose_ex.h>
48 #include <sal/log.hxx>
49 
50 #include <vector>
51 
52 #include <xmlsdtypes.hxx>
53 #include <xmloff/xmlerror.hxx>
54 
55 
56 using namespace ::std;
57 using namespace ::com::sun::star;
58 using namespace ::com::sun::star::uno;
59 using namespace ::com::sun::star::xml::sax;
60 using namespace ::com::sun::star::style;
61 using namespace ::com::sun::star::beans;
62 using namespace ::com::sun::star::lang;
63 using namespace ::com::sun::star::container;
64 using namespace ::xmloff::token;
65 
67 {
68  { XML_TEXT, ParagraphStyleCategory::TEXT },
69  { XML_CHAPTER, ParagraphStyleCategory::CHAPTER },
70  { XML_LIST, ParagraphStyleCategory::LIST },
71  { XML_INDEX, ParagraphStyleCategory::INDEX },
72  { XML_EXTRA, ParagraphStyleCategory::EXTRA },
73  { XML_HTML, ParagraphStyleCategory::HTML },
74  { XML_TOKEN_INVALID, 0 }
75 };
76 
77 void XMLTextStyleContext::SetAttribute( sal_uInt16 nPrefixKey,
78  const OUString& rLocalName,
79  const OUString& rValue )
80 {
81  if( XML_NAMESPACE_STYLE == nPrefixKey )
82  {
83  // TODO: use a map here
84  if( IsXMLToken( rLocalName, XML_AUTO_UPDATE ) )
85  {
86  if( IsXMLToken( rValue, XML_TRUE ) )
87  m_isAutoUpdate = true;
88  }
89  else if( IsXMLToken( rLocalName, XML_LIST_STYLE_NAME ) )
90  {
92  // Inherited paragraph style lost information about unset numbering (#i69523#)
93  m_bListStyleSet = true;
94  }
95  else if( IsXMLToken( rLocalName, XML_MASTER_PAGE_NAME ) )
96  {
98  m_bHasMasterPageName = true;
99  }
100  else if( IsXMLToken( rLocalName, XML_DATA_STYLE_NAME ) )
101  {
103  }
104  else if( IsXMLToken( rLocalName, XML_CLASS ) )
105  {
107  }
108  else if( IsXMLToken( rLocalName, XML_DEFAULT_OUTLINE_LEVEL ) )
109  {
110  sal_Int32 nTmp;
111  if (::sax::Converter::convertNumber( nTmp, rValue ) &&
112  0 <= nTmp && nTmp <= 10 )
113  {
114  m_nOutlineLevel = static_cast<sal_Int8>(nTmp);
115  }
116  }
117  else
118  {
119  XMLPropStyleContext::SetAttribute( nPrefixKey, rLocalName, rValue );
120  }
121  }
122  else
123  {
124  XMLPropStyleContext::SetAttribute( nPrefixKey, rLocalName, rValue );
125  }
126 }
127 
128 
130  sal_uInt16 nPrfx, const OUString& rLName,
131  const Reference< XAttributeList > & xAttrList,
132  SvXMLStylesContext& rStyles, XmlStyleFamily nFamily,
133  bool bDefaultStyle )
134 : XMLPropStyleContext( rImport, nPrfx, rLName, xAttrList, rStyles, nFamily, bDefaultStyle )
135 , m_nOutlineLevel( -1 )
136 , m_isAutoUpdate( false )
137 , m_bHasMasterPageName( false )
138 , m_bHasCombinedCharactersLetter( false )
139 // Inherited paragraph style lost information about unset numbering (#i69523#)
140 , m_bListStyleSet( false )
141 {
142 }
143 
145 {}
146 
148  sal_uInt16 nPrefix,
149  const OUString& rLocalName,
150  const Reference< XAttributeList > & xAttrList )
151 {
152  SvXMLImportContextRef xContext;
153 
154  if( XML_NAMESPACE_STYLE == nPrefix )
155  {
156  sal_uInt32 nFamily = 0;
157  if( IsXMLToken( rLocalName, XML_TEXT_PROPERTIES ) )
158  nFamily = XML_TYPE_PROP_TEXT;
159  else if( IsXMLToken( rLocalName, XML_PARAGRAPH_PROPERTIES ) )
160  nFamily = XML_TYPE_PROP_PARAGRAPH;
161  else if( IsXMLToken( rLocalName, XML_SECTION_PROPERTIES ) )
162  nFamily = XML_TYPE_PROP_SECTION;
163  else if( IsDefaultStyle() && IsXMLToken( rLocalName, XML_TABLE_PROPERTIES ) )
164  nFamily = XML_TYPE_PROP_TABLE;
165  else if( IsDefaultStyle() && IsXMLToken( rLocalName, XML_TABLE_ROW_PROPERTIES ) )
166  nFamily = XML_TYPE_PROP_TABLE_ROW;
167  if( nFamily )
168  {
171  if( xImpPrMap.is() )
172  xContext = new XMLTextPropertySetContext( GetImport(), nPrefix,
173  rLocalName, xAttrList,
174  nFamily,
175  GetProperties(),
176  xImpPrMap,
178  }
179  }
180  else if ( (XML_NAMESPACE_OFFICE == nPrefix) &&
181  IsXMLToken( rLocalName, XML_EVENT_LISTENERS ) )
182  {
183  // create and remember events import context
184  // (for delayed processing of events)
186  rLocalName));
187  xContext = m_xEventContext.get();
188  }
189 
190  if (!xContext)
191  xContext = XMLPropStyleContext::CreateChildContext( nPrefix, rLocalName,
192  xAttrList );
193 
194  return xContext;
195 }
196 
198 {
200  Reference < XStyle > xStyle = GetStyle();
201  if( !xStyle.is() || !(bOverwrite || IsNew()) )
202  return;
203 
204  Reference < XPropertySet > xPropSet( xStyle, UNO_QUERY );
205  Reference< XPropertySetInfo > xPropSetInfo =
206  xPropSet->getPropertySetInfo();
207 
208  OUString const sIsAutoUpdate("IsAutoUpdate");
209  if( xPropSetInfo->hasPropertyByName( sIsAutoUpdate ) )
210  {
211  xPropSet->setPropertyValue( sIsAutoUpdate, Any(m_isAutoUpdate) );
212  }
213 
214  sal_uInt16 nCategory = ParagraphStyleCategory::TEXT;
216  !m_sCategoryVal.isEmpty() && xStyle->isUserDefined() &&
217  xPropSetInfo->hasPropertyByName("Category") &&
218  SvXMLUnitConverter::convertEnum( nCategory, m_sCategoryVal, aCategoryMap))
219  {
220  xPropSet->setPropertyValue("Category", Any(static_cast<sal_Int16>(nCategory)));
221  }
222 
223  // tell the style about it's events (if applicable)
224  if (m_xEventContext.is())
225  {
226  // pass events into event supplier
227  Reference<document::XEventsSupplier> xEventsSupplier(xStyle,UNO_QUERY);
228  m_xEventContext->SetEvents(xEventsSupplier);
229  m_xEventContext.clear();
230  }
231 
232  // XML import: reconstrution of assignment of paragraph style to outline levels (#i69629#)
233  if (m_nOutlineLevel > 0)
234  {
235  GetImport().GetTextImport()->AddOutlineStyleCandidate(m_nOutlineLevel,
236  GetDisplayName() );
237  }
238 }
239 
241 {
245  {
246  Reference < XMultiServiceFactory > xFactory ( GetImport().GetModel(), UNO_QUERY);
247  if (xFactory.is())
248  {
249  Reference < XInterface > xInt = xFactory->createInstance( "com.sun.star.text.Defaults" );
250  Reference < XPropertySet > xProperties ( xInt, UNO_QUERY );
251  if ( xProperties.is() )
252  FillPropertySet ( xProperties );
253  }
254  }
255 }
256 
257 void XMLTextStyleContext::Finish( bool bOverwrite )
258 {
259  XMLPropStyleContext::Finish( bOverwrite );
260 
261  Reference < XStyle > xStyle = GetStyle();
262  // Consider set empty list style (#i69523#)
263  if ( !( m_bListStyleSet ||
264  m_nOutlineLevel >= 0 ||
265  !m_sDropCapTextStyleName.isEmpty() ||
267  !xStyle.is() ||
268  !( bOverwrite || IsNew() ) )
269  return;
270 
271  Reference < XPropertySet > xPropSet( xStyle, UNO_QUERY );
272  Reference< XPropertySetInfo > xPropSetInfo =
273  xPropSet->getPropertySetInfo();
274 
275  OUString const sOutlineLevel("OutlineLevel");
276  if( xPropSetInfo->hasPropertyByName( sOutlineLevel ))
277  {
278  if (m_nOutlineLevel >= 0)
279  {
280  xPropSet->setPropertyValue( sOutlineLevel, Any(m_nOutlineLevel) );
281  }
282  }
283 
284  // Consider set empty list style (#i69523#)
285  OUString const sNumberingStyleName("NumberingStyleName");
286  if (m_bListStyleSet &&
287  xPropSetInfo->hasPropertyByName( sNumberingStyleName ) )
288  {
289  /* Only for text document from version prior OOo 2.1 resp. SO 8 PU5:
290  - Do not apply list style, if paragraph style has a default outline
291  level > 0 and thus, will be assigned to the corresponding list
292  level of the outline style. (#i70223#)
293  */
294  bool bApplyListStyle( true );
295  if (m_nOutlineLevel > 0)
296  {
297  if ( GetImport().IsTextDocInOOoFileFormat() )
298  {
299  bApplyListStyle = false;
300  }
301  else
302  {
303  sal_Int32 nUPD( 0 );
304  sal_Int32 nBuild( 0 );
305  // Check explicitly on certain versions (#i86058#)
306  if ( GetImport().getBuildIds( nUPD, nBuild ) &&
307  ( ( nUPD == 641 ) || ( nUPD == 645 ) || // prior OOo 2.0
308  ( nUPD == 680 && nBuild <= 9073 ) ) ) // OOo 2.0 - OOo 2.0.4
309  {
310  bApplyListStyle = false;
311  }
312  }
313  }
314 
315  if ( bApplyListStyle )
316  {
317  if (m_sListStyleName.isEmpty())
318  {
319  xPropSet->setPropertyValue(sNumberingStyleName, Any(m_sListStyleName)); /* empty string */
320  }
321  else
322  {
323  // change list style name to display name
324  OUString sDisplayListStyleName(
325  GetImport().GetStyleDisplayName(XmlStyleFamily::TEXT_LIST,
327  // The families container must exist
328  const Reference < XNameContainer >& rNumStyles =
329  GetImport().GetTextImport()->GetNumberingStyles();
330  // if( rNumStyles.is() && rNumStyles->hasByName( sDisplayListStyleName ) &&
331  // xPropSetInfo->hasPropertyByName( sNumberingStyleName ) )
332  if ( rNumStyles.is() &&
333  rNumStyles->hasByName( sDisplayListStyleName ) )
334  {
335  xPropSet->setPropertyValue( sNumberingStyleName, Any(sDisplayListStyleName) );
336  }
337  }
338  }
339  }
340 
341  if (!m_sDropCapTextStyleName.isEmpty())
342  {
343  // change list style name to display name
344  OUString sDisplayDropCapTextStyleName(
345  GetImport().GetStyleDisplayName( XmlStyleFamily::TEXT_TEXT,
347  // The families container must exist
348  const Reference < XNameContainer >& rTextStyles =
349  GetImport().GetTextImport()->GetTextStyles();
350  if( rTextStyles.is() &&
351  rTextStyles->hasByName( sDisplayDropCapTextStyleName ) &&
352  xPropSetInfo->hasPropertyByName("DropCapCharStyleName"))
353  {
354  xPropSet->setPropertyValue("DropCapCharStyleName", Any(sDisplayDropCapTextStyleName));
355  }
356  }
357 
359  {
360  OUString sDisplayName(
361  GetImport().GetStyleDisplayName(
363  // The families container must exist
364  const Reference < XNameContainer >& rPageStyles =
365  GetImport().GetTextImport()->GetPageStyles();
366 
367  OUString const sPageDescName("PageDescName");
368  if( ( sDisplayName.isEmpty() ||
369  (rPageStyles.is() &&
370  rPageStyles->hasByName( sDisplayName )) ) &&
371  xPropSetInfo->hasPropertyByName( sPageDescName ) )
372  {
373  xPropSet->setPropertyValue( sPageDescName, Any(sDisplayName) );
374  }
375  }
376 }
377 
379  const Reference<XPropertySet > & rPropSet )
380 {
381  // imitate the FillPropertySet of the super class, so we get a chance to
382  // catch the combined characters attribute
383 
384  // imitate XMLPropStyleContext::FillPropertySet(...)
385  SvXMLStylesContext* pSvXMLStylesContext = GetStyles();
387  DBG_ASSERT(xImpPrMap.is(),"Where is the import prop mapper?");
388 
389  if(!xImpPrMap.is())
390  return;
391 
392  // imitate SvXMLImportPropertyMapper::FillPropertySet(...)
393  // The reason for this is that we have no other way to
394  // efficiently intercept the value of combined characters. To
395  // get that value, we could iterate through the map once more,
396  // but instead we chose to insert the code into this
397  // iteration. I haven't been able to come up with a much more
398  // intelligent solution.
399  struct ContextID_Index_Pair aContextIDs[] =
400  {
402  { CTF_KEEP_TOGETHER, -1 },
403  { CTF_BORDER_MODEL, -1 },
404  { CTF_TEXT_DISPLAY, -1 },
405  { CTF_FONTFAMILYNAME, -1 },
406  { CTF_FONTFAMILYNAME_CJK, -1 },
407  { CTF_FONTFAMILYNAME_CTL, -1 },
408 
409  //UUU need special handling for DrawingLayer FillStyle names
410  { CTF_FILLGRADIENTNAME, -1 },
411  { CTF_FILLTRANSNAME, -1 },
412  { CTF_FILLHATCHNAME, -1 },
413  { CTF_FILLBITMAPNAME, -1 },
414 
415  { -1, -1 }
416  };
417 
418  // the style families associated with the same index modulo 4
419  static const XmlStyleFamily aFamilies[] =
420  {
425  };
426 
427  // get property set info
428  Reference< XPropertySetInfo > xInfo;
430  bool bAutomatic = false;
431 
432  if(pSvXMLStylesContext->IsAutomaticStyle() &&
434  {
435  bAutomatic = true;
436 
437  if( !GetAutoName().isEmpty() )
438  {
439  OUString sAutoProp = ( GetFamily() == XmlStyleFamily::TEXT_TEXT ) ?
440  OUString( "CharAutoStyleName" ):
441  OUString( "ParaAutoStyleName" );
442 
443  try
444  {
445  if(!xInfo.is())
446  {
447  xInfo = rPropSet->getPropertySetInfo();
448  }
449 
450  if ( xInfo->hasPropertyByName( sAutoProp ) )
451  {
452  rPropSet->setPropertyValue( sAutoProp, makeAny(GetAutoName()) );
453  }
454  else
455  {
456  bAutomatic = false;
457  }
458  }
459  catch( const RuntimeException& ) { throw; }
460  catch( const Exception& )
461  {
462  DBG_UNHANDLED_EXCEPTION("xmloff.text");
463  bAutomatic = false;
464  }
465  }
466  }
467 
468  if( bAutomatic )
469  {
470  xImpPrMap->CheckSpecialContext( GetProperties(), rPropSet, aContextIDs );
471  }
472  else
473  {
474  xImpPrMap->FillPropertySet( GetProperties(), rPropSet, aContextIDs );
475  }
476 
477  sal_Int32 nIndex = aContextIDs[0].nIndex;
478 
479  // have we found a combined characters
480  if ( nIndex != -1 )
481  {
482  Any& rAny = GetProperties()[nIndex].maValue;
483  bool bVal = *o3tl::doAccess<bool>(rAny);
485  }
486 
487  // keep-together: the application default is different from
488  // the file format default. Hence, if we always set this
489  // value; if we didn't find one, we'll set to false, the file
490  // format default.
491  // border-model: same
493  {
494  OUString sIsSplitAllowed("IsSplitAllowed");
495  SAL_WARN_IF( !rPropSet->getPropertySetInfo()->hasPropertyByName( sIsSplitAllowed ), "xmloff", "property missing?" );
496  rPropSet->setPropertyValue(
497  sIsSplitAllowed,
498  (aContextIDs[1].nIndex == -1) ? makeAny( false ) : GetProperties()[aContextIDs[1].nIndex].maValue );
499  }
500 
502  {
503  OUString sCollapsingBorders("CollapsingBorders");
504  SAL_WARN_IF( !rPropSet->getPropertySetInfo()->hasPropertyByName( sCollapsingBorders ), "xmloff", "property missing?" );
505  rPropSet->setPropertyValue(
506  sCollapsingBorders,
507  (aContextIDs[2].nIndex == -1)
508  ? makeAny( false )
509  : GetProperties()[aContextIDs[2].nIndex].maValue );
510  }
511 
512 
513  // iterate over aContextIDs entries, start with 3, prev ones are already used above
514  for(sal_uInt16 i(3); aContextIDs[i].nContextID != -1; i++)
515  {
516  nIndex = aContextIDs[i].nIndex;
517 
518  if ( nIndex != -1 )
519  {
520  // Found!
521  struct XMLPropertyState& rState = GetProperties()[nIndex];
522 
523  switch(aContextIDs[i].nContextID)
524  {
526  case CTF_FILLTRANSNAME:
527  case CTF_FILLHATCHNAME:
528  case CTF_FILLBITMAPNAME:
529  {
530  // DrawingLayer FillStyle name needs to be mapped to DisplayName
531  OUString sStyleName;
532  rState.maValue >>= sStyleName;
533 
534  // translate the used name from ODF intern to the name used in the Model
535  sStyleName = GetImport().GetStyleDisplayName(aFamilies[i - 7], sStyleName);
536 
537  if(bAutomatic)
538  {
539  // in this case the rPropSet got not really filled since above the call to
540  // CheckSpecialContext was used and not FillPropertySet, thus the below call to
541  // setPropertyValue can fail/will not be useful (e.g. when the rPropSet
542  // is a SwXTextCursor).
543  // This happens for AutoStyles which are already filled in XMLPropStyleContext::CreateAndInsert,
544  // thus the whole mechanism based on _ContextID_Index_Pair will not work
545  // in that case. Thus the slots which need to be converted already get
546  // converted there (it's called first) and not here (see
547  // translateNameBasedDrawingLayerFillStyleDefinitionsToStyleDisplayNames)
548  // For convenience, still Write back the corrected value to the XMLPropertyState entry
549  rState.maValue <<= sStyleName;
550  break;
551  }
552 
553  // Still needed if it's not an AutomaticStyle (!)
554  try
555  {
556  if(!rPropMapper.is())
557  {
558  rPropMapper = xImpPrMap->getPropertySetMapper();
559  }
560 
561  // set property
562  const OUString& rPropertyName = rPropMapper->GetEntryAPIName(rState.mnIndex);
563 
564  if(!xInfo.is())
565  {
566  xInfo = rPropSet->getPropertySetInfo();
567  }
568 
569  if(xInfo->hasPropertyByName(rPropertyName))
570  {
571  rPropSet->setPropertyValue(rPropertyName,Any(sStyleName));
572  }
573  }
574  catch(css::lang::IllegalArgumentException& e)
575  {
576  Sequence<OUString> aSeq { sStyleName };
578  }
579  break;
580  }
581  default:
582  {
583  // check for StarBats and StarMath fonts
584  Any rAny = rState.maValue;
585  sal_Int32 nMapperIndex = rState.mnIndex;
586 
587  // Now check for font name in rState and set corrected value,
588  // if necessary.
589  OUString sFontName;
590  rAny >>= sFontName;
591 
592  if ( !sFontName.isEmpty() )
593  {
594  if ( sFontName.equalsIgnoreAsciiCase( "StarBats" ) ||
595  sFontName.equalsIgnoreAsciiCase( "StarMath" ) )
596  {
597  // construct new value
598  sFontName = "StarSymbol";
599  Any aAny(rAny);
600  aAny <<= sFontName;
601 
602  if(!rPropMapper.is())
603  {
604  rPropMapper = xImpPrMap->getPropertySetMapper();
605  }
606 
607  // set property
608  OUString rPropertyName(rPropMapper->GetEntryAPIName(nMapperIndex));
609 
610  if(!xInfo.is())
611  {
612  xInfo = rPropSet->getPropertySetInfo();
613  }
614 
615  if(xInfo->hasPropertyByName(rPropertyName))
616  {
617  rPropSet->setPropertyValue(rPropertyName,aAny);
618  }
619  }
620  // else: "normal" style name -> no correction is necessary
621  }
622  // else: no style name found -> illegal value -> ignore
623  }
624  }
625  }
626  }
627 
628 }
629 
630 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal_Int16 nContextID
Definition: xmlimppr.hxx:56
XmlStyleFamily GetFamily() const
Definition: xmlstyle.hxx:112
bool IsXMLToken(const OUString &rString, enum XMLTokenEnum eToken)
compare eToken to the string
Definition: xmltoken.cxx:3422
constexpr sal_uInt16 XML_NAMESPACE_STYLE
Definition: xmlnmspe.hxx:30
static const SvXMLEnumMapEntry< sal_uInt16 > aCategoryMap[]
Definition: txtstyli.cxx:66
static bool convertEnum(EnumT &rEnum, const OUString &rValue, const SvXMLEnumMapEntry< EnumT > *pMap)
convert string to enum using given enum map, if the enum is not found in the map, this method will re...
Definition: xmluconv.hxx:128
signed char sal_Int8
virtual void FillPropertySet(const css::uno::Reference< css::beans::XPropertySet > &rPropSet) override
Definition: txtstyli.cxx:378
#define CTF_BORDER_MODEL
Definition: txtprmap.hxx:151
SvXMLImport & GetImport()
Definition: xmlictxt.hxx:62
const css::uno::Reference< css::style::XStyle > & GetStyle() const
Definition: prstylei.hxx:110
bool IsNew() const
Definition: xmlstyle.hxx:117
virtual void SetAttribute(sal_uInt16 nPrefixKey, const OUString &rLocalName, const OUString &rValue) override
Definition: prstylei.cxx:57
sal_Int32 mnIndex
Definition: maptype.hxx:106
bool IsDefaultStyle() const
Definition: xmlstyle.hxx:137
#define CTF_FONTFAMILYNAME_CJK
Definition: txtprmap.hxx:95
#define CTF_FILLGRADIENTNAME
Definition: xmlsdtypes.hxx:139
#define CTF_KEEP_TOGETHER
Definition: txtprmap.hxx:145
#define CTF_FILLTRANSNAME
Definition: xmlsdtypes.hxx:142
rtl::Reference< XMLTextImportHelper > const & GetTextImport()
Definition: xmlimp.hxx:594
#define XML_TYPE_PROP_TABLE_ROW
Definition: xmltypes.hxx:104
#define CTF_FONTFAMILYNAME
Definition: txtprmap.hxx:58
OUString m_sListStyleName
Definition: txtstyli.hxx:30
bool IsAutomaticStyle() const
Definition: xmlstyle.cxx:352
OUString m_sMasterPageName
Definition: txtstyli.hxx:33
css::uno::Any const & rValue
Definition: ImageStyle.hxx:38
XmlStyleFamily
Definition: families.hxx:47
#define CTF_FILLBITMAPNAME
Definition: xmlsdtypes.hxx:141
#define XML_TYPE_PROP_PARAGRAPH
Definition: xmltypes.hxx:99
const OUString & GetAutoName() const
Definition: xmlstyle.hxx:108
sal_Int8 m_nOutlineLevel
Definition: txtstyli.hxx:36
#define XMLERROR_FLAG_WARNING
Definition: xmlerror.hxx:35
virtual void SetAttribute(sal_uInt16 nPrefixKey, const OUString &rLocalName, const OUString &rValue) override
Definition: txtstyli.cxx:77
OUString m_sCategoryVal
Definition: txtstyli.hxx:31
#define DBG_UNHANDLED_EXCEPTION(...)
virtual rtl::Reference< SvXMLImportPropertyMapper > GetImportPropertyMapper(XmlStyleFamily nFamily) const
Definition: xmlstyle.cxx:580
#define XMLERROR_STYLE_PROP_VALUE
Definition: xmlerror.hxx:68
#define DBG_ASSERT(sCon, aError)
const OUString & GetDisplayName() const
Definition: xmlstyle.hxx:107
int i
virtual void Finish(bool bOverwrite) override
Definition: txtstyli.cxx:257
virtual void CreateAndInsert(bool bOverwrite) override
Definition: txtstyli.cxx:197
OUString m_sDataStyleName
Definition: txtstyli.hxx:34
XMLTextStyleContext(SvXMLImport &rImport, sal_uInt16 nPrfx, const OUString &rLName, const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList, SvXMLStylesContext &rStyles, XmlStyleFamily nFamily, bool bDefaultStyle=false)
::std::vector< XMLPropertyState > & GetProperties()
Definition: prstylei.hxx:79
virtual void CreateAndInsert(bool bOverwrite) override
Definition: prstylei.cxx:268
virtual SvXMLImportContextRef CreateChildContext(sal_uInt16 nPrefix, const OUString &rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList) override
Create a children element context.
Definition: prstylei.cxx:178
#define XML_TYPE_PROP_TEXT
Definition: xmltypes.hxx:98
virtual SvXMLImportContextRef CreateChildContext(sal_uInt16 nPrefix, const OUString &rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList) override
Create a children element context.
Definition: txtstyli.cxx:147
#define CTF_FILLHATCHNAME
Definition: xmlsdtypes.hxx:140
#define XML_TYPE_PROP_TABLE
Definition: xmltypes.hxx:102
virtual void Finish(bool bOverwrite) override
Definition: prstylei.cxx:457
OUString m_sDropCapTextStyleName
Definition: txtstyli.hxx:32
virtual void SetDefaults() override
Definition: txtstyli.cxx:240
css::uno::Any maValue
Definition: maptype.hxx:107
OUString GetStyleDisplayName(XmlStyleFamily nFamily, const OUString &rName) const
Definition: xmlimp.cxx:1491
#define SAL_WARN_IF(condition, area, stream)
#define CTF_COMBINED_CHARACTERS_FIELD
Definition: txtprmap.hxx:134
Handling of tokens in XML:
~XMLTextStyleContext() override
Definition: txtstyli.cxx:144
#define CTF_FONTFAMILYNAME_CTL
Definition: txtprmap.hxx:104
Smart struct to transport an Any with an index to the appropriate property-name.
Definition: maptype.hxx:104
rtl::Reference< XMLEventsImportContext > m_xEventContext
Definition: txtstyli.hxx:46
#define CTF_TEXT_DISPLAY
Definition: txtprmap.hxx:170
void SetError(sal_Int32 nId, const css::uno::Sequence< OUString > &rMsgParams, const OUString &rExceptionMessage, const css::uno::Reference< css::xml::sax::XLocator > &rLocator)
Record an error condition that occurred during import.
Sequence< sal_Int8 > aSeq
SvXMLStylesContext * GetStyles()
Definition: prstylei.hxx:78
This struct is used as an optional parameter to the static _FillPropertySet() methods.
Definition: xmlimppr.hxx:54
Reference< XSingleServiceFactory > xFactory
#define XML_TYPE_PROP_SECTION
Definition: xmltypes.hxx:101
bool m_bHasCombinedCharactersLetter
Definition: txtstyli.hxx:41
double maValue
constexpr sal_uInt16 XML_NAMESPACE_OFFICE
Definition: xmlnmspe.hxx:29
static bool convertNumber(sal_Int32 &rValue, std::u16string_view aString, sal_Int32 nMin=SAL_MIN_INT32, sal_Int32 nMax=SAL_MAX_INT32)
OUString sDisplayName
css::uno::Any SAL_CALL makeAny(const SharedUNOComponent< INTERFACE, COMPONENT > &value)