[Libreoffice-commits] .: dbaccess/source

Caolán McNamara caolan at kemper.freedesktop.org
Wed Oct 5 02:41:24 PDT 2011


 dbaccess/source/core/recovery/dbdocrecovery.cxx     |    2 +-
 dbaccess/source/filter/xml/xmlDataSourceSetting.cxx |   19 ++++++++++---------
 dbaccess/source/ui/browser/exsrcbrw.cxx             |    2 +-
 3 files changed, 12 insertions(+), 11 deletions(-)

New commits:
commit 9a8593e69f2d2d2f6fc25d7239cbcdebbf3711ae
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Oct 5 10:40:50 2011 +0100

    ByteString->rtl::OStringBuffer

diff --git a/dbaccess/source/core/recovery/dbdocrecovery.cxx b/dbaccess/source/core/recovery/dbdocrecovery.cxx
index 42040e4..2e75443 100644
--- a/dbaccess/source/core/recovery/dbdocrecovery.cxx
+++ b/dbaccess/source/core/recovery/dbdocrecovery.cxx
@@ -398,7 +398,7 @@ namespace dbaccess
                     message.append( "' not found in '" );
                     message.append( ::rtl::OUStringToOString( SubComponentRecovery::getComponentsStorageName( eComponentType ), RTL_TEXTENCODING_ASCII_US ) );
                     message.append( "', but required per map file!" );
-                    OSL_FAIL( message.makeStringAndClear() );
+                    OSL_FAIL( message.getStr() );
                 #endif
                     continue;
                 }
diff --git a/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx b/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx
index c004e7b..1e16bfc 100644
--- a/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx
+++ b/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx
@@ -37,6 +37,7 @@
 #include <xmloff/nmspmap.hxx>
 #include "xmlEnums.hxx"
 #include "xmlstrings.hrc"
+#include <rtl/strbuf.hxx>
 #include <tools/debug.hxx>
 
 namespace dbaxml
@@ -194,9 +195,9 @@ Any OXMLDataSourceSetting::convertString(const ::com::sun::star::uno::Type& _rEx
         #endif
             rImporter.GetMM100UnitConverter().convertBool(bValue, _rReadCharacters);
             OSL_ENSURE(bSuccess,
-                    ::rtl::OString("OXMLDataSourceSetting::convertString: could not convert \"")
-                +=  ::rtl::OString(_rReadCharacters.getStr(), _rReadCharacters.getLength(), RTL_TEXTENCODING_ASCII_US)
-                +=  ::rtl::OString("\" into a boolean!"));
+                    ::rtl::OStringBuffer("OXMLDataSourceSetting::convertString: could not convert \"")
+                .append(::rtl::OUStringToOString(_rReadCharacters, RTL_TEXTENCODING_ASCII_US))
+                .append("\" into a boolean!").getStr());
             aReturn <<= bValue;
         }
         break;
@@ -209,9 +210,9 @@ Any OXMLDataSourceSetting::convertString(const ::com::sun::star::uno::Type& _rEx
         #endif
                 rImporter.GetMM100UnitConverter().convertNumber(nValue, _rReadCharacters);
                 OSL_ENSURE(bSuccess,
-                        ::rtl::OString("OXMLDataSourceSetting::convertString: could not convert \"")
-                    +=  ::rtl::OString(_rReadCharacters.getStr(), _rReadCharacters.getLength(), RTL_TEXTENCODING_ASCII_US)
-                    +=  ::rtl::OString("\" into an integer!"));
+                        ::rtl::OStringBuffer("OXMLDataSourceSetting::convertString: could not convert \"")
+                    .append(::rtl::OUStringToOString(_rReadCharacters, RTL_TEXTENCODING_ASCII_US))
+                    .append("\" into an integer!").getStr());
                 if (TypeClass_SHORT == _rExpectedType.getTypeClass())
                     aReturn <<= (sal_Int16)nValue;
                 else
@@ -231,9 +232,9 @@ Any OXMLDataSourceSetting::convertString(const ::com::sun::star::uno::Type& _rEx
         #endif
             rImporter.GetMM100UnitConverter().convertDouble(nValue, _rReadCharacters);
             OSL_ENSURE(bSuccess,
-                    ::rtl::OString("OXMLDataSourceSetting::convertString: could not convert \"")
-                +=  ::rtl::OString(_rReadCharacters.getStr(), _rReadCharacters.getLength(), RTL_TEXTENCODING_ASCII_US)
-                +=  ::rtl::OString("\" into a double!"));
+                    ::rtl::OStringBuffer("OXMLDataSourceSetting::convertString: could not convert \"")
+                .append(rtl::OUStringToOString(_rReadCharacters, RTL_TEXTENCODING_ASCII_US))
+                .append("\" into a double!").getStr());
             aReturn <<= (double)nValue;
         }
         break;
diff --git a/dbaccess/source/ui/browser/exsrcbrw.cxx b/dbaccess/source/ui/browser/exsrcbrw.cxx
index a77874d..1328027 100644
--- a/dbaccess/source/ui/browser/exsrcbrw.cxx
+++ b/dbaccess/source/ui/browser/exsrcbrw.cxx
@@ -186,7 +186,7 @@ void SAL_CALL SbaExternalSourceBrowser::dispatch(const ::com::sun::star::util::U
                     aControlProps = *(Sequence< ::com::sun::star::beans::PropertyValue>*)pArguments->Value.getValue();
             }
             else
-                OSL_FAIL(((ByteString("SbaExternalSourceBrowser::dispatch(AddGridColumn) : unknown argument (") += ByteString((const sal_Unicode*)pArguments->Name, gsl_getSystemTextEncoding()).GetBuffer()) += ") !").GetBuffer());
+                OSL_FAIL(rtl::OStringBuffer("SbaExternalSourceBrowser::dispatch(AddGridColumn) : unknown argument (").append(rtl::OUStringToOString(pArguments->Name, gsl_getSystemTextEncoding())).append(") !").getStr());
         }
         if (!sControlType.getLength())
         {


More information about the Libreoffice-commits mailing list