[Libreoffice-commits] core.git: 2 commits - include/uno vcl/source

Michael Stahl mstahl at redhat.com
Mon Jan 16 22:19:40 UTC 2017


 include/uno/mapping.hxx     |    2 ++
 vcl/source/control/edit.cxx |    5 ++++-
 2 files changed, 6 insertions(+), 1 deletion(-)

New commits:
commit ac2105e77795970e9131092caae78fd42c86f6d9
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Jan 16 20:41:47 2017 +0100

    cppuhelper: mark these with SAL_DEPRECATED
    
    Change-Id: Ide792910c39b3b33e2712268416e7950087877f3

diff --git a/include/uno/mapping.hxx b/include/uno/mapping.hxx
index 7ec6a11..352f375 100644
--- a/include/uno/mapping.hxx
+++ b/include/uno/mapping.hxx
@@ -314,6 +314,7 @@ inline void * Mapping::mapInterface(
     @deprecated
 */
 template< class C >
+SAL_DEPRECATED("use uno_Mapping")
 inline bool mapToCpp( Reference< C > * ppRet, uno_Interface * pUnoI )
 {
     Mapping aMapping(
@@ -337,6 +338,7 @@ inline bool mapToCpp( Reference< C > * ppRet, uno_Interface * pUnoI )
     @deprecated
 */
 template< class C >
+SAL_DEPRECATED("use uno_Mapping")
 inline bool mapToUno( uno_Interface ** ppRet, const Reference< C > & x )
 {
     Mapping aMapping(
commit 94cf7e6de57cb413db39f719b4a5108708897a5c
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Jan 16 21:07:44 2017 +0100

    vcl: Edit::ImplGetCharPos() no calling iterateCodePoints on empty string
    
    (regression from 018beb38848fbd93889f29969f7ca5c68d0ac546)
    
    Change-Id: I4783d3de09eddbd00f5f91574fae1afde38f2bc6

diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index a2f700c..ade6d7b 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -1240,7 +1240,10 @@ sal_Int32 Edit::ImplGetCharPos( const Point& rWindowPos ) const
         sal_Int32 nFinalIndex = 0;
         long nDiff = std::abs( pDX[0]-nX );
         sal_Int32 i = 0;
-        aText.iterateCodePoints(&i);    //skip the first character
+        if (!aText.isEmpty())
+        {
+            aText.iterateCodePoints(&i);    //skip the first character
+        }
         while (i < aText.getLength())
         {
             long nNewDiff = std::abs( pDX[2*i]-nX );


More information about the Libreoffice-commits mailing list