diff options
author | Thomas Lange <tl@openoffice.org> | 2001-03-12 10:09:45 +0000 |
---|---|---|
committer | Thomas Lange <tl@openoffice.org> | 2001-03-12 10:09:45 +0000 |
commit | c9ea21e68f7e79e08d15ae3e5c832edb6809f49b (patch) | |
tree | 27ac880e7f1ef6d0426fd2300a91b05f1410844f /svx/source/dialog/srchdlg.cxx | |
parent | 137255ba98a74a87c4d36dfcac417a124e0a65ab (diff) |
regular expression search fixed
Diffstat (limited to 'svx/source/dialog/srchdlg.cxx')
-rw-r--r-- | svx/source/dialog/srchdlg.cxx | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index cb6b706c3b4c..09f8dfe0b5e3 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -2,9 +2,9 @@ * * $RCSfile: srchdlg.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: tl $ $Date: 2001-02-23 13:12:55 $ + * last change: $Author: tl $ $Date: 2001-03-12 11:09:45 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1174,8 +1174,15 @@ IMPL_LINK( SvxSearchDialog, CommandHdl_Impl, Button *, pBtn ) pSearchItem->SetBackward( GetCheckBoxValue( aBackwardsBtn ) ); pSearchItem->SetPattern( GetCheckBoxValue( aLayoutBtn ) ); pSearchItem->SetSelection( GetCheckBoxValue( aSelectionBtn ) ); - pSearchItem->SetRegExp( GetCheckBoxValue( aRegExpBtn ) ); - pSearchItem->SetLevenshtein( GetCheckBoxValue( aSimilarityBox )); + if (GetCheckBoxValue( aRegExpBtn )) + pSearchItem->SetRegExp( TRUE ); + else if (GetCheckBoxValue( aSimilarityBox )) + pSearchItem->SetLevenshtein( TRUE ); + else + { + DBG_ASSERT( FALSE == pSearchItem->GetRegExp(), "incorrect value" ); + DBG_ASSERT( FALSE == pSearchItem->IsLevenshtein(), "incorrect value" ); + } pSearchItem->SetUseAsianOptions( GetCheckBoxValue( aJapOptionsCB ) ); //! and even if checkboxes are disabled... pSearchItem->SetExact( aMatchCaseCB.IsChecked() ); @@ -2091,8 +2098,15 @@ void SvxSearchDialog::SaveToModule_Impl() pSearchItem->SetBackward( GetCheckBoxValue( aBackwardsBtn ) ); pSearchItem->SetPattern( GetCheckBoxValue( aLayoutBtn ) ); pSearchItem->SetSelection( GetCheckBoxValue( aSelectionBtn ) ); - pSearchItem->SetRegExp( GetCheckBoxValue( aRegExpBtn ) ); - pSearchItem->SetLevenshtein( GetCheckBoxValue( aSimilarityBox )); + if (GetCheckBoxValue( aRegExpBtn )) + pSearchItem->SetRegExp( TRUE ); + else if (GetCheckBoxValue( aSimilarityBox )) + pSearchItem->SetLevenshtein( TRUE ); + else + { + DBG_ASSERT( FALSE == pSearchItem->GetRegExp(), "incorrect value" ); + DBG_ASSERT( FALSE == pSearchItem->IsLevenshtein(), "incorrect value" ); + } pSearchItem->SetUseAsianOptions( GetCheckBoxValue( aJapOptionsCB ) ); //! and even if checkboxes are disabled... pSearchItem->SetExact( aMatchCaseCB.IsChecked() ); |