diff options
-rw-r--r-- | extras/source/glade/libreoffice-catalog.xml.in | 3 | ||||
-rw-r--r-- | sfx2/UIConfig_sfx.mk | 1 | ||||
-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 | ||||
-rw-r--r-- | sfx2/source/inc/helpid.hrc | 2 | ||||
-rw-r--r-- | sfx2/uiconfig/ui/helpcontentpage.ui | 45 |
9 files changed, 77 insertions, 63 deletions
diff --git a/extras/source/glade/libreoffice-catalog.xml.in b/extras/source/glade/libreoffice-catalog.xml.in index 24c8c3e6c88b..645ec551b734 100644 --- a/extras/source/glade/libreoffice-catalog.xml.in +++ b/extras/source/glade/libreoffice-catalog.xml.in @@ -472,6 +472,9 @@ <glade-widget-class title="Chart Series ListBox" name="chartcontrollerlo-SeriesListBox" generic-name="Chart Series ListBox" parent="svtlo-SvTreeListBox" icon-name="widget-gtk-treeview"/> + <glade-widget-class title="Content List Box" name="sfxlo-ContentListBox" + generic-name="Content List Box" parent="svtlo-SvTreeListBox" + icon-name="widget-gtk-treeview"/> <glade-widget-class title="DD ListBox" name="swuilo-DDListBox" generic-name="DD ListBox" parent="svtlo-SvTreeListBox" icon-name="widget-gtk-treeview"/> diff --git a/sfx2/UIConfig_sfx.mk b/sfx2/UIConfig_sfx.mk index 46f3160f99d8..a39c171e7ae8 100644 --- a/sfx2/UIConfig_sfx.mk +++ b/sfx2/UIConfig_sfx.mk @@ -23,6 +23,7 @@ $(eval $(call gb_UIConfig_add_uifiles,sfx,\ sfx2/uiconfig/ui/editdurationdialog \ sfx2/uiconfig/ui/errorfindemaildialog \ sfx2/uiconfig/ui/helpbookmarkpage \ + sfx2/uiconfig/ui/helpcontentpage \ sfx2/uiconfig/ui/helpindexpage \ sfx2/uiconfig/ui/helpsearchpage \ sfx2/uiconfig/ui/inputdialog \ 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 ; }; diff --git a/sfx2/source/inc/helpid.hrc b/sfx2/source/inc/helpid.hrc index eeb54272dfbb..139c90c7eb07 100644 --- a/sfx2/source/inc/helpid.hrc +++ b/sfx2/source/inc/helpid.hrc @@ -104,7 +104,6 @@ #define HID_HELP_TOOLBOXITEM_FORWARD "SFX2_HID_HELP_TOOLBOXITEM_FORWARD" #define HID_HELP_TOOLBOXITEM_PRINT "SFX2_HID_HELP_TOOLBOXITEM_PRINT" #define HID_HELP_TOOLBOXITEM_BOOKMARKS "SFX2_HID_HELP_TOOLBOXITEM_BOOKMARKS" -#define HID_HELP_TABPAGE_CONTENTS "SFX2_HID_HELP_TABPAGE_CONTENTS" #define HID_TBXCONTROL_FILENEW "SFX2_HID_TBXCONTROL_FILENEW" #define HID_HELP_TOOLBOXITEM_SEARCHDIALOG "SFX2_HID_HELP_TOOLBOXITEM_SEARCHDIALOG" #define HID_HELP_BOOKMARKS_OPEN "SFX2_HID_HELP_BOOKMARKS_OPEN" @@ -112,7 +111,6 @@ #define HID_HELP_BOOKMARKS_DELETE "SFX2_HID_HELP_BOOKMARKS_DELETE" #define HID_CLOSE_WARNING "SFX2_HID_CLOSE_WARNING" #define HID_DID_SAVE_PACKED_XML "SFX2_HID_DID_SAVE_PACKED_XML" -#define HID_HELP_TREELISTBOX_CONTENTS "SFX2_HID_HELP_TREELISTBOX_CONTENTS" #define HID_HELP_TEXT_SELECTION_MODE "SFX2_HID_HELP_TEXT_SELECTION_MODE" #define HID_WARNING_SECURITY_HYPERLINK "SFX2_HID_WARNING_SECURITY_HYPERLINK" diff --git a/sfx2/uiconfig/ui/helpcontentpage.ui b/sfx2/uiconfig/ui/helpcontentpage.ui new file mode 100644 index 000000000000..dab60b32ed7f --- /dev/null +++ b/sfx2/uiconfig/ui/helpcontentpage.ui @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.16.1 --> +<interface> + <requires lib="gtk+" version="3.0"/> + <!-- interface-requires LibreOffice 1.0 --> + <object class="GtkBox" id="HelpContentPage"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="border_width">6</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkGrid" id="grid1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="row_spacing">6</property> + <child> + <object class="sfxlo-ContentListBox" id="content:border"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <child internal-child="selection"> + <object class="GtkTreeSelection" id="Content List Box-selection1"/> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> +</interface> |