diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-03-05 11:45:51 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-03-05 11:52:22 +0000 |
commit | c1d9f1ff1868ecd8fa21028c53c5dd357701affe (patch) | |
tree | 8840ab8f36abeb0cc0fcb710075254a348c03022 /sfx2/source/appl/newhelp.cxx | |
parent | 3991641ad68b08ad6be332c9a3f8ffa7ff98a4d1 (diff) |
convert help contents page to .ui
Change-Id: I9ffd2881bfbf51749d69d7fc1af2d74335d8e3f4
Diffstat (limited to 'sfx2/source/appl/newhelp.cxx')
-rw-r--r-- | sfx2/source/appl/newhelp.cxx | 56 |
1 files changed, 22 insertions, 34 deletions
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index f7080b12e299..b7909d892eb5 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -270,13 +270,11 @@ struct ContentEntry_Impl // ContentListBox_Impl --------------------------------------------------- -ContentListBox_Impl::ContentListBox_Impl( Window* pParent, const ResId& rResId ) : - - SvTreeListBox( pParent, rResId ), - - aOpenBookImage ( SfxResId( IMG_HELP_CONTENT_BOOK_OPEN ) ), - aClosedBookImage ( SfxResId( IMG_HELP_CONTENT_BOOK_CLOSED ) ), - aDocumentImage ( SfxResId( IMG_HELP_CONTENT_DOC ) ) +ContentListBox_Impl::ContentListBox_Impl(Window* pParent, WinBits nStyle) + : SvTreeListBox(pParent, nStyle) + , aOpenBookImage(SfxResId(IMG_HELP_CONTENT_BOOK_OPEN)) + , aClosedBookImage(SfxResId(IMG_HELP_CONTENT_BOOK_CLOSED)) + , aDocumentImage(SfxResId(IMG_HELP_CONTENT_DOC)) { SetStyle( GetStyle() | WB_HIDESELECTION | WB_HSCROLL ); @@ -292,7 +290,15 @@ ContentListBox_Impl::ContentListBox_Impl( Window* pParent, const ResId& rResId ) InitRoot(); } - +extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeContentListBox(Window *pParent, + VclBuilder::stringmap &rMap) +{ + WinBits nWinStyle = WB_TABSTOP; + OString sBorder = VclBuilder::extractCustomProperty(rMap); + if (!sBorder.isEmpty()) + nWinStyle |= WB_BORDER; + return new ContentListBox_Impl(pParent, nWinStyle); +} ContentListBox_Impl::~ContentListBox_Impl() { @@ -306,8 +312,6 @@ ContentListBox_Impl::~ContentListBox_Impl() } } - - void ContentListBox_Impl::InitRoot() { OUString aHelpTreeviewURL( "vnd.sun.star.hier://com.sun.star.help.TreeView/" ); @@ -431,41 +435,25 @@ HelpTabPage_Impl::HelpTabPage_Impl(Window* pParent, SfxHelpIndexWindow_Impl* _pI // class ContentTabPage_Impl --------------------------------------------- -ContentTabPage_Impl::ContentTabPage_Impl( Window* pParent, SfxHelpIndexWindow_Impl* _pIdxWin ) : - - HelpTabPage_Impl( pParent, _pIdxWin, SfxResId( TP_HELP_CONTENT ) ), - - aContentBox( this, SfxResId( LB_CONTENTS ) ) - +ContentTabPage_Impl::ContentTabPage_Impl(Window* pParent, SfxHelpIndexWindow_Impl* _pIdxWin) + : HelpTabPage_Impl(pParent, _pIdxWin, "HelpContentPage", + "sfx/ui/helpcontentpage.ui") { - FreeResource(); - - aContentBox.Show(); -} - - - -void ContentTabPage_Impl::Resize() -{ - Size aSize = GetOutputSizePixel(); - aSize.Width() -= 8; - aSize.Height() -= 8; - aContentBox.SetPosSizePixel( Point( 4, 4 ), aSize ); + get(m_pContentBox, "content"); + Size aSize(LogicToPixel(Size(108 , 188), MAP_APPFONT)); + m_pContentBox->set_width_request(aSize.Width()); + m_pContentBox->set_height_request(aSize.Height()); } - - void ContentTabPage_Impl::ActivatePage() { if ( !m_pIdxWin->WasCursorLeftOrRight() ) SetFocusOnBox(); } - - Control* ContentTabPage_Impl::GetLastFocusControl() { - return &aContentBox; + return m_pContentBox; } // class IndexBox_Impl --------------------------------------------------- |