[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - sw/source
Miklos Vajna
vmiklos at collabora.co.uk
Wed Dec 4 03:51:29 PST 2013
sw/source/filter/ww8/rtfexport.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 8807ba77453962dddeceba28ca3d5ad8633d7090
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Wed Dec 4 10:51:48 2013 +0100
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
(cherry picked from commit 1da04bd7a8a804cbfb1d01a3102b1b76cc557122)
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index 05647b9..93a1cf3 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()
More information about the Libreoffice-commits
mailing list