android: Update app-specific/MIME type icons
[LibreOffice.git] / sw / source / filter / xml / xmlexp.cxx
blob934a3e64ea02bc8c06b665682e84521abd75511e
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #include <com/sun/star/text/XTextDocument.hpp>
21 #include <com/sun/star/drawing/XDrawPageSupplier.hpp>
22 #include <com/sun/star/beans/XPropertySet.hpp>
23 #include <com/sun/star/container/XIndexContainer.hpp>
24 #include <com/sun/star/xforms/XFormsSupplier.hpp>
25 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
27 #include <comphelper/indexedpropertyvalues.hxx>
28 #include <osl/diagnose.h>
29 #include <o3tl/any.hxx>
30 #include <sax/tools/converter.hxx>
31 #include <svx/svdpage.hxx>
32 #include <svx/xmleohlp.hxx>
33 #include <svx/xmlgrhlp.hxx>
34 #include <editeng/eeitem.hxx>
35 #include <svx/svddef.hxx>
36 #include <tools/UnitConversion.hxx>
37 #include <xmloff/namespacemap.hxx>
38 #include <xmloff/xmlnamespace.hxx>
39 #include <editeng/xmlcnitm.hxx>
40 #include <xmloff/ProgressBarHelper.hxx>
41 #include <xmloff/xmluconv.hxx>
42 #include <xmloff/xformsexport.hxx>
43 #include <drawdoc.hxx>
44 #include <doc.hxx>
45 #include <swmodule.hxx>
46 #include <docsh.hxx>
47 #include <viewsh.hxx>
48 #include <rootfrm.hxx>
49 #include <docstat.hxx>
50 #include <swerror.h>
51 #include <unotext.hxx>
52 #include "xmltexte.hxx"
53 #include "xmlexp.hxx"
54 #include "xmlexpit.hxx"
55 #include "zorder.hxx"
56 #include <comphelper/processfactory.hxx>
57 #include <docary.hxx>
58 #include <frameformats.hxx>
59 #include <comphelper/servicehelper.hxx>
60 #include <vcl/svapp.hxx>
61 #include <IDocumentSettingAccess.hxx>
62 #include <IDocumentDrawModelAccess.hxx>
63 #include <IDocumentRedlineAccess.hxx>
64 #include <IDocumentStatistics.hxx>
65 #include <IDocumentLayoutAccess.hxx>
68 #include <pausethreadstarting.hxx>
70 using namespace ::com::sun::star;
71 using namespace ::com::sun::star::lang;
72 using namespace ::com::sun::star::xml::sax;
73 using namespace ::com::sun::star::uno;
74 using namespace ::com::sun::star::text;
75 using namespace ::com::sun::star::container;
76 using namespace ::com::sun::star::document;
77 using namespace ::com::sun::star::drawing;
78 using namespace ::com::sun::star::beans;
79 using namespace ::com::sun::star::i18n;
80 using namespace ::com::sun::star::xforms;
81 using namespace ::xmloff::token;
83 SwXMLExport::SwXMLExport(
84 const uno::Reference< uno::XComponentContext >& rContext,
85 OUString const & implementationName, SvXMLExportFlags nExportFlags)
86 : SvXMLExport( rContext, implementationName, util::MeasureUnit::INCH, XML_TEXT,
87 nExportFlags ),
88 m_bBlock( false ),
89 m_bShowProgress( true ),
90 m_bSavedShowChanges( false ),
91 m_pDoc( nullptr )
93 InitItemExport();
96 ErrCode SwXMLExport::exportDoc( enum XMLTokenEnum eClass )
98 if( !GetModel().is() )
99 return ERR_SWG_WRITE_ERROR;
101 SwPauseThreadStarting aPauseThreadStarting; // #i73788#
103 // from here, we use core interfaces -> lock Solar-Mutex
104 SolarMutexGuard aGuard;
107 Reference<XPropertySet> rInfoSet = getExportInfo();
108 if( rInfoSet.is() )
110 static const OUStringLiteral sAutoTextMode(u"AutoTextMode");
111 if( rInfoSet->getPropertySetInfo()->hasPropertyByName(
112 sAutoTextMode ) )
114 Any aAny = rInfoSet->getPropertyValue(sAutoTextMode);
115 if( auto b = o3tl::tryAccess<bool>(aAny) )
117 if( *b )
118 m_bBlock = true;
124 SwDoc *pDoc = getDoc();
125 if (!pDoc)
126 return ERR_SWG_WRITE_ERROR;
128 if( getExportFlags() & (SvXMLExportFlags::FONTDECLS|SvXMLExportFlags::STYLES|
129 SvXMLExportFlags::MASTERSTYLES|SvXMLExportFlags::CONTENT))
131 if (getSaneDefaultVersion() & SvtSaveOptions::ODFSVER_EXTENDED)
133 GetNamespaceMap_().Add(
134 GetXMLToken(XML_NP_OFFICE_EXT),
135 GetXMLToken(XML_N_OFFICE_EXT),
136 XML_NAMESPACE_OFFICE_EXT);
139 GetTextParagraphExport()->SetBlockMode( m_bBlock );
141 const SfxItemPool& rPool = pDoc->GetAttrPool();
142 sal_uInt16 aWhichIds[5] = { RES_UNKNOWNATR_CONTAINER,
143 RES_TXTATR_UNKNOWN_CONTAINER,
144 SDRATTR_XMLATTRIBUTES,
145 EE_PARA_XMLATTRIBS,
146 EE_CHAR_XMLATTRIBS };
148 const int nWhichIds = rPool.GetSecondaryPool() ? 5 : 2;
149 for( int j=0; j < nWhichIds; ++j )
151 const sal_uInt16 nWhichId = aWhichIds[j];
152 for (const SfxPoolItem* pItem : rPool.GetItemSurrogates(nWhichId))
154 auto pUnknown = dynamic_cast<const SvXMLAttrContainerItem*>( pItem );
155 OSL_ENSURE( pUnknown, "illegal attribute container item" );
156 if( pUnknown && (pUnknown->GetAttrCount() > 0) )
158 sal_uInt16 nIdx = pUnknown->GetFirstNamespaceIndex();
159 while( USHRT_MAX != nIdx )
161 GetNamespaceMap_().Add( pUnknown->GetPrefix( nIdx ),
162 pUnknown->GetNamespace( nIdx ) );
163 nIdx = pUnknown->GetNextNamespaceIndex( nIdx );
170 sal_uInt16 const eUnit = SvXMLUnitConverter::GetMeasureUnit(
171 SW_MOD()->GetMetric(pDoc->getIDocumentSettingAccess().get(DocumentSettingId::HTML_MODE)));
172 if (GetMM100UnitConverter().GetXMLMeasureUnit() != eUnit )
174 GetMM100UnitConverter().SetXMLMeasureUnit( eUnit );
175 m_pTwipUnitConverter->SetXMLMeasureUnit( eUnit );
178 if( getExportFlags() & SvXMLExportFlags::META)
180 // Update doc stat, so that correct values are exported and
181 // the progress works correctly.
182 pDoc->getIDocumentStatistics().UpdateDocStat( false, true );
184 if( m_bShowProgress )
186 ProgressBarHelper *pProgress = GetProgressBarHelper();
187 if( -1 == pProgress->GetReference() )
189 // progress isn't initialized:
190 // We assume that the whole doc is exported, and the following
191 // durations:
192 // - meta information: 2
193 // - settings: 4 (TODO: not now!)
194 // - styles (except page styles): 2
195 // - page styles: 2 (TODO: not now!) + 2 for each paragraph
196 // - paragraph: 2 (1 for automatic styles and one for content)
198 // count each item once, and then multiply by two to reach the
199 // figures given above
200 // The styles in pDoc also count the default style that never
201 // gets exported -> subtract one.
202 sal_Int32 nRef = 1; // meta.xml
203 nRef += pDoc->GetCharFormats()->size() - 1;
204 nRef += pDoc->GetFrameFormats()->size() - 1;
205 nRef += pDoc->GetTextFormatColls()->size() - 1;
206 nRef *= 2; // for the above styles, xmloff will increment by 2!
207 // #i93174#: count all paragraphs for the progress bar
208 nRef += pDoc->getIDocumentStatistics().GetUpdatedDocStat( false, true ).nAllPara; // 1: only content, no autostyle
209 pProgress->SetReference( nRef );
210 pProgress->SetValue( 0 );
214 if( getExportFlags() & (SvXMLExportFlags::MASTERSTYLES|SvXMLExportFlags::CONTENT))
216 //We depend on the correctness of OrdNums.
217 SwDrawModel* pModel = pDoc->getIDocumentDrawModelAccess().GetDrawModel();
218 if( pModel )
219 pModel->GetPage( 0 )->RecalcObjOrdNums();
222 // adjust document class (eClass)
223 if (pDoc->getIDocumentSettingAccess().get(DocumentSettingId::GLOBAL_DOCUMENT))
225 eClass = XML_TEXT_GLOBAL;
227 // additionally, we take care of the save-linked-sections-thingy
228 mbSaveLinkedSections = pDoc->getIDocumentSettingAccess().get(DocumentSettingId::GLOBAL_DOCUMENT_SAVE_LINKS);
230 // MIB: 03/26/04: The Label information is saved in the settings, so
231 // we don't need it here.
232 // else: keep default pClass that we received
234 rtl::Reference<SvXMLGraphicHelper> xGraphicStorageHandler;
235 if (!GetGraphicStorageHandler().is())
237 xGraphicStorageHandler = SvXMLGraphicHelper::Create(SvXMLGraphicHelperMode::Write, GetImageFilterName());
238 SetGraphicStorageHandler(xGraphicStorageHandler);
241 rtl::Reference<SvXMLEmbeddedObjectHelper> xEmbeddedResolver;
242 if( !GetEmbeddedResolver().is() )
244 SfxObjectShell *pPersist = pDoc->GetPersist();
245 if( pPersist )
247 xEmbeddedResolver = SvXMLEmbeddedObjectHelper::Create(
248 *pPersist,
249 SvXMLEmbeddedObjectHelperMode::Write );
250 SetEmbeddedResolver( xEmbeddedResolver );
254 // set redline mode if we export STYLES or CONTENT, unless redline
255 // mode is taken care of outside (through info XPropertySet)
256 bool bSaveRedline =
257 bool( getExportFlags() & (SvXMLExportFlags::CONTENT|SvXMLExportFlags::STYLES) );
258 if( bSaveRedline )
260 // if the info property set has a ShowChanges property,
261 // then change tracking is taken care of on the outside,
262 // so we don't have to!
263 Reference<XPropertySet> rInfoSet = getExportInfo();
264 if( rInfoSet.is() )
266 bSaveRedline = ! rInfoSet->getPropertySetInfo()->hasPropertyByName(
267 "ShowChanges" );
270 RedlineFlags nRedlineFlags = RedlineFlags::NONE;
271 SwRootFrame const*const pLayout(m_pDoc->getIDocumentLayoutAccess().GetCurrentLayout());
272 m_bSavedShowChanges = pLayout == nullptr || !pLayout->IsHideRedlines();
273 if( bSaveRedline )
275 // tdf#133487 call this once in flat-ODF case
276 uno::Reference<drawing::XDrawPageSupplier> const xDPS(GetModel(), uno::UNO_QUERY);
277 assert(xDPS.is());
278 xmloff::FixZOrder(xDPS->getDrawPage(), sw::GetZOrderLayer(m_pDoc->getIDocumentDrawModelAccess()));
280 // now save and switch redline mode
281 nRedlineFlags = pDoc->getIDocumentRedlineAccess().GetRedlineFlags();
282 pDoc->getIDocumentRedlineAccess().SetRedlineFlags(
283 ( nRedlineFlags & RedlineFlags::ShowMask ) | RedlineFlags::ShowInsert );
286 ErrCode nRet = SvXMLExport::exportDoc( eClass );
288 // now we can restore the redline mode (if we changed it previously)
289 if( bSaveRedline )
291 pDoc->getIDocumentRedlineAccess().SetRedlineFlags( nRedlineFlags );
294 if (xGraphicStorageHandler)
295 xGraphicStorageHandler->dispose();
296 xGraphicStorageHandler.clear();
297 if( xEmbeddedResolver )
298 xEmbeddedResolver->dispose();
299 xEmbeddedResolver.clear();
301 OSL_ENSURE( !m_pTableLines, "there are table columns infos left" );
303 return nRet;
306 XMLTextParagraphExport* SwXMLExport::CreateTextParagraphExport()
308 return new SwXMLTextParagraphExport(*this, *GetAutoStylePool());
311 XMLShapeExport* SwXMLExport::CreateShapeExport()
313 XMLShapeExport* pShapeExport = new XMLShapeExport( *this, XMLTextParagraphExport::CreateShapeExtPropMapper( *this ) );
314 Reference < XDrawPageSupplier > xDPS( GetModel(), UNO_QUERY );
315 if( xDPS.is() )
317 Reference < XShapes > xShapes = xDPS->getDrawPage();
318 pShapeExport->seekShapes( xShapes );
321 return pShapeExport;
324 SwXMLExport::~SwXMLExport()
326 DeleteTableLines();
327 FinitItemExport();
330 void SwXMLExport::ExportFontDecls_()
332 GetFontAutoStylePool(); // make sure the pool is created
333 SvXMLExport::ExportFontDecls_();
336 void SwXMLExport::GetViewSettings(Sequence<PropertyValue>& aProps)
338 aProps.realloc(7);
339 // Currently exporting 9 properties
340 PropertyValue *pValue = aProps.getArray();
342 rtl::Reference< comphelper::IndexedPropertyValuesContainer > xBox = new comphelper::IndexedPropertyValuesContainer();
343 pValue[0].Name = "Views";
344 pValue[0].Value <<= uno::Reference< container::XIndexContainer >(xBox);
346 SwDoc *pDoc = getDoc();
347 const tools::Rectangle rRect =
348 pDoc->GetDocShell()->GetVisArea( ASPECT_CONTENT );
349 bool bTwip = pDoc->GetDocShell()->GetMapUnit ( ) == MapUnit::MapTwip;
351 OSL_ENSURE( bTwip, "Map unit for visible area is not in TWIPS!" );
353 pValue[1].Name = "ViewAreaTop";
354 pValue[1].Value <<= bTwip ? convertTwipToMm100 ( rRect.Top() ) : rRect.Top();
356 pValue[2].Name = "ViewAreaLeft";
357 pValue[2].Value <<= bTwip ? convertTwipToMm100 ( rRect.Left() ) : rRect.Left();
359 pValue[3].Name = "ViewAreaWidth";
360 pValue[3].Value <<= bTwip ? convertTwipToMm100 ( rRect.GetWidth() ) : rRect.GetWidth();
362 pValue[4].Name = "ViewAreaHeight";
363 pValue[4].Value <<= bTwip ? convertTwipToMm100 ( rRect.GetHeight() ) : rRect.GetHeight();
365 // "show redline mode" cannot simply be read from the document
366 // since it gets changed during execution. If it's in the info
367 // XPropertySet, we take it from there.
368 bool bShowRedlineChanges = m_bSavedShowChanges;
369 Reference<XPropertySet> xInfoSet( getExportInfo() );
370 if ( xInfoSet.is() )
372 static const OUStringLiteral sShowChanges( u"ShowChanges" );
373 if( xInfoSet->getPropertySetInfo()->hasPropertyByName( sShowChanges ) )
375 bShowRedlineChanges = *o3tl::doAccess<bool>(xInfoSet->
376 getPropertyValue( sShowChanges ));
380 pValue[5].Name = "ShowRedlineChanges";
381 pValue[5].Value <<= bShowRedlineChanges;
383 pValue[6].Name = "InBrowseMode";
384 pValue[6].Value <<= pDoc->getIDocumentSettingAccess().get(DocumentSettingId::BROWSE_MODE);
387 void SwXMLExport::GetConfigurationSettings( Sequence < PropertyValue >& rProps)
389 Reference< XMultiServiceFactory > xFac( GetModel(), UNO_QUERY );
390 if (!xFac.is())
391 return;
393 Reference< XPropertySet > xProps( xFac->createInstance("com.sun.star.document.Settings"), UNO_QUERY );
394 if (!xProps.is())
395 return;
397 static const std::initializer_list<std::u16string_view> vOmitFalseValues = {
398 u"DoNotBreakWrappedTables",
399 u"AllowTextAfterFloatingTableBreak",
401 SvXMLUnitConverter::convertPropertySet( rProps, xProps, &vOmitFalseValues );
403 // tdf#144532 if NoEmbDataSet was set, to indicate not to write an embedded
404 // database for the case of a temporary mail merge preview document, then
405 // also filter out the "EmbeddedDatabaseName" property from the document
406 // settings so that when the temp mailmerge preview document is closed it
407 // doesn't unregister the database of the same name which was registered by
408 // the document this is a copy of
409 Reference<XPropertySet> rInfoSet = getExportInfo();
411 if (!rInfoSet.is() || !rInfoSet->getPropertySetInfo()->hasPropertyByName(u"NoEmbDataSet"))
412 return;
414 Any aAny = rInfoSet->getPropertyValue(u"NoEmbDataSet");
415 bool bNoEmbDataSet = *o3tl::doAccess<bool>(aAny);
416 if (!bNoEmbDataSet)
417 return;
419 Sequence<PropertyValue> aFilteredProps(rProps.getLength());
420 auto aFilteredPropsRange = asNonConstRange(aFilteredProps);
421 sal_Int32 nFilteredPropLen = 0;
422 for (sal_Int32 i = 0; i < rProps.getLength(); ++i)
424 if (rProps[i].Name == "EmbeddedDatabaseName")
425 continue;
426 aFilteredPropsRange[nFilteredPropLen] = rProps[i];
427 ++nFilteredPropLen;
429 aFilteredProps.realloc(nFilteredPropLen);
430 std::swap(rProps, aFilteredProps);
433 sal_Int32 SwXMLExport::GetDocumentSpecificSettings( std::vector< SettingsGroup >& _out_rSettings )
435 // the only doc-specific settings group we know so far are the XForms settings
436 uno::Sequence<beans::PropertyValue> aXFormsSettings;
437 Reference< XFormsSupplier > xXFormsSupp( GetModel(), UNO_QUERY );
438 Reference< XNameAccess > xXForms;
439 if ( xXFormsSupp.is() )
440 xXForms = xXFormsSupp->getXForms().get();
441 if ( xXForms.is() )
443 getXFormsSettings( xXForms, aXFormsSettings );
444 _out_rSettings.emplace_back( XML_XFORM_MODEL_SETTINGS, aXFormsSettings );
447 return aXFormsSettings.getLength() + SvXMLExport::GetDocumentSpecificSettings( _out_rSettings );
450 void SwXMLExport::SetBodyAttributes()
452 // export use of soft page breaks
453 SwDoc *pDoc = getDoc();
454 if( pDoc->getIDocumentLayoutAccess().GetCurrentViewShell() &&
455 pDoc->getIDocumentLayoutAccess().GetCurrentViewShell()->GetPageCount() > 1 )
457 OUStringBuffer sBuffer;
458 ::sax::Converter::convertBool(sBuffer, true);
459 AddAttribute(XML_NAMESPACE_TEXT, XML_USE_SOFT_PAGE_BREAKS,
460 sBuffer.makeStringAndClear());
464 void SwXMLExport::ExportContent_()
466 // export forms
467 Reference<XDrawPageSupplier> xDrawPageSupplier(GetModel(), UNO_QUERY);
468 if (xDrawPageSupplier.is())
470 // export only if we actually have elements
471 Reference<XDrawPage> xPage = xDrawPageSupplier->getDrawPage();
472 if (xPage.is())
474 // prevent export of form controls which are embedded in mute sections
475 GetTextParagraphExport()->PreventExportOfControlsInMuteSections(
476 xPage, GetFormExport() );
478 // #i36597#
479 if ( xmloff::OFormLayerXMLExport::pageContainsForms( xPage ) || GetFormExport()->documentContainsXForms() )
481 ::xmloff::OOfficeFormsExport aOfficeForms(*this);
483 GetFormExport()->exportXForms();
485 GetFormExport()->seekPage(xPage);
486 GetFormExport()->exportForms(xPage);
491 Reference<XPropertySet> xPropSet(GetModel(), UNO_QUERY);
492 if (xPropSet.is())
494 Any aAny = xPropSet->getPropertyValue( "TwoDigitYear" );
495 aAny <<= sal_Int16(1930);
497 sal_Int16 nYear = 0;
498 aAny >>= nYear;
499 if (nYear != 1930 )
501 AddAttribute(XML_NAMESPACE_TABLE, XML_NULL_YEAR, OUString::number(nYear));
502 SvXMLElementExport aCalcSettings(*this, XML_NAMESPACE_TABLE, XML_CALCULATION_SETTINGS, true, true);
506 GetTextParagraphExport()->exportTrackedChanges( false );
507 GetTextParagraphExport()->exportTextDeclarations();
508 Reference < XTextDocument > xTextDoc( GetModel(), UNO_QUERY );
509 Reference < XText > xText = xTextDoc->getText();
511 GetTextParagraphExport()->exportFramesBoundToPage( m_bShowProgress );
512 GetTextParagraphExport()->exportText( xText, m_bShowProgress );
515 SwDoc* SwXMLExport::getDoc()
517 if( m_pDoc != nullptr )
518 return m_pDoc;
519 Reference < XTextDocument > xTextDoc( GetModel(), UNO_QUERY );
520 if (!xTextDoc)
522 SAL_WARN("sw.filter", "Problem of mismatching filter for export.");
523 return nullptr;
526 Reference < XText > xText = xTextDoc->getText();
527 SwXText* pText = dynamic_cast<SwXText*>(xText.get());
528 assert( pText != nullptr );
529 m_pDoc = pText->GetDoc();
530 assert( m_pDoc != nullptr );
531 return m_pDoc;
534 const SwDoc* SwXMLExport::getDoc() const
536 return const_cast< SwXMLExport* >( this )->getDoc();
539 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
540 com_sun_star_comp_Writer_XMLExporter_get_implementation(css::uno::XComponentContext* context,
541 css::uno::Sequence<css::uno::Any> const &)
543 return cppu::acquire(new SwXMLExport(context, "com.sun.star.comp.Writer.XMLExporter",
544 SvXMLExportFlags::ALL));
547 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
548 com_sun_star_comp_Writer_XMLStylesExporter_get_implementation(css::uno::XComponentContext* context,
549 css::uno::Sequence<css::uno::Any> const &)
551 return cppu::acquire(new SwXMLExport(context, "com.sun.star.comp.Writer.XMLStylesExporter",
552 SvXMLExportFlags::STYLES | SvXMLExportFlags::MASTERSTYLES | SvXMLExportFlags::AUTOSTYLES |
553 SvXMLExportFlags::FONTDECLS));
556 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
557 com_sun_star_comp_Writer_XMLContentExporter_get_implementation(css::uno::XComponentContext* context,
558 css::uno::Sequence<css::uno::Any> const &)
560 return cppu::acquire(new SwXMLExport(context, "com.sun.star.comp.Writer.XMLContentExporter",
561 SvXMLExportFlags::SCRIPTS | SvXMLExportFlags::CONTENT | SvXMLExportFlags::AUTOSTYLES |
562 SvXMLExportFlags::FONTDECLS));
565 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
566 com_sun_star_comp_Writer_XMLMetaExporter_get_implementation(css::uno::XComponentContext* context,
567 css::uno::Sequence<css::uno::Any> const &)
569 return cppu::acquire(new SwXMLExport(context, "com.sun.star.comp.Writer.XMLMetaExporter",
570 SvXMLExportFlags::META));
573 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
574 com_sun_star_comp_Writer_XMLSettingsExporter_get_implementation(css::uno::XComponentContext* context,
575 css::uno::Sequence<css::uno::Any> const &)
577 return cppu::acquire(new SwXMLExport(context, "com.sun.star.comp.Writer.XMLSettingsExporter",
578 SvXMLExportFlags::SETTINGS));
581 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
582 com_sun_star_comp_Writer_XMLOasisExporter_get_implementation(css::uno::XComponentContext* context,
583 css::uno::Sequence<css::uno::Any> const &)
585 return cppu::acquire(new SwXMLExport(context, "com.sun.star.comp.Writer.XMLOasisExporter",
586 SvXMLExportFlags::ALL | SvXMLExportFlags::OASIS));
589 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
590 com_sun_star_comp_Writer_XMLOasisStylesExporter_get_implementation(css::uno::XComponentContext* context,
591 css::uno::Sequence<css::uno::Any> const &)
593 return cppu::acquire(new SwXMLExport(context, "com.sun.star.comp.Writer.XMLOasisStylesExporter",
594 SvXMLExportFlags::STYLES | SvXMLExportFlags::MASTERSTYLES | SvXMLExportFlags::AUTOSTYLES |
595 SvXMLExportFlags::FONTDECLS | SvXMLExportFlags::OASIS));
598 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
599 com_sun_star_comp_Writer_XMLOasisContentExporter_get_implementation(css::uno::XComponentContext* context,
600 css::uno::Sequence<css::uno::Any> const &)
602 return cppu::acquire(new SwXMLExport(context, "com.sun.star.comp.Writer.XMLOasisContentExporter",
603 SvXMLExportFlags::AUTOSTYLES | SvXMLExportFlags::CONTENT | SvXMLExportFlags::SCRIPTS |
604 SvXMLExportFlags::FONTDECLS | SvXMLExportFlags::OASIS));
607 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
608 com_sun_star_comp_Writer_XMLOasisMetaExporter_get_implementation(css::uno::XComponentContext* context,
609 css::uno::Sequence<css::uno::Any> const &)
611 return cppu::acquire(new SwXMLExport(context, "com.sun.star.comp.Writer.XMLOasisMetaExporter",
612 SvXMLExportFlags::META | SvXMLExportFlags::OASIS));
615 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
616 com_sun_star_comp_Writer_XMLOasisSettingsExporter_get_implementation(css::uno::XComponentContext* context,
617 css::uno::Sequence<css::uno::Any> const &)
619 return cppu::acquire(new SwXMLExport(context, "com.sun.star.comp.Writer.XMLOasisSettingsExporter",
620 SvXMLExportFlags::SETTINGS | SvXMLExportFlags::OASIS));
623 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */