summaryrefslogtreecommitdiff
path: root/connectivity/source/commontools/CommonTools.cxx
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-06-19 12:24:29 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-06-19 12:24:29 +0200
commit92667c8edbaee9a252b1d5d221eb62849f76697c (patch)
tree8f1d329f2259b7d5bff054bc14d0965637df6961 /connectivity/source/commontools/CommonTools.cxx
parentbaecdfb578cb7bc992944857ad4d8882ef7e842c (diff)
parent48b4a99ce2451f1ddf2e8e128bbfcd6683072999 (diff)
Merge branch 'master' into feature/gnumake4
Conflicts: connectivity/source/cpool/Zregistration.cxx connectivity/source/drivers/evoab/LCatalog.cxx connectivity/source/drivers/evoab/LColumnAlias.cxx connectivity/source/drivers/evoab/LColumnAlias.hxx connectivity/source/drivers/evoab/LColumns.cxx connectivity/source/drivers/evoab/LColumns.hxx connectivity/source/drivers/evoab/LConfigAccess.cxx connectivity/source/drivers/evoab/LConfigAccess.hxx connectivity/source/drivers/evoab/LConnection.cxx connectivity/source/drivers/evoab/LConnection.hxx connectivity/source/drivers/evoab/LDatabaseMetaData.cxx connectivity/source/drivers/evoab/LDatabaseMetaData.hxx connectivity/source/drivers/evoab/LDriver.cxx connectivity/source/drivers/evoab/LDriver.hxx connectivity/source/drivers/evoab/LFolderList.cxx connectivity/source/drivers/evoab/LFolderList.hxx connectivity/source/drivers/evoab/LNoException.cxx connectivity/source/drivers/evoab/LPreparedStatement.cxx connectivity/source/drivers/evoab/LPreparedStatement.hxx connectivity/source/drivers/evoab/LResultSet.cxx connectivity/source/drivers/evoab/LResultSet.hxx connectivity/source/drivers/evoab/LServices.cxx connectivity/source/drivers/evoab/LStatement.cxx connectivity/source/drivers/evoab/LStatement.hxx connectivity/source/drivers/evoab/LTable.cxx connectivity/source/drivers/evoab/LTable.hxx connectivity/source/drivers/evoab/LTables.cxx connectivity/source/drivers/evoab/LTables.hxx connectivity/source/drivers/evoab/evoab.xml connectivity/source/drivers/evoab/makefile.mk editeng/Library_editeng.mk framework/Library_fwe.mk framework/test/test.cxx idl/prj/d.lst idl/util/idlpch.cxx linguistic/Makefile linguistic/Module_linguistic.mk linguistic/inc/linguistic/lngdllapi.h linguistic/inc/linguistic/lngprophelp.hxx linguistic/inc/linguistic/misc.hxx linguistic/prj/build.lst linguistic/prj/d.lst linguistic/qa/unoapi/Test.java linguistic/source/grammarchecker.cxx linguistic/source/grammarchecker.hxx linguistic/source/hyphdta.cxx linguistic/source/lngprophelp.cxx linguistic/source/makefile.mk linguistic/source/spelldta.cxx sfx2/Library_qstart.mk sfx2/Library_sfx.mk sfx2/inc/sfx2/qswin32.h sfx2/prj/build.lst sfx2/qa/cppunit/makefile.mk xmlscript/inc/xmlscript/xcrdllapi.h xmlscript/prj/d.lst xmlscript/util/makefile.mk
Diffstat (limited to 'connectivity/source/commontools/CommonTools.cxx')
-rw-r--r--connectivity/source/commontools/CommonTools.cxx20
1 files changed, 13 insertions, 7 deletions
diff --git a/connectivity/source/commontools/CommonTools.cxx b/connectivity/source/commontools/CommonTools.cxx
index b9d3e8bec1b5..c2d7b6f04117 100644
--- a/connectivity/source/commontools/CommonTools.cxx
+++ b/connectivity/source/commontools/CommonTools.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -82,8 +83,8 @@ namespace connectivity
else
pWild += pos;
else
- break; // ACHTUNG laeuft unter bestimmten
- // Umstaenden in den nachsten case rein!!
+ break; // WARNING in certain circumstances
+ // it will run into the next 'case'!!
case CHAR_WILD:
while ( *pWild == CHAR_WILD )
pWild++;
@@ -235,7 +236,7 @@ namespace connectivity
try
{
Reference< starjava::XJavaVM > xVM(_rxFactory->createInstance(
- rtl::OUString::createFromAscii("com.sun.star.java.JavaVirtualMachine")), UNO_QUERY);
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.java.JavaVirtualMachine"))), UNO_QUERY);
OSL_ENSURE(_rxFactory.is(),"InitJava: I have no factory!");
if (!xVM.is() || !_rxFactory.is())
@@ -284,11 +285,14 @@ namespace connectivity
{
::rtl::OString sClassName = ::rtl::OUStringToOString(_sClassName, RTL_TEXTENCODING_ASCII_US);
sClassName = sClassName.replace('.','/');
- jobject out = pEnv->FindClass(sClassName);
+ jobject out = pEnv->FindClass(sClassName.getStr());
bRet = out != NULL;
pEnv->DeleteLocalRef( out );
}
}
+#else
+ (void)_pJVM;
+ (void)_sClassName;
#endif
return bRet;
}
@@ -309,8 +313,8 @@ sal_Bool isCharOk(sal_Unicode c,const ::rtl::OUString& _rSpecials)
//------------------------------------------------------------------------------
sal_Bool isValidSQLName(const ::rtl::OUString& rName,const ::rtl::OUString& _rSpecials)
{
- // Ueberpruefung auf korrekte Namensgebung im SQL Sinne
- // Dieses ist wichtig fuer Tabellennamen beispielsweise
+ // Test for correct naming (in SQL sense)
+ // This is important for table names for example
const sal_Unicode* pStr = rName.getStr();
if (*pStr > 127 || isdigit(*pStr))
return sal_False;
@@ -335,7 +339,7 @@ sal_Bool isValidSQLName(const ::rtl::OUString& rName,const ::rtl::OUString& _rSp
return sal_True;
}
//------------------------------------------------------------------
-// Erzeugt einen neuen Namen falls noetig
+// Creates a new name if necessary
::rtl::OUString convertName2SQLName(const ::rtl::OUString& rName,const ::rtl::OUString& _rSpecials)
{
if(isValidSQLName(rName,_rSpecials))
@@ -367,3 +371,5 @@ sal_Bool isValidSQLName(const ::rtl::OUString& rName,const ::rtl::OUString& _rSp
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */