diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2018-08-05 20:15:42 +0200 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2018-08-10 22:03:37 +0200 |
commit | f96e78a7f82e68183afbec01c87d135eb5edce8c (patch) | |
tree | 7ab583782882d1be81cfb5a2edec25bc40eb0f6c | |
parent | 1f85149ffc723beb939a8d939af339a26d504083 (diff) |
OUString: avoid getTokenCount
Change-Id: Icceff0aeb5c6fb70513786366416c2d86b60602a
-rw-r--r-- | sd/source/ui/annotations/annotationmanager.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx index 668f555b6cb5..02cb2ac1292c 100644 --- a/sd/source/ui/annotations/annotationmanager.cxx +++ b/sd/source/ui/annotations/annotationmanager.cxx @@ -27,7 +27,6 @@ #include <com/sun/star/text/XText.hpp> #include <com/sun/star/document/XEventBroadcaster.hpp> #include <comphelper/lok.hxx> -#include <comphelper/string.hxx> #include <svx/svxids.hrc> #include <vcl/commandinfoprovider.hxx> @@ -571,9 +570,8 @@ void AnnotationManagerImpl::ExecuteReplyToAnnotation( SfxRequest const & rReq ) sQuote = "..."; aStr += sQuote + "\"\n"; - sal_Int32 nParaCount = comphelper::string::getTokenCount(aStr, '\n'); - for( sal_Int32 nPara = 0; nPara < nParaCount; nPara++ ) - pOutliner->Insert( aStr.getToken( nPara, '\n' ), EE_PARA_APPEND, -1 ); + for( sal_Int32 nIdx = 0; nIdx >= 0; ) + pOutliner->Insert( aStr.getToken( 0, '\n', nIdx ), EE_PARA_APPEND, -1 ); if( pOutliner->GetParagraphCount() > 1 ) { |