diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-12-05 12:15:15 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-12-05 13:39:47 +0100 |
commit | c190ee1e5523c8de9b1a536fcfa842824b66e3de (patch) | |
tree | 89eb31f178f67b31601f96a9712184724aa5a24c /include | |
parent | daa2340716bcc8a2bea32e4f3e91f34da8fa7224 (diff) |
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
(cherry picked from commit c5138cad87575283cdf0670355f2b2cddae93fc8)
Diffstat (limited to 'include')
-rw-r--r-- | include/sfx2/objsh.hxx | 10 |
1 files changed, 9 insertions, 1 deletions
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<css::text::XTextRange> const& xInsertPosition); + virtual bool ImportFrom( SfxMedium &rMedium, + css::uno::Reference<css::text::XTextRange> const& xInsertPosition); sal_Bool ExportTo( SfxMedium &rMedium ); // xmlsec05, check with SFX team |