LibreOffice Module sw (master) 1
SwXMLTextBlocks1.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/ElementModes.hpp>
21#include <com/sun/star/embed/XTransactedObject.hpp>
22#include <osl/diagnose.h>
23#include <svl/macitem.hxx>
24#include <svtools/unoevent.hxx>
25#include <sfx2/docfile.hxx>
29#include <com/sun/star/beans/XPropertySet.hpp>
30#include <com/sun/star/xml/sax/InputSource.hpp>
31#include <com/sun/star/io/IOException.hpp>
32#include <com/sun/star/xml/sax/FastParser.hpp>
33#include <com/sun/star/xml/sax/FastToken.hpp>
34#include <com/sun/star/xml/sax/Parser.hpp>
35#include <com/sun/star/xml/sax/Writer.hpp>
36#include <com/sun/star/xml/sax/SAXParseException.hpp>
37#include <com/sun/star/document/XStorageBasedDocument.hpp>
38#include <doc.hxx>
39#include <docsh.hxx>
40#include <shellio.hxx>
41#include <SwXMLTextBlocks.hxx>
42#include <SwXMLBlockImport.hxx>
43#include <SwXMLBlockExport.hxx>
45#include <sfx2/event.hxx>
46#include <swerror.h>
47
48constexpr OUStringLiteral XMLN_BLOCKLIST = u"BlockList.xml";
49
50using namespace ::com::sun::star;
51using namespace ::com::sun::star::uno;
52using namespace ::com::sun::star::container;
53using namespace css::xml::sax;
54using namespace xmloff::token;
55
56using ::xmloff::token::XML_BLOCK_LIST;
57using ::xmloff::token::XML_UNFORMATTED_TEXT;
58using ::xmloff::token::GetXMLToken;
59
61{
62 OUString aFolderName ( GetPackageName ( nIdx ) );
63
64 if (!IsOnlyTextBlock ( nIdx ) )
65 {
66 try
67 {
68 m_xRoot = m_xBlkRoot->openStorageElement( aFolderName, embed::ElementModes::READ );
69 m_xMedium = new SfxMedium( m_xRoot, GetBaseURL(), "writer8" );
70 SwReader aReader( *m_xMedium, aFolderName, m_xDoc.get() );
71 ReadXML->SetBlockMode( true );
72 aReader.Read( *ReadXML );
73 ReadXML->SetBlockMode( false );
74 // Ole objects fail to display when inserted into the document, as
75 // the ObjectReplacement folder and contents are missing
76 OUString sObjReplacements( "ObjectReplacements" );
77 if ( m_xRoot->hasByName( sObjReplacements ) )
78 {
79 uno::Reference< document::XStorageBasedDocument > xDocStor( m_xDoc->GetDocShell()->GetModel(), uno::UNO_QUERY_THROW );
80 uno::Reference< embed::XStorage > xStr( xDocStor->getDocumentStorage() );
81 if ( xStr.is() )
82 {
83 m_xRoot->copyElementTo( sObjReplacements, xStr, sObjReplacements );
84 uno::Reference< embed::XTransactedObject > xTrans( xStr, uno::UNO_QUERY );
85 if ( xTrans.is() )
86 xTrans->commit();
87 }
88 }
89 }
90 catch( uno::Exception& )
91 {
92 }
93
94 m_xRoot = nullptr;
95 }
96 else
97 {
98 OUString aStreamName = aFolderName + ".xml";
99 try
100 {
101 m_xRoot = m_xBlkRoot->openStorageElement( aFolderName, embed::ElementModes::READ );
102 uno::Reference < io::XStream > xStream = m_xRoot->openStreamElement( aStreamName, embed::ElementModes::READ );
103
104 uno::Reference< uno::XComponentContext > xContext =
106
107 xml::sax::InputSource aParserInput;
108 aParserInput.sSystemId = m_aNames[nIdx]->m_aPackageName;
109
110 aParserInput.aInputStream = xStream->getInputStream();
111
112 // get filter
113 uno::Reference< xml::sax::XFastDocumentHandler > xFilter = new SwXMLTextBlockImport( xContext, m_aCurrentText, true );
114 uno::Reference< xml::sax::XFastTokenHandler > xTokenHandler = new SwXMLTextBlockTokenHandler();
115
116 // connect parser and filter
117 uno::Reference< xml::sax::XFastParser > xParser = xml::sax::FastParser::create(xContext);
118 xParser->setFastDocumentHandler( xFilter );
119 xParser->setTokenHandler( xTokenHandler );
120
121 xParser->registerNamespace( "http://openoffice.org/2000/text", FastToken::NAMESPACE | XML_NAMESPACE_TEXT );
122 xParser->registerNamespace( "http://openoffice.org/2000/office", FastToken::NAMESPACE | XML_NAMESPACE_OFFICE );
123
124 // parse
125 try
126 {
127 xParser->parseStream( aParserInput );
128 }
129 catch( xml::sax::SAXParseException& )
130 {
131 // re throw ?
132 }
133 catch( xml::sax::SAXException& )
134 {
135 // re throw ?
136 }
137 catch( io::IOException& )
138 {
139 // re throw ?
140 }
141
142 m_bInfoChanged = false;
144 }
145 catch( uno::Exception& )
146 {
147 }
148
149 m_xRoot = nullptr;
150 }
151 return ERRCODE_NONE;
152}
153
154// event description for autotext events; this constant should really be
155// taken from unocore/unoevents.cxx or ui/unotxt.cxx
157{
158 { SvMacroItemId::SwStartInsGlossary, "OnInsertStart" },
159 { SvMacroItemId::SwEndInsGlossary, "OnInsertDone" },
160 { SvMacroItemId::NONE, nullptr }
161};
162
164 SvxMacroTableDtor& rMacroTable )
165{
166 // set current auto text
167 m_aShort = m_aNames[nIdx]->m_aShort;
168 m_aLong = m_aNames[nIdx]->m_aLong;
169 m_aPackageName = m_aNames[nIdx]->m_aPackageName;
170
171 // open stream in proper sub-storage
172 CloseFile();
173 if ( OpenFile() != ERRCODE_NONE )
174 return ERR_SWG_READ_ERROR;
175
176 try
177 {
178 m_xRoot = m_xBlkRoot->openStorageElement( m_aPackageName, embed::ElementModes::READ );
180
181 uno::Reference < io::XStream > xDocStream = m_xRoot->openStreamElement(
182 "atevent.xml", embed::ElementModes::READ );
183 OSL_ENSURE(xDocStream.is(), "Can't create stream");
184 if ( !xDocStream.is() )
185 return ERR_SWG_READ_ERROR;
186
187 uno::Reference<io::XInputStream> xInputStream = xDocStream->getInputStream();
188
189 // prepare ParserInputSource
190 xml::sax::InputSource aParserInput;
191 aParserInput.sSystemId = m_aName;
192 aParserInput.aInputStream = xInputStream;
193
194 // get service factory
195 uno::Reference< uno::XComponentContext > xContext =
197
198 // create descriptor and reference to it. Either
199 // both or neither must be kept because of the
200 // reference counting!
203 Sequence<Any> aFilterArguments{ Any(uno::Reference<XNameReplace>(pDescriptor)) };
204
205 // get filter
206 OUString sFilterComponent = bOasis
207 ? OUString("com.sun.star.comp.Writer.XMLOasisAutotextEventsImporter")
208 : OUString("com.sun.star.comp.Writer.XMLAutotextEventsImporter");
209 uno::Reference< XInterface > xFilterInt =
210 xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
211 sFilterComponent, aFilterArguments, xContext);
212
213
214 // parse the stream
215 try
216 {
217 Reference<css::xml::sax::XFastParser> xFastParser(xFilterInt, UNO_QUERY);
218 Reference<css::xml::sax::XFastDocumentHandler> xFastDocHandler(xFilterInt, UNO_QUERY);
219 if (xFastParser)
220 {
221 xFastParser->parseStream(aParserInput);
222 }
223 else if (xFastDocHandler)
224 {
225 Reference<css::xml::sax::XFastParser> xParser
226 = css::xml::sax::FastParser::create(xContext);
227 xParser->setFastDocumentHandler(xFastDocHandler);
228 xParser->parseStream(aParserInput);
229 }
230 else
231 {
232 Reference<css::xml::sax::XDocumentHandler> xDocHandler(xFilterInt, UNO_QUERY);
233 OSL_ENSURE( xDocHandler.is(), "can't instantiate autotext-events filter");
234 if ( !xDocHandler.is() )
235 return ERR_SWG_READ_ERROR;
236 Reference<css::xml::sax::XParser> xParser = css::xml::sax::Parser::create(xContext);
237 xParser->setDocumentHandler(xDocHandler);
238 xParser->parseStream(aParserInput);
239 }
240 }
241 catch( xml::sax::SAXParseException& )
242 {
243 // workaround for #83452#: SetSize doesn't work
244 // nRet = ERR_SWG_READ_ERROR;
245 }
246 catch( xml::sax::SAXException& )
247 {
248 TOOLS_WARN_EXCEPTION("sw", "");
249 return ERR_SWG_READ_ERROR;
250 }
251 catch( io::IOException& )
252 {
253 TOOLS_WARN_EXCEPTION("sw", "");
254 return ERR_SWG_READ_ERROR;
255 }
256
257 // and finally, copy macro into table
258 pDescriptor->copyMacrosIntoTable(rMacroTable);
259 }
260 catch( uno::Exception& )
261 {
262 TOOLS_WARN_EXCEPTION("sw", "");
263 return ERR_SWG_READ_ERROR;
264 }
265
266 // success!
267 return ERRCODE_NONE;
268}
269
270ErrCode SwXMLTextBlocks::GetBlockText( std::u16string_view rShort, OUString& rText )
271{
272 OUString aFolderName = GeneratePackageName ( rShort );
273 OUString aStreamName = aFolderName + ".xml";
274 rText.clear();
275
276 try
277 {
278 bool bTextOnly = true;
279
280 m_xRoot = m_xBlkRoot->openStorageElement( aFolderName, embed::ElementModes::READ );
281 if ( !m_xRoot->hasByName( aStreamName ) || !m_xRoot->isStreamElement( aStreamName ) )
282 {
283 bTextOnly = false;
284 aStreamName = "content.xml";
285 }
286
287 uno::Reference < io::XStream > xContents = m_xRoot->openStreamElement( aStreamName, embed::ElementModes::READ );
288 uno::Reference< uno::XComponentContext > xContext =
290
291 xml::sax::InputSource aParserInput;
292 aParserInput.sSystemId = m_aName;
293 aParserInput.aInputStream = xContents->getInputStream();
294
295 // get filter
296 uno::Reference< xml::sax::XFastDocumentHandler > xFilter = new SwXMLTextBlockImport( xContext, rText, bTextOnly );
297 uno::Reference< xml::sax::XFastTokenHandler > xTokenHandler = new SwXMLTextBlockTokenHandler();
298
299 // connect parser and filter
300 uno::Reference< xml::sax::XFastParser > xParser = xml::sax::FastParser::create(xContext);
301 xParser->setFastDocumentHandler( xFilter );
302 xParser->setTokenHandler( xTokenHandler );
303
304 xParser->registerNamespace( "urn:oasis:names:tc:opendocument:xmlns:office:1.0", FastToken::NAMESPACE | XML_NAMESPACE_OFFICE );
305 xParser->registerNamespace( "urn:oasis:names:tc:opendocument:xmlns:text:1.0", FastToken::NAMESPACE | XML_NAMESPACE_TEXT );
306
307 // parse
308 try
309 {
310 xParser->parseStream( aParserInput );
311 }
312 catch( xml::sax::SAXParseException& )
313 {
314 // re throw ?
315 }
316 catch( xml::sax::SAXException& )
317 {
318 // re throw ?
319 }
320 catch( io::IOException& )
321 {
322 // re throw ?
323 }
324
325 m_xRoot = nullptr;
326 }
327 catch ( uno::Exception& )
328 {
329 SAL_WARN("sw", "Tried to open non-existent folder or stream: " << aStreamName << " derived from autocorr of: " << OUString(rShort));
330 }
331
332 return ERRCODE_NONE;
333}
334
336 std::u16string_view rText, const OUString& rPackageName )
337{
338 GetIndex ( rShort );
339 /*
340 if (xBlkRoot->IsContained ( rPackageName ) )
341 {
342 xBlkRoot->Remove ( rPackageName );
343 xBlkRoot->Commit ( );
344 }
345 */
346 OUString aStreamName = rPackageName + ".xml";
347
348 uno::Reference< uno::XComponentContext > xContext =
350
351 uno::Reference < xml::sax::XWriter > xWriter = xml::sax::Writer::create(xContext);
352 ErrCode nRes = ERRCODE_NONE;
353
354 try
355 {
356 m_xRoot = m_xBlkRoot->openStorageElement( rPackageName, embed::ElementModes::WRITE );
357 uno::Reference < io::XStream > xDocStream = m_xRoot->openStreamElement( aStreamName,
358 embed::ElementModes::WRITE | embed::ElementModes::TRUNCATE );
359
360 uno::Reference < beans::XPropertySet > xSet( xDocStream, uno::UNO_QUERY );
361 xSet->setPropertyValue("MediaType", Any(OUString( "text/xml" )) );
362 uno::Reference < io::XOutputStream > xOut = xDocStream->getOutputStream();
363 xWriter->setOutputStream(xOut);
364
366
367 xExp->exportDoc( rText );
368
369 uno::Reference < embed::XTransactedObject > xTrans( m_xRoot, uno::UNO_QUERY );
370 if ( xTrans.is() )
371 xTrans->commit();
372
374 {
375 uno::Reference < embed::XTransactedObject > xTmpTrans( m_xBlkRoot, uno::UNO_QUERY );
376 if ( xTmpTrans.is() )
377 xTmpTrans->commit();
378 }
379 }
380 catch ( uno::Exception& )
381 {
382 nRes = ERR_SWG_WRITE_ERROR;
383 }
384
385 m_xRoot = nullptr;
386
387 //TODO/LATER: error handling
388 /*
389 sal_uLong nErr = xBlkRoot->GetError();
390 sal_uLong nRes = 0;
391 if( nErr == SVSTREAM_DISK_FULL )
392 nRes = ERR_W4W_WRITE_FULL;
393 else if( nErr != ERRCODE_NONE )
394 nRes = ERR_SWG_WRITE_ERROR;
395 */
396 if( !nRes ) // So that we can access the Doc via GetText & nCur
397 MakeBlockText( rText );
398
399 return nRes;
400}
401
403{
404 const OUString sDocName( XMLN_BLOCKLIST );
405 try
406 {
407 if ( !m_xBlkRoot.is() || !m_xBlkRoot->hasByName( sDocName ) || !m_xBlkRoot->isStreamElement( sDocName ) )
408 return;
409
410 uno::Reference< uno::XComponentContext > xContext =
412
413 xml::sax::InputSource aParserInput;
414 aParserInput.sSystemId = sDocName;
415
416 uno::Reference < io::XStream > xDocStream = m_xBlkRoot->openStreamElement( sDocName, embed::ElementModes::READ );
417 aParserInput.aInputStream = xDocStream->getInputStream();
418
419 // get filter
420 uno::Reference< xml::sax::XFastDocumentHandler > xFilter = new SwXMLBlockListImport( xContext, *this );
421 uno::Reference< xml::sax::XFastTokenHandler > xTokenHandler = new SwXMLBlockListTokenHandler();
422
423 // connect parser and filter
424 uno::Reference< xml::sax::XFastParser > xParser = xml::sax::FastParser::create(xContext);
425 xParser->setFastDocumentHandler( xFilter );
426 xParser->registerNamespace( "http://openoffice.org/2001/block-list", FastToken::NAMESPACE | XML_NAMESPACE_BLOCKLIST );
427 xParser->setTokenHandler( xTokenHandler );
428
429 // parse
430 xParser->parseStream( aParserInput );
431 }
432 catch ( uno::Exception& )
433 {
434 TOOLS_WARN_EXCEPTION("sw", "when loading " << sDocName);
435 // re throw ?
436 }
437}
439{
440 if ( !(m_xBlkRoot.is() || ERRCODE_NONE == OpenFile ( false )) )
441 return;
442
443 uno::Reference< uno::XComponentContext > xContext =
445
446 uno::Reference < xml::sax::XWriter > xWriter = xml::sax::Writer::create(xContext);
447
448 /*
449 if ( xBlkRoot->IsContained( sDocName) )
450 {
451 xBlkRoot->Remove ( sDocName );
452 xBlkRoot->Commit();
453 }
454 */
455
456 try
457 {
458 uno::Reference < io::XStream > xDocStream = m_xBlkRoot->openStreamElement( XMLN_BLOCKLIST,
459 embed::ElementModes::WRITE | embed::ElementModes::TRUNCATE );
460
461 uno::Reference < beans::XPropertySet > xSet( xDocStream, uno::UNO_QUERY );
462 xSet->setPropertyValue("MediaType", Any(OUString( "text/xml" )) );
463 uno::Reference < io::XOutputStream > xOut = xDocStream->getOutputStream();
464 xWriter->setOutputStream(xOut);
465
466 rtl::Reference<SwXMLBlockListExport> xExp(new SwXMLBlockListExport( xContext, *this, XMLN_BLOCKLIST, xWriter) );
467
468 xExp->exportDoc( XML_BLOCK_LIST );
469
470 uno::Reference < embed::XTransactedObject > xTrans( m_xBlkRoot, uno::UNO_QUERY );
471 if ( xTrans.is() )
472 xTrans->commit();
473 }
474 catch ( uno::Exception& )
475 {
476 }
477
478 m_bInfoChanged = false;
479 return;
480}
481
483 sal_uInt16 nIdx,
484 const SvxMacroTableDtor& rMacroTable )
485{
486 // set current autotext
487 m_aShort = m_aNames[nIdx]->m_aShort;
488 m_aLong = m_aNames[nIdx]->m_aLong;
489 m_aPackageName = m_aNames[nIdx]->m_aPackageName;
490
491 // start XML autotext event export
492 ErrCode nRes = ERRCODE_NONE;
493
494 uno::Reference< uno::XComponentContext > xContext =
496
497 // Get model
498 uno::Reference< lang::XComponent > xModelComp =
499 m_xDoc->GetDocShell()->GetModel();
500 OSL_ENSURE( xModelComp.is(), "XMLWriter::Write: got no model" );
501 if( !xModelComp.is() )
502 return ERR_SWG_WRITE_ERROR;
503
504 // open stream in proper sub-storage
505 CloseFile(); // close (it may be open in read-only-mode)
506 nRes = OpenFile ( false );
507
508 if ( ERRCODE_NONE == nRes )
509 {
510 try
511 {
512 m_xRoot = m_xBlkRoot->openStorageElement( m_aPackageName, embed::ElementModes::WRITE );
514
515 uno::Reference < io::XStream > xDocStream = m_xRoot->openStreamElement( "atevent.xml",
516 embed::ElementModes::WRITE | embed::ElementModes::TRUNCATE );
517
518 uno::Reference < beans::XPropertySet > xSet( xDocStream, uno::UNO_QUERY );
519 xSet->setPropertyValue("MediaType", Any(OUString( "text/xml" )) );
520 uno::Reference < io::XOutputStream > xOutputStream = xDocStream->getOutputStream();
521
522 // get XML writer
523 uno::Reference< xml::sax::XWriter > xSaxWriter =
524 xml::sax::Writer::create( xContext );
525
526 // connect XML writer to output stream
527 xSaxWriter->setOutputStream( xOutputStream );
528
529 // construct events object
530 uno::Reference<XNameAccess> xEvents =
532
533 // prepare arguments (prepend doc handler to given arguments)
534 Sequence<Any> aParams{ Any(xSaxWriter), Any(xEvents) };
535
536 // get filter component
537 OUString sFilterComponent = bOasis
538 ? OUString("com.sun.star.comp.Writer.XMLOasisAutotextEventsExporter")
539 : OUString("com.sun.star.comp.Writer.XMLAutotextEventsExporter");
540 uno::Reference< document::XExporter > xExporter(
541 xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
542 sFilterComponent, aParams, xContext), UNO_QUERY);
543 OSL_ENSURE( xExporter.is(),
544 "can't instantiate export filter component" );
545 if( xExporter.is() )
546 {
547 // connect model and filter
548 xExporter->setSourceDocument( xModelComp );
549
550 // filter!
551 Sequence<beans::PropertyValue> aFilterProps( 0 );
552 uno::Reference < document::XFilter > xFilter( xExporter,
553 UNO_QUERY );
554 xFilter->filter( aFilterProps );
555 }
556 else
557 nRes = ERR_SWG_WRITE_ERROR;
558
559 // finally, commit stream, sub-storage and storage
560 uno::Reference < embed::XTransactedObject > xTmpTrans( m_xRoot, uno::UNO_QUERY );
561 if ( xTmpTrans.is() )
562 xTmpTrans->commit();
563
564 uno::Reference < embed::XTransactedObject > xTrans( m_xBlkRoot, uno::UNO_QUERY );
565 if ( xTrans.is() )
566 xTrans->commit();
567
568 m_xRoot = nullptr;
569 }
570 catch ( uno::Exception& )
571 {
572 nRes = ERR_SWG_WRITE_ERROR;
573 }
574
575 CloseFile();
576 }
577 else
578 nRes = ERR_SWG_WRITE_ERROR;
579
580 return nRes;
581}
582
583/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const struct SvEventDescription aAutotextEvents[]
constexpr OUStringLiteral XMLN_BLOCKLIST
Reference< XInputStream > xStream
void SetBlockMode(bool bSet)
Definition: shellio.hxx:259
sal_Int32 GetVersion() const
OUString m_aName
Definition: swblocks.hxx:59
OUString m_aShort
Definition: swblocks.hxx:61
const OUString & GetBaseURL() const
Definition: swblocks.hxx:104
OUString GetPackageName(sal_uInt16) const
Return longname for index.
Definition: swblocks.cxx:169
OUString m_aLong
Definition: swblocks.hxx:61
sal_uInt16 GetIndex(const OUString &) const
Get count of Text Blocks.
Definition: swblocks.cxx:128
SwBlockNames m_aNames
Definition: swblocks.hxx:63
rtl::Reference< SwDoc > m_xDoc
Definition: swblocks.hxx:66
OUString m_aCurrentText
Definition: swblocks.hxx:60
bool m_bInfoChanged
Definition: swblocks.hxx:70
ErrCode Read(const Reader &)
Definition: shellio.cxx:91
SwDoc * GetDoc() const
virtual bool IsOnlyTextBlock(const OUString &rShort) const override
css::uno::Reference< css::embed::XStorage > m_xBlkRoot
void MakeBlockText(std::u16string_view rText)
static OUString GeneratePackageName(std::u16string_view rShort)
ErrCode GetBlockText(std::u16string_view rShort, OUString &rText)
tools::SvRef< SfxMedium > m_xMedium
virtual ErrCode GetMacroTable(sal_uInt16, SvxMacroTableDtor &rMacroTable) override
virtual ErrCode SetMacroTable(sal_uInt16 nIdx, const SvxMacroTableDtor &rMacroTable) override
ErrCode PutBlockText(const OUString &rShort, std::u16string_view rText, const OUString &rPackageName)
virtual void CloseFile() override
css::uno::Reference< css::embed::XStorage > m_xRoot
virtual ErrCode OpenFile(bool bReadOnly=true) override
#define TOOLS_WARN_EXCEPTION(area, stream)
float u
#define ERRCODE_NONE
#define SOFFICE_FILEFORMAT_60
Reader * ReadXML
Definition: fltini.cxx:46
#define SAL_WARN(area, stream)
Reference< XComponentContext > getProcessComponentContext()
XML_BLOCK_LIST
XML_UNFORMATTED_TEXT
const OUString & GetXMLToken(enum XMLTokenEnum eToken)
#define ERR_SWG_WRITE_ERROR
Definition: swerror.h:30
#define ERR_SWG_READ_ERROR
Definition: swerror.h:25
constexpr sal_uInt16 XML_NAMESPACE_BLOCKLIST
constexpr sal_uInt16 XML_NAMESPACE_TEXT
constexpr sal_uInt16 XML_NAMESPACE_OFFICE