summaryrefslogtreecommitdiff
path: root/mysqlc
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2013-06-29 21:24:12 +0200
committerThomas Arnhold <thomas@arnhold.org>2013-06-29 21:52:54 +0000
commitba0a57702cdef7a0389c06841711d7e3079d471c (patch)
tree223c0dd50de4b71cf7df9d0073f7cacca1f18c8d /mysqlc
parent8a7ede404ca4980f169c4ce634805ea5c1b6b56e (diff)
remove OUString wrap for string literals
For some functions and all kinds of Exceptions. CannotConvertException CloseVetoException DisposedException EmptyUndoStackException ErrorCodeIOException Exception GridInvalidDataException GridInvalidModelException IOException IllegalAccessException IllegalArgumentException IllegalTypeException IndexOutOfBoundsException NoMasterException NoSuchElementException NoSupportException PropertyVetoException RuntimeException SAXException ScannerException StorageWrappedTargetException UnsupportedFlavorException VetoException WrappedTargetException ZipIOException throwGenericSQLException throwIllegallArgumentException createInstance createInstanceWithContext forName getByName getPackageManager getPropertyValue getUnpackedValueOrDefault getValueByName hasPropertyByName openKey setName setPropertyValue supportsService bash command: for i in `cat list`; do git grep "$i\s*(\s*OUString(\s*\"" -- '*.[hc]xx' | cut -d ':' -f1 | sort -u | xargs sed -i -e "s/\(\<$i\s*(\)\s*OUString(\s*\(\"[^\")\\]*\"\)\s*)\s*/\1\2/g" -e "s/\($i.*\)\"+ /\1\" + /g"; done Change-Id: Iaf8e641b0abf28c082906014f87a183517630535 Reviewed-on: https://gerrit.libreoffice.org/4624 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org>
Diffstat (limited to 'mysqlc')
-rw-r--r--mysqlc/source/mysqlc_databasemetadata.cxx30
-rw-r--r--mysqlc/source/mysqlc_driver.cxx2
2 files changed, 16 insertions, 16 deletions
diff --git a/mysqlc/source/mysqlc_databasemetadata.cxx b/mysqlc/source/mysqlc_databasemetadata.cxx
index b415238713c7..99d2f4cdd26a 100644
--- a/mysqlc/source/mysqlc_databasemetadata.cxx
+++ b/mysqlc/source/mysqlc_databasemetadata.cxx
@@ -1495,7 +1495,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTableTypes()
const char * table_types[] = {"TABLE", "VIEW"};
sal_Int32 requiredVersion[] = {0, 50000};
- Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(OUString("org.openoffice.comp.helper.DatabaseMetaDataResultSet")),UNO_QUERY);
+ Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance("org.openoffice.comp.helper.DatabaseMetaDataResultSet"),UNO_QUERY);
std::vector< std::vector< Any > > rRows;
rtl_TextEncoding encoding = m_rConnection.getConnectionEncoding();
@@ -1517,7 +1517,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTypeInfo()
throw(SQLException, RuntimeException)
{
OSL_TRACE("ODatabaseMetaData::getTypeInfo");
- Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(OUString("org.openoffice.comp.helper.DatabaseMetaDataResultSet")),UNO_QUERY);
+ Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance("org.openoffice.comp.helper.DatabaseMetaDataResultSet"),UNO_QUERY);
std::vector< std::vector< Any > > rRows;
@@ -1561,7 +1561,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getCatalogs()
{
OSL_TRACE("ODatabaseMetaData::getCatalogs");
- Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(OUString("org.openoffice.comp.helper.DatabaseMetaDataResultSet")),UNO_QUERY);
+ Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance("org.openoffice.comp.helper.DatabaseMetaDataResultSet"),UNO_QUERY);
std::vector< std::vector< Any > > rRows;
try {
@@ -1596,7 +1596,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getSchemas()
{
OSL_TRACE("ODatabaseMetaData::getSchemas");
- Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(OUString("org.openoffice.comp.helper.DatabaseMetaDataResultSet")),UNO_QUERY);
+ Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance("org.openoffice.comp.helper.DatabaseMetaDataResultSet"),UNO_QUERY);
std::vector< std::vector< Any > > rRows;
try {
@@ -1641,7 +1641,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumnPrivileges(
throw(SQLException, RuntimeException)
{
OSL_TRACE("ODatabaseMetaData::getColumnPrivileges");
- Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(OUString("org.openoffice.comp.helper.DatabaseMetaDataResultSet")),UNO_QUERY);
+ 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():""),
@@ -1684,7 +1684,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumns(
throw(SQLException, RuntimeException)
{
OSL_TRACE("ODatabaseMetaData::getColumns");
- Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(OUString("org.openoffice.comp.helper.DatabaseMetaDataResultSet")),UNO_QUERY);
+ 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()),
@@ -1809,7 +1809,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getProcedures(
throw(SQLException, RuntimeException)
{
OSL_TRACE("ODatabaseMetaData::getProcedures");
- Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(OUString("org.openoffice.comp.helper.DatabaseMetaDataResultSet")),UNO_QUERY);
+ 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():""),
@@ -1854,7 +1854,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getVersionColumns(
throw(SQLException, RuntimeException)
{
OSL_TRACE("ODatabaseMetaData::getVersionColumns");
- Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(OUString("org.openoffice.comp.helper.DatabaseMetaDataResultSet")),UNO_QUERY);
+ Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance("org.openoffice.comp.helper.DatabaseMetaDataResultSet"),UNO_QUERY);
std::vector< std::vector< Any > > rRows;
lcl_setRows_throw(xResultSet, 16,rRows);
return xResultSet;
@@ -1870,7 +1870,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getExportedKeys(
throw(SQLException, RuntimeException)
{
OSL_TRACE("ODatabaseMetaData::getExportedKeys");
- Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(OUString("org.openoffice.comp.helper.DatabaseMetaDataResultSet")),UNO_QUERY);
+ 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()),
@@ -1911,7 +1911,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getImportedKeys(
{
OSL_TRACE("ODatabaseMetaData::getImportedKeys");
- Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(OUString("org.openoffice.comp.helper.DatabaseMetaDataResultSet")),UNO_QUERY);
+ 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():""),
@@ -1952,7 +1952,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getPrimaryKeys(
throw(SQLException, RuntimeException)
{
OSL_TRACE("ODatabaseMetaData::getPrimaryKeys");
- Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(OUString("org.openoffice.comp.helper.DatabaseMetaDataResultSet")),UNO_QUERY);
+ 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():""),
@@ -1995,7 +1995,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getIndexInfo(
throw(SQLException, RuntimeException)
{
OSL_TRACE("ODatabaseMetaData::getIndexInfo");
- Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(OUString("org.openoffice.comp.helper.DatabaseMetaDataResultSet")),UNO_QUERY);
+ 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():""),
@@ -2038,7 +2038,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getBestRowIdentifier(
throw(SQLException, RuntimeException)
{
OSL_TRACE("ODatabaseMetaData::getBestRowIdentifier");
- Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(OUString("org.openoffice.comp.helper.DatabaseMetaDataResultSet")),UNO_QUERY);
+ 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():""),
@@ -2079,7 +2079,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges(
throw(SQLException, RuntimeException)
{
OSL_TRACE("ODatabaseMetaData::getTablePrivileges");
- Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(OUString("org.openoffice.comp.helper.DatabaseMetaDataResultSet")),UNO_QUERY);
+ 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():""),
@@ -2144,7 +2144,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getCrossReference(
throw(SQLException, RuntimeException)
{
OSL_TRACE("ODatabaseMetaData::getCrossReference");
- Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(OUString("org.openoffice.comp.helper.DatabaseMetaDataResultSet")),UNO_QUERY);
+ 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():""),
diff --git a/mysqlc/source/mysqlc_driver.cxx b/mysqlc/source/mysqlc_driver.cxx
index 7a6a32640122..abd29776ba03 100644
--- a/mysqlc/source/mysqlc_driver.cxx
+++ b/mysqlc/source/mysqlc_driver.cxx
@@ -210,7 +210,7 @@ Reference< XConnection > SAL_CALL MysqlCDriver::connect(const OUString& url, con
impl_initCppConn_lck_throw();
OSL_POSTCOND( cppDriver, "MySQLCDriver::connect: internal error." );
if ( !cppDriver )
- throw RuntimeException( OUString( "MySQLCDriver::connect: internal error." ), *this );
+ throw RuntimeException("MySQLCDriver::connect: internal error.", *this );
}
Reference< XConnection > xConn;