Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


The attached core-0001-Fix-some-apparent-misuses-of-RTL_CONSTASCII_USTRINGP.patch and binfilter-0001-Fix-some-apparent-misuses-of-RTL_CONSTASCII_USTRINGP.patch extract those parts of the master commits 9ab0b38e95133dab720408cc2c80093b8a201c10 and 715ac8c1b402e33930317a69bbdd61ad88133740 (core) and b0035dae18266c4fd219b29dbc635497c0fa53ec (binfilter) that address apparent misuses of RTL_CONSTASCII_USTRINGPARAM instead of RTL_CONSTASCII_STRINGPARAM, to be reviewed and cherry-picked to libreoffice-3-5.

All those misuses were introduced with commits from August and November of last year and do not affect LO 3.4. How severe these errors are in practice, and whether they are responsible for any actual bug reports, I do not know.

Thanks,
Stephan
From d792f93081948520d6421961a98be28abd7167f3 Mon Sep 17 00:00:00 2001
From: Stephan Bergmann <sbergman@redhat.com>
Date: Wed, 15 Feb 2012 15:38:04 +0100
Subject: [PATCH] Fix some apparent misuses of RTL_CONSTASCII_USTRINGPARAM

---
 .../source/filter.vcl/filter/svt_sgvtext.cxx       |   30 ++++++++++----------
 1 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/binfilter/bf_svtools/source/filter.vcl/filter/svt_sgvtext.cxx 
b/binfilter/bf_svtools/source/filter.vcl/filter/svt_sgvtext.cxx
index fd8bc49..6a78e9a 100644
--- a/binfilter/bf_svtools/source/filter.vcl/filter/svt_sgvtext.cxx
+++ b/binfilter/bf_svtools/source/filter.vcl/filter/svt_sgvtext.cxx
@@ -1190,21 +1190,21 @@ void SgfFontOne::ReadOne( const rtl::OString& rID, ByteString& Dsc )
         {
             s = s.toAsciiUpperCase();
             using comphelper::string::matchL;
-            if      (matchL(s, RTL_CONSTASCII_USTRINGPARAM("BOLD"))) Bold=sal_True;
-            else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("ITAL"))) Ital=sal_True;
-            else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("SERF"))) Serf=sal_True;
-            else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("SANS"))) Sans=sal_True;
-            else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("FIXD"))) Fixd=sal_True;
-            else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("ROMAN"))) SVFamil=FAMILY_ROMAN;
-            else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("SWISS"))) SVFamil=FAMILY_SWISS;
-            else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("MODERN"))) SVFamil=FAMILY_MODERN;
-            else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("SCRIPT"))) SVFamil=FAMILY_SCRIPT;
-            else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("DECORA"))) SVFamil=FAMILY_DECORATIVE;
-            else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("ANSI"))) 
SVChSet=RTL_TEXTENCODING_MS_1252;
-            else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("IBMPC"))) 
SVChSet=RTL_TEXTENCODING_IBM_850;
-            else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("MAC"))) 
SVChSet=RTL_TEXTENCODING_APPLE_ROMAN;
-            else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("SYMBOL"))) 
SVChSet=RTL_TEXTENCODING_SYMBOL;
-            else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("SYSTEM"))) SVChSet = 
osl_getThreadTextEncoding();
+            if      (matchL(s, RTL_CONSTASCII_STRINGPARAM("BOLD"))) Bold=sal_True;
+            else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("ITAL"))) Ital=sal_True;
+            else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("SERF"))) Serf=sal_True;
+            else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("SANS"))) Sans=sal_True;
+            else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("FIXD"))) Fixd=sal_True;
+            else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("ROMAN"))) SVFamil=FAMILY_ROMAN;
+            else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("SWISS"))) SVFamil=FAMILY_SWISS;
+            else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("MODERN"))) SVFamil=FAMILY_MODERN;
+            else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("SCRIPT"))) SVFamil=FAMILY_SCRIPT;
+            else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("DECORA"))) SVFamil=FAMILY_DECORATIVE;
+            else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("ANSI"))) 
SVChSet=RTL_TEXTENCODING_MS_1252;
+            else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("IBMPC"))) 
SVChSet=RTL_TEXTENCODING_IBM_850;
+            else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("MAC"))) 
SVChSet=RTL_TEXTENCODING_APPLE_ROMAN;
+            else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("SYMBOL"))) 
SVChSet=RTL_TEXTENCODING_SYMBOL;
+            else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("SYSTEM"))) SVChSet = 
osl_getThreadTextEncoding();
             else if (comphelper::string::isdigitAsciiString(s) ) SVWidth=sal::static_int_cast< 
sal_uInt16 >(s.toInt32());
         }
     }
-- 
1.7.7.6

From ac01dda9e30b83e34103746dab0e5c9fe92a95e7 Mon Sep 17 00:00:00 2001
From: Stephan Bergmann <sbergman@redhat.com>
Date: Wed, 15 Feb 2012 15:26:43 +0100
Subject: [PATCH] Fix some apparent misuses of RTL_CONSTASCII_USTRINGPARAM

---
 extensions/source/scanner/sanedlg.cxx |    6 +++---
 svtools/source/filter/sgvtext.cxx     |   30 +++++++++++++++---------------
 svtools/source/misc/imap2.cxx         |    4 ++--
 3 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx
index d08a175..9726f3b 100644
--- a/extensions/source/scanner/sanedlg.cxx
+++ b/extensions/source/scanner/sanedlg.cxx
@@ -1214,18 +1214,18 @@ sal_Bool SaneDlg::LoadState()
 
             using comphelper::string::matchL;
 
