diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-03-28 11:35:16 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-03-28 16:16:46 +0200 |
commit | 98246996f79452e294ddbc2041a9c1d8007d2099 (patch) | |
tree | 9f29604ba94cdf28bfc7e2a13a3f258765aa8484 | |
parent | e4082f29b95ecbef5758e8419a9b00a074e0bfb0 (diff) |
Pasted-in document need only be opened for reading
Otherwise, if SRCDIR is a read-only tree, CppunitTest_sw_rtfimport would fail
with the
CPPUNIT_ASSERT_EQUAL(ERRCODE_NONE, pStream->GetError());
from <https://gerrit.libreoffice.org/#/c/51992/> "Check successful stream
creation". (And before that, it would have more obscurely failed with the
CPPUNIT_ASSERT_EQUAL(2, getParagraphs());
in testTdf90260Par failing with 1 vs. 2.)
Change-Id: I55fcc932c66e6a4b84cd391f8821257a0de2abb8
Reviewed-on: https://gerrit.libreoffice.org/51993
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r-- | sw/qa/extras/rtfimport/rtfimport.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx index e2b32a450ed7..a99ba78d5aa9 100644 --- a/sw/qa/extras/rtfimport/rtfimport.cxx +++ b/sw/qa/extras/rtfimport/rtfimport.cxx @@ -70,7 +70,7 @@ protected: aDescriptor[0].Name = "InputStream"; SvStream* pStream = utl::UcbStreamHelper::CreateStream( m_directories.getURLFromSrc("/sw/qa/extras/rtfimport/data/") + aFilename, - StreamMode::WRITE); + StreamMode::STD_READ); CPPUNIT_ASSERT_EQUAL(ERRCODE_NONE, pStream->GetError()); uno::Reference<io::XStream> xStream(new utl::OStreamWrapper(*pStream)); aDescriptor[0].Value <<= xStream; |