LibreOffice Module xmloff (master) 1
ximppage.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 <com/sun/star/frame/XModel.hpp>
23#include <com/sun/star/geometry/RealPoint2D.hpp>
24#include <com/sun/star/text/XTextCursor.hpp>
25#include <com/sun/star/util/DateTime.hpp>
26#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
27#include <com/sun/star/lang/XMultiServiceFactory.hpp>
31#include <xmloff/xmlstyle.hxx>
32#include <xmloff/xmltoken.hxx>
34#include "ximppage.hxx"
35#include <animimp.hxx>
37#include <xmloff/xmlictxt.hxx>
38#include "ximpstyl.hxx"
39#include <xmloff/prstylei.hxx>
40#include <PropertySetMerger.hxx>
41#include <sal/log.hxx>
43
45#include <xmloff/xmluconv.hxx>
46
47using namespace ::com::sun::star;
48using namespace ::xmloff::token;
49using namespace ::com::sun::star::uno;
50using namespace ::com::sun::star::lang;
51using namespace ::com::sun::star::text;
52using namespace ::com::sun::star::util;
53using namespace ::com::sun::star::beans;
54using namespace ::com::sun::star::drawing;
55using namespace ::com::sun::star::container;
56using namespace ::com::sun::star::office;
57using namespace ::com::sun::star::xml::sax;
58using namespace ::com::sun::star::geometry;
59
60namespace {
61
62class DrawAnnotationContext : public SvXMLImportContext
63{
64
65public:
66 DrawAnnotationContext( SvXMLImport& rImport, const Reference< xml::sax::XFastAttributeList>& xAttrList, const Reference< XAnnotationAccess >& xAnnotationAccess );
67
68 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
69 sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override;
70 virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
71
72private:
73 Reference< XAnnotation > mxAnnotation;
74 Reference< XTextCursor > mxCursor;
75
76 OUStringBuffer maAuthorBuffer;
77 OUStringBuffer maInitialsBuffer;
78 OUStringBuffer maDateBuffer;
79};
80
81}
82
83DrawAnnotationContext::DrawAnnotationContext( SvXMLImport& rImport, const Reference< xml::sax::XFastAttributeList>& xAttrList, const Reference< XAnnotationAccess >& xAnnotationAccess )
84: SvXMLImportContext( rImport )
85, mxAnnotation( xAnnotationAccess->createAndInsertAnnotation() )
86{
87 if( !mxAnnotation.is() )
88 return;
89
90 RealPoint2D aPosition;
91 RealSize2D aSize;
92
93 for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList ))
94 {
95 switch( aIter.getToken() )
96 {
97 case XML_ELEMENT(SVG, XML_X):
98 case XML_ELEMENT(SVG_COMPAT, XML_X):
99 {
100 sal_Int32 x;
101 GetImport().GetMM100UnitConverter().convertMeasureToCore(
102 x, aIter.toView());
103 aPosition.X = static_cast<double>(x) / 100.0;
104 break;
105 }
106 case XML_ELEMENT(SVG, XML_Y):
107 case XML_ELEMENT(SVG_COMPAT, XML_Y):
108 {
109 sal_Int32 y;
110 GetImport().GetMM100UnitConverter().convertMeasureToCore(
111 y, aIter.toView());
112 aPosition.Y = static_cast<double>(y) / 100.0;
113 break;
114 }
115 case XML_ELEMENT(SVG, XML_WIDTH):
116 case XML_ELEMENT(SVG_COMPAT, XML_WIDTH):
117 {
118 sal_Int32 w;
119 GetImport().GetMM100UnitConverter().convertMeasureToCore(
120 w, aIter.toView());
121 aSize.Width = static_cast<double>(w) / 100.0;
122 break;
123 }
124 case XML_ELEMENT(SVG, XML_HEIGHT):
125 case XML_ELEMENT(SVG_COMPAT, XML_HEIGHT):
126 {
127 sal_Int32 h;
128 GetImport().GetMM100UnitConverter().convertMeasureToCore(
129 h, aIter.toView());
130 aSize.Height = static_cast<double>(h) / 100.0;
131 }
132 break;
133 default:
134 XMLOFF_WARN_UNKNOWN("xmloff", aIter);
135 }
136 }
137
138 mxAnnotation->setPosition( aPosition );
139 mxAnnotation->setSize( aSize );
140}
141
142css::uno::Reference< css::xml::sax::XFastContextHandler > DrawAnnotationContext::createFastChildContext(
143 sal_Int32 nElement,
144 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
145{
146 if( mxAnnotation.is() )
147 {
148 if (nElement == XML_ELEMENT(DC, XML_CREATOR) )
149 return new XMLStringBufferImportContext(GetImport(), maAuthorBuffer);
150 else if( nElement == XML_ELEMENT(DC, XML_DATE) )
151 return new XMLStringBufferImportContext(GetImport(), maDateBuffer);
152 else if ( nElement == XML_ELEMENT(TEXT, XML_SENDER_INITIALS)
153 || nElement == XML_ELEMENT(LO_EXT, XML_SENDER_INITIALS)
154 || nElement == XML_ELEMENT(META, XML_CREATOR_INITIALS))
155 {
156 return new XMLStringBufferImportContext(GetImport(), maInitialsBuffer);
157 }
158 else
159 {
160 // create text cursor on demand
161 if( !mxCursor.is() )
162 {
163 uno::Reference< text::XText > xText( mxAnnotation->getTextRange() );
164 if( xText.is() )
165 {
166 rtl::Reference < XMLTextImportHelper > xTxtImport = GetImport().GetTextImport();
167 mxCursor = xText->createTextCursor();
168 if( mxCursor.is() )
169 xTxtImport->SetCursor( mxCursor );
170 }
171 }
172
173 // if we have a text cursor, lets try to import some text
174 if( mxCursor.is() )
175 {
176 auto p = GetImport().GetTextImport()->CreateTextChildContext( GetImport(), nElement, xAttrList );
177 if (p)
178 return p;
179 }
180 }
181 }
182 XMLOFF_WARN_UNKNOWN_ELEMENT("xmloff", nElement);
183 return nullptr;
184}
185
186void DrawAnnotationContext::endFastElement(sal_Int32)
187{
188 if(mxCursor.is())
189 {
190 // delete addition newline
191 mxCursor->gotoEnd( false );
192 mxCursor->goLeft( 1, true );
193 mxCursor->setString( "" );
194
195 // reset cursor
196 GetImport().GetTextImport()->ResetCursor();
197 }
198
199 if( mxAnnotation.is() )
200 {
201 mxAnnotation->setAuthor( maAuthorBuffer.makeStringAndClear() );
202 mxAnnotation->setInitials( maInitialsBuffer.makeStringAndClear() );
203
204 util::DateTime aDateTime;
205 if (::sax::Converter::parseDateTime(aDateTime, maDateBuffer))
206 {
207 mxAnnotation->setDateTime(aDateTime);
208 }
209 maDateBuffer.setLength(0);
210 }
211}
212
213
215 SvXMLImport& rImport,
216 const Reference< xml::sax::XFastAttributeList>& xAttrList,
217 Reference< drawing::XShapes > const & rShapes)
218: SvXMLImportContext( rImport )
219, mxShapes( rShapes )
220, mxAnnotationAccess( rShapes, UNO_QUERY )
221{
222 for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList ))
223 {
224 if( aIter.getToken() == XML_ELEMENT(DRAW, XML_NAV_ORDER) )
225 {
226 msNavOrder = aIter.toString();
227 break;
228 }
229 }
230}
231
233{
234}
235
236void SdXMLGenericPageContext::startFastElement( sal_Int32 /*nElement*/, const Reference< css::xml::sax::XFastAttributeList >& )
237{
238 GetImport().GetShapeImport()->pushGroupForPostProcessing( mxShapes );
239
240 if( GetImport().IsFormsSupported() )
241 GetImport().GetFormImport()->startPage( Reference< drawing::XDrawPage >::query( mxShapes ) );
242}
243
244css::uno::Reference< css::xml::sax::XFastContextHandler > SdXMLGenericPageContext::createFastChildContext(
245 sal_Int32 nElement,
246 const Reference< xml::sax::XFastAttributeList>& xAttrList )
247{
248 if( nElement == XML_ELEMENT(PRESENTATION, XML_ANIMATIONS) )
249 {
250 return new XMLAnimationsContext( GetImport() );
251 }
252 else if( nElement == XML_ELEMENT(OFFICE, XML_FORMS) )
253 {
254 if( GetImport().IsFormsSupported() )
256 }
257 else if( nElement == XML_ELEMENT(OFFICE, XML_ANNOTATION) || nElement == XML_ELEMENT(OFFICE_EXT, XML_ANNOTATION) )
258 {
259 if( mxAnnotationAccess.is() )
260 return new DrawAnnotationContext( GetImport(), xAttrList, mxAnnotationAccess );
261 }
262 else
263 {
264 // call GroupChildContext function at common ShapeImport
266 if (p)
267 return p;
268 }
269 XMLOFF_WARN_UNKNOWN_ELEMENT("xmloff", nElement);
270 return nullptr;
271}
272
274{
275 GetImport().GetShapeImport()->popGroupAndPostProcess();
276
277 if( GetImport().IsFormsSupported() )
278 GetImport().GetFormImport()->endPage();
279
280 if( !maUseHeaderDeclName.isEmpty() || !maUseFooterDeclName.isEmpty() || !maUseDateTimeDeclName.isEmpty() )
281 {
282 try
283 {
284 Reference <beans::XPropertySet> xSet(mxShapes, uno::UNO_QUERY_THROW );
285 Reference< beans::XPropertySetInfo > xInfo( xSet->getPropertySetInfo() );
286
287 if( !maUseHeaderDeclName.isEmpty() )
288 {
289 static constexpr OUStringLiteral aStrHeaderTextProp( u"HeaderText" );
290 if( xInfo->hasPropertyByName( aStrHeaderTextProp ) )
291 xSet->setPropertyValue( aStrHeaderTextProp,
292 Any( GetSdImport().GetHeaderDecl( maUseHeaderDeclName ) ) );
293 }
294
295 if( !maUseFooterDeclName.isEmpty() )
296 {
297 static constexpr OUStringLiteral aStrFooterTextProp( u"FooterText" );
298 if( xInfo->hasPropertyByName( aStrFooterTextProp ) )
299 xSet->setPropertyValue( aStrFooterTextProp,
300 Any( GetSdImport().GetFooterDecl( maUseFooterDeclName ) ) );
301 }
302
303 if( !maUseDateTimeDeclName.isEmpty() )
304 {
305 static constexpr OUStringLiteral aStrDateTimeTextProp( u"DateTimeText" );
306 if( xInfo->hasPropertyByName( aStrDateTimeTextProp ) )
307 {
308 bool bFixed;
309 OUString aDateTimeFormat;
310 const OUString aText( GetSdImport().GetDateTimeDecl( maUseDateTimeDeclName, bFixed, aDateTimeFormat ) );
311
312 xSet->setPropertyValue("IsDateTimeFixed",
313 Any( bFixed ) );
314
315 if( bFixed )
316 {
317 xSet->setPropertyValue( aStrDateTimeTextProp, Any( aText ) );
318 }
319 else if( !aDateTimeFormat.isEmpty() )
320 {
321 const SdXMLStylesContext* pStyles = dynamic_cast< const SdXMLStylesContext* >( GetSdImport().GetShapeImport()->GetStylesContext() );
322 if( !pStyles )
323 pStyles = dynamic_cast< const SdXMLStylesContext* >( GetSdImport().GetShapeImport()->GetAutoStylesContext() );
324
325 if( pStyles )
326 {
327 const SdXMLNumberFormatImportContext* pSdNumStyle =
328 dynamic_cast< const SdXMLNumberFormatImportContext* >( pStyles->FindStyleChildContext( XmlStyleFamily::DATA_STYLE, aDateTimeFormat, true ) );
329
330 if( pSdNumStyle )
331 {
332 xSet->setPropertyValue("DateTimeFormat",
333 Any( pSdNumStyle->GetDrawKey() ) );
334 }
335 }
336 }
337 }
338 }
339 }
340 catch(const uno::Exception&)
341 {
342 TOOLS_WARN_EXCEPTION("xmloff.draw", "");
343 }
344 }
345
347}
348
349void SdXMLGenericPageContext::SetStyle( OUString const & rStyleName )
350{
351 // set PageProperties?
352 if(rStyleName.isEmpty())
353 return;
354
355 try
356 {
357 const SvXMLImportContext* pContext = GetSdImport().GetShapeImport()->GetAutoStylesContext();
358
359 if (const SdXMLStylesContext* pStyles = dynamic_cast<const SdXMLStylesContext *>(pContext))
360 {
361 const SvXMLStyleContext* pStyle = pStyles->FindStyleChildContext(
363
364 if (const XMLPropStyleContext* pPropStyle = dynamic_cast<const XMLPropStyleContext*>(pStyle))
365 {
366 Reference <beans::XPropertySet> xPropSet1(mxShapes, uno::UNO_QUERY);
367 if(xPropSet1.is())
368 {
369 Reference< beans::XPropertySet > xPropSet( xPropSet1 );
370 Reference< beans::XPropertySet > xBackgroundSet;
371
372 static constexpr OUStringLiteral aBackground(u"Background");
373 if( xPropSet1->getPropertySetInfo()->hasPropertyByName( aBackground ) )
374 {
375 Reference< beans::XPropertySetInfo > xInfo( xPropSet1->getPropertySetInfo() );
376 if( xInfo.is() && xInfo->hasPropertyByName( aBackground ) )
377 {
378 Reference< lang::XMultiServiceFactory > xServiceFact(GetSdImport().GetModel(), uno::UNO_QUERY);
379 if(xServiceFact.is())
380 {
381 xBackgroundSet.set(xServiceFact->createInstance("com.sun.star.drawing.Background"), UNO_QUERY);
382 }
383 }
384
385 if( xBackgroundSet.is() )
386 xPropSet = PropertySetMerger_CreateInstance( xPropSet1, xBackgroundSet );
387 }
388
389 if(xPropSet.is())
390 {
391 const_cast<XMLPropStyleContext*>(pPropStyle)->FillPropertySet(xPropSet);
392
393 if( xBackgroundSet.is() )
394 xPropSet1->setPropertyValue( aBackground, uno::Any( xBackgroundSet ) );
395 }
396 }
397 }
398 }
399 }
400 catch (const uno::Exception&)
401 {
402 TOOLS_WARN_EXCEPTION("xmloff.draw", "");
403 }
404}
405
407{
408 // set PresentationPageLayout?
409 if(!GetSdImport().IsImpress() || maPageLayoutName.isEmpty())
410 return;
411
412 sal_Int32 nType = -1;
413
414 const SvXMLImportContext* pContext = GetSdImport().GetShapeImport()->GetStylesContext();
415
416 if (const SdXMLStylesContext* pStyles = dynamic_cast<const SdXMLStylesContext *>(pContext))
417 {
418 const SvXMLStyleContext* pStyle = pStyles->FindStyleChildContext( XmlStyleFamily::SD_PRESENTATIONPAGELAYOUT_ID, maPageLayoutName);
419
420 if (const SdXMLPresentationPageLayoutContext* pLayout = dynamic_cast<const SdXMLPresentationPageLayoutContext*>(pStyle))
421 {
422 nType = pLayout->GetTypeId();
423 }
424 }
425
426 if( -1 == nType )
427 {
428 Reference< container::XNameAccess > xPageLayouts( GetSdImport().getPageLayouts() );
429 if( xPageLayouts.is() )
430 {
431 if( xPageLayouts->hasByName( maPageLayoutName ) )
432 xPageLayouts->getByName( maPageLayoutName ) >>= nType;
433 }
434
435 }
436
437 if( -1 != nType )
438 {
439 Reference <beans::XPropertySet> xPropSet(mxShapes, uno::UNO_QUERY);
440 if(xPropSet.is())
441 {
442 OUString aPropName("Layout");
443 Reference< beans::XPropertySetInfo > xInfo( xPropSet->getPropertySetInfo() );
444 if( xInfo.is() && xInfo->hasPropertyByName( aPropName ) )
445 xPropSet->setPropertyValue(aPropName, uno::Any( static_cast<sal_Int16>(nType) ) );
446 }
447 }
448}
449
451{
452 // now delete all up-to-now contained shapes; they have been created
453 // when setting the presentation page layout.
454 while(mxShapes->getCount())
455 {
456 Reference< drawing::XShape > xShape;
457 uno::Any aAny(mxShapes->getByIndex(0));
458
459 aAny >>= xShape;
460
461 if(xShape.is())
462 {
463 mxShapes->remove(xShape);
464 }
465 }
466}
467
468void SdXMLGenericPageContext::SetPageMaster( OUString const & rsPageMasterName )
469{
470 if (!GetSdImport().GetShapeImport()->GetStylesContext())
471 return;
472
473 // look for PageMaster with this name
474
475 // #80012# GetStylesContext() replaced with GetAutoStylesContext()
476 const SvXMLStylesContext* pAutoStyles = GetSdImport().GetShapeImport()->GetAutoStylesContext();
477
478 const SvXMLStyleContext* pStyle = pAutoStyles ? pAutoStyles->FindStyleChildContext(XmlStyleFamily::SD_PAGEMASTERCONTEXT_ID, rsPageMasterName) : nullptr;
479
480 const SdXMLPageMasterContext* pPageMaster = dynamic_cast<const SdXMLPageMasterContext*>(pStyle);
481 if (!pPageMaster)
482 return;
483
484 const SdXMLPageMasterStyleContext* pPageMasterContext = pPageMaster->GetPageMasterStyle();
485
486 if (!pPageMasterContext)
487 return;
488
489 Reference< drawing::XDrawPage > xMasterPage(GetLocalShapesContext(), uno::UNO_QUERY);
490 if (!xMasterPage.is())
491 return;
492
493 // set sizes for this masterpage
494 Reference <beans::XPropertySet> xPropSet(xMasterPage, uno::UNO_QUERY);
495 if (xPropSet.is())
496 {
497 xPropSet->setPropertyValue("BorderBottom", Any(pPageMasterContext->GetBorderBottom()));
498 xPropSet->setPropertyValue("BorderLeft", Any(pPageMasterContext->GetBorderLeft()));
499 xPropSet->setPropertyValue("BorderRight", Any(pPageMasterContext->GetBorderRight()));
500 xPropSet->setPropertyValue("BorderTop", Any(pPageMasterContext->GetBorderTop()));
501 xPropSet->setPropertyValue("Width", Any(pPageMasterContext->GetWidth()));
502 xPropSet->setPropertyValue("Height", Any(pPageMasterContext->GetHeight()));
503 xPropSet->setPropertyValue("Orientation", Any(pPageMasterContext->GetOrientation()));
504 }
505}
506
507namespace {
508
509class XoNavigationOrderAccess : public ::cppu::WeakImplHelper< XIndexAccess >
510{
511public:
512 explicit XoNavigationOrderAccess( std::vector< Reference< XShape > >& rShapes );
513
514 // XIndexAccess
515 virtual sal_Int32 SAL_CALL getCount( ) override;
516 virtual Any SAL_CALL getByIndex( sal_Int32 Index ) override;
517
518 // XElementAccess
519 virtual Type SAL_CALL getElementType( ) override;
520 virtual sal_Bool SAL_CALL hasElements( ) override;
521
522private:
523 std::vector< Reference< XShape > > maShapes;
524};
525
526}
527
528XoNavigationOrderAccess::XoNavigationOrderAccess( std::vector< Reference< XShape > >& rShapes )
529{
530 maShapes.swap( rShapes );
531}
532
533// XIndexAccess
534sal_Int32 SAL_CALL XoNavigationOrderAccess::getCount( )
535{
536 return static_cast< sal_Int32 >( maShapes.size() );
537}
538
539Any SAL_CALL XoNavigationOrderAccess::getByIndex( sal_Int32 Index )
540{
541 if( (Index < 0) || (Index > getCount()) )
542 throw IndexOutOfBoundsException();
543
544 return Any( maShapes[Index] );
545}
546
547// XElementAccess
548Type SAL_CALL XoNavigationOrderAccess::getElementType( )
549{
551}
552
553sal_Bool SAL_CALL XoNavigationOrderAccess::hasElements( )
554{
555 return !maShapes.empty();
556}
557
559{
560 if( msNavOrder.isEmpty() )
561 return;
562
563 try
564 {
565 sal_uInt32 nIndex;
566 const sal_uInt32 nCount = static_cast< sal_uInt32 >( mxShapes->getCount() );
567 std::vector< Reference< XShape > > aShapes( nCount );
568
569 ::comphelper::UnoInterfaceToUniqueIdentifierMapper& rIdMapper = GetSdImport().getInterfaceToIdentifierMapper();
570 SvXMLTokenEnumerator aEnumerator( msNavOrder );
571 std::u16string_view sId;
572 for( nIndex = 0; nIndex < nCount; ++nIndex )
573 {
574 if( !aEnumerator.getNextToken(sId) )
575 break;
576
577 aShapes[nIndex].set( rIdMapper.getReference( OUString(sId) ), UNO_QUERY );
578 }
579
580 for( nIndex = 0; nIndex < nCount; ++nIndex )
581 {
582 if( !aShapes[nIndex].is() )
583 {
584 OSL_FAIL("xmloff::SdXMLGenericPageContext::SetNavigationOrder(), draw:nav-order attribute incomplete!");
585 // todo: warning?
586 return;
587 }
588 }
589
590 Reference< XPropertySet > xSet( mxShapes, UNO_QUERY_THROW );
591 xSet->setPropertyValue("NavigationOrder", Any( Reference< XIndexAccess >( new XoNavigationOrderAccess( aShapes ) ) ) );
592 }
593 catch(const uno::Exception&)
594 {
595 TOOLS_WARN_EXCEPTION("xmloff.draw",
596 "unexpected exception caught while importing shape navigation order!");
597 }
598}
599
600/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
struct _ADOIndex Index
Reference< XPropertySet > PropertySetMerger_CreateInstance(const Reference< XPropertySet > &rPropSet1, const Reference< XPropertySet > &rPropSet2) noexcept
SdXMLGenericPageContext(SvXMLImport &rImport, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList, css::uno::Reference< css::drawing::XShapes > const &rShapes)
Definition: ximppage.cxx:214
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
virtual ~SdXMLGenericPageContext() override
Definition: ximppage.cxx:232
css::uno::Reference< css::drawing::XShapes > mxShapes
Definition: ximppage.hxx:32
OUString maUseDateTimeDeclName
Definition: ximppage.hxx:39
void DeleteAllShapes()
deletes all shapes on this drawing page
Definition: ximppage.cxx:450
virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
Definition: ximppage.cxx:236
OUString maUseFooterDeclName
Definition: ximppage.hxx:38
css::uno::Reference< css::office::XAnnotationAccess > mxAnnotationAccess
Definition: ximppage.hxx:33
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
const SdXMLPageMasterStyleContext * GetPageMasterStyle() const
Definition: ximpstyl.hxx:87
sal_Int32 GetBorderRight() const
Definition: ximpstyl.hxx:61
sal_Int32 GetBorderLeft() const
Definition: ximpstyl.hxx:60
css::view::PaperOrientation GetOrientation() const
Definition: ximpstyl.hxx:65
sal_Int32 GetBorderBottom() const
Definition: ximpstyl.hxx:59
sal_Int32 GetHeight() const
Definition: ximpstyl.hxx:64
sal_Int32 GetBorderTop() const
Definition: ximpstyl.hxx:62
sal_Int32 GetWidth() const
Definition: ximpstyl.hxx:63
This class deliberately does not support XWeak, to improve performance when loading large documents.
Definition: xmlictxt.hxx:48
virtual void SAL_CALL endFastElement(sal_Int32 Element) override
endFastElement is called before a context will be destructed, but after an elements context has been ...
Definition: xmlictxt.cxx:40
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
const SvXMLStyleContext * FindStyleChildContext(XmlStyleFamily nFamily, const OUString &rName, bool bCreateIndex=false) const
Definition: xmlstyle.cxx:783
bool getNextToken(std::u16string_view &rToken)
Definition: xmluconv.cxx:529
static SvXMLShapeContext * CreateGroupChildContext(SvXMLImport &rImport, sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList, css::uno::Reference< css::drawing::XShapes > const &rShapes, bool bTemporaryShape=false)
Import all text into a string buffer.
const css::uno::Reference< css::uno::XInterface > & getReference(const OUString &rIdentifier) const
css::uno::Type const & get()
static bool parseDateTime(css::util::DateTime &rDateTime, std::u16string_view rString)
static SvXMLImportContext * createOfficeFormsContext(SvXMLImport &_rImport)
creates an import context for the office:forms element
int nCount
#define TOOLS_WARN_EXCEPTION(area, stream)
float u
float y
float x
@ SD_PRESENTATIONPAGELAYOUT_ID
DRAW
sal_Int32 nIndex
void * p
Type
OUString aPropName
FastAttributeList & castToFastAttributeList(const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
sal_Int32 h
sal_Int32 w
Handling of tokens in XML:
QPRO_FUNC_TYPE nType
unsigned char sal_Bool
OUString sId
#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:97