summaryrefslogtreecommitdiff
path: root/sfx2/source/sidebar/ResourceManager.cxx
diff options
context:
space:
mode:
authorSzymon Kłos <eszkadev@gmail.com>2016-06-17 23:54:00 +0200
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2016-06-27 17:51:56 +0000
commit1df394503f1e62b091453c95c05a212892ae8d58 (patch)
tree4767346ce348cc498df09985b6fa431a45f255d3 /sfx2/source/sidebar/ResourceManager.cxx
parent0c80b4dfd27109def7a5bdc34c3fcc5499db6c0d (diff)
GSoC notebookbar: switching tabs depending on context
+ sfx2::sidebar::EnumContext moved to the vcl module + TabPage contains vector with context values + vcl builder reads control's contexts from the "class" mark + ContextTabControl shows tabs depending on context Change-Id: I661b0d3f35d46ace2a2e8eb1d374148f0c60017d Reviewed-on: https://gerrit.libreoffice.org/26447 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'sfx2/source/sidebar/ResourceManager.cxx')
-rw-r--r--sfx2/source/sidebar/ResourceManager.cxx46
1 files changed, 23 insertions, 23 deletions
diff --git a/sfx2/source/sidebar/ResourceManager.cxx b/sfx2/source/sidebar/ResourceManager.cxx
index 8958f3b4d5cd..d6a51a01f2e9 100644
--- a/sfx2/source/sidebar/ResourceManager.cxx
+++ b/sfx2/source/sidebar/ResourceManager.cxx
@@ -466,42 +466,42 @@ void ResourceManager::ReadContextList (
// application name may result in more than one value (eg
// DrawImpress will result in two enums, one for Draw and one
// for Impress).
- std::vector<EnumContext::Application> aApplications;
- EnumContext::Application eApplication (EnumContext::GetApplicationEnum(sApplicationName));
+ std::vector<vcl::EnumContext::Application> aApplications;
+ vcl::EnumContext::Application eApplication (vcl::EnumContext::GetApplicationEnum(sApplicationName));
- if (eApplication == EnumContext::Application_None
- && !sApplicationName.equals(EnumContext::GetApplicationName(EnumContext::Application_None)))
+ if (eApplication == vcl::EnumContext::Application_None
+ && !sApplicationName.equals(vcl::EnumContext::GetApplicationName(vcl::EnumContext::Application_None)))
{
// Handle some special names: abbreviations that make
// context descriptions more readable.
if (sApplicationName == "Writer")
- aApplications.push_back(EnumContext::Application_Writer);
+ aApplications.push_back(vcl::EnumContext::Application_Writer);
else if (sApplicationName == "Calc")
- aApplications.push_back(EnumContext::Application_Calc);
+ aApplications.push_back(vcl::EnumContext::Application_Calc);
else if (sApplicationName == "Draw")
- aApplications.push_back(EnumContext::Application_Draw);
+ aApplications.push_back(vcl::EnumContext::Application_Draw);
else if (sApplicationName == "Impress")
- aApplications.push_back(EnumContext::Application_Impress);
+ aApplications.push_back(vcl::EnumContext::Application_Impress);
else if (sApplicationName == "Chart")
- aApplications.push_back(EnumContext::Application_Chart);
+ aApplications.push_back(vcl::EnumContext::Application_Chart);
else if (sApplicationName == "DrawImpress")
{
// A special case among the special names: it is
// common to use the same context descriptions for
// both Draw and Impress. This special case helps to
// avoid duplication in the .xcu file.
- aApplications.push_back(EnumContext::Application_Draw);
- aApplications.push_back(EnumContext::Application_Impress);
+ aApplications.push_back(vcl::EnumContext::Application_Draw);
+ aApplications.push_back(vcl::EnumContext::Application_Impress);
}
else if (sApplicationName == "WriterVariants")
{
// Another special case for all Writer variants.
- aApplications.push_back(EnumContext::Application_Writer);
- aApplications.push_back(EnumContext::Application_WriterGlobal);
- aApplications.push_back(EnumContext::Application_WriterWeb);
- aApplications.push_back(EnumContext::Application_WriterXML);
- aApplications.push_back(EnumContext::Application_WriterForm);
- aApplications.push_back(EnumContext::Application_WriterReport);
+ aApplications.push_back(vcl::EnumContext::Application_Writer);
+ aApplications.push_back(vcl::EnumContext::Application_WriterGlobal);
+ aApplications.push_back(vcl::EnumContext::Application_WriterWeb);
+ aApplications.push_back(vcl::EnumContext::Application_WriterXML);
+ aApplications.push_back(vcl::EnumContext::Application_WriterForm);
+ aApplications.push_back(vcl::EnumContext::Application_WriterReport);
}
else
{
@@ -516,8 +516,8 @@ void ResourceManager::ReadContextList (
}
// Setup the actual context enum.
- const EnumContext::Context eContext (EnumContext::GetContextEnum(sContextName));
- if (eContext == EnumContext::Context_Unknown)
+ const vcl::EnumContext::Context eContext (vcl::EnumContext::GetContextEnum(sContextName));
+ if (eContext == vcl::EnumContext::Context_Unknown)
{
SAL_WARN("sfx.sidebar", "context name " << sContextName << " not recognized");
continue;
@@ -538,15 +538,15 @@ void ResourceManager::ReadContextList (
// Add context descriptors.
- std::vector<EnumContext::Application>::const_iterator iApplication;
+ std::vector<vcl::EnumContext::Application>::const_iterator iApplication;
for (iApplication = aApplications.begin(); iApplication != aApplications.end(); ++iApplication)
{
- if (*iApplication != EnumContext::Application_None)
+ if (*iApplication != vcl::EnumContext::Application_None)
{
rContextList.AddContextDescription(
Context(
- EnumContext::GetApplicationName(*iApplication),
- EnumContext::GetContextName(eContext)),
+ vcl::EnumContext::GetApplicationName(*iApplication),
+ vcl::EnumContext::GetContextName(eContext)),
bIsInitiallyVisible,
sMenuCommand);
}