include/com/sun/star/uno/Any.hxx | 4 include/rtl/strbuf.hxx | 61 ----- include/rtl/string.hxx | 19 - include/rtl/stringconcat.hxx | 2 include/rtl/stringutils.hxx | 6 include/rtl/ustrbuf.hxx | 61 ----- include/rtl/ustring.hxx | 40 +-- ios/shared/ios_sharedlo/objective_c/utils/MLOCommon.h | 1 mysqlc/source/mysqlc_connection.cxx | 80 +++--- mysqlc/source/mysqlc_connection.hxx | 38 +-- mysqlc/source/mysqlc_databasemetadata.cxx | 208 +++++++++--------- mysqlc/source/mysqlc_databasemetadata.hxx | 74 +++--- mysqlc/source/mysqlc_driver.cxx | 50 ++-- mysqlc/source/mysqlc_driver.hxx | 16 - mysqlc/source/mysqlc_general.cxx | 20 - mysqlc/source/mysqlc_general.hxx | 6 mysqlc/source/mysqlc_preparedstatement.cxx | 26 +- mysqlc/source/mysqlc_preparedstatement.hxx | 16 - mysqlc/source/mysqlc_propertyids.cxx | 6 mysqlc/source/mysqlc_propertyids.hxx | 6 mysqlc/source/mysqlc_resultset.cxx | 36 +-- mysqlc/source/mysqlc_resultset.hxx | 12 - mysqlc/source/mysqlc_resultsetmetadata.cxx | 32 +- mysqlc/source/mysqlc_resultsetmetadata.hxx | 18 - mysqlc/source/mysqlc_services.cxx | 12 - mysqlc/source/mysqlc_statement.cxx | 32 +- mysqlc/source/mysqlc_statement.hxx | 16 - odk/qa/checkapi/checkapi.cxx | 10 sal/qa/rtl/strings/test_ostring_concat.cxx | 27 -- sal/qa/rtl/strings/test_oustring_concat.cxx | 20 - sal/qa/rtl/textenc/rtl_textcvt.cxx | 2 sc/qa/extras/macros-test.cxx | 2 solenv/gbuild/LinkTarget.mk | 6 33 files changed, 404 insertions(+), 561 deletions(-)
New commits: commit 5537bb28ec2667018c101ad25bbbc9c52daaffb0 Author: Stephan Bergmann <[email protected]> Date: Fri Dec 19 14:26:11 2014 +0100 sc: Use appropriate OUString functions on string constants Change-Id: Iefc8dcb25dd32acbc435bbf2aaa63572915d6753 diff --git a/sc/qa/extras/macros-test.cxx b/sc/qa/extras/macros-test.cxx index 3f210db..c2948e7 100644 --- a/sc/qa/extras/macros-test.cxx +++ b/sc/qa/extras/macros-test.cxx @@ -247,7 +247,7 @@ void ScMacrosTest::testVba() Any aRet; Sequence< sal_Int16 > aOutParamIndex; Sequence< Any > aOutParam; - bool bWorkbooksHandling = OUString( testInfo[i].sFileBaseName ).equalsAscii("Workbooks.") && !sTempDir.isEmpty() ; + bool bWorkbooksHandling = OUString( testInfo[i].sFileBaseName ) == "Workbooks." && !sTempDir.isEmpty() ; if ( bWorkbooksHandling ) { commit a5bdf3c606b562a2af3dd4e4162b734abb1cb24c Author: Stephan Bergmann <[email protected]> Date: Fri Dec 19 14:25:53 2014 +0100 Make O[U]StringLiteral ctor explicit Change-Id: Ide8b167d544447dd6844f5249fe6831ef4d2b4eb diff --git a/include/rtl/string.hxx b/include/rtl/string.hxx index 3571625..773e54e 100644 --- a/include/rtl/string.hxx +++ b/include/rtl/string.hxx @@ -1646,7 +1646,7 @@ This class is not part of public API and is meant to be used only in LibreOffice struct SAL_WARN_UNUSED OStringLiteral { template< int N > - OStringLiteral( const char (&str)[ N ] ) : size( N - 1 ), data( str ) { assert( strlen( str ) == N - 1 ); } + explicit OStringLiteral( const char (&str)[ N ] ) : size( N - 1 ), data( str ) { assert( strlen( str ) == N - 1 ); } int size; const char* data; }; diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx index 2202415..8aaab0a 100644 --- a/include/rtl/ustring.hxx +++ b/include/rtl/ustring.hxx @@ -67,7 +67,7 @@ This class is not part of public API and is meant to be used only in LibreOffice struct SAL_WARN_UNUSED OUStringLiteral { template< int N > - OUStringLiteral( const char (&str)[ N ] ) : size( N - 1 ), data( str ) { assert( strlen( str ) == N - 1 ); } + explicit OUStringLiteral( const char (&str)[ N ] ) : size( N - 1 ), data( str ) { assert( strlen( str ) == N - 1 ); } int size; const char* data; }; commit ffd00464f8ec2c796cdfead7e1e13ee715641e78 Author: Stephan Bergmann <[email protected]> Date: Fri Dec 19 12:02:25 2014 +0100 This is not java.lang.StringBuffer Change-Id: Iea1ebb8ec79647b279fde359aa4d617d9c360e56 diff --git a/include/rtl/strbuf.hxx b/include/rtl/strbuf.hxx index 6a21c57..9352d54 100644 --- a/include/rtl/strbuf.hxx +++ b/include/rtl/strbuf.hxx @@ -56,42 +56,6 @@ namespace rtl /// @endcond /** A string buffer implements a mutable sequence of characters. - <p> - String buffers are safe for use by multiple threads. The methods - are synchronized where necessary so that all the operations on any - particular instance behave as if they occur in some serial order. - <p> - String buffers are used by the compiler to implement the binary - string concatenation operator <code>+</code>. For example, the code: - <p><blockquote><pre> - x = "a" + 4 + "c" - </pre></blockquote><p> - is compiled to the equivalent of: - <p><blockquote><pre> - x = new OStringBuffer().append("a").append(4).append("c") - .makeStringAndClear() - </pre></blockquote><p> - The principal operations on a <code>OStringBuffer</code> are the - <code>append</code> and <code>insert</code> methods, which are - overloaded so as to accept data of any type. Each effectively - converts a given datum to a string and then appends or inserts the - characters of that string to the string buffer. The - <code>append</code> method always adds these characters at the end - of the buffer; the <code>insert</code> method adds the characters at - a specified point. - <p> - For example, if <code>z</code> refers to a string buffer object - whose current contents are "<code>start</code>", then - the method call <code>z.append("le")</code> would cause the string - buffer to contain "<code>startle</code>", whereas - <code>z.insert(4, "le")</code> would alter the string buffer to - contain "<code>starlet</code>". - <p> - Every string buffer has a capacity. As long as the length of the - character sequence contained in the string buffer does not exceed - the capacity, it is not necessary to allocate a new internal - buffer array. If the internal buffer overflows, it is - automatically made larger. */ class SAL_WARN_UNUSED OStringBuffer { diff --git a/include/rtl/ustrbuf.hxx b/include/rtl/ustrbuf.hxx index 4c8243f..a9252b8 100644 --- a/include/rtl/ustrbuf.hxx +++ b/include/rtl/ustrbuf.hxx @@ -51,42 +51,6 @@ namespace rtl #endif /** A string buffer implements a mutable sequence of characters. - <p> - String buffers are safe for use by multiple threads. The methods - are synchronized where necessary so that all the operations on any - particular instance behave as if they occur in some serial order. - <p> - String buffers are used by the compiler to implement the binary - string concatenation operator <code>+</code>. For example, the code: - <p><blockquote><pre> - x = "a" + 4 + "c" - </pre></blockquote><p> - is compiled to the equivalent of: - <p><blockquote><pre> - x = new OUStringBuffer().append("a").append(4).append("c") - .makeStringAndClear() - </pre></blockquote><p> - The principal operations on a <code>OUStringBuffer</code> are the - <code>append</code> and <code>insert</code> methods, which are - overloaded so as to accept data of any type. Each effectively - converts a given datum to a string and then appends or inserts the - characters of that string to the string buffer. The - <code>append</code> method always adds these characters at the end - of the buffer; the <code>insert</code> method adds the characters at - a specified point. - <p> - For example, if <code>z</code> refers to a string buffer object - whose current contents are "<code>start</code>", then - the method call <code>z.append("le")</code> would cause the string - buffer to contain "<code>startle</code>", whereas - <code>z.insert(4, "le")</code> would alter the string buffer to - contain "<code>starlet</code>". - <p> - Every string buffer has a capacity. As long as the length of the - character sequence contained in the string buffer does not exceed - the capacity, it is not necessary to allocate a new internal - buffer array. If the internal buffer overflows, it is - automatically made larger. */ class SAL_WARN_UNUSED OUStringBuffer { commit 240f9bcb70b0781a4aec42550cbccd95f528d8d7 Author: Stephan Bergmann <[email protected]> Date: Fri Dec 19 12:01:42 2014 +0100 No need for RTL_FAST_STRING in addition to LIBO_INTERNAL_ONLY Change-Id: I5514898f588b21bafceefca95e3276826cb9a882 diff --git a/include/com/sun/star/uno/Any.hxx b/include/com/sun/star/uno/Any.hxx index b0fbbf9..04d1274 100644 --- a/include/com/sun/star/uno/Any.hxx +++ b/include/com/sun/star/uno/Any.hxx @@ -190,7 +190,7 @@ inline Any SAL_CALL makeAny( bool const & value ) } -#ifdef RTL_FAST_STRING +#ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" template< class C1, class C2 > inline Any SAL_CALL makeAny( const rtl::OUStringConcat< C1, C2 >& value ) { @@ -220,7 +220,7 @@ inline void SAL_CALL operator <<= ( Any & rAny, bool const & value ) } -#ifdef RTL_FAST_STRING +#ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" template< class C1, class C2 > inline void SAL_CALL operator <<= ( Any & rAny, const rtl::OUStringConcat< C1, C2 >& value ) { diff --git a/include/rtl/strbuf.hxx b/include/rtl/strbuf.hxx index 22aa20b..6a21c57 100644 --- a/include/rtl/strbuf.hxx +++ b/include/rtl/strbuf.hxx @@ -29,7 +29,7 @@ #include <rtl/string.hxx> #include <rtl/stringutils.hxx> -#ifdef RTL_FAST_STRING +#ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" #include <rtl/stringconcat.hxx> #endif @@ -214,7 +214,7 @@ public: rtl_stringbuffer_newFromStr_WithLength( &pData, value, length ); } -#ifdef RTL_FAST_STRING +#ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" /** @overload @internal @@ -495,7 +495,7 @@ public: return *this; } -#ifdef RTL_FAST_STRING +#ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" /** @overload @internal @@ -940,21 +940,6 @@ public: return *this; } -#ifdef LIBO_INTERNAL_ONLY - // This is to complement the RTL_FAST_STRING operator+, which allows any combination of valid operands, - // even two buffers. It's intentional it returns OString, just like the operator+ would in the fast variant. -#ifndef RTL_FAST_STRING - /** - @internal - @since LibreOffice 4.1 - */ - friend OString operator+( const OStringBuffer& str1, const OStringBuffer& str2 ) - { - return OString( str1.pData ).concat( str2.pData ); - } -#endif -#endif - private: /** A pointer to the data structure which contains the data. @@ -967,7 +952,7 @@ private: sal_Int32 nCapacity; }; -#ifdef RTL_FAST_STRING +#ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" /** @internal */ @@ -992,7 +977,7 @@ typedef rtlunittest::OStringBuffer OStringBuffer; #undef RTL_STRING_CONST_FUNCTION #endif -#ifdef LIBO_INTERNAL_ONLY +#if defined LIBO_INTERNAL_ONLY && !defined RTL_STRING_UNITTEST using ::rtl::OStringBuffer; #endif diff --git a/include/rtl/string.hxx b/include/rtl/string.hxx index d11b18b..3571625 100644 --- a/include/rtl/string.hxx +++ b/include/rtl/string.hxx @@ -31,7 +31,7 @@ #include <rtl/string.h> #include <rtl/stringutils.hxx> -#ifdef RTL_FAST_STRING +#ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" #include <rtl/stringconcat.hxx> #endif @@ -231,7 +231,7 @@ public: } } -#ifdef RTL_FAST_STRING +#ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" /** @overload @internal @@ -297,7 +297,7 @@ public: return *this; } -#ifdef RTL_FAST_STRING +#ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" /** @overload @internal @@ -1128,7 +1128,7 @@ public: return OString( pNew, SAL_NO_ACQUIRE ); } -#ifndef RTL_FAST_STRING +#ifndef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" friend OString operator+( const OString & str1, const OString & str2 ) { return str1.concat( str2 ); @@ -1634,7 +1634,7 @@ public: /* ======================================================================= */ -#ifdef RTL_FAST_STRING +#ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" /** A simple wrapper around string literal. It is usually not necessary to use, can be mostly used to force OString operator+ working with operands that otherwise would @@ -1684,11 +1684,6 @@ inline std::basic_ostream<charT, traits> & operator <<( { return stream << OString( concat ); } -#else -// non-RTL_FAST_STRING needs this to compile -/// @cond INTERNAL -typedef OString OStringLiteral; -/// @endcond #endif @@ -1752,7 +1747,7 @@ typedef rtlunittest::OString OString; #undef RTL_STRING_CONST_FUNCTION #endif -#ifdef LIBO_INTERNAL_ONLY +#if defined LIBO_INTERNAL_ONLY && !defined RTL_STRING_UNITTEST using ::rtl::OString; using ::rtl::OStringHash; using ::rtl::OStringLiteral; diff --git a/include/rtl/stringconcat.hxx b/include/rtl/stringconcat.hxx index 089948c..a74dd77 100644 --- a/include/rtl/stringconcat.hxx +++ b/include/rtl/stringconcat.hxx @@ -14,7 +14,7 @@ #include <string.h> -#ifdef RTL_FAST_STRING +#ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" #ifdef RTL_STRING_UNITTEST #define rtl rtlunittest diff --git a/include/rtl/stringutils.hxx b/include/rtl/stringutils.hxx index 1f1e53b..fb11545 100644 --- a/include/rtl/stringutils.hxx +++ b/include/rtl/stringutils.hxx @@ -13,12 +13,6 @@ #include <sal/config.h> #include <sal/types.h> -// This feature is not part of public API and is meant to be used only internally by LibreOffice. -#ifdef LIBO_INTERNAL_ONLY -// Enable fast string concatenation. -#define RTL_FAST_STRING -#endif - // The unittest uses slightly different code to help check that the proper // calls are made. The class is put into a different namespace to make // sure the compiler generates a different (if generating also non-inline) diff --git a/include/rtl/ustrbuf.hxx b/include/rtl/ustrbuf.hxx index 2cefab8..4c8243f 100644 --- a/include/rtl/ustrbuf.hxx +++ b/include/rtl/ustrbuf.hxx @@ -30,7 +30,7 @@ #include <rtl/stringutils.hxx> #include <sal/types.h> -#ifdef RTL_FAST_STRING +#ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" #include <rtl/stringconcat.hxx> #endif @@ -184,7 +184,7 @@ public: } #endif -#ifdef RTL_FAST_STRING +#ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" /** @overload @internal @@ -493,7 +493,7 @@ public: return *this; } -#ifdef RTL_FAST_STRING +#ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" /** @overload @internal @@ -1395,21 +1395,6 @@ public: return OUStringBuffer( pNew, count + 16 ); } -#ifdef LIBO_INTERNAL_ONLY - // This is to complement the RTL_FAST_STRING operator+, which allows any combination of valid operands, - // even two buffers. It's intentional it returns OUString, just like the operator+ would in the fast variant. -#ifndef RTL_FAST_STRING - /** - @internal - @since LibreOffice 4.1 - */ - friend OUString operator+( const OUStringBuffer& str1, const OUStringBuffer& str2 ) - { - return OUString( str1.pData ).concat( str2.pData ); - } -#endif -#endif - private: OUStringBuffer( rtl_uString * value, const sal_Int32 capacity ) { @@ -1428,7 +1413,7 @@ private: sal_Int32 nCapacity; }; -#ifdef RTL_FAST_STRING +#ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" /** @internal */ @@ -1451,7 +1436,7 @@ typedef rtlunittest::OUStringBuffer OUStringBuffer; } #endif -#ifdef LIBO_INTERNAL_ONLY +#if defined LIBO_INTERNAL_ONLY && !defined RTL_STRING_UNITTEST using ::rtl::OUStringBuffer; #endif diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx index 1dab50f..2202415 100644 --- a/include/rtl/ustring.hxx +++ b/include/rtl/ustring.hxx @@ -33,7 +33,7 @@ #include <rtl/textenc.h> #include <sal/log.hxx> -#ifdef RTL_FAST_STRING +#ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" #include <rtl/stringconcat.hxx> #endif @@ -53,7 +53,7 @@ namespace rtl #undef rtl #endif -#if defined RTL_FAST_STRING +#if defined LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" /// @cond INTERNAL /** @@ -250,7 +250,7 @@ public: } #endif -#ifdef RTL_FAST_STRING +#ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" /// @cond INTERNAL /** New string from an 8-Bit string literal that is expected to contain only @@ -324,7 +324,7 @@ public: } } -#ifdef RTL_FAST_STRING +#ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" /** @overload @internal @@ -400,7 +400,7 @@ public: return *this; } -#if defined RTL_FAST_STRING +#if defined LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" /// @cond INTERNAL /** Assign a new string from a single ASCII character literal. @@ -425,7 +425,7 @@ public: return *this; } -#ifdef RTL_FAST_STRING +#ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" /** @overload @internal @@ -1575,7 +1575,7 @@ public: return OUString( pNew, SAL_NO_ACQUIRE ); } -#ifndef RTL_FAST_STRING +#ifndef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" friend OUString operator+( const OUString& rStr1, const OUString& rStr2 ) { return rStr1.concat( rStr2 ); @@ -2413,7 +2413,7 @@ public: } }; -#if defined RTL_FAST_STRING +#if defined LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" /// @cond INTERNAL /** Compare a string and an ASCII character literal for equality. @@ -2436,12 +2436,6 @@ template<char C> bool operator !=( return !(string == literal); } -/// @endcond -#endif - -/* ======================================================================= */ - -#ifdef RTL_FAST_STRING /** @internal */ @@ -2487,10 +2481,7 @@ inline std::basic_ostream<charT, traits> & operator <<( { return stream << OUString( concat ); } -#else -// non-RTL_FAST_STRING needs this to compile -/// @cond INTERNAL -typedef OUString OUStringLiteral; + /// @endcond #endif @@ -2596,16 +2587,14 @@ typedef rtlunittest::OUString OUString; // In internal code, allow to use classes like OUString without having to // explicitly refer to the rtl namespace, which is kind of superfluous given // that OUString itself is namespaced by its OU prefix: -#ifdef LIBO_INTERNAL_ONLY +#if defined LIBO_INTERNAL_ONLY && !defined RTL_STRING_UNITTEST using ::rtl::OUString; using ::rtl::OUStringHash; using ::rtl::OStringToOUString; using ::rtl::OUStringToOString; using ::rtl::OUStringLiteral; -#if defined RTL_FAST_STRING using ::rtl::OUStringLiteral1; #endif -#endif #endif /* _RTL_USTRING_HXX */ diff --git a/sal/qa/rtl/strings/test_ostring_concat.cxx b/sal/qa/rtl/strings/test_ostring_concat.cxx index da43645..4eb64d3 100644 --- a/sal/qa/rtl/strings/test_ostring_concat.cxx +++ b/sal/qa/rtl/strings/test_ostring_concat.cxx @@ -52,40 +52,35 @@ CPPUNIT_TEST(checkInvalid); CPPUNIT_TEST_SUITE_END(); }; -#ifdef RTL_FAST_STRING -#define TYPES_ASSERT_EQUAL( a, b ) CPPUNIT_ASSERT_EQUAL( a, b ) -#else -#define TYPES_ASSERT_EQUAL( a, b ) -#endif void test::ostring::StringConcat::checkConcat() { // All the extra () are to protect commas against being treated as separators of macro arguments. CPPUNIT_ASSERT_EQUAL( OString(), OString(OString() + OString())); CPPUNIT_ASSERT_EQUAL( OString( "foobar" ), OString( OString( "foo" ) + OString( "bar" ))); - TYPES_ASSERT_EQUAL(( typeid( OStringConcat< OString, OString > )), typeid( OString( "foo" ) + OString( "bar" ))); + CPPUNIT_ASSERT_EQUAL(( typeid( OStringConcat< OString, OString > )), typeid( OString( "foo" ) + OString( "bar" ))); CPPUNIT_ASSERT_EQUAL( OString( "foobar" ), OString( OString( "foo" ) + "bar" )); - TYPES_ASSERT_EQUAL(( typeid( OStringConcat< OString, const char[ 4 ] > )), typeid( OString( "foo" ) + "bar" )); + CPPUNIT_ASSERT_EQUAL(( typeid( OStringConcat< OString, const char[ 4 ] > )), typeid( OString( "foo" ) + "bar" )); CPPUNIT_ASSERT_EQUAL( OString( "foobarbaz" ), OString( OString( "foo" ) + "bar" + "baz" )); - TYPES_ASSERT_EQUAL(( typeid( OStringConcat< OStringConcat< OString, const char[ 4 ] >, const char[ 4 ] > )), typeid( OString( "foo" ) + "bar" + "baz" )); + CPPUNIT_ASSERT_EQUAL(( typeid( OStringConcat< OStringConcat< OString, const char[ 4 ] >, const char[ 4 ] > )), typeid( OString( "foo" ) + "bar" + "baz" )); CPPUNIT_ASSERT_EQUAL( OString( "foobar" ), OString( OStringLiteral( "foo" ) + "bar" )); - TYPES_ASSERT_EQUAL(( typeid( OStringConcat< OStringLiteral, const char[ 4 ] > )), typeid( OStringLiteral( "foo" ) + "bar" )); + CPPUNIT_ASSERT_EQUAL(( typeid( OStringConcat< OStringLiteral, const char[ 4 ] > )), typeid( OStringLiteral( "foo" ) + "bar" )); CPPUNIT_ASSERT_EQUAL( OString( "foobar" ), OString( OStringLiteral( "foo" ) + (const char*)"bar" )); - TYPES_ASSERT_EQUAL(( typeid( OStringConcat< OStringLiteral, const char* > )), typeid( OStringLiteral( "foo" ) + (const char*)"bar" )); + CPPUNIT_ASSERT_EQUAL(( typeid( OStringConcat< OStringLiteral, const char* > )), typeid( OStringLiteral( "foo" ) + (const char*)"bar" )); const char d1[] = "xyz"; char d2[] = "abc"; const char* d3 = d1; char* d4 = d2; CPPUNIT_ASSERT_EQUAL( OString( "fooxyz" ), OString( OString( "foo" ) + d1 )); - TYPES_ASSERT_EQUAL(( typeid( OStringConcat< OString, const char[ 4 ] > )), typeid( OString( "foo" ) + d1 )); + CPPUNIT_ASSERT_EQUAL(( typeid( OStringConcat< OString, const char[ 4 ] > )), typeid( OString( "foo" ) + d1 )); CPPUNIT_ASSERT_EQUAL( OString( "fooabc" ), OString( OString( "foo" ) + d2 )); - TYPES_ASSERT_EQUAL(( typeid( OStringConcat< OString, char[ 4 ] > )), typeid( OString( "foo" ) + d2 )); + CPPUNIT_ASSERT_EQUAL(( typeid( OStringConcat< OString, char[ 4 ] > )), typeid( OString( "foo" ) + d2 )); CPPUNIT_ASSERT_EQUAL( OString( "fooxyz" ), OString( OString( "foo" ) + d3 )); - TYPES_ASSERT_EQUAL(( typeid( OStringConcat< OString, const char* > )), typeid( OString( "foo" ) + d3 )); + CPPUNIT_ASSERT_EQUAL(( typeid( OStringConcat< OString, const char* > )), typeid( OString( "foo" ) + d3 )); CPPUNIT_ASSERT_EQUAL( OString( "fooabc" ), OString( OString( "foo" ) + d4 )); - TYPES_ASSERT_EQUAL(( typeid( OStringConcat< OString, char* > )), typeid( OString( "foo" ) + d4 )); + CPPUNIT_ASSERT_EQUAL(( typeid( OStringConcat< OString, char* > )), typeid( OString( "foo" ) + d4 )); #ifdef __GNUC__ CPPUNIT_ASSERT_EQUAL( OString( "foobar" ), OString( OStringBuffer( "foo" ) + OString( "bar" ))); - TYPES_ASSERT_EQUAL(( typeid( OStringConcat< OStringBuffer, OString > )), typeid( OStringBuffer( "foo" ) + OString( "bar" ))); + CPPUNIT_ASSERT_EQUAL(( typeid( OStringConcat< OStringBuffer, OString > )), typeid( OStringBuffer( "foo" ) + OString( "bar" ))); #endif } @@ -145,7 +140,6 @@ void test::ostring::StringConcat::checkAppend() void test::ostring::StringConcat::checkInvalid() { -#ifdef RTL_FAST_STRING CPPUNIT_ASSERT( !INVALID_CONCAT( OString() + OString())); CPPUNIT_ASSERT( INVALID_CONCAT( OString( "a" ) + OUString( "b" ))); CPPUNIT_ASSERT( INVALID_CONCAT( OString( "a" ) + OUStringBuffer( "b" ))); @@ -155,7 +149,6 @@ void test::ostring::StringConcat::checkInvalid() rtl_uString* rus = NULL; CPPUNIT_ASSERT( INVALID_CONCAT( OUString( "b" ) + rs )); CPPUNIT_ASSERT( INVALID_CONCAT( OUString( "b" ) + rus )); -#endif } }} // namespace diff --git a/sal/qa/rtl/strings/test_oustring_concat.cxx b/sal/qa/rtl/strings/test_oustring_concat.cxx index 251460e..ab0e4e6 100644 --- a/sal/qa/rtl/strings/test_oustring_concat.cxx +++ b/sal/qa/rtl/strings/test_oustring_concat.cxx @@ -52,28 +52,23 @@ CPPUNIT_TEST(checkInvalid); CPPUNIT_TEST_SUITE_END(); }; -#ifdef RTL_FAST_STRING -#define TYPES_ASSERT_EQUAL( a, b ) CPPUNIT_ASSERT_EQUAL( a, b ) -#else -#define TYPES_ASSERT_EQUAL( a, b ) -#endif void test::oustring::StringConcat::checkConcat() { // All the extra () are to protect commas against being treated as separators of macro arguments. CPPUNIT_ASSERT_EQUAL( OUString(), OUString(OUString() + OUString())); CPPUNIT_ASSERT_EQUAL( OUString( "foobar" ), OUString( OUString( "foo" ) + OUString( "bar" ))); - TYPES_ASSERT_EQUAL(( typeid( OUStringConcat< OUString, OUString > )), typeid( OUString( "foo" ) + OUString( "bar" ))); + CPPUNIT_ASSERT_EQUAL(( typeid( OUStringConcat< OUString, OUString > )), typeid( OUString( "foo" ) + OUString( "bar" ))); CPPUNIT_ASSERT_EQUAL( OUString( "foobar" ), OUString( OUString( "foo" ) + "bar" )); - TYPES_ASSERT_EQUAL(( typeid( OUStringConcat< OUString, const char[ 4 ] > )), typeid( OUString( "foo" ) + "bar" )); + CPPUNIT_ASSERT_EQUAL(( typeid( OUStringConcat< OUString, const char[ 4 ] > )), typeid( OUString( "foo" ) + "bar" )); CPPUNIT_ASSERT_EQUAL( OUString( "foobarbaz" ), OUString( OUString( "foo" ) + "bar" + "baz" )); - TYPES_ASSERT_EQUAL(( typeid( OUStringConcat< OUStringConcat< OUString, const char[ 4 ] >, const char[ 4 ] > )), typeid( OUString( "foo" ) + "bar" + "baz" )); + CPPUNIT_ASSERT_EQUAL(( typeid( OUStringConcat< OUStringConcat< OUString, const char[ 4 ] >, const char[ 4 ] > )), typeid( OUString( "foo" ) + "bar" + "baz" )); CPPUNIT_ASSERT_EQUAL( OUString( "foobar" ), OUString( OUStringLiteral( "foo" ) + "bar" )); - TYPES_ASSERT_EQUAL(( typeid( OUStringConcat< OUStringLiteral, const char[ 4 ] > )), typeid( OUStringLiteral( "foo" ) + "bar" )); + CPPUNIT_ASSERT_EQUAL(( typeid( OUStringConcat< OUStringLiteral, const char[ 4 ] > )), typeid( OUStringLiteral( "foo" ) + "bar" )); const char d1[] = "xyz"; CPPUNIT_ASSERT_EQUAL( OUString( "fooxyz" ), OUString( OUString( "foo" ) + d1 )); - TYPES_ASSERT_EQUAL(( typeid( OUStringConcat< OUString, const char[ 4 ] > )), typeid( OUString( "foo" ) + d1 )); + CPPUNIT_ASSERT_EQUAL(( typeid( OUStringConcat< OUString, const char[ 4 ] > )), typeid( OUString( "foo" ) + d1 )); CPPUNIT_ASSERT_EQUAL( OUString( "foobar" ), OUString( OUStringBuffer( "foo" ) + OUString( "bar" ))); - TYPES_ASSERT_EQUAL(( typeid( OUStringConcat< OUStringBuffer, OUString > )), typeid( OUStringBuffer( "foo" ) + OUString( "bar" ))); + CPPUNIT_ASSERT_EQUAL(( typeid( OUStringConcat< OUStringBuffer, OUString > )), typeid( OUStringBuffer( "foo" ) + OUString( "bar" ))); } void test::oustring::StringConcat::checkEnsureCapacity() @@ -136,7 +131,6 @@ void test::oustring::StringConcat::checkAppend() void test::oustring::StringConcat::checkInvalid() { -#ifdef RTL_FAST_STRING CPPUNIT_ASSERT( !INVALID_CONCAT( OUString() + OUString())); CPPUNIT_ASSERT( INVALID_CONCAT( OUString( "a" ) + OString( "b" ))); CPPUNIT_ASSERT( INVALID_CONCAT( OUString( "a" ) + OStringBuffer( "b" ))); @@ -150,8 +144,6 @@ void test::oustring::StringConcat::checkInvalid() rtl_uString* rus = NULL; CPPUNIT_ASSERT( INVALID_CONCAT( OUString( "b" ) + rs )); CPPUNIT_ASSERT( INVALID_CONCAT( OUString( "b" ) + rus )); -#endif - } }} // namespace commit d5c86be04ee4ab4dba14bc70adc91bf5888dc31c Author: Stephan Bergmann <[email protected]> Date: Fri Dec 19 11:43:51 2014 +0100 No need for RTL_USING in addition to LIBO_INTERNAL_ONLY Change-Id: Iaa65658aed6bb4abb20a4d95dc9c6caf7c1c764b diff --git a/include/rtl/strbuf.hxx b/include/rtl/strbuf.hxx index b135298..22aa20b 100644 --- a/include/rtl/strbuf.hxx +++ b/include/rtl/strbuf.hxx @@ -992,7 +992,7 @@ typedef rtlunittest::OStringBuffer OStringBuffer; #undef RTL_STRING_CONST_FUNCTION #endif -#ifdef RTL_USING +#ifdef LIBO_INTERNAL_ONLY using ::rtl::OStringBuffer; #endif diff --git a/include/rtl/string.hxx b/include/rtl/string.hxx index 0f65c43..d11b18b 100644 --- a/include/rtl/string.hxx +++ b/include/rtl/string.hxx @@ -1752,7 +1752,7 @@ typedef rtlunittest::OString OString; #undef RTL_STRING_CONST_FUNCTION #endif -#ifdef RTL_USING +#ifdef LIBO_INTERNAL_ONLY using ::rtl::OString; using ::rtl::OStringHash; using ::rtl::OStringLiteral; diff --git a/include/rtl/ustrbuf.hxx b/include/rtl/ustrbuf.hxx index 8bba429..2cefab8 100644 --- a/include/rtl/ustrbuf.hxx +++ b/include/rtl/ustrbuf.hxx @@ -1451,7 +1451,7 @@ typedef rtlunittest::OUStringBuffer OUStringBuffer; } #endif -#ifdef RTL_USING +#ifdef LIBO_INTERNAL_ONLY using ::rtl::OUStringBuffer; #endif diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx index 0d4a715..1dab50f 100644 --- a/include/rtl/ustring.hxx +++ b/include/rtl/ustring.hxx @@ -2593,11 +2593,10 @@ typedef rtlunittest::OUString OUString; } #endif -// RTL_USING is defined by gbuild for all modules except those with stable public API -// (as listed in ure/source/README). It allows to use classes like OUString without -// having to explicitly refer to the rtl namespace, which is kind of superfluous -// given that OUString itself is namespaced by its OU prefix. -#ifdef RTL_USING +// In internal code, allow to use classes like OUString without having to +// explicitly refer to the rtl namespace, which is kind of superfluous given +// that OUString itself is namespaced by its OU prefix: +#ifdef LIBO_INTERNAL_ONLY using ::rtl::OUString; using ::rtl::OUStringHash; using ::rtl::OStringToOUString; diff --git a/ios/shared/ios_sharedlo/objective_c/utils/MLOCommon.h b/ios/shared/ios_sharedlo/objective_c/utils/MLOCommon.h index eb87735..1f9e8a5 100644 --- a/ios/shared/ios_sharedlo/objective_c/utils/MLOCommon.h +++ b/ios/shared/ios_sharedlo/objective_c/utils/MLOCommon.h @@ -27,7 +27,6 @@ static const BOOL #define IGNORE_ARG(X) ((void) X) #define CPPU_ENV gcc3 -#define RTL_USING #define HAVE_GCC_VISIBILITY_FEATURE #import "time.h" diff --git a/mysqlc/source/mysqlc_connection.cxx b/mysqlc/source/mysqlc_connection.cxx index 00de2bd..bf134e5 100644 --- a/mysqlc/source/mysqlc_connection.cxx +++ b/mysqlc/source/mysqlc_connection.cxx @@ -90,7 +90,7 @@ void SAL_CALL OConnection::release() relase_ChildImpl(); } -void OConnection::construct(const OUString& url, const Sequence< PropertyValue >& info) +void OConnection::construct(const rtl::OUString& url, const Sequence< PropertyValue >& info) throw(SQLException) { OSL_TRACE("OConnection::construct"); @@ -98,10 +98,10 @@ void OConnection::construct(const OUString& url, const Sequence< PropertyValue > sal_Int32 nIndex; bool bEmbedded = false; - OUString token; - OUString aHostName("localhost"); + rtl::OUString token; + rtl::OUString aHostName("localhost"); sal_Int32 nPort = 3306; - OUString aDbName; + rtl::OUString aDbName; m_settings.encoding = m_rDriver.getDefaultEncoding(); m_settings.quoteIdentifier.clear(); @@ -120,7 +120,7 @@ void OConnection::construct(const OUString& url, const Sequence< PropertyValue > token = url.getToken(0, '/', nIndex); if (!token.isEmpty()) { sal_Int32 nIndex1 = 0; - OUString hostandport = token.getToken(0,':', nIndex1); + rtl::OUString hostandport = token.getToken(0,':', nIndex1); if (!hostandport.isEmpty()) { aHostName = hostandport; hostandport = token.getToken(0, ':', nIndex1); @@ -137,7 +137,7 @@ void OConnection::construct(const OUString& url, const Sequence< PropertyValue > // get user and password for mysql connection const PropertyValue *pIter = info.getConstArray(); const PropertyValue *pEnd = pIter + info.getLength(); - OUString aUser, aPass, sUnixSocket, sNamedPipe; + rtl::OUString aUser, aPass, sUnixSocket, sNamedPipe; bool unixSocketPassed = false; bool namedPipePassed = false; @@ -163,20 +163,20 @@ void OConnection::construct(const OUString& url, const Sequence< PropertyValue > if (!bEmbedded) { try { sql::ConnectOptionsMap connProps; - std::string host_str = OUStringToOString(aHostName, m_settings.encoding).getStr(); - std::string user_str = OUStringToOString(aUser, m_settings.encoding).getStr(); - std::string pass_str = OUStringToOString(aPass, m_settings.encoding).getStr(); - std::string schema_str = OUStringToOString(aDbName, m_settings.encoding).getStr(); + std::string host_str = rtl::OUStringToOString(aHostName, m_settings.encoding).getStr(); + std::string user_str = rtl::OUStringToOString(aUser, m_settings.encoding).getStr(); + std::string pass_str = rtl::OUStringToOString(aPass, m_settings.encoding).getStr(); + std::string schema_str = rtl::OUStringToOString(aDbName, m_settings.encoding).getStr(); connProps["hostName"] = sql::ConnectPropertyVal(host_str); connProps["userName"] = sql::ConnectPropertyVal(user_str); connProps["password"] = sql::ConnectPropertyVal(pass_str); connProps["schema"] = sql::ConnectPropertyVal(schema_str); connProps["port"] = sql::ConnectPropertyVal((int)(nPort)); if (unixSocketPassed) { - sql::SQLString socket_str = OUStringToOString(sUnixSocket, m_settings.encoding).getStr(); + sql::SQLString socket_str = rtl::OUStringToOString(sUnixSocket, m_settings.encoding).getStr(); connProps["socket"] = socket_str; } else if (namedPipePassed) { - sql::SQLString pipe_str = OUStringToOString(sNamedPipe, m_settings.encoding).getStr(); + sql::SQLString pipe_str = rtl::OUStringToOString(sNamedPipe, m_settings.encoding).getStr(); connProps["socket"] = pipe_str; } @@ -195,14 +195,14 @@ void OConnection::construct(const OUString& url, const Sequence< PropertyValue > } m_settings.schema = aDbName; - OSL_TRACE("%s", OUStringToOString(m_settings.schema, getConnectionEncoding()).getStr()); + OSL_TRACE("%s", rtl::OUStringToOString(m_settings.schema, getConnectionEncoding()).getStr()); // Check if the server is 4.1 or above if (this->getMysqlVersion() < 40100) { throw SQLException( "MariaDB LibreOffice Connector requires MySQL Server 4.1 or above", *this, - OUString(), + rtl::OUString(), 0, Any()); } @@ -211,20 +211,20 @@ void OConnection::construct(const OUString& url, const Sequence< PropertyValue > stmt->executeUpdate("SET NAMES utf8"); } -OUString OConnection::getImplementationName() throw (css::uno::RuntimeException, std::exception) +rtl::OUString OConnection::getImplementationName() throw (css::uno::RuntimeException, std::exception) { - return OUString("com.sun.star.sdbc.drivers.mysqlc.OConnection"); + return rtl::OUString("com.sun.star.sdbc.drivers.mysqlc.OConnection"); } -css::uno::Sequence<OUString> OConnection::getSupportedServiceNames() +css::uno::Sequence<rtl::OUString> OConnection::getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) { - css::uno::Sequence<OUString> s(1); + css::uno::Sequence<rtl::OUString> s(1); s[0] = "com.sun.star.sdbc.Connection"; return s; } -sal_Bool OConnection::supportsService(OUString const & ServiceName) +sal_Bool OConnection::supportsService(rtl::OUString const & ServiceName) throw (css::uno::RuntimeException, std::exception) { return cppu::supportsService(this, ServiceName); @@ -250,20 +250,20 @@ Reference< XStatement > SAL_CALL OConnection::createStatement() return xReturn; } -Reference< XPreparedStatement > SAL_CALL OConnection::prepareStatement(const OUString& _sSql) +Reference< XPreparedStatement > SAL_CALL OConnection::prepareStatement(const rtl::OUString& _sSql) throw(SQLException, RuntimeException, std::exception) { OSL_TRACE("OConnection::prepareStatement"); MutexGuard aGuard(m_aMutex); checkDisposed(OConnection_BASE::rBHelper.bDisposed); - const OUString sSqlStatement = transFormPreparedStatement( _sSql ); + const rtl::OUString sSqlStatement = transFormPreparedStatement( _sSql ); Reference< XPreparedStatement > xStatement; try { // create a statement // the statement can only be executed more than once xStatement = new OPreparedStatement(this, - m_settings.cppConnection->prepareStatement(OUStringToOString(sSqlStatement, getConnectionEncoding()).getStr())); + m_settings.cppConnection->prepareStatement(rtl::OUStringToOString(sSqlStatement, getConnectionEncoding()).getStr())); m_aStatements.push_back( WeakReferenceHelper( xStatement ) ); } catch (const sql::SQLException & e) { mysqlc_sdbc_driver::translateAndThrow(e, *this, getConnectionEncoding()); @@ -271,7 +271,7 @@ Reference< XPreparedStatement > SAL_CALL OConnection::prepareStatement(const OUS return xStatement; } -Reference< XPreparedStatement > SAL_CALL OConnection::prepareCall(const OUString& /*_sSql*/ ) +Reference< XPreparedStatement > SAL_CALL OConnection::prepareCall(const rtl::OUString& /*_sSql*/ ) throw(SQLException, RuntimeException, std::exception) { OSL_TRACE("OConnection::prepareCall"); @@ -282,14 +282,14 @@ Reference< XPreparedStatement > SAL_CALL OConnection::prepareCall(const OUString return Reference< XPreparedStatement >(); } -OUString SAL_CALL OConnection::nativeSQL(const OUString& _sSql) +rtl::OUString SAL_CALL OConnection::nativeSQL(const rtl::OUString& _sSql) throw(SQLException, RuntimeException, std::exception) { OSL_TRACE("OConnection::nativeSQL"); MutexGuard aGuard(m_aMutex); - const OUString sSqlStatement = transFormPreparedStatement( _sSql ); - OUString sNativeSQL; + const rtl::OUString sSqlStatement = transFormPreparedStatement( _sSql ); + rtl::OUString sNativeSQL; try { sNativeSQL = mysqlc_sdbc_driver::convert(m_settings.cppConnection->nativeSQL(mysqlc_sdbc_driver::convert(sSqlStatement, getConnectionEncoding())), getConnectionEncoding()); @@ -408,7 +408,7 @@ sal_Bool SAL_CALL OConnection::isReadOnly() return (m_settings.readOnly); } -void SAL_CALL OConnection::setCatalog(const OUString& catalog) +void SAL_CALL OConnection::setCatalog(const rtl::OUString& catalog) throw(SQLException, RuntimeException, std::exception) { OSL_TRACE("OConnection::setCatalog"); @@ -416,21 +416,21 @@ void SAL_CALL OConnection::setCatalog(const OUString& catalog) checkDisposed(OConnection_BASE::rBHelper.bDisposed); try { -// m_settings.cppConnection->setCatalog(OUStringToOString(catalog, m_settings.encoding).getStr()); - m_settings.cppConnection->setSchema(OUStringToOString(catalog, getConnectionEncoding()).getStr()); +// m_settings.cppConnection->setCatalog(rtl::OUStringToOString(catalog, m_settings.encoding).getStr()); + m_settings.cppConnection->setSchema(rtl::OUStringToOString(catalog, getConnectionEncoding()).getStr()); } catch (sql::SQLException & e) { mysqlc_sdbc_driver::translateAndThrow(e, *this, getConnectionEncoding()); } } -OUString SAL_CALL OConnection::getCatalog() +rtl::OUString SAL_CALL OConnection::getCatalog() throw(SQLException, RuntimeException, std::exception) { OSL_TRACE("OConnection::getCatalog"); MutexGuard aGuard(m_aMutex); checkDisposed(OConnection_BASE::rBHelper.bDisposed); - OUString catalog; + rtl::OUString catalog; try { catalog = mysqlc_sdbc_driver::convert(m_settings.cppConnection->getSchema(), getConnectionEncoding()); } catch (const sql::SQLException & e) { @@ -583,15 +583,15 @@ void OConnection::disposing() /* ToDo - upcast the connection to MySQL_Connection and use ::getSessionVariable() */ -OUString OConnection::getMysqlVariable(const char *varname) +rtl::OUString OConnection::getMysqlVariable(const char *varname) throw(SQLException, RuntimeException) { OSL_TRACE("OConnection::getMysqlVariable"); MutexGuard aGuard(m_aMutex); checkDisposed(OConnection_BASE::rBHelper.bDisposed); - OUString ret; - OUStringBuffer aStatement; + rtl::OUString ret; + rtl::OUStringBuffer aStatement; aStatement.appendAscii( "SHOW SESSION VARIABLES LIKE '" ); aStatement.appendAscii( varname ); aStatement.append( '\'' ); @@ -629,12 +629,12 @@ sal_Int32 OConnection::getMysqlVersion() } // TODO: Not used -//sal_Int32 OConnection::sdbcColumnType(OUString typeName) +//sal_Int32 OConnection::sdbcColumnType(rtl::OUString typeName) //{ // OSL_TRACE("OConnection::sdbcColumnType"); // int i = 0; // while (mysqlc_types[i].typeName) { -// if (OUString::createFromAscii(mysqlc_types[i].typeName).equals( +// if (rtl::OUString::createFromAscii(mysqlc_types[i].typeName).equals( // typeName.toAsciiUpperCase())) // { // return mysqlc_types[i].dataType; @@ -644,16 +644,16 @@ sal_Int32 OConnection::getMysqlVersion() // return 0; //} -OUString OConnection::transFormPreparedStatement(const OUString& _sSQL) +rtl::OUString OConnection::transFormPreparedStatement(const rtl::OUString& _sSQL) { - OUString sSqlStatement = _sSQL; + rtl::OUString sSqlStatement = _sSQL; if ( !m_xParameterSubstitution.is() ) { try { Sequence< Any > aArgs(1); Reference< XConnection> xCon = this; - aArgs[0] <<= NamedValue(OUString("ActiveConnection"), makeAny(xCon)); + aArgs[0] <<= NamedValue(rtl::OUString("ActiveConnection"), makeAny(xCon)); - m_xParameterSubstitution.set(m_rDriver.getFactory()->createInstanceWithArguments(OUString("org.openoffice.comp.helper.ParameterSubstitution"),aArgs),UNO_QUERY); + m_xParameterSubstitution.set(m_rDriver.getFactory()->createInstanceWithArguments(rtl::OUString("org.openoffice.comp.helper.ParameterSubstitution"),aArgs),UNO_QUERY); } catch(const Exception&) {} } if ( m_xParameterSubstitution.is() ) { diff --git a/mysqlc/source/mysqlc_connection.hxx b/mysqlc/source/mysqlc_connection.hxx index 5a20051..8d4c0b6 100644 --- a/mysqlc/source/mysqlc_connection.hxx +++ b/mysqlc/source/mysqlc_connection.hxx @@ -74,9 +74,9 @@ namespace connectivity { rtl_TextEncoding encoding; std::unique_ptr<sql::Connection> cppConnection; - OUString schema; - OUString quoteIdentifier; - OUString connectionURL; + rtl::OUString schema; + rtl::OUString quoteIdentifier; + rtl::OUString connectionURL; bool readOnly; }; @@ -110,8 +110,8 @@ namespace connectivity // for this Connection SQLWarning m_aLastWarning; // Last SQLWarning generated by an operation - OUString m_aURL; // URL of connection - OUString m_sUser; // the user name + rtl::OUString m_aURL; // URL of connection + rtl::OUString m_sUser; // the user name MysqlCDriver& m_rDriver; // Pointer to the owning driver object sql::Driver* cppDriver; @@ -122,13 +122,13 @@ namespace connectivity void buildTypeInfo() throw(SQLException); public: - OUString getMysqlVariable(const char *varname) + rtl::OUString getMysqlVariable(const char *varname) throw(SQLException, RuntimeException); sal_Int32 getMysqlVersion() throw(SQLException, RuntimeException); - virtual void construct(const OUString& url,const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& info) + virtual void construct(const rtl::OUString& url,const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& info) throw(SQLException); OConnection(MysqlCDriver& _rDriver, sql::Driver * cppDriver); @@ -147,14 +147,14 @@ namespace connectivity virtual void SAL_CALL release() throw() SAL_OVERRIDE; // XServiceInfo - virtual OUString SAL_CALL getImplementationName() + virtual rtl::OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual sal_Bool SAL_CALL supportsService( - OUString const & ServiceName) throw (css::uno::RuntimeException, std::exception) + rtl::OUString const & ServiceName) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual css::uno::Sequence<OUString> SAL_CALL + virtual css::uno::Sequence<rtl::OUString> SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; @@ -162,13 +162,13 @@ namespace connectivity my_XStatementRef SAL_CALL createStatement() throw(SQLException, RuntimeException, std::exception) SAL_OVERRIDE; - my_XPreparedStatementRef SAL_CALL prepareStatement(const OUString& sql) + my_XPreparedStatementRef SAL_CALL prepareStatement(const rtl::OUString& sql) throw(SQLException, RuntimeException, std::exception) SAL_OVERRIDE; - my_XPreparedStatementRef SAL_CALL prepareCall(const OUString& sql) + my_XPreparedStatementRef SAL_CALL prepareCall(const rtl::OUString& sql) throw(SQLException, RuntimeException, std::exception) SAL_OVERRIDE; - OUString SAL_CALL nativeSQL(const OUString& sql) + rtl::OUString SAL_CALL nativeSQL(const rtl::OUString& sql) throw(SQLException, RuntimeException, std::exception) SAL_OVERRIDE; void SAL_CALL setAutoCommit(sal_Bool autoCommit) @@ -195,10 +195,10 @@ namespace connectivity sal_Bool SAL_CALL isReadOnly() throw(SQLException, RuntimeException, std::exception) SAL_OVERRIDE; - void SAL_CALL setCatalog(const OUString& catalog) + void SAL_CALL setCatalog(const rtl::OUString& catalog) throw(SQLException, RuntimeException, std::exception) SAL_OVERRIDE; - OUString SAL_CALL getCatalog() + rtl::OUString SAL_CALL getCatalog() throw(SQLException, RuntimeException, std::exception) SAL_OVERRIDE; void SAL_CALL setTransactionIsolation(sal_Int32 level) @@ -222,19 +222,19 @@ namespace connectivity throw(SQLException, RuntimeException, std::exception) SAL_OVERRIDE; // TODO: Not used - //sal_Int32 sdbcColumnType(OUString typeName); + //sal_Int32 sdbcColumnType(rtl::OUString typeName); inline const ConnectionSettings& getConnectionSettings() const { return m_settings; } - OUString transFormPreparedStatement(const OUString& _sSQL); + rtl::OUString transFormPreparedStatement(const rtl::OUString& _sSQL); // should we use the catalog on filebased databases inline bool isCatalogUsed() const { return m_bUseCatalog; } - inline OUString getUserName() const { return m_sUser; } + inline rtl::OUString getUserName() const { return m_sUser; } inline const MysqlCDriver& getDriver() const { return m_rDriver;} inline rtl_TextEncoding getTextEncoding() const { return m_settings.encoding; } }; /* OConnection */ // TODO: Not used. - //inline OUString getPattern(OUString p) { return (p.getLength()) ? p : ASC2OU("%"); } + //inline rtl::OUString getPattern(rtl::OUString p) { return (p.getLength()) ? p : ASC2OU("%"); } } /* mysqlc */ } /* connectivity */ #endif // INCLUDED_MYSQLC_SOURCE_MYSQLC_CONNECTION_HXX diff --git a/mysqlc/source/mysqlc_databasemetadata.cxx b/mysqlc/source/mysqlc_databasemetadata.cxx index 5fc49b0..9aa9d93 100644 --- a/mysqlc/source/mysqlc_databasemetadata.cxx +++ b/mysqlc/source/mysqlc_databasemetadata.cxx @@ -97,10 +97,10 @@ ODatabaseMetaData::~ODatabaseMetaData() OSL_TRACE("ODatabaseMetaData::~ODatabaseMetaData"); } -OUString ODatabaseMetaData::impl_getStringMetaData(const sal_Char* _methodName, const std::string& (sql::DatabaseMetaData::*_Method)() ) +rtl::OUString ODatabaseMetaData::impl_getStringMetaData(const sal_Char* _methodName, const std::string& (sql::DatabaseMetaData::*_Method)() ) { OSL_TRACE( "mysqlc::ODatabaseMetaData::%s", _methodName); - OUString stringMetaData; + rtl::OUString stringMetaData; try { stringMetaData = mysqlc_sdbc_driver::convert((meta->*_Method)(), m_rConnection.getConnectionEncoding()); } catch (const sql::MethodNotImplementedException &) { @@ -113,10 +113,10 @@ OUString ODatabaseMetaData::impl_getStringMetaData(const sal_Char* _methodName, return stringMetaData; } -OUString ODatabaseMetaData::impl_getStringMetaData(const sal_Char* _methodName, std::string (sql::DatabaseMetaData::*_Method)() ) +rtl::OUString ODatabaseMetaData::impl_getStringMetaData(const sal_Char* _methodName, std::string (sql::DatabaseMetaData::*_Method)() ) { OSL_TRACE( "mysqlc::ODatabaseMetaData::%s", _methodName); - OUString stringMetaData; + rtl::OUString stringMetaData; try { stringMetaData = mysqlc_sdbc_driver::convert((meta->*_Method)(), m_rConnection.getConnectionEncoding()); } catch (const sql::MethodNotImplementedException &) { @@ -129,10 +129,10 @@ OUString ODatabaseMetaData::impl_getStringMetaData(const sal_Char* _methodName, return stringMetaData; } -OUString ODatabaseMetaData::impl_getStringMetaData(const sal_Char* _methodName, const sql::SQLString& (sql::DatabaseMetaData::*_Method)() ) +rtl::OUString ODatabaseMetaData::impl_getStringMetaData(const sal_Char* _methodName, const sql::SQLString& (sql::DatabaseMetaData::*_Method)() ) { OSL_TRACE( "mysqlc::ODatabaseMetaData::%s", _methodName); - OUString stringMetaData; + rtl::OUString stringMetaData; try { stringMetaData = mysqlc_sdbc_driver::convert((meta->*_Method)(), m_rConnection.getConnectionEncoding()); } catch (const sql::MethodNotImplementedException &) { @@ -145,10 +145,10 @@ OUString ODatabaseMetaData::impl_getStringMetaData(const sal_Char* _methodName, return stringMetaData; } -OUString ODatabaseMetaData::impl_getStringMetaData(const sal_Char* _methodName, sql::SQLString (sql::DatabaseMetaData::*_Method)() ) +rtl::OUString ODatabaseMetaData::impl_getStringMetaData(const sal_Char* _methodName, sql::SQLString (sql::DatabaseMetaData::*_Method)() ) { OSL_TRACE( "mysqlc::ODatabaseMetaData::%s", _methodName); - OUString stringMetaData; + rtl::OUString stringMetaData; try { stringMetaData = mysqlc_sdbc_driver::convert((meta->*_Method)(), m_rConnection.getConnectionEncoding()); } catch (const sql::MethodNotImplementedException &) { @@ -220,7 +220,7 @@ bool ODatabaseMetaData::impl_getRSTypeMetaData(const sal_Char* _methodName, bool return impl_getBoolMetaData(_methodName, _Method, resultSetType); } -OUString SAL_CALL ODatabaseMetaData::getCatalogSeparator() +rtl::OUString SAL_CALL ODatabaseMetaData::getCatalogSeparator() throw(SQLException, RuntimeException, std::exception) { return impl_getStringMetaData("getCatalogSeparator", &sql::DatabaseMetaData::getCatalogSeparator); @@ -364,13 +364,13 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsNonNullableColumns() return impl_getBoolMetaData("supportsNonNullableColumns", &sql::DatabaseMetaData::supportsNonNullableColumns); } -OUString SAL_CALL ODatabaseMetaData::getCatalogTerm() +rtl::OUString SAL_CALL ODatabaseMetaData::getCatalogTerm() throw(SQLException, RuntimeException, std::exception) { return impl_getStringMetaData("getCatalogTerm", &sql::DatabaseMetaData::getCatalogTerm); } -OUString SAL_CALL ODatabaseMetaData::getIdentifierQuoteString() +rtl::OUString SAL_CALL ODatabaseMetaData::getIdentifierQuoteString() throw(SQLException, RuntimeException, std::exception) { if (identifier_quote_string_set == false) { @@ -380,7 +380,7 @@ OUString SAL_CALL ODatabaseMetaData::getIdentifierQuoteString() return identifier_quote_string; } -OUString SAL_CALL ODatabaseMetaData::getExtraNameCharacters() +rtl::OUString SAL_CALL ODatabaseMetaData::getExtraNameCharacters() throw(SQLException, RuntimeException, std::exception) { return impl_getStringMetaData("getExtraNameCharacters", &sql::DatabaseMetaData::getExtraNameCharacters); @@ -787,53 +787,53 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92IntermediateSQL() return impl_getBoolMetaData("supportsANSI92IntermediateSQL", &sql::DatabaseMetaData::supportsANSI92IntermediateSQL); } -OUString SAL_CALL ODatabaseMetaData::getURL() +rtl::OUString SAL_CALL ODatabaseMetaData::getURL() throw(SQLException, RuntimeException, std::exception) { OSL_TRACE("ODatabaseMetaData::getURL"); return m_rConnection.getConnectionSettings().connectionURL; } -OUString SAL_CALL ODatabaseMetaData::getUserName() +rtl::OUString SAL_CALL ODatabaseMetaData::getUserName() throw(SQLException, RuntimeException, std::exception) { return impl_getStringMetaData("getUserName", &sql::DatabaseMetaData::getUserName); } -OUString SAL_CALL ODatabaseMetaData::getDriverName() +rtl::OUString SAL_CALL ODatabaseMetaData::getDriverName() throw(SQLException, RuntimeException, std::exception) { OSL_TRACE("ODatabaseMetaData::getDriverName"); - OUString aValue( "MySQL Connector/OO.org" ); + rtl::OUString aValue( "MySQL Connector/OO.org" ); return aValue; } -OUString SAL_CALL ODatabaseMetaData::getDriverVersion() +rtl::OUString SAL_CALL ODatabaseMetaData::getDriverVersion() throw(SQLException, RuntimeException, std::exception) { OSL_TRACE("ODatabaseMetaData::getDriverVersion"); - return OUString( "0.9.2" ); + return rtl::OUString( "0.9.2" ); } -OUString SAL_CALL ODatabaseMetaData::getDatabaseProductVersion() +rtl::OUString SAL_CALL ODatabaseMetaData::getDatabaseProductVersion() throw(SQLException, RuntimeException, std::exception) { return impl_getStringMetaData("getDatabaseProductVersion", &sql::DatabaseMetaData::getDatabaseProductVersion); } -OUString SAL_CALL ODatabaseMetaData::getDatabaseProductName() +rtl::OUString SAL_CALL ODatabaseMetaData::getDatabaseProductName() throw(SQLException, RuntimeException, std::exception) { return impl_getStringMetaData("getDatabaseProductName", &sql::DatabaseMetaData::getDatabaseProductName); } -OUString SAL_CALL ODatabaseMetaData::getProcedureTerm() +rtl::OUString SAL_CALL ODatabaseMetaData::getProcedureTerm() throw(SQLException, RuntimeException, std::exception) { return impl_getStringMetaData("getProcedureTerm", &sql::DatabaseMetaData::getProcedureTerm); } -OUString SAL_CALL ODatabaseMetaData::getSchemaTerm() +rtl::OUString SAL_CALL ODatabaseMetaData::getSchemaTerm() throw(SQLException, RuntimeException, std::exception) { return impl_getStringMetaData("getSchemaTerm", &sql::DatabaseMetaData::getSchemaTerm); @@ -874,37 +874,37 @@ sal_Int32 SAL_CALL ODatabaseMetaData::getDriverMinorVersion() return MARIADBC_VERSION_MINOR; } -OUString SAL_CALL ODatabaseMetaData::getSQLKeywords() +rtl::OUString SAL_CALL ODatabaseMetaData::getSQLKeywords() throw(SQLException, RuntimeException, std::exception) { return impl_getStringMetaData("getSQLKeywords", &sql::DatabaseMetaData::getSQLKeywords); } -OUString SAL_CALL ODatabaseMetaData::getSearchStringEscape() +rtl::OUString SAL_CALL ODatabaseMetaData::getSearchStringEscape() throw(SQLException, RuntimeException, std::exception) { return impl_getStringMetaData("getSearchStringEscape", &sql::DatabaseMetaData::getSearchStringEscape); } -OUString SAL_CALL ODatabaseMetaData::getStringFunctions() +rtl::OUString SAL_CALL ODatabaseMetaData::getStringFunctions() throw(SQLException, RuntimeException, std::exception) { return impl_getStringMetaData("getStringFunctions", &sql::DatabaseMetaData::getStringFunctions); } -OUString SAL_CALL ODatabaseMetaData::getTimeDateFunctions() +rtl::OUString SAL_CALL ODatabaseMetaData::getTimeDateFunctions() throw(SQLException, RuntimeException, std::exception) { return impl_getStringMetaData("getTimeDateFunctions", &sql::DatabaseMetaData::getTimeDateFunctions); } -OUString SAL_CALL ODatabaseMetaData::getSystemFunctions() +rtl::OUString SAL_CALL ODatabaseMetaData::getSystemFunctions() throw(SQLException, RuntimeException, std::exception) { return impl_getStringMetaData("getSystemFunctions", &sql::DatabaseMetaData::getSystemFunctions); } -OUString SAL_CALL ODatabaseMetaData::getNumericFunctions() +rtl::OUString SAL_CALL ODatabaseMetaData::getNumericFunctions() throw(SQLException, RuntimeException, std::exception) { return impl_getStringMetaData("getNumericFunctions", &sql::DatabaseMetaData::getNumericFunctions); @@ -1199,19 +1199,19 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getSchemas() Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumnPrivileges( const Any& catalog, - const OUString& schema, - const OUString& table, - const OUString& columnNamePattern) + const rtl::OUString& schema, + const rtl::OUString& table, + const rtl::OUString& columnNamePattern) throw(SQLException, RuntimeException, std::exception) { OSL_TRACE("ODatabaseMetaData::getColumnPrivileges"); Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance("org.openoffice.comp.helper.DatabaseMetaDataResultSet"),UNO_QUERY); std::vector< std::vector< Any > > rRows; - std::string cat(catalog.hasValue()? OUStringToOString(getStringFromAny(catalog), m_rConnection.getConnectionEncoding()).getStr():""), - sch(OUStringToOString(schema, m_rConnection.getConnectionEncoding()).getStr()), - tab(OUStringToOString(table, m_rConnection.getConnectionEncoding()).getStr()), - cNamePattern(OUStringToOString(columnNamePattern, m_rConnection.getConnectionEncoding()).getStr()); + std::string cat(catalog.hasValue()? rtl::OUStringToOString(getStringFromAny(catalog), m_rConnection.getConnectionEncoding()).getStr():""), + sch(rtl::OUStringToOString(schema, m_rConnection.getConnectionEncoding()).getStr()), + tab(rtl::OUStringToOString(table, m_rConnection.getConnectionEncoding()).getStr()), + cNamePattern(rtl::OUStringToOString(columnNamePattern, m_rConnection.getConnectionEncoding()).getStr()); try { rtl_TextEncoding encoding = m_rConnection.getConnectionEncoding(); boost::scoped_ptr< sql::ResultSet> rset( meta->getColumnPrivileges(cat, sch, tab, cNamePattern.compare("")? cNamePattern:wild)); @@ -1239,18 +1239,18 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumnPrivileges( Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumns( const Any& catalog, - const OUString& schemaPattern, - const OUString& tableNamePattern, - const OUString& columnNamePattern) + const rtl::OUString& schemaPattern, + const rtl::OUString& tableNamePattern, + const rtl::OUString& columnNamePattern) throw(SQLException, RuntimeException, std::exception) { OSL_TRACE("ODatabaseMetaData::getColumns"); Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance("org.openoffice.comp.helper.DatabaseMetaDataResultSet"),UNO_QUERY); std::vector< std::vector< Any > > rRows; - std::string cat(catalog.hasValue()? OUStringToOString(getStringFromAny(catalog), m_rConnection.getConnectionEncoding()).getStr():""), - sPattern(OUStringToOString(schemaPattern, m_rConnection.getConnectionEncoding()).getStr()), - tNamePattern(OUStringToOString(tableNamePattern, m_rConnection.getConnectionEncoding()).getStr()), - cNamePattern(OUStringToOString(columnNamePattern, m_rConnection.getConnectionEncoding()).getStr()); + std::string cat(catalog.hasValue()? rtl::OUStringToOString(getStringFromAny(catalog), m_rConnection.getConnectionEncoding()).getStr():""), + sPattern(rtl::OUStringToOString(schemaPattern, m_rConnection.getConnectionEncoding()).getStr()), + tNamePattern(rtl::OUStringToOString(tableNamePattern, m_rConnection.getConnectionEncoding()).getStr()), + cNamePattern(rtl::OUStringToOString(columnNamePattern, m_rConnection.getConnectionEncoding()).getStr()); try { boost::scoped_ptr< sql::ResultSet> rset( meta->getColumns(cat, @@ -1285,9 +1285,9 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumns( Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables( const Any& catalog, - const OUString& schemaPattern, - const OUString& tableNamePattern, - const Sequence< OUString >& types ) + const rtl::OUString& schemaPattern, + const rtl::OUString& tableNamePattern, + const Sequence< rtl::OUString >& types ) throw(SQLException, RuntimeException, std::exception) { OSL_TRACE("ODatabaseMetaData::getTables"); @@ -1295,16 +1295,16 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables( Reference< XResultSet > xResultSet(getOwnConnection(). getDriver().getFactory()->createInstance( - OUString("org.openoffice.comp.helper.DatabaseMetaDataResultSet")),UNO_QUERY); + rtl::OUString("org.openoffice.comp.helper.DatabaseMetaDataResultSet")),UNO_QUERY); std::vector< std::vector< Any > > rRows; - std::string cat(catalog.hasValue()? OUStringToOString(getStringFromAny(catalog), m_rConnection.getConnectionEncoding()).getStr():""), - sPattern(OUStringToOString(schemaPattern, m_rConnection.getConnectionEncoding()).getStr()), - tNamePattern(OUStringToOString(tableNamePattern, m_rConnection.getConnectionEncoding()).getStr()); + std::string cat(catalog.hasValue()? rtl::OUStringToOString(getStringFromAny(catalog), m_rConnection.getConnectionEncoding()).getStr():""), + sPattern(rtl::OUStringToOString(schemaPattern, m_rConnection.getConnectionEncoding()).getStr()), + tNamePattern(rtl::OUStringToOString(tableNamePattern, m_rConnection.getConnectionEncoding()).getStr()); std::list<sql::SQLString> tabTypes; - for (const OUString *pStart = types.getConstArray(), *p = pStart, *pEnd = pStart + nLength; p != pEnd; ++p) { - tabTypes.push_back(OUStringToOString(*p, m_rConnection.getConnectionEncoding()).getStr()); + for (const rtl::OUString *pStart = types.getConstArray(), *p = pStart, *pEnd = pStart + nLength; p != pEnd; ++p) { + tabTypes.push_back(rtl::OUStringToOString(*p, m_rConnection.getConnectionEncoding()).getStr()); } try { @@ -1344,9 +1344,9 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables( Reference< XResultSet > SAL_CALL ODatabaseMetaData::getProcedureColumns( const Any& /* catalog */, - const OUString& /* schemaPattern */, - const OUString& /* procedureNamePattern */, - const OUString& /* columnNamePattern */) + const rtl::OUString& /* schemaPattern */, + const rtl::OUString& /* procedureNamePattern */, + const rtl::OUString& /* columnNamePattern */) throw(SQLException, RuntimeException, std::exception) { OSL_TRACE("ODatabaseMetaData::getProcedureColumns"); @@ -1356,17 +1356,17 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getProcedureColumns( Reference< XResultSet > SAL_CALL ODatabaseMetaData::getProcedures( const Any& catalog, - const OUString& schemaPattern, - const OUString& procedureNamePattern) + const rtl::OUString& schemaPattern, + const rtl::OUString& procedureNamePattern) throw(SQLException, RuntimeException, std::exception) { OSL_TRACE("ODatabaseMetaData::getProcedures"); Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance("org.openoffice.comp.helper.DatabaseMetaDataResultSet"),UNO_QUERY); std::vector< std::vector< Any > > rRows; - std::string cat(catalog.hasValue()? OUStringToOString(getStringFromAny(catalog), m_rConnection.getConnectionEncoding()).getStr():""), - sPattern(OUStringToOString(schemaPattern, m_rConnection.getConnectionEncoding()).getStr()), - pNamePattern(OUStringToOString(procedureNamePattern, m_rConnection.getConnectionEncoding()).getStr()); + std::string cat(catalog.hasValue()? rtl::OUStringToOString(getStringFromAny(catalog), m_rConnection.getConnectionEncoding()).getStr():""), + sPattern(rtl::OUStringToOString(schemaPattern, m_rConnection.getConnectionEncoding()).getStr()), + pNamePattern(rtl::OUStringToOString(procedureNamePattern, m_rConnection.getConnectionEncoding()).getStr()); try { @@ -1398,8 +1398,8 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getProcedures( Reference< XResultSet > SAL_CALL ODatabaseMetaData::getVersionColumns( const Any& /* catalog */, - const OUString& /* schema */, - const OUString& /* table */) + const rtl::OUString& /* schema */, + const rtl::OUString& /* table */) throw(SQLException, RuntimeException, std::exception) { OSL_TRACE("ODatabaseMetaData::getVersionColumns"); @@ -1411,16 +1411,16 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getVersionColumns( Reference< XResultSet > SAL_CALL ODatabaseMetaData::getExportedKeys( const Any& catalog , - const OUString& schema , - const OUString& table ) + const rtl::OUString& schema , + const rtl::OUString& table ) throw(SQLException, RuntimeException, std::exception) { OSL_TRACE("ODatabaseMetaData::getExportedKeys"); Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance("org.openoffice.comp.helper.DatabaseMetaDataResultSet"),UNO_QUERY); std::vector< std::vector< Any > > rRows; - std::string cat(catalog.hasValue()? OUStringToOString(getStringFromAny(catalog), m_rConnection.getConnectionEncoding()).getStr():""), - sch(OUStringToOString(schema, m_rConnection.getConnectionEncoding()).getStr()), - tab(OUStringToOString(table, m_rConnection.getConnectionEncoding()).getStr()); + std::string cat(catalog.hasValue()? rtl::OUStringToOString(getStringFromAny(catalog), m_rConnection.getConnectionEncoding()).getStr():""), + sch(rtl::OUStringToOString(schema, m_rConnection.getConnectionEncoding()).getStr()), + tab(rtl::OUStringToOString(table, m_rConnection.getConnectionEncoding()).getStr()); try { rtl_TextEncoding encoding = m_rConnection.getConnectionEncoding(); @@ -1448,8 +1448,8 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getExportedKeys( Reference< XResultSet > SAL_CALL ODatabaseMetaData::getImportedKeys( const Any& catalog, - const OUString& schema, - const OUString& table) + const rtl::OUString& schema, + const rtl::OUString& table) throw(SQLException, RuntimeException, std::exception) { OSL_TRACE("ODatabaseMetaData::getImportedKeys"); @@ -1457,9 +1457,9 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getImportedKeys( Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance("org.openoffice.comp.helper.DatabaseMetaDataResultSet"),UNO_QUERY); std::vector< std::vector< Any > > rRows; - std::string cat(catalog.hasValue()? OUStringToOString(getStringFromAny(catalog), m_rConnection.getConnectionEncoding()).getStr():""), - sch(OUStringToOString(schema, m_rConnection.getConnectionEncoding()).getStr()), - tab(OUStringToOString(table, m_rConnection.getConnectionEncoding()).getStr()); + std::string cat(catalog.hasValue()? rtl::OUStringToOString(getStringFromAny(catalog), m_rConnection.getConnectionEncoding()).getStr():""), + sch(rtl::OUStringToOString(schema, m_rConnection.getConnectionEncoding()).getStr()), + tab(rtl::OUStringToOString(table, m_rConnection.getConnectionEncoding()).getStr()); try { rtl_TextEncoding encoding = m_rConnection.getConnectionEncoding(); @@ -1487,17 +1487,17 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getImportedKeys( Reference< XResultSet > SAL_CALL ODatabaseMetaData::getPrimaryKeys( const Any& catalog, - const OUString& schema, - const OUString& table) + const rtl::OUString& schema, + const rtl::OUString& table) throw(SQLException, RuntimeException, std::exception) { OSL_TRACE("ODatabaseMetaData::getPrimaryKeys"); Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance("org.openoffice.comp.helper.DatabaseMetaDataResultSet"),UNO_QUERY); std::vector< std::vector< Any > > rRows; - std::string cat(catalog.hasValue()? OUStringToOString(getStringFromAny(catalog), m_rConnection.getConnectionEncoding()).getStr():""), - sch(OUStringToOString(schema, m_rConnection.getConnectionEncoding()).getStr()), - tab(OUStringToOString(table, m_rConnection.getConnectionEncoding()).getStr()); + std::string cat(catalog.hasValue()? rtl::OUStringToOString(getStringFromAny(catalog), m_rConnection.getConnectionEncoding()).getStr():""), + sch(rtl::OUStringToOString(schema, m_rConnection.getConnectionEncoding()).getStr()), + tab(rtl::OUStringToOString(table, m_rConnection.getConnectionEncoding()).getStr()); try { rtl_TextEncoding encoding = m_rConnection.getConnectionEncoding(); @@ -1525,8 +1525,8 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getPrimaryKeys( Reference< XResultSet > SAL_CALL ODatabaseMetaData::getIndexInfo( const Any& catalog, - const OUString& schema, - const OUString& table, + const rtl::OUString& schema, + const rtl::OUString& table, sal_Bool unique, sal_Bool approximate) throw(SQLException, RuntimeException, std::exception) @@ -1535,9 +1535,9 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getIndexInfo( Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance("org.openoffice.comp.helper.DatabaseMetaDataResultSet"),UNO_QUERY); std::vector< std::vector< Any > > rRows; - std::string cat(catalog.hasValue()? OUStringToOString(getStringFromAny(catalog), m_rConnection.getConnectionEncoding()).getStr():""), - sch(OUStringToOString(schema, m_rConnection.getConnectionEncoding()).getStr()), - tab(OUStringToOString(table, m_rConnection.getConnectionEncoding()).getStr()); + std::string cat(catalog.hasValue()? rtl::OUStringToOString(getStringFromAny(catalog), m_rConnection.getConnectionEncoding()).getStr():""), + sch(rtl::OUStringToOString(schema, m_rConnection.getConnectionEncoding()).getStr()), + tab(rtl::OUStringToOString(table, m_rConnection.getConnectionEncoding()).getStr()); try { rtl_TextEncoding encoding = m_rConnection.getConnectionEncoding(); @@ -1565,8 +1565,8 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getIndexInfo( Reference< XResultSet > SAL_CALL ODatabaseMetaData::getBestRowIdentifier( const Any& catalog, - const OUString& schema, - const OUString& table, + const rtl::OUString& schema, + const rtl::OUString& table, sal_Int32 scope, sal_Bool nullable) throw(SQLException, RuntimeException, std::exception) @@ -1575,9 +1575,9 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getBestRowIdentifier( Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance("org.openoffice.comp.helper.DatabaseMetaDataResultSet"),UNO_QUERY); std::vector< std::vector< Any > > rRows; - std::string cat(catalog.hasValue()? OUStringToOString(getStringFromAny(catalog), m_rConnection.getConnectionEncoding()).getStr():""), - sch(OUStringToOString(schema, m_rConnection.getConnectionEncoding()).getStr()), - tab(OUStringToOString(table, m_rConnection.getConnectionEncoding()).getStr()); + std::string cat(catalog.hasValue()? rtl::OUStringToOString(getStringFromAny(catalog), m_rConnection.getConnectionEncoding()).getStr():""), + sch(rtl::OUStringToOString(schema, m_rConnection.getConnectionEncoding()).getStr()), + tab(rtl::OUStringToOString(table, m_rConnection.getConnectionEncoding()).getStr()); try { rtl_TextEncoding encoding = m_rConnection.getConnectionEncoding(); @@ -1605,17 +1605,17 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getBestRowIdentifier( Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges( const Any& catalog, - const OUString& schemaPattern, - const OUString& tableNamePattern) + const rtl::OUString& schemaPattern, + const rtl::OUString& tableNamePattern) throw(SQLException, RuntimeException, std::exception) { OSL_TRACE("ODatabaseMetaData::getTablePrivileges"); Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance("org.openoffice.comp.helper.DatabaseMetaDataResultSet"),UNO_QUERY); std::vector< std::vector< Any > > rRows; - std::string cat(catalog.hasValue()? OUStringToOString(getStringFromAny(catalog), m_rConnection.getConnectionEncoding()).getStr():""), - sPattern(OUStringToOString(schemaPattern, m_rConnection.getConnectionEncoding()).getStr()), - tPattern(OUStringToOString(tableNamePattern, m_rConnection.getConnectionEncoding()).getStr()); + std::string cat(catalog.hasValue()? rtl::OUStringToOString(getStringFromAny(catalog), m_rConnection.getConnectionEncoding()).getStr():""), + sPattern(rtl::OUStringToOString(schemaPattern, m_rConnection.getConnectionEncoding()).getStr()), + tPattern(rtl::OUStringToOString(tableNamePattern, m_rConnection.getConnectionEncoding()).getStr()); try { static bool fakeTablePrivileges = false; @@ -1632,7 +1632,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges( aRow.push_back(makeAny( tableNamePattern )); // TABLE_NAME aRow.push_back(Any()); // GRANTOR aRow.push_back(userName); // GRANTEE - aRow.push_back(makeAny( OUString::createFromAscii( allPrivileges[i] ) )); // PRIVILEGE + aRow.push_back(makeAny( rtl::OUString::createFromAscii( allPrivileges[i] ) )); // PRIVILEGE aRow.push_back(Any()); // IS_GRANTABLE rRows.push_back(aRow); @@ -1664,23 +1664,23 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges( Reference< XResultSet > SAL_CALL ODatabaseMetaData::getCrossReference( const Any& primaryCatalog, - const OUString& primarySchema, - const OUString& primaryTable, + const rtl::OUString& primarySchema, + const rtl::OUString& primaryTable, const Any& foreignCatalog, - const OUString& foreignSchema, - const OUString& foreignTable) + const rtl::OUString& foreignSchema, + const rtl::OUString& foreignTable) throw(SQLException, RuntimeException, std::exception) { OSL_TRACE("ODatabaseMetaData::getCrossReference"); Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance("org.openoffice.comp.helper.DatabaseMetaDataResultSet"),UNO_QUERY); std::vector< std::vector< Any > > rRows; - std::string primaryCat(primaryCatalog.hasValue()? OUStringToOString(getStringFromAny(primaryCatalog), m_rConnection.getConnectionEncoding()).getStr():""), - foreignCat(foreignCatalog.hasValue()? OUStringToOString(getStringFromAny(foreignCatalog), m_rConnection.getConnectionEncoding()).getStr():""), - pSchema(OUStringToOString(primarySchema, m_rConnection.getConnectionEncoding()).getStr()), - pTable(OUStringToOString(primaryTable, m_rConnection.getConnectionEncoding()).getStr()), - fSchema(OUStringToOString(foreignSchema, m_rConnection.getConnectionEncoding()).getStr()), - fTable(OUStringToOString(foreignTable, m_rConnection.getConnectionEncoding()).getStr()); + std::string primaryCat(primaryCatalog.hasValue()? rtl::OUStringToOString(getStringFromAny(primaryCatalog), m_rConnection.getConnectionEncoding()).getStr():""), + foreignCat(foreignCatalog.hasValue()? rtl::OUStringToOString(getStringFromAny(foreignCatalog), m_rConnection.getConnectionEncoding()).getStr():""), + pSchema(rtl::OUStringToOString(primarySchema, m_rConnection.getConnectionEncoding()).getStr()), + pTable(rtl::OUStringToOString(primaryTable, m_rConnection.getConnectionEncoding()).getStr()), + fSchema(rtl::OUStringToOString(foreignSchema, m_rConnection.getConnectionEncoding()).getStr()), + fTable(rtl::OUStringToOString(foreignTable, m_rConnection.getConnectionEncoding()).getStr()); try { rtl_TextEncoding encoding = m_rConnection.getConnectionEncoding(); @@ -1708,8 +1708,8 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getCrossReference( Reference< XResultSet > SAL_CALL ODatabaseMetaData::getUDTs( const Any& /* catalog */, - const OUString& /* schemaPattern */, - const OUString& /* typeNamePattern */, + const rtl::OUString& /* schemaPattern */, + const rtl::OUString& /* typeNamePattern */, const Sequence< sal_Int32 >& /* types */) throw(SQLException, RuntimeException, std::exception) { diff --git a/mysqlc/source/mysqlc_databasemetadata.hxx b/mysqlc/source/mysqlc_databasemetadata.hxx index 46dde6c..4f4013d 100644 --- a/mysqlc/source/mysqlc_databasemetadata.hxx +++ b/mysqlc/source/mysqlc_databasemetadata.hxx @@ -48,14 +48,14 @@ namespace connectivity bool m_bUseCatalog; protected: sql::DatabaseMetaData * meta; - OUString identifier_quote_string; + rtl::OUString identifier_quote_string; bool identifier_quote_string_set; private: - OUString impl_getStringMetaData( const sal_Char* _methodName, const std::string& (sql::DatabaseMetaData::*_Method)() ); - OUString impl_getStringMetaData( const sal_Char* _methodName, std::string (sql::DatabaseMetaData::*_Method)() ); - OUString impl_getStringMetaData( const sal_Char* _methodName, const sql::SQLString& (sql::DatabaseMetaData::*_Method)() ); - OUString impl_getStringMetaData( const sal_Char* _methodName, sql::SQLString (sql::DatabaseMetaData::*_Method)() ); + rtl::OUString impl_getStringMetaData( const sal_Char* _methodName, const std::string& (sql::DatabaseMetaData::*_Method)() ); + rtl::OUString impl_getStringMetaData( const sal_Char* _methodName, std::string (sql::DatabaseMetaData::*_Method)() ); + rtl::OUString impl_getStringMetaData( const sal_Char* _methodName, const sql::SQLString& (sql::DatabaseMetaData::*_Method)() ); + rtl::OUString impl_getStringMetaData( const sal_Char* _methodName, sql::SQLString (sql::DatabaseMetaData::*_Method)() ); sal_Int32 impl_getInt32MetaData( const sal_Char* _methodName, unsigned int (sql::DatabaseMetaData::*_Method)() ); bool impl_getBoolMetaData( const sal_Char* _methodName, bool (sql::DatabaseMetaData::*_Method)() ); bool impl_getBoolMetaData( const sal_Char* _methodName, bool (sql::DatabaseMetaData::*_Method)(int), sal_Int32 _arg ); @@ -71,17 +71,17 @@ namespace connectivity // XDatabaseMetaData sal_Bool SAL_CALL allProceduresAreCallable() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; sal_Bool SAL_CALL allTablesAreSelectable() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; - OUString SAL_CALL getURL() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; - OUString SAL_CALL getUserName() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; + rtl::OUString SAL_CALL getURL() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; + rtl::OUString SAL_CALL getUserName() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; sal_Bool SAL_CALL isReadOnly() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; sal_Bool SAL_CALL nullsAreSortedHigh() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; sal_Bool SAL_CALL nullsAreSortedLow() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; sal_Bool SAL_CALL nullsAreSortedAtStart() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; sal_Bool SAL_CALL nullsAreSortedAtEnd() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; - OUString SAL_CALL getDatabaseProductName() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; - OUString SAL_CALL getDatabaseProductVersion() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; - OUString SAL_CALL getDriverName() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; - OUString SAL_CALL getDriverVersion() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; + rtl::OUString SAL_CALL getDatabaseProductName() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; + rtl::OUString SAL_CALL getDatabaseProductVersion() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; + rtl::OUString SAL_CALL getDriverName() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; + rtl::OUString SAL_CALL getDriverVersion() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; sal_Int32 SAL_CALL getDriverMajorVersion() throw(my_RuntimeException, std::exception) SAL_OVERRIDE; sal_Int32 SAL_CALL getDriverMinorVersion() throw(my_RuntimeException, std::exception) SAL_OVERRIDE; sal_Bool SAL_CALL usesLocalFiles() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; @@ -94,14 +94,14 @@ namespace connectivity sal_Bool SAL_CALL storesUpperCaseQuotedIdentifiers() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; sal_Bool SAL_CALL storesLowerCaseQuotedIdentifiers() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; sal_Bool SAL_CALL storesMixedCaseQuotedIdentifiers() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; - OUString SAL_CALL getIdentifierQuoteString() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; - OUString SAL_CALL getSQLKeywords() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; - OUString SAL_CALL getNumericFunctions() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; - OUString SAL_CALL getStringFunctions() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; - OUString SAL_CALL getSystemFunctions() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; - OUString SAL_CALL getTimeDateFunctions() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; - OUString SAL_CALL getSearchStringEscape() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; - OUString SAL_CALL getExtraNameCharacters() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; + rtl::OUString SAL_CALL getIdentifierQuoteString() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; + rtl::OUString SAL_CALL getSQLKeywords() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; + rtl::OUString SAL_CALL getNumericFunctions() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; + rtl::OUString SAL_CALL getStringFunctions() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; + rtl::OUString SAL_CALL getSystemFunctions() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; + rtl::OUString SAL_CALL getTimeDateFunctions() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; + rtl::OUString SAL_CALL getSearchStringEscape() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; + rtl::OUString SAL_CALL getExtraNameCharacters() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; sal_Bool SAL_CALL supportsAlterTableWithAddColumn() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; sal_Bool SAL_CALL supportsAlterTableWithDropColumn() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; sal_Bool SAL_CALL supportsColumnAliasing() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; @@ -130,11 +130,11 @@ namespace connectivity sal_Bool SAL_CALL supportsOuterJoins() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; sal_Bool SAL_CALL supportsFullOuterJoins() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; sal_Bool SAL_CALL supportsLimitedOuterJoins() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; - OUString SAL_CALL getSchemaTerm() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; - OUString SAL_CALL getProcedureTerm() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; - OUString SAL_CALL getCatalogTerm() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; + rtl::OUString SAL_CALL getSchemaTerm() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; + rtl::OUString SAL_CALL getProcedureTerm() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; + rtl::OUString SAL_CALL getCatalogTerm() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; sal_Bool SAL_CALL isCatalogAtStart() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; - OUString SAL_CALL getCatalogSeparator() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; + rtl::OUString SAL_CALL getCatalogSeparator() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; sal_Bool SAL_CALL supportsSchemasInDataManipulation() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; sal_Bool SAL_CALL supportsSchemasInProcedureCalls() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; sal_Bool SAL_CALL supportsSchemasInTableDefinitions() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; @@ -190,23 +190,23 @@ namespace connectivity sal_Bool SAL_CALL supportsDataManipulationTransactionsOnly()throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; sal_Bool SAL_CALL dataDefinitionCausesTransactionCommit() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; sal_Bool SAL_CALL dataDefinitionIgnoredInTransactions() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; - my_XResultSetRef SAL_CALL getProcedures(const Any& catalog, const OUString& schemaPattern, const OUString& procedureNamePattern) throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; - my_XResultSetRef SAL_CALL getProcedureColumns(const Any& catalog, const OUString& schemaPattern, const OUString& procedureNamePattern, const OUString& columnNamePattern) throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; - my_XResultSetRef SAL_CALL getTables(const Any& catalog, const OUString& schemaPattern, const OUString& tableNamePattern, const ::com::sun::star::uno::Sequence< OUString >& types) throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; + my_XResultSetRef SAL_CALL getProcedures(const Any& catalog, const rtl::OUString& schemaPattern, const rtl::OUString& procedureNamePattern) throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; + my_XResultSetRef SAL_CALL getProcedureColumns(const Any& catalog, const rtl::OUString& schemaPattern, const rtl::OUString& procedureNamePattern, const rtl::OUString& columnNamePattern) throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; + my_XResultSetRef SAL_CALL getTables(const Any& catalog, const rtl::OUString& schemaPattern, const rtl::OUString& tableNamePattern, const ::com::sun::star::uno::Sequence< rtl::OUString >& types) throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; my_XResultSetRef SAL_CALL getSchemas() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; my_XResultSetRef SAL_CALL getCatalogs() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; my_XResultSetRef SAL_CALL getTableTypes() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; - my_XResultSetRef SAL_CALL getColumns(const Any& catalog, const OUString& schemaPattern, const OUString& tableNamePattern, const OUString& columnNamePattern) throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; - my_XResultSetRef SAL_CALL getColumnPrivileges(const Any& catalog, const OUString& schema, const OUString& table, const OUString& columnNamePattern) throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; - my_XResultSetRef SAL_CALL getTablePrivileges(const Any& catalog, const OUString& schemaPattern, const OUString& tableNamePattern) throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; - my_XResultSetRef SAL_CALL getBestRowIdentifier(const Any& catalog, const OUString& schema, const OUString& table, sal_Int32 scope, sal_Bool nullable) throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; - my_XResultSetRef SAL_CALL getVersionColumns(const Any& catalog, const OUString& schema, const OUString& table) throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; - my_XResultSetRef SAL_CALL getPrimaryKeys(const Any& catalog, const OUString& schema, const OUString& table) throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; - my_XResultSetRef SAL_CALL getImportedKeys(const Any& catalog, const OUString& schema, const OUString& table) throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; - my_XResultSetRef SAL_CALL getExportedKeys(const Any& catalog, const OUString& schema, const OUString& table) throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; - my_XResultSetRef SAL_CALL getCrossReference(const Any& primaryCatalog, const OUString& primarySchema, const OUString& primaryTable, const Any& foreignCatalog, const OUString& foreignSchema, const OUString& foreignTable) throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; + my_XResultSetRef SAL_CALL getColumns(const Any& catalog, const rtl::OUString& schemaPattern, const rtl::OUString& tableNamePattern, const rtl::OUString& columnNamePattern) throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; + my_XResultSetRef SAL_CALL getColumnPrivileges(const Any& catalog, const rtl::OUString& schema, const rtl::OUString& table, const rtl::OUString& columnNamePattern) throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; + my_XResultSetRef SAL_CALL getTablePrivileges(const Any& catalog, const rtl::OUString& schemaPattern, const rtl::OUString& tableNamePattern) throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; + my_XResultSetRef SAL_CALL getBestRowIdentifier(const Any& catalog, const rtl::OUString& schema, const rtl::OUString& table, sal_Int32 scope, sal_Bool nullable) throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; + my_XResultSetRef SAL_CALL getVersionColumns(const Any& catalog, const rtl::OUString& schema, const rtl::OUString& table) throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; + my_XResultSetRef SAL_CALL getPrimaryKeys(const Any& catalog, const rtl::OUString& schema, const rtl::OUString& table) throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; + my_XResultSetRef SAL_CALL getImportedKeys(const Any& catalog, const rtl::OUString& schema, const rtl::OUString& table) throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; + my_XResultSetRef SAL_CALL getExportedKeys(const Any& catalog, const rtl::OUString& schema, const rtl::OUString& table) throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; + my_XResultSetRef SAL_CALL getCrossReference(const Any& primaryCatalog, const rtl::OUString& primarySchema, const rtl::OUString& primaryTable, const Any& foreignCatalog, const rtl::OUString& foreignSchema, const rtl::OUString& foreignTable) throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; my_XResultSetRef SAL_CALL getTypeInfo() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; - my_XResultSetRef SAL_CALL getIndexInfo(const Any& catalog, const OUString& schema, const OUString& table, sal_Bool unique, sal_Bool approximate) throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; + my_XResultSetRef SAL_CALL getIndexInfo(const Any& catalog, const rtl::OUString& schema, const rtl::OUString& table, sal_Bool unique, sal_Bool approximate) throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; sal_Bool SAL_CALL supportsResultSetType(sal_Int32 setType) throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; sal_Bool SAL_CALL supportsResultSetConcurrency(sal_Int32 setType, sal_Int32 concurrency) throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; sal_Bool SAL_CALL ownUpdatesAreVisible(sal_Int32 setType) throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; @@ -219,7 +219,7 @@ namespace connectivity sal_Bool SAL_CALL deletesAreDetected(sal_Int32 setType) throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; sal_Bool SAL_CALL insertsAreDetected(sal_Int32 setType) throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; sal_Bool SAL_CALL supportsBatchUpdates() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; - my_XResultSetRef SAL_CALL getUDTs(const Any& catalog, const OUString& schemaPattern, const OUString& typeNamePattern, const ::com::sun::star::uno::Sequence< sal_Int32 >& types) throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; + my_XResultSetRef SAL_CALL getUDTs(const Any& catalog, const rtl::OUString& schemaPattern, const rtl::OUString& typeNamePattern, const ::com::sun::star::uno::Sequence< sal_Int32 >& types) throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > SAL_CALL getConnection() throw(my_SQLException, my_RuntimeException, std::exception) SAL_OVERRIDE; }; } diff --git a/mysqlc/source/mysqlc_driver.cxx b/mysqlc/source/mysqlc_driver.cxx index 5737bce..b05983c 100644 --- a/mysqlc/source/mysqlc_driver.cxx +++ b/mysqlc/source/mysqlc_driver.cxx @@ -72,38 +72,38 @@ void MysqlCDriver::disposing() } // static ServiceInfo -OUString MysqlCDriver::getImplementationName_Static() +rtl::OUString MysqlCDriver::getImplementationName_Static() throw(RuntimeException) { OSL_TRACE("MysqlCDriver::getImplementationName_Static"); - return OUString( "com.sun.star.comp.sdbc.mysqlc.MysqlCDriver" ); + return rtl::OUString( "com.sun.star.comp.sdbc.mysqlc.MysqlCDriver" ); } -Sequence< OUString > MysqlCDriver::getSupportedServiceNames_Static() +Sequence< rtl::OUString > MysqlCDriver::getSupportedServiceNames_Static() throw(RuntimeException) { OSL_TRACE("MysqlCDriver::getSupportedServiceNames_Static"); // which service is supported // for more information @see com.sun.star.sdbc.Driver - Sequence< OUString > aSNS(1); + Sequence< rtl::OUString > aSNS(1); aSNS[0] = "com.sun.star.sdbc.Driver"; return aSNS; } -OUString SAL_CALL MysqlCDriver::getImplementationName() +rtl::OUString SAL_CALL MysqlCDriver::getImplementationName() throw(RuntimeException, std::exception) { OSL_TRACE("MysqlCDriver::getImplementationName"); return getImplementationName_Static(); } -sal_Bool SAL_CALL MysqlCDriver::supportsService(const OUString& _rServiceName) +sal_Bool SAL_CALL MysqlCDriver::supportsService(const rtl::OUString& _rServiceName) throw(RuntimeException, std::exception) { return cppu::supportsService(this, _rServiceName); } -Sequence< OUString > SAL_CALL MysqlCDriver::getSupportedServiceNames() +Sequence< rtl::OUString > SAL_CALL MysqlCDriver::getSupportedServiceNames() throw(RuntimeException, std::exception) { OSL_TRACE("MysqlCDriver::getSupportedServiceNames"); @@ -120,7 +120,7 @@ void MysqlCDriver::impl_initCppConn_lck_throw() #ifdef BUNDLE_MARIADB if ( !m_bAttemptedLoadCConn ) { - const OUString sModuleName(BUNDLE_MARIADB); + const rtl::OUString sModuleName(BUNDLE_MARIADB); m_hCConnModule = osl_loadModuleRelative( &thisModule, sModuleName.pData, 0 ); m_bAttemptedLoadCConn = true; } @@ -132,7 +132,7 @@ void MysqlCDriver::impl_initCppConn_lck_throw() throw SQLException( "Unable to load the " BUNDLE_MARIADB " library.", *this, - OUString( "08001" ), // "unable to connect" + rtl::OUString( "08001" ), // "unable to connect" 0, Any() ); @@ -140,7 +140,7 @@ void MysqlCDriver::impl_initCppConn_lck_throw() #endif if ( !m_bAttemptedLoadCppConn ) { - const OUString sModuleName(CPPCONN_LIB); + const rtl::OUString sModuleName(CPPCONN_LIB); m_hCppConnModule = osl_loadModuleRelative( &thisModule, sModuleName.pData, 0 ); m_bAttemptedLoadCppConn = true; } @@ -152,14 +152,14 @@ void MysqlCDriver::impl_initCppConn_lck_throw() throw SQLException( ... etc. - the rest is truncated _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
