LibreOffice Module xmloff (master) 1
prstylei.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 <sal/config.h>
21
22#include <o3tl/any.hxx>
23#include <osl/diagnose.h>
24#include <sal/log.hxx>
25#include <set>
27#include <xmloff/xmltoken.hxx>
28#include <xmloff/xmlprcon.hxx>
29#include <com/sun/star/frame/XModel.hpp>
30#include <com/sun/star/style/XStyle.hpp>
31#include <com/sun/star/style/XAutoStyleFamily.hpp>
32#include <com/sun/star/container/XNameContainer.hpp>
33#include <com/sun/star/beans/XPropertySet.hpp>
34#include <com/sun/star/beans/XPropertyState.hpp>
35#include <com/sun/star/beans/XMultiPropertyStates.hpp>
36#include <com/sun/star/lang/XMultiServiceFactory.hpp>
37#include <xmloff/xmlimp.hxx>
38#include <xmloff/prstylei.hxx>
39#include <xmloff/xmlerror.hxx>
40#include <xmloff/xmltypes.hxx>
41#include <xmloff/maptype.hxx>
42#include <xmloff/xmlimppr.hxx>
43#include <xmloff/xmlprmap.hxx>
45#include <com/sun/star/drawing/FillStyle.hpp>
46
47using namespace ::com::sun::star;
48using namespace ::com::sun::star::uno;
49using namespace ::com::sun::star::xml::sax;
50using namespace ::com::sun::star::style;
51using namespace ::com::sun::star::container;
52using namespace ::com::sun::star::beans;
53using namespace ::com::sun::star::lang;
54using namespace ::xmloff::token;
55using namespace com::sun::star::drawing;
56
57void XMLPropStyleContext::SetAttribute( sal_Int32 nElement,
58 const OUString& rValue )
59{
60 if( nElement == XML_ELEMENT(STYLE, XML_FAMILY) )
61 {
62 SAL_WARN_IF( GetFamily() != SvXMLStylesContext::GetFamily( rValue ), "xmloff", "unexpected style family" );
63 }
64 else
65 {
66 SvXMLStyleContext::SetAttribute( nElement, rValue );
67 }
68}
69
70
71namespace
72{
73 struct theStandardSet :
74 public rtl::StaticWithInit<OldFillStyleDefinitionSet, theStandardSet>
75 {
76 OldFillStyleDefinitionSet operator () ()
77 {
79 aSet.insert("BackColorRGB");
80 aSet.insert("BackTransparent");
81 aSet.insert("BackColorTransparency");
82 aSet.insert("BackGraphic");
83 aSet.insert("BackGraphicFilter");
84 aSet.insert("BackGraphicLocation");
85 aSet.insert("BackGraphicTransparency");
86 return aSet;
87 }
88 };
89 struct theHeaderSet :
90 public rtl::StaticWithInit<OldFillStyleDefinitionSet, theHeaderSet>
91 {
92 OldFillStyleDefinitionSet operator () ()
93 {
95 aSet.insert("HeaderBackColorRGB");
96 aSet.insert("HeaderBackTransparent");
97 aSet.insert("HeaderBackColorTransparency");
98 aSet.insert("HeaderBackGraphic");
99 aSet.insert("HeaderBackGraphicFilter");
100 aSet.insert("HeaderBackGraphicLocation");
101 aSet.insert("HeaderBackGraphicTransparency");
102 return aSet;
103 }
104 };
105 struct theFooterSet :
106 public rtl::StaticWithInit<OldFillStyleDefinitionSet, theFooterSet>
107 {
108 OldFillStyleDefinitionSet operator () ()
109 {
111 aSet.insert("FooterBackColorRGB");
112 aSet.insert("FooterBackTransparent");
113 aSet.insert("FooterBackColorTransparency");
114 aSet.insert("FooterBackGraphic");
115 aSet.insert("FooterBackGraphicFilter");
116 aSet.insert("FooterBackGraphicLocation");
117 aSet.insert("FooterBackGraphicTransparency");
118 return aSet;
119 }
120 };
121 struct theParaSet :
122 public rtl::StaticWithInit<OldFillStyleDefinitionSet, theParaSet>
123 {
124 OldFillStyleDefinitionSet operator () ()
125 {
127 // Caution: here it is *not* 'ParaBackColorRGB' as it should be, but indeed
128 // 'ParaBackColor' is used, see aXMLParaPropMap definition (line 313)
129 aSet.insert("ParaBackColor");
130 aSet.insert("ParaBackTransparent");
131 aSet.insert("ParaBackGraphicLocation");
132 aSet.insert("ParaBackGraphicFilter");
133 aSet.insert("ParaBackGraphic");
134
135 // These are not used in aXMLParaPropMap definition, thus not needed here
136 // aSet.insert("ParaBackColorTransparency");
137 // aSet.insert("ParaBackGraphicTransparency");
138 return aSet;
139 }
140 };
141}
142
143
144
145constexpr OUStringLiteral gsIsPhysical( u"IsPhysical" );
146constexpr OUStringLiteral gsFollowStyle( u"FollowStyle" );
147
149 SvXMLStylesContext& rStyles, XmlStyleFamily nFamily,
150 bool bDefault )
151: SvXMLStyleContext( rImport, nFamily, bDefault )
152, mxStyles( &rStyles )
153{
154}
155
157{
158}
159
161{
162 return theStandardSet::get();
163}
164
166{
167 return theHeaderSet::get();
168}
169
171{
172 return theFooterSet::get();
173}
174
175css::uno::Reference< css::xml::sax::XFastContextHandler > XMLPropStyleContext::createFastChildContext(
176 sal_Int32 nElement,
177 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
178{
179 sal_uInt32 nFamily = 0;
182 {
183 sal_Int32 nLocalName = nElement & TOKEN_MASK;
184 if( nLocalName == XML_GRAPHIC_PROPERTIES )
185 nFamily = XML_TYPE_PROP_GRAPHIC;
186 else if( nLocalName == XML_DRAWING_PAGE_PROPERTIES )
188 else if( nLocalName == XML_TEXT_PROPERTIES )
189 nFamily = XML_TYPE_PROP_TEXT;
190 else if( nLocalName == XML_PARAGRAPH_PROPERTIES )
191 nFamily = XML_TYPE_PROP_PARAGRAPH;
192 else if( nLocalName == XML_RUBY_PROPERTIES )
193 nFamily = XML_TYPE_PROP_RUBY;
194 else if( nLocalName == XML_SECTION_PROPERTIES )
195 nFamily = XML_TYPE_PROP_SECTION;
196 else if( nLocalName == XML_TABLE_PROPERTIES )
197 nFamily = XML_TYPE_PROP_TABLE;
198 else if( nLocalName == XML_TABLE_COLUMN_PROPERTIES )
200 else if( nLocalName ==XML_TABLE_ROW_PROPERTIES )
201 nFamily = XML_TYPE_PROP_TABLE_ROW;
202 else if( nLocalName == XML_TABLE_CELL_PROPERTIES )
203 nFamily = XML_TYPE_PROP_TABLE_CELL;
204 else if( nLocalName == XML_CHART_PROPERTIES )
205 nFamily = XML_TYPE_PROP_CHART;
206 }
207 if( nFamily )
208 {
210 mxStyles->GetImportPropertyMapper( GetFamily() );
211 if( xImpPrMap.is() )
212 return new SvXMLPropertySetContext( GetImport(), nElement,
213 xAttrList,
214 nFamily,
216 xImpPrMap );
217 }
218 XMLOFF_WARN_UNKNOWN_ELEMENT("xmloff", nElement);
219 return nullptr;
220}
221
223 const Reference< XPropertySet > & rPropSet )
224{
226 mxStyles->GetImportPropertyMapper( GetFamily() );
227 SAL_WARN_IF( !xImpPrMap.is(), "xmloff", "There is the import prop mapper" );
228 if( xImpPrMap.is() )
229 xImpPrMap->FillPropertySet( maProperties, rPropSet );
230}
231
233{
234}
235
236Reference < XStyle > XMLPropStyleContext::Create()
237{
238 Reference < XStyle > xNewStyle;
239
240 OUString sServiceName = mxStyles->GetServiceName( GetFamily() );
241 if( !sServiceName.isEmpty() )
242 {
243 Reference< XMultiServiceFactory > xFactory( GetImport().GetModel(),
244 UNO_QUERY );
245 if( xFactory.is() )
246 {
247 Reference < XInterface > xIfc =
248 xFactory->createInstance( sServiceName );
249 if( xIfc.is() )
250 xNewStyle.set( xIfc, UNO_QUERY );
251 }
252 }
253
254 return xNewStyle;
255}
256
258{
259 SvXMLStylesContext* pSvXMLStylesContext = mxStyles.get();
261 OSL_ENSURE(xImpPrMap.is(), "There is no import prop mapper");
262
263 // need to filter out old fill definitions when the new ones are used. The new
264 // ones are used when a FillStyle is defined
265 const bool bTakeCareOfDrawingLayerFillStyle(xImpPrMap.is() && GetFamily() == XmlStyleFamily::TEXT_PARAGRAPH);
266 bool bDrawingLayerFillStylesUsed(false);
267
268 if(bTakeCareOfDrawingLayerFillStyle)
269 {
270 // check if new FillStyles are used and if so mark old ones with -1
271 static OUString s_FillStyle("FillStyle");
272
274 {
275 deactivateOldFillStyleDefinitions(theParaSet::get());
276 bDrawingLayerFillStylesUsed = true;
277 }
278 }
279
280 if( pSvXMLStylesContext->IsAutomaticStyle()
282 {
283 // Need to translate StyleName from temp MapNames to names
284 // used in already imported items (already exist in the pool). This
285 // is required for AutomaticStyles since these do *not* use FillPropertySet
286 // and thus just trigger CheckSpecialContext in XMLTextStyleContext::FillPropertySet
287 // (which may be double action anyways). The mechanism there to use _ContextID_Index_Pair
288 // is not working for AutomaticStyles and is already too late, too (this
289 // method is already called before XMLTextStyleContext::FillPropertySet gets called)
290 if(bDrawingLayerFillStylesUsed)
291 {
293 }
294
295 Reference < XAutoStyleFamily > xAutoFamily = pSvXMLStylesContext->GetAutoStyles( GetFamily() );
296 if( !xAutoFamily.is() )
297 return;
298 if( xImpPrMap.is() )
299 {
300 Sequence< PropertyValue > aValues;
301 xImpPrMap->FillPropertySequence( maProperties, aValues );
302
303 sal_Int32 nLen = aValues.getLength();
304 if( nLen )
305 {
307 {
308 aValues.realloc( nLen + 2 );
309 PropertyValue *pProps = aValues.getArray() + nLen;
310 pProps->Name = "ParaStyleName";
311 OUString sParent( GetParentName() );
312 if( !sParent.isEmpty() )
313 {
314 sParent = GetImport().GetStyleDisplayName( GetFamily(), sParent );
315 Reference < XNameContainer > xFamilies = pSvXMLStylesContext->GetStylesContainer( GetFamily() );
316 if(xFamilies.is() && xFamilies->hasByName( sParent ) )
317 {
318 css::uno::Reference< css::style::XStyle > xStyle;
319 Any aAny = xFamilies->getByName( sParent );
320 aAny >>= xStyle;
321 sParent = xStyle->getName() ;
322 }
323 }
324 else
325 sParent = "Standard";
326 pProps->Value <<= sParent;
327 ++pProps;
328 pProps->Name = "ParaConditionalStyleName";
329 pProps->Value <<= sParent;
330 }
331
332 Reference < XAutoStyle > xAutoStyle = xAutoFamily->insertStyle( aValues );
333 if( xAutoStyle.is() )
334 {
335 Sequence< OUString > aPropNames
336 {
338 OUString("ParaAutoStyleName"):
339 OUString("CharAutoStyleName")
340 };
341 Sequence< Any > aAny = xAutoStyle->getPropertyValues( aPropNames );
342 if( aAny.hasElements() )
343 {
344 OUString aName;
345 aAny[0] >>= aName;
347 }
348 }
349 }
350 }
351 }
352 else
353 {
354 const OUString& rName = GetDisplayName();
355 if( rName.isEmpty() || IsDefaultStyle() )
356 return;
357
358 Reference < XNameContainer > xFamilies = pSvXMLStylesContext->GetStylesContainer( GetFamily() );
359 if( !xFamilies.is() )
360 {
361 SAL_WARN("xmloff", "no styles container for family " << static_cast<int>(GetFamily()));
362 return;
363 }
364
365 bool bNew = false;
366 if( xFamilies->hasByName( rName ) )
367 {
368 Any aAny = xFamilies->getByName( rName );
369 aAny >>= mxStyle;
370 }
371 else
372 {
373 mxStyle = Create();
374 if( !mxStyle.is() )
375 return;
376
377 xFamilies->insertByName( rName, Any(mxStyle) );
378 bNew = true;
379 }
380
381 Reference < XPropertySet > xPropSet( mxStyle, UNO_QUERY );
382 Reference< XPropertySetInfo > xPropSetInfo =
383 xPropSet->getPropertySetInfo();
384 if( !bNew && xPropSetInfo->hasPropertyByName( gsIsPhysical ) )
385 {
386 Any aAny = xPropSet->getPropertyValue( gsIsPhysical );
387 bNew = !*o3tl::doAccess<bool>(aAny);
388 }
389 SetNew( bNew );
390 if( rName != GetName() )
392
393
394 if( bOverwrite || bNew )
395 {
397 if( xImpPrMap.is() )
398 xPrMap = xImpPrMap->getPropertySetMapper();
399 if( xPrMap.is() )
400 {
401 Reference < XMultiPropertyStates > xMultiStates( xPropSet,
402 UNO_QUERY );
403 if( xMultiStates.is() )
404 {
405 xMultiStates->setAllPropertiesToDefault();
406 }
407 else
408 {
409 std::set < OUString > aNameSet;
410 sal_Int32 nCount = xPrMap->GetEntryCount();
411 sal_Int32 i;
412 for( i = 0; i < nCount; i++ )
413 {
414 const OUString& rPrName = xPrMap->GetEntryAPIName( i );
415 if( xPropSetInfo->hasPropertyByName( rPrName ) )
416 aNameSet.insert( rPrName );
417 }
418 Reference< XPropertyState > xPropState( xPropSet, uno::UNO_QUERY );
419 if (xPropState.is())
420 {
421 nCount = aNameSet.size();
422 Sequence<OUString> aNames( comphelper::containerToSequence(aNameSet) );
423 Sequence < PropertyState > aStates( xPropState->getPropertyStates(aNames) );
424 const PropertyState *pStates = aStates.getConstArray();
425 OUString* pNames = aNames.getArray();
426
427 for( i = 0; i < nCount; i++ )
428 {
429 if( PropertyState_DIRECT_VALUE == *pStates++ )
430 xPropState->setPropertyToDefault( pNames[i] );
431 }
432 }
433 }
434 }
435
436 if (mxStyle.is())
437 mxStyle->setParentStyle(OUString());
438
439 FillPropertySet( xPropSet );
440 }
441 else
442 {
443 SetValid( false );
444 }
445 }
446}
447
448void XMLPropStyleContext::Finish( bool bOverwrite )
449{
450 if( !mxStyle.is() || !(IsNew() || bOverwrite) )
451 return;
452
453 // The families container must exist
454 Reference < XNameContainer > xFamilies = mxStyles->GetStylesContainer( GetFamily() );
455 SAL_WARN_IF( !xFamilies.is(), "xmloff", "Families lost" );
456 if( !xFamilies.is() )
457 return;
458
459 // connect parent
460 OUString sParent( GetParentName() );
461 if( !sParent.isEmpty() )
462 sParent = GetImport().GetStyleDisplayName( GetFamily(), sParent );
463 if( !sParent.isEmpty() && !xFamilies->hasByName( sParent ) )
464 sParent.clear();
465
466 if( sParent != mxStyle->getParentStyle() )
467 {
468 // this may except if setting the parent style forms a
469 // circle in the style dependencies; especially if the parent
470 // style is the same as the current style
471 try
472 {
473 mxStyle->setParentStyle( sParent );
474 }
475 catch(const uno::Exception& e)
476 {
477 // according to the API definition, I would expect a
478 // container::NoSuchElementException. But it throws an
479 // uno::RuntimeException instead. I catch
480 // uno::Exception in order to process both of them.
481
482 // We can't set the parent style. For a proper
483 // Error-Message, we should pass in the name of the
484 // style, as well as the desired parent style.
485
486 // getName() throws no non-Runtime exception:
489 { mxStyle->getName(), sParent }, e.Message, nullptr );
490 }
491 }
492
493 // connect follow
494 OUString sFollow( GetFollow() );
495 if( !sFollow.isEmpty() )
496 sFollow = GetImport().GetStyleDisplayName( GetFamily(), sFollow );
497 if( sFollow.isEmpty() || !xFamilies->hasByName( sFollow ) )
498 sFollow = mxStyle->getName();
499
500 Reference < XPropertySet > xPropSet( mxStyle, UNO_QUERY );
501 Reference< XPropertySetInfo > xPropSetInfo =
502 xPropSet->getPropertySetInfo();
503 if( xPropSetInfo->hasPropertyByName( gsFollowStyle ) )
504 {
505 Any aAny = xPropSet->getPropertyValue( gsFollowStyle );
506 OUString sCurrFollow;
507 aAny >>= sCurrFollow;
508 if( sCurrFollow != sFollow )
509 {
510 xPropSet->setPropertyValue( gsFollowStyle, Any(sFollow) );
511 }
512 }
513
514 // Connect linked style.
515 OUString aLinked(GetLinked());
516 if (!aLinked.isEmpty())
517 {
519 {
521 }
523 {
525 }
526 }
527 if (!aLinked.isEmpty() && xPropSetInfo->hasPropertyByName("LinkStyle"))
528 {
529 uno::Any aAny = xPropSet->getPropertyValue("LinkStyle");
530 OUString aCurrentLinked;
531 aAny >>= aCurrentLinked;
532 if (aCurrentLinked != aLinked)
533 {
534 xPropSet->setPropertyValue("LinkStyle", uno::Any(aLinked));
535 }
536 }
537
538 if ( xPropSetInfo->hasPropertyByName( "Hidden" ) )
539 {
540 xPropSet->setPropertyValue( "Hidden", uno::Any( IsHidden( ) ) );
541 }
542
543}
544
546 std::u16string_view rFillStyleTag) const
547{
548 if(!maProperties.empty() && !rFillStyleTag.empty())
549 {
550 // no & to avoid non-obvious UAF due to the 2nd temp Reference
551 const rtl::Reference<XMLPropertySetMapper> rMapper = GetStyles()->GetImportPropertyMapper(GetFamily())->getPropertySetMapper();
552
553 if(rMapper.is())
554 {
555 for(const auto& a : maProperties)
556 {
557 if(a.mnIndex != -1)
558 {
559 const OUString& rPropName = rMapper->GetEntryAPIName(a.mnIndex);
560
561 if(rPropName == rFillStyleTag)
562 {
563 FillStyle eFillStyle(FillStyle_NONE);
564
565 if(a.maValue >>= eFillStyle)
566 {
567 // okay, type was good, FillStyle is set
568 }
569 else
570 {
571 // also try an int (see XFillStyleItem::PutValue)
572 sal_Int32 nFillStyle(0);
573
574 if(a.maValue >>= nFillStyle)
575 {
576 eFillStyle = static_cast< FillStyle >(nFillStyle);
577 }
578 }
579
580 // we found the entry, check it
581 return FillStyle_NONE != eFillStyle;
582 }
583 }
584 }
585 }
586 }
587
588 return false;
589}
590
592 const OldFillStyleDefinitionSet& rHashSetOfTags)
593{
594 if(rHashSetOfTags.empty() || maProperties.empty())
595 return;
596
597 const rtl::Reference< XMLPropertySetMapper >& rMapper = GetStyles()->GetImportPropertyMapper(GetFamily())->getPropertySetMapper();
598
599 if(!rMapper.is())
600 return;
601
602 for(auto& a : maProperties)
603 {
604 if(a.mnIndex != -1)
605 {
606 const OUString& rPropName = rMapper->GetEntryAPIName(a.mnIndex);
607
608 if(rHashSetOfTags.find(rPropName) != rHashSetOfTags.end())
609 {
610 // mark entry as inactive
611 a.mnIndex = -1;
612 }
613 }
614 }
615}
616
618{
619 if(maProperties.empty())
620 return;
621
622 const rtl::Reference< XMLPropertySetMapper >& rMapper = GetStyles()->GetImportPropertyMapper(GetFamily())->getPropertySetMapper();
623
624 if(!rMapper.is())
625 return;
626
627 static constexpr OUStringLiteral s_FillGradientName(u"FillGradientName");
628 static constexpr OUStringLiteral s_FillHatchName(u"FillHatchName");
629 static constexpr OUStringLiteral s_FillBitmapName(u"FillBitmapName");
630 static constexpr OUStringLiteral s_FillTransparenceGradientName(u"FillTransparenceGradientName");
631
632 for(auto& a : maProperties)
633 {
634 if(a.mnIndex != -1)
635 {
636 const OUString& rPropName = rMapper->GetEntryAPIName(a.mnIndex);
638
639 if(rPropName == s_FillGradientName || rPropName == s_FillTransparenceGradientName)
640 {
641 aStyleFamily = XmlStyleFamily::SD_GRADIENT_ID;
642 }
643 else if(rPropName == s_FillHatchName)
644 {
645 aStyleFamily = XmlStyleFamily::SD_HATCH_ID;
646 }
647 else if(rPropName == s_FillBitmapName)
648 {
650 }
651
652 if(aStyleFamily != XmlStyleFamily::DATA_STYLE)
653 {
654 OUString sStyleName;
655
656 a.maValue >>= sStyleName;
657 sStyleName = GetImport().GetStyleDisplayName( aStyleFamily, sStyleName );
658 a.maValue <<= sStyleName;
659 }
660 }
661 }
662}
663
664/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
constexpr OUStringLiteral sServiceName
SvXMLImport & GetImport()
Definition: xmlictxt.hxx:60
OUString GetStyleDisplayName(XmlStyleFamily nFamily, const OUString &rName) const
Definition: xmlimp.cxx:1422
void AddStyleDisplayName(XmlStyleFamily nFamily, const OUString &rName, const OUString &rDisplayName)
Definition: xmlimp.cxx:1391
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.
virtual void SetAttribute(sal_Int32 nElement, const OUString &rValue)
Definition: xmlstyle.cxx:69
const OUString & GetName() const
Definition: xmlstyle.hxx:78
const OUString & GetFollow() const
Definition: xmlstyle.hxx:82
void SetAutoName(const OUString &rName)
Definition: xmlstyle.hxx:64
const OUString & GetLinked() const
Definition: xmlstyle.hxx:83
bool IsHidden() const
Definition: xmlstyle.hxx:93
void SetValid(bool b)
Definition: xmlstyle.hxx:88
XmlStyleFamily GetFamily() const
Definition: xmlstyle.hxx:85
void SetNew(bool b)
Definition: xmlstyle.hxx:91
const OUString & GetParentName() const
Definition: xmlstyle.hxx:81
bool IsNew() const
Definition: xmlstyle.hxx:90
bool IsDefaultStyle() const
Definition: xmlstyle.hxx:110
const OUString & GetDisplayName() const
Definition: xmlstyle.hxx:79
static XmlStyleFamily GetFamily(std::u16string_view rFamily)
Definition: xmlstyle.cxx:461
virtual css::uno::Reference< css::container::XNameContainer > GetStylesContainer(XmlStyleFamily nFamily) const
Definition: xmlstyle.cxx:630
virtual rtl::Reference< SvXMLImportPropertyMapper > GetImportPropertyMapper(XmlStyleFamily nFamily) const
Definition: xmlstyle.cxx:518
bool IsAutomaticStyle() const
Definition: xmlstyle.cxx:312
css::uno::Reference< css::style::XAutoStyleFamily > GetAutoStyles(XmlStyleFamily nFamily) const
Definition: xmlstyle.cxx:601
virtual void SetDefaults() override
Definition: prstylei.cxx:232
bool doNewDrawingLayerFillStyleDefinitionsExist(std::u16string_view rFillStyleTag) const
Definition: prstylei.cxx:545
virtual void FillPropertySet(const css::uno::Reference< css::beans::XPropertySet > &rPropSet)
Definition: prstylei.cxx:222
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
XMLPropStyleContext(XMLPropStyleContext const &)=delete
void translateNameBasedDrawingLayerFillStyleDefinitionsToStyleDisplayNames()
Definition: prstylei.cxx:617
void deactivateOldFillStyleDefinitions(const OldFillStyleDefinitionSet &rHashSetOfTags)
Definition: prstylei.cxx:591
static const OldFillStyleDefinitionSet & getHeaderSet()
Definition: prstylei.cxx:165
css::uno::Reference< css::style::XStyle > mxStyle
Definition: prstylei.hxx:44
rtl::Reference< SvXMLStylesContext > mxStyles
Definition: prstylei.hxx:45
static const OldFillStyleDefinitionSet & getStandardSet()
Definition: prstylei.cxx:160
static const OldFillStyleDefinitionSet & getFooterSet()
Definition: prstylei.cxx:170
::std::vector< XMLPropertyState > maProperties
Definition: prstylei.hxx:43
virtual void CreateAndInsert(bool bOverwrite) override
Definition: prstylei.cxx:257
virtual css::uno::Reference< css::style::XStyle > Create()
Definition: prstylei.cxx:236
virtual ~XMLPropStyleContext() override
Definition: prstylei.cxx:156
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
int nCount
float u
Reference< XSingleServiceFactory > xFactory
XmlStyleFamily
Definition: families.hxx:50
OUString aName
uno_Any a
#define SAL_WARN_IF(condition, area, stream)
#define SAL_WARN(area, stream)
enum SAL_DLLPUBLIC_RTTI FillStyle
Definition: xmlimppr.hxx:42
css::uno::Sequence< DstElementType > containerToSequence(const SrcType &i_Container)
int i
Handling of tokens in XML:
@ XML_TABLE_CELL_PROPERTIES
Definition: xmltoken.hxx:2633
@ XML_DRAWING_PAGE_PROPERTIES
Definition: xmltoken.hxx:2623
@ XML_SECTION_PROPERTIES
Definition: xmltoken.hxx:2629
@ XML_TABLE_COLUMN_PROPERTIES
Definition: xmltoken.hxx:2631
@ XML_PARAGRAPH_PROPERTIES
Definition: xmltoken.hxx:2627
@ XML_GRAPHIC_PROPERTIES
Definition: xmltoken.hxx:2622
@ XML_TABLE_ROW_PROPERTIES
Definition: xmltoken.hxx:2632
const PropertyStruct aPropNames[]
constexpr OUStringLiteral gsIsPhysical(u"IsPhysical")
constexpr OUStringLiteral gsFollowStyle(u"FollowStyle")
std::unordered_set< OUString > OldFillStyleDefinitionSet
Definition: prstylei.hxx:38
#define XMLERROR_PARENT_STYLE_NOT_ALLOWED
Definition: xmlerror.hxx:55
#define XMLERROR_FLAG_ERROR
Definition: xmlerror.hxx:36
#define XMLOFF_WARN_UNKNOWN_ELEMENT(area, token)
Definition: xmlictxt.hxx:120
#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_LO_EXT
constexpr sal_uInt16 XML_NAMESPACE_STYLE
#define XML_TYPE_PROP_RUBY
Definition: xmltypes.hxx:100
#define XML_TYPE_PROP_SECTION
Definition: xmltypes.hxx:101
#define XML_TYPE_PROP_GRAPHIC
Definition: xmltypes.hxx:94
#define XML_TYPE_PROP_CHART
Definition: xmltypes.hxx:107
#define XML_TYPE_PROP_TABLE_CELL
Definition: xmltypes.hxx:105
#define XML_TYPE_PROP_PARAGRAPH
Definition: xmltypes.hxx:99
#define XML_TYPE_PROP_TEXT
Definition: xmltypes.hxx:98
#define XML_TYPE_PROP_TABLE_COLUMN
Definition: xmltypes.hxx:103
#define XML_TYPE_PROP_TABLE
Definition: xmltypes.hxx:102
#define XML_TYPE_PROP_DRAWING_PAGE
Definition: xmltypes.hxx:95
#define XML_TYPE_PROP_TABLE_ROW
Definition: xmltypes.hxx:104