diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-12-04 10:51:48 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-12-04 10:56:33 +0100 |
commit | 1da04bd7a8a804cbfb1d01a3102b1b76cc557122 (patch) | |
tree | a92b2d2d72224eb6a601f81fb0d1a49246759d79 | |
parent | 564ee696c9dfe1ee39515fe69e50ecdce2a03b4e (diff) |
SwRTFWriter: fix string conversion
Regression from 02bfed8a53556badfea637930b05d923cf9465f2 (convert
sw/source/filter/ww8/*.cxx from String to OUString, 2013-10-14), check
for string length before invoking OUString::operator[].
This can be reproduced if copy&pasting some text inside a Writer doc
from normal text to rectangle shapes inside group shapes.
Change-Id: Ia8f774b27ca63773792e6af913dfe7e493bea4b8
-rw-r--r-- | sw/source/filter/ww8/rtfexport.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx index a711ec8b0efe..b70b9bee4c8b 100644 --- a/sw/source/filter/ww8/rtfexport.cxx +++ b/sw/source/filter/ww8/rtfexport.cxx @@ -1178,7 +1178,7 @@ SwRTFWriter::SwRTFWriter( const OUString& rFltName, const OUString & rBaseURL ) SAL_INFO("sw.rtf", OSL_THIS_FUNC); SetBaseURL( rBaseURL ); // export outline nodes, only (send outline to clipboard/presentation) - m_bOutOutlineOnly = 'O' == rFltName[0]; + m_bOutOutlineOnly = (!rFltName.isEmpty() && 'O' == rFltName[0]); } SwRTFWriter::~SwRTFWriter() |