[Libreoffice-commits] .: Branch 'libreoffice-3-3' - 5 commits - desktop/source editeng/source framework/source linguistic/source sfx2/source

Caolán McNamara caolan at kemper.freedesktop.org
Fri Nov 12 13:22:16 PST 2010


 desktop/source/so_comp/evaluation.cxx           |    2 +-
 desktop/source/so_comp/oemjob.cxx               |    2 +-
 editeng/source/misc/svxacorr.cxx                |    2 +-
 framework/source/uielement/statusbarmanager.cxx |    2 +-
 linguistic/source/lngopt.cxx                    |   12 +++---------
 sfx2/source/control/macro.cxx                   |    2 +-
 6 files changed, 8 insertions(+), 14 deletions(-)

New commits:
commit 2ec330de0b0bffe24a1908ef2a5005582fa4cdf8
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Nov 12 13:17:33 2010 +0000

    Resolves: rhbz#647392# Ensure autocorrect doesn't crash

diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 81834b7..443b30c 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -700,7 +700,7 @@ BOOL SvxAutoCorrect::FnAddNonBrkSpace(
                     bRunNext = true;
             }
         }
-        else if ( cChar == '/' )
+        else if (cChar == '/' && nEndPos >= 2)
         {
             // Remove the hardspace right before to avoid formatting URLs
             sal_Unicode cPrevChar = rTxt.GetChar( nEndPos - 1 );
commit 49d87cb2e57b19ecbb111a29b79b8df42d1f93f0
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Nov 12 11:20:10 2010 +0000

    RTL_CONSTASCII_USTRINGPARAM used with nonarray

diff --git a/sfx2/source/control/macro.cxx b/sfx2/source/control/macro.cxx
index 2031b42..3990e3a 100644
--- a/sfx2/source/control/macro.cxx
+++ b/sfx2/source/control/macro.cxx
@@ -381,7 +381,7 @@ void SfxMacroStatement::GenerateNameAndArgs_Impl
                 USHORT nPos = 0;
                 while ( TRUE )
                 {
-                    nPos = aRecordable.SearchAndReplace( DEFINE_CONST_UNICODE('"'), DEFINE_CONST_UNICODE("\"\""), nPos );
+                    nPos = aRecordable.SearchAndReplace( String('"'), DEFINE_CONST_UNICODE("\"\""), nPos );
                     if ( STRING_NOTFOUND == nPos )
                         break;
                     nPos += 2;
commit 7fa27749f8babf5f5ecb1dd845adf31dae6faf62
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Nov 12 11:23:45 2010 +0000

    RTL_CONSTASCII_USTRINGPARAM used with nonarray

diff --git a/linguistic/source/lngopt.cxx b/linguistic/source/lngopt.cxx
index 00f0743..7a1cbb5 100644
--- a/linguistic/source/lngopt.cxx
+++ b/linguistic/source/lngopt.cxx
@@ -300,16 +300,10 @@ OUString LinguOptions::GetName( INT32 nWID )
     OUString aRes;
 
     INT32 nLen = SAL_N_ELEMENTS( aWID_Name );
-    if (0 <= nWID  &&  nWID < nLen
-        && aWID_Name[ nWID ].nWID == nWID)
-    {
-        aRes = OUString( RTL_CONSTASCII_USTRINGPARAM(
-                aWID_Name[ nWID ].pPropertyName ) );
-    }
+    if (0 <= nWID && nWID < nLen && aWID_Name[ nWID ].nWID == nWID)
+        aRes = OUString::createFromAscii(aWID_Name[nWID].pPropertyName);
     else
-    {
-        DBG_ASSERT( 0,"lng : unknown WID");
-    }
+        OSL_ENSURE(false, "lng : unknown WID");
 
     return aRes;
 }
commit 95c27c717e22c51a90861bef568dc4642df0b11e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Nov 12 11:24:14 2010 +0000

    RTL_CONSTASCII_USTRINGPARAM used with nonarray

diff --git a/framework/source/uielement/statusbarmanager.cxx b/framework/source/uielement/statusbarmanager.cxx
index d75d6d2..d2f2cfb 100644
--- a/framework/source/uielement/statusbarmanager.cxx
+++ b/framework/source/uielement/statusbarmanager.cxx
@@ -79,7 +79,7 @@ using namespace ::com::sun::star;
 #endif
 
 const sal_Int32  HELPID_PREFIX_LENGTH    = 7;
-static const char*      HELPID_PREFIX           = "helpid:";
+static const char HELPID_PREFIX[] = "helpid:";
 
 // Property names of a menu/menu item ItemDescriptor
 static const char ITEM_DESCRIPTOR_COMMANDURL[]  = "CommandURL";
commit 4efef13e468e969feaf0cc145d2bc183eee8c9a2
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Nov 12 11:27:06 2010 +0000

    RTL_CONSTASCII_USTRINGPARAM used with nonarray

diff --git a/desktop/source/so_comp/evaluation.cxx b/desktop/source/so_comp/evaluation.cxx
index 547398d..664c0da 100644
--- a/desktop/source/so_comp/evaluation.cxx
+++ b/desktop/source/so_comp/evaluation.cxx
@@ -67,7 +67,7 @@ const char* SOEvaluation::serviceName = "com.sun.star.office.Evaluation";
 
 OUString SOEvaluation::GetImplementationName()
 {
-    return OUString( RTL_CONSTASCII_USTRINGPARAM( implementationName));
+    return OUString::createFromAscii(implementationName);
 }
 
 Sequence< OUString > SOEvaluation::GetSupportedServiceNames()
diff --git a/desktop/source/so_comp/oemjob.cxx b/desktop/source/so_comp/oemjob.cxx
index f5d6787..22bad75 100644
--- a/desktop/source/so_comp/oemjob.cxx
+++ b/desktop/source/so_comp/oemjob.cxx
@@ -68,7 +68,7 @@ const char* OEMPreloadJob::serviceName = "com.sun.star.office.OEMPreloadJob";
 
 OUString OEMPreloadJob::GetImplementationName()
 {
-    return OUString( RTL_CONSTASCII_USTRINGPARAM( implementationName));
+    return OUString::createFromAscii(implementationName);
 }
 
 Sequence< OUString > OEMPreloadJob::GetSupportedServiceNames()


More information about the Libreoffice-commits mailing list