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>
43#include <svx/strings.hrc>
78#include <sfx2/sfxsids.hrc>
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,
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!");
150 xml::sax::InputSource aParserInput;
151 aParserInput.sSystemId = rName;
152 aParserInput.aInputStream = xInputStream;
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);
162 uno::Reference< xml::sax::XFastParser > xFastParser(xFilter, UNO_QUERY);
163 uno::Reference< xml::sax::XDocumentHandler > xDocumentHandler;
165 xDocumentHandler.set(xFilter, UNO_QUERY);
166 if (!xDocumentHandler && !xFastParser)
168 SAL_WARN(
"sd",
"service does not implement XFastParser or XDocumentHandler");
174 uno::Reference < XImporter > xImporter( xFilter, UNO_QUERY );
175 xImporter->setTargetDocument( xModelComponent );
181 xFastParser->parseStream( aParserInput );
184 uno::Reference< xml::sax::XParser > xParser = xml::sax::Parser::create(rxContext);
186 xParser->setDocumentHandler( xDocumentHandler );
187 xParser->parseStream( aParserInput );
190 catch( xml::sax::SAXParseException& r)
195 xml::sax::SAXException aSaxEx = *
static_cast<xml::sax::SAXException*
>(&r);
196 bool bTryChild =
true;
200 xml::sax::SAXException aTmp;
201 if ( aSaxEx.WrappedException >>= aTmp )
207 packages::zip::ZipIOException aBrokenPackage;
208 if ( aSaxEx.WrappedException >>= aBrokenPackage )
216 const OUString sErr( OUString::number( r.LineNumber )
218 + OUString::number( r.ColumnNumber ) );
220 if( !rStreamName.isEmpty() )
226 DialogMask::ButtonsOk | DialogMask::MessageError );
230 OSL_ENSURE( bMustBeSuccessful,
"Warnings are not supported" );
232 DialogMask::ButtonsOk | DialogMask::MessageError );
235 catch(
const xml::sax::SAXException& r)
238 packages::zip::ZipIOException aBrokenPackage;
239 if ( r.WrappedException >>= aBrokenPackage )
248 catch(
const packages::zip::ZipIOException&)
253 catch(
const io::IOException&)
258 catch(
const uno::Exception&)
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)
279 OSL_ENSURE(xStorage.is(),
"Need storage!");
280 OSL_ENSURE(
nullptr != pStreamName,
"Please, please, give me a name!");
283 OUString sStreamName = OUString::createFromAscii(pStreamName);
284 bool bContainsStream =
false;
287 bContainsStream = xStorage->isStreamElement(sStreamName);
289 catch( container::NoSuchElementException& )
293 if (!bContainsStream )
300 uno::Reference< beans::XPropertySet > xInfoSet;
301 if( rFilterArguments.hasElements() )
302 rFilterArguments.getConstArray()[0] >>= xInfoSet;
303 OSL_ENSURE( xInfoSet.is(),
"missing property set" );
306 xInfoSet->setPropertyValue(
"StreamName",
Any( sStreamName ) );
312 uno::Reference <io::XStream>
xStream = xStorage->openStreamElement( sStreamName, embed::ElementModes::READ );
313 uno::Reference <beans::XPropertySet > xProps( xStream, uno::UNO_QUERY );
315 Any aAny = xProps->getPropertyValue(
"Encrypted");
318 bool bEncrypted = b && *b;
320 uno::Reference <io::XInputStream> xInputStream =
xStream->getInputStream();
323 return ReadThroughComponent(
324 xInputStream, xModelComponent, sStreamName, rxContext,
325 pFilterName, rFilterArguments,
326 rName, bMustBeSuccessful, bEncrypted );
328 catch ( packages::WrongPasswordException& )
332 catch( packages::zip::ZipIOException& )
336 catch ( uno::Exception& )
338 OSL_FAIL(
"Error on import" );
352 OUString aDefOutlStyleNames[
MAXLEVEL ];
360 aDefOutlStyleNames[
i] = sStyleName;
365 bool aOutlineLevelAssigned[
MAXLEVEL ];
372 aOutlineLevelAssigned[
i ] =
false;
373 aCreatedDefaultOutlineStyles[
i ] =
nullptr;
380 for (
size_t n = 1;
n < rColls.
size(); ++
n )
390 if ( aCreatedDefaultOutlineStyles[
i ] ==
nullptr &&
391 pColl->
GetName() == aDefOutlStyleNames[
i] )
393 aCreatedDefaultOutlineStyles[
i ] = pColl;
407 if ( !aOutlineLevelAssigned[
i ] &&
408 aCreatedDefaultOutlineStyles[
i ] !=
nullptr &&
409 ! aCreatedDefaultOutlineStyles[
i ]->IsAssignedToListLevelOfOutlineStyle() )
449 aGraphic = *pGraphic;
459 pGraphicObj->SetLayer( pOle2Obj->
GetLayer() );
471 SAL_INFO_IF(rBaseURL.isEmpty(),
"sw.filter",
"sw::XMLReader: no base URL");
474 uno::Reference< uno::XComponentContext > xContext =
477 uno::Reference<document::XGraphicStorageHandler> xGraphicStorageHandler;
479 uno::Reference< document::XEmbeddedObjectResolver > xObjectResolver;
483 uno::Reference<embed::XStorage> xStorage;
493 SvXMLGraphicHelperMode::Read );
494 xGraphicStorageHandler = xGraphicHelper.get();
500 SvXMLEmbeddedObjectHelperMode::Read );
501 xObjectResolver = xObjectHelper.get();
506 OSL_ENSURE( pDocSh,
"XMLReader::Read: got no doc shell" );
509 uno::Reference< lang::XComponent > xModelComp = pDocSh->
GetModel();
510 OSL_ENSURE( xModelComp.is(),
511 "XMLReader::Read: got no model" );
512 if( !xModelComp.is() )
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 },
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 },
575 { OUString(
"ShapePositionInHoriL2R"), 0,
577 beans::PropertyAttribute::MAYBEVOID, 0 },
579 { OUString(
"BuildId"), 0,
581 beans::PropertyAttribute::MAYBEVOID, 0 },
589 { OUString(
"TextDocInOOoFileFormat"), 0,
591 beans::PropertyAttribute::MAYBEVOID, 0 },
593 css::beans::PropertyAttribute::MAYBEVOID, 0 },
595 uno::Reference< beans::XPropertySet > xInfoSet(
600 uno::Reference< container::XChild > xChild( xModelComp, uno::UNO_QUERY );
603 uno::Reference< beans::XPropertySet > xParentSet( xChild->getParent(), uno::UNO_QUERY );
604 if( xParentSet.is() )
606 uno::Reference< beans::XPropertySetInfo > xPropSetInfo( xParentSet->getPropertySetInfo() );
607 static constexpr OUStringLiteral sPropName(
u"BuildId" );
608 if( xPropSetInfo.is() && xPropSetInfo->hasPropertyByName(sPropName) )
610 xInfoSet->setPropertyValue( sPropName, xParentSet->getPropertyValue(sPropName) );
616 uno::Reference<task::XStatusIndicator> xStatusIndicator;
624 pItem->
GetValue() >>= xStatusIndicator;
629 sal_Int32 nProgressRange(1000000);
630 if (xStatusIndicator.is())
632 xStatusIndicator->start(
SvxResId(RID_SVXSTR_DOC_LOAD), nProgressRange);
635 aProgRange <<= nProgressRange;
636 xInfoSet->setPropertyValue(
"ProgressRange", aProgRange);
638 Reference< container::XNameAccess > xLateInitSettings( document::NamedPropertyValues::create(xContext), UNO_QUERY_THROW );
639 beans::NamedValue aLateInitSettings(
"LateInitSettings",
Any( xLateInitSettings ) );
641 xInfoSet->setPropertyValue(
"SourceStorage",
Any( xStorage ) );
644 Sequence<Any> aFilterArgs{
Any(xInfoSet),
645 Any(xStatusIndicator),
646 Any(xGraphicStorageHandler),
647 Any(xObjectResolver),
648 Any(aLateInitSettings) };
650 Sequence<Any> aEmptyArgs{
Any(xInfoSet),
651 Any(xStatusIndicator) };
662 Sequence< OUString> aFamiliesSeq(
nCount );
663 OUString *pSeq = aFamiliesSeq.getArray();
666 *pSeq++ =
"FrameStyles";
669 *pSeq++ =
"PageStyles";
673 *pSeq++ =
"CharacterStyles";
674 *pSeq++ =
"ParagraphStyles";
678 *pSeq++ =
"NumberingStyles";
680 xInfoSet->setPropertyValue(
"StyleInsertModeFamilies",
689 xInfoSet->setPropertyValue(
"TextInsertModeRange",
690 Any(uno::Reference<text::XTextRange>(xInsertTextRange)) );
700 xInfoSet->setPropertyValue(
"AutoTextMode",
Any(
true) );
704 xInfoSet->setPropertyValue(
"OrganizerMode",
Any(
true) );
711 OSL_ENSURE( pMedDescrMedium,
"There is no medium to get MediaDescriptor from!" );
713 xInfoSet->setPropertyValue(
"BaseURI",
Any( rBaseURL ) );
723 if ( pDocHierarchItem )
724 StreamPath = pDocHierarchItem->
GetValue();
728 StreamPath =
"dummyObjectName";
731 if( !StreamPath.isEmpty() )
733 xInfoSet->setPropertyValue(
"StreamRelPath",
Any( StreamPath ) );
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,
757 const bool bShapePositionInHoriL2R = !bOASIS;
758 xInfoSet->setPropertyValue(
759 "ShapePositionInHoriL2R",
760 Any( bShapePositionInHoriL2R ) );
763 const bool bTextDocInOOoFileFormat = !bOASIS;
764 xInfoSet->setPropertyValue(
765 "TextDocInOOoFileFormat",
766 Any( bTextDocInOOoFileFormat ) );
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(
785 xDMA->loadMetadataFromStorage(xStorage, xBaseURI, xHandler);
787 catch (
const lang::WrappedTargetException & e)
789 ucb::InteractiveAugmentedIOException iaioe;
790 if (e.TargetException >>= iaioe)
800 catch (uno::Exception &)
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 );
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 );
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 );
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 );
842 *o3tl::doAccess<bool>(xInfoSet->getPropertyValue(sShowChanges)) &&
849 uno::Reference < io::XStream > xStm = xStorage->openStreamElement(
"layout-cache", embed::ElementModes::READ );
851 if( !pStrm2->GetError() )
854 catch (
const uno::Exception&)
865 nRet = nRet ? nRet : (nWarn ? nWarn : (nWarn2 ? nWarn2 : nWarnRDF ) );
867 ::svx::DropUnusedNamedItems(xModelComp);
872 Any aAny = xInfoSet->getPropertyValue( sRedlineProtectionKey );
873 Sequence<sal_Int8> aKey;
879 aAny = xInfoSet->getPropertyValue( sShowChanges );
880 if ( *o3tl::doAccess<bool>(aAny) )
882 aAny = xInfoSet->getPropertyValue( sRecordChanges );
883 if ( *o3tl::doAccess<bool>(aAny) || aKey.hasElements() )
901 xGraphicHelper->dispose();
902 xGraphicHelper.clear();
903 xGraphicStorageHandler =
nullptr;
905 xObjectHelper->dispose();
906 xObjectHelper.clear();
907 xObjectResolver =
nullptr;
945 uno::Reference< beans::XPropertySet > xModelSet( xModelComp, uno::UNO_QUERY );
948 uno::Reference< beans::XPropertySetInfo > xModelSetInfo( xModelSet->getPropertySetInfo() );
949 static constexpr OUStringLiteral
sName(
u"BuildId" );
950 if( xModelSetInfo.is() && xModelSetInfo->hasPropertyByName(
sName) )
952 xModelSet->setPropertyValue(
sName, xInfoSet->getPropertyValue(
sName) );
960 if (xStatusIndicator.is())
962 xStatusIndicator->end();
972 std::vector<OUString>& rStrings)
const
974 uno::Reference< uno::XComponentContext > xContext =
976 uno::Reference < embed::XStorage > xStg2;
981 xml::sax::InputSource aParserInput;
982 static constexpr OUStringLiteral sDocName(
u"content.xml" );
983 aParserInput.sSystemId = sDocName;
985 uno::Reference < io::XStream > xStm = xStg2->openStreamElement( sDocName, embed::ElementModes::READ );
986 aParserInput.aInputStream = xStm->getInputStream();
992 xImport->parseStream( aParserInput );
994 catch( xml::sax::SAXParseException& )
999 catch( xml::sax::SAXException& )
1004 catch( io::IOException& )
1009 catch( packages::WrongPasswordException& )
1014 return rStrings.size();
@ ShowDelete
show all deletes
@ ShowInsert
show all inserts
@ DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE
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!)
SwgReaderOption m_aOption
css::uno::Reference< css::embed::XStorage > m_xStorage
bool IsOrganizerMode() const
const SdrPage * GetPage(sal_uInt16 nPgNum) 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)
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)
void PropagateOutlineRule()
void SetDefault(const SfxPoolItem &)
Set attribute as new default attribute in current document.
void PrtOLENotify(bool bAll)
SwNumRule * GetOutlineNumRule() const
IStyleAccess & GetIStyleAccess()
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
::sw::DocumentRedlineManager const & GetDocumentRedlineManager() const
IDocumentSettingAccess const & getIDocumentSettingAccess() const
SfxObjectShell * GetPersist() const
const SwTextFormatColls * GetTextFormatColls() const
IDocumentMarkAccess * getIDocumentMarkAccess()
void ReadLayoutCache(SvStream &rStream)
SwDoc: Reading and writing of the layout cache.
IDocumentDrawModelAccess const & getIDocumentDrawModelAccess() const
bool IsOLEPrtNotifyPending() const
SwDocShell * GetDocShell()
const SwStartNode * StartOfSectionNode() const
SwNode & GetEndOfContent() const
Regular ContentSection (i.e. the BodyText).
const OUString & GetName() const
PaM is Point and Mark: a selection of the document model.
const SwPosition * GetMark() const
SwContentNode * GetPointContentNode() const
bool Move(SwMoveFnCollection const &fnMove=fnMoveForward, SwGoInDoc fnGo=GoInContent)
Movement of cursor.
SwContentNode * GetMarkContentNode() const
SwPosition & GetBound(bool bOne=true)
const SwPosition * GetPoint() const
static const OUString & GetProgName(const OUString &rName, SwGetPoolIdFromName)
Represents the style of a paragraph.
bool IsAssignedToListLevelOfOutlineStyle() const
virtual bool SetFormatAttr(const SfxPoolItem &rAttr) override
Override to recognize changes on the <SwNumRuleItem> and register/unregister the paragragh style at t...
void AssignToListLevelOfOutlineStyle(const int nAssignedListLevel)
int GetAssignedOutlineStyleLevel() const
bool IsFormatsOnly() const
void ResetAllFormatsOnly()
bool IsFrameFormats() const
bool IsTextFormats() const
virtual SwReaderType GetReaderType() override
virtual ErrCode Read(SwDoc &, const OUString &rBaseURL, SwPaM &, const OUString &) override
virtual size_t GetSectionList(SfxMedium &rMedium, std::vector< OUString > &rStrings) const override
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)
OString exceptionToString(const css::uno::Any &caught)
#define TOOLS_WARN_EXCEPTION(area, stream)
SVXCORE_DLLPUBLIC OUString SvxResId(TranslateId aId)
#define ERRCODE_IO_BROKENPACKAGE
constexpr TypedWhichId< SwNumRuleItem > RES_PARATR_NUMRULE(72)
#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
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
bool GoInContent(SwPaM &rPam, SwMoveFnCollection const &fnMove)
SwMoveFnCollection const & fnMoveForward
SwPam::Move()/Find() default argument.
@ RES_POOLCOLL_HEADLINE1
Heading 1.
#define ERRCODE_SFX_WRONGPASSWORD
void Adjust(SwNodeOffset nDelta)
Adjust node position, and resets content position to zero.
void Assign(const SwNode &rNd, SwNodeOffset nDelta, sal_Int32 nContentOffset=0)
These all set both nNode and nContent.
const SwContentNode * GetContentNode() const
Reference< XModel > xModel
#define ERR_FORMAT_FILE_ROWCOL
#define WARN_SWG_FEATURES_LOST
#define ERR_FORMAT_ROWCOL
#define ERR_SWG_READ_ERROR
#define WARN_FORMAT_FILE_ROWCOL
constexpr sal_uInt8 MAXLEVEL
static void lcl_AdjustOutlineStylesForOOo(SwDoc &_rDoc)
static void lcl_ConvertSdrOle2ObjsToSdrGrafObjs(SwDoc &_rDoc)
static void lcl_EnsureValidPam(SwPaM &rPam)