LibreOffice Module xmloff (master)  1
sdxmlimp.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 <osl/thread.h>
21 #include <sal/log.hxx>
23 #include <comphelper/sequence.hxx>
24 
25 #include <xmloff/xmlscripti.hxx>
26 #include "sdxmlimp_impl.hxx"
27 #include "ximpbody.hxx"
28 
29 #include <xmloff/xmlmetai.hxx>
30 #include "ximpstyl.hxx"
31 #include <xmloff/xmlnamespace.hxx>
32 #include <xmloff/xmltoken.hxx>
34 #include <com/sun/star/awt/Rectangle.hpp>
35 #include <com/sun/star/form/XFormsSupplier.hpp>
36 #include <com/sun/star/frame/XModel.hpp>
37 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
38 #include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
39 #include <com/sun/star/drawing/XMasterPagesSupplier.hpp>
40 #include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
41 #include <xmloff/settingsstore.hxx>
43 
45 
46 #include <com/sun/star/document/XDocumentProperties.hpp>
47 #include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
48 
49 using namespace ::com::sun::star;
50 using namespace ::xmloff::token;
51 
52 namespace {
53 
54 class SdXMLBodyContext_Impl : public SvXMLImportContext
55 {
56  SdXMLImport& GetSdImport() { return static_cast<SdXMLImport&>(GetImport()); }
57 
58 public:
59 
60  SdXMLBodyContext_Impl( SdXMLImport& rImport );
61 
62  virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
63  sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override;
64 };
65 
66 }
67 
68 SdXMLBodyContext_Impl::SdXMLBodyContext_Impl( SdXMLImport& rImport ) :
69  SvXMLImportContext( rImport )
70 {
71 }
72 
73 css::uno::Reference< css::xml::sax::XFastContextHandler > SdXMLBodyContext_Impl::createFastChildContext(
74  sal_Int32 /*nElement*/,
75  const uno::Reference< xml::sax::XFastAttributeList > & /*xAttrList*/ )
76 {
77  return new SdXMLBodyContext(GetSdImport());
78 }
79 
80 namespace {
81 
82 // NB: virtually inherit so we can multiply inherit properly
83 // in SdXMLFlatDocContext_Impl
84 class SdXMLDocContext_Impl : public virtual SvXMLImportContext
85 {
86 protected:
87  SdXMLImport& GetSdImport() { return static_cast<SdXMLImport&>(GetImport()); }
88 
89 public:
90  SdXMLDocContext_Impl( SdXMLImport& rImport );
91 
92  virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
93  sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
94 };
95 
96 }
97 
98 SdXMLDocContext_Impl::SdXMLDocContext_Impl(
99  SdXMLImport& rImport )
100 : SvXMLImportContext(rImport)
101 {
102 }
103 
104 uno::Reference< xml::sax::XFastContextHandler > SAL_CALL SdXMLDocContext_Impl::createFastChildContext(
105  sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& /*xAttrList*/ )
106 {
107  switch (nElement)
108  {
109  case XML_ELEMENT(OFFICE, XML_SCRIPTS):
110  {
111  if( GetImport().getImportFlags() & SvXMLImportFlags::SCRIPTS )
112  {
113  // office:script inside office:document
114  return new XMLScriptContext( GetSdImport(), GetSdImport().GetModel() );
115  }
116  break;
117  }
118  case XML_ELEMENT(OFFICE, XML_MASTER_STYLES):
119  {
120  if( GetImport().getImportFlags() & SvXMLImportFlags::MASTERSTYLES )
121  {
122  // office:master-styles inside office:document
123  return GetSdImport().CreateMasterStylesContext();
124  }
125  break;
126  }
127  case XML_ELEMENT(OFFICE, XML_BODY):
128  {
129  if( GetImport().getImportFlags() & SvXMLImportFlags::CONTENT )
130  {
131  // office:body inside office:document
132  return new SdXMLBodyContext_Impl(GetSdImport());
133  }
134  break;
135  }
136  case XML_ELEMENT(OFFICE, XML_SETTINGS):
137  {
138  if( GetImport().getImportFlags() & SvXMLImportFlags::SETTINGS )
139  {
140  return new XMLDocumentSettingsContext(GetImport());
141  }
142  break;
143  }
144  case XML_ELEMENT(OFFICE, XML_STYLES):
145  {
146  if( GetImport().getImportFlags() & SvXMLImportFlags::STYLES )
147  {
148  // office:styles inside office:document
149  return GetSdImport().CreateStylesContext();
150  }
151  break;
152  }
153  case XML_ELEMENT(OFFICE, XML_AUTOMATIC_STYLES):
154  {
155  if( GetImport().getImportFlags() & SvXMLImportFlags::AUTOSTYLES )
156  {
157  // office:automatic-styles inside office:document
158  return GetSdImport().CreateAutoStylesContext();
159  }
160  break;
161  }
162  case XML_ELEMENT(OFFICE, XML_FONT_FACE_DECLS):
163  {
164  return GetSdImport().CreateFontDeclsContext();
165  }
166  case XML_ELEMENT(OFFICE, XML_META):
167  {
168  SAL_INFO("xmloff.draw", "XML_ELEMENT(OFFICE, XML_META): should not have come here, maybe document is invalid?");
169  break;
170  }
171  }
172  return nullptr;
173 }
174 
175 namespace {
176 
177 // context for flat file xml format
178 class SdXMLFlatDocContext_Impl
179  : public SdXMLDocContext_Impl, public SvXMLMetaDocumentContext
180 {
181 public:
182  SdXMLFlatDocContext_Impl( SdXMLImport& i_rImport,
183  const uno::Reference<document::XDocumentProperties>& i_xDocProps );
184 
185  virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
186  sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
187 };
188 
189 }
190 
191 SdXMLFlatDocContext_Impl::SdXMLFlatDocContext_Impl( SdXMLImport& i_rImport,
192  const uno::Reference<document::XDocumentProperties>& i_xDocProps) :
193  SvXMLImportContext(i_rImport),
194  SdXMLDocContext_Impl(i_rImport),
195  SvXMLMetaDocumentContext(i_rImport, i_xDocProps)
196 {
197 }
198 
199 uno::Reference< xml::sax::XFastContextHandler > SAL_CALL SdXMLFlatDocContext_Impl::createFastChildContext(
200  sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& xAttrList )
201 {
202  // behave like meta base class iff we encounter office:meta
203  if ( nElement == XML_ELEMENT( OFFICE, XML_META ) ) {
205  nElement, xAttrList );
206  } else {
207  return SdXMLDocContext_Impl::createFastChildContext(
208  nElement, xAttrList );
209  }
210 }
211 
212 extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
214  uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
215 {
216  return cppu::acquire(
217  new SdXMLImport(pCtx, "XMLImpressImportOasis", false, SvXMLImportFlags::ALL));
218 }
219 
220 extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
222  uno::Sequence<uno::Any> const& /*rSeq*/)
223 {
224  return cppu::acquire(new SdXMLImport(pCtx, "XMLDrawImportOasis", true, SvXMLImportFlags::ALL));
225 }
226 
227 extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
229  uno::Sequence<uno::Any> const& /*rSeq*/)
230 {
231  return cppu::acquire(new SdXMLImport(pCtx, "XMLDrawStylesImportOasis", true,
234 }
235 
236 extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
238  uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
239 {
240  return cppu::acquire(new SdXMLImport(pCtx, "XMLDrawContentImportOasis", true,
244 }
245 
246 extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
248  uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
249 {
250  return cppu::acquire(
251  new SdXMLImport(pCtx, "XMLDrawMetaImportOasis", true, SvXMLImportFlags::META));
252 }
253 
254 extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
256  uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
257 {
258  return cppu::acquire(
259  new SdXMLImport(pCtx, "XMLDrawSettingsImportOasis", true, SvXMLImportFlags::SETTINGS));
260 }
261 
262 extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
264  uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
265 {
266  return cppu::acquire(new SdXMLImport(pCtx, "XMLImpressStylesImportOasis", false,
269 }
270 
271 extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
273  uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
274 {
275  return cppu::acquire(new SdXMLImport(pCtx, "XMLImpressContentImportOasis", false,
279 }
280 
281 extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
283  uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
284 {
285  return cppu::acquire(
286  new SdXMLImport(pCtx, "XMLImpressMetaImportOasis", false, SvXMLImportFlags::META));
287 }
288 
289 extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
291  uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
292 {
293  return cppu::acquire(
294  new SdXMLImport(pCtx, "XMLImpressSettingsImportOasis", false, SvXMLImportFlags::SETTINGS));
295 }
296 
298  const css::uno::Reference< css::uno::XComponentContext >& xContext,
299  OUString const & implementationName,
300  bool bIsDraw, SvXMLImportFlags nImportFlags )
301 : SvXMLImport( xContext, implementationName, nImportFlags ),
302  mnNewPageCount(0),
303  mnNewMasterPageCount(0),
304  mbIsDraw(bIsDraw),
305  mbLoadDoc(true),
306  mbPreview(false)
307 {
308  // add namespaces
313 
316  GetXMLToken(XML_N_SMIL_COMPAT),
318 }
319 
320 // XImporter
321 void SAL_CALL SdXMLImport::setTargetDocument( const uno::Reference< lang::XComponent >& xDoc )
322 {
324 
325  uno::Reference< lang::XServiceInfo > xDocServices( GetModel(), uno::UNO_QUERY );
326  if( !xDocServices.is() )
327  throw lang::IllegalArgumentException();
328 
329  mbIsDraw = !xDocServices->supportsService("com.sun.star.presentation.PresentationDocument");
330 
331  // prepare access to styles
332  uno::Reference< style::XStyleFamiliesSupplier > xFamSup( GetModel(), uno::UNO_QUERY );
333  if(xFamSup.is())
334  mxDocStyleFamilies = xFamSup->getStyleFamilies();
335 
336  // prepare access to master pages
337  uno::Reference < drawing::XMasterPagesSupplier > xMasterPagesSupplier(GetModel(), uno::UNO_QUERY);
338  if(xMasterPagesSupplier.is())
339  mxDocMasterPages = xMasterPagesSupplier->getMasterPages();
340 
341  // prepare access to draw pages
342  uno::Reference <drawing::XDrawPagesSupplier> xDrawPagesSupplier(GetModel(), uno::UNO_QUERY);
343  if(!xDrawPagesSupplier.is())
344  throw lang::IllegalArgumentException();
345 
346  mxDocDrawPages = xDrawPagesSupplier->getDrawPages();
347  if(!mxDocDrawPages.is())
348  throw lang::IllegalArgumentException();
349 
350  if( mxDocDrawPages.is() && mxDocDrawPages->getCount() > 0 )
351  {
352  uno::Reference< form::XFormsSupplier > xFormsSupp;
353  mxDocDrawPages->getByIndex(0) >>= xFormsSupp;
354  mbIsFormsSupported = xFormsSupp.is();
355  }
356 
357  // #88546# enable progress bar increments, SdXMLImport is only used for
358  // draw/impress import
359  GetShapeImport()->enableHandleProgressBar();
360 
361  uno::Reference< lang::XMultiServiceFactory > xFac( GetModel(), uno::UNO_QUERY );
362  if( xFac.is() )
363  {
364  uno::Sequence< OUString > sSNS( xFac->getAvailableServiceNames() );
365  if (comphelper::findValue(sSNS, "com.sun.star.drawing.TableShape") != -1)
367  }
368 }
369 
370 // XInitialization
371 void SAL_CALL SdXMLImport::initialize( const uno::Sequence< uno::Any >& aArguments )
372 {
373  SvXMLImport::initialize( aArguments );
374 
375  uno::Reference< beans::XPropertySet > xInfoSet( getImportInfo() );
376  if( !xInfoSet.is() )
377  return;
378 
379  uno::Reference< beans::XPropertySetInfo > xInfoSetInfo( xInfoSet->getPropertySetInfo() );
380 
381  if( xInfoSetInfo->hasPropertyByName( gsPageLayouts ) )
382  xInfoSet->getPropertyValue( gsPageLayouts ) >>= mxPageLayouts;
383 
384  if( xInfoSetInfo->hasPropertyByName( gsPreview ) )
385  xInfoSet->getPropertyValue( gsPreview ) >>= mbPreview;
386 
387  OUString const sOrganizerMode(
388  "OrganizerMode");
389  if (xInfoSetInfo->hasPropertyByName(sOrganizerMode))
390  {
391  bool bStyleOnly(false);
392  if (xInfoSet->getPropertyValue(sOrganizerMode) >>= bStyleOnly)
393  {
394  mbLoadDoc = !bStyleOnly;
395  }
396  }
397 }
398 
400  const uno::Reference< xml::sax::XFastAttributeList >& xAttrList )
401 {
402  SvXMLImportContext* pContext = nullptr;
403 
404  switch (nElement)
405  {
409  pContext = new SdXMLDocContext_Impl(*this);
410  break;
412  pContext = CreateMetaContext(nElement, xAttrList);
413  break;
415  {
416  uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
417  GetModel(), uno::UNO_QUERY_THROW);
418  // flat OpenDocument file format
419  pContext = new SdXMLFlatDocContext_Impl( *this, xDPS->getDocumentProperties());
420  }
421  break;
422  }
423  return pContext;
424 }
425 
427  const uno::Reference<xml::sax::XFastAttributeList>&)
428 {
429  SvXMLImportContext* pContext = nullptr;
430 
432  {
433  uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
434  GetModel(), uno::UNO_QUERY_THROW);
435  uno::Reference<document::XDocumentProperties> const xDocProps(
436  !mbLoadDoc ? nullptr : xDPS->getDocumentProperties());
437  pContext = new SvXMLMetaDocumentContext(*this, xDocProps);
438  }
439 
440  return pContext;
441 }
442 
444 {
445  if(GetShapeImport()->GetStylesContext())
446  return GetShapeImport()->GetStylesContext();
447 
448  GetShapeImport()->SetStylesContext(new SdXMLStylesContext(
449  *this, false));
450 
451  return GetShapeImport()->GetStylesContext();
452 }
453 
455 {
456  if(GetShapeImport()->GetAutoStylesContext())
457  return GetShapeImport()->GetAutoStylesContext();
458 
459  GetShapeImport()->SetAutoStylesContext(new SdXMLStylesContext(
460  *this, true));
461 
462  return GetShapeImport()->GetAutoStylesContext();
463 }
464 
466 {
467  if (!mxMasterStylesContext.is())
469  return mxMasterStylesContext.get();
470 }
471 
473 {
474  XMLFontStylesContext *pFSContext =
475  new XMLFontStylesContext( *this, osl_getThreadTextEncoding() );
476  SetFontDecls( pFSContext );
477  return pFSContext;
478 }
479 
480 void SdXMLImport::SetViewSettings(const css::uno::Sequence<css::beans::PropertyValue>& aViewProps)
481 {
482  uno::Reference< beans::XPropertySet > xPropSet( GetModel(), uno::UNO_QUERY );
483  if( !xPropSet.is() )
484  return;
485 
486  awt::Rectangle aVisArea( 0,0, 28000, 21000 );
487 
488  for( const auto& rViewProp : aViewProps )
489  {
490  const OUString& rName = rViewProp.Name;
491  const uno::Any rValue = rViewProp.Value;
492 
493  if ( rName == "VisibleAreaTop" )
494  {
495  rValue >>= aVisArea.Y;
496  }
497  else if ( rName == "VisibleAreaLeft" )
498  {
499  rValue >>= aVisArea.X;
500  }
501  else if ( rName == "VisibleAreaWidth" )
502  {
503  rValue >>= aVisArea.Width;
504  }
505  else if ( rName == "VisibleAreaHeight" )
506  {
507  rValue >>= aVisArea.Height;
508  }
509  }
510 
511  try
512  {
513  xPropSet->setPropertyValue("VisibleArea", uno::makeAny( aVisArea ) );
514  }
515  catch(const css::uno::Exception&)
516  {
517 /* #i79978# since old documents may contain invalid view settings, this is nothing to worry the user about.
518  uno::Sequence<OUString> aSeq(0);
519  SetError( XMLERROR_FLAG_WARNING | XMLERROR_API, aSeq, e.Message, NULL );
520 */
521  }
522 }
523 
524 void SdXMLImport::SetConfigurationSettings(const css::uno::Sequence<css::beans::PropertyValue>& aConfigProps)
525 {
526  uno::Reference< lang::XMultiServiceFactory > xFac( GetModel(), uno::UNO_QUERY );
527  if( !xFac.is() )
528  return;
529 
530  uno::Reference< beans::XPropertySet > xProps( xFac->createInstance("com.sun.star.document.Settings"), uno::UNO_QUERY );
531  if( !xProps.is() )
532  return;
533 
534  uno::Reference< beans::XPropertySetInfo > xInfo( xProps->getPropertySetInfo() );
535  if( !xInfo.is() )
536  return;
537 
538  const uno::Sequence<beans::PropertyValue>* pValues = &aConfigProps;
539 
541  pFilter = dynamic_cast<DocumentSettingsSerializer *>(xProps.get());
542  uno::Sequence<beans::PropertyValue> aFiltered;
543  if( pFilter )
544  {
545  aFiltered = pFilter->filterStreamsFromStorage( GetDocumentBase(), GetSourceStorage(), aConfigProps );
546  pValues = &aFiltered;
547  }
548 
549  for( const auto& rValue : *pValues )
550  {
551  try
552  {
553  const OUString& rProperty = rValue.Name;
554  if( xInfo->hasPropertyByName( rProperty ) )
555  xProps->setPropertyValue( rProperty, rValue.Value );
556  }
557  catch(const uno::Exception&)
558  {
559  SAL_INFO("xmloff.draw", "#SdXMLImport::SetConfigurationSettings: Exception!" );
560  }
561  }
562 }
563 
564 // #80365# override this method to read and use the hint value from the
565 // written meta information. If no info is found, guess 10 draw objects
566 //void SdXMLImport::SetStatisticAttributes(const uno::Reference<xml::sax::XAttributeList>& xAttrList)
568  const uno::Sequence<beans::NamedValue> & i_rStats)
569 {
570  static const char* s_stats[] =
571  { "ObjectCount", nullptr };
572 
573  SvXMLImport::SetStatistics(i_rStats);
574 
575  sal_uInt32 nCount(10);
576  for (const auto& rStat : i_rStats) {
577  for (const char** pStat = s_stats; *pStat != nullptr; ++pStat) {
578  if (rStat.Name.equalsAscii(*pStat)) {
579  sal_Int32 val = 0;
580  if (rStat.Value >>= val) {
581  nCount = val;
582  } else {
583  SAL_WARN("xmloff.draw", "SdXMLImport::SetStatistics: invalid entry");
584  }
585  }
586  }
587  }
588 
589  if(nCount)
590  {
593  }
594 }
595 
596 void SdXMLImport::AddHeaderDecl( const OUString& rName, const OUString& rText )
597 {
598  if( !rName.isEmpty() && !rText.isEmpty() )
599  maHeaderDeclsMap[rName] = rText;
600 }
601 
602 void SdXMLImport::AddFooterDecl( const OUString& rName, const OUString& rText )
603 {
604  if( !rName.isEmpty() && !rText.isEmpty() )
605  maFooterDeclsMap[rName] = rText;
606 }
607 
608 void SdXMLImport::AddDateTimeDecl( const OUString& rName, const OUString& rText, bool bFixed, const OUString& rDateTimeFormat )
609 {
610  if( !rName.isEmpty() && (!rText.isEmpty() || !bFixed) )
611  {
613  aDecl.maStrText = rText;
614  aDecl.mbFixed = bFixed;
615  aDecl.maStrDateTimeFormat = rDateTimeFormat;
616  maDateTimeDeclsMap[rName] = aDecl;
617  }
618 }
619 
620 OUString SdXMLImport::GetHeaderDecl( const OUString& rName ) const
621 {
622  OUString aRet;
623  HeaderFooterDeclMap::const_iterator aIter( maHeaderDeclsMap.find( rName ) );
624  if( aIter != maHeaderDeclsMap.end() )
625  aRet = (*aIter).second;
626 
627  return aRet;
628 }
629 
630 OUString SdXMLImport::GetFooterDecl( const OUString& rName ) const
631 {
632  OUString aRet;
633  HeaderFooterDeclMap::const_iterator aIter( maFooterDeclsMap.find( rName ) );
634  if( aIter != maFooterDeclsMap.end() )
635  aRet = (*aIter).second;
636 
637  return aRet;
638 }
639 
640 OUString SdXMLImport::GetDateTimeDecl( const OUString& rName, bool& rbFixed, OUString& rDateTimeFormat )
641 {
643 
644  DateTimeDeclMap::const_iterator aIter( maDateTimeDeclsMap.find( rName ) );
645  if( aIter != maDateTimeDeclsMap.end() )
646  aDecl = (*aIter).second;
647 
648  rbFixed = aDecl.mbFixed;
649  rDateTimeFormat = aDecl.maStrDateTimeFormat;
650  return aDecl.maStrText;
651 }
652 
654 {
655  uno::Reference< lang::XMultiServiceFactory > xFac( GetModel(), uno::UNO_QUERY );
656  if( xFac.is() )
657  {
658  uno::Reference< beans::XPropertySet > xProps( xFac->createInstance("com.sun.star.document.Settings"), uno::UNO_QUERY );
659  if( xProps.is() )
660  xProps->setPropertyValue("EmbedFonts", uno::makeAny( true ) );
661  }
662 }
663 
664 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool mbIsFormsSupported
Definition: xmlimp.hxx:256
void AddFooterDecl(const OUString &rName, const OUString &rText)
Definition: sdxmlimp.cxx:602
static constexpr OUStringLiteral gsPreview
virtual SvXMLImportContext * CreateFastContext(sal_Int32 nElement, const ::css::uno::Reference< ::css::xml::sax::XFastAttributeList > &xAttrList) override
Definition: sdxmlimp.cxx:399
SAL_DLLPUBLIC_EXPORT uno::XInterface * com_sun_star_comp_Impress_XMLOasisContentImporter_get_implementation(uno::XComponentContext *pCtx, uno::Sequence< uno::Any > const &)
Definition: sdxmlimp.cxx:272
sal_Int32 findValue(const css::uno::Sequence< T1 > &_rList, const T2 &_rValue)
SvXMLImport & GetImport()
Definition: xmlictxt.hxx:59
css::uno::Reference< css::container::XIndexAccess > mxDocMasterPages
virtual void SetViewSettings(const css::uno::Sequence< css::beans::PropertyValue > &aViewProps) override
Definition: sdxmlimp.cxx:480
SvXMLNamespaceMap & GetNamespaceMap()
Definition: xmlimp.hxx:397
virtual void SAL_CALL setTargetDocument(const css::uno::Reference< css::lang::XComponent > &xDoc) override
Definition: sdxmlimp.cxx:321
css::uno::Reference< css::embed::XStorage > const & GetSourceStorage() const
Definition: xmlimp.cxx:1344
OUString GetDocumentBase() const
Definition: xmlimp.cxx:1797
void SetFontDecls(XMLFontStylesContext *pFontDecls)
Definition: xmlimp.cxx:1527
css::uno::Any const & rValue
Definition: ImageStyle.hxx:38
SvXMLImportFlags
Definition: xmlimp.hxx:110
OUString GetHeaderDecl(const OUString &rName) const
Definition: sdxmlimp.cxx:620
css::uno::Reference< css::container::XNameAccess > mxPageLayouts
int nCount
virtual void NotifyContainsEmbeddedFont() override
Definition: sdxmlimp.cxx:653
virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > &aArguments) override
Definition: xmlimp.cxx:949
virtual css::uno::Sequence< css::beans::PropertyValue > filterStreamsFromStorage(OUString const &referer, const css::uno::Reference< css::embed::XStorage > &xStorage, const css::uno::Sequence< css::beans::PropertyValue > &aConfigProps)=0
SAL_DLLPUBLIC_EXPORT uno::XInterface * com_sun_star_comp_Impress_XMLOasisStylesImporter_get_implementation(uno::XComponentContext *pCtx, uno::Sequence< uno::Any > const &)
Definition: sdxmlimp.cxx:263
SAL_DLLPUBLIC_EXPORT uno::XInterface * com_sun_star_comp_Draw_XMLOasisContentImporter_get_implementation(uno::XComponentContext *pCtx, uno::Sequence< uno::Any > const &)
Definition: sdxmlimp.cxx:237
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
Definition: xmlmetai.cxx:223
HeaderFooterDeclMap maFooterDeclsMap
SvXMLImportContext * CreateMetaContext(const sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
Definition: sdxmlimp.cxx:426
bool mbIsTableShapeSupported
Definition: xmlimp.hxx:257
SAL_DLLPUBLIC_EXPORT uno::XInterface * com_sun_star_comp_Draw_XMLOasisImporter_get_implementation(uno::XComponentContext *pCtx, uno::Sequence< uno::Any > const &)
Definition: sdxmlimp.cxx:221
SAL_DLLPUBLIC_EXPORT uno::XInterface * com_sun_star_comp_Draw_XMLOasisMetaImporter_get_implementation(uno::XComponentContext *pCtx, uno::Sequence< uno::Any > const &)
Definition: sdxmlimp.cxx:247
SvXMLStylesContext * CreateAutoStylesContext()
Definition: sdxmlimp.cxx:454
SvXMLImportContext * CreateFontDeclsContext()
Definition: sdxmlimp.cxx:472
HeaderFooterDeclMap maHeaderDeclsMap
SAL_DLLPUBLIC_EXPORT uno::XInterface * com_sun_star_comp_Draw_XMLOasisSettingsImporter_get_implementation(uno::XComponentContext *pCtx, uno::Sequence< uno::Any > const &)
Definition: sdxmlimp.cxx:255
rtl::Reference< SdXMLMasterStylesContext > mxMasterStylesContext
ProgressBarHelper * GetProgressBarHelper()
Definition: xmlimp.cxx:1436
void AddDateTimeDecl(const OUString &rName, const OUString &rText, bool bFixed, const OUString &rDateTimeFormat)
Definition: sdxmlimp.cxx:608
virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > &aArguments) override
Definition: sdxmlimp.cxx:371
void AddHeaderDecl(const OUString &rName, const OUString &rText)
Definition: sdxmlimp.cxx:596
SvXMLImportContext * CreateMasterStylesContext()
Definition: sdxmlimp.cxx:465
This class deliberately does not support XWeak, to improve performance when loading large documents...
Definition: xmlictxt.hxx:44
virtual void SetConfigurationSettings(const css::uno::Sequence< css::beans::PropertyValue > &aConfigProps) override
Definition: sdxmlimp.cxx:524
SvXMLStylesContext * CreateStylesContext()
Definition: sdxmlimp.cxx:443
css::uno::Reference< css::container::XNameAccess > mxDocStyleFamilies
constexpr sal_uInt16 XML_NAMESPACE_PRESENTATION
SAL_DLLPUBLIC_EXPORT uno::XInterface * com_sun_star_comp_Impress_XMLOasisSettingsImporter_get_implementation(uno::XComponentContext *pCtx, uno::Sequence< uno::Any > const &)
Definition: sdxmlimp.cxx:290
const PropertyValue * pValues
OUString GetFooterDecl(const OUString &rName) const
Definition: sdxmlimp.cxx:630
SvXMLImportFlags getImportFlags() const
Definition: xmlimp.hxx:455
const OUString & GetXMLToken(enum XMLTokenEnum eToken)
return the OUString representation for eToken
Definition: xmltoken.cxx:3425
constexpr sal_uInt16 XML_NAMESPACE_SMIL
OUString GetDateTimeDecl(const OUString &rName, bool &rbFixed, OUString &rDateTimeFormat)
Definition: sdxmlimp.cxx:640
Handling of tokens in XML:
static constexpr OUStringLiteral gsPageLayouts
#define SAL_INFO(area, stream)
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
virtual void SetStatistics(const css::uno::Sequence< css::beans::NamedValue > &i_rStats)
Definition: xmlimp.cxx:899
#define XML_ELEMENT(prefix, name)
Definition: xmlimp.hxx:96
sal_uInt16 Add(const OUString &rPrefix, const OUString &rName, sal_uInt16 nKey=XML_NAMESPACE_UNKNOWN)
const css::uno::Reference< css::frame::XModel > & GetModel() const
Definition: xmlimp.hxx:403
void SetValue(sal_Int32 nValue)
css::uno::Reference< css::container::XIndexAccess > mxDocDrawPages
const struct statistic s_stats[]
SAL_DLLPUBLIC_EXPORT uno::XInterface * com_sun_star_comp_Impress_XMLOasisImporter_get_implementation(uno::XComponentContext *pCtx, uno::Sequence< uno::Any > const &)
Definition: sdxmlimp.cxx:213
const css::uno::Reference< css::beans::XPropertySet > & getImportInfo() const
Definition: xmlimp.hxx:385
void SetReference(sal_Int32 nVal)
handles the top-level office:document-meta element of meta.xml documents
Definition: xmlmetai.hxx:35
virtual void SetStatistics(const css::uno::Sequence< css::beans::NamedValue > &i_rStats) override
Definition: sdxmlimp.cxx:567
#define SAL_WARN(area, stream)
SAL_DLLPUBLIC_EXPORT uno::XInterface * com_sun_star_comp_Impress_XMLOasisMetaImporter_get_implementation(uno::XComponentContext *pCtx, uno::Sequence< uno::Any > const &)
Definition: sdxmlimp.cxx:282
virtual void SAL_CALL setTargetDocument(const css::uno::Reference< css::lang::XComponent > &xDoc) override
Definition: xmlimp.cxx:906
SAL_DLLPUBLIC_EXPORT uno::XInterface * com_sun_star_comp_Draw_XMLOasisStylesImporter_get_implementation(uno::XComponentContext *pCtx, uno::Sequence< uno::Any > const &)
Definition: sdxmlimp.cxx:228
SdXMLImport(const css::uno::Reference< css::uno::XComponentContext > &xContext, OUString const &implementationName, bool bIsDraw, SvXMLImportFlags nImportFlags)
Definition: sdxmlimp.cxx:297
DateTimeDeclMap maDateTimeDeclsMap
rtl::Reference< XMLShapeImportHelper > const & GetShapeImport()
Definition: xmlimp.hxx:607