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/xmlnamespace.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 
129  SvXMLStylesContext& rStyles, XmlStyleFamily nFamily,
130  bool bDefaultStyle )
131 : XMLPropStyleContext( rImport, rStyles, nFamily, bDefaultStyle )
132 , m_nOutlineLevel( -1 )
133 , m_isAutoUpdate( false )
134 , m_bHasMasterPageName( false )
135 , m_bHasCombinedCharactersLetter( false )
136 // Inherited paragraph style lost information about unset numbering (#i69523#)
137 , m_bListStyleSet( false )
138 {
139 }
140 
142 {}
143 
144 css::uno::Reference< css::xml::sax::XFastContextHandler > XMLTextStyleContext::createFastChildContext(
145  sal_Int32 nElement,
146  const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
147 {
148  if( IsTokenInNamespace(nElement, XML_NAMESPACE_STYLE) )
149  {
150  sal_Int32 nLocalName = nElement & TOKEN_MASK;
151  sal_uInt32 nFamily = 0;
152  if( nLocalName == XML_TEXT_PROPERTIES )
153  nFamily = XML_TYPE_PROP_TEXT;
154  else if( nLocalName == XML_PARAGRAPH_PROPERTIES )
155  nFamily = XML_TYPE_PROP_PARAGRAPH;
156  else if( nLocalName == XML_SECTION_PROPERTIES )
157  nFamily = XML_TYPE_PROP_SECTION;
158  else if( IsDefaultStyle() && nLocalName == XML_TABLE_PROPERTIES )
159  nFamily = XML_TYPE_PROP_TABLE;
160  else if( IsDefaultStyle() && nLocalName == XML_TABLE_ROW_PROPERTIES )
161  nFamily = XML_TYPE_PROP_TABLE_ROW;
162  if( nFamily )
163  {
166  if( xImpPrMap.is() )
167  return new XMLTextPropertySetContext( GetImport(), nElement, xAttrList,
168  nFamily,
169  GetProperties(),
170  xImpPrMap,
172  }
173  }
174  else if ( nElement == XML_ELEMENT(OFFICE, XML_EVENT_LISTENERS) )
175  {
176  // create and remember events import context
177  // (for delayed processing of events)
179  return m_xEventContext.get();
180  }
181 
182  return XMLPropStyleContext::createFastChildContext( nElement, xAttrList );
183 }
184 
186 {
188  Reference < XStyle > xStyle = GetStyle();
189  if( !xStyle.is() || !(bOverwrite || IsNew()) )
190  return;
191 
192  Reference < XPropertySet > xPropSet( xStyle, UNO_QUERY );
193  Reference< XPropertySetInfo > xPropSetInfo =
194  xPropSet->getPropertySetInfo();
195 
196  OUString const sIsAutoUpdate("IsAutoUpdate");
197  if( xPropSetInfo->hasPropertyByName( sIsAutoUpdate ) )
198  {
199  xPropSet->setPropertyValue( sIsAutoUpdate, Any(m_isAutoUpdate) );
200  }
201 
202  sal_uInt16 nCategory = ParagraphStyleCategory::TEXT;
204  !m_sCategoryVal.isEmpty() && xStyle->isUserDefined() &&
205  xPropSetInfo->hasPropertyByName("Category") &&
206  SvXMLUnitConverter::convertEnum( nCategory, m_sCategoryVal, aCategoryMap))
207  {
208  xPropSet->setPropertyValue("Category", Any(static_cast<sal_Int16>(nCategory)));
209  }
210 
211  // tell the style about it's events (if applicable)
212  if (m_xEventContext.is())
213  {
214  // pass events into event supplier
215  Reference<document::XEventsSupplier> xEventsSupplier(xStyle,UNO_QUERY);
216  m_xEventContext->SetEvents(xEventsSupplier);
217  m_xEventContext.clear();
218  }
219 
220  // XML import: reconstruction of assignment of paragraph style to outline levels (#i69629#)
221  if (m_nOutlineLevel > 0)
222  {
223  GetImport().GetTextImport()->AddOutlineStyleCandidate(m_nOutlineLevel,
224  GetDisplayName() );
225  }
226 }
227 
229 {
233  {
234  Reference < XMultiServiceFactory > xFactory ( GetImport().GetModel(), UNO_QUERY);
235  if (xFactory.is())
236  {
237  Reference < XInterface > xInt = xFactory->createInstance( "com.sun.star.text.Defaults" );
238  Reference < XPropertySet > xProperties ( xInt, UNO_QUERY );
239  if ( xProperties.is() )
240  FillPropertySet ( xProperties );
241  }
242  }
243 }
244 
245 void XMLTextStyleContext::Finish( bool bOverwrite )
246 {
247  XMLPropStyleContext::Finish( bOverwrite );
248 
249  Reference < XStyle > xStyle = GetStyle();
250  // Consider set empty list style (#i69523#)
251  if ( !( m_bListStyleSet ||
252  m_nOutlineLevel >= 0 ||
253  !m_sDropCapTextStyleName.isEmpty() ||
255  !xStyle.is() ||
256  !( bOverwrite || IsNew() ) )
257  return;
258 
259  Reference < XPropertySet > xPropSet( xStyle, UNO_QUERY );
260  Reference< XPropertySetInfo > xPropSetInfo =
261  xPropSet->getPropertySetInfo();
262 
263  OUString const sOutlineLevel("OutlineLevel");
264  if( xPropSetInfo->hasPropertyByName( sOutlineLevel ))
265  {
266  if (m_nOutlineLevel >= 0)
267  {
268  xPropSet->setPropertyValue( sOutlineLevel, Any(m_nOutlineLevel) );
269  }
270  }
271 
272  // Consider set empty list style (#i69523#)
273  OUString const sNumberingStyleName("NumberingStyleName");
274  if (m_bListStyleSet &&
275  xPropSetInfo->hasPropertyByName( sNumberingStyleName ) )
276  {
277  /* Only for text document from version prior OOo 2.1 resp. SO 8 PU5:
278  - Do not apply list style, if paragraph style has a default outline
279  level > 0 and thus, will be assigned to the corresponding list
280  level of the outline style. (#i70223#)
281  */
282  bool bApplyListStyle( true );
283  if (m_nOutlineLevel > 0)
284  {
285  if ( GetImport().IsTextDocInOOoFileFormat() )
286  {
287  bApplyListStyle = false;
288  }
289  else
290  {
291  sal_Int32 nUPD( 0 );
292  sal_Int32 nBuild( 0 );
293  // Check explicitly on certain versions (#i86058#)
294  if ( GetImport().getBuildIds( nUPD, nBuild ) &&
295  ( ( nUPD == 641 ) || ( nUPD == 645 ) || // prior OOo 2.0
296  ( nUPD == 680 && nBuild <= 9073 ) ) ) // OOo 2.0 - OOo 2.0.4
297  {
298  bApplyListStyle = false;
299  }
300  }
301  }
302 
303  if ( bApplyListStyle )
304  {
305  if (m_sListStyleName.isEmpty())
306  {
307  xPropSet->setPropertyValue(sNumberingStyleName, Any(m_sListStyleName)); /* empty string */
308  }
309  else
310  {
311  // change list style name to display name
312  OUString sDisplayListStyleName(
313  GetImport().GetStyleDisplayName(XmlStyleFamily::TEXT_LIST,
315  // The families container must exist
316  const Reference < XNameContainer >& rNumStyles =
317  GetImport().GetTextImport()->GetNumberingStyles();
318  // if( rNumStyles.is() && rNumStyles->hasByName( sDisplayListStyleName ) &&
319  // xPropSetInfo->hasPropertyByName( sNumberingStyleName ) )
320  if ( rNumStyles.is() &&
321  rNumStyles->hasByName( sDisplayListStyleName ) )
322  {
323  xPropSet->setPropertyValue( sNumberingStyleName, Any(sDisplayListStyleName) );
324  }
325  }
326  }
327  }
328 
329  if (!m_sDropCapTextStyleName.isEmpty())
330  {
331  // change list style name to display name
332  OUString sDisplayDropCapTextStyleName(
333  GetImport().GetStyleDisplayName( XmlStyleFamily::TEXT_TEXT,
335  // The families container must exist
336  const Reference < XNameContainer >& rTextStyles =
337  GetImport().GetTextImport()->GetTextStyles();
338  if( rTextStyles.is() &&
339  rTextStyles->hasByName( sDisplayDropCapTextStyleName ) &&
340  xPropSetInfo->hasPropertyByName("DropCapCharStyleName"))
341  {
342  xPropSet->setPropertyValue("DropCapCharStyleName", Any(sDisplayDropCapTextStyleName));
343  }
344  }
345 
347  return;
348 
349  OUString sDisplayName(
350  GetImport().GetStyleDisplayName(
352  // The families container must exist
353  const Reference < XNameContainer >& rPageStyles =
354  GetImport().GetTextImport()->GetPageStyles();
355 
356  OUString const sPageDescName("PageDescName");
357  if( ( sDisplayName.isEmpty() ||
358  (rPageStyles.is() &&
359  rPageStyles->hasByName( sDisplayName )) ) &&
360  xPropSetInfo->hasPropertyByName( sPageDescName ) )
361  {
362  xPropSet->setPropertyValue( sPageDescName, Any(sDisplayName) );
363  }
364 }
365 
367  const Reference<XPropertySet > & rPropSet )
368 {
369  // imitate the FillPropertySet of the super class, so we get a chance to
370  // catch the combined characters attribute
371 
372  // imitate XMLPropStyleContext::FillPropertySet(...)
373  SvXMLStylesContext* pSvXMLStylesContext = GetStyles();
375  DBG_ASSERT(xImpPrMap.is(),"Where is the import prop mapper?");
376 
377  if(!xImpPrMap.is())
378  return;
379 
380  // imitate SvXMLImportPropertyMapper::FillPropertySet(...)
381  // The reason for this is that we have no other way to
382  // efficiently intercept the value of combined characters. To
383  // get that value, we could iterate through the map once more,
384  // but instead we chose to insert the code into this
385  // iteration. I haven't been able to come up with a much more
386  // intelligent solution.
387  struct ContextID_Index_Pair aContextIDs[] =
388  {
390  { CTF_KEEP_TOGETHER, -1 },
391  { CTF_BORDER_MODEL, -1 },
392  { CTF_TEXT_DISPLAY, -1 },
393  { CTF_FONTFAMILYNAME, -1 },
394  { CTF_FONTFAMILYNAME_CJK, -1 },
395  { CTF_FONTFAMILYNAME_CTL, -1 },
396 
397  //UUU need special handling for DrawingLayer FillStyle names
398  { CTF_FILLGRADIENTNAME, -1 },
399  { CTF_FILLTRANSNAME, -1 },
400  { CTF_FILLHATCHNAME, -1 },
401  { CTF_FILLBITMAPNAME, -1 },
402 
403  { -1, -1 }
404  };
405 
406  // the style families associated with the same index modulo 4
407  static const XmlStyleFamily aFamilies[] =
408  {
413  };
414 
415  // get property set info
416  Reference< XPropertySetInfo > xInfo;
418  bool bAutomatic = false;
419 
420  if(pSvXMLStylesContext->IsAutomaticStyle() &&
422  {
423  bAutomatic = true;
424 
425  if( !GetAutoName().isEmpty() )
426  {
427  OUString sAutoProp = ( GetFamily() == XmlStyleFamily::TEXT_TEXT ) ?
428  OUString( "CharAutoStyleName" ):
429  OUString( "ParaAutoStyleName" );
430 
431  try
432  {
433  if(!xInfo.is())
434  {
435  xInfo = rPropSet->getPropertySetInfo();
436  }
437 
438  if ( xInfo->hasPropertyByName( sAutoProp ) )
439  {
440  rPropSet->setPropertyValue( sAutoProp, makeAny(GetAutoName()) );
441  }
442  else
443  {
444  bAutomatic = false;
445  }
446  }
447  catch( const RuntimeException& ) { throw; }
448  catch( const Exception& )
449  {
450  DBG_UNHANDLED_EXCEPTION("xmloff.text");
451  bAutomatic = false;
452  }
453  }
454  }
455 
456  if( bAutomatic )
457  {
458  xImpPrMap->CheckSpecialContext( GetProperties(), rPropSet, aContextIDs );
459  }
460  else
461  {
462  xImpPrMap->FillPropertySet( GetProperties(), rPropSet, aContextIDs );
463  }
464 
465  sal_Int32 nIndex = aContextIDs[0].nIndex;
466 
467  // have we found a combined characters
468  if ( nIndex != -1 )
469  {
470  Any& rAny = GetProperties()[nIndex].maValue;
471  bool bVal = *o3tl::doAccess<bool>(rAny);
473  }
474 
475  // keep-together: the application default is different from
476  // the file format default. Hence, if we always set this
477  // value; if we didn't find one, we'll set to false, the file
478  // format default.
479  // border-model: same
481  {
482  OUString sIsSplitAllowed("IsSplitAllowed");
483  SAL_WARN_IF( !rPropSet->getPropertySetInfo()->hasPropertyByName( sIsSplitAllowed ), "xmloff", "property missing?" );
484  rPropSet->setPropertyValue(
485  sIsSplitAllowed,
486  (aContextIDs[1].nIndex == -1) ? makeAny( false ) : GetProperties()[aContextIDs[1].nIndex].maValue );
487  }
488 
490  {
491  OUString sCollapsingBorders("CollapsingBorders");
492  SAL_WARN_IF( !rPropSet->getPropertySetInfo()->hasPropertyByName( sCollapsingBorders ), "xmloff", "property missing?" );
493  rPropSet->setPropertyValue(
494  sCollapsingBorders,
495  (aContextIDs[2].nIndex == -1)
496  ? makeAny( false )
497  : GetProperties()[aContextIDs[2].nIndex].maValue );
498  }
499 
500 
501  // iterate over aContextIDs entries, start with 3, prev ones are already used above
502  for(sal_uInt16 i(3); aContextIDs[i].nContextID != -1; i++)
503  {
504  nIndex = aContextIDs[i].nIndex;
505 
506  if ( nIndex != -1 )
507  {
508  // Found!
509  struct XMLPropertyState& rState = GetProperties()[nIndex];
510 
511  switch(aContextIDs[i].nContextID)
512  {
514  case CTF_FILLTRANSNAME:
515  case CTF_FILLHATCHNAME:
516  case CTF_FILLBITMAPNAME:
517  {
518  // DrawingLayer FillStyle name needs to be mapped to DisplayName
519  OUString sStyleName;
520  rState.maValue >>= sStyleName;
521 
522  // translate the used name from ODF intern to the name used in the Model
523  sStyleName = GetImport().GetStyleDisplayName(aFamilies[i - 7], sStyleName);
524 
525  if(bAutomatic)
526  {
527  // in this case the rPropSet got not really filled since above the call to
528  // CheckSpecialContext was used and not FillPropertySet, thus the below call to
529  // setPropertyValue can fail/will not be useful (e.g. when the rPropSet
530  // is a SwXTextCursor).
531  // This happens for AutoStyles which are already filled in XMLPropStyleContext::CreateAndInsert,
532  // thus the whole mechanism based on _ContextID_Index_Pair will not work
533  // in that case. Thus the slots which need to be converted already get
534  // converted there (it's called first) and not here (see
535  // translateNameBasedDrawingLayerFillStyleDefinitionsToStyleDisplayNames)
536  // For convenience, still Write back the corrected value to the XMLPropertyState entry
537  rState.maValue <<= sStyleName;
538  break;
539  }
540 
541  // Still needed if it's not an AutomaticStyle (!)
542  try
543  {
544  if(!rPropMapper.is())
545  {
546  rPropMapper = xImpPrMap->getPropertySetMapper();
547  }
548 
549  // set property
550  const OUString& rPropertyName = rPropMapper->GetEntryAPIName(rState.mnIndex);
551 
552  if(!xInfo.is())
553  {
554  xInfo = rPropSet->getPropertySetInfo();
555  }
556 
557  if(xInfo->hasPropertyByName(rPropertyName))
558  {
559  rPropSet->setPropertyValue(rPropertyName,Any(sStyleName));
560  }
561  }
562  catch(css::lang::IllegalArgumentException& e)
563  {
564  Sequence<OUString> aSeq { sStyleName };
566  }
567  break;
568  }
569  default:
570  {
571  // check for StarBats and StarMath fonts
572  Any rAny = rState.maValue;
573  sal_Int32 nMapperIndex = rState.mnIndex;
574 
575  // Now check for font name in rState and set corrected value,
576  // if necessary.
577  OUString sFontName;
578  rAny >>= sFontName;
579 
580  if ( !sFontName.isEmpty() )
581  {
582  if ( sFontName.equalsIgnoreAsciiCase( "StarBats" ) ||
583  sFontName.equalsIgnoreAsciiCase( "StarMath" ) )
584  {
585  // construct new value
586  sFontName = "StarSymbol";
587  Any aAny(rAny);
588  aAny <<= sFontName;
589 
590  if(!rPropMapper.is())
591  {
592  rPropMapper = xImpPrMap->getPropertySetMapper();
593  }
594 
595  // set property
596  OUString rPropertyName(rPropMapper->GetEntryAPIName(nMapperIndex));
597 
598  if(!xInfo.is())
599  {
600  xInfo = rPropSet->getPropertySetInfo();
601  }
602 
603  if(xInfo->hasPropertyByName(rPropertyName))
604  {
605  rPropSet->setPropertyValue(rPropertyName,aAny);
606  }
607  }
608  // else: "normal" style name -> no correction is necessary
609  }
610  // else: no style name found -> illegal value -> ignore
611  }
612  }
613  }
614  }
615 
616 }
617 
618 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal_Int16 nContextID
Definition: xmlimppr.hxx:58
XmlStyleFamily GetFamily() const
Definition: xmlstyle.hxx:104
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: prstylei.cxx:176
bool IsXMLToken(const OUString &rString, enum XMLTokenEnum eToken)
compare eToken to the string
Definition: xmltoken.cxx:3434
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:366
#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:108
bool IsNew() const
Definition: xmlstyle.hxx:109
virtual void SetAttribute(sal_uInt16 nPrefixKey, const OUString &rLocalName, const OUString &rValue) override
Definition: prstylei.cxx:57
sal_Int32 mnIndex
Definition: maptype.hxx:124
bool IsDefaultStyle() const
Definition: xmlstyle.hxx:129
#define CTF_FONTFAMILYNAME_CJK
Definition: txtprmap.hxx:95
#define CTF_FILLGRADIENTNAME
Definition: xmlsdtypes.hxx:138
#define CTF_KEEP_TOGETHER
Definition: txtprmap.hxx:145
#define CTF_FILLTRANSNAME
Definition: xmlsdtypes.hxx:141
rtl::Reference< XMLTextImportHelper > const & GetTextImport()
Definition: xmlimp.hxx:600
#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:326
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:140
#define XML_TYPE_PROP_PARAGRAPH
Definition: xmltypes.hxx:99
const OUString & GetAutoName() const
Definition: xmlstyle.hxx:100
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
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: txtstyli.cxx:144
#define DBG_UNHANDLED_EXCEPTION(...)
virtual rtl::Reference< SvXMLImportPropertyMapper > GetImportPropertyMapper(XmlStyleFamily nFamily) const
Definition: xmlstyle.cxx:530
#define XMLERROR_STYLE_PROP_VALUE
Definition: xmlerror.hxx:68
#define DBG_ASSERT(sCon, aError)
const OUString & GetDisplayName() const
Definition: xmlstyle.hxx:99
int i
virtual void Finish(bool bOverwrite) override
Definition: txtstyli.cxx:245
virtual void CreateAndInsert(bool bOverwrite) override
Definition: txtstyli.cxx:185
OUString m_sDataStyleName
Definition: txtstyli.hxx:34
::std::vector< XMLPropertyState > & GetProperties()
Definition: prstylei.hxx:81
virtual void CreateAndInsert(bool bOverwrite) override
Definition: prstylei.cxx:258
#define XML_TYPE_PROP_TEXT
Definition: xmltypes.hxx:98
#define CTF_FILLHATCHNAME
Definition: xmlsdtypes.hxx:139
#define XML_TYPE_PROP_TABLE
Definition: xmltypes.hxx:102
virtual void Finish(bool bOverwrite) override
Definition: prstylei.cxx:447
OUString m_sDropCapTextStyleName
Definition: txtstyli.hxx:32
virtual void SetDefaults() override
Definition: txtstyli.cxx:228
css::uno::Any maValue
Definition: maptype.hxx:125
constexpr bool IsTokenInNamespace(sal_Int32 nToken, sal_uInt16 nNamespacePrefix)
Definition: xmlimp.hxx:101
OUString GetStyleDisplayName(XmlStyleFamily nFamily, const OUString &rName) const
Definition: xmlimp.cxx:1494
#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:141
#define CTF_FONTFAMILYNAME_CTL
Definition: txtprmap.hxx:104
#define XML_ELEMENT(prefix, name)
Definition: xmlimp.hxx:94
Smart struct to transport an Any with an index to the appropriate property-name.
Definition: maptype.hxx:122
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:80
This struct is used as an optional parameter to the static _FillPropertySet() methods.
Definition: xmlimppr.hxx:56
Reference< XSingleServiceFactory > xFactory
constexpr sal_Int32 TOKEN_MASK
Definition: xmlimp.hxx:91
XMLTextStyleContext(SvXMLImport &rImport, SvXMLStylesContext &rStyles, XmlStyleFamily nFamily, bool bDefaultStyle=false)
Definition: txtstyli.cxx:128
#define XML_TYPE_PROP_SECTION
Definition: xmltypes.hxx:101
bool m_bHasCombinedCharactersLetter
Definition: txtstyli.hxx:41
constexpr sal_uInt16 XML_NAMESPACE_STYLE
double maValue
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)