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:00:27 +0100 |
commit | c5138cad87575283cdf0670355f2b2cddae93fc8 (patch) | |
tree | 2cd071d5cf900636b87bd6ee47f1351fa4f18e8d /sd | |
parent | de45a49273542c9046e0cfc2b75c863573eb6c38 (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
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/docshell/docshel4.cxx | 5 | ||||
-rw-r--r-- | sd/source/ui/inc/DrawDocShell.hxx | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx index 04fcf2a1f321..eeae1004450b 100644 --- a/sd/source/ui/docshell/docshel4.cxx +++ b/sd/source/ui/docshell/docshel4.cxx @@ -375,9 +375,10 @@ sal_Bool DrawDocShell::LoadFrom( SfxMedium& rMedium ) /** * load from 3rd party format */ -sal_Bool DrawDocShell::ImportFrom( SfxMedium &rMedium, bool bInsert ) +bool DrawDocShell::ImportFrom(SfxMedium &rMedium, + uno::Reference<text::XTextRange> const& xInsertPosition) { - const sal_Bool bRet=SfxObjectShell::ImportFrom(rMedium, bInsert); + const sal_Bool bRet = SfxObjectShell::ImportFrom(rMedium, xInsertPosition); SfxItemSet* pSet = rMedium.GetItemSet(); if( pSet ) diff --git a/sd/source/ui/inc/DrawDocShell.hxx b/sd/source/ui/inc/DrawDocShell.hxx index 5278fc6ec1ee..d4e46fc0aced 100644 --- a/sd/source/ui/inc/DrawDocShell.hxx +++ b/sd/source/ui/inc/DrawDocShell.hxx @@ -76,7 +76,9 @@ public: virtual void Activate( sal_Bool bMDI ); virtual void Deactivate( sal_Bool bMDI ); virtual sal_Bool InitNew( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage ); - virtual sal_Bool ImportFrom( SfxMedium &rMedium, bool bInsert=false ); + virtual bool ImportFrom(SfxMedium &rMedium, + css::uno::Reference<css::text::XTextRange> const& xInsertPosition) + SAL_OVERRIDE; virtual sal_Bool ConvertFrom( SfxMedium &rMedium ); virtual sal_Bool Save(); virtual sal_Bool SaveAsOwnFormat( SfxMedium& rMedium ); |