21 #include <com/sun/star/embed/XStorage.hpp>
22 #include <com/sun/star/embed/ElementModes.hpp>
24 #include <com/sun/star/xml/sax/InputSource.hpp>
25 #include <com/sun/star/xml/sax/Parser.hpp>
26 #include <com/sun/star/xml/sax/SAXParseException.hpp>
27 #include <com/sun/star/text/XTextRange.hpp>
28 #include <com/sun/star/container/XChild.hpp>
29 #include <com/sun/star/document/NamedPropertyValues.hpp>
30 #include <com/sun/star/beans/XPropertySetInfo.hpp>
31 #include <com/sun/star/beans/PropertyValue.hpp>
32 #include <com/sun/star/beans/NamedValue.hpp>
33 #include <com/sun/star/beans/PropertyAttribute.hpp>
34 #include <com/sun/star/io/XActiveDataSource.hpp>
35 #include <com/sun/star/packages/zip/ZipIOException.hpp>
36 #include <com/sun/star/packages/WrongPasswordException.hpp>
37 #include <com/sun/star/ucb/InteractiveAugmentedIOException.hpp>
38 #include <com/sun/star/task/XStatusIndicator.hpp>
39 #include <com/sun/star/frame/XModel.hpp>
40 #include <officecfg/Office/Common.hxx>
48 #include <svx/strings.hrc>
54 #include <rtl/strbuf.hxx>
60 #include <drawdoc.hxx>
62 #include <docfunc.hxx>
85 #include <sfx2/sfxsids.hrc>
141 uno::Reference<io::XInputStream>
const & xInputStream,
142 uno::Reference<XComponent>
const & xModelComponent,
143 const OUString& rStreamName,
144 uno::Reference<uno::XComponentContext>
const & rxContext,
146 const Sequence<Any>& rFilterArguments,
147 const OUString& rName,
148 bool bMustBeSuccessfull,
151 OSL_ENSURE(xInputStream.is(),
"input stream missing");
152 OSL_ENSURE(xModelComponent.is(),
"document missing");
153 OSL_ENSURE(rxContext.is(),
"factory missing");
154 OSL_ENSURE(
nullptr != pFilterName,
"I need a service name for the component!");
157 xml::sax::InputSource aParserInput;
158 aParserInput.sSystemId = rName;
159 aParserInput.aInputStream = xInputStream;
162 uno::Reference< xml::sax::XParser > xParser = xml::sax::Parser::create(rxContext);
163 SAL_INFO(
"sw.filter",
"parser created" );
165 const OUString aFilterName(OUString::createFromAscii(pFilterName));
166 uno::Reference< xml::sax::XDocumentHandler > xFilter(
167 rxContext->getServiceManager()->createInstanceWithArgumentsAndContext(aFilterName, rFilterArguments, rxContext),
169 SAL_WARN_IF(!xFilter.is(),
"sw.filter",
"Can't instantiate filter component: " << aFilterName);
172 SAL_INFO(
"sw.filter",
"" << pFilterName <<
" created" );
174 xParser->setDocumentHandler( xFilter );
177 uno::Reference < XImporter > xImporter( xFilter, UNO_QUERY );
178 xImporter->setTargetDocument( xModelComponent );
179 uno::Reference< xml::sax::XFastParser > xFastParser =
dynamic_cast<
180 xml::sax::XFastParser*
>( xFilter.get() );
185 if( xFastParser.is() )
186 xFastParser->parseStream( aParserInput );
188 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( bMustBeSuccessfull,
"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,
273 const sal_Char* pCompatibilityStreamName,
274 uno::Reference<uno::XComponentContext>
const & rxContext,
276 const Sequence<Any>& rFilterArguments,
277 const OUString& rName,
278 bool bMustBeSuccessfull)
280 OSL_ENSURE(xStorage.is(),
"Need storage!");
281 OSL_ENSURE(
nullptr != pStreamName,
"Please, please, give me a name!");
284 OUString sStreamName = OUString::createFromAscii(pStreamName);
285 bool bContainsStream =
false;
288 bContainsStream = xStorage->isStreamElement(sStreamName);
290 catch( container::NoSuchElementException& )
294 if (!bContainsStream )
300 if (
nullptr == pCompatibilityStreamName )
304 sStreamName = OUString::createFromAscii(pCompatibilityStreamName);
307 bContainsStream = xStorage->isStreamElement(sStreamName);
309 catch( container::NoSuchElementException& )
313 if (! bContainsStream )
318 uno::Reference< beans::XPropertySet > xInfoSet;
319 if( rFilterArguments.hasElements() )
320 rFilterArguments.getConstArray()[0] >>= xInfoSet;
321 OSL_ENSURE( xInfoSet.is(),
"missing property set" );
324 xInfoSet->setPropertyValue(
"StreamName",
makeAny( sStreamName ) );
330 uno::Reference <io::XStream>
xStream = xStorage->openStreamElement( sStreamName, embed::ElementModes::READ );
331 uno::Reference <beans::XPropertySet > xProps( xStream, uno::UNO_QUERY );
333 Any aAny = xProps->getPropertyValue(
"Encrypted");
336 bool bEncrypted = b && *b;
338 uno::Reference <io::XInputStream> xInputStream = xStream->getInputStream();
341 return ReadThroughComponent(
342 xInputStream, xModelComponent, sStreamName, rxContext,
343 pFilterName, rFilterArguments,
344 rName, bMustBeSuccessfull, bEncrypted );
346 catch ( packages::WrongPasswordException& )
350 catch( packages::zip::ZipIOException& )
354 catch ( uno::Exception& )
356 OSL_FAIL(
"Error on import" );
370 OUString aDefOutlStyleNames[
MAXLEVEL ];
378 aDefOutlStyleNames[
i] = sStyleName;
383 bool aOutlineLevelAssigned[
MAXLEVEL ];
390 aOutlineLevelAssigned[
i ] =
false;
391 aCreatedDefaultOutlineStyles[
i ] =
nullptr;
398 for (
size_t n = 1;
n < rColls.
size(); ++
n )
408 if ( aCreatedDefaultOutlineStyles[
i ] ==
nullptr &&
409 pColl->
GetName() == aDefOutlStyleNames[
i] )
411 aCreatedDefaultOutlineStyles[
i ] = pColl;
425 if ( !aOutlineLevelAssigned[
i ] &&
426 aCreatedDefaultOutlineStyles[
i ] !=
nullptr &&
427 ! aCreatedDefaultOutlineStyles[
i ]->IsAssignedToListLevelOfOutlineStyle() )
435 if ( static_cast<const SwNumRuleItem&>(rItem).
GetValue().isEmpty() )
466 aGraphic = *pGraphic;
490 SAL_INFO_IF(rBaseURL.isEmpty(),
"sw.filter",
"sw::XMLReader: no base URL");
493 uno::Reference< uno::XComponentContext > xContext =
496 uno::Reference<document::XGraphicStorageHandler> xGraphicStorageHandler;
498 uno::Reference< document::XEmbeddedObjectResolver > xObjectResolver;
502 uno::Reference<embed::XStorage> xStorage;
512 SvXMLGraphicHelperMode::Read );
513 xGraphicStorageHandler = xGraphicHelper.get();
519 SvXMLEmbeddedObjectHelperMode::Read );
520 xObjectResolver = xObjectHelper.get();
525 OSL_ENSURE( pDocSh,
"XMLReader::Read: got no doc shell" );
528 uno::Reference< lang::XComponent > xModelComp = pDocSh->
GetModel();
529 OSL_ENSURE( xModelComp.is(),
530 "XMLReader::Read: got no model" );
531 if( !xModelComp.is() )
541 { OUString(
"ProgressRange"), 0,
543 beans::PropertyAttribute::MAYBEVOID, 0},
544 { OUString(
"ProgressMax"), 0,
546 beans::PropertyAttribute::MAYBEVOID, 0},
547 { OUString(
"ProgressCurrent"), 0,
549 beans::PropertyAttribute::MAYBEVOID, 0},
550 { OUString(
"NumberStyles"), 0,
552 beans::PropertyAttribute::MAYBEVOID, 0},
553 { OUString(
"RecordChanges"), 0,
555 beans::PropertyAttribute::MAYBEVOID, 0 },
556 { OUString(
"ShowChanges"), 0,
558 beans::PropertyAttribute::MAYBEVOID, 0 },
559 { OUString(
"RedlineProtectionKey"), 0,
561 beans::PropertyAttribute::MAYBEVOID, 0 },
562 { OUString(
"PrivateData"), 0,
564 beans::PropertyAttribute::MAYBEVOID, 0 },
565 { OUString(
"BaseURI"), 0,
567 beans::PropertyAttribute::MAYBEVOID, 0 },
568 { OUString(
"StreamRelPath"), 0,
570 beans::PropertyAttribute::MAYBEVOID, 0 },
571 { OUString(
"StreamName"), 0,
573 beans::PropertyAttribute::MAYBEVOID, 0 },
575 { OUString(
"StyleInsertModeFamilies"), 0,
577 beans::PropertyAttribute::MAYBEVOID, 0 },
578 { OUString(
"StyleInsertModeOverwrite"), 0,
580 beans::PropertyAttribute::MAYBEVOID, 0 },
581 { OUString(
"TextInsertModeRange"), 0,
583 beans::PropertyAttribute::MAYBEVOID, 0},
584 { OUString(
"AutoTextMode"), 0,
586 beans::PropertyAttribute::MAYBEVOID, 0 },
587 { OUString(
"OrganizerMode"), 0,
589 beans::PropertyAttribute::MAYBEVOID, 0 },
594 { OUString(
"ShapePositionInHoriL2R"), 0,
596 beans::PropertyAttribute::MAYBEVOID, 0 },
598 { OUString(
"BuildId"), 0,
600 beans::PropertyAttribute::MAYBEVOID, 0 },
608 { OUString(
"TextDocInOOoFileFormat"), 0,
610 beans::PropertyAttribute::MAYBEVOID, 0 },
612 css::beans::PropertyAttribute::MAYBEVOID, 0 },
613 { OUString(), 0, css::uno::Type(), 0, 0 }
615 uno::Reference< beans::XPropertySet > xInfoSet(
620 uno::Reference< container::XChild > xChild( xModelComp, uno::UNO_QUERY );
623 uno::Reference< beans::XPropertySet > xParentSet( xChild->getParent(), uno::UNO_QUERY );
624 if( xParentSet.is() )
626 uno::Reference< beans::XPropertySetInfo > xPropSetInfo( xParentSet->getPropertySetInfo() );
627 const OUString sPropName(
"BuildId" );
628 if( xPropSetInfo.is() && xPropSetInfo->hasPropertyByName(sPropName) )
630 xInfoSet->setPropertyValue( sPropName, xParentSet->getPropertyValue(sPropName) );
636 uno::Reference<task::XStatusIndicator> xStatusIndicator;
644 pSet->
GetItem(SID_PROGRESS_STATUSBAR_CONTROL) );
647 pItem->
GetValue() >>= xStatusIndicator;
653 sal_Int32 nProgressRange(1000000);
654 if (xStatusIndicator.is())
656 xStatusIndicator->start(
SvxResId(RID_SVXSTR_DOC_LOAD), nProgressRange);
659 aProgRange <<= nProgressRange;
660 xInfoSet->setPropertyValue(
"ProgressRange", aProgRange);
663 beans::NamedValue aLateInitSettings(
"LateInitSettings",
makeAny( xLateInitSettings ) );
665 xInfoSet->setPropertyValue(
"SourceStorage",
Any( xStorage ) );
668 Sequence<Any> aFilterArgs{
Any(xInfoSet),
669 Any(xStatusIndicator),
670 Any(xGraphicStorageHandler),
671 Any(xObjectResolver),
672 Any(aLateInitSettings) };
674 Sequence<Any> aEmptyArgs{
Any(xInfoSet),
675 Any(xStatusIndicator) };
687 OUString *pSeq = aFamiliesSeq.getArray();
690 *pSeq++ =
"FrameStyles";
693 *pSeq++ =
"PageStyles";
697 *pSeq++ =
"CharacterStyles";
698 *pSeq++ =
"ParagraphStyles";
702 *pSeq++ =
"NumberingStyles";
704 xInfoSet->setPropertyValue(
"StyleInsertModeFamilies",
711 const uno::Reference<text::XTextRange> xInsertTextRange =
713 xInfoSet->setPropertyValue(
"TextInsertModeRange",
724 xInfoSet->setPropertyValue(
"AutoTextMode",
makeAny(
true) );
728 xInfoSet->setPropertyValue(
"OrganizerMode",
makeAny(
true) );
735 OSL_ENSURE( pMedDescrMedium,
"There is no medium to get MediaDescriptor from!" );
737 xInfoSet->setPropertyValue(
"BaseURI",
makeAny( rBaseURL ) );
743 if ( pMedDescrMedium && pMedDescrMedium->
GetItemSet() )
747 if ( pDocHierarchItem )
748 StreamPath = pDocHierarchItem->
GetValue();
752 StreamPath =
"dummyObjectName";
755 if( !StreamPath.isEmpty() )
757 xInfoSet->setPropertyValue(
"StreamRelPath",
makeAny( StreamPath ) );
765 const OUString sShowChanges(
"ShowChanges");
766 const OUString sRecordChanges(
"RecordChanges");
767 const OUString sRedlineProtectionKey(
"RedlineProtectionKey");
768 xInfoSet->setPropertyValue( sShowChanges,
770 xInfoSet->setPropertyValue( sRecordChanges,
772 xInfoSet->setPropertyValue( sRedlineProtectionKey,
781 const bool bShapePositionInHoriL2R = !bOASIS;
782 xInfoSet->setPropertyValue(
783 "ShapePositionInHoriL2R",
784 makeAny( bShapePositionInHoriL2R ) );
787 const bool bTextDocInOOoFileFormat = !bOASIS;
788 xInfoSet->setPropertyValue(
789 "TextDocInOOoFileFormat",
790 makeAny( bTextDocInOOoFileFormat ) );
801 const uno::Reference<rdf::XDocumentMetadataAccess> xDMA(xModelComp,
802 uno::UNO_QUERY_THROW);
803 const uno::Reference<frame::XModel>
xModel(xModelComp,
804 uno::UNO_QUERY_THROW);
806 xContext, xModel, rBaseURL, StreamPath) );
807 const uno::Reference<task::XInteractionHandler> xHandler(
809 xDMA->loadMetadataFromStorage(xStorage, xBaseURI, xHandler);
811 catch (
const lang::WrappedTargetException & e)
813 ucb::InteractiveAugmentedIOException iaioe;
814 if (e.TargetException >>= iaioe)
824 catch (uno::Exception &)
833 ErrCode const nWarn = ReadThroughComponent(
834 xStorage, xModelComp,
"meta.xml",
"Meta.xml", xContext,
835 (bOASIS ?
"com.sun.star.comp.Writer.XMLOasisMetaImporter"
836 :
"com.sun.star.comp.Writer.XMLMetaImporter"),
837 aEmptyArgs, rName,
false );
843 nWarn2 = ReadThroughComponent(
844 xStorage, xModelComp,
"settings.xml",
nullptr, xContext,
845 (bOASIS ?
"com.sun.star.comp.Writer.XMLOasisSettingsImporter"
846 :
"com.sun.star.comp.Writer.XMLSettingsImporter"),
847 aFilterArgs, rName,
false );
850 nRet = ReadThroughComponent(
851 xStorage, xModelComp,
"styles.xml",
nullptr, xContext,
852 (bOASIS ?
"com.sun.star.comp.Writer.XMLOasisStylesImporter"
853 :
"com.sun.star.comp.Writer.XMLStylesImporter"),
854 aFilterArgs, rName,
true );
857 nRet = ReadThroughComponent(
858 xStorage, xModelComp,
"content.xml",
"Content.xml", xContext,
859 (bOASIS ?
"com.sun.star.comp.Writer.XMLOasisContentImporter"
860 :
"com.sun.star.comp.Writer.XMLContentImporter"),
861 aFilterArgs, rName,
true );
866 !*o3tl::doAccess<bool>(xInfoSet->getPropertyValue(sShowChanges))))
870 uno::Reference < io::XStream > xStm = xStorage->openStreamElement(
"layout-cache", embed::ElementModes::READ );
872 if( !pStrm2->GetError() )
875 catch (
const uno::Exception&)
886 nRet = nRet ? nRet : (nWarn ? nWarn : (nWarn2 ? nWarn2 : nWarnRDF ) );
891 Any aAny = xInfoSet->getPropertyValue( sRedlineProtectionKey );
892 Sequence<sal_Int8> aKey;
898 aAny = xInfoSet->getPropertyValue( sShowChanges );
899 if ( *o3tl::doAccess<bool>(aAny) )
901 aAny = xInfoSet->getPropertyValue( sRecordChanges );
902 if ( *o3tl::doAccess<bool>(aAny) || aKey.hasElements() )
920 xGraphicHelper->dispose();
921 xGraphicHelper.clear();
922 xGraphicStorageHandler =
nullptr;
924 xObjectHelper->dispose();
925 xObjectHelper.clear();
926 xObjectResolver =
nullptr;
964 uno::Reference< beans::XPropertySet > xModelSet( xModelComp, uno::UNO_QUERY );
967 uno::Reference< beans::XPropertySetInfo > xModelSetInfo( xModelSet->getPropertySetInfo() );
968 const OUString
sName(
"BuildId" );
969 if( xModelSetInfo.is() && xModelSetInfo->hasPropertyByName(sName) )
971 xModelSet->setPropertyValue( sName, xInfoSet->getPropertyValue(sName) );
976 if (xStatusIndicator.is())
978 xStatusIndicator->end();
988 std::vector<OUString>& rStrings)
const
990 uno::Reference< uno::XComponentContext > xContext =
992 uno::Reference < embed::XStorage > xStg2;
997 xml::sax::InputSource aParserInput;
998 const OUString sDocName(
"content.xml" );
999 aParserInput.sSystemId = sDocName;
1001 uno::Reference < io::XStream > xStm = xStg2->openStreamElement( sDocName, embed::ElementModes::READ );
1002 aParserInput.aInputStream = xStm->getInputStream();
1008 xImport->parseStream( aParserInput );
1010 catch( xml::sax::SAXParseException& )
1014 catch( xml::sax::SAXException& )
1018 catch( io::IOException& )
1022 catch( packages::WrongPasswordException& )
1027 return rStrings.size();
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
bool ExistsDrawObjs(SwDoc &p_rDoc)
method to check, if given Writer document contains at least one drawing object
#define WARN_SWG_FEATURES_LOST
bool GoInContent(SwPaM &rPam, SwMoveFnCollection const &fnMove)
static void lcl_ConvertSdrOle2ObjsToSdrGrafObjs(SwDoc &_rDoc)
int GetAssignedOutlineStyleLevel() const
Represents the style of a paragraph.
virtual const tools::Rectangle & GetCurrentBoundRect() const
virtual const css::uno::Sequence< sal_Int8 > & GetRedlinePassword() const =0
SwDocShell * GetDocShell()
virtual void SetRedlineFlags_intern(RedlineFlags eMode)=0
Set a new redline mode.
sal_Int32 GetVersion() const
virtual SwReaderType GetReaderType() override
bool IsFrameFormats() const
bool IsFormatsOnly() const
#define ERRCODE_SFX_WRONGPASSWORD
#define SAL_INFO_IF(condition, area, stream)
virtual ErrCode Read(SwDoc &, const OUString &rBaseURL, SwPaM &, const OUString &) override
const SwPosition * GetMark() const
::sw::DocumentRedlineManager const & GetDocumentRedlineManager() const
const OUString & GetName() const
SwPosition & GetBound(bool bOne=true)
css::uno::Reference< css::frame::XModel > GetModel() const
static void Free(SdrObject *&_rpObject)
virtual bool SetFormatAttr(const SfxPoolItem &rAttr) override
Override to recognize changes on the and register/unregister the paragragh style at t...
static bool IsShowChanges(const RedlineFlags eM)
IDocumentDrawModelAccess const & getIDocumentDrawModelAccess() const
SwContentNode * GetContentNode(bool bPoint=true) const
virtual void set(DocumentSettingId id, bool value)=0
Set the specified document setting.
bool IsAssignedToListLevelOfOutlineStyle() const
static std::unique_ptr< SvStream > CreateStream(const OUString &rFileName, StreamMode eOpenMode, css::uno::Reference< css::awt::XWindow > xParentWin=nullptr)
OUString SvxResId(const char *pId)
Any SAL_CALL getCaughtException()
void PrtOLENotify(bool bAll)
void ReadLayoutCache(SvStream &rStream)
SwDoc: Reading and writing of the layout cache.
void PropagateOutlineRule()
#define RES_PARATR_NUMRULE
const css::uno::Any & GetValue() const
SfxObjectCreateMode GetCreateMode() const
css::uno::Reference< css::task::XInteractionHandler > GetInteractionHandler(bool bGetAlways=false)
#define WARN_FORMAT_FILE_ROWCOL
SwNode & GetEndOfContent() const
Regular ContentSection (i.e. the BodyText).
virtual void CompressRedlines()=0
virtual size_t GetSectionList(SfxMedium &rMedium, std::vector< OUString > &rStrings) const override
PaM is Point and Mark: a selection of the document model.
bool Move(SwMoveFnCollection const &fnMove=fnMoveForward, SwGoInDoc fnGo=GoInContent)
Movement of cursor.
virtual void SetLayer(SdrLayerID nLayer)
#define TOOLS_WARN_EXCEPTION(area, stream)
bool IsOLEPrtNotifyPending() const
const SwStartNode * StartOfSectionNode() const
const SwPosition * GetPoint() const
SwIndex & Assign(SwIndexReg *, sal_Int32)
static rtl::Reference< SvXMLEmbeddedObjectHelper > Create(const css::uno::Reference< css::embed::XStorage > &,::comphelper::IEmbeddedHelper &rDocPersist, SvXMLEmbeddedObjectHelperMode eCreateMode)
COMPHELPER_DLLPUBLIC css::uno::Reference< css::beans::XPropertySet > GenericPropertySet_CreateInstance(PropertySetInfo *pInfo)
const OUString & GetValue() const
const SdrPage * GetPage(sal_uInt16 nPgNum) const
virtual const SwDrawModel * GetDrawModel() const =0
Draw Model and id accessors.
void SetHideRedlines(bool const bHideRedlines)
SdrModel & getSdrModelFromSdrObject() const
sal_uInt32 GetOrdNum() const
SfxItemSet * GetItemSet() const
css::uno::Type const & get()
bool IsTextFormats() const
const std::shared_ptr< const SfxFilter > & GetFilter() const
OString exceptionToString(const css::uno::Any &caught)
virtual SdrLayerID GetLayer() const
#define ERRCODE_IO_BROKENPACKAGE
void AssignToListLevelOfOutlineStyle(const int nAssignedListLevel)
void SetDefault(const SfxPoolItem &)
Set attribute as new default attribute in current document.
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
SwgReaderOption m_aOption
virtual SdrObject * ReplaceObject(SdrObject *pNewObj, size_t nObjNum)
void ResetAllFormatsOnly()
#define ERR_FORMAT_ROWCOL
css::uno::Reference< css::embed::XStorage > GetStorage(bool bCreateTempFile=true)
#define SAL_WARN_IF(condition, area, stream)
const SwTextFormatColls * GetTextFormatColls() const
virtual void clearCaches()=0
To release the cached styles (shared_pointer!)
SwMoveFnCollection const & fnMoveForward
SwPam::Move()/Find() default argument.
virtual void SetRedlineFlags(RedlineFlags eMode)=0
Set a new redline mode.
#define SAL_INFO(area, stream)
virtual bool IsRedlineOn() const =0
Query if redlining is on.
IDocumentSettingAccess const & getIDocumentSettingAccess() const
#define ERR_FORMAT_FILE_ROWCOL
SfxObjectShell * GetPersist() const
Reference< XComponentContext > getProcessComponentContext()
virtual bool get(DocumentSettingId id) const =0
Return the specified document setting.
#define ERR_SWG_READ_ERROR
virtual RedlineFlags GetRedlineFlags() const =0
Query the currently set redline mode.
#define SAL_WARN(area, stream)
css::uno::Reference< css::embed::XStorage > m_xStorage
Reference< XModel > xModel
detail::Optional< bool >::type tryAccess< bool >(css::uno::Any const &any)
static rtl::Reference< SvXMLGraphicHelper > Create(const css::uno::Reference< css::embed::XStorage > &rXMLStorage, SvXMLGraphicHelperMode eCreateMode)
SdrObjList * getParentSdrObjListFromSdrObject() const
uno::Reference< rdf::XURI > createBaseURI(uno::Reference< uno::XComponentContext > const &i_xContext, uno::Reference< frame::XModel > const &i_xModel, OUString const &i_rPkgURI, OUString const &i_rSubDocument)
virtual void SetRedlinePassword(const css::uno::Sequence< sal_Int8 > &rNewPassword)=0
const SwIndexReg * GetIdxReg() const
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
IStyleAccess & GetIStyleAccess()
bool IsOrganizerMode() const
static void lcl_AdjustOutlineStylesForOOo(SwDoc &_rDoc)
const Graphic * GetGraphic() const
SwNumRule * GetOutlineNumRule() const
static void lcl_EnsureValidPam(SwPaM &rPam)
static const OUString & GetProgName(const OUString &rName, SwGetPoolIdFromName)
SfxMedium * GetMedium() const
css::uno::Any SAL_CALL makeAny(const SharedUNOComponent< INTERFACE, COMPONENT > &value)