diff options
Diffstat (limited to 'connectivity/source/drivers/file/FConnection.cxx')
-rw-r--r-- | connectivity/source/drivers/file/FConnection.cxx | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/connectivity/source/drivers/file/FConnection.cxx b/connectivity/source/drivers/file/FConnection.cxx index 283bee8fee45..38ce342cb5e2 100644 --- a/connectivity/source/drivers/file/FConnection.cxx +++ b/connectivity/source/drivers/file/FConnection.cxx @@ -32,7 +32,7 @@ #include <com/sun/star/ucb/XContentIdentifier.hpp> #include <tools/urlobj.hxx> #include <file/FCatalog.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <unotools/pathoptions.hxx> #include <ucbhelper/content.hxx> #include <connectivity/dbcharset.hxx> @@ -132,7 +132,7 @@ void OConnection::construct(const OUString& url,const Sequence< PropertyValue >& OUString aFileName = aDSN; INetURLObject aURL; aURL.SetSmartProtocol(INetProtocol::File); - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) { SvtPathOptions aPathOptions; aFileName = aPathOptions.SubstituteVariable(aFileName); @@ -405,7 +405,7 @@ sal_Int64 SAL_CALL OConnection::getSomething( const Sequence< sal_Int8 >& rId ) return comphelper::getSomethingImpl(rId, this); } -Sequence< sal_Int8 > OConnection::getUnoTunnelId() +const Sequence< sal_Int8 > & OConnection::getUnoTunnelId() { static const comphelper::UnoIdInit implId; return implId.getSeq(); @@ -413,17 +413,13 @@ Sequence< sal_Int8 > OConnection::getUnoTunnelId() void OConnection::throwUrlNotValid(const OUString & _rsUrl,const OUString & _rsMessage) { - SQLException aError; - aError.Message = getResources().getResourceStringWithSubstitution( - STR_NO_VALID_FILE_URL, - "$URL$", _rsUrl - ); - - aError.SQLState = "S1000"; - aError.ErrorCode = 0; - aError.Context = static_cast< XConnection* >(this); + XConnection* context = this; + css::uno::Any next; if (!_rsMessage.isEmpty()) - aError.NextException <<= SQLException(_rsMessage, aError.Context, OUString(), 0, Any()); + next <<= SQLException(_rsMessage, context, OUString(), 0, Any()); + SQLException aError( + getResources().getResourceStringWithSubstitution(STR_NO_VALID_FILE_URL, "$URL$", _rsUrl), + context, "S1000", 0, next); throw aError; } |