[Libreoffice-commits] core.git: sc/source
Markus Mohrhard
markus.mohrhard at googlemail.com
Sun Sep 27 12:12:57 PDT 2015
sc/source/core/data/postit.cxx | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
New commits:
commit b3cc2c6d234156e7d5be2c3f2cacd20ab44ce94f
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Sun Sep 27 21:05:13 2015 +0200
don't try to create OUString from editeng directly, tdf#94542
editeng uses special control characters (apparently 0x01) that need to
be translated by editeng to the real characters. Let EditEngine handle
the conversion from editeng string to OUString.
Change-Id: If5014e1ada7f1df933a084b17bb307035ce01cc6
diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx
index 9eeabbf..733df67 100644
--- a/sc/source/core/data/postit.cxx
+++ b/sc/source/core/data/postit.cxx
@@ -45,6 +45,7 @@
#include "drwlayer.hxx"
#include "userdat.hxx"
#include "detfunc.hxx"
+#include "editutil.hxx"
#include <utility>
@@ -545,11 +546,14 @@ OUString ScPostIt::GetText() const
if( const EditTextObject* pEditObj = GetEditTextObject() )
{
OUStringBuffer aBuffer;
- for( sal_Int32 nPara = 0, nParaCount = pEditObj->GetParagraphCount(); nPara < nParaCount; ++nPara )
+ ScNoteEditEngine& rEngine = mrDoc.GetNoteEngine();
+ rEngine.SetText(*pEditObj);
+ sal_Int32 nParaCount = rEngine.GetParagraphCount();
+ for( sal_Int32 nPara = 0; nPara < nParaCount; ++nPara )
{
if( nPara > 0 )
aBuffer.append( '\n' );
- aBuffer.append( pEditObj->GetText( nPara ) );
+ aBuffer.append(rEngine.GetText(nPara));
}
return aBuffer.makeStringAndClear();
}
More information about the Libreoffice-commits
mailing list