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 | |
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')
-rw-r--r-- | extensions/source/dbpilots/controlwizard.cxx | 3 | ||||
-rw-r--r-- | extensions/source/dbpilots/gridwizard.cxx | 9 | ||||
-rw-r--r-- | extensions/source/propctrlr/formcomponenthandler.cxx | 9 |
3 files changed, 6 insertions, 15 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 ) ); diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx index 362861d1271c..c20126ef3b6a 100644 --- a/extensions/source/propctrlr/formcomponenthandler.cxx +++ b/extensions/source/propctrlr/formcomponenthandler.cxx @@ -220,12 +220,10 @@ namespace pcr if ( (eType == TypeClass_STRING || eType == TypeClass_SEQUENCE) && lcl_isLanguageDependentProperty( _rPropertyName ) ) { - static const char s_sResourceResolverPropName[] = "ResourceResolver"; - Reference< resource::XStringResourceResolver > xStringResourceResolver; try { - xStringResourceResolver.set( _xComponent->getPropertyValue( s_sResourceResolverPropName ),UNO_QUERY); + xStringResourceResolver.set( _xComponent->getPropertyValue( "ResourceResolver" ),UNO_QUERY); if( xStringResourceResolver.is() && xStringResourceResolver->getLocales().getLength() > 0 ) { @@ -373,7 +371,6 @@ namespace pcr else if( eType == TypeClass_SEQUENCE ) { static const char aDot[] = "."; - static const char aEsc[] = "&"; // Put strings into resource using new ids Sequence< OUString > aNewStrings; @@ -456,9 +453,7 @@ namespace pcr OUString aStr = pNewStrings[i]; xStringResourceManager->setString( aPureIdStr, aStr ); - OUString aIdStr = aEsc; - aIdStr += aPureIdStr; - pNewIdStrings[i] = aIdStr; + pNewIdStrings[i] = "&" + aPureIdStr; } aValue <<= aNewIdStrings; |