[Libreoffice-commits] .: 2 commits - rdbmaker/source sal/inc sal/qa

Caolán McNamara caolan at kemper.freedesktop.org
Tue Mar 1 12:40:59 PST 2011


 rdbmaker/source/codemaker/global.cxx |    2 +-
 sal/inc/osl/profile.hxx              |   26 +++++++++++++-------------
 sal/inc/rtl/locale.hxx               |    6 +++---
 sal/qa/osl/file/osl_File.cxx         |    2 +-
 4 files changed, 18 insertions(+), 18 deletions(-)

New commits:
commit 96c779a14f83f9bce8cb9aecbcbceffbee986be0
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Mar 1 15:08:22 2011 +0000

    avoid implicit cast

diff --git a/rdbmaker/source/codemaker/global.cxx b/rdbmaker/source/codemaker/global.cxx
index 23f1d55..b531f6b 100644
--- a/rdbmaker/source/codemaker/global.cxx
+++ b/rdbmaker/source/codemaker/global.cxx
@@ -133,7 +133,7 @@ void FileStream::open(const OString& name, FileAccessMode mode)
     if ( name.getLength() > 0 )
     {
         m_name = name;
-        m_pFile = fopen(m_name, checkAccessMode(mode));
+        m_pFile = fopen(m_name.getStr(), checkAccessMode(mode));
     }
 }
 
commit cbf879b8acca82d2cebe81e29f5d4cd718b0aecd
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Mar 1 14:45:57 2011 +0000

    avoid implicit cast

