From c5138cad87575283cdf0670355f2b2cddae93fc8 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Thu, 5 Dec 2013 12:15:15 +0100 Subject: fdo#68724: sw: fix crash on Insert->File with Hybrid PDF This is an unfortunate combination of 2 special cases: - the Hybrid PDF has its own XFilter implementation to extract the embedded ODF document - Writer needs to create a SwReader with SwPaM for Insert Since the PDF XFilter uses a special service in sfx2 to implement the import, handling this requires a new method in SfxObjectShell that calls back into Writer to create the properly setup SwReader. Change-Id: Ie85f3bfa322bfe883c479e1cb198a8bf0cbbac23 --- include/sfx2/objsh.hxx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'include/sfx2/objsh.hxx') diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx index fac2625698cd..de041fbf3bc7 100644 --- a/include/sfx2/objsh.hxx +++ b/include/sfx2/objsh.hxx @@ -116,6 +116,9 @@ namespace com { namespace sun { namespace star { namespace lang { class XComponent; } + namespace text { + class XTextRange; + } } } } typedef sal_uInt32 SfxObjectShellFlags; @@ -348,7 +351,12 @@ public: sal_Bool bForceNonModified = sal_False ); sal_Bool SaveCompletedChildren( sal_Bool bSuccess ); - virtual sal_Bool ImportFrom( SfxMedium &rMedium, bool bInsert ); + /** a very special case to insert at a position in Writer from UNO, + via OwnSubFilterService */ + virtual bool InsertGeneratedStream(SfxMedium& rMedium, + css::uno::Reference const& xInsertPosition); + virtual bool ImportFrom( SfxMedium &rMedium, + css::uno::Reference const& xInsertPosition); sal_Bool ExportTo( SfxMedium &rMedium ); // xmlsec05, check with SFX team -- cgit