diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-01-11 08:35:48 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-01-11 14:27:51 +0100 |
commit | 74b3924a98dfeeec719f7bc27a2e0a2e1a597167 (patch) | |
tree | f2375ba227971ed7b080b3fa7259e6a741435282 /connectivity/source/drivers/writer/WConnection.cxx | |
parent | 4a0f40113d83742792d765eb1abcbb239cbbf2dd (diff) |
connectivity: various small cleanups in the Writer driver
Change-Id: I91735c3e92262fd37966c53f973d5eee1522cd61
Reviewed-on: https://gerrit.libreoffice.org/47741
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'connectivity/source/drivers/writer/WConnection.cxx')
-rw-r--r-- | connectivity/source/drivers/writer/WConnection.cxx | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/connectivity/source/drivers/writer/WConnection.cxx b/connectivity/source/drivers/writer/WConnection.cxx index d0e6b2983c14..bbcd869f2271 100644 --- a/connectivity/source/drivers/writer/WConnection.cxx +++ b/connectivity/source/drivers/writer/WConnection.cxx @@ -34,10 +34,10 @@ #include <cppuhelper/exc_hlp.hxx> #include <comphelper/processfactory.hxx> -typedef connectivity::file::OConnection OConnection_BASE; - using namespace ::com::sun::star; +using OConnection_BASE = connectivity::file::OConnection; + namespace connectivity { namespace writer @@ -45,20 +45,17 @@ namespace writer OWriterConnection::OWriterConnection(ODriver* _pDriver) : OConnection(_pDriver),m_nDocCount(0) { - // m_aFilenameExtension is not used } -OWriterConnection::~OWriterConnection() -{ -} +OWriterConnection::~OWriterConnection() = default; -void OWriterConnection::construct(const OUString& url,const uno::Sequence< beans::PropertyValue >& info) +void OWriterConnection::construct(const OUString& rURL, const uno::Sequence< beans::PropertyValue >& rInfo) { // open file - sal_Int32 nLen = url.indexOf(':'); - nLen = url.indexOf(':',nLen+1); - OUString aDSN(url.copy(nLen+1)); + sal_Int32 nLen = rURL.indexOf(':'); + nLen = rURL.indexOf(':',nLen+1); + OUString aDSN(rURL.copy(nLen+1)); m_aFileName = aDSN; INetURLObject aURL; @@ -78,8 +75,8 @@ void OWriterConnection::construct(const OUString& url,const uno::Sequence< beans m_sPassword.clear(); const char pPwd[] = "password"; - const beans::PropertyValue* pIter = info.getConstArray(); - const beans::PropertyValue* pEnd = pIter + info.getLength(); + const beans::PropertyValue* pIter = rInfo.getConstArray(); + const beans::PropertyValue* pEnd = pIter + rInfo.getLength(); for (; pIter != pEnd; ++pIter) { if (pIter->Name == pPwd) @@ -210,7 +207,7 @@ css::uno::Reference< css::sdbcx::XTablesSupplier > OWriterConnection::createCata uno::Reference< css::sdbcx::XTablesSupplier > xTab = m_xCatalog; if (!xTab.is()) { - OWriterCatalog* pCat = new OWriterCatalog(this); + auto pCat = new OWriterCatalog(this); xTab = pCat; m_xCatalog = xTab; } |