diff options
Diffstat (limited to 'sfx2/source/appl')
-rw-r--r-- | sfx2/source/appl/app.hrc | 1 | ||||
-rw-r--r-- | sfx2/source/appl/newhelp.cxx | 56 | ||||
-rw-r--r-- | sfx2/source/appl/newhelp.hrc | 3 | ||||
-rw-r--r-- | sfx2/source/appl/newhelp.hxx | 13 | ||||
-rw-r--r-- | sfx2/source/appl/newhelp.src | 16 |
5 files changed, 28 insertions, 61 deletions
diff --git a/sfx2/source/appl/app.hrc b/sfx2/source/appl/app.hrc index 138aa53222c1..e0c1d1304671 100644 --- a/sfx2/source/appl/app.hrc +++ b/sfx2/source/appl/app.hrc @@ -42,7 +42,6 @@ #define CONFIG_PATH_START (RID_SFX_APP_START+98) #define WIN_HELPINDEX (RID_SFX_APP_START+99) -#define TP_HELP_CONTENT (RID_SFX_APP_START+100) #define MENU_HELP_BOOKMARKS (RID_SFX_APP_START+105) #define RID_INFO_NOSEARCHRESULTS (RID_SFX_APP_START+106) 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 --------------------------------------------------- diff --git a/sfx2/source/appl/newhelp.hrc b/sfx2/source/appl/newhelp.hrc index df10d8cb0379..6b3ab14741e7 100644 --- a/sfx2/source/appl/newhelp.hrc +++ b/sfx2/source/appl/newhelp.hrc @@ -26,9 +26,6 @@ #define FL_ACTIVE 11 #define TC_INDEX 12 -// Content TabPage -#define LB_CONTENTS 10 - // Index Window: Id's of the tabpages #define HELP_INDEX_PAGE_FIRST 1 #define HELP_INDEX_PAGE_CONTENTS HELP_INDEX_PAGE_FIRST diff --git a/sfx2/source/appl/newhelp.hxx b/sfx2/source/appl/newhelp.hxx index 5b6cb92a9b88..fa63cff9ea62 100644 --- a/sfx2/source/appl/newhelp.hxx +++ b/sfx2/source/appl/newhelp.hxx @@ -57,7 +57,7 @@ private: void ClearChildren( SvTreeListEntry* pParent ); public: - ContentListBox_Impl( Window* pParent, const ResId& rResId ); + ContentListBox_Impl(Window* pParent, WinBits nStyle); ~ContentListBox_Impl(); @@ -90,18 +90,17 @@ public: class ContentTabPage_Impl : public HelpTabPage_Impl { private: - ContentListBox_Impl aContentBox; + ContentListBox_Impl* m_pContentBox; public: - ContentTabPage_Impl( Window* pParent, SfxHelpIndexWindow_Impl* _pIdxWin ); + ContentTabPage_Impl(Window* pParent, SfxHelpIndexWindow_Impl* _pIdxWin); - virtual void Resize(); virtual void ActivatePage(); virtual Control* GetLastFocusControl(); - inline void SetOpenHdl( const Link& rLink ) { aContentBox.SetOpenHdl( rLink ); } - inline OUString GetSelectEntry() const { return aContentBox.GetSelectEntry(); } - inline void SetFocusOnBox() { aContentBox.GrabFocus(); } + void SetOpenHdl( const Link& rLink ) { m_pContentBox->SetOpenHdl( rLink ); } + OUString GetSelectEntry() const { return m_pContentBox->GetSelectEntry(); } + void SetFocusOnBox() { m_pContentBox->GrabFocus(); } }; // class IndexTabPage_Impl ----------------------------------------------- diff --git a/sfx2/source/appl/newhelp.src b/sfx2/source/appl/newhelp.src index be813eca21d9..00d86ef2a1b8 100644 --- a/sfx2/source/appl/newhelp.src +++ b/sfx2/source/appl/newhelp.src @@ -71,22 +71,6 @@ Window WIN_HELPINDEX }; }; -TabPage TP_HELP_CONTENT -{ - HelpId = HID_HELP_TABPAGE_CONTENTS; - Hide = TRUE ; - DialogControl = TRUE; - Size = MAP_APPFONT ( 120 , 200 ) ; - Control LB_CONTENTS - { - HelpId = HID_HELP_TREELISTBOX_CONTENTS ; - Border = TRUE ; - TabStop = TRUE; - Pos = MAP_APPFONT ( 6 , 6 ) ; - Size = MAP_APPFONT ( 108 , 188 ) ; - }; -}; - #define MASKCOLOR_MAGENTA \ MaskColor = Color { Red = 0xFFFF ; Green = 0x0000 ; Blue = 0xFFFF ; }; |