[Libreoffice-commits] core.git: 2 commits - external/boost sw/source

Michael Stahl mstahl at redhat.com
Tue Apr 22 03:45:27 PDT 2014


 external/boost/UnpackedTarball_boost.mk                                                         |    2 
 external/boost/boost.property_tree.Wtautological-constant-out-of-range-compare.warnings.patch.0 |   11 --
 external/boost/boost.property_tree.Wtype-limits.warnings.patch.1                                |   41 ++++++++++
 sw/source/core/unocore/unostyle.cxx                                                             |   12 +-
 4 files changed, 48 insertions(+), 18 deletions(-)

New commits:
commit d286ffc3adb5386651e177cbc23512436d89d35f
Author: Michael Stahl <mstahl at redhat.com>
Date:   Tue Apr 22 12:22:11 2014 +0200

    fix the getProperty case more thoroughly (related: fdo#77340)
    
    Change-Id: I0cb042474c58b38a3e9a9073a262041b0ef185c7

diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index d5ac430..e368108 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -1931,7 +1931,7 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
         {
             if (MID_PAGEDESC_PAGEDESCNAME != nMemberId)
                 break;
-            // Sonderbehandlung RES_PAGEDESC
+            // special handling for RES_PAGEDESC
             if(aValue.getValueType() != ::getCppuType((const OUString*)0))
                 throw lang::IllegalArgumentException();
             SfxItemSet& rStyleSet = rBase.GetItemSet();
@@ -2387,10 +2387,11 @@ static uno::Any lcl_GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
             }
             case RES_PAGEDESC :
             {
-                // Sonderbehandlung RES_PAGEDESC
+                if (MID_PAGEDESC_PAGEDESCNAME != nMemberId)
+                    break;
+                // special handling for RES_PAGEDESC
                 const SfxPoolItem* pItem;
-                if (MID_PAGEDESC_PAGEDESCNAME == nMemberId &&
-                    SFX_ITEM_SET == rBase.GetItemSet().GetItemState(RES_PAGEDESC, true, &pItem))
+                if (SFX_ITEM_SET == rBase.GetItemSet().GetItemState(RES_PAGEDESC, true, &pItem))
                 {
                     const SwPageDesc* pDesc = ((const SwFmtPageDesc*)pItem)->GetPageDesc();
                     if(pDesc)
@@ -2400,9 +2401,8 @@ static uno::Any lcl_GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
                         aRet <<= aString;
                     }
 
-                    bDone = true;
                 }
-
+                bDone = true;
                 break;
             }
             case FN_UNO_IS_AUTO_UPDATE:
commit 0fbc3a87f78663d9ace98221024f581d5e0c86d9
Author: Adam Co <rattles2013 at gmail.com>
Date:   Sun Apr 20 14:35:30 2014 +0300

    Boost Patch - Change '*b' to a variable, to remove GCC 4.7.3 -Wtype-limits
    
    Change-Id: Ic7bac90c9b77490c47e5ddd2005453290374b7b2
    Signed-off-by: Michael Stahl <mstahl at redhat.com>

diff --git a/external/boost/UnpackedTarball_boost.mk b/external/boost/UnpackedTarball_boost.mk
index 5be550ee..29c478c 100644
--- a/external/boost/UnpackedTarball_boost.mk
+++ b/external/boost/UnpackedTarball_boost.mk
@@ -54,7 +54,7 @@ boost_patches += boost.preprocessor.Wundef.warnings.patch
 # https://svn.boost.org/trac/boost/ticket/9892
 boost_patches += boost.property_tree.Wshadow.warnings.patch.1
 # https://svn.boost.org/trac/boost/ticket/9893
-boost_patches += boost.property_tree.Wtautological-constant-out-of-range-compare.warnings.patch.0
+boost_patches += boost.property_tree.Wtype-limits.warnings.patch.1
 # https://svn.boost.org/trac/boost/ticket/9894
 boost_patches += boost.ptr_container.Wshadow.warnings.patch
 # https://svn.boost.org/trac/boost/ticket/9895
