cui/UIConfig_cui.mk | 1 cui/source/dialogs/cuires.src | 5 cui/source/dialogs/hangulhanjadlg.cxx | 145 +++++----- cui/source/dialogs/hangulhanjadlg.hrc | 52 --- cui/source/dialogs/hangulhanjadlg.src | 116 -------- cui/source/inc/cuires.hrc | 3 cui/source/inc/hangulhanjadlg.hxx | 30 -- cui/source/inc/helpid.hrc | 1 cui/uiconfig/ui/hangulhanjaeditdictdialog.ui | 354 +++++++++++++++++++++++++ extras/source/glade/libreoffice-catalog.xml.in | 4 10 files changed, 453 insertions(+), 258 deletions(-)
New commits: commit e153510659506caaea592221f6321ca1280613a8 Author: Rachit Gupta <rachitgupta1...@gmail.com> Date: Thu Jul 24 23:47:26 2014 +0530 Convert RID_SVX_MDLG_HANGULHANJA_EDIT to Widget Layout. Change-Id: I63d61a9caeb356e6b5bd340c1f9a5415869a91a1 Reviewed-on: https://gerrit.libreoffice.org/10518 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk index 15b9ac7..e605ff3 100644 --- a/cui/UIConfig_cui.mk +++ b/cui/UIConfig_cui.mk @@ -70,6 +70,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\ cui/uiconfig/ui/gallerytitledialog \ cui/uiconfig/ui/galleryupdateprogress \ cui/uiconfig/ui/hangulhanjaadddialog \ + cui/uiconfig/ui/hangulhanjaeditdictdialog \ cui/uiconfig/ui/hangulhanjaoptdialog \ cui/uiconfig/ui/hatchpage \ cui/uiconfig/ui/hyperlinkdialog \ diff --git a/cui/source/dialogs/cuires.src b/cui/source/dialogs/cuires.src index fa223cf..4597d95 100644 --- a/cui/source/dialogs/cuires.src +++ b/cui/source/dialogs/cuires.src @@ -117,4 +117,9 @@ String RID_SVXSTR_HYPDLG_ERR_LERR_DOCNOTOPEN Text [ en-US ] = "Couldn't open the document." ; }; +String RID_SVXSTR_EDITHINT +{ + Text [ en-US ] = "[Enter text here]"; +}; + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx index 699c67a..ea931c6 100644 --- a/cui/source/dialogs/hangulhanjadlg.cxx +++ b/cui/source/dialogs/hangulhanjadlg.cxx @@ -1354,12 +1354,12 @@ namespace svx if( _bUp ) { if( !m_pPrev ) - bRet = m_rScrollBar.GetThumbPos() > m_rScrollBar.GetRangeMin(); + bRet = m_rScrollBar->GetThumbPos() > m_rScrollBar->GetRangeMin(); } else { if( !m_pNext ) - bRet = m_rScrollBar.GetThumbPos() < ( m_rScrollBar.GetRangeMax() - 4 ); + bRet = m_rScrollBar->GetThumbPos() < ( m_rScrollBar->GetRangeMax() - 4 ); } return bRet; @@ -1370,17 +1370,13 @@ namespace svx const Link& rLoseFocusHdl = GetLoseFocusHdl(); if( rLoseFocusHdl.IsSet() ) rLoseFocusHdl.Call( this ); - m_rScrollBar.SetThumbPos( m_rScrollBar.GetThumbPos() + ( _bUp? -1 : 1 ) ); + m_rScrollBar->SetThumbPos( m_rScrollBar->GetThumbPos() + ( _bUp? -1 : 1 ) ); ( static_cast< HangulHanjaEditDictDialog* >( GetParentDialog() ) )->UpdateScrollbar(); } - SuggestionEdit::SuggestionEdit( Window* pParent, const ResId& rResId, - ScrollBar& _rScrollBar, SuggestionEdit* _pPrev, SuggestionEdit* _pNext ) - :Edit( pParent, rResId ) - ,m_pPrev( _pPrev ) - ,m_pNext( _pNext ) - ,m_rScrollBar( _rScrollBar ) + SuggestionEdit::SuggestionEdit( Window* pParent, WinBits nBits ) + :Edit( pParent, nBits ) { } @@ -1437,6 +1433,17 @@ namespace svx return nHandled; } + void SuggestionEdit::init( ScrollBar* pScrollBar, SuggestionEdit* pPrev, SuggestionEdit* pNext) + { + m_rScrollBar = pScrollBar; + m_pPrev = pPrev; + m_pNext = pNext; + } + + extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSuggestionEdit( Window *pParent, VclBuilder::stringmap & ) + { + return new SuggestionEdit( pParent, WB_LEFT|WB_VCENTER|WB_BORDER ); + } namespace { @@ -1466,17 +1473,17 @@ namespace svx } - IMPL_LINK_NOARG(HangulHanjaEditDictDialog, ScrollHdl) + IMPL_LINK_NOARG( HangulHanjaEditDictDialog, ScrollHdl ) { UpdateScrollbar(); return 0; } - IMPL_LINK_NOARG(HangulHanjaEditDictDialog, OriginalModifyHdl) + IMPL_LINK_NOARG( HangulHanjaEditDictDialog, OriginalModifyHdl ) { m_bModifiedOriginal = true; - m_aOriginal = comphelper::string::stripEnd(m_aOriginalLB.GetText(), ' '); + m_aOriginal = comphelper::string::stripEnd( m_aOriginalLB->GetText(), ' ' ); UpdateSuggestions(); UpdateButtonStates(); @@ -1508,13 +1515,13 @@ namespace svx return 0; } - IMPL_LINK_NOARG(HangulHanjaEditDictDialog, BookLBSelectHdl) + IMPL_LINK_NOARG( HangulHanjaEditDictDialog, BookLBSelectHdl ) { - InitEditDictDialog( m_aBookLB.GetSelectEntryPos() ); + InitEditDictDialog( m_aBookLB->GetSelectEntryPos() ); return 0; } - IMPL_LINK_NOARG(HangulHanjaEditDictDialog, NewPBPushHdl) + IMPL_LINK_NOARG( HangulHanjaEditDictDialog, NewPBPushHdl ) { DBG_ASSERT( m_pSuggestions, "-HangulHanjaEditDictDialog::NewPBPushHdl(): no suggestions... search in hell..." ); Reference< XConversionDictionary > xDict = m_rDictList[ m_nCurrentDict ]; @@ -1544,7 +1551,7 @@ namespace svx pRight = m_pSuggestions->Next(); } - if(bAddedSomething||bRemovedSomething) + if( bAddedSomething || bRemovedSomething ) InitEditDictDialog( m_nCurrentDict ); } else @@ -1583,7 +1590,7 @@ namespace svx return bRemovedSomething; } - IMPL_LINK_NOARG(HangulHanjaEditDictDialog, DeletePBPushHdl) + IMPL_LINK_NOARG( HangulHanjaEditDictDialog, DeletePBPushHdl ) { if( DeleteEntryFromDictionary( m_aOriginal, m_rDictList[ m_nCurrentDict ] ) ) { @@ -1608,8 +1615,8 @@ namespace svx UpdateOriginalLB(); - m_aOriginalLB.SetText( !m_aOriginal.isEmpty() ? m_aOriginal : m_aEditHintText, Selection( 0, SELECTION_MAX ) ); - m_aOriginalLB.GrabFocus(); + m_aOriginalLB->SetText( !m_aOriginal.isEmpty() ? m_aOriginal : m_aEditHintText, Selection( 0, SELECTION_MAX ) ); + m_aOriginalLB->GrabFocus(); UpdateSuggestions(); UpdateButtonStates(); @@ -1617,7 +1624,7 @@ namespace svx void HangulHanjaEditDictDialog::UpdateOriginalLB( void ) { - m_aOriginalLB.Clear(); + m_aOriginalLB->Clear(); Reference< XConversionDictionary > xDict = m_rDictList[ m_nCurrentDict ]; if( xDict.is() ) { @@ -1626,7 +1633,7 @@ namespace svx OUString* pEntry = aEntries.getArray(); while( n ) { - m_aOriginalLB.InsertEntry( *pEntry ); + m_aOriginalLB->InsertEntry( *pEntry ); ++pEntry; --n; @@ -1642,10 +1649,10 @@ namespace svx { bool bHaveValidOriginalString = !m_aOriginal.isEmpty() && m_aOriginal != m_aEditHintText; bool bNew = bHaveValidOriginalString && m_pSuggestions && m_pSuggestions->GetCount() > 0; - bNew = bNew && (m_bModifiedSuggestions || m_bModifiedOriginal); + bNew = bNew && ( m_bModifiedSuggestions || m_bModifiedOriginal ); - m_aNewPB.Enable(bNew); - m_aDeletePB.Enable(!m_bModifiedOriginal && bHaveValidOriginalString); + m_aNewPB->Enable( bNew ); + m_aDeletePB->Enable(!m_bModifiedOriginal && bHaveValidOriginalString); } void HangulHanjaEditDictDialog::UpdateSuggestions( void ) @@ -1675,10 +1682,10 @@ namespace svx --nCnt; } } - m_bModifiedSuggestions=false; + m_bModifiedSuggestions = false; } - m_aScrollSB.SetThumbPos( 0 ); + m_aScrollSB->SetThumbPos( 0 ); UpdateScrollbar(); // will force edits to be filled new } @@ -1719,68 +1726,66 @@ namespace svx } HangulHanjaEditDictDialog::HangulHanjaEditDictDialog( Window* _pParent, HHDictList& _rDictList, sal_uInt32 _nSelDict ) - :ModalDialog ( _pParent, CUI_RES( RID_SVX_MDLG_HANGULHANJA_EDIT ) ) - ,m_aEditHintText ( CUI_RES( STR_EDITHINT ) ) + :ModalDialog ( _pParent, "HangulHanjaEditDictDialog", "cui/ui/hangulhanjaeditdictdialog.ui" ) + ,m_aEditHintText ( CUI_RESSTR(RID_SVXSTR_EDITHINT) ) ,m_rDictList ( _rDictList ) ,m_nCurrentDict ( 0xFFFFFFFF ) ,m_pSuggestions ( NULL ) - ,m_aBookFT ( this, CUI_RES( FT_BOOK ) ) - ,m_aBookLB ( this, CUI_RES( LB_BOOK ) ) - ,m_aOriginalFT ( this, CUI_RES( FT_ORIGINAL ) ) - ,m_aOriginalLB ( this, CUI_RES( LB_ORIGINAL ) ) - ,m_aSuggestionsFT ( this, CUI_RES( FT_SUGGESTIONS ) ) - ,m_aEdit1 ( this, CUI_RES( ED_1 ), m_aScrollSB, NULL, &m_aEdit2 ) - ,m_aEdit2 ( this, CUI_RES( ED_2 ), m_aScrollSB, &m_aEdit1, &m_aEdit3 ) - ,m_aEdit3 ( this, CUI_RES( ED_3 ), m_aScrollSB, &m_aEdit2, &m_aEdit4 ) - ,m_aEdit4 ( this, CUI_RES( ED_4 ), m_aScrollSB, &m_aEdit3, NULL ) - ,m_aScrollSB ( this, CUI_RES( SB_SCROLL ) ) - ,m_aNewPB ( this, CUI_RES( PB_HHE_NEW ) ) - ,m_aDeletePB ( this, CUI_RES( PB_HHE_DELETE ) ) - ,m_aHelpPB ( this, CUI_RES( PB_HHE_HELP ) ) - ,m_aClosePB ( this, CUI_RES( PB_HHE_CLOSE ) ) ,m_nTopPos ( 0 ) ,m_bModifiedSuggestions ( false ) ,m_bModifiedOriginal ( false ) { - m_aOriginalLB.SetModifyHdl( LINK( this, HangulHanjaEditDictDialog, OriginalModifyHdl ) ); + get( m_aBookLB, "book" ); + get( m_aOriginalLB, "original" ); + get( m_aNewPB, "new" ); + get( m_aDeletePB, "delete" ); + get( m_aScrollSB, "scrollbar" ); + get( m_aEdit1, "edit1" ); + get( m_aEdit2, "edit2" ); + get( m_aEdit3, "edit3" ); + get( m_aEdit4, "edit4" ); + + m_aEdit1->init( m_aScrollSB, NULL, m_aEdit2 ); + m_aEdit2->init( m_aScrollSB, m_aEdit1, m_aEdit3 ); + m_aEdit3->init( m_aScrollSB, m_aEdit2, m_aEdit4 ); + m_aEdit4->init( m_aScrollSB, m_aEdit3, NULL ); - m_aNewPB.SetClickHdl( LINK( this, HangulHanjaEditDictDialog, NewPBPushHdl ) ); - m_aNewPB.Enable( false ); + m_aOriginalLB->SetModifyHdl( LINK( this, HangulHanjaEditDictDialog, OriginalModifyHdl ) ); - m_aDeletePB.SetClickHdl( LINK( this, HangulHanjaEditDictDialog, DeletePBPushHdl ) ); + m_aNewPB->SetClickHdl( LINK( this, HangulHanjaEditDictDialog, NewPBPushHdl ) ); + m_aNewPB->Enable( false ); - m_aDeletePB.Enable( false ); + m_aDeletePB->SetClickHdl( LINK( this, HangulHanjaEditDictDialog, DeletePBPushHdl ) ); + m_aDeletePB->Enable( false ); #if( MAXNUM_SUGGESTIONS <= 4 ) #error number of suggestions should not under-run the value of 5 #endif Link aScrLk( LINK( this, HangulHanjaEditDictDialog, ScrollHdl ) ); - m_aScrollSB.SetScrollHdl( aScrLk ); - m_aScrollSB.SetEndScrollHdl( aScrLk ); - m_aScrollSB.SetRangeMin( 0 ); - m_aScrollSB.SetRangeMax( MAXNUM_SUGGESTIONS ); - m_aScrollSB.SetPageSize( 4 ); // because we have 4 edits / page - m_aScrollSB.SetVisibleSize( 4 ); - - m_aEdit1.SetModifyHdl( LINK( this, HangulHanjaEditDictDialog, EditModifyHdl1 ) ); - m_aEdit2.SetModifyHdl( LINK( this, HangulHanjaEditDictDialog, EditModifyHdl2 ) ); - m_aEdit3.SetModifyHdl( LINK( this, HangulHanjaEditDictDialog, EditModifyHdl3 ) ); - m_aEdit4.SetModifyHdl( LINK( this, HangulHanjaEditDictDialog, EditModifyHdl4 ) ); - - m_aBookLB.SetSelectHdl( LINK( this, HangulHanjaEditDictDialog, BookLBSelectHdl ) ); + m_aScrollSB->SetScrollHdl( aScrLk ); + m_aScrollSB->SetEndScrollHdl( aScrLk ); + m_aScrollSB->SetRangeMin( 0 ); + m_aScrollSB->SetRangeMax( MAXNUM_SUGGESTIONS ); + m_aScrollSB->SetPageSize( 4 ); // because we have 4 edits / page + m_aScrollSB->SetVisibleSize( 4 ); + + m_aEdit1->SetModifyHdl( LINK( this, HangulHanjaEditDictDialog, EditModifyHdl1 ) ); + m_aEdit2->SetModifyHdl( LINK( this, HangulHanjaEditDictDialog, EditModifyHdl2 ) ); + m_aEdit3->SetModifyHdl( LINK( this, HangulHanjaEditDictDialog, EditModifyHdl3 ) ); + m_aEdit4->SetModifyHdl( LINK( this, HangulHanjaEditDictDialog, EditModifyHdl4 ) ); + + m_aBookLB->SetSelectHdl( LINK( this, HangulHanjaEditDictDialog, BookLBSelectHdl ) ); sal_uInt32 nDictCnt = m_rDictList.size(); for( sal_uInt32 n = 0 ; n < nDictCnt ; ++n ) { Reference< XConversionDictionary > xDic( m_rDictList[n] ); OUString aName; - if(xDic.is()) + if( xDic.is() ) aName = xDic->getName(); - m_aBookLB.InsertEntry( aName ); + m_aBookLB->InsertEntry( aName ); } - m_aBookLB.SelectEntryPos( sal_uInt16( _nSelDict ) ); - - FreeResource(); + m_aBookLB->SelectEntryPos( sal_uInt16( _nSelDict ) ); InitEditDictDialog( _nSelDict ); } @@ -1793,13 +1798,13 @@ namespace svx void HangulHanjaEditDictDialog::UpdateScrollbar( void ) { - sal_uInt16 nPos = sal_uInt16( m_aScrollSB.GetThumbPos() ); + sal_uInt16 nPos = sal_uInt16( m_aScrollSB->GetThumbPos() ); m_nTopPos = nPos; - SetEditText( m_aEdit1, nPos++ ); - SetEditText( m_aEdit2, nPos++ ); - SetEditText( m_aEdit3, nPos++ ); - SetEditText( m_aEdit4, nPos ); + SetEditText( *m_aEdit1, nPos++ ); + SetEditText( *m_aEdit2, nPos++ ); + SetEditText( *m_aEdit3, nPos++ ); + SetEditText( *m_aEdit4, nPos ); } diff --git a/cui/source/dialogs/hangulhanjadlg.hrc b/cui/source/dialogs/hangulhanjadlg.hrc index 3f595db..c06a2ed 100644 --- a/cui/source/dialogs/hangulhanjadlg.hrc +++ b/cui/source/dialogs/hangulhanjadlg.hrc @@ -71,62 +71,10 @@ // metrics #define HHO_DLGWIDTH 287 -#define HHx_DLGHIGHT 175 // Hangul Hanja Edit Custom Dictionary Dialog #define MAXNUM_SUGGESTIONS 50 -#define STR_EDITHINT 1 - -#define FT_BOOK 1 -#define FT_ORIGINAL 2 -#define FT_SUGGESTIONS 3 - -#define LB_BOOK 1 -#define LB_ORIGINAL 2 - -#define PB_HHE_NEW 1 -#define PB_HHE_DELETE 2 -#define PB_HHE_HELP 3 -#define PB_HHE_CLOSE 4 - -#define SB_SCROLL 1 - -#define ED_1 1 -#define ED_2 2 -#define ED_3 3 -#define ED_4 4 - -// metrics - -#define RSC_CD_VSCRLWIDTH 8 // vertical scroll bar width -#define HHE_DLGWIDTH HHO_DLGWIDTH -#define HHE_COL_1 RSC_SP_DLG_INNERBORDER_LEFT -#define HHE_COL_6 (HHE_DLGWIDTH-RSC_SP_DLG_INNERBORDER_RIGHT) -#define HHE_COL_5 (HHE_COL_6-RSC_CD_PUSHBUTTON_WIDTH) -#define HHE_COL_4 (HHE_COL_5-6) -#define HHE_COL_3_2 (HHE_COL_4-RSC_CD_VSCRLWIDTH) -#define HHE_COL_3_1 (HHE_COL_3_2-RSC_SP_CTRL_GROUP_X) -#define HHE_COL_3_0 (HHE_COL_3_2-RSC_CD_PUSHBUTTON_WIDTH) -#define HHE_COL_2 (HHE_COL_1+50) -#define HHE_COL_3 (HHE_COL_2+1) - -#define HHE_ROW_1 RSC_SP_DLG_INNERBORDER_TOP -#define HHE_ROW_2 (HHE_ROW_1+2) -#define HHE_ROW_3 (HHE_ROW_2+12) -#define HHE_ROW_4 (HHE_ROW_3+12) -#define HHE_ROW_5 (HHE_ROW_4+8+2) -#define HHE_ROW_6 (HHE_ROW_5+12) -#define HHE_ROW_7 (HHE_ROW_6+2) -#define HHE_ROW_8 (HHE_ROW_7+2) -#define HHE_ROW_10 (HHE_ROW_8+RSC_SP_CTRL_GROUP_Y) -#define HHE_ROW_11 (HHE_ROW_10+8+2) -#define HHE_ROW_12 (HHE_ROW_11+4*12) -#define HHE_ROW_14 (HHx_DLGHIGHT-RSC_SP_DLG_INNERBORDER_BOTTOM) -#define HHE_ROW_13 (HHE_ROW_14-RSC_CD_PUSHBUTTON_HEIGHT) -#define HHE_ROW_a1 (HHE_ROW_5) -#define HHE_ROW_a3 (HHE_ROW_a1+RSC_CD_PUSHBUTTON_HEIGHT+2) - #endif // SVX_HANGUL_HANJA_DLG_HRC /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/dialogs/hangulhanjadlg.src b/cui/source/dialogs/hangulhanjadlg.src index a915ab3..516b251 100644 --- a/cui/source/dialogs/hangulhanjadlg.src +++ b/cui/source/dialogs/hangulhanjadlg.src @@ -179,120 +179,4 @@ ModalDialog RID_SVX_MDLG_HANGULHANJA }; }; -ModalDialog RID_SVX_MDLG_HANGULHANJA_EDIT -{ - OutputSize = TRUE ; - Hide = TRUE ; - SVLook = TRUE ; - HelpId = HID_HANGULHANJA_EDIT_DLG; - Pos = MAP_APPFONT ( 0 , 0 ) ; - Size = MAP_APPFONT ( HHE_DLGWIDTH , HHx_DLGHIGHT ) ; - Text [ en-US ] = "Edit Custom Dictionary" ; - Moveable = TRUE ; - Closeable = TRUE ; - - String STR_EDITHINT - { - Text [ en-US ] = "[Enter text here]"; - }; - FixedText FT_BOOK - { - Pos = MAP_APPFONT ( HHE_COL_1 , HHE_ROW_2 ) ; - Size = MAP_APPFONT ( HHE_COL_2 - HHE_COL_1, 8 ) ; - Text [ en-US ] = "Book"; - }; - ListBox LB_BOOK - { - HelpID = "cui:ListBox:RID_SVX_MDLG_HANGULHANJA_EDIT:LB_BOOK"; - Pos = MAP_APPFONT ( HHE_COL_3 , HHE_ROW_1 ) ; - Size = MAP_APPFONT ( HHE_COL_4 - HHE_COL_3 , 60 ) ; - DropDown = TRUE; - Border = TRUE; - }; - FixedText FT_ORIGINAL - { - Pos = MAP_APPFONT ( HHE_COL_1 , HHE_ROW_4 ) ; - Size = MAP_APPFONT ( HHE_COL_4 - HHE_COL_1, 8 ) ; - Text [ en-US ] = "Original"; - }; - ComboBox LB_ORIGINAL - { - HelpID = "cui:ComboBox:RID_SVX_MDLG_HANGULHANJA_EDIT:LB_ORIGINAL"; - Pos = MAP_APPFONT ( HHE_COL_1 , HHE_ROW_5 ) ; - Size = MAP_APPFONT ( HHE_COL_4 - HHE_COL_1 , 60 ) ; - DropDown = TRUE; - Border = TRUE; - }; - FixedText FT_SUGGESTIONS - { - Pos = MAP_APPFONT ( HHE_COL_1 , HHE_ROW_10 ) ; - Size = MAP_APPFONT ( HHE_COL_4 - HHE_COL_1, 8 ) ; - Text [ en-US ] = "Suggestions (max. 8)"; - }; - Edit ED_1 - { - HelpID = "cui:Edit:RID_SVX_MDLG_HANGULHANJA_EDIT:ED_1"; - Pos = MAP_APPFONT ( HHE_COL_1 , HHE_ROW_11 ) ; - Size = MAP_APPFONT ( HHE_COL_3_1 - HHE_COL_1 , 12 ) ; - Hide = False; - Border = TRUE; - }; - Edit ED_2 - { - HelpID = "cui:Edit:RID_SVX_MDLG_HANGULHANJA_EDIT:ED_2"; - Pos = MAP_APPFONT ( HHE_COL_1 , HHE_ROW_11 + 12 ) ; - Size = MAP_APPFONT ( HHE_COL_3_1 - HHE_COL_1 , 12 ) ; - Hide = False; - Border = TRUE; - }; - Edit ED_3 - { - HelpID = "cui:Edit:RID_SVX_MDLG_HANGULHANJA_EDIT:ED_3"; - Pos = MAP_APPFONT ( HHE_COL_1 , HHE_ROW_11 + 24 ) ; - Size = MAP_APPFONT ( HHE_COL_3_1 - HHE_COL_1 , 12 ) ; - Hide = False; - Border = TRUE; - }; - Edit ED_4 - { - HelpID = "cui:Edit:RID_SVX_MDLG_HANGULHANJA_EDIT:ED_4"; - Pos = MAP_APPFONT ( HHE_COL_1 , HHE_ROW_11 + 36 ) ; - Size = MAP_APPFONT ( HHE_COL_3_1 - HHE_COL_1 , 12 ) ; - Hide = False; - Border = TRUE; - }; - ScrollBar SB_SCROLL - { - Pos = MAP_APPFONT ( HHE_COL_3_2 , HHE_ROW_11 ) ; - Size = MAP_APPFONT ( RSC_CD_VSCRLWIDTH , HHE_ROW_12 - HHE_ROW_11 ) ; // height = 48 - VScroll = TRUE ; - Drag = TRUE ; - }; - PushButton PB_HHE_NEW - { - HelpID = "cui:PushButton:RID_SVX_MDLG_HANGULHANJA_EDIT:PB_HHE_NEW"; - Pos = MAP_APPFONT ( HHE_COL_5 , HHE_ROW_a1 ) ; - Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ; - Text [ en-US ] = "New"; - }; - PushButton PB_HHE_DELETE - { - HelpID = "cui:PushButton:RID_SVX_MDLG_HANGULHANJA_EDIT:PB_HHE_DELETE"; - Pos = MAP_APPFONT ( HHE_COL_5 , HHE_ROW_a3 ) ; - Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ; - Text [ en-US ] = "Delete"; - }; - HelpButton PB_HHE_HELP - { - Pos = MAP_APPFONT ( HHE_COL_3_0 , HHE_ROW_13 ) ; - Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ; - }; - CancelButton PB_HHE_CLOSE - { - Pos = MAP_APPFONT ( HHE_COL_5 , HHE_ROW_13 ) ; - Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ; - Text [ en-US ] = "Close"; - }; -}; - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/inc/cuires.hrc b/cui/source/inc/cuires.hrc index c02c7a2..1c6280d 100644 --- a/cui/source/inc/cuires.hrc +++ b/cui/source/inc/cuires.hrc @@ -215,7 +215,6 @@ // hangulhanja #define RID_SVX_MDLG_HANGULHANJA (RID_SVX_START + 1 ) -#define RID_SVX_MDLG_HANGULHANJA_EDIT ( RID_SVX_START + 5 ) // icon choice #define RID_SVXSTR_ICONCHOICEDLG_RESETBUT (RID_SVX_START + 580) @@ -442,6 +441,8 @@ #define RID_SVXSTR_FILTERNAME_CFG (RID_SVX_START + 1264) #define RID_SVXSTR_LOAD_ERROR (RID_SVX_START + 1265) +#define RID_SVXSTR_EDITHINT (RID_SVX_START + 1266) + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/inc/hangulhanjadlg.hxx b/cui/source/inc/hangulhanjadlg.hxx index f0c1b3d..47429bb 100644 --- a/cui/source/inc/hangulhanjadlg.hxx +++ b/cui/source/inc/hangulhanjadlg.hxx @@ -255,16 +255,15 @@ namespace svx private: SuggestionEdit* m_pPrev; SuggestionEdit* m_pNext; - ScrollBar& m_rScrollBar; + ScrollBar* m_rScrollBar; bool ShouldScroll( bool _bUp ) const; void DoJump( bool _bUp ); public: - SuggestionEdit( Window* pParent, const ResId& rResId, - ScrollBar& _rScrollBar, - SuggestionEdit* _pPrev, SuggestionEdit* _pNext ); + SuggestionEdit( Window* pParent, WinBits nBits ); virtual ~SuggestionEdit(); virtual bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE; + void init( ScrollBar* pScrollBar, SuggestionEdit* pPrev, SuggestionEdit* pNext); }; @@ -278,20 +277,15 @@ namespace svx OUString m_aOriginal; SuggestionList* m_pSuggestions; - FixedText m_aBookFT; - ListBox m_aBookLB; - FixedText m_aOriginalFT; - ComboBox m_aOriginalLB; - FixedText m_aSuggestionsFT; - SuggestionEdit m_aEdit1; - SuggestionEdit m_aEdit2; - SuggestionEdit m_aEdit3; - SuggestionEdit m_aEdit4; - ScrollBar m_aScrollSB; - PushButton m_aNewPB; - PushButton m_aDeletePB; - HelpButton m_aHelpPB; - CancelButton m_aClosePB; + ListBox* m_aBookLB; + ComboBox* m_aOriginalLB; + SuggestionEdit* m_aEdit1; + SuggestionEdit* m_aEdit2; + SuggestionEdit* m_aEdit3; + SuggestionEdit* m_aEdit4; + ScrollBar* m_aScrollSB; + PushButton* m_aNewPB; + PushButton* m_aDeletePB; sal_uInt16 m_nTopPos; bool m_bModifiedSuggestions; diff --git a/cui/source/inc/helpid.hrc b/cui/source/inc/helpid.hrc index 0113084..c227db7 100644 --- a/cui/source/inc/helpid.hrc +++ b/cui/source/inc/helpid.hrc @@ -55,7 +55,6 @@ #define HID_SVX_DOWN_TOOLBAR_ITEM "CUI_HID_SVX_DOWN_TOOLBAR_ITEM" #define HID_SVX_SAVE_IN "CUI_HID_SVX_SAVE_IN" #define HID_DIALOG_HANGULHANJA "CUI_HID_DIALOG_HANGULHANJA" -#define HID_HANGULHANJA_EDIT_DLG "CUI_HID_HANGULHANJA_EDIT_DLG" #define UID_SEARCH_RECORDSTATUS "CUI_UID_SEARCH_RECORDSTATUS" #define HID_SPELLDLG_SETWORD "CUI_HID_SPELLDLG_SETWORD" #define HID_HYPERLINK_INTERNET "CUI_HID_HYPERLINK_INTERNET" diff --git a/cui/uiconfig/ui/hangulhanjaeditdictdialog.ui b/cui/uiconfig/ui/hangulhanjaeditdictdialog.ui new file mode 100644 index 0000000..869c7cb --- /dev/null +++ b/cui/uiconfig/ui/hangulhanjaeditdictdialog.ui @@ -0,0 +1,354 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.16.1 --> +<interface> + <requires lib="gtk+" version="3.10"/> + <!-- interface-requires LibreOffice 1.0 --> + <object class="GtkDialog" id="HangulHanjaEditDictDialog"> + <property name="can_focus">False</property> + <property name="border_width">6</property> + <property name="title" translatable="yes">Edit Custom Dictionary</property> + <property name="type_hint">dialog</property> + <child internal-child="vbox"> + <object class="GtkBox" id="dialog-vbox1"> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">12</property> + <child internal-child="action_area"> + <object class="GtkButtonBox" id="dialog-action_area1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="layout_style">end</property> + <child> + <object class="GtkButton" id="close"> + <property name="label">gtk-close</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="can_default">True</property> + <property name="has_default">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkButton" id="help"> + <property name="label">gtk-help</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">2</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">end</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkBox" id="box1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_left">6</property> + <property name="margin_right">6</property> + <property name="margin_top">6</property> + <property name="margin_bottom">6</property> + <property name="orientation">vertical</property> + <property name="spacing">12</property> + <child> + <object class="GtkFrame" id="frame3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="top_padding">6</property> + <property name="left_padding">12</property> + <child> + <object class="GtkBox" id="box2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="spacing">12</property> + <child> + <object class="GtkComboBox" id="book"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Book</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">book</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkFrame" id="frame2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="top_padding">6</property> + <property name="left_padding">12</property> + <child> + <object class="GtkGrid" id="grid1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="row_spacing">6</property> + <property name="column_spacing">12</property> + <child> + <object class="GtkComboBox" id="original"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="valign">start</property> + <property name="hexpand">True</property> + <property name="has_entry">True</property> + <child internal-child="entry"> + <object class="GtkEntry" id="combobox-entry"> + <property name="can_focus">True</property> + <property name="xalign">0.5</property> + <property name="shadow_type">none</property> + <property name="caps_lock_warning">False</property> + </object> + </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> + <child> + <object class="GtkButtonBox" id="buttonbox1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> + <property name="layout_style">start</property> + <child> + <object class="GtkButton" id="new"> + <property name="label">gtk-new</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_underline">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkButton" id="delete"> + <property name="label">gtk-delete</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_underline">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Original</property> + <property name="use_underline">True</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="GtkFrame" id="frame1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="top_padding">6</property> + <property name="left_padding">12</property> + <child> + <object class="GtkBox" id="box3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="spacing">6</property> + <child> + <object class="GtkBox" id="box4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="cuilo-SuggestionEdit" id="edit1"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hexpand">True</property> + <property name="width_chars">40</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="cuilo-SuggestionEdit" id="edit2"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hexpand">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="cuilo-SuggestionEdit" id="edit3"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hexpand">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="cuilo-SuggestionEdit" id="edit4"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hexpand">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">3</property> + </packing> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkScrollbar" id="scrollbar"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Suggestions</property> + <property name="use_underline">True</property> + <property name="ellipsize">end</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">3</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + </object> +</interface> diff --git a/extras/source/glade/libreoffice-catalog.xml.in b/extras/source/glade/libreoffice-catalog.xml.in index 5250a82..3b0fc04 100644 --- a/extras/source/glade/libreoffice-catalog.xml.in +++ b/extras/source/glade/libreoffice-catalog.xml.in @@ -770,5 +770,9 @@ <glade-widget-class title="DataTreeListBox" name="svxlo-DataTreeListBox" generic-name="DataTreeListBox" parent="GtkTreeView" icon-name="widget-gtk-treeview"/> + + <glade-widget-class title="Suggestion Edit" name="cuilo-SuggestionEdit" + generic-name="SuggestionEdit" parent="GtkEntry" + icon-name="widget-gtk-textentry"/> </glade-widget-classes> </glade-catalog>
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits