diff options
author | Andre Fischer <af@apache.org> | 2013-05-08 09:48:36 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2013-05-20 11:33:30 +0100 |
commit | 11f8ed408d43f40de5f694d6b7d00cb7762ee84f (patch) | |
tree | 56a920759e63a3202c750cf21dc884832140e0d0 /sfx2/source/sidebar/ContextList.cxx | |
parent | 5e8a2c64799856ddc34ab5d468bd54d7302302f4 (diff) |
Resolves: #i122255# Store sidebar panel extension state
(non persistent)
(cherry picked from commit f6f8c047b73f8fc8b4c78b321761a26ef7ed96ba)
Change-Id: I917050dd57b3fa952200dd536b371f902661e88f
Diffstat (limited to 'sfx2/source/sidebar/ContextList.cxx')
-rw-r--r-- | sfx2/source/sidebar/ContextList.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sfx2/source/sidebar/ContextList.cxx b/sfx2/source/sidebar/ContextList.cxx index aebfdbd1897d..f7028c3962d8 100644 --- a/sfx2/source/sidebar/ContextList.cxx +++ b/sfx2/source/sidebar/ContextList.cxx @@ -50,6 +50,18 @@ const ContextList::Entry* ContextList::GetMatch (const Context& rContext) const +ContextList::Entry* ContextList::GetMatch (const Context& rContext) +{ + const ::std::vector<Entry>::const_iterator iEntry = FindBestMatch(rContext); + if (iEntry != maEntries.end()) + return const_cast<Entry*>(&*iEntry); + else + return NULL; +} + + + + ::std::vector<ContextList::Entry>::const_iterator ContextList::FindBestMatch (const Context& rContext) const { sal_Int32 nBestMatch (Context::NoMatch); |