sc/qa/unit/subsequent_export-test.cxx | 10 +++++----- sfx2/source/doc/docfile.cxx | 19 ++++++------------- solenv/gdb/libreoffice/cppu.py | 4 +++- 3 files changed, 14 insertions(+), 19 deletions(-)
New commits: commit 027bb41aa16793e88e9fc1b3550c8c8933636472 Author: Michael Stahl <mst...@redhat.com> Date: Thu Jan 31 23:44:36 2013 +0100 gdb: UnoReferencePrinter: prevent ambiguity problems gdb 7.5.1 complains about ambiguous base class "XInterface" with cast() so try dynamic_cast() instead. Change-Id: I99a21eea7251e663deee395f6a13ca0ed041e8c9 diff --git a/solenv/gdb/libreoffice/cppu.py b/solenv/gdb/libreoffice/cppu.py index 8db684a..31f1da6 100644 --- a/solenv/gdb/libreoffice/cppu.py +++ b/solenv/gdb/libreoffice/cppu.py @@ -63,7 +63,9 @@ class UnoReferencePrinter(object): def to_string(self): iface = self.value['_pInterface'] if iface: - impl = iface.cast(self._itype()).dereference() + # dynamic_cast hopefully avoids this problem: + # base class 'com::sun::star::uno::XInterface' is ambiguous + impl = iface.dynamic_cast(self._itype()).dereference() return '%s to %s' % (self.typename, str(impl)) else: return "empty %s" % self.typename commit b5592cb22dfa473ce5683f95118287f2bde63c13 Author: Michael Stahl <mst...@redhat.com> Date: Thu Jan 31 23:33:15 2013 +0100 ScExportTest: enable testPasswordExport on WNT With the previous commit it appears to work now. Change-Id: Ifa2c69c6e8617461ec2098ecc959e99a4812565e diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx index f43560e..3fd6427 100644 --- a/sc/qa/unit/subsequent_export-test.cxx +++ b/sc/qa/unit/subsequent_export-test.cxx @@ -81,7 +81,7 @@ public: CPPUNIT_TEST_SUITE(ScExportTest); CPPUNIT_TEST(test); -#if !defined(MACOSX) && !defined(DRAGONFLY) && !defined(WNT) +#if !defined(MACOSX) && !defined(DRAGONFLY) CPPUNIT_TEST(testPasswordExport); #endif CPPUNIT_TEST(testConditionalFormatExportXLSX); commit 0799130b0ba954715d00feb93cef83dd48e29889 Author: Michael Stahl <mst...@redhat.com> Date: Thu Jan 31 23:19:54 2013 +0100 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 diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx index 220877d..f43560e 100644 --- a/sc/qa/unit/subsequent_export-test.cxx +++ b/sc/qa/unit/subsequent_export-test.cxx @@ -127,7 +127,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, @@ -150,7 +150,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"); @@ -165,7 +165,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, @@ -179,7 +179,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); diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 85b7981..3ce8ab7 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -636,20 +636,13 @@ SvStream* SfxMedium::GetOutStream() if ( pImp->pTempFile ) { - // try to re-use XOutStream from xStream if that exists; - // opening new SvFileStream in this situation may fail on - // Windows with ERROR_SHARING_VIOLATION - if (pImp->xStream.is()) - { - assert(pImp->xStream->getOutputStream().is()); // need that... - pImp->m_pOutStream = utl::UcbStreamHelper::CreateStream( - pImp->xStream, false); - } - else - { - pImp->m_pOutStream = new SvFileStream( + // don't try to re-use XOutStream from xStream if that exists; + // it causes fdo#59022 (fails opening files via SMB on Linux) + // OTOH opening new SvFileStream in this situation may fail on + // Windows with ERROR_SHARING_VIOLATION... but that is apparently + // not a problem in practice currently + pImp->m_pOutStream = new SvFileStream( pImp->m_aName, STREAM_STD_READWRITE); - } CloseStorage(); } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits