diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-12-16 11:08:29 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-12-16 11:10:55 +0000 |
commit | 0136616a5a005cc2237f020d46718bdb78f33c2b (patch) | |
tree | 32f67b8068b88b7613818055f1c71f9b0ce0ca0b /sfx2/source/appl | |
parent | e52f14efaa53b496599b51fb064a933183731fca (diff) |
convert help bookmark dialog to .ui
Change-Id: I7831bc63f66ab7fe30f5648efc2f733c6bd90d0e
Diffstat (limited to 'sfx2/source/appl')
-rw-r--r-- | sfx2/source/appl/app.hrc | 2 | ||||
-rw-r--r-- | sfx2/source/appl/newhelp.cxx | 29 | ||||
-rw-r--r-- | sfx2/source/appl/newhelp.hrc | 8 | ||||
-rw-r--r-- | sfx2/source/appl/newhelp.hxx | 12 | ||||
-rw-r--r-- | sfx2/source/appl/newhelp.src | 52 |
5 files changed, 11 insertions, 92 deletions
diff --git a/sfx2/source/appl/app.hrc b/sfx2/source/appl/app.hrc index 6a5a97c58e62..84050c0b832a 100644 --- a/sfx2/source/appl/app.hrc +++ b/sfx2/source/appl/app.hrc @@ -46,7 +46,7 @@ #define TP_HELP_INDEX (RID_SFX_APP_START+101) #define TP_HELP_SEARCH (RID_SFX_APP_START+102) #define TP_HELP_BOOKMARKS (RID_SFX_APP_START+103) -#define DLG_HELP_ADDBOOKMARK (RID_SFX_APP_START+104) + #define MENU_HELP_BOOKMARKS (RID_SFX_APP_START+105) #define RID_INFO_NOSEARCHRESULTS (RID_SFX_APP_START+106) #define RID_INFO_NOSEARCHTEXTFOUND (RID_SFX_APP_START+107) diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index bcef1d2c7a7f..8bd2f5ff9a3e 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -3388,35 +3388,20 @@ sal_Bool SfxHelpWindow_Impl::HasHistorySuccessor() const // class SfxAddHelpBookmarkDialog_Impl ----------------------------------- -SfxAddHelpBookmarkDialog_Impl::SfxAddHelpBookmarkDialog_Impl( Window* pParent, sal_Bool bRename ) : - - ModalDialog( pParent, SfxResId( DLG_HELP_ADDBOOKMARK ) ), - - aTitleFT ( this, SfxResId( FT_BOOKMARK_TITLE ) ), - aTitleED ( this, SfxResId( ED_BOOKMARK_TITLE ) ), - aOKBtn ( this, SfxResId( PB_BOOKMARK_OK ) ), - aEscBtn ( this, SfxResId( PB_BOOKMARK_CANCEL ) ), - aHelpBtn ( this, SfxResId( PB_BOOKMARK_HELP ) ) - -{ - if ( bRename ) - SetText( SfxResId(STR_BOOKMARK_RENAME).toString() ); - - FreeResource(); -} - -// ----------------------------------------------------------------------- - -SfxAddHelpBookmarkDialog_Impl::~SfxAddHelpBookmarkDialog_Impl() +SfxAddHelpBookmarkDialog_Impl::SfxAddHelpBookmarkDialog_Impl(Window* pParent, sal_Bool bRename) + : ModalDialog( pParent, "BookmarkDialog", "sfx/ui/bookmarkdialog.ui") { + get(m_pTitleED, "entry"); + if (bRename) + SetText(get<FixedText>("alttitle")->GetText()); } // ----------------------------------------------------------------------- void SfxAddHelpBookmarkDialog_Impl::SetTitle( const OUString& rTitle ) { - aTitleED.SetText( rTitle ); - aTitleED.SetSelection( Selection( 0, rTitle.getLength() ) ); + m_pTitleED->SetText( rTitle ); + m_pTitleED->SetSelection( Selection( 0, rTitle.getLength() ) ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/appl/newhelp.hrc b/sfx2/source/appl/newhelp.hrc index 6f85a86e4679..bfaab51590dc 100644 --- a/sfx2/source/appl/newhelp.hrc +++ b/sfx2/source/appl/newhelp.hrc @@ -49,14 +49,6 @@ // Content TabPage #define LB_CONTENTS 10 -// Add to bookmarks dialog -#define FT_BOOKMARK_TITLE 10 -#define ED_BOOKMARK_TITLE 11 -#define PB_BOOKMARK_OK 12 -#define PB_BOOKMARK_CANCEL 13 -#define PB_BOOKMARK_HELP 14 -#define STR_BOOKMARK_RENAME 15 - // 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 e62af43004f8..0ebbcf65d645 100644 --- a/sfx2/source/appl/newhelp.hxx +++ b/sfx2/source/appl/newhelp.hxx @@ -582,18 +582,12 @@ public: class SfxAddHelpBookmarkDialog_Impl : public ModalDialog { private: - FixedText aTitleFT; - Edit aTitleED; - OKButton aOKBtn; - CancelButton aEscBtn; - HelpButton aHelpBtn; - + Edit* m_pTitleED; public: SfxAddHelpBookmarkDialog_Impl( Window* pParent, sal_Bool bRename = sal_True ); - ~SfxAddHelpBookmarkDialog_Impl(); - void SetTitle( const OUString& rTitle ); - inline OUString GetTitle() const { return aTitleED.GetText(); } + void SetTitle( const OUString& rTitle ); + OUString GetTitle() const { return m_pTitleED->GetText(); } }; /// Appends ?Language=xy&System=abc to the help URL in rURL diff --git a/sfx2/source/appl/newhelp.src b/sfx2/source/appl/newhelp.src index 6107be0ab201..9433d06ca02f 100644 --- a/sfx2/source/appl/newhelp.src +++ b/sfx2/source/appl/newhelp.src @@ -346,58 +346,6 @@ String STR_HELP_MENU_TEXT_COPY Text [ en-US ] = "~Copy" ; }; -ModalDialog DLG_HELP_ADDBOOKMARK -{ - HelpID = "sfx2:ModalDialog:DLG_HELP_ADDBOOKMARK"; - Size = MAP_APPFONT ( 208 , 43 ) ; - Text [ en-US ] = "Add to Bookmarks"; - MOVEABLE = TRUE ; - CLOSEABLE = TRUE ; - OUTPUTSIZE = TRUE ; - SVLOOK = TRUE ; - FixedText FT_BOOKMARK_TITLE - { - PosSize = MAP_APPFONT ( 6 , 6 , 140 , 10 ) ; - Text [ en-US ] = "Bookmark:" ; - TABSTOP = FALSE ; - GROUP = TRUE ; - LEFT = TRUE ; - }; - Edit ED_BOOKMARK_TITLE - { - HelpID = "sfx2:Edit:DLG_HELP_ADDBOOKMARK:ED_BOOKMARK_TITLE"; - PosSize = MAP_APPFONT ( 6 , 19 , 140 , 12 ) ; - TABSTOP = TRUE ; - BORDER = TRUE ; - }; - OKButton PB_BOOKMARK_OK - { - PosSize = MAP_APPFONT ( 152 , 6 , 50 , 14 ) ; - HIDE = FALSE ; - TABSTOP = TRUE ; - GROUP = TRUE ; - Disable = FALSE ; - DefButton = TRUE ; - }; - CancelButton PB_BOOKMARK_CANCEL - { - PosSize = MAP_APPFONT ( 152 , 23 , 50 , 14 ) ; - TABSTOP = TRUE ; - GROUP = TRUE ; - }; - HelpButton PB_BOOKMARK_HELP - { - PosSize = MAP_APPFONT ( 152 , 43 , 50 , 14 ) ; - TABSTOP = TRUE ; - GROUP = TRUE ; - Hide = TRUE; - }; - String STR_BOOKMARK_RENAME - { - Text [ en-US ] = "Rename Bookmark"; - }; -}; - Menu MENU_HELP_BOOKMARKS { ItemList = |