diff --git a/external/boost/boost.property_tree.Wtautological-constant-out-of-range-compare.warnings.patch.0 b/external/boost/boost.property_tree.Wtautological-constant-out-of-range-compare.warnings.patch.0
deleted file mode 100644
index 4ad7b9b..0000000
--- a/external/boost/boost.property_tree.Wtautological-constant-out-of-range-compare.warnings.patch.0
+++ /dev/null
@@ -1,11 +0,0 @@
---- boost/property_tree/detail/json_parser_write.hpp
-+++ boost/property_tree/detail/json_parser_write.hpp
-@@ -33,7 +33,7 @@
-             // We escape everything outside ASCII, because this code can't
-             // handle high unicode characters.
-             if (*b == 0x20 || *b == 0x21 || (*b >= 0x23 && *b <= 0x2E) ||
--                (*b >= 0x30 && *b <= 0x5B) || (*b >= 0x5D && *b <= 0xFF))
-+                (*b >= 0x30 && *b <= 0x5B) || (*b >= 0x5D && static_cast<typename std::basic_string<Ch>::traits_type::int_type>(*b) <= 0xFF))
-                 result += *b;
-             else if (*b == Ch('\b')) result += Ch('\\'), result += Ch('b');
-             else if (*b == Ch('\f')) result += Ch('\\'), result += Ch('f');
diff --git a/external/boost/boost.property_tree.Wtype-limits.warnings.patch.1 b/external/boost/boost.property_tree.Wtype-limits.warnings.patch.1
new file mode 100644
index 0000000..e4c7ede
--- /dev/null
+++ b/external/boost/boost.property_tree.Wtype-limits.warnings.patch.1
@@ -0,0 +1,41 @@
+diff -ur boost.org/boost/property_tree/detail/json_parser_write.hpp boost/boost/property_tree/detail/json_parser_write.hpp
+--- boost.org/boost/property_tree/detail/json_parser_write.hpp	2014-04-20 13:27:59.126224368 +0300
++++ boost/boost/property_tree/detail/json_parser_write.hpp	2014-04-20 13:32:35.206229552 +0300
+@@ -29,25 +29,26 @@
+         typename std::basic_string<Ch>::const_iterator e = s.end();
+         while (b != e)
+         {
++            typename std::basic_string<Ch>::traits_type::int_type bDref = *b;
+             // This assumes an ASCII superset. But so does everything in PTree.
+             // We escape everything outside ASCII, because this code can't
+             // handle high unicode characters.
+-            if (*b == 0x20 || *b == 0x21 || (*b >= 0x23 && *b <= 0x2E) ||
+-                (*b >= 0x30 && *b <= 0x5B) || (*b >= 0x5D && *b <= 0xFF))
+-                result += *b;
+-            else if (*b == Ch('\b')) result += Ch('\\'), result += Ch('b');
+-            else if (*b == Ch('\f')) result += Ch('\\'), result += Ch('f');
+-            else if (*b == Ch('\n')) result += Ch('\\'), result += Ch('n');
+-            else if (*b == Ch('\r')) result += Ch('\\'), result += Ch('r');
+-            else if (*b == Ch('/')) result += Ch('\\'), result += Ch('/');
+-            else if (*b == Ch('"'))  result += Ch('\\'), result += Ch('"');
+-            else if (*b == Ch('\\')) result += Ch('\\'), result += Ch('\\');
++            if (bDref == 0x20 || bDref == 0x21 || (bDref >= 0x23 && bDref <= 0x2E) ||
++                (bDref >= 0x30 && bDref <= 0x5B) || (bDref >= 0x5D && bDref <= 0xFF))
++                result += bDref;
++            else if (bDref == Ch('\b')) result += Ch('\\'), result += Ch('b');
++            else if (bDref == Ch('\f')) result += Ch('\\'), result += Ch('f');
++            else if (bDref == Ch('\n')) result += Ch('\\'), result += Ch('n');
++            else if (bDref == Ch('\r')) result += Ch('\\'), result += Ch('r');
++            else if (bDref == Ch('/')) result += Ch('\\'), result += Ch('/');
++            else if (bDref == Ch('"'))  result += Ch('\\'), result += Ch('"');
++            else if (bDref == Ch('\\')) result += Ch('\\'), result += Ch('\\');
+             else
+             {
+                 const char *hexdigits = "0123456789ABCDEF";
+                 typedef typename make_unsigned<Ch>::type UCh;
+                 unsigned long u = (std::min)(static_cast<unsigned long>(
+-                                                 static_cast<UCh>(*b)),
++                                                 static_cast<UCh>(bDref)),
+                                              0xFFFFul);
+                 int d1 = u / 4096; u -= d1 * 4096;
+                 int d2 = u / 256; u -= d2 * 256;


More information about the Libreoffice-commits mailing list