[Libreoffice-commits] core.git: 2 commits - vcl/qt5 vcl/win
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Wed Feb 24 09:08:47 UTC 2021
vcl/qt5/Qt5Frame.cxx | 1 -
vcl/win/window/salframe.cxx | 11 ++++-------
2 files changed, 4 insertions(+), 8 deletions(-)
New commits:
commit c5fd81769e7c683a8e4c73caaf85954f0df48de4
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Feb 23 20:04:22 2021 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Feb 24 10:08:15 2021 +0100
don't need to include vcl/layout.hxx in qt5
Change-Id: I8e08c4e5c5b92df4cbdb8ea32f40dbde25f7afd3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111433
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx
index 6ea28517dbd8..f8f8d20dae6f 100644
--- a/vcl/qt5/Qt5Frame.cxx
+++ b/vcl/qt5/Qt5Frame.cxx
@@ -59,7 +59,6 @@
#include <saldatabasic.hxx>
#include <window.h>
-#include <vcl/layout.hxx>
#include <vcl/syswin.hxx>
#include <com/sun/star/datatransfer/dnd/DNDConstants.hpp>
commit b258aec6cff0036397ee4115e08f677ba77797a0
Author: Noel Grandin <noel at peralex.com>
AuthorDate: Wed Feb 24 09:53:53 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Feb 24 10:07:55 2021 +0100
use unique_ptr in ImplHandleIMECompositionInput
Change-Id: I9587d97fbdd73844590fd6380e594ec7b4f4df14
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111441
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index 3454ebf885c8..0d211d3bf3f2 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -5045,7 +5045,7 @@ static bool ImplHandleIMECompositionInput( WinSalFrame* pFrame,
{
bDef = false;
- ExtTextInputAttr* pSalAttrAry = nullptr;
+ std::unique_ptr<ExtTextInputAttr[]> pSalAttrAry;
LONG nTextLen = ImmGetCompositionStringW( hIMC, GCS_COMPSTR, nullptr, 0 ) / sizeof( WCHAR );
if ( nTextLen > 0 )
{
@@ -5066,8 +5066,8 @@ static bool ImplHandleIMECompositionInput( WinSalFrame* pFrame,
if ( pAttrBuf )
{
sal_Int32 nTextLen2 = aEvt.maText.getLength();
- pSalAttrAry = new ExtTextInputAttr[nTextLen2];
- memset( pSalAttrAry, 0, nTextLen2*sizeof( sal_uInt16 ) );
+ pSalAttrAry.reset(new ExtTextInputAttr[nTextLen2]);
+ memset( pSalAttrAry.get(), 0, nTextLen2*sizeof( sal_uInt16 ) );
for( sal_Int32 i = 0; (i < nTextLen2) && (i < nAttrLen); i++ )
{
BYTE nWinAttr = pAttrBuf.get()[i];
@@ -5088,7 +5088,7 @@ static bool ImplHandleIMECompositionInput( WinSalFrame* pFrame,
pSalAttrAry[i] = nSalAttr;
}
- aEvt.mpTextAttr = pSalAttrAry;
+ aEvt.mpTextAttr = pSalAttrAry.get();
}
}
@@ -5123,9 +5123,6 @@ static bool ImplHandleIMECompositionInput( WinSalFrame* pFrame,
}
ImplUpdateIMECursorPos( pFrame, hIMC );
}
-
- if ( pSalAttrAry )
- delete [] pSalAttrAry;
}
return !bDef;
More information about the Libreoffice-commits
mailing list