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
This commit is contained in:
parent
fdbb10a0e3
commit
9a19ef1a04
3 changed files with 20 additions and 6 deletions
|
@ -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 *);
|
||||
|
|
|
@ -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 )
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue