diff options
author | Thomas Lange <tl@openoffice.org> | 2000-12-13 09:34:49 +0000 |
---|---|---|
committer | Thomas Lange <tl@openoffice.org> | 2000-12-13 09:34:49 +0000 |
commit | 1cca41a86e17a88e0043050011a6563722c07431 (patch) | |
tree | 1af1f49946a6b24c8d2410b6fed5cbcdb7b90dcc /svx/source/dialog/thesdlg.cxx | |
parent | #81864#: Transparent background: A should be either sal_True or sal_False (diff) | |
download | core-1cca41a86e17a88e0043050011a6563722c07431.tar.gz core-1cca41a86e17a88e0043050011a6563722c07431.zip |
#81719# 'Replace' fixed in Thesaurus dialog
Diffstat (limited to 'svx/source/dialog/thesdlg.cxx')
-rw-r--r-- | svx/source/dialog/thesdlg.cxx | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/svx/source/dialog/thesdlg.cxx b/svx/source/dialog/thesdlg.cxx index 86eff34ed2de..6da51301402e 100644 --- a/svx/source/dialog/thesdlg.cxx +++ b/svx/source/dialog/thesdlg.cxx @@ -2,9 +2,9 @@ * * $RCSfile: thesdlg.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: tl $ $Date: 2000-10-27 10:08:30 $ + * last change: $Author: tl $ $Date: 2000-12-13 10:34:49 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -468,8 +468,12 @@ IMPL_LINK( SvxThesaurusDialog, SynonymHdl_Impl, ListBox *, EMPTYARG ) if ( aSynonymLB.GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND ) { String aStr( aSynonymLB.GetSelectEntry() ); - aStr = aStr.Erase( 0, aStr.Search( sal_Unicode( '*' ) ) ); - aStr = aStr.Erase( 0, aStr.Search( sal_Unicode( '(' ) ) ); + xub_StrLen nPos = aStr.Search( sal_Unicode( '*' ) ); + if (STRING_NOTFOUND != nPos) + aStr = aStr.Erase( 0, nPos ); + nPos = aStr.Search( sal_Unicode( '(' ) ); + if (STRING_NOTFOUND != nPos) + aStr = aStr.Erase( 0, nPos ); aReplaceEdit.SetText( aStr ); } return 0; @@ -480,8 +484,12 @@ IMPL_LINK( SvxThesaurusDialog, SynonymHdl_Impl, ListBox *, EMPTYARG ) IMPL_LINK( SvxThesaurusDialog, SelectHdl_Impl, ListBox *, pBox ) { String aStr( pBox->GetSelectEntry() ); - //aStr = aStr.Cut( 0, aStr.Search( '*' ) ); - //aStr = aStr.Cut( 0, aStr.Search( '(' ) ); + xub_StrLen nPos = aStr.Search( sal_Unicode( '*' ) ); + if (STRING_NOTFOUND != nPos) + aStr = aStr.Erase( 0, nPos ); + nPos = aStr.Search( sal_Unicode( '(' ) ); + if (STRING_NOTFOUND != nPos) + aStr = aStr.Erase( 0, nPos ); aReplaceEdit.SetText( aStr ); //! 'aCancelBtn' is used to indicate that the handler is called as result |