diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-11-20 16:03:37 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-11-20 16:03:37 +0100 |
commit | ec5250dcc63f5c83c9747bbd7e2aae57291a5e8e (patch) | |
tree | 49035aa2563eb343baad613653746005559106ba /sfx2/source/sidebar/ResourceManager.cxx | |
parent | 8e0ef3a3964ff6b43adfa173c2286e437f36f2bc (diff) |
loplugin:staticmethods
Change-Id: Ia306219fdcce4633e85c34db343a99b21e88157e
Diffstat (limited to 'sfx2/source/sidebar/ResourceManager.cxx')
-rw-r--r-- | sfx2/source/sidebar/ResourceManager.cxx | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/sfx2/source/sidebar/ResourceManager.cxx b/sfx2/source/sidebar/ResourceManager.cxx index 7b639c4986be..97268e5a7bd0 100644 --- a/sfx2/source/sidebar/ResourceManager.cxx +++ b/sfx2/source/sidebar/ResourceManager.cxx @@ -54,6 +54,40 @@ bool getBool(utl::OConfigurationNode const & aNode, const char* pNodeName) return comphelper::getBOOL(aNode.getNodeValue(pNodeName)); } +css::uno::Sequence<OUString> BuildContextList (ContextList rContextList, bool isEnabled) +{ + const ::std::vector<ContextList::Entry>& entries = rContextList.GetEntries(); + + css::uno::Sequence<OUString> result(entries.size()); + long i = 0; + + for (::std::vector<ContextList::Entry>::const_iterator iEntry(entries.begin()), iEnd(entries.end()); + iEntry!=iEnd; ++iEntry) + { + OUString appName = iEntry->maContext.msApplication; + OUString contextName = iEntry->maContext.msContext; + OUString menuCommand = iEntry->msMenuCommand; + + OUString visibility; + if (isEnabled) + visibility = "visible"; + else + visibility = "hidden"; + + OUString element = appName + ", " + contextName +", " + visibility; + + if (menuCommand != "") + element += ", "+menuCommand; + + result[i] = element; + + i++; + } + + return result; + +} + } //end anonymous namespace ResourceManager::ResourceManager() @@ -382,40 +416,6 @@ void ResourceManager::ReadPanelList() maPanels.resize(nWriteIndex); } -css::uno::Sequence<OUString> ResourceManager::BuildContextList (ContextList rContextList, bool isEnabled) -{ - const ::std::vector<ContextList::Entry>& entries = rContextList.GetEntries(); - - css::uno::Sequence<OUString> result(entries.size()); - long i = 0; - - for (::std::vector<ContextList::Entry>::const_iterator iEntry(entries.begin()), iEnd(entries.end()); - iEntry!=iEnd; ++iEntry) - { - OUString appName = iEntry->maContext.msApplication; - OUString contextName = iEntry->maContext.msContext; - OUString menuCommand = iEntry->msMenuCommand; - - OUString visibility; - if (isEnabled) - visibility = "visible"; - else - visibility = "hidden"; - - OUString element = appName + ", " + contextName +", " + visibility; - - if (menuCommand != "") - element += ", "+menuCommand; - - result[i] = element; - - i++; - } - - return result; - -} - void ResourceManager::ReadContextList ( const utl::OConfigurationNode& rParentNode, ContextList& rContextList, |