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