diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-04 12:28:59 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-04 13:15:29 +0000 |
commit | 2dfc4c0845c72b3a1cf19546a1606907f36eea42 (patch) | |
tree | 8df986c777d2b6847782a4395af50fbca5eea96f /extensions/source/dbpilots | |
parent | 859204a52351c4d5d146e8b22d14bd4a44f294e9 (diff) |
loplugin:oncevar in desktop..filter
Change-Id: I21c47cacbcd68f06eea7ccbbfa6d04fc65e2b7ee
Reviewed-on: https://gerrit.libreoffice.org/30564
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'extensions/source/dbpilots')
-rw-r--r-- | extensions/source/dbpilots/controlwizard.cxx | 3 | ||||
-rw-r--r-- | extensions/source/dbpilots/gridwizard.cxx | 9 |
2 files changed, 4 insertions, 8 deletions
diff --git a/extensions/source/dbpilots/controlwizard.cxx b/extensions/source/dbpilots/controlwizard.cxx index 8f9a21cabfb6..ad1d236921c3 100644 --- a/extensions/source/dbpilots/controlwizard.cxx +++ b/extensions/source/dbpilots/controlwizard.cxx @@ -574,7 +574,6 @@ namespace dbp if (xColumns.is()) { m_aContext.aFieldNames = xColumns->getElementNames(); - static const char s_sFieldTypeProperty[] = "Type"; const OUString* pBegin = m_aContext.aFieldNames.getConstArray(); const OUString* pEnd = pBegin + m_aContext.aFieldNames.getLength(); for(;pBegin != pEnd;++pBegin) @@ -584,7 +583,7 @@ namespace dbp { Reference< XPropertySet > xColumn; xColumns->getByName(*pBegin) >>= xColumn; - xColumn->getPropertyValue(s_sFieldTypeProperty) >>= nFieldType; + xColumn->getPropertyValue("Type") >>= nFieldType; } catch(const Exception&) { diff --git a/extensions/source/dbpilots/gridwizard.cxx b/extensions/source/dbpilots/gridwizard.cxx index 3795fa5e0bab..698318bdae73 100644 --- a/extensions/source/dbpilots/gridwizard.cxx +++ b/extensions/source/dbpilots/gridwizard.cxx @@ -100,9 +100,6 @@ namespace dbp if (!xColumnFactory.is() || !xColumnContainer.is()) return; - static const char s_sDataFieldProperty [] = "DataField"; - static const char s_sLabelProperty [] = "Label"; - static const char s_sWidthProperty [] = "Width"; static const char s_sMouseWheelBehavior[] = "MouseWheelBehavior"; static const char s_sEmptyString[] = ""; @@ -201,11 +198,11 @@ namespace dbp disambiguateName(xExistenceChecker, sColumnName); // the data field the column should be bound to - xColumn->setPropertyValue(s_sDataFieldProperty, makeAny(*pFormFieldName)); + xColumn->setPropertyValue("DataField", makeAny(*pFormFieldName)); // the label - xColumn->setPropertyValue(s_sLabelProperty, makeAny(*pFormFieldName + *pColumnLabelPostfix)); + xColumn->setPropertyValue("Label", makeAny(*pFormFieldName + *pColumnLabelPostfix)); // the width (<void/> => column will be auto-sized) - xColumn->setPropertyValue(s_sWidthProperty, Any()); + xColumn->setPropertyValue("Width", Any()); if ( xColumnPSI->hasPropertyByName( s_sMouseWheelBehavior ) ) xColumn->setPropertyValue( s_sMouseWheelBehavior, makeAny( MouseWheelBehavior::SCROLL_DISABLED ) ); |