[Libreoffice-commits] .: cui/source vcl/inc
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Nov 29 04:38:29 PST 2012
cui/source/inc/treeopt.hxx | 2 ++
cui/source/options/treeopt.cxx | 20 ++++++++++++++++----
vcl/inc/vcl/tabpage.hxx | 4 ++--
3 files changed, 20 insertions(+), 6 deletions(-)
New commits:
commit 9a19ef1a041d708f64cc20364b99d929ed01c406
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Nov 29 12:35:21 2012 +0000
make the options dialog layout incrementally convertable to .ui
it will now allocate the fixed reserved size for its tab pages to
layout-enabled tabpages
Change-Id: I5e56a09c5febc702d194f18954fd249bcd366dd9
diff --git a/cui/source/inc/treeopt.hxx b/cui/source/inc/treeopt.hxx
index 05321b2..ee6fa40 100644
--- a/cui/source/inc/treeopt.hxx
+++ b/cui/source/inc/treeopt.hxx
@@ -186,6 +186,8 @@ private:
VectorOfNodes LoadNodes( Module* pModule, const rtl::OUString& rExtensionId );
void InsertNodes( const VectorOfNodes& rNodeList );
+ void SetPaneSize(Window *pPane);
+
protected:
DECL_LINK(ExpandedHdl_Impl, SvTreeListBox* );
DECL_LINK(ShowPageHdl_Impl, void *);
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 5227729..aafbc68 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -913,6 +913,18 @@ long OfaTreeOptionsDialog::Notify( NotifyEvent& rNEvt )
}
// --------------------------------------------------------------------
+void OfaTreeOptionsDialog::SetPaneSize(Window *pPane)
+{
+ //The OfaTreeOptionsDialog is not fully widget layout enabled
+ //yet so it's a classic fixed dimension dialog, but to make
+ //it possible to incrementally convert it over each pane
+ //can be converted to .ui layout format and the fixed area
+ //size reserved for panes is allocated to them here
+ Point aPos(aSeparatorFL.GetPosPixel().X(), aTreeLB.GetPosPixel().Y());
+ Size aSize(aSeparatorFL.GetSizePixel().Width(),
+ aSeparatorFL.GetPosPixel().Y() - aTreeLB.GetPosPixel().Y());
+ pPane->SetPosSizePixel( aPos, aSize );
+}
void OfaTreeOptionsDialog::SelectHdl_Impl()
{
@@ -1050,6 +1062,7 @@ void OfaTreeOptionsDialog::SelectHdl_Impl()
if(!pPageInfo->m_pPage && pGroupInfo->m_pModule)
pPageInfo->m_pPage = pGroupInfo->m_pModule->CreateTabPage(pPageInfo->m_nPageId, this, *pGroupInfo->m_pInItemSet);
+
}
DBG_ASSERT( pPageInfo->m_pPage, "tabpage could not created");
@@ -1069,6 +1082,8 @@ void OfaTreeOptionsDialog::SelectHdl_Impl()
{
pPageInfo->m_pPage->Reset( *pGroupInfo->m_pInItemSet );
}
+ if (pPageInfo->m_pPage->isLayoutEnabled())
+ SetPaneSize(pPageInfo->m_pPage);
}
}
else if ( 0 == pPageInfo->m_nPageId && !pPageInfo->m_pExtPage )
@@ -1085,10 +1100,7 @@ void OfaTreeOptionsDialog::SelectHdl_Impl()
pPageInfo->m_pExtPage = new ExtensionsTabPage(
this, 0, pPageInfo->m_sPageURL, pPageInfo->m_sEventHdl, m_xContainerWinProvider );
- Point aPos(aSeparatorFL.GetPosPixel().X(), aTreeLB.GetPosPixel().Y());
- Size aSize(aSeparatorFL.GetSizePixel().Width(),
- aSeparatorFL.GetPosPixel().Y() - aTreeLB.GetPosPixel().Y());
- pPageInfo->m_pExtPage->SetPosSizePixel( aPos, aSize );
+ SetPaneSize(pPageInfo->m_pExtPage);
}
if ( pPageInfo->m_pPage )
diff --git a/vcl/inc/vcl/tabpage.hxx b/vcl/inc/vcl/tabpage.hxx
index 67a3469..1aa4b91 100644
--- a/vcl/inc/vcl/tabpage.hxx
+++ b/vcl/inc/vcl/tabpage.hxx
@@ -38,8 +38,6 @@ private:
SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle );
SAL_DLLPRIVATE void ImplInitSettings();
- bool isLayoutEnabled() const;
-
public:
TabPage( Window* pParent, WinBits nStyle = 0 );
TabPage(Window *pParent, const rtl::OString& rID, const rtl::OUString& rUIXMLDescription);
@@ -55,6 +53,8 @@ public:
virtual void ActivatePage();
virtual void DeactivatePage();
+ bool isLayoutEnabled() const;
+
//To-Do, consider inheriting from VclContainer
virtual void SetPosSizePixel(const Point& rNewPos, const Size& rNewSize);
virtual void SetPosPixel(const Point& rNewPos);
More information about the Libreoffice-commits
mailing list