Kaydet (Commit) 77e4adbe authored tarafından David Ostrovsky's avatar David Ostrovsky Kaydeden (comit) Miklos Vajna

mork driver implementation

This is a preparation for merge into master, feature/mork
branch is obsoslete and shouldn't be used any more. In
context of this change the usage of old mozilla based mork
driver depends on platform: all non windows platforms use
this new mork driver, windows still uses mozilla.

Because mozilla driver shipping was stripped on feature/mork
branch for all platforms, the corresponding commits were
changed prior to creating this change (the build file changes
are reverted now). So the build and shipping of different mork
driver implementation should be implemented from scratch:
mozilla on windows, new mork dirver on all other platforms.

Currently the new mork dirver is compiled (on all platforms),
but not used. It can be tested with mork_helper executable.

fdo#51004

Change-Id: Ib2413ab6856f163337aa311c4bf7b1182d6c6f63
Reviewed-on: https://gerrit.libreoffice.org/635Reviewed-by: 's avatarMiklos Vajna <vmiklos@suse.cz>
Tested-by: 's avatarMiklos Vajna <vmiklos@suse.cz>
üst a60c63fd
......@@ -45,6 +45,7 @@ $(eval $(call gb_Helper_register_executables,NONE, \
idxdict \
lngconvex \
localize \
mork_helper \
mkunroll \
osl_process_child \
pdf2xml \
......@@ -300,6 +301,7 @@ $(eval $(call gb_Helper_register_libraries,OOOLIBS, \
lwpft \
MacOSXSpell \
merged \
mork \
mozab2 \
mozabdrv \
msfilter \
......
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_Configuration_Configuration,driver_mork))
$(eval $(call gb_Configuration_add_spool_modules,driver_mork,connectivity/registry/mork,\
org/openoffice/Office/DataAccess/Drivers-mork.xcu \
))
$(eval $(call gb_Configuration_add_localized_datas,driver_mork,connectivity/registry/mork,\
org/openoffice/Office/DataAccess/Drivers.xcu \
))
# vim: set noet sw=4 ts=4:
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_Executable_Executable,mork_helper))
$(eval $(call gb_Executable_set_include,mork_helper,\
-I$(SRCDIR)/connectivity/source/inc \
$$(INCLUDE) \
))
$(eval $(call gb_Executable_use_sdk_api,mork_helper))
$(eval $(call gb_Executable_use_libraries,mork_helper,\
cppu \
cppuhelper \
mork \
sal \
))
$(eval $(call gb_Executable_add_exception_objects,mork_helper,\
connectivity/source/drivers/mork/mork_helper \
))
# vim:set shiftwidth=4 softtabstop=4 expandtab:
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_Library_Library,mork))
$(eval $(call gb_Library_set_componentfile,mork,connectivity/source/drivers/mork/mork))
$(eval $(call gb_Library_add_defs,mork,\
-DLO_DLLIMPLEMENTATION_MORK \
))
$(eval $(call gb_Library_set_include,mork,\
-I$(SRCDIR)/connectivity/source/inc \
$$(INCLUDE) \
))
$(eval $(call gb_Library_use_libraries,mork, \
comphelper \
cppu \
cppuhelper \
dbtools \
sal \
salhelper \
$(gb_STDLIBS) \
))
$(eval $(call gb_Library_use_sdk_api,mork))
$(eval $(call gb_Library_add_exception_objects,mork, \
connectivity/source/drivers/mork/MColumns \
connectivity/source/drivers/mork/MConfigAccess \
connectivity/source/drivers/mork/MColumnAlias \
connectivity/source/drivers/mork/MNSFolders \
connectivity/source/drivers/mork/MNSINIParser \
connectivity/source/drivers/mork/MNSProfileDiscover \
connectivity/source/drivers/mork/MorkParser \
connectivity/source/drivers/mork/MCatalog \
connectivity/source/drivers/mork/MConnection \
connectivity/source/drivers/mork/MDatabaseMetaData \
connectivity/source/drivers/mork/MDatabaseMetaDataHelper \
connectivity/source/drivers/mork/MDriver \
connectivity/source/drivers/mork/MStatement \
connectivity/source/drivers/mork/MResultSet \
connectivity/source/drivers/mork/MResultSetMetaData \
connectivity/source/drivers/mork/MPreparedStatement \
connectivity/source/drivers/mork/MQueryHelper \
connectivity/source/drivers/mork/MServices \
connectivity/source/drivers/mork/MTable \
connectivity/source/drivers/mork/MTables \
))
# vim: set noet sw=4 ts=4:
......@@ -38,12 +38,14 @@ $(eval $(call gb_Module_add_targets,connectivity,\
Configuration_flat \
Configuration_mysql \
Configuration_odbc \
Executable_mork_helper \
Library_calc \
Library_dbase \
Library_dbpool2 \
Library_dbtools \
Library_file \
Library_flat \
Library_mork \
Library_mysql \
Library_odbc \
Library_odbcbase \
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
<oor:component-data oor:name="Drivers" oor:package="org.openoffice.Office.DataAccess" xmlns:install="http://openoffice.org/2004/installation" xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<node oor:name="Installed" install:module="mork">
<node oor:name="sdbc:address:mozilla:" oor:op="replace">
<prop oor:name="Driver">
<value>com.sun.star.comp.sdbc.MozabDriver</value>
</prop>
<prop oor:name="DriverTypeDisplayName" oor:type="xs:string">
<value xml:lang="en-US">SeaMonkey Address Book</value>
</prop>
<node oor:name="Features">
<node oor:name="EscapeDateTime" oor:op="replace">
<prop oor:name="Value" oor:type="xs:boolean">
<value>true</value>
</prop>
</node>
</node>
<node oor:name="MetaData">
<node oor:name="SupportsBrowsing" oor:op="replace">
<prop oor:name="Value" oor:type="xs:boolean">
<value>true</value>
</prop>
</node>
</node>
</node>
<node oor:name="sdbc:address:thunderbird:" oor:op="replace">
<prop oor:name="Driver">
<value>com.sun.star.comp.sdbc.MorkDriver</value>
</prop>
<prop oor:name="DriverTypeDisplayName" oor:type="xs:string">
<value xml:lang="en-US">Thunderbird/Icedove Address Book</value>
</prop>
<node oor:name="Features">
<node oor:name="EscapeDateTime" oor:op="replace">
<prop oor:name="Value" oor:type="xs:boolean">
<value>true</value>
</prop>
</node>
</node>
<node oor:name="MetaData">
<node oor:name="SupportsBrowsing" oor:op="replace">
<prop oor:name="Value" oor:type="xs:boolean">
<value>true</value>
</prop>
</node>
</node>
</node>
</node>
</oor:component-data>
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include "MCatalog.hxx"
#include "MConnection.hxx"
#include "MTables.hxx"
#include <com/sun/star/sdbc/XRow.hpp>
#include <com/sun/star/sdbc/XResultSet.hpp>
#include <cppuhelper/interfacecontainer.h>
// -------------------------------------------------------------------------
using namespace connectivity::mork;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::sdbcx;
using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::lang;
using namespace ::cppu;
// -------------------------------------------------------------------------
OCatalog::OCatalog(OConnection* _pCon) : connectivity::sdbcx::OCatalog(_pCon)
,m_pConnection(_pCon)
,m_xMetaData(m_pConnection->getMetaData( ))
{
// osl_incrementInterlockedCount( &m_refCount );
// refreshTables();
// refreshViews();
// refreshGroups();
// refreshUsers();
// osl_decrementInterlockedCount( &m_refCount );
}
// -------------------------------------------------------------------------
void OCatalog::refreshTables()
{
TStringVector aVector;
Sequence< ::rtl::OUString > aTypes(1);
aTypes[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("%"));
Reference< XResultSet > xResult = m_xMetaData->getTables(Any(),
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("%")),::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("%")),aTypes);
if(xResult.is())
{
Reference< XRow > xRow(xResult,UNO_QUERY);
::rtl::OUString aName;
while(xResult->next())
{
aName = xRow->getString(3);
aVector.push_back(aName);
}
}
if(m_pTables)
m_pTables->reFill(aVector);
else
m_pTables = new OTables(m_xMetaData,*this,m_aMutex,aVector);
}
// -------------------------------------------------------------------------
void OCatalog::refreshViews()
{
}
// -------------------------------------------------------------------------
void OCatalog::refreshGroups()
{
}
// -------------------------------------------------------------------------
void OCatalog::refreshUsers()
{
}
// -----------------------------------------------------------------------------
// XTablesSupplier
Reference< XNameAccess > SAL_CALL OCatalog::getTables( ) throw(RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
checkDisposed(rBHelper.bDisposed);
try
{
if(!m_pTables || m_pConnection->getForceLoadTables())
refreshTables();
}
catch( const RuntimeException& )
{
// allowed to leave this method
throw;
}
catch( const Exception& )
{
// allowed
}
return const_cast<OCatalog*>(this)->m_pTables;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef _CONNECTIVITY_MORK_CATALOG_HXX_
#define _CONNECTIVITY_MORK_CATALOG_HXX_
#include "connectivity/sdbcx/VCatalog.hxx"
namespace connectivity
{
namespace mork
{
// please don't name the class the same name as in an other namespaces
// some compilers have problems with this task as I noticed on windows
class OConnection;
class OCatalog : public connectivity::sdbcx::OCatalog
{
OConnection* m_pConnection; // used to get the metadata
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData > m_xMetaData; // just to make things easier
public:
// implementation of the pure virtual methods
virtual void refreshTables();
virtual void refreshViews() ;
virtual void refreshGroups();
virtual void refreshUsers() ;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getTables( ) throw(::com::sun::star::uno::RuntimeException);
public:
OCatalog(OConnection* _pCon);
OConnection* getConnection() const { return m_pConnection; }
sdbcx::OCollection* getPrivateTables() const { return m_pTables;}
sdbcx::OCollection* getPrivateViews() const { return m_pViews; }
};
}
}
#endif // _CONNECTIVITY_MORK_CATALOG_HXX_
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <sal/macros.h>
#include "MColumnAlias.hxx"
#include "MConnection.hxx"
#include "MExtConfigAccess.hxx"
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <tools/diagnose_ex.h>
#include <algorithm>
#include <functional>
using namespace ::connectivity;
using namespace ::connectivity::mork;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::container;
//------------------------------------------------------------------------------
OColumnAlias::OColumnAlias( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB )
{
static const sal_Char* s_pProgrammaticNames[] =
{
"FirstName",
"LastName",
"DisplayName",
"NickName",
"PrimaryEmail",
"SecondEmail",
"PreferMailFormat",
"WorkPhone",
"HomePhone",
"FaxNumber",
"PagerNumber",
"CellularNumber",
"HomeAddress",
"HomeAddress2",
"HomeCity",
"HomeState",
"HomeZipCode",
"HomeCountry",
"WorkAddress",
"WorkAddress2",
"WorkCity",
"WorkState",
"WorkZipCode",
"WorkCountry",
"JobTitle",
"Department",
"Company",
"WebPage1",
"WebPage2",
"BirthYear",
"BirthMonth",
"BirthDay",
"Custom1",
"Custom2",
"Custom3",
"Custom4",
"Notes",
};
for ( size_t i = 0; i < sizeof( s_pProgrammaticNames ) / sizeof( s_pProgrammaticNames[0] ); ++i )
m_aAliasMap[ ::rtl::OUString::createFromAscii( s_pProgrammaticNames[i] ) ] = AliasEntry( s_pProgrammaticNames[i], i );
initialize( _rxORB );
}
//------------------------------------------------------------------------------
void OColumnAlias::initialize( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB )
{
// open our driver settings config node
// the config path for our own driver's settings
Reference< XPropertySet > xDriverNode = createDriverConfigNode( _rxORB );
if ( xDriverNode.is() )
{
try
{
//.............................................................
Reference< XNameAccess > xAliasesNode;
xDriverNode->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ColumnAliases")) ) >>= xAliasesNode;
OSL_ENSURE( xAliasesNode.is(), "OColumnAlias::setAlias: missing the aliases node!" );
// this is a set of string nodes
Sequence< ::rtl::OUString > aProgrammaticNames;
if ( xAliasesNode.is() )
aProgrammaticNames = xAliasesNode->getElementNames();
//.............................................................
// travel through all the set elements
const ::rtl::OUString* pProgrammaticNames = aProgrammaticNames.getConstArray();
const ::rtl::OUString* pProgrammaticNamesEnd = pProgrammaticNames + aProgrammaticNames.getLength();
::rtl::OUString sAssignedAlias;
for ( ; pProgrammaticNames < pProgrammaticNamesEnd; ++pProgrammaticNames )
{
OSL_VERIFY( xAliasesNode->getByName( *pProgrammaticNames ) >>= sAssignedAlias );
// normalize in case the config data is corrupted
// (what we really don't need is an empty alias ...)
if ( sAssignedAlias.isEmpty() )
sAssignedAlias = *pProgrammaticNames;
::rtl::OString sAsciiProgrammaticName( ::rtl::OUStringToOString( *pProgrammaticNames, RTL_TEXTENCODING_ASCII_US ) );
//.............................................................
#if OSL_DEBUG_LEVEL > 0
bool bFound = false;
#endif
for ( AliasMap::iterator search = m_aAliasMap.begin();
( search != m_aAliasMap.end() );
++search
)
{
if ( search->second.programmaticAsciiName.equals( sAsciiProgrammaticName ) )
{
AliasEntry entry( search->second );
m_aAliasMap.erase( search );
m_aAliasMap[ sAssignedAlias ] = entry;
#if OSL_DEBUG_LEVEL > 0
bFound = true;
#endif
break;
}
}
OSL_ENSURE( bFound, "OColumnAlias::setAlias: did not find a programmatic name which exists in the configuration!" );
}
}
catch( const Exception& )
{
DBG_UNHANDLED_EXCEPTION();
}
}
}
//------------------------------------------------------------------
::rtl::OString OColumnAlias::getProgrammaticNameOrFallbackToUTF8Alias( const ::rtl::OUString& _rAlias ) const
{
AliasMap::const_iterator pos = m_aAliasMap.find( _rAlias );
if ( pos == m_aAliasMap.end() )
{
OSL_FAIL( "OColumnAlias::getProgrammaticNameOrFallbackToUTF8Alias: no programmatic name for this alias!" );
return ::rtl::OUStringToOString( _rAlias, RTL_TEXTENCODING_UTF8 );
}
return pos->second.programmaticAsciiName;
}
//------------------------------------------------------------------
bool OColumnAlias::isColumnSearchable( const ::rtl::OUString _alias ) const
{
::rtl::OString sProgrammatic = getProgrammaticNameOrFallbackToUTF8Alias( _alias );
return ( !sProgrammatic.equals( "HomeCountry" )
&& !sProgrammatic.equals( "WorkCountry" )
);
// for those, we know that they're not searchable in the Mozilla/LDAP implementation.
// There might be more ...
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef _CONNECTIVITY_MORK_COLUMNALIAS_HXX_
#define _CONNECTIVITY_MORK_COLUMNALIAS_HXX_
#include <unotools/confignode.hxx>
#include <osl/mutex.hxx>
#include <vector>
#include <boost/unordered_map.hpp>
namespace connectivity
{
namespace mork
{
class OColumnAlias
{
public:
struct AliasEntry
{
::rtl::OString programmaticAsciiName;
size_t columnPosition;
AliasEntry()
:programmaticAsciiName()
,columnPosition( 0 )
{
}
AliasEntry( const sal_Char* _programmaticAsciiName, size_t _columnPosition )
:programmaticAsciiName( _programmaticAsciiName )
,columnPosition( _columnPosition )
{
}
};
typedef ::boost::unordered_map< ::rtl::OUString, AliasEntry, ::rtl::OUStringHash > AliasMap;
private:
AliasMap m_aAliasMap;
public:
OColumnAlias( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & );
inline bool hasAlias( const ::rtl::OUString& _rAlias ) const
{
return m_aAliasMap.find( _rAlias ) != m_aAliasMap.end();
}
::rtl::OString getProgrammaticNameOrFallbackToUTF8Alias( const ::rtl::OUString& _rAlias ) const;
inline AliasMap::const_iterator begin() const { return m_aAliasMap.begin(); }
inline AliasMap::const_iterator end() const { return m_aAliasMap.end(); }
bool isColumnSearchable( const ::rtl::OUString _alias ) const;
private:
void initialize( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB );
};
}
}
#endif // _CONNECTIVITY_MORK_COLUMNALIAS_HXX_
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include "MColumns.hxx"
#include "connectivity/sdbcx/VColumn.hxx"
#include <com/sun/star/sdbc/XRow.hpp>
#include <com/sun/star/sdbc/XResultSet.hpp>
#include <com/sun/star/sdbc/DataType.hpp>
#include <com/sun/star/sdbc/ColumnValue.hpp>
#include "MTable.hxx"
#include "MTables.hxx"
#include "MCatalog.hxx"
#include <comphelper/types.hxx>
#include "connectivity/dbtools.hxx"
using namespace ::comphelper;
using namespace connectivity::mork;
using namespace connectivity::sdbcx;
using namespace connectivity;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::lang;
sdbcx::ObjectType OColumns::createObject(const ::rtl::OUString& _rName)
{
Reference< XResultSet > xResult = m_pTable->getConnection()->getMetaData()->getColumns(Any(),
m_pTable->getSchema(),m_pTable->getTableName(),_rName);
sdbcx::ObjectType xRet = NULL;
if(xResult.is())
{
Reference< XRow > xRow(xResult,UNO_QUERY);