[Libreoffice-commits] .: 2 commits - connectivity/source desktop/source unusedcode.easy
Caolán McNamara
caolan at kemper.freedesktop.org
Fri Mar 23 13:48:22 PDT 2012
connectivity/source/drivers/mozab/mozillasrc/MQuery.cxx | 36 ---------
connectivity/source/drivers/mozab/mozillasrc/MQuery.hxx | 5 -
connectivity/source/drivers/mozab/mozillasrc/MTypeConverter.cxx | 38 ----------
connectivity/source/drivers/mozab/mozillasrc/MTypeConverter.hxx | 2
desktop/source/deployment/dp_persmap.cxx | 6 +
desktop/source/deployment/misc/db.cxx | 3
unusedcode.easy | 9 --
7 files changed, 6 insertions(+), 93 deletions(-)
New commits:
commit 907ba5e528225ea62404ab49e13821da4687f1d8
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Mar 23 20:47:22 2012 +0000
match DB_ENV creation flags to DB creation flags
diff --git a/desktop/source/deployment/dp_persmap.cxx b/desktop/source/deployment/dp_persmap.cxx
index 7c505bb..9b794ad 100644
--- a/desktop/source/deployment/dp_persmap.cxx
+++ b/desktop/source/deployment/dp_persmap.cxx
@@ -80,7 +80,8 @@ PersistentMap::~PersistentMap()
PersistentMap::PersistentMap( OUString const & url )
: m_db( 0 )
{
- try {
+ try
+ {
rtl::OUString fileURL = expandUnoRcUrl(url);
if ( File::getSystemPathFromFileURL( fileURL, m_sysPath ) != File::E_None )
OSL_ASSERT( false );
@@ -94,7 +95,8 @@ PersistentMap::PersistentMap( OUString const & url )
if (err != 0)
throw_rtexc(err);
}
- catch (DbException & exc) {
+ catch (const DbException & exc)
+ {
throw_rtexc( exc.get_errno(), exc.what() );
}
}
diff --git a/desktop/source/deployment/misc/db.cxx b/desktop/source/deployment/misc/db.cxx
index 98cfc01..42cd987 100644
--- a/desktop/source/deployment/misc/db.cxx
+++ b/desktop/source/deployment/misc/db.cxx
@@ -81,7 +81,8 @@ namespace
if (pSharedEnv == NULL)
{
db_env_create(&pSharedEnv, 0);
- pSharedEnv->open(pSharedEnv, NULL, DB_CREATE | DB_INIT_MPOOL | DB_PRIVATE | DB_THREAD, 0);
+ // xxx todo: DB_THREAD currently not used
+ pSharedEnv->open(pSharedEnv, NULL, DB_CREATE | DB_INIT_MPOOL | DB_PRIVATE /*| DB_THREAD*/, 0);
}
++nSharedEnv;
return pSharedEnv;
commit 1dbdcee43f64e2fd00d7dbeaca862bafbbbd6332
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Mar 23 16:52:06 2012 +0000
cut mozab down to size somewhat
diff --git a/connectivity/source/drivers/mozab/mozillasrc/MQuery.cxx b/connectivity/source/drivers/mozab/mozillasrc/MQuery.cxx
index 81b087c..9433e26 100644
--- a/connectivity/source/drivers/mozab/mozillasrc/MQuery.cxx
+++ b/connectivity/source/drivers/mozab/mozillasrc/MQuery.cxx
@@ -146,15 +146,6 @@ void MQuery::setAddressbook(::rtl::OUString &ab)
OSL_TRACE("\tOUT MQuery::setAddressbook()");
}
// -------------------------------------------------------------------------
-::rtl::OUString MQuery::getAddressbook() const
-{
- OSL_TRACE("IN MQuery::getAddressbook()");
-
- OSL_TRACE("\tOUT MQuery::getAddressbook()");
-
- return(m_aAddressbook);
-}
-// -------------------------------------------------------------------------
void MQuery::setMaxNrOfReturns(const sal_Int32 mnr)
{
OSL_TRACE( "IN MQuery::setMaxNrOfReturns()" );
@@ -164,33 +155,6 @@ void MQuery::setMaxNrOfReturns(const sal_Int32 mnr)
OSL_TRACE("\tOUT MQuery::setMaxNrOfReturns()" );
}
// -------------------------------------------------------------------------
-sal_Int32 MQuery::getMaxNrOfReturns() const
-{
- OSL_TRACE("IN MQuery::getMaxNrOfReturns()");
-
- OSL_TRACE("\tOUT MQuery::getMaxNrOfReturns()");
-
- return(m_nMaxNrOfReturns);
-}
-// -------------------------------------------------------------------------
-void MQuery::setQuerySubDirs(sal_Bool &qsd)
-{
- OSL_TRACE("IN MQuery::setQuerySubDirs()");
- ::osl::MutexGuard aGuard(m_aMutex);
-
- m_bQuerySubDirs = qsd;
- OSL_TRACE("\tOUT MQuery::setQuerySubDirs()");
-}
-// -------------------------------------------------------------------------
-sal_Bool MQuery::getQuerySubDirs() const
-{
- OSL_TRACE("IN MQuery::getQuerySubDirs()");
-
- OSL_TRACE("\tOUT MQuery::getQuerySubDirs()");
-
- return(m_bQuerySubDirs);
-}
-// -------------------------------------------------------------------------
void MQuery::setExpression( MQueryExpression &_expr )
{
OSL_TRACE("IN MQuery::setExpression()");
diff --git a/connectivity/source/drivers/mozab/mozillasrc/MQuery.hxx b/connectivity/source/drivers/mozab/mozillasrc/MQuery.hxx
index 2c17529..7723509 100644
--- a/connectivity/source/drivers/mozab/mozillasrc/MQuery.hxx
+++ b/connectivity/source/drivers/mozab/mozillasrc/MQuery.hxx
@@ -236,17 +236,12 @@ namespace connectivity
sal_uInt32 InsertLoginInfo(OConnection* _pCon);
void setAddressbook( ::rtl::OUString&);
- ::rtl::OUString getAddressbook(void) const;
const OColumnAlias& getColumnAlias() const { return m_rColumnAlias; }
void setExpression( MQueryExpression &_expr );
void setMaxNrOfReturns( const sal_Int32);
- sal_Int32 getMaxNrOfReturns(void) const;
-
- void setQuerySubDirs( sal_Bool&);
- sal_Bool getQuerySubDirs(void) const;
sal_Int32 getRowCount( void );
sal_uInt32 getRealRowCount( void );
diff --git a/connectivity/source/drivers/mozab/mozillasrc/MTypeConverter.cxx b/connectivity/source/drivers/mozab/mozillasrc/MTypeConverter.cxx
index 92fba34..bc2cd69 100644
--- a/connectivity/source/drivers/mozab/mozillasrc/MTypeConverter.cxx
+++ b/connectivity/source/drivers/mozab/mozillasrc/MTypeConverter.cxx
@@ -47,13 +47,6 @@ void MTypeConverter::ouStringToNsString(::rtl::OUString const &ous, nsString &ns
nss = mozString; // temp.
}
// -------------------------------------------------------------------------
-::rtl::OUString MTypeConverter::nsACStringToOUString( const nsACString& _source )
-{
- const char* buffer = _source.BeginReading();
- const char* bufferEnd = _source.EndReading();
- return ::rtl::OUString( buffer, static_cast<sal_Int32>(bufferEnd - buffer), RTL_TEXTENCODING_ASCII_US );
-}
-// -------------------------------------------------------------------------
::rtl::OString MTypeConverter::nsACStringToOString( const nsACString& _source )
{
const char* buffer = _source.BeginReading();
@@ -61,12 +54,6 @@ void MTypeConverter::ouStringToNsString(::rtl::OUString const &ous, nsString &ns
return ::rtl::OString( buffer, static_cast<sal_Int32>(bufferEnd - buffer) );
}
// -------------------------------------------------------------------------
-void MTypeConverter::asciiOUStringToNsACString( const ::rtl::OUString& _asciiString, nsACString& _dest )
-{
- ::rtl::OString sAsciiVersion( _asciiString.getStr(), _asciiString.getLength(), RTL_TEXTENCODING_ASCII_US );
- asciiToNsACString( sAsciiVersion.getStr(), _dest );
-}
-// -------------------------------------------------------------------------
void MTypeConverter::asciiToNsACString( const sal_Char* _asciiString, nsACString& _dest )
{
_dest.Truncate();
@@ -95,16 +82,6 @@ void MTypeConverter::prUnicharToOUString(PRUnichar const *pru, ::rtl::OUString &
ous = _ous;
}
// -------------------------------------------------------------------------
-char *MTypeConverter::ouStringToCCharStringUtf8(::rtl::OUString const &ous)
-{
- // Convert to ::rtl::OString,
- ::rtl::OString os(rtl::OUStringToOString(ous, RTL_TEXTENCODING_UTF8));
-
- const char *cs = os.getStr();
-
- return(strdup(cs));
-}
-// -------------------------------------------------------------------------
char *MTypeConverter::ouStringToCCharStringAscii(::rtl::OUString const &ous)
{
// Convert ::rtl::OUString to ::rtl::OString,
@@ -113,20 +90,5 @@ char *MTypeConverter::ouStringToCCharStringAscii(::rtl::OUString const &ous)
return(strdup(os.getStr()));
}
// -------------------------------------------------------------------------
-char *MTypeConverter::nsStringToCCharStringAscii(nsString const &nss)
-{
- char cs[1024];
- nss.ToCString(cs, 1024);
-
- return(strdup(cs));
-}
-// -------------------------------------------------------------------------
-::std::string MTypeConverter::ouStringToStlString(::rtl::OUString const &ous)
-{
- // Convert ::rtl::OUString to ::rtl::OString.
- ::rtl::OString os(rtl::OUStringToOString(ous,RTL_TEXTENCODING_ASCII_US));
- return( ::std::string(os.getStr()));
-}
-// -------------------------------------------------------------------------
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/mozab/mozillasrc/MTypeConverter.hxx b/connectivity/source/drivers/mozab/mozillasrc/MTypeConverter.hxx
index df903ea..66b4720 100644
--- a/connectivity/source/drivers/mozab/mozillasrc/MTypeConverter.hxx
+++ b/connectivity/source/drivers/mozab/mozillasrc/MTypeConverter.hxx
@@ -52,9 +52,7 @@ namespace connectivity
static ::std::string ouStringToStlString(const ::rtl::OUString&);
static ::std::string nsStringToStlString(const nsString&);
- static ::rtl::OUString nsACStringToOUString( const nsACString& _source );
static ::rtl::OString nsACStringToOString( const nsACString& _source );
- static void asciiOUStringToNsACString( const ::rtl::OUString& _asciiString, nsACString& _dest );
static void asciiToNsACString( const sal_Char* _asciiString, nsACString& _dest );
private:
diff --git a/unusedcode.easy b/unusedcode.easy
index b8d6b87..8fcb6b3 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -805,19 +805,10 @@ connectivity::OSortIndex::GetValue(int) const
connectivity::SQLError::getSQLState(int) const
connectivity::file::OStatement_Base::reset()
connectivity::file::OStatement_Base::setWarning(com::sun::star::sdbc::SQLWarning const&)
-connectivity::mozab::MQuery::getAddressbook() const
-connectivity::mozab::MQuery::getMaxNrOfReturns() const
-connectivity::mozab::MQuery::getQuerySubDirs() const
-connectivity::mozab::MQuery::setQuerySubDirs(unsigned char&)
connectivity::mozab::MQueryHelper::atEnd() const
connectivity::mozab::MQueryHelper::hasMore() const
connectivity::mozab::MQueryHelper::next()
connectivity::mozab::MQueryHelper::rewind()
-connectivity::mozab::MTypeConverter::asciiOUStringToNsACString(rtl::OUString const&, nsACString_internal&)
-connectivity::mozab::MTypeConverter::nsACStringToOUString(nsACString_internal const&)
-connectivity::mozab::MTypeConverter::nsStringToCCharStringAscii(nsString const&)
-connectivity::mozab::MTypeConverter::ouStringToCCharStringUtf8(rtl::OUString const&)
-connectivity::mozab::MTypeConverter::ouStringToStlString(rtl::OUString const&)
connectivity::mozab::OCatalog::getDot()
connectivity::mozab::OPreparedStatement::checkParameterIndex(int)
connectivity::mozab::OResultSet::initializeRow(rtl::Reference<connectivity::ODeleteVector<connectivity::ORowSetValue> >&, int)
More information about the Libreoffice-commits
mailing list