[Libreoffice-commits] core.git: vcl/unx
Julien Nabet
serval2412 at yahoo.fr
Tue Mar 21 11:46:53 UTC 2017
vcl/unx/generic/app/i18n_status.cxx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 7dc9761753a1f04f0791d43ceaff8a44d269cea7
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sat Mar 18 18:52:41 2017 +0100
cppcheck: alloca (vcl/i18n_status)
Change-Id: Ib36fc229ab4d4a349f11abe0fc7b6d02163d7f14
Reviewed-on: https://gerrit.libreoffice.org/35409
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/vcl/unx/generic/app/i18n_status.cxx b/vcl/unx/generic/app/i18n_status.cxx
index 1b1ae8e61941..40c89dd83519 100644
--- a/vcl/unx/generic/app/i18n_status.cxx
+++ b/vcl/unx/generic/app/i18n_status.cxx
@@ -20,7 +20,6 @@
#if OSL_DEBUG_LEVEL > 1
#include <stdio.h>
#endif
-#include <sal/alloca.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
@@ -561,7 +560,8 @@ void I18NStatus::setStatusText( const OUString& rText )
* #93614# convert fullwidth ASCII forms to ascii
*/
int nChars = rText.getLength();
- sal_Unicode* pBuffer = static_cast<sal_Unicode*>(alloca( nChars*sizeof( sal_Unicode ) ));
+ rtl_uString *pStr = rtl_uString_alloc(nChars);
+ sal_Unicode *pBuffer = pStr->buffer;
for( int i = 0; i < nChars; i++ )
{
if( rText[i] >=0xff00 && rText[i] <= 0xff5f )
@@ -569,7 +569,7 @@ void I18NStatus::setStatusText( const OUString& rText )
else
pBuffer[i] = rText[i];
}
- OUString aText( pBuffer, nChars );
+ OUString aText(pStr, SAL_NO_ACQUIRE);
m_pStatusWindow->setText( aText );
m_pStatusWindow->setPosition( m_pParent );
More information about the Libreoffice-commits
mailing list