summaryrefslogtreecommitdiff
path: root/vcl/source/window
diff options
context:
space:
mode:
authorSzymon Kłos <eszkadev@gmail.com>2016-08-19 10:20:03 +0200
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2016-08-25 11:46:39 +0000
commit6488d249b0c5649313b6611660aca939e5c374bf (patch)
tree64646f153fd5ef2999dff69a51462dc72fd27369 /vcl/source/window
parentb9ab0dd3e5eb3c948ee9a29006637e48d5751a5e (diff)
GSoC notebookbar: container with context support
+ added sfxlo-ContextVBox + notebookbar's .ui file must contain control implementing NotebookbarContextControl interface with id "ContextContainer" Change-Id: Ice81e23c4ba742564ebceeda95be120ea3f58c99 Reviewed-on: https://gerrit.libreoffice.org/28247 Tested-by: Jenkins <ci@libreoffice.org> Tested-by: Yousuf Philips <philipz85@hotmail.com> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'vcl/source/window')
-rw-r--r--vcl/source/window/builder.cxx4
-rw-r--r--vcl/source/window/tabpage.cxx22
2 files changed, 5 insertions, 21 deletions
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index f53c3207c337..ddaedf0a8fce 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -2867,9 +2867,11 @@ VclPtr<vcl::Window> VclBuilder::handleObject(vcl::Window *pParent, xmlreader::Xm
else if (name.equals("style"))
{
int nPriority = 0;
- handleStyle(reader, nPriority);
+ std::vector<vcl::EnumContext::Context> aContext = handleStyle(reader, nPriority);
if (nPriority != 0)
dynamic_cast<vcl::IPrioritable*>(pCurrentChild.get())->SetPriority(nPriority);
+ if (aContext.size() != 0)
+ dynamic_cast<vcl::IContext*>(pCurrentChild.get())->SetContext(aContext);
}
else
{
diff --git a/vcl/source/window/tabpage.cxx b/vcl/source/window/tabpage.cxx
index e09f18fe193f..0576f3af6229 100644
--- a/vcl/source/window/tabpage.cxx
+++ b/vcl/source/window/tabpage.cxx
@@ -44,8 +44,6 @@ void TabPage::ImplInit( vcl::Window* pParent, WinBits nStyle )
// otherwise they will paint with a wrong background
if( IsNativeControlSupported(ControlType::TabBody, ControlPart::Entire) && GetParent() && (GetParent()->GetType() == WINDOW_TABCONTROL) )
EnableChildTransparentMode();
-
- maContext.push_back( vcl::EnumContext::Context::Context_Any );
}
void TabPage::ImplInitSettings()
@@ -73,12 +71,14 @@ void TabPage::ImplInitSettings()
TabPage::TabPage( vcl::Window* pParent, WinBits nStyle ) :
Window( WINDOW_TABPAGE )
+ , IContext()
{
ImplInit( pParent, nStyle );
}
TabPage::TabPage(vcl::Window *pParent, const OString& rID, const OUString& rUIXMLDescription)
: Window(WINDOW_TABPAGE)
+ , IContext()
{
ImplInit(pParent, 0);
m_pUIBuilder = new VclBuilder(this, getUIRootDir(), rUIXMLDescription, rID);
@@ -223,22 +223,4 @@ void TabPage::SetPosPixel(const Point& rAllocPos)
}
}
-void TabPage::SetContext(const std::vector<vcl::EnumContext::Context>& aContext)
-{
- maContext = aContext;
-}
-
-bool TabPage::HasContext( const vcl::EnumContext::Context eContext ) const
-{
- auto aFind = std::find(maContext.begin(), maContext.end(), eContext);
- if (aFind == maContext.end())
- return false;
- return true;
-}
-
-const std::vector< vcl::EnumContext::Context >& TabPage::GetContext() const
-{
- return maContext;
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */