LibreOffice Module sw (master) 1
wrtxml.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 <com/sun/star/embed/XStorage.hpp>
21#include <com/sun/star/embed/ElementModes.hpp>
22#include <com/sun/star/beans/PropertyAttribute.hpp>
23#include <com/sun/star/beans/XPropertySet.hpp>
24#include <com/sun/star/task/XStatusIndicator.hpp>
25#include <com/sun/star/xml/sax/Writer.hpp>
26#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
27#include <com/sun/star/document/XExporter.hpp>
28#include <com/sun/star/document/XFilter.hpp>
29#include <com/sun/star/frame/XModule.hpp>
30
31#include <officecfg/Office/Common.hxx>
36#include <vcl/errinf.hxx>
37#include <osl/diagnose.h>
38#include <sal/log.hxx>
39#include <svx/xmlgrhlp.hxx>
40#include <svx/xmleohlp.hxx>
41#include <svl/stritem.hxx>
42#include <sfx2/frame.hxx>
43#include <sfx2/docfile.hxx>
44#include <sfx2/sfxsids.hrc>
45#include <pam.hxx>
46#include <doc.hxx>
47#include <docfunc.hxx>
52#include <rootfrm.hxx>
53#include <docstat.hxx>
54#include <docsh.hxx>
55
58#include <swerror.h>
59#include "wrtxml.hxx"
60#include "zorder.hxx"
61#include <strings.hrc>
62
64#include <com/sun/star/rdf/XDocumentMetadataAccess.hpp>
65
66using namespace ::com::sun::star;
67using namespace ::com::sun::star::uno;
68using namespace ::com::sun::star::container;
69using namespace ::com::sun::star::document;
70using namespace ::com::sun::star::beans;
71using namespace ::com::sun::star::lang;
72
73SwXMLWriter::SwXMLWriter( const OUString& rBaseURL )
74{
75 SetBaseURL( rBaseURL );
76}
77
79{
80}
81
83{
84 uno::Reference<task::XStatusIndicator> xStatusIndicator;
85 OUString aDocHierarchicalName;
86 bool bNoEmbDS(false);
87
88 if (pMediumItemSet)
89 {
90 const SfxUnoAnyItem* pStatusBarItem =
91 pMediumItemSet->GetItem(SID_PROGRESS_STATUSBAR_CONTROL);
92 if (pStatusBarItem)
93 pStatusBarItem->GetValue() >>= xStatusIndicator;
94 const SfxStringItem* pDocHierarchItem =
95 pMediumItemSet->GetItem(SID_DOC_HIERARCHICALNAME);
96 if (pDocHierarchItem)
97 aDocHierarchicalName = pDocHierarchItem->GetValue();
98 const SfxBoolItem* pNoEmbDS = pMediumItemSet->GetItem(SID_NO_EMBEDDED_DS);
99 if (pNoEmbDS)
100 bNoEmbDS = pNoEmbDS->GetValue();
101 }
102
103 // Get service factory
104 uno::Reference< uno::XComponentContext > xContext =
106
107 // Get data sink ...
108 uno::Reference<document::XGraphicStorageHandler> xGraphicStorageHandler;
110 uno::Reference< document::XEmbeddedObjectResolver > xObjectResolver;
112
113 OSL_ENSURE( m_xStg.is(), "Where is my storage?" );
114 xGraphicHelper = SvXMLGraphicHelper::Create( m_xStg,
115 SvXMLGraphicHelperMode::Write );
116 xGraphicStorageHandler = xGraphicHelper.get();
117
118 SfxObjectShell *pPersist = m_pDoc->GetPersist();
119 if( pPersist )
120 {
121 xObjectHelper = SvXMLEmbeddedObjectHelper::Create(
122 m_xStg, *pPersist,
123 SvXMLEmbeddedObjectHelperMode::Write );
124 xObjectResolver = xObjectHelper.get();
125 }
126
127 // create and prepare the XPropertySet that gets passed through
128 // the components, and the XStatusIndicator that shows progress to
129 // the user.
130
131 // create XPropertySet with three properties for status indicator
132 static comphelper::PropertyMapEntry const aInfoMap[] =
133 {
134 { OUString("ProgressRange"), 0,
136 beans::PropertyAttribute::MAYBEVOID, 0},
137 { OUString("ProgressMax"), 0,
139 beans::PropertyAttribute::MAYBEVOID, 0},
140 { OUString("ProgressCurrent"), 0,
142 beans::PropertyAttribute::MAYBEVOID, 0},
143 { OUString("WrittenNumberStyles"), 0,
145 beans::PropertyAttribute::MAYBEVOID, 0},
146 { OUString("UsePrettyPrinting"), 0,
148 beans::PropertyAttribute::MAYBEVOID, 0},
149 { OUString("ShowChanges"), 0,
151 beans::PropertyAttribute::MAYBEVOID, 0 },
152 { OUString("RedlineProtectionKey"), 0,
154 beans::PropertyAttribute::MAYBEVOID, 0 },
155 { OUString("BaseURI"), 0,
157 beans::PropertyAttribute::MAYBEVOID, 0 },
158 { OUString("StreamRelPath"), 0,
160 beans::PropertyAttribute::MAYBEVOID, 0 },
161 { OUString("StreamName"), 0,
163 beans::PropertyAttribute::MAYBEVOID, 0 },
164 { OUString("AutoTextMode"), 0,
166 beans::PropertyAttribute::MAYBEVOID, 0 },
167 { OUString("StyleNames"), 0,
169 beans::PropertyAttribute::MAYBEVOID, 0 },
170 { OUString("StyleFamilies"), 0,
172 beans::PropertyAttribute::MAYBEVOID, 0 },
173 // #i69627#
174 { OUString("OutlineStyleAsNormalListStyle"), 0,
176 beans::PropertyAttribute::MAYBEVOID, 0 },
177 { OUString("TargetStorage"),0, cppu::UnoType<embed::XStorage>::get(),
178 css::beans::PropertyAttribute::MAYBEVOID, 0 },
179 // tdf#144532
180 { OUString("NoEmbDataSet"), 0,
182 beans::PropertyAttribute::MAYBEVOID, 0 },
183 };
184 uno::Reference< beans::XPropertySet > xInfoSet(
186 new comphelper::PropertySetInfo( aInfoMap ) ) );
187
188 xInfoSet->setPropertyValue( "TargetStorage", Any( m_xStg ) );
189
190 xInfoSet->setPropertyValue("NoEmbDataSet", Any(bNoEmbDS));
191
192 if (m_bShowProgress)
193 {
194 // set progress range and start status indicator
195 sal_Int32 nProgressRange(1000000);
196 if (xStatusIndicator.is())
197 {
198 xStatusIndicator->start(SwResId( STR_STATSTR_SWGWRITE),
199 nProgressRange);
200 }
201 xInfoSet->setPropertyValue("ProgressRange", Any(nProgressRange));
202
203 xInfoSet->setPropertyValue("ProgressMax", Any(static_cast < sal_Int32 >( -1 )));
204 }
205
206 xInfoSet->setPropertyValue( "UsePrettyPrinting", Any(officecfg::Office::Common::Save::Document::PrettyPrinting::get()) );
207
208 uno::Reference<lang::XComponent> const xModelComp(m_pDoc->GetDocShell()->GetModel());
209 uno::Reference<drawing::XDrawPageSupplier> const xDPS(xModelComp, uno::UNO_QUERY);
210 assert(xDPS.is());
212
213 // save show redline mode ...
214 RedlineFlags const nOrigRedlineFlags = m_pDoc->getIDocumentRedlineAccess().GetRedlineFlags();
215 RedlineFlags nRedlineFlags(nOrigRedlineFlags);
216 bool isShowChanges;
217 // TODO: ideally this would be stored per-view...
219 isShowChanges = pLayout == nullptr || !pLayout->IsHideRedlines();
220 xInfoSet->setPropertyValue("ShowChanges", Any(isShowChanges));
221 // ... and hide redlines for export
222 nRedlineFlags &= ~RedlineFlags::ShowMask;
223 nRedlineFlags |= RedlineFlags::ShowInsert;
225
226 // Set base URI
227 xInfoSet->setPropertyValue( "BaseURI", Any( GetBaseURL() ) );
228
229 if( SfxObjectCreateMode::EMBEDDED == m_pDoc->GetDocShell()->GetCreateMode() )
230 {
231 const OUString aName( !aDocHierarchicalName.isEmpty()
232 ? aDocHierarchicalName
233 : OUString( "dummyObjectName" ) );
234
235 xInfoSet->setPropertyValue( "StreamRelPath", Any( aName ) );
236 }
237
238 if( m_bBlock )
239 {
240 xInfoSet->setPropertyValue( "AutoTextMode", Any(true) );
241 }
242
243 // #i69627#
244 const bool bOASIS = ( SotStorage::GetVersion( m_xStg ) > SOFFICE_FILEFORMAT_60 );
245 if ( bOASIS &&
247 {
248 xInfoSet->setPropertyValue( "OutlineStyleAsNormalListStyle", Any( true ) );
249 }
250
251 // filter arguments
252 // - graphics + object resolver for styles + content
253 // - status indicator
254 // - info property set
255 // - else empty
256 sal_Int32 nArgs = 1;
257 if( xStatusIndicator.is() )
258 nArgs++;
259
260 Sequence < Any > aEmptyArgs( nArgs );
261 Any *pArgs = aEmptyArgs.getArray();
262 *pArgs++ <<= xInfoSet;
263 if( xStatusIndicator.is() )
264 *pArgs++ <<= xStatusIndicator;
265
266 if( xGraphicStorageHandler.is() )
267 nArgs++;
268 if( xObjectResolver.is() )
269 nArgs++;
270
271 Sequence < Any > aFilterArgs( nArgs );
272 pArgs = aFilterArgs.getArray();
273 *pArgs++ <<= xInfoSet;
274 if( xGraphicStorageHandler.is() )
275 *pArgs++ <<= xGraphicStorageHandler;
276 if( xObjectResolver.is() )
277 *pArgs++ <<= xObjectResolver;
278 if( xStatusIndicator.is() )
279 *pArgs++ <<= xStatusIndicator;
280
283
284 // properties
285 Sequence < PropertyValue > aProps( m_pOrigFileName ? 1 : 0 );
286 if( m_pOrigFileName )
287 {
288 PropertyValue *pProps = aProps.getArray();
289 pProps->Name = "FileName";
290 pProps->Value <<= *m_pOrigFileName;
291 }
292
293 // export sub streams for package, else full stream into a file
294 bool bWarn = false;
295
296 // RDF metadata: export if ODF >= 1.2
297 // N.B.: embedded documents have their own manifest.rdf!
298 if ( bOASIS )
299 {
300 const uno::Reference<beans::XPropertySet> xPropSet(m_xStg,
301 uno::UNO_QUERY_THROW);
302 try
303 {
304 OUString Version;
305 // ODF >= 1.2
306 if ((xPropSet->getPropertyValue("Version") >>= Version)
309 {
310 const uno::Reference<rdf::XDocumentMetadataAccess> xDMA(
311 xModelComp, uno::UNO_QUERY_THROW);
312 xDMA->storeMetadataToStorage(m_xStg);
313 }
314 }
315 catch (beans::UnknownPropertyException &)
316 { /* ignore */ }
317 catch (uno::Exception &)
318 {
319 bWarn = true;
320 }
321 }
322
323 bool bStoreMeta = ( SfxObjectCreateMode::EMBEDDED != m_pDoc->GetDocShell()->GetCreateMode() );
324 if ( !bStoreMeta )
325 {
326 try
327 {
328 Reference< frame::XModule > xModule( xModelComp, UNO_QUERY );
329 if ( xModule.is() )
330 {
331 const OUString aModuleID = xModule->getIdentifier();
332 bStoreMeta = !aModuleID.isEmpty() &&
333 ( aModuleID == "com.sun.star.sdb.FormDesign" ||
334 aModuleID == "com.sun.star.sdb.TextReportDesign" );
335 }
336 }
337 catch( uno::Exception& )
338 {}
339 }
340
341 OUString sWarnFile;
342 if( !m_bOrganizerMode && !m_bBlock && bStoreMeta )
343 {
345 xModelComp, "meta.xml", xContext,
346 (bOASIS ? "com.sun.star.comp.Writer.XMLOasisMetaExporter"
347 : "com.sun.star.comp.Writer.XMLMetaExporter"),
348 aEmptyArgs, aProps ) )
349 {
350 bWarn = true;
351 sWarnFile = "meta.xml";
352 }
353 }
354
355 if( !m_bBlock )
356 {
358 xModelComp, "settings.xml", xContext,
359 (bOASIS ? "com.sun.star.comp.Writer.XMLOasisSettingsExporter"
360 : "com.sun.star.comp.Writer.XMLSettingsExporter"),
361 aEmptyArgs, aProps ) )
362 {
363 if( !bWarn )
364 {
365 bWarn = true;
366 sWarnFile = "settings.xml";
367 }
368 }
369 }
370
371 bool bErr = false;
372
373 OUString sErrFile;
375 xModelComp, "styles.xml", xContext,
376 (bOASIS ? "com.sun.star.comp.Writer.XMLOasisStylesExporter"
377 : "com.sun.star.comp.Writer.XMLStylesExporter"),
378 aFilterArgs, aProps ) )
379 {
380 bErr = true;
381 sErrFile = "styles.xml";
382 }
383
384 if( !m_bOrganizerMode && !bErr )
385 {
387 xModelComp, "content.xml", xContext,
388 (bOASIS ? "com.sun.star.comp.Writer.XMLOasisContentExporter"
389 : "com.sun.star.comp.Writer.XMLContentExporter"),
390 aFilterArgs, aProps ) )
391 {
392 bErr = true;
393 sErrFile = "content.xml";
394 }
395 }
396
398 !(m_bOrganizerMode || m_bBlock || bErr ||
399 // sw_redlinehide: disable layout cache for now
401 {
402 try
403 {
404 uno::Reference < io::XStream > xStm = m_xStg->openStreamElement( "layout-cache", embed::ElementModes::READWRITE | embed::ElementModes::TRUNCATE );
405 std::unique_ptr<SvStream> pStream = utl::UcbStreamHelper::CreateStream( xStm );
406 if( !pStream->GetError() )
407 {
408 uno::Reference < beans::XPropertySet > xSet( xStm, UNO_QUERY );
409 uno::Any aAny2;
410 aAny2 <<= OUString("application/binary");
411 xSet->setPropertyValue("MediaType", aAny2 );
412 m_pDoc->WriteLayoutCache( *pStream );
413 }
414 }
415 catch ( uno::Exception& )
416 {
417 }
418 }
419
420 if( xGraphicHelper )
421 xGraphicHelper->dispose();
422 xGraphicHelper.clear();
423 xGraphicStorageHandler = nullptr;
424
425 if( xObjectHelper )
426 xObjectHelper->dispose();
427 xObjectHelper.clear();
428 xObjectResolver = nullptr;
429
430 // restore redline mode
432 nRedlineFlags &= ~RedlineFlags::ShowMask;
433 nRedlineFlags |= RedlineFlags::ShowInsert;
434 nRedlineFlags |= nOrigRedlineFlags & RedlineFlags::ShowMask;
436
437 // tdf#115815 restore annotation ranges collapsed by hide redlines
439
440 if (xStatusIndicator.is())
441 {
442 xStatusIndicator->end();
443 }
444
445 if( bErr )
446 {
447 if( !sErrFile.isEmpty() )
448 return *new StringErrorInfo( ERR_WRITE_ERROR_FILE, sErrFile,
449 DialogMask::ButtonsOk | DialogMask::MessageError );
450 return ERR_SWG_WRITE_ERROR;
451 }
452 else if( bWarn )
453 {
454 if( !sWarnFile.isEmpty() )
455 return *new StringErrorInfo( WARN_WRITE_ERROR_FILE, sWarnFile,
456 DialogMask::ButtonsOk | DialogMask::MessageError );
458 }
459
460 return ERRCODE_NONE;
461}
462
464{
465 return Write_(nullptr);
466}
467
469{
470 return Write_(&aTargetMedium.GetItemSet());
471}
472
474 const OUString* pFileName )
475{
476 return IsStgWriter()
477 ? static_cast<StgWriter *>(this)->Write( rPaM, rMed.GetOutputStorage(), pFileName, &rMed )
478 : static_cast<Writer *>(this)->Write( rPaM, *rMed.GetOutStream(), pFileName );
479}
480
482 const uno::Reference<XComponent> & xComponent,
483 const char* pStreamName,
484 const uno::Reference<uno::XComponentContext> & rxContext,
485 const char* pServiceName,
486 const Sequence<Any> & rArguments,
487 const Sequence<beans::PropertyValue> & rMediaDesc )
488{
489 OSL_ENSURE( m_xStg.is(), "Need storage!" );
490 OSL_ENSURE( nullptr != pStreamName, "Need stream name!" );
491 OSL_ENSURE( nullptr != pServiceName, "Need service name!" );
492
493 SAL_INFO( "sw.filter", "SwXMLWriter::WriteThroughComponent : stream " << pStreamName );
494 // open stream
495 bool bRet = false;
496 try
497 {
498 const OUString sStreamName = OUString::createFromAscii( pStreamName );
499 uno::Reference<io::XStream> xStream =
500 m_xStg->openStreamElement( sStreamName,
501 embed::ElementModes::READWRITE | embed::ElementModes::TRUNCATE );
502
503 uno::Reference <beans::XPropertySet > xSet( xStream, uno::UNO_QUERY );
504 if( !xSet.is() )
505 return false;
506
507 xSet->setPropertyValue("MediaType", Any(OUString("text/xml")) );
508
509 // even plain stream should be encrypted in encrypted documents
510 xSet->setPropertyValue( "UseCommonStoragePasswordEncryption", Any(true) );
511
512 // set buffer and create outputstream
513 uno::Reference< io::XOutputStream > xOutputStream = xStream->getOutputStream();
514
515 // set Base URL
516 uno::Reference< beans::XPropertySet > xInfoSet;
517 if( rArguments.hasElements() )
518 rArguments.getConstArray()[0] >>= xInfoSet;
519 OSL_ENSURE( xInfoSet.is(), "missing property set" );
520 if( xInfoSet.is() )
521 {
522 xInfoSet->setPropertyValue( "StreamName", Any( sStreamName ) );
523 }
524
525 // write the stuff
527 xOutputStream, xComponent, rxContext,
528 pServiceName, rArguments, rMediaDesc );
529 }
530 catch ( uno::Exception& )
531 {
532 }
533
534 return bRet;
535
536}
537
539 const uno::Reference<io::XOutputStream> & xOutputStream,
540 const uno::Reference<XComponent> & xComponent,
541 const uno::Reference<XComponentContext> & rxContext,
542 const char* pServiceName,
543 const Sequence<Any> & rArguments,
544 const Sequence<PropertyValue> & rMediaDesc )
545{
546 OSL_ENSURE( xOutputStream.is(), "I really need an output stream!" );
547 OSL_ENSURE( xComponent.is(), "Need component!" );
548 OSL_ENSURE( nullptr != pServiceName, "Need component name!" );
549
550 // get component
551 uno::Reference< xml::sax::XWriter > xSaxWriter = xml::sax::Writer::create(rxContext);
552 SAL_INFO( "sw.filter", "SAX-Writer created" );
553 // connect XML writer to output stream
554 xSaxWriter->setOutputStream( xOutputStream );
555
556 // prepare arguments (prepend doc handler to given arguments)
557 Sequence<Any> aArgs( 1 + rArguments.getLength() );
558 auto pArgs = aArgs.getArray();
559 *pArgs <<= xSaxWriter;
560 std::copy(rArguments.begin(), rArguments.end(), std::next(pArgs));
561
562 // get filter component
563 uno::Reference< document::XExporter > xExporter(
564 rxContext->getServiceManager()->createInstanceWithArgumentsAndContext(
565 OUString::createFromAscii(pServiceName), aArgs, rxContext), UNO_QUERY);
566 OSL_ENSURE( xExporter.is(),
567 "can't instantiate export filter component" );
568 if( !xExporter.is() )
569 return false;
570 SAL_INFO( "sw.filter", pServiceName << " instantiated." );
571 // connect model and filter
572 xExporter->setSourceDocument( xComponent );
573
574 // filter!
575 SAL_INFO( "sw.filter", "call filter()" );
576 uno::Reference<XFilter> xFilter( xExporter, UNO_QUERY );
577 return xFilter->filter( rMediaDesc );
578}
579
581 [[maybe_unused]] std::u16string_view /*rName*/, const OUString& rBaseURL, WriterRef& xRet )
582{
583 xRet = new SwXMLWriter( rBaseURL );
584}
585
586/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
@ ShowInsert
show all inserts
Reference< XInputStream > xStream
const OUString & GetValue() const
virtual const SwRootFrame * GetCurrentLayout() const =0
virtual const SwViewShell * GetCurrentViewShell() const =0
Returns the layout set at the document.
virtual void restoreAnnotationMarks(bool bDelete=true)=0
virtual void SetRedlineFlags(RedlineFlags eMode)=0
Set a new redline mode.
virtual RedlineFlags GetRedlineFlags() const =0
Query the currently set redline mode.
virtual const SwDocStat & GetDocStat() const =0
Document - Statistics.
bool GetValue() const
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
SfxItemSet & GetItemSet() const
SvStream * GetOutStream()
css::uno::Reference< css::embed::XStorage > GetOutputStorage()
css::uno::Reference< css::frame::XModel3 > GetModel() const
SfxObjectCreateMode GetCreateMode() const
const css::uno::Any & GetValue() const
sal_Int32 GetVersion() const
virtual bool IsStgWriter() const override
Definition: fltini.cxx:190
css::uno::Reference< css::embed::XStorage > m_xStg
Definition: shellio.hxx:477
static rtl::Reference< SvXMLEmbeddedObjectHelper > Create(const css::uno::Reference< css::embed::XStorage > &, ::comphelper::IEmbeddedHelper &rDocPersist, SvXMLEmbeddedObjectHelperMode eCreateMode)
static rtl::Reference< SvXMLGraphicHelper > Create(const css::uno::Reference< css::embed::XStorage > &rXMLStorage, SvXMLGraphicHelperMode eCreateMode)
void WriteLayoutCache(SvStream &rStream)
Definition: docnew.cxx:814
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
Definition: doc.cxx:349
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
Definition: doc.cxx:419
SfxObjectShell * GetPersist() const
Definition: docnew.cxx:653
IDocumentMarkAccess * getIDocumentMarkAccess()
Definition: docbm.cxx:1890
IDocumentDrawModelAccess const & getIDocumentDrawModelAccess() const
Definition: doc.cxx:169
SwDocShell * GetDocShell()
Definition: doc.hxx:1370
IDocumentStatistics const & getIDocumentStatistics() const
Definition: doc.cxx:387
PaM is Point and Mark: a selection of the document model.
Definition: pam.hxx:188
The root element of a Writer document layout.
Definition: rootfrm.hxx:85
bool HasMergedParas() const
Definition: wsfrm.cxx:4773
bool IsHideRedlines() const
Replacement for sw::DocumentRedlineManager::GetRedlineFlags() (this is layout-level redline hiding).
Definition: rootfrm.hxx:434
virtual ErrCode Write(SwPaM &, SfxMedium &, const OUString *) override
Definition: wrtxml.cxx:473
bool WriteThroughComponent(const css::uno::Reference< css::lang::XComponent > &xComponent, const char *pStreamName, const css::uno::Reference< css::uno::XComponentContext > &rFactory, const char *pServiceName, const css::uno::Sequence< css::uno::Any > &rArguments, const css::uno::Sequence< css::beans::PropertyValue > &rMediaDesc)
ErrCode Write_(const SfxItemSet *pMediumItemSet)
Definition: wrtxml.cxx:82
virtual ErrCode WriteMedium(SfxMedium &aTargetMedium) override
Definition: wrtxml.cxx:468
virtual ErrCode WriteStorage() override
Definition: wrtxml.cxx:463
virtual ~SwXMLWriter() override
Definition: wrtxml.cxx:78
SwXMLWriter(const OUString &rBaseURL)
Definition: wrtxml.cxx:73
bool m_bShowProgress
Definition: shellio.hxx:411
void PutEditEngFontsInAttrPool()
Definition: writer.cxx:351
bool m_bBlock
Definition: shellio.hxx:420
bool m_bOrganizerMode
Definition: shellio.hxx:421
void PutNumFormatFontsInAttrPool()
Definition: writer.cxx:309
SwDoc * m_pDoc
Definition: shellio.hxx:407
void SetBaseURL(const OUString &rURL)
Definition: shellio.hxx:398
const OUString * m_pOrigFileName
Definition: shellio.hxx:389
virtual ErrCode Write(SwPaM &, SfxMedium &, const OUString *)
Definition: writer.cxx:244
const OUString & GetBaseURL() const
Definition: shellio.hxx:443
css::uno::Type const & get()
static std::unique_ptr< SvStream > CreateStream(const OUString &rFileName, StreamMode eOpenMode, css::uno::Reference< css::awt::XWindow > xParentWin=nullptr)
constexpr OUStringLiteral ODFVER_011_TEXT
constexpr OUStringLiteral ODFVER_010_TEXT
#define ERRCODE_NONE
#define SOFFICE_FILEFORMAT_60
OUString aName
#define SAL_INFO(area, stream)
COMPHELPER_DLLPUBLIC css::uno::Reference< css::beans::XPropertySet > GenericPropertySet_CreateInstance(PropertySetInfo *pInfo)
Reference< XComponentContext > getProcessComponentContext()
bool HasOutlineStyleToBeWrittenAsNormalListStyle(SwDoc &rDoc)
method to check, if the outline style has to written as a normal list style
Definition: docfmt.cxx:2044
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
void FixZOrder(uno::Reference< drawing::XShapes > const &xShapes, std::function< unsigned int(uno::Reference< beans::XPropertySet > const &)> const &rGetLayer)
sal_uLong nPage
Definition: docstat.hxx:30
#define ERR_WRITE_ERROR_FILE
Definition: swerror.h:31
#define ERR_SWG_WRITE_ERROR
Definition: swerror.h:30
#define WARN_SWG_FEATURES_LOST
Definition: swerror.h:38
#define WARN_WRITE_ERROR_FILE
Definition: swerror.h:41
OUString SwResId(TranslateId aId)
Definition: swmodule.cxx:168
void GetXMLWriter(std::u16string_view, const OUString &rBaseURL, WriterRef &xRet)
Definition: wrtxml.cxx:580