LibreOffice Module xmloff (master) 1
ximpstyl.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 "ximpstyl.hxx"
21#include <utility>
22#include <xmloff/maptype.hxx>
26#include <xmloff/xmlprmap.hxx>
27#include <xmloff/xmltoken.hxx>
28#include <xmloff/xmluconv.hxx>
29#include "ximpnote.hxx"
30#include <xmlsdtypes.hxx>
31#include <tools/debug.hxx>
32#include <sal/log.hxx>
34#include <com/sun/star/frame/XModel.hpp>
35#include <com/sun/star/style/XStyle.hpp>
36#include <com/sun/star/lang/XSingleServiceFactory.hpp>
37#include <com/sun/star/presentation/XPresentationPage.hpp>
38#include <com/sun/star/drawing/FillStyle.hpp>
39#include <com/sun/star/drawing/XDrawPages.hpp>
40#include <com/sun/star/container/XNamed.hpp>
41#include <com/sun/star/beans/XPropertySet.hpp>
42#include <com/sun/star/beans/XPropertyState.hpp>
43#include <com/sun/star/presentation/XHandoutMasterSupplier.hpp>
44#include <com/sun/star/util/Color.hpp>
46#include <xmloff/autolayout.hxx>
47#include <xmloff/xmlprcon.hxx>
48#include <xmloff/families.hxx>
49#include <com/sun/star/container/XNameContainer.hpp>
50#include <svl/numformat.hxx>
51#include <svl/zforlist.hxx>
52#include "layerimp.hxx"
56#include <xmloff/xmlerror.hxx>
61
62using namespace ::com::sun::star;
63using namespace ::com::sun::star::uno;
64using namespace ::com::sun::star::xml::sax;
65using namespace ::xmloff::token;
66
67namespace {
68
69class SdXMLDrawingPagePropertySetContext : public SvXMLPropertySetContext
70{
71public:
72
73 SdXMLDrawingPagePropertySetContext( SvXMLImport& rImport, sal_Int32 nElement,
74 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList,
75 ::std::vector< XMLPropertyState > &rProps,
77
79 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > createFastChildContext(
80 sal_Int32 nElement,
81 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList,
82 ::std::vector< XMLPropertyState > &rProperties,
83 const XMLPropertyState& rProp ) override;
84};
85
87class XMLThemeContext : public SvXMLImportContext
88{
89 uno::Reference<beans::XPropertySet> m_xMasterPage;
91
92public:
93 XMLThemeContext(SvXMLImport& rImport,
94 const uno::Reference<xml::sax::XFastAttributeList>& xAttrList,
95 uno::Reference<beans::XPropertySet> xMasterPage);
96 ~XMLThemeContext();
97
98 uno::Reference<xml::sax::XFastContextHandler> SAL_CALL createFastChildContext(
99 sal_Int32 nElement, const uno::Reference<xml::sax::XFastAttributeList>& xAttribs) override;
100};
101
103class XMLColorTableContext : public SvXMLImportContext
104{
106 std::vector<util::Color> m_aColorScheme;
107
108public:
109 XMLColorTableContext(SvXMLImport& rImport,
110 const uno::Reference<xml::sax::XFastAttributeList>& xAttrList,
112 ~XMLColorTableContext();
113
114 uno::Reference<xml::sax::XFastContextHandler> SAL_CALL createFastChildContext(
115 sal_Int32 nElement, const uno::Reference<xml::sax::XFastAttributeList>& xAttribs) override;
116};
117
119class XMLColorContext : public SvXMLImportContext
120{
121public:
122 XMLColorContext(SvXMLImport& rImport,
123 const uno::Reference<xml::sax::XFastAttributeList>& xAttrList,
124 std::vector<util::Color>& rColorScheme);
125};
126}
127
128SdXMLDrawingPagePropertySetContext::SdXMLDrawingPagePropertySetContext(
129 SvXMLImport& rImport, sal_Int32 nElement,
130 const uno::Reference< xml::sax::XFastAttributeList > & xAttrList,
131 ::std::vector< XMLPropertyState > &rProps,
133 SvXMLPropertySetContext( rImport, nElement, xAttrList,
134 XML_TYPE_PROP_DRAWING_PAGE, rProps, rMap )
135{
136}
137
138css::uno::Reference< css::xml::sax::XFastContextHandler > SdXMLDrawingPagePropertySetContext::createFastChildContext(
139 sal_Int32 nElement,
140 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList,
141 ::std::vector< XMLPropertyState > &rProperties,
142 const XMLPropertyState& rProp )
143{
144 switch( mxMapper->getPropertySetMapper()->GetEntryContextId( rProp.mnIndex ) )
145 {
147 {
148 for (auto &aIter : sax_fastparser::castToFastAttributeList(xAttrList))
149 {
150 if( aIter.getToken() == XML_ELEMENT(XLINK, XML_HREF) )
151 {
152 uno::Any aAny( GetImport().GetAbsoluteReference( aIter.toString() ) );
153 XMLPropertyState aPropState( rProp.mnIndex, aAny );
154 rProperties.push_back( aPropState );
155 }
156 else
157 XMLOFF_WARN_UNKNOWN("xmloff", aIter);
158 }
159 break;
160 }
161 }
162
164 xAttrList,
165 rProperties, rProp );
166}
167
168namespace {
169
170
171class SdXMLDrawingPageStyleContext : public XMLDrawingPageStyleContext
172{
173public:
174
175 SdXMLDrawingPageStyleContext(
176 SvXMLImport& rImport,
177 SvXMLStylesContext& rStyles);
178
179 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
180 sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override;
181
182 virtual void Finish( bool bOverwrite ) override;
183};
184
185const sal_uInt16 MAX_SPECIAL_DRAW_STYLES = 7;
186ContextID_Index_Pair const g_ContextIDs[MAX_SPECIAL_DRAW_STYLES+1] =
187{
188 { CTF_DASHNAME, -1, drawing::FillStyle::FillStyle_MAKE_FIXED_SIZE },
189 { CTF_LINESTARTNAME, -1, drawing::FillStyle::FillStyle_MAKE_FIXED_SIZE },
190 { CTF_LINEENDNAME, -1, drawing::FillStyle::FillStyle_MAKE_FIXED_SIZE },
191 { CTF_FILLGRADIENTNAME, -1, drawing::FillStyle::FillStyle_GRADIENT},
192 { CTF_FILLTRANSNAME, -1, drawing::FillStyle::FillStyle_MAKE_FIXED_SIZE },
193 { CTF_FILLHATCHNAME, -1, drawing::FillStyle::FillStyle_HATCH },
194 { CTF_FILLBITMAPNAME, -1, drawing::FillStyle::FillStyle_BITMAP },
195 { -1, -1, drawing::FillStyle::FillStyle_MAKE_FIXED_SIZE }
196};
197XmlStyleFamily const g_Families[MAX_SPECIAL_DRAW_STYLES] =
198{
206};
207
208}
209
211 SvXMLImport& rImport,
212 SvXMLStylesContext& rStyles,
213 ContextID_Index_Pair const pContextIDs[],
214 XmlStyleFamily const pFamilies[])
216 , m_pFamilies(pFamilies)
217{
218 size_t size(1); // for the -1 entry
219 for (ContextID_Index_Pair const* pTemp(pContextIDs); pTemp->nContextID != -1; ++size, ++pTemp);
221 std::memcpy(m_pContextIDs.get(), pContextIDs, size * sizeof(ContextID_Index_Pair));
222}
223
224SdXMLDrawingPageStyleContext::SdXMLDrawingPageStyleContext(
225 SvXMLImport& rImport,
226 SvXMLStylesContext& rStyles)
227 : XMLDrawingPageStyleContext(rImport, rStyles, g_ContextIDs, g_Families)
228{
229}
230
231css::uno::Reference< css::xml::sax::XFastContextHandler > SdXMLDrawingPageStyleContext::createFastChildContext(
232 sal_Int32 nElement,
233 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
234{
235 if( nElement == XML_ELEMENT(STYLE, XML_DRAWING_PAGE_PROPERTIES) )
236 {
238 GetStyles()->GetImportPropertyMapper( GetFamily() );
239 if( xImpPrMap.is() )
240 return new SdXMLDrawingPagePropertySetContext( GetImport(), nElement,
241 xAttrList,
242 GetProperties(),
243 xImpPrMap );
244 }
245
246 return XMLPropStyleContext::createFastChildContext( nElement, xAttrList );
247}
248
249void SdXMLDrawingPageStyleContext::Finish( bool bOverwrite )
250{
251 XMLPropStyleContext::Finish( bOverwrite );
252
253 ::std::vector< XMLPropertyState > &rProperties = GetProperties();
254
255 const rtl::Reference< XMLPropertySetMapper >& rImpPrMap = GetStyles()->GetImportPropertyMapper( GetFamily() )->getPropertySetMapper();
256
257 for(auto& property : rProperties)
258 {
259 if( property.mnIndex == -1 )
260 continue;
261
262 sal_Int16 nContextID = rImpPrMap->GetEntryContextId(property.mnIndex);
263 switch( nContextID )
264 {
266 {
267 OUString sStyleName;
268 property.maValue >>= sStyleName;
269
270 sal_Int32 nStyle = 0;
271
272 const SdXMLNumberFormatImportContext* pSdNumStyle =
273 dynamic_cast< const SdXMLNumberFormatImportContext*> (
274 GetStyles()->FindStyleChildContext( XmlStyleFamily::DATA_STYLE, sStyleName, true ) );
275
276 if( pSdNumStyle )
277 nStyle = pSdNumStyle->GetDrawKey();
278
279 property.maValue <<= nStyle;
280 }
281 break;
282 }
283 }
284
285}
286
287
288// #i35918#
290 const Reference< beans::XPropertySet > & rPropSet )
291{
294 SAL_WARN_IF( !xImpPrMap.is(), "xmloff", "There is the import prop mapper" );
295 if( xImpPrMap.is() )
296 xImpPrMap->FillPropertySet(GetProperties(), rPropSet, m_pContextIDs.get());
297
298 Reference< beans::XPropertySetInfo > xInfo;
299 for (size_t i=0; m_pContextIDs[i].nContextID != -1; ++i)
300 {
301 sal_Int32 nIndex = m_pContextIDs[i].nIndex;
302 if( nIndex != -1 )
303 {
304 struct XMLPropertyState& rState = GetProperties()[nIndex];
305 OUString sStyleName;
306 rState.maValue >>= sStyleName;
307
308 if (::xmloff::IsIgnoreFillStyleNamedItem(rPropSet, m_pContextIDs[i].nExpectedFillStyle))
309 {
310 SAL_INFO("xmloff.style", "XMLDrawingPageStyleContext: dropping fill named item: " << sStyleName);
311 break; // ignore it, it's not used
312 }
313
315 sStyleName );
316 // get property set mapper
318 xImpPrMap->getPropertySetMapper();
319
320 // set property
321 const OUString& rPropertyName =
322 rPropMapper->GetEntryAPIName(rState.mnIndex);
323 if( !xInfo.is() )
324 xInfo = rPropSet->getPropertySetInfo();
325 if ( xInfo->hasPropertyByName( rPropertyName ) )
326 {
327 rPropSet->setPropertyValue( rPropertyName, Any( sStyleName ) );
328 }
329 }
330 }
331}
332
333
335 SdXMLImport& rImport,
336 sal_Int32 /*nElement*/,
337 const uno::Reference< xml::sax::XFastAttributeList>& xAttrList)
339 mnBorderBottom( 0 ),
340 mnBorderLeft( 0 ),
341 mnBorderRight( 0 ),
342 mnBorderTop( 0 ),
343 mnWidth( 0 ),
344 mnHeight( 0 ),
345 meOrientation(GetSdImport().IsDraw() ? view::PaperOrientation_PORTRAIT : view::PaperOrientation_LANDSCAPE)
346{
347 // set family to something special at SvXMLStyleContext
348 // for differences in search-methods
349
350 for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList ))
351 {
352 switch(aIter.getToken())
353 {
354 case XML_ELEMENT(FO, XML_MARGIN_TOP):
355 case XML_ELEMENT(FO_COMPAT, XML_MARGIN_TOP):
356 {
358 mnBorderTop, aIter.toView());
359 break;
360 }
362 case XML_ELEMENT(FO_COMPAT, XML_MARGIN_BOTTOM):
363 {
365 mnBorderBottom, aIter.toView());
366 break;
367 }
369 case XML_ELEMENT(FO_COMPAT, XML_MARGIN_LEFT):
370 {
372 mnBorderLeft, aIter.toView());
373 break;
374 }
376 case XML_ELEMENT(FO_COMPAT, XML_MARGIN_RIGHT):
377 {
379 mnBorderRight, aIter.toView());
380 break;
381 }
382 case XML_ELEMENT(FO, XML_PAGE_WIDTH):
383 case XML_ELEMENT(FO_COMPAT, XML_PAGE_WIDTH):
384 {
386 mnWidth, aIter.toView());
387 break;
388 }
390 case XML_ELEMENT(FO_COMPAT, XML_PAGE_HEIGHT):
391 {
393 mnHeight, aIter.toView());
394 break;
395 }
397 {
398 if( IsXMLToken( aIter, XML_PORTRAIT ) )
399 meOrientation = view::PaperOrientation_PORTRAIT;
400 else
401 meOrientation = view::PaperOrientation_LANDSCAPE;
402 break;
403 }
404 default:
405 XMLOFF_WARN_UNKNOWN("xmloff", aIter);
406 }
407 }
408}
409
411{
412}
413
414
416 SdXMLImport& rImport,
417 sal_Int32 /*nElement*/,
418 const uno::Reference< xml::sax::XFastAttributeList>& /*xAttrList*/)
420{
421 // set family to something special at SvXMLStyleContext
422 // for differences in search-methods
423
424}
425
426css::uno::Reference< css::xml::sax::XFastContextHandler > SdXMLPageMasterContext::createFastChildContext(
427 sal_Int32 nElement,
428 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
429{
431 {
432 DBG_ASSERT(!mxPageMasterStyle.is(), "PageMasterStyle is set, there seem to be two of them (!)");
433 mxPageMasterStyle.set(new SdXMLPageMasterStyleContext(GetSdImport(), nElement, xAttrList));
434 return mxPageMasterStyle;
435 }
436 else
437 XMLOFF_WARN_UNKNOWN_ELEMENT("xmloff", nElement);
438
439 return nullptr;
440}
441
443 SdXMLImport& rImport,
444 sal_Int32 /*nElement*/,
445 const uno::Reference< xml::sax::XFastAttributeList >& /*xAttrList*/)
447 mnTypeId( AUTOLAYOUT_NONE )
448{
449 // set family to something special at SvXMLStyleContext
450 // for differences in search-methods
451}
452
453css::uno::Reference< css::xml::sax::XFastContextHandler > SdXMLPresentationPageLayoutContext::createFastChildContext(
454 sal_Int32 nElement,
455 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
456{
457 SvXMLImportContextRef xContext;
458
459 if(nElement == XML_ELEMENT(PRESENTATION, XML_PLACEHOLDER))
460 {
462 new SdXMLPresentationPlaceholderContext(GetSdImport(), nElement, xAttrList)};
463 // presentation:placeholder inside style:presentation-page-layout context
464 xContext = xLclContext.get();
465
466 // remember SdXMLPresentationPlaceholderContext for later evaluation
467 maList.push_back(xLclContext);
468 }
469 else
470 XMLOFF_WARN_UNKNOWN_ELEMENT("xmloff", nElement);
471
472 return xContext;
473}
474
476{
477 // build presentation page layout type here
478 // calc mnTpeId due to content of maList
479 // at the moment only use number of types used there
480 if( maList.empty() )
481 return;
482
484 if( pObj0->GetName() == "handout" )
485 {
486 switch( maList.size() )
487 {
488 case 1:
490 break;
491 case 2:
493 break;
494 case 3:
496 break;
497 case 4:
499 break;
500 case 9:
502 break;
503 default:
505 }
506 }
507 else
508 {
509 switch( maList.size() )
510 {
511 case 1:
512 {
513 if( pObj0->GetName() == "title" )
514 {
516 }
517 else
518 {
520 }
521 break;
522 }
523 case 2:
524 {
526
527 if( pObj1->GetName() == "subtitle" )
528 {
530 }
531 else if( pObj1->GetName() == "outline" )
532 {
534 }
535 else if( pObj1->GetName() == "chart" )
536 {
538 }
539 else if( pObj1->GetName() == "table" )
540 {
542 }
543 else if( pObj1->GetName() == "object" )
544 {
546 }
547 else if( pObj1->GetName() == "vertical_outline" )
548 {
549 if( pObj0->GetName() == "vertical_title" )
550 {
552 }
553 else
554 {
556 }
557 }
558 else
559 {
561 }
562 break;
563 }
564 case 3:
565 {
568
569 if( pObj1->GetName() == "outline" )
570 {
571 if( pObj2->GetName() == "outline" )
572 {
574 }
575 else if( pObj2->GetName() == "chart" )
576 {
578 }
579 else if( pObj2->GetName() == "graphic" )
580 {
582 }
583 else
584 {
585 if(pObj1->GetX() < pObj2->GetX())
586 {
587 mnTypeId = AUTOLAYOUT_TEXTOBJ; // outline left, object right
588 }
589 else
590 {
591 mnTypeId = AUTOLAYOUT_TEXTOVEROBJ; // outline top, object right
592 }
593 }
594 }
595 else if( pObj1->GetName() == "chart" )
596 {
598 }
599 else if( pObj1->GetName() == "graphic" )
600 {
601 if( pObj2->GetName() == "vertical_outline" )
602 {
604 }
605 else
606 {
608 }
609 }
610 else if( pObj1->GetName() == "vertical_outline" )
611 {
613 }
614 else
615 {
616 if(pObj1->GetX() < pObj2->GetX())
617 {
618 mnTypeId = AUTOLAYOUT_OBJTEXT; // left, right
619 }
620 else
621 {
623 }
624 }
625 break;
626 }
627 case 4:
628 {
631
632 if( pObj1->GetName() == "object" )
633 {
634 if(pObj1->GetX() < pObj2->GetX())
635 {
637 }
638 else
639 {
641 }
642 }
643 else
644 {
646 }
647 break;
648 }
649 case 5:
650 {
652
653 if( pObj1->GetName() == "object" )
654 {
656 }
657 else
658 {
660 }
661 break;
662
663 }
664 case 7:
665 {
666 mnTypeId = AUTOLAYOUT_TITLE_6CONTENT; // tdf#141978: Apply 6content layout
667 break;
668 }
669 default:
670 {
672 break;
673 }
674 }
675 }
676
677 // release remembered contexts, they are no longer needed
678 maList.clear();
679}
680
682 SdXMLImport& rImport,
683 sal_Int32 /*nElement*/,
684 const uno::Reference< xml::sax::XFastAttributeList>& xAttrList)
685: SvXMLImportContext( rImport ),
686 mnX(0)
687{
688 for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList ))
689 {
690 switch(aIter.getToken())
691 {
692 case XML_ELEMENT(PRESENTATION, XML_OBJECT):
693 {
694 msName = aIter.toString();
695 break;
696 }
697 case XML_ELEMENT(SVG, XML_X):
698 case XML_ELEMENT(SVG_COMPAT, XML_X):
699 {
701 mnX, aIter.toView());
702 break;
703 }
704 case XML_ELEMENT(SVG, XML_Y):
705 case XML_ELEMENT(SVG_COMPAT, XML_Y):
706 {
707 break;
708 }
710 case XML_ELEMENT(SVG_COMPAT, XML_WIDTH):
711 {
712 break;
713 }
715 case XML_ELEMENT(SVG_COMPAT, XML_HEIGHT):
716 {
717 break;
718 }
719 default:
720 XMLOFF_WARN_UNKNOWN("xmloff", aIter);
721 }
722 }
723}
724
726{
727}
728
729
731 SdXMLImport& rImport,
732 sal_Int32 nElement,
733 const uno::Reference< xml::sax::XFastAttributeList>& xAttrList,
734 uno::Reference< drawing::XShapes > const & rShapes)
735: SdXMLGenericPageContext( rImport, xAttrList, rShapes )
736{
737 const bool bHandoutMaster = (nElement & TOKEN_MASK) == XML_HANDOUT_MASTER;
738 OUString sStyleName, sPageMasterName;
739
740 for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList ))
741 {
742 const OUString sValue = aIter.toString();
743 switch(aIter.getToken())
744 {
746 {
747 msName = sValue;
748 break;
749 }
751 {
752 msDisplayName = sValue;
753 break;
754 }
756 {
757 sPageMasterName = sValue;
758 break;
759 }
761 {
762 sStyleName = sValue;
763 break;
764 }
766 {
767 maPageLayoutName = sValue;
768 break;
769 }
770 case XML_ELEMENT(PRESENTATION, XML_USE_HEADER_NAME):
771 {
772 maUseHeaderDeclName = sValue;
773 break;
774 }
775 case XML_ELEMENT(PRESENTATION, XML_USE_FOOTER_NAME):
776 {
777 maUseFooterDeclName = sValue;
778 break;
779 }
780 case XML_ELEMENT(PRESENTATION, XML_USE_DATE_TIME_NAME):
781 {
782 maUseDateTimeDeclName = sValue;
783 break;
784 }
785 default:
786 XMLOFF_WARN_UNKNOWN("xmloff", aIter);
787 }
788 }
789
790 if( msDisplayName.isEmpty() )
792 else if( msDisplayName != msName )
794
796
797 // set page name?
798 if(!bHandoutMaster && !msDisplayName.isEmpty() && GetLocalShapesContext().is())
799 {
800 uno::Reference < container::XNamed > xNamed(GetLocalShapesContext(), uno::UNO_QUERY);
801 if(xNamed.is())
802 xNamed->setName(msDisplayName);
803 }
804
805 // set page-master?
806 if(!sPageMasterName.isEmpty())
807 {
808 SetPageMaster( sPageMasterName );
809 }
810
811 SetStyle( sStyleName );
812
813 SetLayout();
814
816}
817
819{
820}
821
823{
824 // set styles on master-page
825 if(!msName.isEmpty() && GetSdImport().GetShapeImport()->GetStylesContext())
826 {
827 SvXMLImportContext* pContext = GetSdImport().GetShapeImport()->GetStylesContext();
828 if (SdXMLStylesContext* pSdContext = dynamic_cast<SdXMLStylesContext*>(pContext))
829 pSdContext->SetMasterPageStyles(*this);
830 }
831
834}
835
836css::uno::Reference< css::xml::sax::XFastContextHandler > SdXMLMasterPageContext::createFastChildContext(
837 sal_Int32 nElement,
838 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
839{
840 switch (nElement)
841 {
842 // some special objects inside style:masterpage context
844 {
845 if(GetSdImport().GetShapeImport()->GetStylesContext())
846 {
847 // style:style inside master-page context -> presentation style
849 GetSdImport(),
850 *GetSdImport().GetShapeImport()->GetStylesContext(),
852
853 // add this style to the outer StylesContext class for later processing
854 GetSdImport().GetShapeImport()->GetStylesContext()->AddStyle(*pNew);
855 return pNew;
856 }
857 break;
858 }
859 case XML_ELEMENT(PRESENTATION, XML_NOTES):
860 {
861 if( GetSdImport().IsImpress() )
862 {
863 // get notes page
864 uno::Reference< presentation::XPresentationPage > xPresPage(GetLocalShapesContext(), uno::UNO_QUERY);
865 if(xPresPage.is())
866 {
867 uno::Reference< drawing::XDrawPage > xNotesDrawPage = xPresPage->getNotesPage();
868 if(xNotesDrawPage.is())
869 {
870 // presentation:notes inside master-page context
871 return new SdXMLNotesContext( GetSdImport(), xAttrList, xNotesDrawPage);
872 }
873 }
874 }
875 break;
876 }
877 case XML_ELEMENT(LO_EXT, XML_THEME):
878 {
879 if (GetSdImport().IsImpress())
880 {
881 uno::Reference<beans::XPropertySet> xMasterPage(GetLocalShapesContext(),
882 uno::UNO_QUERY);
883 return new XMLThemeContext(GetSdImport(), xAttrList, xMasterPage);
884 }
885 break;
886 }
887 }
888 return SdXMLGenericPageContext::createFastChildContext(nElement, xAttrList);
889}
890
892 SdXMLImport& rImport,
893 bool bIsAutoStyle)
894: SvXMLStylesContext(rImport),
895 mbIsAutoStyle(bIsAutoStyle)
896{
897 Reference< uno::XComponentContext > xContext = rImport.GetComponentContext();
898 mpNumFormatter = std::make_unique<SvNumberFormatter>( xContext, LANGUAGE_SYSTEM );
899 mpNumFmtHelper = std::make_unique<SvXMLNumFmtHelper>( mpNumFormatter.get(), xContext );
900}
901
903 sal_Int32 nElement,
904 const uno::Reference< xml::sax::XFastAttributeList >& xAttrList)
905{
906 switch (nElement)
907 {
909 {
910 auto pContext = GetImport().GetShapeImport()->GetShapeTableImport()->CreateTableTemplateContext(nElement, xAttrList );
911 if (pContext)
912 return pContext;
913 break;
914 }
916 // style:page-master inside office:styles context
917 return new SdXMLPageMasterContext(GetSdImport(), nElement, xAttrList);
919 // style:presentation-page-layout inside office:styles context
920 return new SdXMLPresentationPageLayoutContext(GetSdImport(), nElement, xAttrList);
922 // number:date-style or number:time-style
923 return new SdXMLNumberFormatImportContext( GetSdImport(), nElement, mpNumFmtHelper->getData(), SvXMLStylesTokens::DATE_STYLE, xAttrList, *this );
925 // number:date-style or number:time-style
926 return new SdXMLNumberFormatImportContext( GetSdImport(), nElement, mpNumFmtHelper->getData(), SvXMLStylesTokens::TIME_STYLE, xAttrList, *this );
928 return new SvXMLNumFormatContext( GetSdImport(), nElement,
929 mpNumFmtHelper->getData(), SvXMLStylesTokens::NUMBER_STYLE, xAttrList, *this );
931 return new SvXMLNumFormatContext( GetSdImport(), nElement,
932 mpNumFmtHelper->getData(), SvXMLStylesTokens::CURRENCY_STYLE, xAttrList, *this );
934 return new SvXMLNumFormatContext( GetSdImport(), nElement,
935 mpNumFmtHelper->getData(), SvXMLStylesTokens::PERCENTAGE_STYLE, xAttrList, *this );
937 return new SvXMLNumFormatContext( GetSdImport(), nElement,
938 mpNumFmtHelper->getData(), SvXMLStylesTokens::BOOLEAN_STYLE, xAttrList, *this );
940 return new SvXMLNumFormatContext( GetSdImport(), nElement,
941 mpNumFmtHelper->getData(), SvXMLStylesTokens::TEXT_STYLE, xAttrList, *this );
942 case XML_ELEMENT(PRESENTATION, XML_HEADER_DECL):
943 case XML_ELEMENT(PRESENTATION, XML_FOOTER_DECL):
944 case XML_ELEMENT(PRESENTATION, XML_DATE_TIME_DECL):
945 return new SdXMLHeaderFooterDeclContext( GetImport(), xAttrList );
947 break; // ignore
948 default:
949 XMLOFF_WARN_UNKNOWN_ELEMENT("xmloff", nElement);
950 }
951
952 // call base class
953 return SvXMLStylesContext::CreateStyleChildContext(nElement, xAttrList);
954}
955
957 XmlStyleFamily nFamily,
958 sal_Int32 nElement,
959 const uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList)
960{
961 switch( nFamily )
962 {
964 return new SdXMLDrawingPageStyleContext(GetSdImport(), *this );
968 return new XMLShapeStyleContext( GetSdImport(), *this, nFamily );
969 default: break;
970 }
971
972 // call base class
973 return SvXMLStylesContext::CreateStyleStyleChildContext(nFamily, nElement, xAttrList);
974}
975
977 XmlStyleFamily nFamily,
978 sal_Int32 nElement,
979 const Reference< XFastAttributeList > & xAttrList )
980{
981 switch( nFamily )
982 {
984 return new XMLGraphicsDefaultStyle(GetSdImport(), *this );
985 default: break;
986 }
987
988 // call base class
989 return SvXMLStylesContext::CreateDefaultStyleStyleChildContext(nFamily, nElement, xAttrList);
990}
991
993 XmlStyleFamily nFamily) const
994{
996
997 switch( nFamily )
998 {
1000 {
1001 if(!xPresImpPropMapper.is())
1002 {
1003 rtl::Reference< XMLShapeImportHelper > aImpHelper = const_cast<SvXMLImport&>(GetImport()).GetShapeImport();
1004 const_cast<SdXMLStylesContext*>(this)->xPresImpPropMapper =
1005 aImpHelper->GetPresPagePropsMapper();
1006 }
1007 xMapper = xPresImpPropMapper;
1008 break;
1009 }
1010
1014 {
1015 const rtl::Reference< XMLTableImport >& xTableImport( const_cast< SvXMLImport& >( GetImport() ).GetShapeImport()->GetShapeTableImport() );
1016
1017 switch( nFamily )
1018 {
1019 case XmlStyleFamily::TABLE_COLUMN: xMapper = xTableImport->GetColumnImportPropertySetMapper().get(); break;
1020 case XmlStyleFamily::TABLE_ROW: xMapper = xTableImport->GetRowImportPropertySetMapper().get(); break;
1021 case XmlStyleFamily::TABLE_CELL: xMapper = xTableImport->GetCellImportPropertySetMapper().get(); break;
1022 default: break;
1023 }
1024 break;
1025 }
1026 default: break;
1027 }
1028
1029 // call base class
1030 if( !xMapper.is() )
1032 return xMapper;
1033}
1034
1035// Process all style and object info
1036
1038{
1039 if(mbIsAutoStyle)
1040 {
1041 // AutoStyles for text import
1042 GetImport().GetTextImport()->SetAutoStyles( this );
1043
1044 // AutoStyles for chart
1045 GetImport().GetChartImport()->SetAutoStylesContext( this );
1046
1047 // AutoStyles for forms
1048 GetImport().GetFormImport()->setAutoStyleContext( this );
1049
1050 // associate AutoStyles with styles in preparation to setting Styles on shapes
1051 for(sal_uInt32 a(0); a < GetStyleCount(); a++)
1052 {
1053 const SvXMLStyleContext* pStyle = GetStyle(a);
1054 if (const XMLShapeStyleContext* pDocStyle = dynamic_cast<const XMLShapeStyleContext*>(pStyle))
1055 {
1056 SvXMLStylesContext* pStylesContext = GetSdImport().GetShapeImport()->GetStylesContext();
1057 if (pStylesContext)
1058 {
1059 pStyle = pStylesContext->FindStyleChildContext(pStyle->GetFamily(), pStyle->GetParentName());
1060
1061 if (const XMLShapeStyleContext* pParentStyle = dynamic_cast<const XMLShapeStyleContext*>(pStyle))
1062 {
1063 if(pParentStyle->GetStyle().is())
1064 {
1065 const_cast<XMLShapeStyleContext*>(pDocStyle)->SetStyle(pParentStyle->GetStyle());
1066 }
1067 }
1068 }
1069 }
1070 }
1071
1072 FinishStyles( false );
1073 }
1074 else
1075 {
1076 // Process styles list
1079 GetImport().GetShapeImport()->GetShapeTableImport()->finishStyles();
1080
1081 // put style infos in the info set for other components ( content import f.e. )
1082 uno::Reference< beans::XPropertySet > xInfoSet( GetImport().getImportInfo() );
1083 if( xInfoSet.is() )
1084 {
1085 uno::Reference< beans::XPropertySetInfo > xInfoSetInfo( xInfoSet->getPropertySetInfo() );
1086
1087 if( xInfoSetInfo->hasPropertyByName("PageLayouts") )
1088 xInfoSet->setPropertyValue("PageLayouts", uno::Any( getPageLayouts() ) );
1089 }
1090
1091 }
1092}
1093
1094// set master-page styles (all with family="presentation" and a special
1095// prefix) on given master-page.
1096
1098{
1099 const uno::Reference<container::XNameAccess>& rStyleFamilies =
1101
1102 if (!rStyleFamilies.is())
1103 return;
1104
1105 if (!rStyleFamilies->hasByName(rMaster.GetDisplayName()))
1106 return;
1107
1108 try
1109 {
1110 uno::Reference< container::XNameAccess > xMasterPageStyles( rStyleFamilies->getByName(rMaster.GetDisplayName()), UNO_QUERY_THROW );
1111 OUString sPrefix(rMaster.GetDisplayName() + "-");
1113 }
1114 catch (const uno::Exception&)
1115 {
1116 TOOLS_WARN_EXCEPTION("xmloff.draw", "");
1117 }
1118}
1119
1120// Process styles list:
1121// set graphic styles (all with family="graphics"). Remember xStyle at list element.
1122
1124{
1125 if(GetSdImport().GetLocalDocStyleFamilies().is()) try
1126 {
1127 uno::Reference< container::XNameAccess > xGraphicPageStyles( GetSdImport().GetLocalDocStyleFamilies()->getByName("graphics"), uno::UNO_QUERY_THROW );
1128
1130 }
1131 catch( uno::Exception& )
1132 {
1133 TOOLS_WARN_EXCEPTION("xmloff.draw", "");
1134 }
1135}
1136
1138{
1139 if(GetSdImport().GetLocalDocStyleFamilies().is()) try
1140 {
1141 uno::Reference< container::XNameAccess > xGraphicPageStyles( GetSdImport().GetLocalDocStyleFamilies()->getByName("cell"), uno::UNO_QUERY_THROW );
1142
1143 ImpSetGraphicStyles(xGraphicPageStyles, XmlStyleFamily::TABLE_CELL, u"");
1144 }
1145 catch( uno::Exception& )
1146 {
1147 TOOLS_WARN_EXCEPTION("xmloff.draw", "");
1148 }
1149}
1150
1151//Resolves: fdo#34987 if the style's auto height before and after is the same
1152//then don't reset it back to the underlying default of true for the small
1153//period before it's going to be reset to false again. Doing this avoids the
1154//master page shapes from resizing themselves due to autoheight becoming
1155//enabled before having autoheight turned off again and getting stuck on that
1156//autosized height
1157static bool canSkipReset(std::u16string_view rName, const XMLPropStyleContext* pPropStyle,
1158 const uno::Reference< beans::XPropertySet > &rPropSet, const rtl::Reference < XMLPropertySetMapper >& rPrMap)
1159{
1160 bool bCanSkipReset = false;
1161 if (pPropStyle && rName == u"TextAutoGrowHeight")
1162 {
1163 bool bOldStyleTextAutoGrowHeight(false);
1164 rPropSet->getPropertyValue("TextAutoGrowHeight") >>= bOldStyleTextAutoGrowHeight;
1165
1166 sal_Int32 nIndexStyle = rPrMap->GetEntryIndex(XML_NAMESPACE_DRAW, u"auto-grow-height", 0);
1167 if (nIndexStyle != -1)
1168 {
1169 const ::std::vector< XMLPropertyState > &rProperties = pPropStyle->GetProperties();
1170 auto property = std::find_if(rProperties.cbegin(), rProperties.cend(),
1171 [nIndexStyle](const XMLPropertyState& rProp) { return rProp.mnIndex == nIndexStyle; });
1172 if (property != rProperties.cend())
1173 {
1174 bool bNewStyleTextAutoGrowHeight(false);
1175 property->maValue >>= bNewStyleTextAutoGrowHeight;
1176 bCanSkipReset = (bNewStyleTextAutoGrowHeight == bOldStyleTextAutoGrowHeight);
1177 }
1178 }
1179 }
1180 return bCanSkipReset;
1181}
1182
1183// help function used by ImpSetGraphicStyles() and ImpSetMasterPageStyles()
1184
1185void SdXMLStylesContext::ImpSetGraphicStyles( uno::Reference< container::XNameAccess > const & xPageStyles, XmlStyleFamily nFamily, std::u16string_view rPrefix) const
1186{
1187 sal_Int32 nPrefLen(rPrefix.size());
1188
1189 sal_uInt32 a;
1190
1191 // set defaults
1192 for( a = 0; a < GetStyleCount(); a++)
1193 {
1194 const SvXMLStyleContext* pStyle = GetStyle(a);
1195
1196 if(nFamily == pStyle->GetFamily() && pStyle->IsDefaultStyle())
1197 {
1198 const_cast<SvXMLStyleContext*>(pStyle)->SetDefaults();
1199 }
1200 }
1201
1202 // create all styles and set properties
1203 for( a = 0; a < GetStyleCount(); a++)
1204 {
1205 try
1206 {
1207 const SvXMLStyleContext* pStyle = GetStyle(a);
1208 if(nFamily == pStyle->GetFamily() && !pStyle->IsDefaultStyle())
1209 {
1210 OUString aStyleName(pStyle->GetDisplayName());
1211
1212 if( nPrefLen )
1213 {
1214 sal_Int32 nStylePrefLen = aStyleName.lastIndexOf( '-' ) + 1;
1215 if( (nPrefLen != nStylePrefLen) || !aStyleName.startsWith(rPrefix) )
1216 continue;
1217
1218 aStyleName = aStyleName.copy( nPrefLen );
1219 }
1220
1221 XMLPropStyleContext* pPropStyle = dynamic_cast< XMLPropStyleContext* >(const_cast< SvXMLStyleContext* >( pStyle ) );
1222
1223 uno::Reference< style::XStyle > xStyle;
1224 if(xPageStyles->hasByName(aStyleName))
1225 {
1226 xPageStyles->getByName(aStyleName) >>= xStyle;
1227
1228 // set properties of existing styles to default
1229 uno::Reference< beans::XPropertySet > xPropSet( xStyle, uno::UNO_QUERY );
1230 uno::Reference< beans::XPropertySetInfo > xPropSetInfo;
1231 if( xPropSet.is() )
1232 xPropSetInfo = xPropSet->getPropertySetInfo();
1233
1234 uno::Reference< beans::XPropertyState > xPropState( xStyle, uno::UNO_QUERY );
1235
1236 if( xPropState.is() )
1237 {
1240 SAL_WARN_IF( !xImpPrMap.is(), "xmloff", "There is the import prop mapper" );
1241 if( xImpPrMap.is() )
1242 xPrMap = xImpPrMap->getPropertySetMapper();
1243 if( xPrMap.is() )
1244 {
1245 const sal_Int32 nCount = xPrMap->GetEntryCount();
1246 for( sal_Int32 i = 0; i < nCount; i++ )
1247 {
1248 const OUString& rName = xPrMap->GetEntryAPIName( i );
1249 if( xPropSetInfo->hasPropertyByName( rName ) && beans::PropertyState_DIRECT_VALUE == xPropState->getPropertyState( rName ) )
1250 {
1251 bool bCanSkipReset = canSkipReset(rName, pPropStyle, xPropSet, xPrMap);
1252 if (bCanSkipReset)
1253 continue;
1254 xPropState->setPropertyToDefault( rName );
1255 }
1256 }
1257 }
1258 }
1259 }
1260 else
1261 {
1262 // graphics style does not exist, create and add it
1263 uno::Reference< lang::XSingleServiceFactory > xServiceFact(xPageStyles, uno::UNO_QUERY);
1264 if(xServiceFact.is())
1265 {
1266 uno::Reference< style::XStyle > xNewStyle( xServiceFact->createInstance(), uno::UNO_QUERY);
1267
1268 if(xNewStyle.is())
1269 {
1270 // remember style
1271 xStyle = xNewStyle;
1272
1273 // add new style to graphics style pool
1274 uno::Reference< container::XNameContainer > xInsertContainer(xPageStyles, uno::UNO_QUERY);
1275 if(xInsertContainer.is())
1276 xInsertContainer->insertByName(aStyleName, uno::Any( xStyle ) );
1277 }
1278 }
1279 }
1280
1281 if(xStyle.is())
1282 {
1283 // set properties at style
1284 uno::Reference< beans::XPropertySet > xPropSet(xStyle, uno::UNO_QUERY);
1285 if(xPropSet.is() && pPropStyle)
1286 {
1287 pPropStyle->FillPropertySet(xPropSet);
1288 pPropStyle->SetStyle(xStyle);
1289 }
1290 }
1291 }
1292 }
1293 catch(const Exception& e)
1294 {
1295 const_cast<SdXMLImport*>(&GetSdImport())->SetError( XMLERROR_FLAG_WARNING | XMLERROR_API, {}, e.Message, nullptr );
1296 }
1297 }
1298
1299 // now set parents for all styles (when necessary)
1300 for(a = 0; a < GetStyleCount(); a++)
1301 {
1302 const SvXMLStyleContext* pStyle = GetStyle(a);
1303
1304 if(pStyle && !pStyle->GetDisplayName().isEmpty() && (nFamily == pStyle->GetFamily())) try
1305 {
1306 OUString aStyleName(pStyle->GetDisplayName());
1307 if( nPrefLen )
1308 {
1309 sal_Int32 nStylePrefLen = aStyleName.lastIndexOf( '-' ) + 1;
1310 if( (nPrefLen != nStylePrefLen) || !aStyleName.startsWith( rPrefix ) )
1311 continue;
1312
1313 aStyleName = aStyleName.copy( nPrefLen );
1314 }
1315
1316 uno::Reference< style::XStyle > xStyle( xPageStyles->getByName(aStyleName), UNO_QUERY );
1317 if(xStyle.is())
1318 {
1319 // set parent style name
1320 OUString sParentStyleDisplayName( GetImport().GetStyleDisplayName( pStyle->GetFamily(), pStyle->GetParentName() ) );
1321 if( nPrefLen )
1322 {
1323 sal_Int32 nStylePrefLen = sParentStyleDisplayName.lastIndexOf( '-' ) + 1;
1324 if( (nPrefLen != nStylePrefLen) || !sParentStyleDisplayName.startsWith( rPrefix ) )
1325 continue;
1326
1327 sParentStyleDisplayName = sParentStyleDisplayName.copy( nPrefLen );
1328 }
1329 xStyle->setParentStyle( sParentStyleDisplayName );
1330 }
1331 }
1332 catch( const Exception& e )
1333 {
1334 const_cast<SdXMLImport*>(&GetSdImport())->SetError( XMLERROR_FLAG_WARNING | XMLERROR_API, {}, e.Message, nullptr );
1335 }
1336 }
1337}
1338
1339// helper function to create the uno component that hold the mappings from
1340// xml auto layout name to internal autolayout id
1341
1342uno::Reference< container::XNameAccess > SdXMLStylesContext::getPageLayouts() const
1343{
1344 uno::Reference< container::XNameContainer > xLayouts( comphelper::NameContainer_createInstance( ::cppu::UnoType<sal_Int32>::get()) );
1345
1346 for(sal_uInt32 a(0); a < GetStyleCount(); a++)
1347 {
1348 const SvXMLStyleContext* pStyle = GetStyle(a);
1349 if (const SdXMLPresentationPageLayoutContext* pContext = dynamic_cast<const SdXMLPresentationPageLayoutContext*>(pStyle))
1350 {
1351 xLayouts->insertByName(pStyle->GetName(), uno::Any(static_cast<sal_Int32>(pContext->GetTypeId())));
1352 }
1353 }
1354
1355 return xLayouts;
1356}
1357
1358
1360 SdXMLImport& rImport)
1361: SvXMLImportContext( rImport )
1362{
1363}
1364
1365css::uno::Reference< css::xml::sax::XFastContextHandler > SdXMLMasterStylesContext::createFastChildContext(
1366 sal_Int32 nElement,
1367 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
1368{
1369 if( nElement == XML_ELEMENT(DRAW, XML_LAYER_SET) )
1370 {
1371 return new SdXMLLayerSetContext( GetImport() );
1372 }
1373 else if( nElement == XML_ELEMENT(STYLE, XML_MASTER_PAGE) )
1374 {
1375 // style:masterpage inside office:styles context
1376 uno::Reference< drawing::XDrawPage > xNewMasterPage;
1377 uno::Reference< drawing::XDrawPages > xMasterPages(GetSdImport().GetLocalMasterPages(), uno::UNO_QUERY);
1378
1379 if( xMasterPages.is() )
1380 {
1381 sal_Int32 nNewMasterPageCount = GetSdImport().GetNewMasterPageCount();
1382 sal_Int32 nMasterPageCount = xMasterPages->getCount();
1383 if (nNewMasterPageCount + 1 > nMasterPageCount)
1384 {
1385 // arbitrary limit to master pages when fuzzing to avoid deadend timeouts
1386 if (nMasterPageCount >= 64 && utl::ConfigManager::IsFuzzing())
1387 return nullptr;
1388
1389 // new page, create and insert
1390 xNewMasterPage = xMasterPages->insertNewByIndex(nMasterPageCount);
1391 }
1392 else
1393 {
1394 // existing page, use it
1395 xMasterPages->getByIndex(nNewMasterPageCount) >>= xNewMasterPage;
1396 }
1397
1398 // increment global import page counter
1400
1401 if(xNewMasterPage.is())
1402 {
1403 if(GetSdImport().GetShapeImport()->GetStylesContext())
1404 {
1407 nElement, xAttrList, xNewMasterPage)};
1408 maMasterPageList.push_back(xLclContext);
1409 return xLclContext;
1410 }
1411 }
1412 }
1413 }
1414 else if( nElement == XML_ELEMENT(STYLE, XML_HANDOUT_MASTER) )
1415 {
1416 uno::Reference< presentation::XHandoutMasterSupplier > xHandoutSupp( GetSdImport().GetModel(), uno::UNO_QUERY );
1417 if( xHandoutSupp.is() )
1418 {
1419 uno::Reference< drawing::XShapes > xHandoutPage = xHandoutSupp->getHandoutMasterPage();
1420 if(xHandoutPage.is() && GetSdImport().GetShapeImport()->GetStylesContext())
1421 {
1423 nElement, xAttrList, xHandoutPage);
1424 }
1425 }
1426 }
1427 else
1428 XMLOFF_WARN_UNKNOWN_ELEMENT("xmloff", nElement);
1429 return nullptr;
1430}
1431
1433 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList)
1434 : SvXMLStyleContext( rImport )
1435 , mbFixed(false)
1436{
1437 for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList ))
1438 {
1439 if( aIter.getToken() == XML_ELEMENT(PRESENTATION, XML_NAME) )
1440 {
1441 maStrName = aIter.toString();
1442 }
1443 else if( aIter.getToken() == XML_ELEMENT(PRESENTATION, XML_SOURCE) )
1444 {
1445 mbFixed = IsXMLToken( aIter, XML_FIXED );
1446 }
1447 else if( aIter.getToken() == XML_ELEMENT(STYLE, XML_DATA_STYLE_NAME) )
1448 {
1449 maStrDateTimeFormat = aIter.toString();
1450 }
1451 else
1452 {
1453 XMLOFF_WARN_UNKNOWN("xmloff", aIter);
1454 }
1455 }
1456}
1457
1459{
1460 return true;
1461}
1462
1464{
1465 SdXMLImport& rImport = dynamic_cast<SdXMLImport&>(GetImport());
1466 auto nElement = nToken & TOKEN_MASK;
1467 if( nElement == XML_HEADER_DECL )
1468 {
1469 rImport.AddHeaderDecl( maStrName, maStrText );
1470 }
1471 else if( nElement == XML_FOOTER_DECL )
1472 {
1473 rImport.AddFooterDecl( maStrName, maStrText );
1474 }
1475 else if( nElement == XML_DATE_TIME_DECL )
1476 {
1478 }
1479 else
1480 {
1482 }
1483}
1484
1485void SdXMLHeaderFooterDeclContext::characters( const OUString& rChars )
1486{
1487 maStrText += rChars;
1488}
1489
1490XMLThemeContext::XMLThemeContext(SvXMLImport& rImport,
1491 const uno::Reference<xml::sax::XFastAttributeList>& xAttrList,
1492 uno::Reference<beans::XPropertySet> xMasterPage)
1493 : SvXMLImportContext(rImport)
1494 , m_xMasterPage(std::move(xMasterPage))
1495{
1496 for (const auto& rAttribute : sax_fastparser::castToFastAttributeList(xAttrList))
1497 {
1498 switch (rAttribute.getToken())
1499 {
1500 case XML_ELEMENT(LO_EXT, XML_NAME):
1501 {
1502 m_aTheme["Name"] <<= rAttribute.toString();
1503 break;
1504 }
1505 }
1506 }
1507}
1508
1509XMLThemeContext::~XMLThemeContext()
1510{
1511 uno::Any aTheme(m_aTheme.getAsConstPropertyValueList());
1512 m_xMasterPage->setPropertyValue("Theme", aTheme);
1513}
1514
1515uno::Reference<xml::sax::XFastContextHandler> SAL_CALL XMLThemeContext::createFastChildContext(
1516 sal_Int32 nElement, const uno::Reference<xml::sax::XFastAttributeList>& xAttribs)
1517{
1518 if (nElement == XML_ELEMENT(LO_EXT, XML_COLOR_TABLE))
1519 {
1520 return new XMLColorTableContext(GetImport(), xAttribs, m_aTheme);
1521 }
1522
1523 return nullptr;
1524}
1525
1526XMLColorTableContext::XMLColorTableContext(
1527 SvXMLImport& rImport, const uno::Reference<xml::sax::XFastAttributeList>& xAttrList,
1529 : SvXMLImportContext(rImport)
1530 , m_rTheme(rTheme)
1531{
1532 for (const auto& rAttribute : sax_fastparser::castToFastAttributeList(xAttrList))
1533 {
1534 switch (rAttribute.getToken())
1535 {
1536 case XML_ELEMENT(LO_EXT, XML_NAME):
1537 {
1538 m_rTheme["ColorSchemeName"] <<= rAttribute.toString();
1539 break;
1540 }
1541 }
1542 }
1543}
1544
1545XMLColorTableContext::~XMLColorTableContext()
1546{
1547 m_rTheme["ColorScheme"] <<= comphelper::containerToSequence(m_aColorScheme);
1548}
1549
1550uno::Reference<xml::sax::XFastContextHandler> SAL_CALL XMLColorTableContext::createFastChildContext(
1551 sal_Int32 nElement, const uno::Reference<xml::sax::XFastAttributeList>& xAttribs)
1552{
1553 if (nElement == XML_ELEMENT(LO_EXT, XML_COLOR))
1554 {
1555 return new XMLColorContext(GetImport(), xAttribs, m_aColorScheme);
1556 }
1557
1558 return nullptr;
1559}
1560
1561XMLColorContext::XMLColorContext(SvXMLImport& rImport,
1562 const uno::Reference<xml::sax::XFastAttributeList>& xAttrList,
1563 std::vector<util::Color>& rColorScheme)
1564 : SvXMLImportContext(rImport)
1565{
1566 for (const auto& rAttribute : sax_fastparser::castToFastAttributeList(xAttrList))
1567 {
1568 switch (rAttribute.getToken())
1569 {
1570 case XML_ELEMENT(LO_EXT, XML_COLOR):
1571 {
1572 util::Color nColor;
1573 sax::Converter::convertColor(nColor, rAttribute.toView());
1574 rColorScheme.push_back(nColor);
1575 break;
1576 }
1577 }
1578 }
1579}
1580
1581namespace xmloff {
1582
1584 css::uno::Reference<css::beans::XPropertySet> const& xProps,
1585 drawing::FillStyle const nExpectedFillStyle)
1586{
1587 assert(xProps.is());
1588 if (nExpectedFillStyle == drawing::FillStyle::FillStyle_MAKE_FIXED_SIZE)
1589 {
1590 return false;
1591 }
1592
1593 // note: the caller must have called FillPropertySet() previously
1594 drawing::FillStyle fillStyle{drawing::FillStyle_NONE};
1595 xProps->getPropertyValue("FillStyle") >>= fillStyle;
1596 return fillStyle != nExpectedFillStyle;
1597}
1598
1599} // namespace xmloff
1600
1601/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
@ AUTOLAYOUT_CLIPTEXT
Definition: autolayout.hxx:36
@ AUTOLAYOUT_TITLE_2CONTENT_OVER_CONTENT
Title, 2 Content over Content.
Definition: autolayout.hxx:43
@ AUTOLAYOUT_4CLIPART
Definition: autolayout.hxx:60
@ AUTOLAYOUT_TITLE
Title Slide.
Definition: autolayout.hxx:27
@ AUTOLAYOUT_TEXTOBJ
Definition: autolayout.hxx:37
@ AUTOLAYOUT_HANDOUT1
Definition: autolayout.hxx:49
@ AUTOLAYOUT_TITLE_CONTENT_OVER_CONTENT
Title, Content over Content.
Definition: autolayout.hxx:41
@ AUTOLAYOUT_TITLE_2VTEXT
Title, 2 Vertical Content.
Definition: autolayout.hxx:57
@ AUTOLAYOUT_VTITLE_VCONTENT_OVER_VCONTENT
Vertical Title, Vertical Content over Vertical Content.
Definition: autolayout.hxx:54
@ AUTOLAYOUT_VTITLE_VCONTENT
Vertical Title, Vertical Content over Vertical Content.
Definition: autolayout.hxx:55
@ AUTOLAYOUT_TITLE_ONLY
Title Only.
Definition: autolayout.hxx:46
@ AUTOLAYOUT_TITLE_2CONTENT
Title and 2 Content.
Definition: autolayout.hxx:30
@ AUTOLAYOUT_ONLY_TEXT
Centered Text.
Definition: autolayout.hxx:59
@ AUTOLAYOUT_TITLE_6CONTENT
Title, 6 Content.
Definition: autolayout.hxx:61
@ AUTOLAYOUT_TAB
Definition: autolayout.hxx:35
@ AUTOLAYOUT_HANDOUT9
Definition: autolayout.hxx:58
@ AUTOLAYOUT_TITLE_2CONTENT_CONTENT
Title, 2 Content and Content.
Definition: autolayout.hxx:42
@ AUTOLAYOUT_TEXTCHART
Definition: autolayout.hxx:31
@ AUTOLAYOUT_HANDOUT2
Definition: autolayout.hxx:50
@ AUTOLAYOUT_TITLE_CONTENT_2CONTENT
Title, Content and 2 Content.
Definition: autolayout.hxx:39
@ AUTOLAYOUT_OBJ
Definition: autolayout.hxx:38
@ AUTOLAYOUT_HANDOUT4
Definition: autolayout.hxx:52
@ AUTOLAYOUT_OBJTEXT
Definition: autolayout.hxx:40
@ AUTOLAYOUT_NONE
Blank Slide.
Definition: autolayout.hxx:47
@ AUTOLAYOUT_CHARTTEXT
Definition: autolayout.hxx:34
@ AUTOLAYOUT_CHART
Definition: autolayout.hxx:29
@ AUTOLAYOUT_HANDOUT6
Definition: autolayout.hxx:53
@ AUTOLAYOUT_TEXTOVEROBJ
Definition: autolayout.hxx:44
@ AUTOLAYOUT_NOTES
Definition: autolayout.hxx:48
@ AUTOLAYOUT_TITLE_CONTENT
Title, Content.
Definition: autolayout.hxx:28
@ AUTOLAYOUT_HANDOUT3
Definition: autolayout.hxx:51
@ AUTOLAYOUT_TITLE_VCONTENT
Title, Vertical Content.
Definition: autolayout.hxx:56
@ AUTOLAYOUT_TEXTCLIP
Definition: autolayout.hxx:33
@ AUTOLAYOUT_TITLE_4CONTENT
Title, 4 Content.
Definition: autolayout.hxx:45
OUString maUseHeaderDeclName
Definition: ximppage.hxx:37
const SdXMLImport & GetSdImport() const
Definition: ximppage.hxx:51
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
endFastElement is called before a context will be destructed, but after an elements context has been ...
Definition: ximppage.cxx:273
void SetLayout()
sets the presentation layout at this page.
Definition: ximppage.cxx:406
OUString maUseDateTimeDeclName
Definition: ximppage.hxx:39
void DeleteAllShapes()
deletes all shapes on this drawing page
Definition: ximppage.cxx:450
OUString maUseFooterDeclName
Definition: ximppage.hxx:38
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: ximppage.cxx:244
void SetPageMaster(OUString const &rsPageMasterName)
sets the properties from a page master style with the given name on this contexts page
Definition: ximppage.cxx:468
const css::uno::Reference< css::drawing::XShapes > & GetLocalShapesContext() const
Definition: ximppage.hxx:71
void SetStyle(OUString const &rStyleName)
sets the page style on this page
Definition: ximppage.cxx:349
virtual bool IsTransient() const override
if this method returns true, its parent styles context should not add it to its container.
Definition: ximpstyl.cxx:1458
virtual void SAL_CALL endFastElement(sal_Int32) override
endFastElement is called before a context will be destructed, but after an elements context has been ...
Definition: ximpstyl.cxx:1463
virtual void SAL_CALL characters(const OUString &rChars) override
This method is called for all characters that are contained in the current element.
Definition: ximpstyl.cxx:1485
SdXMLHeaderFooterDeclContext(SvXMLImport &rImport, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
Definition: ximpstyl.cxx:1432
void AddFooterDecl(const OUString &rName, const OUString &rText)
Definition: sdxmlimp.cxx:601
void IncrementNewMasterPageCount()
void AddHeaderDecl(const OUString &rName, const OUString &rText)
Definition: sdxmlimp.cxx:595
void AddDateTimeDecl(const OUString &rName, const OUString &rText, bool bFixed, const OUString &rDateTimeFormat)
Definition: sdxmlimp.cxx:607
sal_Int32 GetNewMasterPageCount() const
const css::uno::Reference< css::container::XNameAccess > & GetLocalDocStyleFamilies() const
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
endFastElement is called before a context will be destructed, but after an elements context has been ...
Definition: ximpstyl.cxx:822
virtual ~SdXMLMasterPageContext() override
Definition: ximpstyl.cxx:818
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: ximpstyl.cxx:836
SdXMLMasterPageContext(SdXMLImport &rImport, sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList, css::uno::Reference< css::drawing::XShapes > const &rShapes)
Definition: ximpstyl.cxx:730
const OUString & GetDisplayName() const
Definition: ximpstyl.hxx:112
const SdXMLImport & GetSdImport() const
Definition: ximpstyl.hxx:217
SdXMLMasterStylesContext(SdXMLImport &rImport)
Definition: ximpstyl.cxx:1359
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: ximpstyl.cxx:1365
std::vector< rtl::Reference< SdXMLMasterPageContext > > maMasterPageList
Definition: ximpstyl.hxx:215
SdXMLPageMasterContext(SdXMLImport &rImport, sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
Definition: ximpstyl.cxx:415
rtl::Reference< SdXMLPageMasterStyleContext > mxPageMasterStyle
Definition: ximpstyl.hxx:72
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: ximpstyl.cxx:426
const SdXMLImport & GetSdImport() const
Definition: ximpstyl.hxx:74
const SdXMLImport & GetSdImport() const
Definition: ximpstyl.hxx:48
virtual ~SdXMLPageMasterStyleContext() override
Definition: ximpstyl.cxx:410
css::view::PaperOrientation meOrientation
Definition: ximpstyl.hxx:46
SdXMLPageMasterStyleContext(SdXMLImport &rImport, sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
Definition: ximpstyl.cxx:334
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
endFastElement is called before a context will be destructed, but after an elements context has been ...
Definition: ximpstyl.cxx:475
SdXMLPresentationPageLayoutContext(SdXMLImport &rImport, sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
Definition: ximpstyl.cxx:442
std::vector< rtl::Reference< SdXMLPresentationPlaceholderContext > > maList
Definition: ximpstyl.hxx:142
const SdXMLImport & GetSdImport() const
Definition: ximpstyl.hxx:145
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: ximpstyl.cxx:453
SdXMLPresentationPlaceholderContext(SdXMLImport &rImport, sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
Definition: ximpstyl.cxx:681
const OUString & GetName() const
Definition: ximpstyl.hxx:133
virtual ~SdXMLPresentationPlaceholderContext() override
Definition: ximpstyl.cxx:725
const SdXMLImport & GetSdImport() const
Definition: ximpstyl.hxx:123
std::unique_ptr< SvXMLNumFmtHelper > mpNumFmtHelper
Definition: ximpstyl.hxx:169
void ImpSetCellStyles() const
Definition: ximpstyl.cxx:1137
const SdXMLImport & GetSdImport() const
Definition: ximpstyl.hxx:172
virtual SvXMLStyleContext * CreateStyleStyleChildContext(XmlStyleFamily nFamily, sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
Definition: ximpstyl.cxx:956
void SetMasterPageStyles(SdXMLMasterPageContext const &rMaster) const
Definition: ximpstyl.cxx:1097
void ImpSetGraphicStyles() const
Definition: ximpstyl.cxx:1123
virtual SvXMLStyleContext * CreateDefaultStyleStyleChildContext(XmlStyleFamily nFamily, sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
Definition: ximpstyl.cxx:976
virtual rtl::Reference< SvXMLImportPropertyMapper > GetImportPropertyMapper(XmlStyleFamily nFamily) const override
Definition: ximpstyl.cxx:992
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
endFastElement is called before a context will be destructed, but after an elements context has been ...
Definition: ximpstyl.cxx:1037
virtual SvXMLStyleContext * CreateStyleChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
Definition: ximpstyl.cxx:902
rtl::Reference< SvXMLImportPropertyMapper > xPresImpPropMapper
Definition: ximpstyl.hxx:167
SdXMLStylesContext(SdXMLImport &rImport, bool bIsAutoStyle)
Definition: ximpstyl.cxx:891
css::uno::Reference< css::container::XNameAccess > getPageLayouts() const
Definition: ximpstyl.cxx:1342
std::unique_ptr< SvNumberFormatter > mpNumFormatter
Definition: ximpstyl.hxx:170
This class deliberately does not support XWeak, to improve performance when loading large documents.
Definition: xmlictxt.hxx:48
SvXMLImport & GetImport()
Definition: xmlictxt.hxx:60
virtual css::uno::Reference< XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs) override
Definition: xmlictxt.cxx:59
rtl::Reference< SchXMLImportHelper > const & GetChartImport()
Definition: xmlimp.hxx:618
rtl::Reference< ::xmloff::OFormLayerXMLImport > const & GetFormImport()
Definition: xmlimp.hxx:626
css::uno::Reference< css::uno::XComponentContext > const & GetComponentContext() const
Definition: xmlimp.cxx:1796
rtl::Reference< XMLShapeImportHelper > const & GetShapeImport()
Definition: xmlimp.hxx:610
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
const SvXMLUnitConverter & GetMM100UnitConverter() const
Definition: xmlimp.hxx:401
rtl::Reference< XMLTextImportHelper > const & GetTextImport()
Definition: xmlimp.hxx:602
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: xmlprcon.cxx:56
const OUString & GetName() const
Definition: xmlstyle.hxx:78
XmlStyleFamily GetFamily() const
Definition: xmlstyle.hxx:85
const OUString & GetParentName() const
Definition: xmlstyle.hxx:81
bool IsDefaultStyle() const
Definition: xmlstyle.hxx:110
const OUString & GetDisplayName() const
Definition: xmlstyle.hxx:79
sal_uInt32 GetStyleCount() const
Definition: xmlstyle.cxx:297
const SvXMLStyleContext * FindStyleChildContext(XmlStyleFamily nFamily, const OUString &rName, bool bCreateIndex=false) const
Definition: xmlstyle.cxx:799
virtual SvXMLStyleContext * CreateDefaultStyleStyleChildContext(XmlStyleFamily nFamily, sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
Definition: xmlstyle.cxx:449
SvXMLStyleContext * GetStyle(sal_uInt32 i)
Definition: xmlstyle.cxx:302
virtual rtl::Reference< SvXMLImportPropertyMapper > GetImportPropertyMapper(XmlStyleFamily nFamily) const
Definition: xmlstyle.cxx:518
virtual SvXMLStyleContext * CreateStyleChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
Definition: xmlstyle.cxx:317
virtual SvXMLStyleContext * CreateStyleStyleChildContext(XmlStyleFamily nFamily, sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
Definition: xmlstyle.cxx:415
void FinishStyles(bool bOverwrite)
Definition: xmlstyle.cxx:785
bool convertMeasureToCore(sal_Int32 &rValue, std::u16string_view rString, sal_Int32 nMin=SAL_MIN_INT32, sal_Int32 nMax=SAL_MAX_INT32) const
convert string to measure with meCoreMeasureUnit, using optional min and max values
Definition: xmluconv.cxx:187
XMLDrawingPageStyleContext(SvXMLImport &rImport, SvXMLStylesContext &rStyles, ContextID_Index_Pair const pContextIDs[], XmlStyleFamily const pFamilies[])
Definition: ximpstyl.cxx:210
virtual void FillPropertySet(css::uno::Reference< css::beans::XPropertySet > const &rPropSet) override
Definition: ximpstyl.cxx:289
std::unique_ptr< ContextID_Index_Pair[]> m_pContextIDs
XmlStyleFamily const *const m_pFamilies
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
::std::vector< XMLPropertyState > & GetProperties()
Definition: prstylei.hxx:79
void SetStyle(const css::uno::Reference< css::style::XStyle > &xStl)
Definition: prstylei.hxx:107
SvXMLStylesContext * GetStyles()
Definition: prstylei.hxx:78
virtual void Finish(bool bOverwrite) override
Definition: prstylei.cxx:448
static bool convertColor(sal_Int32 &rColor, std::u16string_view rValue)
static bool IsFuzzing()
int nCount
#define DBG_ASSERT(sCon, aError)
#define TOOLS_WARN_EXCEPTION(area, stream)
float u
XmlStyleFamily
Definition: families.hxx:50
@ SD_PAGEMASTERSTYLECONTEXT_ID
@ SD_PRESENTATIONPAGELAYOUT_ID
DRAW
OUString sPrefix
sal_Int32 nIndex
uno_Any a
#define LANGUAGE_SYSTEM
#define SAL_WARN_IF(condition, area, stream)
#define SAL_INFO(area, stream)
size
enum SAL_DLLPUBLIC_RTTI FillStyle
Definition: xmlimppr.hxx:42
css::uno::Sequence< DstElementType > containerToSequence(const SrcType &i_Container)
COMPHELPER_DLLPUBLIC css::uno::Reference< css::container::XNameContainer > NameContainer_createInstance(const css::uno::Type &aType)
int i
FastAttributeList & castToFastAttributeList(const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
Handling of tokens in XML:
@ XML_PRESENTATION_PAGE_LAYOUT
Definition: xmltoken.hxx:1547
@ XML_DRAWING_PAGE_PROPERTIES
Definition: xmltoken.hxx:2623
@ XML_PRESENTATION_PAGE_LAYOUT_NAME
Definition: xmltoken.hxx:1548
@ XML_USE_DATE_TIME_NAME
Definition: xmltoken.hxx:2453
@ XML_PAGE_LAYOUT_PROPERTIES
Definition: xmltoken.hxx:2624
bool IsXMLToken(std::u16string_view rString, enum XMLTokenEnum eToken)
compare eToken to the string
Definition: xmltoken.cxx:3581
bool IsIgnoreFillStyleNamedItem(css::uno::Reference< css::beans::XPropertySet > const &xProps, drawing::FillStyle const nExpectedFillStyle)
Definition: ximpstyl.cxx:1583
DefTokenId nToken
double mnWidth
double mnHeight
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:141
css::uno::Any maValue
Definition: maptype.hxx:143
sal_Int32 mnIndex
Definition: maptype.hxx:142
NUMBER
static bool canSkipReset(std::u16string_view rName, const XMLPropStyleContext *pPropStyle, const uno::Reference< beans::XPropertySet > &rPropSet, const rtl::Reference< XMLPropertySetMapper > &rPrMap)
Definition: ximpstyl.cxx:1157
TABLE
#define XMLERROR_API
Definition: xmlerror.hxx:71
#define XMLERROR_FLAG_WARNING
Definition: xmlerror.hxx:35
#define XMLOFF_WARN_UNKNOWN_ELEMENT(area, token)
Definition: xmlictxt.hxx:120
#define XMLOFF_WARN_UNKNOWN(area, rIter)
Definition: xmlictxt.hxx:114
#define XML_ELEMENT(prefix, name)
Definition: xmlimp.hxx:98
constexpr sal_Int32 TOKEN_MASK
Definition: xmlimp.hxx:95
constexpr sal_uInt16 XML_NAMESPACE_DRAW
#define CTF_PAGE_SOUND_URL
Definition: xmlsdtypes.hxx:128
#define CTF_DASHNAME
Definition: xmlsdtypes.hxx:135
#define CTF_FILLBITMAPNAME
Definition: xmlsdtypes.hxx:140
#define CTF_FILLGRADIENTNAME
Definition: xmlsdtypes.hxx:138
#define CTF_LINEENDNAME
Definition: xmlsdtypes.hxx:137
#define CTF_LINESTARTNAME
Definition: xmlsdtypes.hxx:136
#define CTF_DATE_TIME_FORMAT
Definition: xmlsdtypes.hxx:192
#define CTF_FILLTRANSNAME
Definition: xmlsdtypes.hxx:141
#define CTF_FILLHATCHNAME
Definition: xmlsdtypes.hxx:139
#define XML_TYPE_PROP_DRAWING_PAGE
Definition: xmltypes.hxx:95
int SetError()