summaryrefslogtreecommitdiff
path: root/sc/source/filter/xml/xmlwrap.cxx
diff options
context:
space:
mode:
authorNiklas Nebel <nn@openoffice.org>2009-11-19 15:35:41 +0000
committerNiklas Nebel <nn@openoffice.org>2009-11-19 15:35:41 +0000
commite799c0f7ff29e81f19e26359d738c5c643452bc6 (patch)
tree618b2da113c2e8a765dea5b2bfc81430204b352a /sc/source/filter/xml/xmlwrap.cxx
parent4d256d26b3d99149c3dafe8b1acbc161c69c171d (diff)
#i106854# get source stream directly from document's storage instead of a temporary SfxMedium
Diffstat (limited to 'sc/source/filter/xml/xmlwrap.cxx')
-rw-r--r--sc/source/filter/xml/xmlwrap.cxx8
1 files changed, 2 insertions, 6 deletions
diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx
index 7bc5396fcb5b..3d27cde55d98 100644
--- a/sc/source/filter/xml/xmlwrap.cxx
+++ b/sc/source/filter/xml/xmlwrap.cxx
@@ -737,12 +737,8 @@ sal_Bool ScXMLImportWrapper::ExportToComponent(uno::Reference<lang::XMultiServic
{
// old stream is still in this file's storage - open read-only
- SfxMedium* pSrcMed = rDoc.GetDocumentShell()->GetMedium();
- String aSrcURL = pSrcMed->GetOrigURL();
-
- // SfxMedium must not be read-only, or it will create a temp file in GetStorage
- SfxMedium aTmpMedium( aSrcURL, STREAM_READWRITE, FALSE, NULL, NULL );
- uno::Reference<embed::XStorage> xTmpStorage = aTmpMedium.GetStorage();
+ // #i106854# use the document's storage directly, without a temporary SfxMedium
+ uno::Reference<embed::XStorage> xTmpStorage = rDoc.GetDocumentShell()->GetStorage();
uno::Reference<io::XStream> xSrcStream;
uno::Reference<io::XInputStream> xSrcInput;
try