summaryrefslogtreecommitdiff
path: root/connectivity/source/commontools/dbtools2.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-11-03 14:03:54 +0200
committerNoel Grandin <noel@peralex.com>2014-11-05 08:44:19 +0200
commit705c48d32eec0aa5180e60ca157daca4b154e4a3 (patch)
tree97f43496f4b429a2b8d03b1e71cb2a1c33142a15 /connectivity/source/commontools/dbtools2.cxx
parentb7d8a58ff2698ffc6e22943f64aa97c5ea253bd9 (diff)
fdo#38835 strip out OUString globals
they are largely unnecessary these days, since our OUString infrastructure gained optimised handling for static char constants. Change-Id: I07f73484f82d0582252cb4324d4107c998432c37
Diffstat (limited to 'connectivity/source/commontools/dbtools2.cxx')
-rw-r--r--connectivity/source/commontools/dbtools2.cxx30
1 files changed, 13 insertions, 17 deletions
diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx
index a5faf6fc6268..7791385dbba4 100644
--- a/connectivity/source/commontools/dbtools2.cxx
+++ b/connectivity/source/commontools/dbtools2.cxx
@@ -694,15 +694,15 @@ sal_Int32 getTablePrivileges(const Reference< XDatabaseMetaData>& _xMetaData,
Reference< XRow > xCurrentRow(xPrivileges, UNO_QUERY);
const OUString sUserWorkingFor = _xMetaData->getUserName();
- static const OUString sSELECT( "SELECT" );
- static const OUString sINSERT( "INSERT" );
- static const OUString sUPDATE( "UPDATE" );
- static const OUString sDELETE( "DELETE" );
- static const OUString sREAD( "READ" );
- static const OUString sCREATE( "CREATE" );
- static const OUString sALTER( "ALTER" );
- static const OUString sREFERENCE( "REFERENCE" );
- static const OUString sDROP( "DROP" );
+ static const char sSELECT[] = "SELECT";
+ static const char sINSERT[] = "INSERT";
+ static const char sUPDATE[] = "UPDATE";
+ static const char sDELETE[] = "DELETE";
+ static const char sREAD[] = "READ";
+ static const char sCREATE[] = "CREATE";
+ static const char sALTER[] = "ALTER";
+ static const char sREFERENCE[] = "REFERENCE";
+ static const char sDROP[] = "DROP";
if ( xCurrentRow.is() )
{
@@ -800,9 +800,8 @@ sal_Int32 getTablePrivileges(const Reference< XDatabaseMetaData>& _xMetaData,
}
catch(const SQLException& e)
{
- static OUString sNotSupportedState( "IM001" );
// some drivers don't support any privileges so we assume that we are allowed to do all we want :-)
- if(e.SQLState == sNotSupportedState)
+ if(e.SQLState == "IM001")
nPrivileges |= Privilege::DROP |
Privilege::REFERENCE |
Privilege::ALTER |
@@ -965,20 +964,17 @@ sal_Int32 DBTypeConversion::convertUnicodeStringToLength( const OUString& _rSour
}
OUString lcl_getReportEngines()
{
- static OUString s_sNodeName("org.openoffice.Office.DataAccess/ReportEngines");
- return s_sNodeName;
+ return OUString("org.openoffice.Office.DataAccess/ReportEngines");
}
OUString lcl_getDefaultReportEngine()
{
- static OUString s_sNodeName("DefaultReportEngine");
- return s_sNodeName;
+ return OUString("DefaultReportEngine");
}
OUString lcl_getReportEngineNames()
{
- static OUString s_sNodeName("ReportEngineNames");
- return s_sNodeName;
+ return OUString("ReportEngineNames");
}
OUString getDefaultReportEngineServiceName(const Reference< XComponentContext >& _rxORB)