summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-01-31 23:19:54 +0100
committerMiklos Vajna <vmiklos@suse.cz>2013-02-02 16:49:43 +0000
commit6523f78456c9f78fb842b7215eb84a96f4e92472 (patch)
tree6558ac082aeab3d555d6b4c8d9f7829308d4cf42 /sc
parenta560ee1625393faf5cd5e04c356a9101b701542b (diff)
fdo#59022: revert "SfxMedium::GetOutputStream(): re-use existing XStream"
Revert commit 0c2206081de38a41597aadfb2255540d6308be63, since this apparently causes failure to open ODF files via SMB on Linux. Instead of changing SfxMedium, adjust the ScExportTest: when saving XLSX files interactively, the SfxFilter::lFormat is always 0, which causes SfxObjectShell::SaveTo_Impl not to call SfxMedium::GetOutputStorage() at all, working around the locking issue on WNT. Change-Id: I0ab8b4262475e4c8425eebb1413997457e5e9417 (cherry picked from commit 0799130b0ba954715d00feb93cef83dd48e29889) Reviewed-on: https://gerrit.libreoffice.org/1952 Reviewed-by: Miklos Vajna <vmiklos@suse.cz> Tested-by: Miklos Vajna <vmiklos@suse.cz>
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/unit/subsequent_export-test.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index 7b0fde81c8dc..26fe25c8bd18 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -125,7 +125,7 @@ ScDocShellRef ScExportTest::saveAndReloadPassword(ScDocShell* pShell, const rtl:
aTempFile.EnableKillingFile();
SfxMedium aStoreMedium( aTempFile.GetURL(), STREAM_STD_WRITE );
sal_uInt32 nExportFormat = 0;
- if (nFormatType)
+ if (nFormatType == ODS_FORMAT_TYPE)
nExportFormat = SFX_FILTER_EXPORT | SFX_FILTER_USESOPTIONS;
SfxFilter* pExportFilter = new SfxFilter(
rFilter,
@@ -148,7 +148,7 @@ ScDocShellRef ScExportTest::saveAndReloadPassword(ScDocShell* pShell, const rtl:
//std::cout << "File: " << aTempFile.GetURL() << std::endl;
sal_uInt32 nFormat = 0;
- if (nFormatType)
+ if (nFormatType == ODS_FORMAT_TYPE)
nFormat = SFX_FILTER_IMPORT | SFX_FILTER_USESOPTIONS;
OUString aPass("test");
@@ -163,7 +163,7 @@ ScDocShellRef ScExportTest::saveAndReload(ScDocShell* pShell, const rtl::OUStrin
aTempFile.EnableKillingFile();
SfxMedium aStoreMedium( aTempFile.GetURL(), STREAM_STD_WRITE );
sal_uInt32 nExportFormat = 0;
- if (nFormatType)
+ if (nFormatType == ODS_FORMAT_TYPE)
nExportFormat = SFX_FILTER_EXPORT | SFX_FILTER_USESOPTIONS;
SfxFilter* pExportFilter = new SfxFilter(
rFilter,
@@ -177,7 +177,7 @@ ScDocShellRef ScExportTest::saveAndReload(ScDocShell* pShell, const rtl::OUStrin
//std::cout << "File: " << aTempFile.GetURL() << std::endl;
sal_uInt32 nFormat = 0;
- if (nFormatType)
+ if (nFormatType == ODS_FORMAT_TYPE)
nFormat = SFX_FILTER_IMPORT | SFX_FILTER_USESOPTIONS;
return load(aTempFile.GetURL(), rFilter, rUserData, rTypeName, nFormat, nFormatType);