diff options
author | sk94 <eszkadev@gmail.com> | 2014-06-02 14:58:37 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-06-03 09:48:53 +0000 |
commit | d1f2e4d798b75f819d234912eb8ff9149eeaca42 (patch) | |
tree | c61efbef4a6d9a9a8c70dd07db3d68fd0dcaaf52 /cui | |
parent | 3b8402c771faa9ee85904346b76266f5d2d09d3c (diff) |
MD_UPDATE_BASELINKS conversion to .ui
Change-Id: I98b47dc20b341375c9caae264c2213aeba6e066a
Reviewed-on: https://gerrit.libreoffice.org/9620
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/UIConfig_cui.mk | 1 | ||||
-rw-r--r-- | cui/source/dialogs/linkdlg.cxx | 196 | ||||
-rw-r--r-- | cui/source/dialogs/svuidlg.hrc | 21 | ||||
-rw-r--r-- | cui/source/dialogs/svuidlg.src | 198 | ||||
-rw-r--r-- | cui/source/inc/linkdlg.hxx | 42 | ||||
-rw-r--r-- | cui/uiconfig/ui/baselinksdialog.ui | 412 |
6 files changed, 554 insertions, 316 deletions
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk index cd1859219b54..8fb96577865a 100644 --- a/cui/UIConfig_cui.mk +++ b/cui/UIConfig_cui.mk @@ -25,6 +25,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\ cui/uiconfig/ui/asiantypography \ cui/uiconfig/ui/autocorrectdialog \ cui/uiconfig/ui/backgroundpage \ + cui/uiconfig/ui/baselinksdialog \ cui/uiconfig/ui/bitmaptabpage \ cui/uiconfig/ui/borderbackgrounddialog \ cui/uiconfig/ui/borderpage \ diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx index 043de0334822..1c62c1fc59a6 100644 --- a/cui/source/dialogs/linkdlg.cxx +++ b/cui/source/dialogs/linkdlg.cxx @@ -78,27 +78,7 @@ static long nTabs[] = SvBaseLinksDlg::SvBaseLinksDlg( Window * pParent, LinkManager* pMgr, bool bHtml ) - : ModalDialog( pParent, CUI_RES( MD_UPDATE_BASELINKS ) ), - aFtFiles( this, CUI_RES( FT_FILES ) ), - aFtLinks( this, CUI_RES( FT_LINKS ) ), - aFtType( this, CUI_RES( FT_TYPE ) ), - aFtStatus( this, CUI_RES( FT_STATUS ) ), - aTbLinks( this, CUI_RES(TB_LINKS ) ), - aFtFiles2( this, CUI_RES( FT_FILES2 ) ), - aFtFullFileName( this, CUI_RES( FT_FULL_FILE_NAME ) ), - aFtSource2( this, CUI_RES( FT_SOURCE2 ) ), - aFtFullSourceName( this, CUI_RES( FT_FULL_SOURCE_NAME ) ), - aFtType2( this, CUI_RES( FT_TYPE2 ) ), - aFtFullTypeName( this, CUI_RES( FT_FULL_TYPE_NAME ) ), - aFtUpdate( this, CUI_RES( FT_UPDATE ) ), - aRbAutomatic( this, CUI_RES( RB_AUTOMATIC ) ), - aRbManual( this, CUI_RES( RB_MANUAL ) ), - aCancelButton1( this, CUI_RES( 1 ) ), - aHelpButton1( this, CUI_RES( 1 ) ), - aPbUpdateNow( this, CUI_RES( PB_UPDATE_NOW ) ), - aPbOpenSource( this, CUI_RES( PB_OPEN_SOURCE ) ), - aPbChangeSource( this, CUI_RES( PB_CHANGE_SOURCE ) ), - aPbBreakLink( this, CUI_RES( PB_BREAK_LINK ) ), + : ModalDialog( pParent, "BaseLinksDialog", "cui/ui/baselinksdialog.ui"), aStrAutolink( CUI_RES( STR_AUTOLINK ) ), aStrManuallink( CUI_RES( STR_MANUALLINK ) ), aStrBrokenlink( CUI_RES( STR_BROKENLINK ) ), @@ -110,34 +90,44 @@ SvBaseLinksDlg::SvBaseLinksDlg( Window * pParent, LinkManager* pMgr, bool bHtml pLinkMgr( NULL ), bHtmlMode(bHtml) { - FreeResource(); - - aTbLinks.SetHelpId(HID_LINKDLG_TABLB); - aTbLinks.SetSelectionMode( MULTIPLE_SELECTION ); - aTbLinks.SetTabs( &nTabs[0], MAP_APPFONT ); - aTbLinks.Resize(); // OS: hack for correct selection + get(m_pFtFiles, "FILES"); + get(m_pTbLinks, "TB_LINKS"); + get(m_pFtFullFileName, "FULL_FILE_NAME"); + get(m_pFtFullSourceName, "FULL_SOURCE_NAME"); + get(m_pFtFullTypeName, "FULL_TYPE_NAME"); + get(m_pRbAutomatic, "AUTOMATIC"); + get(m_pRbManual, "MANUAL"); + get(m_pPbUpdateNow, "UPDATE_NOW"); + get(m_pPbOpenSource, "OPEN"); + get(m_pPbChangeSource, "CHANGE_SOURCE"); + get(m_pPbBreakLink, "BREAK_LINK"); + + m_pTbLinks->SetHelpId(HID_LINKDLG_TABLB); + m_pTbLinks->SetSelectionMode( MULTIPLE_SELECTION ); + m_pTbLinks->SetTabs( &nTabs[0], MAP_APPFONT ); + m_pTbLinks->Resize(); // OS: hack for correct selection // UpdateTimer for DDE-/Grf-links, which are waited for aUpdateTimer.SetTimeoutHdl( LINK( this, SvBaseLinksDlg, UpdateWaitingHdl ) ); aUpdateTimer.SetTimeout( 1000 ); // Set the ZOrder, and accessible name to the dialog's title - aTbLinks.SetZOrder(0, WINDOW_ZORDER_FIRST); - aTbLinks.SetAccessibleName(this->GetText()); - aTbLinks.SetAccessibleRelationLabeledBy(&aFtFiles); - - OpenSource().Hide(); - - Links().SetSelectHdl( LINK( this, SvBaseLinksDlg, LinksSelectHdl ) ); - Links().SetDoubleClickHdl( LINK( this, SvBaseLinksDlg, LinksDoubleClickHdl ) ); - Automatic().SetClickHdl( LINK( this, SvBaseLinksDlg, AutomaticClickHdl ) ); - Manual().SetClickHdl( LINK( this, SvBaseLinksDlg, ManualClickHdl ) ); - UpdateNow().SetClickHdl( LINK( this, SvBaseLinksDlg, UpdateNowClickHdl ) ); - ChangeSource().SetClickHdl( LINK( this, SvBaseLinksDlg, ChangeSourceClickHdl ) ); + m_pTbLinks->SetZOrder(0, WINDOW_ZORDER_FIRST); + m_pTbLinks->SetAccessibleName(this->GetText()); + m_pTbLinks->SetAccessibleRelationLabeledBy(m_pFtFiles); + + m_pPbOpenSource->Hide(); + + m_pTbLinks->SetSelectHdl( LINK( this, SvBaseLinksDlg, LinksSelectHdl ) ); + m_pTbLinks->SetDoubleClickHdl( LINK( this, SvBaseLinksDlg, LinksDoubleClickHdl ) ); + m_pRbAutomatic->SetClickHdl( LINK( this, SvBaseLinksDlg, AutomaticClickHdl ) ); + m_pRbManual->SetClickHdl( LINK( this, SvBaseLinksDlg, ManualClickHdl ) ); + m_pPbUpdateNow->SetClickHdl( LINK( this, SvBaseLinksDlg, UpdateNowClickHdl ) ); + m_pPbChangeSource->SetClickHdl( LINK( this, SvBaseLinksDlg, ChangeSourceClickHdl ) ); if(!bHtmlMode) - BreakLink().SetClickHdl( LINK( this, SvBaseLinksDlg, BreakLinkClickHdl ) ); + m_pPbBreakLink->SetClickHdl( LINK( this, SvBaseLinksDlg, BreakLinkClickHdl ) ); else - BreakLink().Hide(); + m_pPbBreakLink->Hide(); SetManager( pMgr ); } @@ -186,11 +176,11 @@ IMPL_LINK( SvBaseLinksDlg, LinksSelectHdl, SvTabListBox *, pSvTabListBox ) } } - UpdateNow().Enable(); + m_pPbUpdateNow->Enable(); - Automatic().Disable(); - Manual().Check(); - Manual().Disable(); + m_pRbAutomatic->Disable(); + m_pRbManual->Check(); + m_pRbManual->Disable(); } else { @@ -199,36 +189,36 @@ IMPL_LINK( SvBaseLinksDlg, LinksSelectHdl, SvTabListBox *, pSvTabListBox ) if( !pLink ) return 0; - UpdateNow().Enable(); + m_pPbUpdateNow->Enable(); OUString sType, sLink; OUString *pLinkNm = &sLink, *pFilter = 0; if( FILEOBJECT & pLink->GetObjType() ) { - Automatic().Disable(); - Manual().Check(); - Manual().Disable(); + m_pRbAutomatic->Disable(); + m_pRbManual->Check(); + m_pRbManual->Disable(); if( OBJECT_CLIENT_GRF == pLink->GetObjType() ) pLinkNm = 0, pFilter = &sLink; } else { - Automatic().Enable(); - Manual().Enable(); + m_pRbAutomatic->Enable(); + m_pRbManual->Enable(); if( LINKUPDATE_ALWAYS == pLink->GetUpdateMode() ) - Automatic().Check(); + m_pRbAutomatic->Check(); else - Manual().Check(); + m_pRbManual->Check(); } OUString aFileName; pLinkMgr->GetDisplayNames( pLink, &sType, &aFileName, pLinkNm, pFilter ); aFileName = INetURLObject::decode(aFileName, '%', INetURLObject::DECODE_UNAMBIGUOUS); - FileName().SetText( aFileName ); - SourceName().SetText( sLink ); - TypeName().SetText( sType ); + m_pFtFullFileName->SetText( aFileName ); + m_pFtFullSourceName->SetText( sLink ); + m_pFtFullTypeName->SetText( sType ); } return 0; } @@ -270,7 +260,7 @@ IMPL_LINK_INLINE_END( SvBaseLinksDlg, ManualClickHdl, RadioButton *, pRadioButto IMPL_LINK_NOARG(SvBaseLinksDlg, UpdateNowClickHdl) { - SvTabListBox& rListBox = Links(); + SvTabListBox& rListBox = *m_pTbLinks; sal_uLong nSelCnt = rListBox.GetSelectionCount(); if( 255 < nSelCnt ) nSelCnt = 255; @@ -347,7 +337,7 @@ IMPL_LINK( SvBaseLinksDlg, ChangeSourceClickHdl, PushButton *, pPushButton ) { (void)pPushButton; - sal_uLong nSelectionCount = Links().GetSelectionCount(); + sal_uLong nSelectionCount = m_pTbLinks->GetSelectionCount(); if(nSelectionCount > 1) { try @@ -356,7 +346,7 @@ IMPL_LINK( SvBaseLinksDlg, ChangeSourceClickHdl, PushButton *, pPushButton ) OUString sType, sFile, sLinkName; OUString sFilter; - SvTreeListEntry* pEntry = Links().FirstSelected(); + SvTreeListEntry* pEntry = m_pTbLinks->FirstSelected(); SvBaseLink* pLink = (SvBaseLink*)pEntry->GetUserData(); pLinkMgr->GetDisplayNames( pLink, &sType, &sFile, 0, 0 ); INetURLObject aUrl(sFile); @@ -374,8 +364,8 @@ IMPL_LINK( SvBaseLinksDlg, ChangeSourceClickHdl, PushButton *, pPushButton ) for( sal_uLong i = 0; i < nSelectionCount; i++) { pEntry = i==0 ? - Links().FirstSelected() : - Links().NextSelected( pEntry ); + m_pTbLinks->FirstSelected() : + m_pTbLinks->NextSelected( pEntry ); DBG_ASSERT(pEntry,"Where is the entry?"); if (!pEntry) continue; @@ -420,7 +410,7 @@ IMPL_LINK( SvBaseLinksDlg, BreakLinkClickHdl, PushButton *, pPushButton ) (void)pPushButton; bool bModified = false; - if(Links().GetSelectionCount() <= 1) + if(m_pTbLinks->GetSelectionCount() <= 1) { sal_uLong nPos; SvBaseLinkRef xLink = GetSelEntry( &nPos ); @@ -431,7 +421,7 @@ IMPL_LINK( SvBaseLinksDlg, BreakLinkClickHdl, PushButton *, pPushButton ) if( RET_YES == aBox.Execute() ) { - Links().GetModel()->Remove( Links().GetEntry( nPos ) ); + m_pTbLinks->GetModel()->Remove( m_pTbLinks->GetEntry( nPos ) ); // close object, if it's still existing bool bNewLnkMgr = OBJECT_CLIENT_FILE == xLink->GetObjType(); @@ -449,9 +439,9 @@ IMPL_LINK( SvBaseLinksDlg, BreakLinkClickHdl, PushButton *, pPushButton ) pLinkMgr = 0; SetManager( pNewMgr ); - SvTreeListEntry* pEntry = Links().GetEntry( nPos ? --nPos : 0 ); + SvTreeListEntry* pEntry = m_pTbLinks->GetEntry( nPos ? --nPos : 0 ); if( pEntry ) - Links().SetCurEntry( pEntry ); + m_pTbLinks->SetCurEntry( pEntry ); } bModified = true; } @@ -464,15 +454,15 @@ IMPL_LINK( SvBaseLinksDlg, BreakLinkClickHdl, PushButton *, pPushButton ) { SvBaseLinkMemberList aLinkList; - SvTreeListEntry* pEntry = Links().FirstSelected(); + SvTreeListEntry* pEntry = m_pTbLinks->FirstSelected(); while ( pEntry ) { void * pUD = pEntry->GetUserData(); if( pUD ) aLinkList.push_back( (SvBaseLink*)pUD ); - pEntry = Links().NextSelected(pEntry); + pEntry = m_pTbLinks->NextSelected(pEntry); } - Links().RemoveSelection(); + m_pTbLinks->RemoveSelection(); for( sal_uLong i = 0; i < aLinkList.size(); i++ ) { SvBaseLinkRef xLink = aLinkList[i]; @@ -488,17 +478,17 @@ IMPL_LINK( SvBaseLinksDlg, BreakLinkClickHdl, PushButton *, pPushButton ) } if(bModified) { - if( !Links().GetEntryCount() ) + if( !m_pTbLinks->GetEntryCount() ) { - Automatic().Disable(); - Manual().Disable(); - UpdateNow().Disable(); - ChangeSource().Disable(); - BreakLink().Disable(); + m_pRbAutomatic->Disable(); + m_pRbManual->Disable(); + m_pPbUpdateNow->Disable(); + m_pPbChangeSource->Disable(); + m_pPbBreakLink->Disable(); OUString aEmpty; - SourceName().SetText( aEmpty ); - TypeName().SetText( aEmpty ); + m_pFtFullSourceName->SetText( aEmpty ); + m_pFtFullTypeName->SetText( aEmpty ); } if( pLinkMgr && pLinkMgr->GetPersist() ) pLinkMgr->GetPersist()->SetModified(); @@ -510,20 +500,20 @@ IMPL_LINK( SvBaseLinksDlg, UpdateWaitingHdl, Timer*, pTimer ) { (void)pTimer; - Links().SetUpdateMode(false); - for( sal_uLong nPos = Links().GetEntryCount(); nPos; ) + m_pTbLinks->SetUpdateMode(false); + for( sal_uLong nPos = m_pTbLinks->GetEntryCount(); nPos; ) { - SvTreeListEntry* pBox = Links().GetEntry( --nPos ); + SvTreeListEntry* pBox = m_pTbLinks->GetEntry( --nPos ); SvBaseLinkRef xLink( (SvBaseLink*)pBox->GetUserData() ); if( xLink.Is() ) { OUString sCur( ImplGetStateStr( *xLink ) ), - sOld( Links().GetEntryText( pBox, 3 ) ); + sOld( m_pTbLinks->GetEntryText( pBox, 3 ) ); if( sCur != sOld ) - Links().SetEntryText( sCur, pBox, 3 ); + m_pTbLinks->SetEntryText( sCur, pBox, 3 ); } } - Links().SetUpdateMode(true); + m_pTbLinks->SetUpdateMode(true); return 0; } @@ -548,13 +538,13 @@ IMPL_LINK( SvBaseLinksDlg, EndEditHdl, sfx2::SvBaseLink*, _pLink ) if( bLinkFnd ) { - Links().SetUpdateMode(false); - Links().GetModel()->Remove( Links().GetEntry( nPos ) ); - SvTreeListEntry* pToUnselect = Links().FirstSelected(); + m_pTbLinks->SetUpdateMode(false); + m_pTbLinks->GetModel()->Remove( m_pTbLinks->GetEntry( nPos ) ); + SvTreeListEntry* pToUnselect = m_pTbLinks->FirstSelected(); InsertEntry( *_pLink, nPos, true ); if(pToUnselect) - Links().Select(pToUnselect, false); - Links().SetUpdateMode(true); + m_pTbLinks->Select(pToUnselect, false); + m_pTbLinks->SetUpdateMode(true); } else { @@ -593,9 +583,9 @@ void SvBaseLinksDlg::SetManager( LinkManager* pNewMgr ) if( pNewMgr ) // update has to be stopped before clear - Links().SetUpdateMode( false ); + m_pTbLinks->SetUpdateMode( false ); - Links().Clear(); + m_pTbLinks->Clear(); pLinkMgr = pNewMgr; if( pLinkMgr ) @@ -616,13 +606,13 @@ void SvBaseLinksDlg::SetManager( LinkManager* pNewMgr ) if( !rLnks.empty() ) { - SvTreeListEntry* pEntry = Links().GetEntry( 0 ); - Links().SetCurEntry( pEntry ); - Links().Select( pEntry ); + SvTreeListEntry* pEntry = m_pTbLinks->GetEntry( 0 ); + m_pTbLinks->SetCurEntry( pEntry ); + m_pTbLinks->Select( pEntry ); LinksSelectHdl( 0 ); } - Links().SetUpdateMode( true ); - Links().Invalidate(); + m_pTbLinks->SetUpdateMode( true ); + m_pTbLinks->Invalidate(); } } @@ -635,9 +625,9 @@ void SvBaseLinksDlg::InsertEntry( const SvBaseLink& rLink, sal_uLong nPos, bool // GetTab(0) gives the position of the bitmap which is automatically inserted by the TabListBox. // So the first text column's width is Tab(2)-Tab(1). - long nWidthPixel = Links().GetLogicTab( 2 ) - Links().GetLogicTab( 1 ); + long nWidthPixel = m_pTbLinks->GetLogicTab( 2 ) - m_pTbLinks->GetLogicTab( 1 ); nWidthPixel -= SV_TAB_BORDER; - OUString aTxt = Links().GetEllipsisString( sFileNm, nWidthPixel, TEXT_DRAW_PATHELLIPSIS ); + OUString aTxt = m_pTbLinks->GetEllipsisString( sFileNm, nWidthPixel, TEXT_DRAW_PATHELLIPSIS ); INetURLObject aPath( sFileNm, INET_PROT_FILE ); OUString aFileName = aPath.getName(); aFileName = INetURLObject::decode(aFileName, '%', INetURLObject::DECODE_UNAMBIGUOUS); @@ -659,18 +649,18 @@ void SvBaseLinksDlg::InsertEntry( const SvBaseLink& rLink, sal_uLong nPos, bool aEntry += "\t"; aEntry += ImplGetStateStr( rLink ); - SvTreeListEntry * pE = Links().InsertEntryToColumn( aEntry, nPos ); + SvTreeListEntry * pE = m_pTbLinks->InsertEntryToColumn( aEntry, nPos ); pE->SetUserData( (void*)&rLink ); if(bSelect) - Links().Select(pE); + m_pTbLinks->Select(pE); } SvBaseLink* SvBaseLinksDlg::GetSelEntry( sal_uLong* pPos ) { - SvTreeListEntry* pE = Links().FirstSelected(); + SvTreeListEntry* pE = m_pTbLinks->FirstSelected(); sal_uLong nPos; if( pE && TREELIST_ENTRY_NOTFOUND != - ( nPos = Links().GetModel()->GetAbsPos( pE ) ) ) + ( nPos = m_pTbLinks->GetModel()->GetAbsPos( pE ) ) ) { DBG_ASSERT( pE, "wo kommt der leere Eintrag her?" ); @@ -687,8 +677,8 @@ void SvBaseLinksDlg::SetType( SvBaseLink& rLink, { rLink.SetUpdateMode( nType ); rLink.Update(); - SvTreeListEntry* pBox = Links().GetEntry( nSelPos ); - Links().SetEntryText( ImplGetStateStr( rLink ), pBox, 3 ); + SvTreeListEntry* pBox = m_pTbLinks->GetEntry( nSelPos ); + m_pTbLinks->SetEntryText( ImplGetStateStr( rLink ), pBox, 3 ); if( pLinkMgr->GetPersist() ) pLinkMgr->GetPersist()->SetModified(); } @@ -708,7 +698,7 @@ void SvBaseLinksDlg::SetActLink( SvBaseLink * pLink ) { if( pLink == *pLinkRef ) { - Links().Select( Links().GetEntry( nSelect ) ); + m_pTbLinks->Select( m_pTbLinks->GetEntry( nSelect ) ); LinksSelectHdl( 0 ); return ; } diff --git a/cui/source/dialogs/svuidlg.hrc b/cui/source/dialogs/svuidlg.hrc index dcb0c71478e8..9cd3bb8b5347 100644 --- a/cui/source/dialogs/svuidlg.hrc +++ b/cui/source/dialogs/svuidlg.hrc @@ -20,8 +20,6 @@ #include <svl/solar.hrc> #include <helpid.hrc> -#define TB_LINKS 32014 - #define STR_AUTOLINK 32006 #define STR_MANUALLINK 32007 #define STR_BROKENLINK 32008 @@ -31,23 +29,4 @@ #define STR_CLOSELINKMSG_MULTI 32024 #define STR_WAITINGLINK 32028 -#define MD_UPDATE_BASELINKS 32002 -#define FT_FILES 31 -#define FT_LINKS 32 -#define FT_TYPE 33 -#define FT_STATUS 34 -#define PB_UPDATE_NOW 35 -#define PB_OPEN_SOURCE 36 -#define PB_CHANGE_SOURCE 37 -#define PB_BREAK_LINK 38 -#define FT_SOURCE2 39 -#define FT_TYPE2 40 -#define FT_UPDATE 41 -#define RB_AUTOMATIC 42 -#define RB_MANUAL 43 -#define FT_FULL_SOURCE_NAME 44 -#define FT_FULL_TYPE_NAME 45 -#define FT_FILES2 47 -#define FT_FULL_FILE_NAME 48 - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/dialogs/svuidlg.src b/cui/source/dialogs/svuidlg.src index 0522ff326ed5..a22af5db6ae5 100644 --- a/cui/source/dialogs/svuidlg.src +++ b/cui/source/dialogs/svuidlg.src @@ -20,170 +20,46 @@ #include <svtools/controldims.hrc> #include "svuidlg.hrc" -ModalDialog MD_UPDATE_BASELINKS + +String STR_AUTOLINK +{ + Text [ en-US ] = "Automatic" ; +}; + +String STR_MANUALLINK { - HelpID = "cui:ModalDialog:MD_UPDATE_BASELINKS"; - OutputSize = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 337 , 166 ) ; - Text [ en-US ] = "Edit Links" ; - Moveable = TRUE ; - FixedText FT_FILES - { - Pos = MAP_APPFONT ( 6 , 6 ) ; - Size = MAP_APPFONT ( 74 , 10 ) ; - Text [ en-US ] = "Source file" ; - }; - FixedText FT_LINKS - { - Pos = MAP_APPFONT ( 83 , 6 ) ; - Size = MAP_APPFONT ( 63 , 10 ) ; - Text [ en-US ] = "Element:" ; - }; - FixedText FT_TYPE - { - Pos = MAP_APPFONT ( 150 , 6 ) ; - Size = MAP_APPFONT ( 60 , 10 ) ; - Text [ en-US ] = "Type" ; - }; - FixedText FT_STATUS - { - Pos = MAP_APPFONT ( 215 , 6 ) ; - Size = MAP_APPFONT ( 55 , 10 ) ; - Text [ en-US ] = "Status" ; - }; - CancelButton 1 - { - Pos = MAP_APPFONT ( 270 , 6 ) ; - Size = MAP_APPFONT ( 60 , 14 ) ; - Text [ en-US ] = "~Close" ; - }; - HelpButton 1 - { - Pos = MAP_APPFONT ( 270 , 26 ) ; - Size = MAP_APPFONT ( 60 , 14 ) ; - }; - PushButton PB_UPDATE_NOW - { - HelpID = "cui:PushButton:MD_UPDATE_BASELINKS:PB_UPDATE_NOW"; - Pos = MAP_APPFONT ( 270 , 43 ) ; - Size = MAP_APPFONT ( 60 , 14 ) ; - Text [ en-US ] = "~Update" ; - }; - PushButton PB_OPEN_SOURCE - { - HelpID = "cui:PushButton:MD_UPDATE_BASELINKS:PB_OPEN_SOURCE"; - Pos = MAP_APPFONT ( 270 , 60 ) ; - Size = MAP_APPFONT ( 60 , 14 ) ; - Text [ en-US ] = "~Open" ; - }; - PushButton PB_CHANGE_SOURCE - { - HelpID = "cui:PushButton:MD_UPDATE_BASELINKS:PB_CHANGE_SOURCE"; - Pos = MAP_APPFONT ( 270 , 77 ) ; - Size = MAP_APPFONT ( 60 , 14 ) ; - Text [ en-US ] = "~Modify..." ; - }; - PushButton PB_BREAK_LINK - { - HelpID = "cui:PushButton:MD_UPDATE_BASELINKS:PB_BREAK_LINK"; - Pos = MAP_APPFONT ( 270 , 94 ) ; - Size = MAP_APPFONT ( 60 , 14 ) ; - Text [ en-US ] = "~Break Link" ; - }; - FixedText FT_FILES2 - { - Pos = MAP_APPFONT ( 6 , 111 ) ; - Size = MAP_APPFONT ( 61 , 10 ) ; - Text [ en-US ] = "Source file" ; - }; - FixedText FT_SOURCE2 - { - Pos = MAP_APPFONT ( 6 , 124 ) ; - Size = MAP_APPFONT ( 61 , 10 ) ; - Text [ en-US ] = "Element:" ; - }; - FixedText FT_TYPE2 - { - Pos = MAP_APPFONT ( 6 , 137 ) ; - Size = MAP_APPFONT ( 61 , 10 ) ; - Text [ en-US ] = "Type:" ; - }; - FixedText FT_UPDATE - { - Pos = MAP_APPFONT ( 6 , 150 ) ; - Size = MAP_APPFONT ( 61 , 10 ) ; - Text [ en-US ] = "Update:" ; - }; - RadioButton RB_AUTOMATIC - { - HelpID = "cui:RadioButton:MD_UPDATE_BASELINKS:RB_AUTOMATIC"; - Pos = MAP_APPFONT ( 70 , 150 ) ; - Size = MAP_APPFONT ( 60 , 10 ) ; - Text [ en-US ] = "~Automatic" ; - }; - RadioButton RB_MANUAL - { - HelpID = "cui:RadioButton:MD_UPDATE_BASELINKS:RB_MANUAL"; - Pos = MAP_APPFONT ( 133 , 150 ) ; - Size = MAP_APPFONT ( 60 , 10 ) ; - Text [ en-US ] = "Ma~nual" ; - }; - FixedText FT_FULL_FILE_NAME - { - Pos = MAP_APPFONT ( 70 , 111 ) ; - Size = MAP_APPFONT ( 225 , 10 ) ; - }; - FixedText FT_FULL_SOURCE_NAME - { - Pos = MAP_APPFONT ( 70 , 124 ) ; - Size = MAP_APPFONT ( 225 , 10 ) ; - }; - FixedText FT_FULL_TYPE_NAME - { - Pos = MAP_APPFONT ( 70 , 137 ) ; - Size = MAP_APPFONT ( 225 , 10 ) ; - }; - String STR_AUTOLINK - { - Text [ en-US ] = "Automatic" ; - }; - String STR_MANUALLINK - { - Text [ en-US ] = "Manual" ; - }; - String STR_BROKENLINK - { - Text [ en-US ] = "Not available" ; - }; - String STR_GRAPHICLINK - { - Text [ en-US ] = "Graphic" ; - }; - String STR_BUTTONCLOSE - { - Text [ en-US ] = "~Close" ; - }; - String STR_CLOSELINKMSG - { - Text [ en-US ] = "Are you sure you want to remove the selected link?" ; - }; - String STR_CLOSELINKMSG_MULTI - { - Text [ en-US ] = "Are you sure you want to remove the selected link?" ; - }; - String STR_WAITINGLINK - { - Text [ en-US ] = "Waiting"; - }; + Text [ en-US ] = "Manual" ; }; -Control TB_LINKS + +String STR_BROKENLINK +{ + Text [ en-US ] = "Not available" ; +}; + +String STR_GRAPHICLINK +{ + Text [ en-US ] = "Graphic" ; +}; + +String STR_BUTTONCLOSE { - Border = TRUE ; - Pos = MAP_APPFONT ( 6 , 21 ) ; - Size = MAP_APPFONT ( 257 , 87 ) ; - TabStop = TRUE ; - ClipChildren = TRUE ; + Text [ en-US ] = "~Close" ; }; +String STR_CLOSELINKMSG +{ + Text [ en-US ] = "Are you sure you want to remove the selected link?" ; +}; + +String STR_CLOSELINKMSG_MULTI +{ + Text [ en-US ] = "Are you sure you want to remove the selected link?" ; +}; + +String STR_WAITINGLINK +{ + Text [ en-US ] = "Waiting"; +}; + + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/inc/linkdlg.hxx b/cui/source/inc/linkdlg.hxx index 467ecba7ee61..6c045ce5eb8c 100644 --- a/cui/source/inc/linkdlg.hxx +++ b/cui/source/inc/linkdlg.hxx @@ -41,26 +41,17 @@ class SvBaseLinksDlg : public ModalDialog { using Window::SetType; - FixedText aFtFiles; - FixedText aFtLinks; - FixedText aFtType; - FixedText aFtStatus; - SvTabListBox aTbLinks; - FixedText aFtFiles2; - FixedText aFtFullFileName; - FixedText aFtSource2; - FixedText aFtFullSourceName; - FixedText aFtType2; - FixedText aFtFullTypeName; - FixedText aFtUpdate; - RadioButton aRbAutomatic; - RadioButton aRbManual; - CancelButton aCancelButton1; - HelpButton aHelpButton1; - PushButton aPbUpdateNow; - PushButton aPbOpenSource; - PushButton aPbChangeSource; - PushButton aPbBreakLink; + FixedText *m_pFtFiles; + SvTabListBox *m_pTbLinks; + FixedText *m_pFtFullFileName; + FixedText *m_pFtFullSourceName; + FixedText *m_pFtFullTypeName; + RadioButton *m_pRbAutomatic; + RadioButton *m_pRbManual; + PushButton *m_pPbUpdateNow; + PushButton *m_pPbOpenSource; + PushButton *m_pPbChangeSource; + PushButton *m_pPbBreakLink; OUString aStrAutolink; OUString aStrManuallink; OUString aStrBrokenlink; @@ -90,17 +81,6 @@ class SvBaseLinksDlg : public ModalDialog void StartUpdateTimer() { aUpdateTimer.Start(); } - SvTabListBox& Links() { return aTbLinks; } - FixedText& FileName() { return aFtFullFileName; } - FixedText& SourceName() { return aFtFullSourceName; } - FixedText& TypeName() { return aFtFullTypeName; } - RadioButton& Automatic() { return aRbAutomatic; } - RadioButton& Manual() { return aRbManual; } - PushButton& UpdateNow() { return aPbUpdateNow; } - PushButton& OpenSource() { return aPbOpenSource; } - PushButton& ChangeSource() { return aPbChangeSource; } - PushButton& BreakLink() { return aPbBreakLink; } - OUString& Autolink() { return aStrAutolink; } OUString& Manuallink() { return aStrManuallink; } OUString& Brokenlink() { return aStrBrokenlink; } diff --git a/cui/uiconfig/ui/baselinksdialog.ui b/cui/uiconfig/ui/baselinksdialog.ui new file mode 100644 index 000000000000..8fb8b8381d01 --- /dev/null +++ b/cui/uiconfig/ui/baselinksdialog.ui @@ -0,0 +1,412 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires gtk+ 3.0 --> + <!-- interface-requires LibreOffice 1.0 --> + <object class="GtkDialog" id="BaseLinksDialog"> + <property name="can_focus">False</property> + <property name="border_width">6</property> + <property name="title" translatable="yes">Edit Links</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="spacing">12</property> + <child internal-child="action_area"> + <object class="GtkButtonBox" id="dialog-action_area1"> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="layout_style">start</property> + <child> + <object class="GtkButton" id="CLOSE"> + <property name="label">gtk-close</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_action_appearance">False</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="HELP"> + <property name="label">gtk-help</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_action_appearance">False</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> + <child> + <object class="GtkButton" id="UPDATE_NOW"> + <property name="label" translatable="yes">_Update</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_action_appearance">False</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="GtkButton" id="OPEN"> + <property name="label" translatable="yes">_Open</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_action_appearance">False</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">3</property> + </packing> + </child> + <child> + <object class="GtkButton" id="CHANGE_SOURCE"> + <property name="label" translatable="yes">_Modify...</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_action_appearance">False</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">4</property> + </packing> + </child> + <child> + <object class="GtkButton" id="BREAK_LINK"> + <property name="label" translatable="yes">_Break Link</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_action_appearance">False</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">5</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="vexpand">True</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> + <child> + <object class="GtkBox" id="box2"> + <property name="width_request">580</property> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="orientation">vertical</property> + <property name="spacing">6</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">6</property> + <child> + <object class="GtkLabel" id="FILES"> + <property name="width_request">140</property> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Source file</property> + </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="GtkLabel" id="LINKS"> + <property name="width_request">140</property> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Element:</property> + </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> + <child> + <object class="GtkLabel" id="TYPE"> + <property name="width_request">140</property> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Type</property> + </object> + <packing> + <property name="left_attach">2</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="STATUS"> + <property name="width_request">140</property> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Status</property> + </object> + <packing> + <property name="left_attach">3</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <placeholder/> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="svtlo-SvTabListBox" id="TB_LINKS: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="Tab List-selection1"/> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="pack_type">end</property> + <property name="position">1</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="GtkGrid" id="grid2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="row_spacing">6</property> + <property name="column_spacing">6</property> + <child> + <object class="GtkLabel" id="FILES2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Source file</property> + </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="GtkLabel" id="SOURCE2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Element:</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="TYPE2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Type:</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">2</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="UPDATE"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Update:</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">3</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="FULL_FILE_NAME"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">label</property> + </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> + <child> + <object class="GtkLabel" id="FULL_SOURCE_NAME"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">label</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="FULL_TYPE_NAME"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">label</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">2</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkGrid" id="grid3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="row_spacing">6</property> + <property name="column_spacing">6</property> + <child> + <object class="GtkRadioButton" id="AUTOMATIC"> + <property name="label" translatable="yes">_Automatic</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="use_underline">True</property> + <property name="xalign">0</property> + <property name="active">True</property> + <property name="draw_indicator">True</property> + </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="GtkRadioButton" id="MANUAL"> + <property name="label" translatable="yes">Ma_nual</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="use_underline">True</property> + <property name="xalign">0</property> + <property name="active">True</property> + <property name="draw_indicator">True</property> + <property name="group">AUTOMATIC</property> + </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> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">3</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">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + <action-widgets> + <action-widget response="0">CLOSE</action-widget> + <action-widget response="0">HELP</action-widget> + <action-widget response="0">UPDATE_NOW</action-widget> + <action-widget response="0">OPEN</action-widget> + <action-widget response="0">CHANGE_SOURCE</action-widget> + <action-widget response="0">BREAK_LINK</action-widget> + </action-widgets> + </object> +</interface> |