diff options
Diffstat (limited to 'connectivity/source/drivers/dbase/DTable.cxx')
-rw-r--r-- | connectivity/source/drivers/dbase/DTable.cxx | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx index 98d598d0478f..22caafc43fc6 100644 --- a/connectivity/source/drivers/dbase/DTable.cxx +++ b/connectivity/source/drivers/dbase/DTable.cxx @@ -739,14 +739,12 @@ Sequence< Type > SAL_CALL ODbaseTable::getTypes( ) std::vector<Type> aOwnTypes; aOwnTypes.reserve(aTypes.getLength()); - const Type* pBegin = aTypes.getConstArray(); - const Type* pEnd = pBegin + aTypes.getLength(); - for(;pBegin != pEnd;++pBegin) + for (auto& type : aTypes) { - if(*pBegin != cppu::UnoType<XKeysSupplier>::get() && - *pBegin != cppu::UnoType<XDataDescriptorFactory>::get()) + if(type != cppu::UnoType<XKeysSupplier>::get() && + type != cppu::UnoType<XDataDescriptorFactory>::get()) { - aOwnTypes.push_back(*pBegin); + aOwnTypes.push_back(type); } } aOwnTypes.push_back(cppu::UnoType<css::lang::XUnoTunnel>::get()); @@ -1054,7 +1052,7 @@ bool ODbaseTable::CreateImpl() try { Content aContent(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext()); - aContent.executeCommand( "delete", css::uno::Any( true ) ); + aContent.executeCommand( u"delete"_ustr, css::uno::Any( true ) ); } catch(const Exception&) // an exception is thrown when no file exists { @@ -1082,7 +1080,7 @@ bool ODbaseTable::CreateImpl() try { Content aMemoContent(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext()); - aMemoContent.executeCommand( "delete", css::uno::Any( true ) ); + aMemoContent.executeCommand( u"delete"_ustr, css::uno::Any( true ) ); } catch(const Exception&) { @@ -1100,7 +1098,7 @@ bool ODbaseTable::CreateImpl() try { Content aMemoContent(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext()); - aMemoContent.executeCommand( "delete", css::uno::Any( true ) ); + aMemoContent.executeCommand( u"delete"_ustr, css::uno::Any( true ) ); } catch(const ContentCreationException&) { @@ -1441,7 +1439,7 @@ bool ODbaseTable::Drop_Static(std::u16string_view _sUrl, bool _bHasMemoFields, O try { ::ucbhelper::Content aDeleteContent( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), Reference< XCommandEnvironment >(), comphelper::getProcessComponentContext() ); - aDeleteContent.executeCommand( "delete", Any( true ) ); + aDeleteContent.executeCommand( u"delete"_ustr, Any( true ) ); } catch(const Exception&) { @@ -2310,14 +2308,14 @@ namespace { Content aContent(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext()); - Sequence< PropertyValue > aProps{ { "Title", + Sequence< PropertyValue > aProps{ { u"Title"_ustr, -1, // n/a Any(sNewName), css::beans::PropertyState_DIRECT_VALUE } }; Sequence< Any > aValues; - aContent.executeCommand( "setPropertyValues",Any(aProps) ) >>= aValues; + aContent.executeCommand( u"setPropertyValues"_ustr,Any(aProps) ) >>= aValues; if(aValues.hasElements() && aValues[0].hasValue()) - throw Exception("setPropertyValues returned non-zero", nullptr); + throw Exception(u"setPropertyValues returned non-zero"_ustr, nullptr); } catch(const Exception&) { |