summaryrefslogtreecommitdiff
path: root/sfx2/source/appl/newhelp.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/appl/newhelp.cxx')
-rw-r--r--sfx2/source/appl/newhelp.cxx56
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 ---------------------------------------------------