summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/dbase/DIndex.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity/source/drivers/dbase/DIndex.cxx')
-rw-r--r--connectivity/source/drivers/dbase/DIndex.cxx35
1 files changed, 6 insertions, 29 deletions
diff --git a/connectivity/source/drivers/dbase/DIndex.cxx b/connectivity/source/drivers/dbase/DIndex.cxx
index d168de39eb77..a3ee4a2688df 100644
--- a/connectivity/source/drivers/dbase/DIndex.cxx
+++ b/connectivity/source/drivers/dbase/DIndex.cxx
@@ -30,7 +30,6 @@
#include <unotools/ucbhelper.hxx>
#include <comphelper/servicehelper.hxx>
#include <comphelper/types.hxx>
-#include <cppuhelper/typeprovider.hxx>
#include <connectivity/dbexception.hxx>
#include <dbase/DResultSet.hxx>
#include <strings.hrc>
@@ -42,13 +41,10 @@ using namespace connectivity;
using namespace utl;
using namespace ::cppu;
using namespace connectivity::file;
-using namespace connectivity::sdbcx;
using namespace connectivity::dbase;
using namespace com::sun::star::sdbc;
-using namespace com::sun::star::sdbcx;
using namespace com::sun::star::uno;
using namespace com::sun::star::beans;
-using namespace com::sun::star::lang;
IMPLEMENT_SERVICE_INFO(ODbaseIndex,"com.sun.star.sdbcx.driver.dbase.Index","com.sun.star.sdbcx.Index");
@@ -100,22 +96,6 @@ void ODbaseIndex::refreshColumns()
m_pColumns.reset(new ODbaseIndexColumns(this,m_aMutex,aVector));
}
-Sequence< sal_Int8 > ODbaseIndex::getUnoTunnelId()
-{
- static ::cppu::OImplementationId implId;
-
- return implId.getImplementationId();
-}
-
-// XUnoTunnel
-
-sal_Int64 ODbaseIndex::getSomething( const Sequence< sal_Int8 > & rId )
-{
- return (isUnoTunnelId<ODbaseIndex>(rId))
- ? reinterpret_cast< sal_Int64 >( this )
- : ODbaseIndex_BASE::getSomething(rId);
-}
-
ONDXPagePtr const & ODbaseIndex::getRoot()
{
openIndexFile();
@@ -357,7 +337,7 @@ SvStream& connectivity::dbase::operator >> (SvStream &rStream, ODbaseIndex& rInd
return rStream;
}
-SvStream& connectivity::dbase::WriteODbaseIndex(SvStream &rStream, ODbaseIndex& rIndex)
+SvStream& connectivity::dbase::WriteODbaseIndex(SvStream &rStream, const ODbaseIndex& rIndex)
{
rStream.Seek(0);
rStream.WriteUInt32(rIndex.m_aHeader.db_rootpage);
@@ -404,8 +384,7 @@ void ODbaseIndex::createINFEntry()
bool bCase = isCaseSensitive();
while (aNewEntry.isEmpty())
{
- aNewEntry = OString("NDX");
- aNewEntry += OString::number(++nSuffix);
+ aNewEntry = "NDX" + OString::number(++nSuffix);
for (sal_uInt16 i = 0; i < aInfFile.GetKeyCount(); i++)
{
aKeyName = aInfFile.GetKeyName(i);
@@ -461,7 +440,7 @@ void ODbaseIndex::DropImpl()
}
}
-void ODbaseIndex::impl_killFileAndthrowError_throw(const char* pErrorId, const OUString& _sFile)
+void ODbaseIndex::impl_killFileAndthrowError_throw(TranslateId pErrorId, const OUString& _sFile)
{
closeImpl();
if(UCBContentHelper::Exists(_sFile))
@@ -568,15 +547,13 @@ void ODbaseIndex::CreateImpl()
if(xSet->last())
{
- Reference< XUnoTunnel> xTunnel(xSet, UNO_QUERY_THROW);
- ODbaseResultSet* pDbaseRes = reinterpret_cast< ODbaseResultSet* >( xTunnel->getSomething(ODbaseResultSet::getUnoTunnelId()) );
+ ODbaseResultSet* pDbaseRes = dynamic_cast<ODbaseResultSet*>(xSet.getTyped().get());
assert(pDbaseRes); //"No dbase resultset found? What's going on here!
nRowsLeft = xSet->getRow();
xSet->beforeFirst();
- ORowSetValue atmpValue;
- ONDXKey aKey(atmpValue, nType, 0);
- ONDXKey aInsertKey(atmpValue, nType, 0);
+ ONDXKey aKey(ORowSetValue(), nType, 0);
+ ONDXKey aInsertKey(ORowSetValue(), nType, 0);
// Create the index structure
while (xSet->next())
{