-            if (matchL(aValue, RTL_CONSTASCII_USTRINGPARAM("BOOL=")))
+            if (matchL(aValue, RTL_CONSTASCII_STRINGPARAM("BOOL=")))
             {
                 aValue = aValue.copy(RTL_CONSTASCII_LENGTH("BOOL="));
                 sal_Bool aBOOL = (sal_Bool)aValue.toInt32();
                 mrSane.SetOptionValue( nOption, aBOOL );
             }
-            else if (matchL(aValue, RTL_CONSTASCII_USTRINGPARAM("STRING=")))
+            else if (matchL(aValue, RTL_CONSTASCII_STRINGPARAM("STRING=")))
             {
                 aValue = aValue.copy(RTL_CONSTASCII_LENGTH("STRING="));
                 mrSane.SetOptionValue(nOption,rtl::OStringToOUString(aValue, 
osl_getThreadTextEncoding()) );
             }
-            else if (matchL(aValue, RTL_CONSTASCII_USTRINGPARAM("NUMERIC=")))
+            else if (matchL(aValue, RTL_CONSTASCII_STRINGPARAM("NUMERIC=")))
             {
                 aValue = aValue.copy(RTL_CONSTASCII_LENGTH("NUMERIC="));
 
diff --git a/svtools/source/filter/sgvtext.cxx b/svtools/source/filter/sgvtext.cxx
index fbf9864..45b3a23 100644
--- a/svtools/source/filter/sgvtext.cxx
+++ b/svtools/source/filter/sgvtext.cxx
@@ -1193,21 +1193,21 @@ void SgfFontOne::ReadOne( const rtl::OString& rID, ByteString& Dsc )
         {
             s = s.toAsciiUpperCase();
             using comphelper::string::matchL;
-            if      (matchL(s, RTL_CONSTASCII_USTRINGPARAM("BOLD"))) Bold=sal_True;
-            else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("ITAL"))) Ital=sal_True;
-            else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("SERF"))) Serf=sal_True;
-            else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("SANS"))) Sans=sal_True;
-            else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("FIXD"))) Fixd=sal_True;
-            else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("ROMAN"))) SVFamil=FAMILY_ROMAN;
-            else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("SWISS"))) SVFamil=FAMILY_SWISS;
-            else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("MODERN"))) SVFamil=FAMILY_MODERN;
-            else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("SCRIPT"))) SVFamil=FAMILY_SCRIPT;
-            else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("DECORA"))) SVFamil=FAMILY_DECORATIVE;
-            else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("ANSI"))) 
SVChSet=RTL_TEXTENCODING_MS_1252;
-            else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("IBMPC"))) 
SVChSet=RTL_TEXTENCODING_IBM_850;
-            else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("MAC"))) 
SVChSet=RTL_TEXTENCODING_APPLE_ROMAN;
-            else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("SYMBOL"))) 
SVChSet=RTL_TEXTENCODING_SYMBOL;
-            else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("SYSTEM"))) SVChSet = 
osl_getThreadTextEncoding();
+            if      (matchL(s, RTL_CONSTASCII_STRINGPARAM("BOLD"))) Bold=sal_True;
+            else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("ITAL"))) Ital=sal_True;
+            else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("SERF"))) Serf=sal_True;
+            else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("SANS"))) Sans=sal_True;
+            else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("FIXD"))) Fixd=sal_True;
+            else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("ROMAN"))) SVFamil=FAMILY_ROMAN;
+            else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("SWISS"))) SVFamil=FAMILY_SWISS;
+            else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("MODERN"))) SVFamil=FAMILY_MODERN;
+            else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("SCRIPT"))) SVFamil=FAMILY_SCRIPT;
+            else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("DECORA"))) SVFamil=FAMILY_DECORATIVE;
+            else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("ANSI"))) 
SVChSet=RTL_TEXTENCODING_MS_1252;
+            else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("IBMPC"))) 
SVChSet=RTL_TEXTENCODING_IBM_850;
+            else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("MAC"))) 
SVChSet=RTL_TEXTENCODING_APPLE_ROMAN;
+            else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("SYMBOL"))) 
SVChSet=RTL_TEXTENCODING_SYMBOL;
+            else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("SYSTEM"))) SVChSet = 
osl_getThreadTextEncoding();
             else if (comphelper::string::isdigitAsciiString(s) ) SVWidth=sal::static_int_cast< 
sal_uInt16 >(s.toInt32());
         }
     }
diff --git a/svtools/source/misc/imap2.cxx b/svtools/source/misc/imap2.cxx
index ffcf82a..851840b 100644
--- a/svtools/source/misc/imap2.cxx
+++ b/svtools/source/misc/imap2.cxx
@@ -540,8 +540,8 @@ sal_uLong ImageMap::ImpDetectFormat( SvStream& rIStm )
             using comphelper::string::indexOfL;
 
             if ( (indexOfL(aStr, RTL_CONSTASCII_STRINGPARAM("rect")) != -1) ||
-                 (indexOfL(aStr, RTL_CONSTASCII_USTRINGPARAM("circ")) != -1) ||
-                 (indexOfL(aStr, RTL_CONSTASCII_USTRINGPARAM("poly")) != -1) )
+                 (indexOfL(aStr, RTL_CONSTASCII_STRINGPARAM("circ")) != -1) ||
+                 (indexOfL(aStr, RTL_CONSTASCII_STRINGPARAM("poly")) != -1) )
             {
                 if ( ( aStr.indexOf('(') != -1 ) &&
                      ( aStr.indexOf(')') != -1 ) )
-- 
1.7.7.6


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.