[Libreoffice-commits] core.git: 3 commits - include/cppuhelper

Stephan Bergmann sbergman at redhat.com
Wed May 4 15:39:31 UTC 2016


 include/cppuhelper/proptypehlp.h   |    5 ++---
 include/cppuhelper/proptypehlp.hxx |    6 ++++++
 2 files changed, 8 insertions(+), 3 deletions(-)

New commits:
commit eda7d3cc451d3baa12c38057721d5c50862a51dd
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed May 4 17:32:02 2016 +0200

    Add covertPropertyValue bool overload
    
    ...as the behavior of the generic covertPropertyValue template instantiated for
    bool would be quite different from the behavior of the convertPropertyValue
    sal_Bool overload, leading to potential surprises.  (Though it seems there were
    no uses yet of covertPropertyValue with bool, only with sal_Bool.)
    
    Change-Id: I107a0608fc4271e95464a7f9bdc340a9e6dc1336

diff --git a/include/cppuhelper/proptypehlp.h b/include/cppuhelper/proptypehlp.h
index b76279f..d163831 100644
--- a/include/cppuhelper/proptypehlp.h
+++ b/include/cppuhelper/proptypehlp.h
@@ -38,6 +38,7 @@ inline void SAL_CALL convertPropertyValue( target &value , const  css::uno::Any
   conversion of basic types
 */
 inline void SAL_CALL convertPropertyValue( sal_Bool & target  , const css::uno::Any & source );
+inline void SAL_CALL convertPropertyValue( bool & target      , const css::uno::Any & source );
 inline void SAL_CALL convertPropertyValue( sal_Int64 & target , const css::uno::Any & source );
 inline void SAL_CALL convertPropertyValue( sal_uInt64 & target, const css::uno::Any & source );
 inline void SAL_CALL convertPropertyValue( sal_Int32 & target , const css::uno::Any & source );
diff --git a/include/cppuhelper/proptypehlp.hxx b/include/cppuhelper/proptypehlp.hxx
index 4079e88..5169c5b4 100644
--- a/include/cppuhelper/proptypehlp.hxx
+++ b/include/cppuhelper/proptypehlp.hxx
@@ -87,6 +87,12 @@ inline void SAL_CALL convertPropertyValue( sal_Bool & b   , const css::uno::Any
     }
 }
 
+void convertPropertyValue(bool & target, css::uno::Any const & source) {
+    sal_Bool b;
+    convertPropertyValue(b, source);
+    target = b;
+}
+
 inline void SAL_CALL convertPropertyValue( sal_Int64 & i  , const css::uno::Any & a )
 {
     const enum css::uno::TypeClass tc = a.getValueType().getTypeClass();
commit 92a2bb96491b7f12c97474192f47d44683b6245c
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed May 4 16:10:20 2016 +0200

    Declaration of sal_Bool overload of convertPropertyValue had been missing
    
    ...ever since b525a3115f54576017a576ff842dede5e2e3545d "initial import"
    
    Change-Id: I0824b673d222b6376ca199ad37f916ccaf80aa58

diff --git a/include/cppuhelper/proptypehlp.h b/include/cppuhelper/proptypehlp.h
index 2251fbc..b76279f 100644
--- a/include/cppuhelper/proptypehlp.h
+++ b/include/cppuhelper/proptypehlp.h
@@ -37,6 +37,7 @@ inline void SAL_CALL convertPropertyValue( target &value , const  css::uno::Any
 /**
   conversion of basic types
 */
+inline void SAL_CALL convertPropertyValue( sal_Bool & target  , const css::uno::Any & source );
 inline void SAL_CALL convertPropertyValue( sal_Int64 & target , const css::uno::Any & source );
 inline void SAL_CALL convertPropertyValue( sal_uInt64 & target, const css::uno::Any & source );
 inline void SAL_CALL convertPropertyValue( sal_Int32 & target , const css::uno::Any & source );
commit 1376eddaf7d14c6e91919c3bc3aa4b7a98f713b5
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed May 4 16:02:46 2016 +0200

    Remove leftover declaration of convertPropertyValue overload
    
    ...that had originally been introduced with a comment
    
      // This template is needed at least for msci4 compiler
    
    in b525a3115f54576017a576ff842dede5e2e3545d "initial import", and whose
    corresponding definition had been removed in
    6231a9b4e926d5dc213f94ddf35b14bab411d77d "visual studio version 4 is long gone"
    
    Change-Id: I0cf4913a2c2c4701d41cf24d2f89c1de0bd86323

diff --git a/include/cppuhelper/proptypehlp.h b/include/cppuhelper/proptypehlp.h
index cda2401..2251fbc 100644
--- a/include/cppuhelper/proptypehlp.h
+++ b/include/cppuhelper/proptypehlp.h
@@ -34,9 +34,6 @@ namespace cppu {
 template < class target >
 inline void SAL_CALL convertPropertyValue( target &value , const  css::uno::Any & a);
 
-template < class target >
-inline void SAL_CALL convertPropertyValue( target &value ,  css::uno::Any & a);
-
 /**
   conversion of basic types
 */


More information about the Libreoffice-commits mailing list