diff --git a/sal/inc/osl/profile.hxx b/sal/inc/osl/profile.hxx
index 7e2ea69..c034503 100644
--- a/sal/inc/osl/profile.hxx
+++ b/sal/inc/osl/profile.hxx
@@ -80,17 +80,17 @@ namespace osl {
         {
             sal_Char aBuf[1024];
             return osl_readProfileString( profile,
-                                          rSection,
-                                          rEntry,
+                                          rSection.getStr(),
+                                          rEntry.getStr(),
                                           aBuf,
                                           sizeof( aBuf ),
-                                          rDefault ) ? rtl::OString( aBuf ) : rtl::OString();
+                                          rDefault.getStr() ) ? rtl::OString( aBuf ) : rtl::OString();
 
         }
 
         sal_Bool readBool( const rtl::OString& rSection, const rtl::OString& rEntry, sal_Bool bDefault )
         {
-            return osl_readProfileBool( profile, rSection, rEntry, bDefault );
+            return osl_readProfileBool( profile, rSection.getStr(), rEntry.getStr(), bDefault );
         }
 
         sal_uInt32 readIdent(const rtl::OString& rSection, const rtl::OString& rEntry, 
@@ -103,11 +103,11 @@ namespace osl {
             nItems = 0;
             while( it != rStrings.end() )
             {
-                pStrings[ nItems++ ] = *it;
+                pStrings[ nItems++ ] = it->getStr();
                 ++it;
             }
             pStrings[ nItems ] = NULL;
-            sal_uInt32 nRet = osl_readProfileIdent(profile, rSection, rEntry, nFirstId, pStrings, nDefault);
+            sal_uInt32 nRet = osl_readProfileIdent(profile, rSection.getStr(), rEntry.getStr(), nFirstId, pStrings, nDefault);
             delete pStrings;
             return nRet;
         }
@@ -115,12 +115,12 @@ namespace osl {
         sal_Bool writeString(const rtl::OString& rSection, const rtl::OString& rEntry, 
                              const rtl::OString& rString)
         {
-            return osl_writeProfileString(profile, rSection, rEntry, rString);
+            return osl_writeProfileString(profile, rSection.getStr(), rEntry.getStr(), rString.getStr());
         }
 
         sal_Bool writeBool(const rtl::OString& rSection, const rtl::OString& rEntry, sal_Bool Value)
         {
-            return osl_writeProfileBool(profile, rSection, rEntry, Value);
+            return osl_writeProfileBool(profile, rSection.getStr(), rEntry.getStr(), Value);
         }
 
         sal_Bool writeIdent(const rtl::OString& rSection, const rtl::OString& rEntry, 
@@ -133,12 +133,12 @@ namespace osl {
             nItems = 0;
             while( it != rStrings.end() )
             {
-                pStrings[ nItems++ ] = *it;
+                pStrings[ nItems++ ] = it->getStr();
                 ++it;
             }
             pStrings[ nItems ] = NULL;
             sal_Bool bRet =
-                osl_writeProfileIdent(profile, rSection, rEntry, nFirstId, pStrings, nValue );
+                osl_writeProfileIdent(profile, rSection.getStr(), rEntry.getStr(), nFirstId, pStrings, nValue );
             delete pStrings;
             return bRet;
         }
@@ -149,7 +149,7 @@ namespace osl {
         */
         sal_Bool removeEntry(const rtl::OString& rSection, const rtl::OString& rEntry)
         {
-            return osl_removeProfileEntry(profile, rSection, rEntry);
+            return osl_removeProfileEntry(profile, rSection.getStr(), rEntry.getStr());
         }
 
         /** Get all entries belonging to the specified section.
@@ -161,11 +161,11 @@ namespace osl {
             std::list< rtl::OString > aEntries;
 
             // count buffer size necessary
-            int n = osl_getProfileSectionEntries( profile, rSection, NULL, 0 );
+            int n = osl_getProfileSectionEntries( profile, rSection.getStr(), NULL, 0 );
             if( n > 1 )
             {
                 sal_Char* pBuf = new sal_Char[ n+1 ];
-                osl_getProfileSectionEntries( profile, rSection, pBuf, n+1 );
+                osl_getProfileSectionEntries( profile, rSection.getStr(), pBuf, n+1 );
                 int nLen;
                 for( n = 0; ( nLen = strlen( pBuf+n ) ); n += nLen+1 )
                     aEntries.push_back( rtl::OString( pBuf+n ) );
diff --git a/sal/inc/rtl/locale.hxx b/sal/inc/rtl/locale.hxx
index 022c1ea..d8ed712 100644
--- a/sal/inc/rtl/locale.hxx
+++ b/sal/inc/rtl/locale.hxx
@@ -186,7 +186,7 @@ public:
     static OLocale registerLocale( const OUString & language, const OUString & country,
                             const OUString & variant )
     {
-        return rtl_locale_register( language, country, variant );
+        return rtl_locale_register( language.getStr(), country.getStr(), variant.getStr() );
     }
 
     /**
@@ -196,7 +196,7 @@ public:
      */
     static OLocale registerLocale( const OUString & language, const OUString & country )
     {
-        return rtl_locale_register( language, country, NULL );
+        return rtl_locale_register( language.getStr(), country.getStr(), NULL );
     }
 
     /** @deprecated
@@ -207,7 +207,7 @@ public:
      */
     static void setDefault( const OUString & language, const OUString & country,
                             const OUString & variant )
-             { rtl_locale_setDefault(language, country, variant); }
+             { rtl_locale_setDefault(language.getStr(), country.getStr(), variant.getStr()); }
 
     /**
          Getter for programmatic name of field,
diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx
index 120aaf6..4d89063 100644
--- a/sal/qa/osl/file/osl_File.cxx
+++ b/sal/qa/osl/file/osl_File.cxx
@@ -2609,7 +2609,7 @@ namespace osl_FileStatus
                     break;
             };
 
-            fd = remove( strLinkFileName );
+            fd = remove( strLinkFileName.getStr() );
             CPPUNIT_ASSERT( fd == 0 );
 
             CPPUNIT_ASSERT_MESSAGE("test for isValid function: link file, check for LinkTargetURL",


More information about the Libreoffice-commits mailing list