LibreOffice Module sw (master) 1
swxml.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>
23#include <com/sun/star/xml/sax/InputSource.hpp>
24#include <com/sun/star/xml/sax/Parser.hpp>
25#include <com/sun/star/xml/sax/SAXParseException.hpp>
26#include <com/sun/star/text/XTextRange.hpp>
27#include <com/sun/star/container/XChild.hpp>
28#include <com/sun/star/document/NamedPropertyValues.hpp>
29#include <com/sun/star/beans/XPropertySetInfo.hpp>
30#include <com/sun/star/beans/NamedValue.hpp>
31#include <com/sun/star/beans/PropertyAttribute.hpp>
32#include <com/sun/star/packages/zip/ZipIOException.hpp>
33#include <com/sun/star/packages/WrongPasswordException.hpp>
34#include <com/sun/star/ucb/InteractiveAugmentedIOException.hpp>
35#include <com/sun/star/task/XStatusIndicator.hpp>
36#include <com/sun/star/frame/XModel.hpp>
37#include <o3tl/any.hxx>
38#include <vcl/errinf.hxx>
39#include <sfx2/docfile.hxx>
40#include <svtools/sfxecode.hxx>
41#include <svl/stritem.hxx>
42#include <svx/dialmgr.hxx>
43#include <svx/strings.hrc>
44#include <svx/xmlgrhlp.hxx>
45#include <svx/xmleohlp.hxx>
49#include <sal/log.hxx>
50#include <sfx2/frame.hxx>
52#include <swerror.h>
53#include <fltini.hxx>
54#include <drawdoc.hxx>
55#include <doc.hxx>
56#include <docfunc.hxx>
62#include <docary.hxx>
63#include <docsh.hxx>
64#include <unotextrange.hxx>
65#include <SwXMLSectionList.hxx>
66
67#include <SwStyleNameMapper.hxx>
68#include <poolfmt.hxx>
69#include <numrule.hxx>
70#include <paratr.hxx>
71#include <fmtrowsplt.hxx>
72
73#include <svx/svdpage.hxx>
74#include <svx/svditer.hxx>
75#include <svx/svdoole2.hxx>
76#include <svx/svdograf.hxx>
77#include <sfx2/docfilt.hxx>
78#include <sfx2/sfxsids.hrc>
79#include <istyleaccess.hxx>
80
83
84using namespace ::com::sun::star;
85using namespace ::com::sun::star::uno;
86using namespace ::com::sun::star::text;
87using namespace ::com::sun::star::container;
88using namespace ::com::sun::star::document;
89using namespace ::com::sun::star::lang;
90
91static void lcl_EnsureValidPam( SwPaM& rPam )
92{
93 if( rPam.GetPointContentNode() != nullptr )
94 {
95 // set proper point content
96 if( rPam.GetPointContentNode() != rPam.GetPoint()->GetContentNode() )
97 {
98 rPam.GetPoint()->nContent.Assign( rPam.GetPointContentNode(), 0 );
99 }
100 // else: point was already valid
101
102 // if mark is invalid, we delete it
103 if( ( rPam.GetMarkContentNode() == nullptr ) ||
104 ( rPam.GetMarkContentNode() != rPam.GetMark()->GetContentNode() ) )
105 {
106 rPam.DeleteMark();
107 }
108 }
109 else
110 {
111 // point is not valid, so move it into the first content
112 rPam.DeleteMark();
113 rPam.GetPoint()->Assign(
115 rPam.GetPoint()->Adjust(SwNodeOffset(+1));
116 rPam.Move( fnMoveForward, GoInContent ); // go into content
117 }
118}
119
121{
122}
123
125{
127}
128
129namespace
130{
131
133ErrCode ReadThroughComponent(
134 uno::Reference<io::XInputStream> const & xInputStream,
135 uno::Reference<XComponent> const & xModelComponent,
136 const OUString& rStreamName,
137 uno::Reference<uno::XComponentContext> const & rxContext,
138 const char* pFilterName,
139 const Sequence<Any>& rFilterArguments,
140 const OUString& rName,
141 bool bMustBeSuccessful,
142 bool bEncrypted )
143{
144 OSL_ENSURE(xInputStream.is(), "input stream missing");
145 OSL_ENSURE(xModelComponent.is(), "document missing");
146 OSL_ENSURE(rxContext.is(), "factory missing");
147 OSL_ENSURE(nullptr != pFilterName,"I need a service name for the component!");
148
149 // prepare ParserInputSource
150 xml::sax::InputSource aParserInput;
151 aParserInput.sSystemId = rName;
152 aParserInput.aInputStream = xInputStream;
153
154 // get filter
155 const OUString aFilterName(OUString::createFromAscii(pFilterName));
156 uno::Reference< XInterface > xFilter =
157 rxContext->getServiceManager()->createInstanceWithArgumentsAndContext(aFilterName, rFilterArguments, rxContext);
158 SAL_WARN_IF(!xFilter.is(), "sw.filter", "Can't instantiate filter component: " << aFilterName);
159 if( !xFilter.is() )
160 return ERR_SWG_READ_ERROR;
161 // the underlying SvXMLImport implements XFastParser, XImporter, XFastDocumentHandler
162 uno::Reference< xml::sax::XFastParser > xFastParser(xFilter, UNO_QUERY);
163 uno::Reference< xml::sax::XDocumentHandler > xDocumentHandler;
164 if (!xFastParser)
165 xDocumentHandler.set(xFilter, UNO_QUERY);
166 if (!xDocumentHandler && !xFastParser)
167 {
168 SAL_WARN("sd", "service does not implement XFastParser or XDocumentHandler");
169 assert(false);
170 return ERR_SWG_READ_ERROR;
171 }
172
173 // connect model and filter
174 uno::Reference < XImporter > xImporter( xFilter, UNO_QUERY );
175 xImporter->setTargetDocument( xModelComponent );
176
177 // finally, parse the stream
178 try
179 {
180 if (xFastParser)
181 xFastParser->parseStream( aParserInput );
182 else
183 {
184 uno::Reference< xml::sax::XParser > xParser = xml::sax::Parser::create(rxContext);
185 // connect parser and filter
186 xParser->setDocumentHandler( xDocumentHandler );
187 xParser->parseStream( aParserInput );
188 }
189 }
190 catch( xml::sax::SAXParseException& r)
191 {
192 css::uno::Any ex( cppu::getCaughtException() );
193 // sax parser sends wrapped exceptions,
194 // try to find the original one
195 xml::sax::SAXException aSaxEx = *static_cast<xml::sax::SAXException*>(&r);
196 bool bTryChild = true;
197
198 while( bTryChild )
199 {
200 xml::sax::SAXException aTmp;
201 if ( aSaxEx.WrappedException >>= aTmp )
202 aSaxEx = aTmp;
203 else
204 bTryChild = false;
205 }
206
207 packages::zip::ZipIOException aBrokenPackage;
208 if ( aSaxEx.WrappedException >>= aBrokenPackage )
210
211 if( bEncrypted )
213
214 SAL_WARN( "sw", "SAX parse exception caught while importing: " << exceptionToString(ex) );
215
216 const OUString sErr( OUString::number( r.LineNumber )
217 + ","
218 + OUString::number( r.ColumnNumber ) );
219
220 if( !rStreamName.isEmpty() )
221 {
222 return *new TwoStringErrorInfo(
223 (bMustBeSuccessful ? ERR_FORMAT_FILE_ROWCOL
225 rStreamName, sErr,
226 DialogMask::ButtonsOk | DialogMask::MessageError );
227 }
228 else
229 {
230 OSL_ENSURE( bMustBeSuccessful, "Warnings are not supported" );
231 return *new StringErrorInfo( ERR_FORMAT_ROWCOL, sErr,
232 DialogMask::ButtonsOk | DialogMask::MessageError );
233 }
234 }
235 catch(const xml::sax::SAXException& r)
236 {
237 css::uno::Any ex( cppu::getCaughtException() );
238 packages::zip::ZipIOException aBrokenPackage;
239 if ( r.WrappedException >>= aBrokenPackage )
241
242 if( bEncrypted )
244
245 SAL_WARN( "sw", "uno exception caught while importing: " << exceptionToString(ex) );
246 return ERR_SWG_READ_ERROR;
247 }
248 catch(const packages::zip::ZipIOException&)
249 {
250 TOOLS_WARN_EXCEPTION( "sw", "uno exception caught while importing" );
252 }
253 catch(const io::IOException&)
254 {
255 TOOLS_WARN_EXCEPTION( "sw", "uno exception caught while importing" );
256 return ERR_SWG_READ_ERROR;
257 }
258 catch(const uno::Exception&)
259 {
260 TOOLS_WARN_EXCEPTION( "sw", "uno exception caught while importing" );
261 return ERR_SWG_READ_ERROR;
262 }
263
264 // success!
265 return ERRCODE_NONE;
266}
267
268// read a component (storage version)
269ErrCode ReadThroughComponent(
270 uno::Reference<embed::XStorage> const & xStorage,
271 uno::Reference<XComponent> const & xModelComponent,
272 const char* pStreamName,
273 uno::Reference<uno::XComponentContext> const & rxContext,
274 const char* pFilterName,
275 const Sequence<Any>& rFilterArguments,
276 const OUString& rName,
277 bool bMustBeSuccessful)
278{
279 OSL_ENSURE(xStorage.is(), "Need storage!");
280 OSL_ENSURE(nullptr != pStreamName, "Please, please, give me a name!");
281
282 // open stream (and set parser input)
283 OUString sStreamName = OUString::createFromAscii(pStreamName);
284 bool bContainsStream = false;
285 try
286 {
287 bContainsStream = xStorage->isStreamElement(sStreamName);
288 }
289 catch( container::NoSuchElementException& )
290 {
291 }
292
293 if (!bContainsStream )
294 {
295 // stream name not found! return immediately with OK signal
296 return ERRCODE_NONE;
297 }
298
299 // set Base URL
300 uno::Reference< beans::XPropertySet > xInfoSet;
301 if( rFilterArguments.hasElements() )
302 rFilterArguments.getConstArray()[0] >>= xInfoSet;
303 OSL_ENSURE( xInfoSet.is(), "missing property set" );
304 if( xInfoSet.is() )
305 {
306 xInfoSet->setPropertyValue( "StreamName", Any( sStreamName ) );
307 }
308
309 try
310 {
311 // get input stream
312 uno::Reference <io::XStream> xStream = xStorage->openStreamElement( sStreamName, embed::ElementModes::READ );
313 uno::Reference <beans::XPropertySet > xProps( xStream, uno::UNO_QUERY );
314
315 Any aAny = xProps->getPropertyValue("Encrypted");
316
317 auto b = o3tl::tryAccess<bool>(aAny);
318 bool bEncrypted = b && *b;
319
320 uno::Reference <io::XInputStream> xInputStream = xStream->getInputStream();
321
322 // read from the stream
323 return ReadThroughComponent(
324 xInputStream, xModelComponent, sStreamName, rxContext,
325 pFilterName, rFilterArguments,
326 rName, bMustBeSuccessful, bEncrypted );
327 }
328 catch ( packages::WrongPasswordException& )
329 {
331 }
332 catch( packages::zip::ZipIOException& )
333 {
335 }
336 catch ( uno::Exception& )
337 {
338 OSL_FAIL( "Error on import" );
339 // TODO/LATER: error handling
340 }
341
342 return ERR_SWG_READ_ERROR;
343}
344
345}
346
347// #i44177#
349{
350 // array containing the names of the default outline styles ('Heading 1',
351 // 'Heading 2', ..., 'Heading 10')
352 OUString aDefOutlStyleNames[ MAXLEVEL ];
353 {
354 OUString sStyleName;
355 for ( sal_uInt8 i = 0; i < MAXLEVEL; ++i )
356 {
357 sStyleName =
359 sStyleName );
360 aDefOutlStyleNames[i] = sStyleName;
361 }
362 }
363
364 // array indicating, which outline level already has a style assigned.
365 bool aOutlineLevelAssigned[ MAXLEVEL ];
366 // array of the default outline styles, which are created for the document.
367 SwTextFormatColl* aCreatedDefaultOutlineStyles[ MAXLEVEL ];
368
369 {
370 for ( sal_uInt8 i = 0; i < MAXLEVEL; ++i )
371 {
372 aOutlineLevelAssigned[ i ] = false;
373 aCreatedDefaultOutlineStyles[ i ] = nullptr;
374 }
375 }
376
377 // determine, which outline level has already a style assigned and
378 // which of the default outline styles is created.
379 const SwTextFormatColls& rColls = *(_rDoc.GetTextFormatColls());
380 for ( size_t n = 1; n < rColls.size(); ++n )
381 {
382 SwTextFormatColl* pColl = rColls[ n ];
384 {
385 aOutlineLevelAssigned[ pColl->GetAssignedOutlineStyleLevel() ] = true;
386 }
387
388 for ( sal_uInt8 i = 0; i < MAXLEVEL; ++i )
389 {
390 if ( aCreatedDefaultOutlineStyles[ i ] == nullptr &&
391 pColl->GetName() == aDefOutlStyleNames[i] )
392 {
393 aCreatedDefaultOutlineStyles[ i ] = pColl;
394 break;
395 }
396 }
397 }
398
399 // assign already created default outline style to outline level, which
400 // doesn't have a style assigned to it.
401 const SwNumRule* pOutlineRule = _rDoc.GetOutlineNumRule();
402 for ( sal_uInt8 i = 0; i < MAXLEVEL; ++i )
403 {
404 // #i73361#
405 // Do not change assignment of already created default outline style
406 // to a certain outline level.
407 if ( !aOutlineLevelAssigned[ i ] &&
408 aCreatedDefaultOutlineStyles[ i ] != nullptr &&
409 ! aCreatedDefaultOutlineStyles[ i ]->IsAssignedToListLevelOfOutlineStyle() )
410 {
411 // apply outline level at created default outline style
412 aCreatedDefaultOutlineStyles[ i ]->AssignToListLevelOfOutlineStyle(i);
413
414 // apply outline numbering rule, if none is set.
415 const SfxPoolItem& rItem =
416 aCreatedDefaultOutlineStyles[ i ]->GetFormatAttr( RES_PARATR_NUMRULE, false );
417 if ( static_cast<const SwNumRuleItem&>(rItem).GetValue().isEmpty() )
418 {
419 SwNumRuleItem aItem( pOutlineRule->GetName() );
420 aCreatedDefaultOutlineStyles[ i ]->SetFormatAttr( aItem );
421 }
422 }
423 }
424}
425
427{
428 if ( !(_rDoc.getIDocumentDrawModelAccess().GetDrawModel() &&
430 return;
431
432 const SdrPage& rSdrPage( *(_rDoc.getIDocumentDrawModelAccess().GetDrawModel()->GetPage( 0 )) );
433
434 // iterate recursive with group objects over all shapes on the draw page
435 SdrObjListIter aIter( &rSdrPage );
436 while( aIter.IsMore() )
437 {
438 SdrOle2Obj* pOle2Obj = dynamic_cast< SdrOle2Obj* >( aIter.Next() );
439 if( pOle2Obj )
440 {
441 // found an ole2 shape
442 SdrObjList* pObjList = pOle2Obj->getParentSdrObjListFromSdrObject();
443
444 // get its graphic
445 Graphic aGraphic;
446 pOle2Obj->Connect();
447 const Graphic* pGraphic = pOle2Obj->GetGraphic();
448 if( pGraphic )
449 aGraphic = *pGraphic;
450 pOle2Obj->Disconnect();
451
452 // create new graphic shape with the ole graphic and shape size
453 rtl::Reference<SdrGrafObj> pGraphicObj = new SdrGrafObj(
454 pOle2Obj->getSdrModelFromSdrObject(),
455 aGraphic,
456 pOle2Obj->GetCurrentBoundRect());
457
458 // apply layer of ole2 shape at graphic shape
459 pGraphicObj->SetLayer( pOle2Obj->GetLayer() );
460
461 // replace ole2 shape with the new graphic object and delete the ol2 shape
462 pObjList->ReplaceObject( pGraphicObj.get(), pOle2Obj->GetOrdNum() );
463 }
464 }
465}
466
467ErrCode XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, const OUString & rName )
468{
469 // needed for relative URLs, but in clipboard copy/paste there may be none
470 // and also there is the SwXMLTextBlocks special case
471 SAL_INFO_IF(rBaseURL.isEmpty(), "sw.filter", "sw::XMLReader: no base URL");
472
473 // Get service factory
474 uno::Reference< uno::XComponentContext > xContext =
476
477 uno::Reference<document::XGraphicStorageHandler> xGraphicStorageHandler;
479 uno::Reference< document::XEmbeddedObjectResolver > xObjectResolver;
481
482 // get the input stream (storage or stream)
483 uno::Reference<embed::XStorage> xStorage;
484 if( m_pMedium )
485 xStorage = m_pMedium->GetStorage();
486 else
487 xStorage = m_xStorage;
488
489 if( !xStorage.is() )
490 return ERR_SWG_READ_ERROR;
491
492 xGraphicHelper = SvXMLGraphicHelper::Create( xStorage,
493 SvXMLGraphicHelperMode::Read );
494 xGraphicStorageHandler = xGraphicHelper.get();
495 SfxObjectShell *pPersist = rDoc.GetPersist();
496 if( pPersist )
497 {
498 xObjectHelper = SvXMLEmbeddedObjectHelper::Create(
499 xStorage, *pPersist,
500 SvXMLEmbeddedObjectHelperMode::Read );
501 xObjectResolver = xObjectHelper.get();
502 }
503
504 // Get the docshell, the model, and finally the model's component
505 SwDocShell *pDocSh = rDoc.GetDocShell();
506 OSL_ENSURE( pDocSh, "XMLReader::Read: got no doc shell" );
507 if( !pDocSh )
508 return ERR_SWG_READ_ERROR;
509 uno::Reference< lang::XComponent > xModelComp = pDocSh->GetModel();
510 OSL_ENSURE( xModelComp.is(),
511 "XMLReader::Read: got no model" );
512 if( !xModelComp.is() )
513 return ERR_SWG_READ_ERROR;
514
515 // create and prepare the XPropertySet that gets passed through
516 // the components, and the XStatusIndicator that shows progress to
517 // the user.
518
519 // create XPropertySet with three properties for status indicator
520 static comphelper::PropertyMapEntry const aInfoMap[] =
521 {
522 { OUString("ProgressRange"), 0,
524 beans::PropertyAttribute::MAYBEVOID, 0},
525 { OUString("ProgressMax"), 0,
527 beans::PropertyAttribute::MAYBEVOID, 0},
528 { OUString("ProgressCurrent"), 0,
530 beans::PropertyAttribute::MAYBEVOID, 0},
531 { OUString("NumberStyles"), 0,
533 beans::PropertyAttribute::MAYBEVOID, 0},
534 { OUString("RecordChanges"), 0,
536 beans::PropertyAttribute::MAYBEVOID, 0 },
537 { OUString("ShowChanges"), 0,
539 beans::PropertyAttribute::MAYBEVOID, 0 },
540 { OUString("RedlineProtectionKey"), 0,
542 beans::PropertyAttribute::MAYBEVOID, 0 },
543 { OUString("PrivateData"), 0,
545 beans::PropertyAttribute::MAYBEVOID, 0 },
546 { OUString("BaseURI"), 0,
548 beans::PropertyAttribute::MAYBEVOID, 0 },
549 { OUString("StreamRelPath"), 0,
551 beans::PropertyAttribute::MAYBEVOID, 0 },
552 { OUString("StreamName"), 0,
554 beans::PropertyAttribute::MAYBEVOID, 0 },
555 // properties for insert modes
556 { OUString("StyleInsertModeFamilies"), 0,
558 beans::PropertyAttribute::MAYBEVOID, 0 },
559 { OUString("StyleInsertModeOverwrite"), 0,
561 beans::PropertyAttribute::MAYBEVOID, 0 },
562 { OUString("TextInsertModeRange"), 0,
564 beans::PropertyAttribute::MAYBEVOID, 0},
565 { OUString("AutoTextMode"), 0,
567 beans::PropertyAttribute::MAYBEVOID, 0 },
568 { OUString("OrganizerMode"), 0,
570 beans::PropertyAttribute::MAYBEVOID, 0 },
571
572 // #i28749# - Add property, which indicates, if the
573 // shape position attributes are given in horizontal left-to-right layout.
574 // This is the case for the OpenOffice.org file format.
575 { OUString("ShapePositionInHoriL2R"), 0,
577 beans::PropertyAttribute::MAYBEVOID, 0 },
578
579 { OUString("BuildId"), 0,
581 beans::PropertyAttribute::MAYBEVOID, 0 },
582
583 // Add property, which indicates, if a text document in OpenOffice.org
584 // file format is read.
585 // Note: Text documents read via the binary filter are also finally
586 // read using the OpenOffice.org file format. Thus, e.g. for text
587 // documents in StarOffice 5.2 binary file format this property
588 // will be true.
589 { OUString("TextDocInOOoFileFormat"), 0,
591 beans::PropertyAttribute::MAYBEVOID, 0 },
592 { OUString("SourceStorage"), 0, cppu::UnoType<embed::XStorage>::get(),
593 css::beans::PropertyAttribute::MAYBEVOID, 0 },
594 };
595 uno::Reference< beans::XPropertySet > xInfoSet(
597 new comphelper::PropertySetInfo( aInfoMap ) ) );
598
599 // get BuildId from parent container if available
600 uno::Reference< container::XChild > xChild( xModelComp, uno::UNO_QUERY );
601 if( xChild.is() )
602 {
603 uno::Reference< beans::XPropertySet > xParentSet( xChild->getParent(), uno::UNO_QUERY );
604 if( xParentSet.is() )
605 {
606 uno::Reference< beans::XPropertySetInfo > xPropSetInfo( xParentSet->getPropertySetInfo() );
607 static constexpr OUStringLiteral sPropName(u"BuildId" );
608 if( xPropSetInfo.is() && xPropSetInfo->hasPropertyByName(sPropName) )
609 {
610 xInfoSet->setPropertyValue( sPropName, xParentSet->getPropertyValue(sPropName) );
611 }
612 }
613 }
614
615 // try to get an XStatusIndicator from the Medium
616 uno::Reference<task::XStatusIndicator> xStatusIndicator;
617
618 if (pDocSh->GetMedium())
619 {
620 const SfxUnoAnyItem* pItem =
621 pDocSh->GetMedium()->GetItemSet().GetItem(SID_PROGRESS_STATUSBAR_CONTROL);
622 if (pItem)
623 {
624 pItem->GetValue() >>= xStatusIndicator;
625 }
626 }
627
628 // set progress range and start status indicator
629 sal_Int32 nProgressRange(1000000);
630 if (xStatusIndicator.is())
631 {
632 xStatusIndicator->start(SvxResId(RID_SVXSTR_DOC_LOAD), nProgressRange);
633 }
634 uno::Any aProgRange;
635 aProgRange <<= nProgressRange;
636 xInfoSet->setPropertyValue("ProgressRange", aProgRange);
637
638 Reference< container::XNameAccess > xLateInitSettings( document::NamedPropertyValues::create(xContext), UNO_QUERY_THROW );
639 beans::NamedValue aLateInitSettings( "LateInitSettings", Any( xLateInitSettings ) );
640
641 xInfoSet->setPropertyValue( "SourceStorage", Any( xStorage ) );
642
643 // prepare filter arguments, WARNING: the order is important!
644 Sequence<Any> aFilterArgs{ Any(xInfoSet),
645 Any(xStatusIndicator),
646 Any(xGraphicStorageHandler),
647 Any(xObjectResolver),
648 Any(aLateInitSettings) };
649
650 Sequence<Any> aEmptyArgs{ Any(xInfoSet),
651 Any(xStatusIndicator) };
652
653 // prepare for special modes
655 {
656 sal_Int32 nCount =
657 (m_aOption.IsFrameFormats() ? 1 : 0) +
658 (m_aOption.IsPageDescs() ? 1 : 0) +
659 (m_aOption.IsTextFormats() ? 2 : 0) +
660 (m_aOption.IsNumRules() ? 1 : 0);
661
662 Sequence< OUString> aFamiliesSeq( nCount );
663 OUString *pSeq = aFamiliesSeq.getArray();
665 // SfxStyleFamily::Frame;
666 *pSeq++ = "FrameStyles";
667 if( m_aOption.IsPageDescs() )
668 // SfxStyleFamily::Page;
669 *pSeq++ = "PageStyles";
671 {
672 // (SfxStyleFamily::Char|SfxStyleFamily::Para);
673 *pSeq++ = "CharacterStyles";
674 *pSeq++ = "ParagraphStyles";
675 }
676 if( m_aOption.IsNumRules() )
677 // SfxStyleFamily::Pseudo;
678 *pSeq++ = "NumberingStyles";
679
680 xInfoSet->setPropertyValue( "StyleInsertModeFamilies",
681 Any(aFamiliesSeq) );
682
683 xInfoSet->setPropertyValue( "StyleInsertModeOverwrite", Any(!m_aOption.IsMerge()) );
684 }
685 else if( m_bInsertMode )
686 {
687 const rtl::Reference<SwXTextRange> xInsertTextRange =
688 SwXTextRange::CreateXTextRange(rDoc, *rPaM.GetPoint(), nullptr);
689 xInfoSet->setPropertyValue( "TextInsertModeRange",
690 Any(uno::Reference<text::XTextRange>(xInsertTextRange)) );
691 }
692 else
693 {
694 rPaM.GetBound().nContent.Assign(nullptr, 0);
695 rPaM.GetBound(false).nContent.Assign(nullptr, 0);
696 }
697
698 if( IsBlockMode() )
699 {
700 xInfoSet->setPropertyValue( "AutoTextMode", Any(true) );
701 }
702 if( IsOrganizerMode() )
703 {
704 xInfoSet->setPropertyValue( "OrganizerMode", Any(true) );
705 }
706
707 // Set base URI
708 // there is ambiguity which medium should be used here
709 // for now the own medium has a preference
710 SfxMedium* pMedDescrMedium = m_pMedium ? m_pMedium : pDocSh->GetMedium();
711 OSL_ENSURE( pMedDescrMedium, "There is no medium to get MediaDescriptor from!" );
712
713 xInfoSet->setPropertyValue( "BaseURI", Any( rBaseURL ) );
714
715 // TODO/LATER: separate links from usual embedded objects
716 OUString StreamPath;
717 if( SfxObjectCreateMode::EMBEDDED == rDoc.GetDocShell()->GetCreateMode() )
718 {
719 if (pMedDescrMedium)
720 {
721 const SfxStringItem* pDocHierarchItem =
722 pMedDescrMedium->GetItemSet().GetItem(SID_DOC_HIERARCHICALNAME);
723 if ( pDocHierarchItem )
724 StreamPath = pDocHierarchItem->GetValue();
725 }
726 else
727 {
728 StreamPath = "dummyObjectName";
729 }
730
731 if( !StreamPath.isEmpty() )
732 {
733 xInfoSet->setPropertyValue( "StreamRelPath", Any( StreamPath ) );
734 }
735 }
736
737 rtl::Reference<SwDoc> aHoldRef(&rDoc); // prevent deletion
738 ErrCode nRet = ERRCODE_NONE;
739
740 // save redline mode into import info property set
741 static constexpr OUStringLiteral sShowChanges(u"ShowChanges");
742 static constexpr OUStringLiteral sRecordChanges(u"RecordChanges");
743 static constexpr OUStringLiteral sRedlineProtectionKey(u"RedlineProtectionKey");
744 xInfoSet->setPropertyValue( sShowChanges,
746 xInfoSet->setPropertyValue( sRecordChanges,
748 xInfoSet->setPropertyValue( sRedlineProtectionKey,
750
751 // force redline mode to "none"
753
754 const bool bOASIS = ( SotStorage::GetVersion( xStorage ) > SOFFICE_FILEFORMAT_60 );
755 // #i28749# - set property <ShapePositionInHoriL2R>
756 {
757 const bool bShapePositionInHoriL2R = !bOASIS;
758 xInfoSet->setPropertyValue(
759 "ShapePositionInHoriL2R",
760 Any( bShapePositionInHoriL2R ) );
761 }
762 {
763 const bool bTextDocInOOoFileFormat = !bOASIS;
764 xInfoSet->setPropertyValue(
765 "TextDocInOOoFileFormat",
766 Any( bTextDocInOOoFileFormat ) );
767 }
768
769 ErrCode nWarnRDF = ERRCODE_NONE;
772 {
773 // RDF metadata - must be read before styles/content
774 // N.B.: embedded documents have their own manifest.rdf!
775 try
776 {
777 const uno::Reference<rdf::XDocumentMetadataAccess> xDMA(xModelComp,
778 uno::UNO_QUERY_THROW);
779 const uno::Reference<frame::XModel> xModel(xModelComp,
780 uno::UNO_QUERY_THROW);
781 const uno::Reference<rdf::XURI> xBaseURI( ::sfx2::createBaseURI(
782 xContext, xModel, rBaseURL, StreamPath) );
783 const uno::Reference<task::XInteractionHandler> xHandler(
784 pDocSh->GetMedium()->GetInteractionHandler() );
785 xDMA->loadMetadataFromStorage(xStorage, xBaseURI, xHandler);
786 }
787 catch (const lang::WrappedTargetException & e)
788 {
789 ucb::InteractiveAugmentedIOException iaioe;
790 if (e.TargetException >>= iaioe)
791 {
792 // import error that was not ignored by InteractionHandler!
793 nWarnRDF = ERR_SWG_READ_ERROR;
794 }
795 else
796 {
797 nWarnRDF = WARN_SWG_FEATURES_LOST; // uhh... something wrong?
798 }
799 }
800 catch (uno::Exception &)
801 {
802 nWarnRDF = WARN_SWG_FEATURES_LOST; // uhh... something went wrong?
803 }
804 }
805
806 // read storage streams
807
808 // #i103539#: always read meta.xml for generator
809 ErrCode const nWarn = ReadThroughComponent(
810 xStorage, xModelComp, "meta.xml", xContext,
811 (bOASIS ? "com.sun.star.comp.Writer.XMLOasisMetaImporter"
812 : "com.sun.star.comp.Writer.XMLMetaImporter"),
813 aEmptyArgs, rName, false );
814
815 ErrCode nWarn2 = ERRCODE_NONE;
818 {
819 nWarn2 = ReadThroughComponent(
820 xStorage, xModelComp, "settings.xml", xContext,
821 (bOASIS ? "com.sun.star.comp.Writer.XMLOasisSettingsImporter"
822 : "com.sun.star.comp.Writer.XMLSettingsImporter"),
823 aFilterArgs, rName, false );
824 }
825
826 nRet = ReadThroughComponent(
827 xStorage, xModelComp, "styles.xml", xContext,
828 (bOASIS ? "com.sun.star.comp.Writer.XMLOasisStylesImporter"
829 : "com.sun.star.comp.Writer.XMLStylesImporter"),
830 aFilterArgs, rName, true );
831
832 if( !nRet && !(IsOrganizerMode() || m_aOption.IsFormatsOnly()) )
833 nRet = ReadThroughComponent(
834 xStorage, xModelComp, "content.xml", xContext,
835 (bOASIS ? "com.sun.star.comp.Writer.XMLOasisContentImporter"
836 : "com.sun.star.comp.Writer.XMLContentImporter"),
837 aFilterArgs, rName, true );
838
839 if( !IsOrganizerMode() && !IsBlockMode() && !m_bInsertMode &&
841 // sw_redlinehide: disable layout cache for now
842 *o3tl::doAccess<bool>(xInfoSet->getPropertyValue(sShowChanges)) &&
843 // sw_fieldmarkhide: also disable if there is a fieldmark
846 {
847 try
848 {
849 uno::Reference < io::XStream > xStm = xStorage->openStreamElement( "layout-cache", embed::ElementModes::READ );
850 std::unique_ptr<SvStream> pStrm2 = utl::UcbStreamHelper::CreateStream( xStm );
851 if( !pStrm2->GetError() )
852 rDoc.ReadLayoutCache( *pStrm2 );
853 }
854 catch (const uno::Exception&)
855 {
856 }
857 }
858
859 // Notify math objects
860 if( m_bInsertMode )
861 rDoc.PrtOLENotify( false );
862 else if ( rDoc.IsOLEPrtNotifyPending() )
863 rDoc.PrtOLENotify( true );
864
865 nRet = nRet ? nRet : (nWarn ? nWarn : (nWarn2 ? nWarn2 : nWarnRDF ) );
866
867 ::svx::DropUnusedNamedItems(xModelComp);
868
870
871 // redline password
872 Any aAny = xInfoSet->getPropertyValue( sRedlineProtectionKey );
873 Sequence<sal_Int8> aKey;
874 aAny >>= aKey;
876
877 // restore redline mode from import info property set
879 aAny = xInfoSet->getPropertyValue( sShowChanges );
880 if ( *o3tl::doAccess<bool>(aAny) )
881 nRedlineFlags |= RedlineFlags::ShowDelete;
882 aAny = xInfoSet->getPropertyValue( sRecordChanges );
883 if ( *o3tl::doAccess<bool>(aAny) || aKey.hasElements() )
884 nRedlineFlags |= RedlineFlags::On;
885
886 // ... restore redline mode
887 // (First set bogus mode to make sure the mode in getIDocumentRedlineAccess().SetRedlineFlags()
888 // is different from its previous mode.)
889 rDoc.getIDocumentRedlineAccess().SetRedlineFlags_intern( ~nRedlineFlags );
890 // must set flags to show delete so that CompressRedlines works
892 // tdf#83260 ensure that the first call of CompressRedlines after loading
893 // the document is a no-op by calling it now
895 // can't set it on the layout or view shell because it doesn't exist yet
897
898 lcl_EnsureValidPam( rPaM ); // move Pam into valid content
899
900 if( xGraphicHelper )
901 xGraphicHelper->dispose();
902 xGraphicHelper.clear();
903 xGraphicStorageHandler = nullptr;
904 if( xObjectHelper )
905 xObjectHelper->dispose();
906 xObjectHelper.clear();
907 xObjectResolver = nullptr;
908 aHoldRef.clear();
909
910 if ( !bOASIS )
911 {
912 // #i44177# - assure that for documents in OpenOffice.org
913 // file format the relation between outline numbering rule and styles is
914 // filled-up accordingly.
915 // Note: The OpenOffice.org file format, which has no content that applies
916 // a certain style, which is related to the outline numbering rule,
917 // has lost the information, that this certain style is related to
918 // the outline numbering rule.
919 // #i70748# - only for templates
920 if ( m_pMedium && m_pMedium->GetFilter() &&
921 m_pMedium->GetFilter()->IsOwnTemplateFormat() )
922 {
924 }
925 // Fix #i58251#: Unfortunately is the static default different to SO7 behaviour,
926 // so we have to set a dynamic default after importing SO7
927 rDoc.SetDefault(SwFormatRowSplit(false));
928 }
929
931
932 // #i62875#
934 {
936 }
937
938 // Convert all instances of <SdrOle2Obj> into <SdrGrafObj>, because the
939 // Writer doesn't support such objects.
941
942 // set BuildId on XModel for later OLE object loading
943 if( xInfoSet.is() )
944 {
945 uno::Reference< beans::XPropertySet > xModelSet( xModelComp, uno::UNO_QUERY );
946 if( xModelSet.is() )
947 {
948 uno::Reference< beans::XPropertySetInfo > xModelSetInfo( xModelSet->getPropertySetInfo() );
949 static constexpr OUStringLiteral sName(u"BuildId" );
950 if( xModelSetInfo.is() && xModelSetInfo->hasPropertyByName(sName) )
951 {
952 xModelSet->setPropertyValue( sName, xInfoSet->getPropertyValue(sName) );
953 }
954 }
955 }
956
957 // tdf#115815 restore annotation ranges stored in temporary bookmarks
959
960 if (xStatusIndicator.is())
961 {
962 xStatusIndicator->end();
963 }
964
965 rDoc.GetIStyleAccess().clearCaches(); // Clear Automatic-Style-Caches(shared_pointer!)
966 return nRet;
967}
968
969 // read the sections of the document, which is equal to the medium.
970 // returns the count of it
972 std::vector<OUString>& rStrings) const
973{
974 uno::Reference< uno::XComponentContext > xContext =
976 uno::Reference < embed::XStorage > xStg2;
977 if( ( xStg2 = rMedium.GetStorage() ).is() )
978 {
979 try
980 {
981 xml::sax::InputSource aParserInput;
982 static constexpr OUStringLiteral sDocName( u"content.xml" );
983 aParserInput.sSystemId = sDocName;
984
985 uno::Reference < io::XStream > xStm = xStg2->openStreamElement( sDocName, embed::ElementModes::READ );
986 aParserInput.aInputStream = xStm->getInputStream();
987
988 // get filter
989 rtl::Reference< SwXMLSectionList > xImport = new SwXMLSectionList( xContext, rStrings );
990
991 // parse
992 xImport->parseStream( aParserInput );
993 }
994 catch( xml::sax::SAXParseException& )
995 {
996 TOOLS_WARN_EXCEPTION("sw", "");
997 // re throw ?
998 }
999 catch( xml::sax::SAXException& )
1000 {
1001 TOOLS_WARN_EXCEPTION("sw", "");
1002 // re throw ?
1003 }
1004 catch( io::IOException& )
1005 {
1006 TOOLS_WARN_EXCEPTION("sw", "");
1007 // re throw ?
1008 }
1009 catch( packages::WrongPasswordException& )
1010 {
1011 // re throw ?
1012 }
1013 }
1014 return rStrings.size();
1015}
1016
1017/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
@ ShowDelete
show all deletes
@ On
RedlineFlags on.
@ ShowInsert
show all inserts
@ NONE
no RedlineFlags
@ DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE
Reference< XInputStream > xStream
const OUString & GetValue() const
virtual const SwDrawModel * GetDrawModel() const =0
Draw Model and id accessors.
virtual const_iterator_t getFieldmarksBegin() const =0
returns a STL-like random access iterator to the begin of the sequence of fieldmarks.
virtual const_iterator_t getFieldmarksEnd() const =0
returns a STL-like random access iterator to the end of the sequence of fieldmarks.
virtual void restoreAnnotationMarks(bool bDelete=true)=0
virtual bool IsRedlineOn() const =0
Query if redlining is on.
virtual void SetRedlinePassword(const css::uno::Sequence< sal_Int8 > &rNewPassword)=0
static bool IsShowChanges(const RedlineFlags eM)
virtual void SetRedlineFlags_intern(RedlineFlags eMode)=0
Set a new redline mode.
virtual void SetRedlineFlags(RedlineFlags eMode)=0
Set a new redline mode.
virtual RedlineFlags GetRedlineFlags() const =0
Query the currently set redline mode.
virtual void CompressRedlines(size_t nStartIndex=0)=0
virtual const css::uno::Sequence< sal_Int8 > & GetRedlinePassword() const =0
virtual bool get(DocumentSettingId id) const =0
Return the specified document setting.
virtual void set(DocumentSettingId id, bool value)=0
Set the specified document setting.
virtual void clearCaches()=0
To release the cached styles (shared_pointer!)
bool IsBlockMode() const
Definition: shellio.hxx:258
bool m_bInsertMode
Definition: shellio.hxx:221
SwgReaderOption m_aOption
Definition: shellio.hxx:220
SfxMedium * m_pMedium
Definition: shellio.hxx:218
css::uno::Reference< css::embed::XStorage > m_xStorage
Definition: shellio.hxx:217
bool IsOrganizerMode() const
Definition: shellio.hxx:261
const SdrPage * GetPage(sal_uInt16 nPgNum) const
SdrObject * Next()
bool IsMore() const
virtual rtl::Reference< SdrObject > ReplaceObject(SdrObject *pNewObj, size_t nObjNum)
sal_uInt32 GetOrdNum() const
virtual const tools::Rectangle & GetCurrentBoundRect() const
SdrObjList * getParentSdrObjListFromSdrObject() const
SdrModel & getSdrModelFromSdrObject() const
virtual SdrLayerID GetLayer() const
void Connect(SvxOle2Shape *pCreator=nullptr)
void Disconnect()
const Graphic * GetGraphic() const
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
const std::shared_ptr< const SfxFilter > & GetFilter() const
SfxItemSet & GetItemSet() const
css::uno::Reference< css::embed::XStorage > GetStorage(bool bCreateTempFile=true)
css::uno::Reference< css::task::XInteractionHandler > GetInteractionHandler(bool bGetAlways=false)
SfxMedium * GetMedium() const
css::uno::Reference< css::frame::XModel3 > GetModel() const
SfxObjectCreateMode GetCreateMode() const
const css::uno::Any & GetValue() const
sal_Int32 GetVersion() const
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)
SwContentIndex & Assign(const SwContentNode *, sal_Int32)
Definition: index.cxx:206
Definition: doc.hxx:197
void PropagateOutlineRule()
Definition: docnum.cxx:176
void SetDefault(const SfxPoolItem &)
Set attribute as new default attribute in current document.
Definition: docfmt.cxx:548
void PrtOLENotify(bool bAll)
Definition: docdesc.cxx:812
SwNumRule * GetOutlineNumRule() const
Definition: doc.hxx:1039
SwNodes & GetNodes()
Definition: doc.hxx:422
IStyleAccess & GetIStyleAccess()
Definition: doc.hxx:772
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
Definition: doc.cxx:349
::sw::DocumentRedlineManager const & GetDocumentRedlineManager() const
Definition: doc.cxx:359
IDocumentSettingAccess const & getIDocumentSettingAccess() const
Definition: doc.cxx:190
SfxObjectShell * GetPersist() const
Definition: docnew.cxx:653
const SwTextFormatColls * GetTextFormatColls() const
Definition: doc.hxx:793
IDocumentMarkAccess * getIDocumentMarkAccess()
Definition: docbm.cxx:1890
void ReadLayoutCache(SvStream &rStream)
SwDoc: Reading and writing of the layout cache.
Definition: docnew.cxx:802
IDocumentDrawModelAccess const & getIDocumentDrawModelAccess() const
Definition: doc.cxx:169
bool IsOLEPrtNotifyPending() const
Definition: doc.hxx:575
SwDocShell * GetDocShell()
Definition: doc.hxx:1370
Controls if a table row is allowed to split or not.
Definition: fmtrowsplt.hxx:32
const OUString & GetName() const
Definition: format.hxx:131
const SfxPoolItem & GetFormatAttr(sal_uInt16 nWhich, bool bInParents=true) const
If bInParents is FALSE, search only in this format for attribute.
Definition: format.cxx:366
const SwStartNode * StartOfSectionNode() const
Definition: node.hxx:153
SwNode & GetEndOfContent() const
Regular ContentSection (i.e. the BodyText).
Definition: ndarr.hxx:165
const OUString & GetName() const
Definition: numrule.hxx:224
PaM is Point and Mark: a selection of the document model.
Definition: pam.hxx:188
const SwPosition * GetMark() const
Definition: pam.hxx:255
SwContentNode * GetPointContentNode() const
Definition: pam.hxx:279
bool Move(SwMoveFnCollection const &fnMove=fnMoveForward, SwGoInDoc fnGo=GoInContent)
Movement of cursor.
Definition: pam.cxx:657
SwContentNode * GetMarkContentNode() const
Definition: pam.hxx:280
SwDoc & GetDoc() const
Definition: pam.hxx:291
SwPosition & GetBound(bool bOne=true)
Definition: pam.hxx:293
void DeleteMark()
Definition: pam.hxx:232
const SwPosition * GetPoint() const
Definition: pam.hxx:253
static const OUString & GetProgName(const OUString &rName, SwGetPoolIdFromName)
Represents the style of a paragraph.
Definition: fmtcol.hxx:61
bool IsAssignedToListLevelOfOutlineStyle() const
Definition: fmtcol.hxx:122
virtual bool SetFormatAttr(const SfxPoolItem &rAttr) override
Override to recognize changes on the <SwNumRuleItem> and register/unregister the paragragh style at t...
Definition: fmtcol.cxx:395
void AssignToListLevelOfOutlineStyle(const int nAssignedListLevel)
Definition: fmtcol.cxx:685
int GetAssignedOutlineStyleLevel() const
Definition: fmtcol.cxx:678
size_t size() const
Definition: docary.hxx:88
static rtl::Reference< SwXTextRange > CreateXTextRange(SwDoc &rDoc, const SwPosition &rPos, const SwPosition *const pMark)
Definition: unoobj2.cxx:1221
bool IsPageDescs() const
Definition: shellio.hxx:119
bool IsMerge() const
Definition: shellio.hxx:128
bool IsFormatsOnly() const
Definition: shellio.hxx:114
bool IsNumRules() const
Definition: shellio.hxx:125
void ResetAllFormatsOnly()
Definition: shellio.hxx:113
bool IsFrameFormats() const
Definition: shellio.hxx:116
bool IsTextFormats() const
Definition: shellio.hxx:122
virtual SwReaderType GetReaderType() override
Definition: swxml.cxx:124
virtual ErrCode Read(SwDoc &, const OUString &rBaseURL, SwPaM &, const OUString &) override
Definition: swxml.cxx:467
XMLReader()
Definition: swxml.cxx:120
virtual size_t GetSectionList(SfxMedium &rMedium, std::vector< OUString > &rStrings) const override
Definition: swxml.cxx:971
css::uno::Type const & get()
void SetHideRedlines(bool const bHideRedlines)
static std::unique_ptr< SvStream > CreateStream(const OUString &rFileName, StreamMode eOpenMode, css::uno::Reference< css::awt::XWindow > xParentWin=nullptr)
int nCount
OString exceptionToString(const css::uno::Any &caught)
#define TOOLS_WARN_EXCEPTION(area, stream)
SVXCORE_DLLPUBLIC OUString SvxResId(TranslateId aId)
float u
#define ERRCODE_IO_BROKENPACKAGE
#define ERRCODE_NONE
#define SOFFICE_FILEFORMAT_60
OUString sName
constexpr TypedWhichId< SwNumRuleItem > RES_PARATR_NUMRULE(72)
sal_Int64 n
#define SAL_INFO_IF(condition, area, stream)
#define SAL_WARN_IF(condition, area, stream)
#define SAL_WARN(area, stream)
COMPHELPER_DLLPUBLIC css::uno::Reference< css::beans::XPropertySet > GenericPropertySet_CreateInstance(PropertySetInfo *pInfo)
Reference< XComponentContext > getProcessComponentContext()
Any SAL_CALL getCaughtException()
bool ExistsDrawObjs(SwDoc &p_rDoc)
method to check, if given Writer document contains at least one drawing object
Definition: docdraw.cxx:612
int i
detail::Optional< bool >::type tryAccess< bool >(css::uno::Any const &any)
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
o3tl::strong_int< sal_Int32, struct Tag_SwNodeOffset > SwNodeOffset
Definition: nodeoffset.hxx:16
bool GoInContent(SwPaM &rPam, SwMoveFnCollection const &fnMove)
Definition: pam.cxx:1203
SwMoveFnCollection const & fnMoveForward
SwPam::Move()/Find() default argument.
Definition: paminit.cxx:61
@ RES_POOLCOLL_HEADLINE1
Heading 1.
Definition: poolfmt.hxx:262
#define ERRCODE_SFX_WRONGPASSWORD
SwReaderType
Definition: shellio.hxx:186
void Adjust(SwNodeOffset nDelta)
Adjust node position, and resets content position to zero.
Definition: pam.cxx:257
void Assign(const SwNode &rNd, SwNodeOffset nDelta, sal_Int32 nContentOffset=0)
These all set both nNode and nContent.
Definition: pam.cxx:231
const SwContentNode * GetContentNode() const
Definition: pam.hxx:84
SwContentIndex nContent
Definition: pam.hxx:40
Reference< XModel > xModel
#define ERR_FORMAT_FILE_ROWCOL
Definition: swerror.h:29
#define WARN_SWG_FEATURES_LOST
Definition: swerror.h:38
#define ERR_FORMAT_ROWCOL
Definition: swerror.h:27
#define ERR_SWG_READ_ERROR
Definition: swerror.h:25
#define WARN_FORMAT_FILE_ROWCOL
Definition: swerror.h:42
constexpr sal_uInt8 MAXLEVEL
Definition: swtypes.hxx:92
static void lcl_AdjustOutlineStylesForOOo(SwDoc &_rDoc)
Definition: swxml.cxx:348
static void lcl_ConvertSdrOle2ObjsToSdrGrafObjs(SwDoc &_rDoc)
Definition: swxml.cxx:426
static void lcl_EnsureValidPam(SwPaM &rPam)
Definition: swxml.cxx:91
unsigned char sal_uInt8