summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-12-05 12:15:15 +0100
committerMichael Stahl <mstahl@redhat.com>2013-12-05 13:39:47 +0100
commitc190ee1e5523c8de9b1a536fcfa842824b66e3de (patch)
tree89eb31f178f67b31601f96a9712184724aa5a24c /sd
parentdaa2340716bcc8a2bea32e4f3e91f34da8fa7224 (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 'sd')
-rw-r--r--sd/source/ui/docshell/docshel4.cxx5
-rw-r--r--sd/source/ui/inc/DrawDocShell.hxx4
2 files changed, 6 insertions, 3 deletions
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx
index 514d8fce88f5..90128697ad0f 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -374,9 +374,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 e4c7ee62fac4..3045701db610 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 );