diff options
author | Vladimir Glazunov <vg@openoffice.org> | 2009-12-10 18:00:39 +0100 |
---|---|---|
committer | Vladimir Glazunov <vg@openoffice.org> | 2009-12-10 18:00:39 +0100 |
commit | d49c3e5e91dde2b85a67cae1f13a9da4d7159b9c (patch) | |
tree | 1e3933e5c9ec052801da2e8e4fb5f915ccfb8da4 /cui | |
parent | 929106fc72f21cab83a6d45c8a2151b002cba1d4 (diff) | |
parent | 498b0b4dc81c4a5b9c7096233e53750d1a4361ae (diff) |
CWS-TOOLING: integrate CWS os137
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/linkdlg.cxx | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx index 641503d07..17ae7953d 100644 --- a/cui/source/dialogs/linkdlg.cxx +++ b/cui/source/dialogs/linkdlg.cxx @@ -221,7 +221,7 @@ IMPL_LINK( SvBaseLinksDlg, LinksSelectHdl, SvTabListBox *, pSvTabListBox ) String aFileName; pLinkMgr->GetDisplayNames( pLink, &sType, &aFileName, pLinkNm, pFilter ); - + aFileName = INetURLObject::decode(aFileName, INET_HEX_ESCAPE, INetURLObject::DECODE_UNAMBIGUOUS); FileName().SetText( aFileName ); SourceName().SetText( sLink ); TypeName().SetText( sType ); @@ -525,9 +525,9 @@ IMPL_LINK( SvBaseLinksDlg, UpdateWaitingHdl, Timer*, pTimer ) IMPL_LINK( SvBaseLinksDlg, EndEditHdl, sfx2::SvBaseLink*, _pLink ) { USHORT nPos; - SvBaseLink* pLink = GetSelEntry( &nPos ); + GetSelEntry( &nPos ); - if ( pLink != _pLink && _pLink && _pLink->WasLastEditOK() ) + if( _pLink && _pLink->WasLastEditOK() ) { // JP 09.01.98: // StarImpress/Draw tauschen die LinkObjecte selbst aus! @@ -561,10 +561,6 @@ IMPL_LINK( SvBaseLinksDlg, EndEditHdl, sfx2::SvBaseLink*, _pLink ) if( pLinkMgr->GetPersist() ) pLinkMgr->GetPersist()->SetModified(); } - else if ( pLink == _pLink ) - { - DBG_ERRORFILE( "SvBaseLinksDlg::EndEditHdl(): wrong link" ); - } return 0; } @@ -640,6 +636,8 @@ void SvBaseLinksDlg::InsertEntry( const SvBaseLink& rLink, USHORT nPos, sal_Bool XubString aTxt = Links().GetEllipsisString( sFileNm, nWidthPixel, TEXT_DRAW_PATHELLIPSIS ); INetURLObject aPath( sFileNm, INET_PROT_FILE ); String aFileName = aPath.getName(); + aFileName = INetURLObject::decode(aFileName, INET_HEX_ESCAPE, INetURLObject::DECODE_UNAMBIGUOUS); + if( aFileName.Len() > aTxt.Len() ) aTxt = aFileName; else if( aTxt.Search( aFileName, aTxt.Len() - aFileName.Len() ) == STRING_NOTFOUND ) |