diff --git a/include/svx/srchdlg.hxx b/include/svx/srchdlg.hxx old mode 100644 new mode 100755 index 400d370e8da9..570d795144e5 --- a/include/svx/srchdlg.hxx +++ b/include/svx/srchdlg.hxx @@ -98,6 +98,7 @@ public: virtual ~SvxSearchDialogWrapper (); SvxSearchDialog *getDialog () { return dialog;} static void SetSearchLabel(const SearchLabel& rSL); + static void SetSearchLabel(const OUString& sStr); SFX_DECL_CHILDWINDOW_WITHID(SvxSearchDialogWrapper); }; @@ -161,7 +162,8 @@ private: VclPtr m_pReplaceTmplLB; VclPtr m_pReplaceAttrText; - VclPtr m_pSearchBtn; + VclPtr m_pSearchBtn; + VclPtr m_pBackSearchBtn; VclPtr m_pSearchAllBtn; VclPtr m_pReplaceBtn; VclPtr m_pReplaceAllBtn; @@ -178,7 +180,6 @@ private: VclPtr m_pIgnoreDiacritics; VclPtr m_pIgnoreKashida; VclPtr m_pSelectionBtn; - VclPtr m_pBackwardsBtn; VclPtr m_pRegExpBtn; VclPtr m_pWildcardBtn; VclPtr m_pSimilarityBox; @@ -187,6 +188,7 @@ private: VclPtr m_pNotesBtn; VclPtr m_pJapMatchFullHalfWidthCB; VclPtr m_pJapOptionsCB; + VclPtr m_pReplaceBackwardsCB; VclPtr m_pJapOptionsBtn; VclPtr m_pAttributeBtn; @@ -205,6 +207,7 @@ private: bool bWriter; bool bSearch; bool bFormat; + bool bReplaceBackwards; SearchOptionFlags nOptions; bool bSet; bool bConstruct; diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx old mode 100644 new mode 100755 index a53e915361b6..3ff920eb0790 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -252,6 +252,7 @@ SvxSearchDialog::SvxSearchDialog( vcl::Window* pParent, SfxChildWindow* pChildWi , bWriter(false) , bSearch(true) , bFormat(false) + , bReplaceBackwards(false) , nOptions(SearchOptionFlags::ALL) , bSet(false) , bConstruct(true) @@ -272,10 +273,11 @@ SvxSearchDialog::SvxSearchDialog( vcl::Window* pParent, SfxChildWindow* pChildWi get(m_pSearchTmplLB, "searchlist"); m_pSearchTmplLB->SetStyle(m_pSearchTmplLB->GetStyle() | WB_SORT); get(m_pSearchBtn, "search"); + get(m_pBackSearchBtn, "backsearch"); get(m_pSearchAllBtn, "searchall"); get(m_pSearchAttrText, "searchdesc"); m_pSearchAttrText->SetStyle(m_pSearchAttrText->GetStyle() | WB_PATHELLIPSIS); - m_pSearchAttrText->Show(); + m_pSearchAttrText->Hide(); get(m_pSearchLabel, "searchlabel"); m_pSearchLabel->SetStyle(m_pSearchLabel->GetStyle() | WB_PATHELLIPSIS); m_pSearchLabel->Show(); @@ -288,7 +290,7 @@ SvxSearchDialog::SvxSearchDialog( vcl::Window* pParent, SfxChildWindow* pChildWi get(m_pReplaceAllBtn, "replaceall"); get(m_pReplaceAttrText, "replacedesc"); m_pReplaceAttrText->SetStyle(m_pReplaceAttrText->GetStyle() | WB_PATHELLIPSIS); - m_pReplaceAttrText->Show(); + m_pReplaceAttrText->Hide(); get(m_pComponentFrame, "componentframe"); get(m_pSearchComponent1PB, "component1"); @@ -304,7 +306,7 @@ SvxSearchDialog::SvxSearchDialog( vcl::Window* pParent, SfxChildWindow* pChildWi get(m_pIgnoreDiacritics, "ignorediacritics"); get(m_pIgnoreKashida, "ignorekashida"); get(m_pSelectionBtn, "selection"); - get(m_pBackwardsBtn, "backwards"); + get(m_pReplaceBackwardsCB, "replace_backwards"); get(m_pRegExpBtn, "regexp"); get(m_pWildcardBtn, "wildcard"); get(m_pSimilarityBox, "similarity"); @@ -372,6 +374,7 @@ void SvxSearchDialog::dispose() m_pReplaceTmplLB.clear(); m_pReplaceAttrText.clear(); m_pSearchBtn.clear(); + m_pBackSearchBtn.clear(); m_pSearchAllBtn.clear(); m_pReplaceBtn.clear(); m_pReplaceAllBtn.clear(); @@ -385,7 +388,7 @@ void SvxSearchDialog::dispose() m_pIgnoreDiacritics.clear(); m_pIgnoreKashida.clear(); m_pSelectionBtn.clear(); - m_pBackwardsBtn.clear(); + m_pReplaceBackwardsCB.clear(); m_pRegExpBtn.clear(); m_pWildcardBtn.clear(); m_pSimilarityBox.clear(); @@ -554,7 +557,7 @@ bool SvxSearchDialog::Close() // save settings to configuration SvtSearchOptions aOpt; aOpt.SetWholeWordsOnly ( m_pWordBtn->IsChecked() ); - aOpt.SetBackwards ( m_pBackwardsBtn->IsChecked() ); + aOpt.SetBackwards ( m_pReplaceBackwardsCB->IsChecked() ); aOpt.SetUseRegularExpression ( m_pRegExpBtn->IsChecked() ); aOpt.SetUseWildcard ( m_pWildcardBtn->IsChecked() ); aOpt.SetSearchForStyles ( m_pLayoutBtn->IsChecked() ); @@ -642,6 +645,7 @@ void SvxSearchDialog::InitControls_Impl() Link aLink2 = LINK( this, SvxSearchDialog, CommandHdl_Impl ); m_pSearchBtn->SetClickHdl( aLink2 ); + m_pBackSearchBtn->SetClickHdl( aLink2 ); m_pSearchAllBtn->SetClickHdl( aLink2 ); m_pReplaceBtn->SetClickHdl( aLink2 ); m_pReplaceAllBtn->SetClickHdl( aLink2 ); @@ -652,12 +656,12 @@ void SvxSearchDialog::InitControls_Impl() m_pSearchComponent2PB->SetClickHdl( aLink2 ); aLink2 = LINK( this, SvxSearchDialog, FlagHdl_Impl ); + m_pReplaceBackwardsCB->SetClickHdl( aLink2 ); m_pWordBtn->SetClickHdl( aLink2 ); m_pSelectionBtn->SetClickHdl( aLink2 ); m_pMatchCaseCB->SetClickHdl( aLink2 ); m_pRegExpBtn->SetClickHdl( aLink2 ); m_pWildcardBtn->SetClickHdl( aLink2 ); - m_pBackwardsBtn->SetClickHdl( aLink2 ); m_pNotesBtn->SetClickHdl( aLink2 ); m_pSimilarityBox->SetClickHdl( aLink2 ); m_pJapOptionsCB->SetClickHdl( aLink2 ); @@ -710,9 +714,9 @@ void SvxSearchDialog::ShowOptionalControls_Impl() m_pLayoutBtn->Show(!bDrawApp); m_pNotesBtn->Show(bWriterApp); - m_pBackwardsBtn->Show(); m_pRegExpBtn->Show(!bDrawApp); m_pWildcardBtn->Show(bCalcApp); /* TODO:WILDCARD enable for other apps if hey handle it */ + m_pReplaceBackwardsCB->Show(); m_pSimilarityBox->Show(); m_pSimilarityBtn->Show(); m_pSelectionBtn->Show(); @@ -780,7 +784,7 @@ void SvxSearchDialog::Init_Impl( bool bSearchPattern ) if ( ( nModifyFlag & MODIFY_EXACT ) == 0 ) m_pMatchCaseCB->Check( pSearchItem->GetExact() ); if ( ( nModifyFlag & MODIFY_BACKWARDS ) == 0 ) - m_pBackwardsBtn->Check( pSearchItem->GetBackward() ); + m_pReplaceBackwardsCB->Check( bReplaceBackwards ); //adjustment to replace backwards if ( ( nModifyFlag & MODIFY_NOTES ) == 0 ) m_pNotesBtn->Check( pSearchItem->GetNotes() ); if ( ( nModifyFlag & MODIFY_SELECTION ) == 0 ) @@ -1009,6 +1013,7 @@ void SvxSearchDialog::Init_Impl( bool bSearchPattern ) if ( bDisableSearch ) { m_pSearchBtn->Disable(); + m_pBackSearchBtn->Disable(); m_pSearchAllBtn->Disable(); m_pReplaceBtn->Disable(); m_pReplaceAllBtn->Disable(); @@ -1017,6 +1022,7 @@ void SvxSearchDialog::Init_Impl( bool bSearchPattern ) else { EnableControl_Impl(m_pSearchBtn); + EnableControl_Impl(m_pBackSearchBtn); EnableControl_Impl(m_pReplaceBtn); if (!bWriter || !m_pNotesBtn->IsChecked()) { @@ -1087,7 +1093,10 @@ void SvxSearchDialog::InitAttrList_Impl( const SfxItemSet* pSSet, m_pSearchAttrText->SetText( BuildAttrText_Impl( aDesc, true ) ); if ( !aDesc.isEmpty() ) + { + m_pSearchAttrText->Show(); bFormat |= true; + } } } @@ -1103,7 +1112,10 @@ void SvxSearchDialog::InitAttrList_Impl( const SfxItemSet* pSSet, m_pReplaceAttrText->SetText( BuildAttrText_Impl( aDesc, false ) ); if ( !aDesc.isEmpty() ) + { + m_pReplaceAttrText->Show(); bFormat |= true; + } } } } @@ -1194,6 +1206,7 @@ void SvxSearchDialog::ClickHdl_Impl(void* pCtrl) if ( m_pSearchTmplLB->GetEntryCount() ) { EnableControl_Impl(m_pSearchBtn); + EnableControl_Impl(m_pBackSearchBtn); EnableControl_Impl(m_pSearchAllBtn); EnableControl_Impl(m_pReplaceBtn); EnableControl_Impl(m_pReplaceAllBtn); @@ -1260,6 +1273,7 @@ IMPL_LINK_TYPED( SvxSearchDialog, CommandHdl_Impl, Button *, pBtn, void ) bool bInclusive = ( m_pLayoutBtn->GetText() == aLayoutStr ); if ( ( pBtn == m_pSearchBtn ) || + (pBtn == m_pBackSearchBtn) || ( pBtn == m_pSearchAllBtn )|| ( pBtn == m_pReplaceBtn ) || ( pBtn == m_pReplaceAllBtn ) ) @@ -1296,7 +1310,20 @@ IMPL_LINK_TYPED( SvxSearchDialog, CommandHdl_Impl, Button *, pBtn, void ) pSearchItem->SetLevenshtein( true ); pSearchItem->SetWordOnly(GetCheckBoxValue(m_pWordBtn)); - pSearchItem->SetBackward(GetCheckBoxValue(m_pBackwardsBtn)); + + bool bSetBackwards = false; + if( pBtn == m_pBackSearchBtn) + { + bSetBackwards = true; + } + else if( pBtn == m_pReplaceBtn) + { + bSetBackwards = GetCheckBoxValue(m_pReplaceBackwardsCB); + bReplaceBackwards = GetCheckBoxValue(m_pReplaceBackwardsCB); + } + + pSearchItem->SetBackward(bSetBackwards); + pSearchItem->SetNotes(GetCheckBoxValue(m_pNotesBtn)); pSearchItem->SetPattern(GetCheckBoxValue(m_pLayoutBtn)); pSearchItem->SetSelection(GetCheckBoxValue(m_pSelectionBtn)); @@ -1321,7 +1348,7 @@ IMPL_LINK_TYPED( SvxSearchDialog, CommandHdl_Impl, Button *, pBtn, void ) pSearchItem->SetSearchFormatted( m_pSearchFormattedCB->IsChecked() ); } - if (pBtn == m_pSearchBtn) + if ((pBtn == m_pSearchBtn) || (pBtn == m_pBackSearchBtn)) pSearchItem->SetCommand( SvxSearchCmd::FIND ); else if ( pBtn == m_pSearchAllBtn ) pSearchItem->SetCommand( SvxSearchCmd::FIND_ALL ); @@ -1442,6 +1469,7 @@ IMPL_LINK_TYPED( SvxSearchDialog, ModifyHdl_Impl, Edit&, rEd, void ) if (nSrchTxtLen || nReplTxtLen || nAttrTxtLen) { EnableControl_Impl(m_pSearchBtn); + EnableControl_Impl(m_pBackSearchBtn); EnableControl_Impl(m_pReplaceBtn); if (!bWriter || !m_pNotesBtn->IsChecked()) { @@ -1453,6 +1481,7 @@ IMPL_LINK_TYPED( SvxSearchDialog, ModifyHdl_Impl, Edit&, rEd, void ) { m_pComponentFrame->Enable(false); m_pSearchBtn->Disable(); + m_pBackSearchBtn->Disable(); m_pSearchAllBtn->Disable(); m_pReplaceBtn->Disable(); m_pReplaceAllBtn->Disable(); @@ -1512,6 +1541,12 @@ IMPL_LINK_NOARG_TYPED(SvxSearchDialog, TemplateHdl_Impl, Button*, void) m_pSearchAttrText->SetText( sDesc ); m_pReplaceAttrText->SetText( sDesc ); + + if(!sDesc.isEmpty()) + { + m_pSearchAttrText->Show(); + m_pReplaceAttrText->Show(); + } } m_pFormatBtn->Disable(); m_pNoFormatBtn->Disable(); @@ -1534,6 +1569,12 @@ IMPL_LINK_NOARG_TYPED(SvxSearchDialog, TemplateHdl_Impl, Button*, void) m_pSearchAttrText->SetText( BuildAttrText_Impl( sDesc, true ) ); m_pReplaceAttrText->SetText( BuildAttrText_Impl( sDesc, false ) ); + if(!sDesc.isEmpty()) + { + m_pSearchAttrText->Show(); + m_pReplaceAttrText->Show(); + } + EnableControl_Impl(m_pFormatBtn); EnableControl_Impl(m_pAttributeBtn); EnableControl_Impl(m_pSimilarityBox); @@ -1607,6 +1648,7 @@ void SvxSearchDialog::TemplatesChanged_Impl( SfxStyleSheetBasePool& rPool ) if ( m_pSearchTmplLB->GetEntryCount() ) { EnableControl_Impl(m_pSearchBtn); + EnableControl_Impl(m_pBackSearchBtn); EnableControl_Impl(m_pSearchAllBtn); EnableControl_Impl(m_pReplaceBtn); EnableControl_Impl(m_pReplaceAllBtn); @@ -1635,6 +1677,7 @@ void SvxSearchDialog::EnableControls_Impl( const SearchOptionFlags nFlags ) bool bEnableSearch = bool( SearchOptionFlags::SEARCH & nOptions ); m_pSearchBtn->Enable(bEnableSearch); + m_pBackSearchBtn->Enable(bEnableSearch); if( bEnableSearch ) bNoSearch = false; @@ -1671,6 +1714,7 @@ void SvxSearchDialog::EnableControls_Impl( const SearchOptionFlags nFlags ) m_pReplaceAllBtn->Disable(); m_pComponentFrame->Enable(!bNoSearch); m_pSearchBtn->Enable( !bNoSearch ); + m_pBackSearchBtn->Enable( !bNoSearch ); m_pSearchFrame->get_label_widget()->Enable( !bNoSearch ); m_pSearchLB->Enable( !bNoSearch ); m_pNotesBtn->Enable(); @@ -1680,9 +1724,15 @@ void SvxSearchDialog::EnableControls_Impl( const SearchOptionFlags nFlags ) else m_pWordBtn->Disable(); if ( ( SearchOptionFlags::BACKWARDS & nOptions ) ) - m_pBackwardsBtn->Enable(); + { + m_pBackSearchBtn->Enable(); + m_pReplaceBackwardsCB->Enable(); + } else - m_pBackwardsBtn->Disable(); + { + m_pBackSearchBtn->Disable(); + m_pReplaceBackwardsCB->Disable(); + } if ( ( SearchOptionFlags::REG_EXP & nOptions ) ) m_pRegExpBtn->Enable(); else @@ -1763,10 +1813,18 @@ void SvxSearchDialog::EnableControl_Impl( Control* pCtrl ) m_pWordBtn->Enable(); return; } - if ( m_pBackwardsBtn == pCtrl && ( SearchOptionFlags::BACKWARDS & nOptions ) ) + if ( SearchOptionFlags::BACKWARDS & nOptions ) { - m_pBackwardsBtn->Enable(); - return; + if( m_pBackSearchBtn == pCtrl ) + { + m_pBackSearchBtn->Enable(); + return; + } + else if ( m_pReplaceBackwardsCB == pCtrl ) + { + m_pReplaceBackwardsCB->Enable(); + return; + } } if (m_pNotesBtn == pCtrl) { @@ -2020,14 +2078,17 @@ IMPL_LINK_NOARG_TYPED(SvxSearchDialog, NoFormatHdl_Impl, Button*, void) if ( bSearch ) { - m_pSearchAttrText->SetText( "" ); pSearchList->Clear(); + m_pSearchAttrText->SetText( "" ); + m_pSearchAttrText->Hide(); } else { - m_pReplaceAttrText->SetText( "" ); pReplaceList->Clear(); + m_pReplaceAttrText->SetText( "" ); + m_pReplaceAttrText->Hide(); } + pImpl->bSaveToModule = false; TemplateHdl_Impl(m_pLayoutBtn); pImpl->bSaveToModule = true; @@ -2149,11 +2210,17 @@ void SvxSearchDialog::PaintAttrText_Impl() if ( bSearch ) { m_pSearchAttrText->SetText( aDesc ); + if(!aDesc.isEmpty()) + m_pSearchAttrText->Show(); + FocusHdl_Impl(*m_pSearchLB); } else { m_pReplaceAttrText->SetText( aDesc ); + if(!aDesc.isEmpty()) + m_pReplaceAttrText->Show(); + FocusHdl_Impl(*m_pReplaceLB); } } @@ -2169,7 +2236,7 @@ void SvxSearchDialog::SetModifyFlag_Impl( const Control* pCtrl ) nModifyFlag |= MODIFY_WORD; else if ( m_pMatchCaseCB == pCtrl ) nModifyFlag |= MODIFY_EXACT; - else if ( m_pBackwardsBtn == pCtrl ) + else if ( m_pReplaceBackwardsCB == pCtrl ) nModifyFlag |= MODIFY_BACKWARDS; else if ( m_pNotesBtn == pCtrl ) nModifyFlag |= MODIFY_NOTES; @@ -2226,7 +2293,7 @@ void SvxSearchDialog::SaveToModule_Impl() pSearchItem->SetLevenshtein( true ); pSearchItem->SetWordOnly(GetCheckBoxValue(m_pWordBtn)); - pSearchItem->SetBackward(GetCheckBoxValue(m_pBackwardsBtn)); + pSearchItem->SetBackward(GetCheckBoxValue(m_pReplaceBackwardsCB)); pSearchItem->SetNotes(GetCheckBoxValue(m_pNotesBtn)); pSearchItem->SetPattern(GetCheckBoxValue(m_pLayoutBtn)); pSearchItem->SetSelection(GetCheckBoxValue(m_pSelectionBtn)); @@ -2355,4 +2422,22 @@ void SvxSearchDialogWrapper::SetSearchLabel(const SearchLabel& rSL) pWrp->getDialog()->SetSearchLabel(sStr); } +void SvxSearchDialogWrapper::SetSearchLabel(const OUString& sStr) +{ + + if (vcl::Window *pSearchLabel = lcl_GetSearchLabelWindow()) + { + if (sStr.isEmpty()) + pSearchLabel->Hide(); + else + { + pSearchLabel->SetText(sStr); + pSearchLabel->Show(); + } + } + if (SvxSearchDialogWrapper *pWrp = static_cast( SfxViewFrame::Current()-> + GetChildWindow( SvxSearchDialogWrapper::GetChildWindowId() ))) + pWrp->getDialog()->SetSearchLabel(sStr); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/uiconfig/ui/findreplacedialog.ui b/svx/uiconfig/ui/findreplacedialog.ui index 1168e74afab3..976a23162e10 100644 --- a/svx/uiconfig/ui/findreplacedialog.ui +++ b/svx/uiconfig/ui/findreplacedialog.ui @@ -11,7 +11,7 @@ False vertical - 12 + 6 False @@ -55,12 +55,12 @@ - + True False True vertical - 12 + 6 True @@ -69,96 +69,76 @@ 0 none - + True False True 6 12 - + True False True 6 + 12 - + True False + center + 6 True - 6 - 12 - - _Find Next - True - True - True - True - True - True - - - 1 - 0 - - - - - Find _All - True - True - True - True - - - 1 - 1 - - - - + True False center True - - - True - False - center - True - True - - - False - ● - - + True + + + True - - 0 - 0 - - - - - False - True - True - - - 0 - 1 - 0 0 - 2 + + + False + True + True + + + 0 + 1 + + + + + 1 + 0 + 2 + + + + + 80 + True + False + start + center + 0 + 0.40000000596046448 + _Find: + True + + + 0 @@ -166,19 +146,47 @@ - + + False + True + True + 0 + 0.55000001192092896 + True + + + 1 + 2 + + + + + False + True + True + 0 + True + start + + + 1 + 4 + + + + True False - True - vertical + 12 - - False - True - True + + Ma_tch case + True + True + False + True 0 - 0.55000001192092896 - True + True False @@ -187,12 +195,13 @@ - - False - True - True + + Formatted display + True + True + False 0 - True + True False @@ -200,10 +209,66 @@ 1 + + + True + False + + + Whole wor_ds only + True + True + False + True + 0 + True + + + False + True + 0 + + + + + False + True + _Entire cells + True + + + False + True + 1 + + + + + False + True + 2 + + + + + All sheets + True + False + True + True + 0 + True + + + False + True + 3 + + - 0 - 1 + 1 + 3 @@ -212,7 +277,6 @@ - True False _Search For True @@ -236,94 +300,75 @@ 0 none - + True False True - 6 12 - + True False True + vertical 6 + 12 - + True False + center + 6 True - 6 - 12 - - _Replace - True - True - True - True - - - 1 - 0 - - - - - Replace A_ll - True - True - True - True - - - 1 - 1 - - - - + True False center True - - - True - False - center - True - True - - - False - ● - - + True + + + True - - 0 - 0 - - - - - False - True - True - - - 0 - 1 - 0 0 - 2 + + + False + True + True + + + 0 + 1 + + + + + 1 + 0 + 2 + + + + + 80 + True + False + start + center + 0 + Re_place: + True + + + 0 @@ -331,30 +376,17 @@ - - True + + 1 False + True True - vertical - - - 1 - False - True - True - 0 - True - - - False - True - 0 - - + 0 + True - 0 - 1 + 1 + 2 @@ -363,7 +395,6 @@ - True False Re_place With True @@ -379,49 +410,166 @@ 1 + + + True + False + center + 10 + 10 + 15 + 12 + True + + + Find _All + True + True + True + True + + + False + True + 0 + + + + + Find Previous + True + True + True + True + + + False + True + 1 + + + + + _Find Next + True + True + True + True + True + True + + + False + True + 2 + + + + + _Replace + True + True + True + True + + + False + True + 3 + + + + + Replace A_ll + True + True + True + True + + + False + True + 4 + + + + + False + True + 2 + + False True + 6 True 0 none - + True False True 6 12 - + True False - True - 6 - 12 + 18 - - component button 1 - True - True - True + + False + Component Label + True + + + - 0 - 0 + False + True + 1 - - component button 2 - True - True - True + + True + False + 12 + + + component button 1 + True + True + True + + + False + True + 0 + + + + + component button 2 + True + True + True + + + False + True + 1 + + - 0 - 1 + False + True + 2 @@ -430,9 +578,8 @@ - True False - Component Label + Component Label True @@ -443,24 +590,26 @@ False True - 2 + 3 - + True False + 10 True - 6 - + True True + 6 1 1 True + True - + True False 6 @@ -479,6 +628,7 @@ True 6 12 + True C_urrent selection only @@ -509,21 +659,6 @@ 1 - - - Wil_dcards - True - False - True - True - 0 - True - - - 0 - 2 - - True @@ -576,25 +711,10 @@ 0 - 6 + 5 2 - - - Bac_kwards - True - False - True - True - 0 - True - - - 1 - 0 - - Search for st_yles @@ -612,7 +732,7 @@ - Ignore diacritics CTL + Ignore diac_ritics CTL True True False @@ -622,156 +742,6 @@ 0 - 5 - - - - - True - False - 6 - 12 - - - S_imilarity search - True - False - True - True - 0 - True - - - - - - 0 - 0 - - - - - Similarities... - True - True - True - start - True - True - - - 1 - 0 - - - - - 0 - 3 - - - - - True - False - - - Comments - True - True - False - True - 0 - True - - - False - True - 0 - - - - - All sheets - True - False - True - True - 0 - True - - - False - True - 1 - - - - - 1 - 2 - - - - - True - False - 6 - 12 - - - Sounds like (Japanese) - True - False - True - True - 0 - True - - - - - - 0 - 0 - - - - - Sounds... - True - True - True - start - True - True - - - - - - 1 - 0 - - - - - 0 - 4 - - - - - Match character width - True - True - False - True - 0 - True - - - 1 4 @@ -787,7 +757,166 @@ 1 - 5 + 4 + + + + + Match character _width + True + True + False + True + 0 + True + + + 1 + 2 + + + + + True + False + 12 + + + S_imilarity search + True + False + True + True + 0 + True + + + False + True + 0 + + + + + Similarities... + True + True + True + end + True + True + + + False + True + 1 + + + + + 0 + 2 + + + + + True + False + 12 + + + _Sounds like (Japanese) + True + False + True + True + 0 + True + + + False + True + 0 + + + + + Sounds... + True + True + True + end + 25 + True + True + + + False + True + 1 + + + + + 0 + 3 + + + + + True + False + + + Wil_dcards + True + False + True + True + 0 + True + + + False + True + 0 + + + + + _Comments + True + True + False + True + 0 + True + + + False + True + 1 + + + + + 1 + 3 + + + + + Replace Bac_kwards + True + False + True + True + 0 + True + + + 1 + 0 @@ -801,32 +930,44 @@ False True - start 6 12 + True - + + True False - True - 0 - Search i_n: - True - calcsearchin - - - 0 - 0 - - - - - False - True - - Formulas - Values - Notes - + 15 + + + False + True + 0 + Search i_n: + True + + + False + True + 0 + + + + + False + True + + Formulas + Values + Notes + + + + False + True + 1 + + 1 @@ -834,62 +975,82 @@ - + + True False - True - 0 - Search direction: - True - calcsearchin + 4 + 15 + + + False + True + 0 + Direction: + True + + + False + True + 0 + + + + + True + False + 15 + + + Ro_ws + True + False + True + True + 0 + True + True + + + + + + False + True + 0 + + + + + Colu_mns + True + False + True + True + 0 + True + + + + + + False + True + 1 + + + + + False + True + 1 + + 0 - 1 + 0 - - - Ro_ws - True - False - True - True - 0 - True - True - cols - - - - - - 1 - 1 - - - - - Colu_mns - True - False - True - True - 0 - True - True - rows - - - - - - 1 - 2 - - - - - False @@ -905,91 +1066,15 @@ True False + start Other _options True + + + - - 0 - 1 - - - - - True - False - 12 - - - Ma_tch case - True - True - False - True - 0 - True - - - 0 - 0 - - - - - Formatted display - True - True - False - False - 0 - True - - - 1 - 0 - - - - - True - False - - - Whole wor_ds only - True - True - False - True - 0 - True - - - False - True - 0 - - - - - False - True - _Entire cells - True - - - False - True - 1 - - - - - 2 - 0 - - - 0 0 @@ -1016,20 +1101,7 @@ close - - - - - - - - True - - - - - diff --git a/sw/source/uibase/uiview/viewsrch.cxx b/sw/source/uibase/uiview/viewsrch.cxx index 23283de9d6b0..58012322104b 100644 --- a/sw/source/uibase/uiview/viewsrch.cxx +++ b/sw/source/uibase/uiview/viewsrch.cxx @@ -85,11 +85,6 @@ struct SwSearchOptions SwSearchOptions( SwWrtShell* pSh, bool bBackward ); }; -static vcl::Window* GetParentWindow( SvxSearchDialog* pSrchDlg ) -{ - return pSrchDlg && pSrchDlg->IsVisible() ? pSrchDlg : nullptr; -} - /// Adds rMatches using rKey as a key to the rTree tree. static void lcl_addContainerToJson(boost::property_tree::ptree& rTree, const OString& rKey, const std::vector& rMatches) { @@ -193,7 +188,7 @@ void SwView::ExecSearch(SfxRequest& rReq) { // We will remember the search-/replace items. const SearchAttrItemList* pList = pSrchDlg->GetSearchItemList(); - if( pList && pList->Count() ) + if( nullptr != pList && pList->Count() ) m_pSrchList = new SearchAttrItemList( *pList ); pList = pSrchDlg->GetReplaceItemList(); @@ -218,7 +213,7 @@ void SwView::ExecSearch(SfxRequest& rReq) DELETEZ( m_pReplList ); const SearchAttrItemList* pList = pSrchDlg->GetSearchItemList(); - if( pList && pList->Count() ) + if( nullptr != pList && pList->Count() ) m_pSrchList = new SearchAttrItemList( *pList ); pList = pSrchDlg->GetReplaceItemList(); @@ -414,11 +409,9 @@ void SwView::ExecSearch(SfxRequest& rReq) if( !bQuiet && ULONG_MAX != nFound) { - OUString aText( SW_RES( STR_NB_REPLACED ) ); - aText = aText.replaceFirst("XX", OUString::number( nFound )); - pSrchDlg = GetSearchDialog(); - vcl::Window* pParentWindow = GetParentWindow(pSrchDlg); - ScopedVclPtr::Create( pParentWindow, aText )->Execute(); + OUString sText( SW_RES( STR_NB_REPLACED ) ); + sText = sText.replaceFirst("XX", OUString::number( nFound )); + SvxSearchDialogWrapper::SetSearchLabel(sText); } } #if HAVE_FEATURE_DESKTOP