diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-01-08 19:54:55 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-01-09 13:01:49 +0100 |
commit | ac396f2f6b058ddff8c394443669b8c5d8b97b71 (patch) | |
tree | fc5120838a69ced58c3cd2333718ffeb6d4adf67 /connectivity/source/commontools | |
parent | 0c20b68149797c8b0779534a8e0cb9045085d451 (diff) |
fix coverity parse errors
Change-Id: I3a1179947704452e3ffec02be59d0f7bf0b75ab0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109017
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'connectivity/source/commontools')
-rw-r--r-- | connectivity/source/commontools/conncleanup.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/commontools/dbtools.cxx | 30 | ||||
-rw-r--r-- | connectivity/source/commontools/dbtools2.cxx | 2 |
3 files changed, 17 insertions, 17 deletions
diff --git a/connectivity/source/commontools/conncleanup.cxx b/connectivity/source/commontools/conncleanup.cxx index f1d80581ff5a..210c618d6a60 100644 --- a/connectivity/source/commontools/conncleanup.cxx +++ b/connectivity/source/commontools/conncleanup.cxx @@ -35,7 +35,7 @@ namespace dbtools using namespace css::sdbc; using namespace css::lang; - const OUStringLiteral ACTIVE_CONNECTION_PROPERTY_NAME = u"ActiveConnection"; + constexpr OUStringLiteral ACTIVE_CONNECTION_PROPERTY_NAME = u"ActiveConnection"; OAutoConnectionDisposer::OAutoConnectionDisposer(const Reference< XRowSet >& _rxRowSet, const Reference< XConnection >& _rxConnection) :m_xRowSet( _rxRowSet ) diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx index f96e66e62c7e..cd9f2c9fc48f 100644 --- a/connectivity/source/commontools/dbtools.cxx +++ b/connectivity/source/commontools/dbtools.cxx @@ -917,7 +917,7 @@ Reference< XNumberFormatsSupplier> getNumberFormats( // ask the parent of the connection (should be a DatabaseAccess) Reference< XNumberFormatsSupplier> xReturn; Reference< XChild> xConnAsChild(_rxConn, UNO_QUERY); - static const OUStringLiteral sPropFormatsSupplier( u"NumberFormatsSupplier" ); + static constexpr OUStringLiteral sPropFormatsSupplier( u"NumberFormatsSupplier" ); if (xConnAsChild.is()) { Reference< XPropertySet> xConnParentProps(xConnAsChild->getParent(), UNO_QUERY); @@ -952,20 +952,20 @@ try Property* pNewProps = aNewProperties.getArray(); - static const OUStringLiteral sPropFormatsSupplier(u"FormatsSupplier"); - static const OUStringLiteral sPropCurrencySymbol(u"CurrencySymbol"); - static const OUStringLiteral sPropDecimals(u"Decimals"); - static const OUStringLiteral sPropEffectiveMin(u"EffectiveMin"); - static const OUStringLiteral sPropEffectiveMax(u"EffectiveMax"); - static const OUStringLiteral sPropEffectiveDefault(u"EffectiveDefault"); - static const OUStringLiteral sPropDefaultText(u"DefaultText"); - static const OUStringLiteral sPropDefaultDate(u"DefaultDate"); - static const OUStringLiteral sPropDefaultTime(u"DefaultTime"); - static const OUStringLiteral sPropValueMin(u"ValueMin"); - static const OUStringLiteral sPropValueMax(u"ValueMax"); - static const OUStringLiteral sPropDecimalAccuracy(u"DecimalAccuracy"); - static const OUStringLiteral sPropClassId(u"ClassId"); - static const OUStringLiteral sFormattedServiceName( u"com.sun.star.form.component.FormattedField" ); + static constexpr OUStringLiteral sPropFormatsSupplier(u"FormatsSupplier"); + static constexpr OUStringLiteral sPropCurrencySymbol(u"CurrencySymbol"); + static constexpr OUStringLiteral sPropDecimals(u"Decimals"); + static constexpr OUStringLiteral sPropEffectiveMin(u"EffectiveMin"); + static constexpr OUStringLiteral sPropEffectiveMax(u"EffectiveMax"); + static constexpr OUStringLiteral sPropEffectiveDefault(u"EffectiveDefault"); + static constexpr OUStringLiteral sPropDefaultText(u"DefaultText"); + static constexpr OUStringLiteral sPropDefaultDate(u"DefaultDate"); + static constexpr OUStringLiteral sPropDefaultTime(u"DefaultTime"); + static constexpr OUStringLiteral sPropValueMin(u"ValueMin"); + static constexpr OUStringLiteral sPropValueMax(u"ValueMax"); + static constexpr OUStringLiteral sPropDecimalAccuracy(u"DecimalAccuracy"); + static constexpr OUStringLiteral sPropClassId(u"ClassId"); + static constexpr OUStringLiteral sFormattedServiceName( u"com.sun.star.form.component.FormattedField" ); for (const Property& rOldProp : aOldProperties) { diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx index a57ca9749770..01cdcc03aa76 100644 --- a/connectivity/source/commontools/dbtools2.cxx +++ b/connectivity/source/commontools/dbtools2.cxx @@ -1014,7 +1014,7 @@ bool isAggregateColumn( const Reference< XPropertySet > &_xColumn ) { bool bAgg(false); - static const OUStringLiteral sAgg = u"AggregateFunction"; + static constexpr OUStringLiteral sAgg = u"AggregateFunction"; if ( _xColumn->getPropertySetInfo()->hasPropertyByName(sAgg) ) _xColumn->getPropertyValue(sAgg) >>= bAgg; |