29#include <com/sun/star/container/XChild.hpp>
30#include <com/sun/star/ucb/ContentCreationException.hpp>
31#include <com/sun/star/ucb/XContent.hpp>
32#include <com/sun/star/ucb/XContentIdentifier.hpp>
41#include <osl/thread.h>
59 , m_bAutoCommit(false)
61 , m_bShowDeleted(false)
62 , m_bCaseSensitiveExtension( true )
63 , m_bCheckSQL92(false)
64 , m_bDefaultTextEncoding(false)
80 OUString sMyExtension(
getExtension().toAsciiLowerCase() );
81 OUString sExt( _rExt.toAsciiLowerCase() );
83 return sMyExtension == sExt;
89 osl_atomic_increment( &m_refCount );
92 const PropertyValue *pIter = info.getConstArray();
93 const PropertyValue *pEnd = pIter + info.getLength();
94 for(;pIter != pEnd;++pIter)
96 if( pIter->Name ==
"Extension" )
97 OSL_VERIFY( pIter->Value >>= aExt );
98 else if( pIter->Name ==
"CharSet" )
107 OSL_VERIFY( pIter->Value >>= sIanaName );
111 if (aLookup != aLookupIanaName.
end())
117 else if( pIter->Name ==
"ShowDeleted" )
121 else if( pIter->Name ==
"EnableSQL92Check" )
128 sal_Int32 nLen = url.indexOf(
':');
129 nLen = url.indexOf(
':',nLen+1);
130 OUString aDSN(url.copy(nLen+1));
132 OUString aFileName = aDSN;
134 aURL.SetSmartProtocol(INetProtocol::File);
141 aURL.SetSmartURL(aFileName);
153 if ( !aExt.isEmpty() )
163 catch(ContentCreationException& e)
185 m_xDir = aParent.createDynamicCursor(aProps, ::ucbhelper::INCLUDE_DOCUMENTS_ONLY );
189 OSL_FAIL(
"OConnection::construct: ::ucbhelper::Content is neither a folder nor a document! How's that?!");
190 throw SQLException();
201 throw SQLException();
203 catch(
const Exception&)
205 osl_atomic_decrement( &m_refCount );
209 osl_atomic_decrement( &m_refCount );
218 ::osl::MutexGuard aGuard(
m_aMutex );
229 ::osl::MutexGuard aGuard(
m_aMutex );
234 pStmt->construct(
sql);
252 ::osl::MutexGuard aGuard(
m_aMutex );
260 ::osl::MutexGuard aGuard(
m_aMutex );
276 ::osl::MutexGuard aGuard(
m_aMutex );
278 return OConnection_BASE::rBHelper.bDisposed;
283 ::osl::MutexGuard aGuard(
m_aMutex );
299 ::osl::MutexGuard aGuard(
m_aMutex );
308 ::osl::MutexGuard aGuard(
m_aMutex );
348 ::osl::MutexGuard aGuard(
m_aMutex );
377 ::osl::MutexGuard aGuard(
m_aMutex );
418 STR_NO_VALID_FILE_URL,
422 aError.SQLState =
"S1000";
423 aError.ErrorCode = 0;
424 aError.Context =
static_cast< XConnection*
>(
this);
425 if (!_rsMessage.isEmpty())
426 aError.NextException <<= SQLException(_rsMessage, aError.Context, OUString(), 0,
Any());
connectivity::OMetaConnection OConnection_BASE
OUString SubstituteVariable(const OUString &rVar) const
const css::uno::Sequence< sal_Int8 > & getSeq() const
OUString getResourceStringWithSubstitution(TranslateId pResId, const char *_pAsciiPatternToReplace, const OUString &_rStringToSubstitute) const
loads a string from the shared resource file, and replaces a given ASCII pattern with a given string
css::uno::WeakReference< css::sdbcx::XTablesSupplier > m_xCatalog
css::uno::Reference< css::ucb::XContent > m_xContent
virtual sal_Int32 SAL_CALL getTransactionIsolation() override
void throwUrlNotValid(const OUString &_rsUrl, const OUString &_rsMessage)
virtual void SAL_CALL setCatalog(const OUString &catalog) override
bool matchesExtension(const OUString &_rExt) const
virtual void SAL_CALL setAutoCommit(sal_Bool autoCommit) override
virtual void SAL_CALL setTransactionIsolation(sal_Int32 level) override
virtual void SAL_CALL disposing() override
virtual css::uno::Reference< css::sdbc::XDatabaseMetaData > SAL_CALL getMetaData() override
bool m_bDefaultTextEncoding
virtual css::uno::Reference< css::sdbcx::XTablesSupplier > createCatalog()
const css::uno::Reference< css::ucb::XContent > & getContent() const
virtual void SAL_CALL rollback() override
virtual OUString SAL_CALL nativeSQL(const OUString &sql) override
virtual void SAL_CALL close() override final
css::uno::Reference< css::ucb::XDynamicResultSet > m_xDir
virtual css::uno::Reference< css::sdbc::XPreparedStatement > SAL_CALL prepareCall(const OUString &sql) override
virtual void construct(const OUString &_rUrl, const css::uno::Sequence< css::beans::PropertyValue > &_rInfo)
virtual sal_Bool SAL_CALL isClosed() override final
bool isCaseSensitiveExtension() const
virtual ~OConnection() override
virtual sal_Int64 SAL_CALL getSomething(const css::uno::Sequence< sal_Int8 > &aIdentifier) override
virtual void SAL_CALL clearWarnings() override
virtual css::uno::Reference< css::sdbc::XPreparedStatement > SAL_CALL prepareStatement(const OUString &sql) override
virtual sal_Bool SAL_CALL getAutoCommit() override
virtual void SAL_CALL setTypeMap(const css::uno::Reference< css::container::XNameAccess > &typeMap) override
virtual void SAL_CALL setReadOnly(sal_Bool readOnly) override
virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getTypeMap() override
OUString m_aFilenameExtension
virtual sal_Bool SAL_CALL isReadOnly() override
virtual OUString SAL_CALL getCatalog() override
css::uno::Reference< css::ucb::XDynamicResultSet > getDir() const
virtual css::uno::Any SAL_CALL getWarnings() override
const OUString & getExtension() const
static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId()
virtual void SAL_CALL commit() override
css::uno::Reference< css::ucb::XContent > get() const
css::uno::Reference< css::ucb::XDynamicResultSet > createDynamicCursor(const css::uno::Sequence< OUString > &rPropertyNames, ResultSetInclude eMode=INCLUDE_FOLDERS_AND_DOCUMENTS)
sal_Int64 getSomethingImpl(const css::uno::Sequence< sal_Int8 > &rId, T *pThis, FallbackToGetSomethingOf< Base >={})
Reference< XComponentContext > getProcessComponentContext()
IMPLEMENT_SERVICE_INFO(OStatement,"com.sun.star.sdbc.driver.file.Statement","com.sun.star.sdbc.Statement")
void checkDisposed(bool _bThrow)
detail::Optional< sal_uInt16 >::type tryAccess< sal_uInt16 >(css::uno::Any const &any)