include/svx/srchdlg.hxx | 2 ++ svx/source/dialog/srchdlg.cxx | 24 ++++++++++++++++++++++-- 2 files changed, 24 insertions(+), 2 deletions(-)
New commits: commit 813397885356c0d63271472adb7d3800e4ac2ca8 Author: manujvashist <manujvash...@gmail.com> Date: Mon Mar 12 15:38:09 2018 +0530 tdf#98544 Other Options remain expanded if any checkbox is checked. Change-Id: I2de79da0f0a6295d4d3c294d7cf6c123fca914bc Reviewed-on: https://gerrit.libreoffice.org/51190 Reviewed-by: Manuj Vashist <manujvash...@gmail.com> Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de> Tested-by: Thorsten Behrens <thorsten.behr...@cib.de> diff --git a/include/svx/srchdlg.hxx b/include/svx/srchdlg.hxx index 8da9ca5eb535..e879068db4f4 100644 --- a/include/svx/srchdlg.hxx +++ b/include/svx/srchdlg.hxx @@ -176,6 +176,7 @@ private: VclPtr<PushButton> m_pCloseBtn; VclPtr<CheckBox> m_pIncludeDiacritics; VclPtr<CheckBox> m_pIncludeKashida; + VclPtr<VclExpander> m_pOtherOptionsExpander; VclPtr<CheckBox> m_pSelectionBtn; VclPtr<CheckBox> m_pRegExpBtn; VclPtr<CheckBox> m_pWildcardBtn; @@ -262,6 +263,7 @@ private: void SaveToModule_Impl(); void ApplyTransliterationFlags_Impl( TransliterationFlags nSettings ); + bool IsOtherOptionsExpanded(); }; #endif diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index 71f65c825506..6a999380ee7a 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -309,6 +309,7 @@ SvxSearchDialog::SvxSearchDialog( vcl::Window* pParent, SfxChildWindow* pChildWi get(m_pCloseBtn, "close"); + get(m_pOtherOptionsExpander, "OptionsExpander"); get(m_pIncludeDiacritics, "includediacritics"); get(m_pIncludeKashida, "includekashida"); get(m_pSelectionBtn, "selection"); @@ -391,6 +392,7 @@ void SvxSearchDialog::dispose() m_pCloseBtn.clear(); m_pIncludeDiacritics.clear(); m_pIncludeKashida.clear(); + m_pOtherOptionsExpander.clear(); m_pSelectionBtn.clear(); m_pReplaceBackwardsCB.clear(); m_pRegExpBtn.clear(); @@ -612,6 +614,22 @@ void SvxSearchDialog::ApplyTransliterationFlags_Impl( TransliterationFlags nSett } +bool SvxSearchDialog::IsOtherOptionsExpanded() +{ + return m_pReplaceBackwardsCB->IsChecked() || + m_pSelectionBtn->IsChecked() || + m_pRegExpBtn->IsChecked() || + m_pLayoutBtn->IsChecked() || + m_pSimilarityBox->IsChecked() || + m_pJapMatchFullHalfWidthCB->IsChecked() || + m_pJapOptionsCB->IsChecked() || + m_pWildcardBtn->IsChecked() || + m_pNotesBtn->IsChecked() || + m_pIncludeKashida->IsChecked() || + m_pIncludeDiacritics->IsChecked(); +} + + void SvxSearchDialog::Activate() { // apply possible transliteration changes of the SvxSearchItem member @@ -806,11 +824,13 @@ void SvxSearchDialog::Init_Impl( bool bSearchPattern ) if (m_pNotesBtn->IsChecked()) m_pLayoutBtn->Disable(); m_pSimilarityBox->Check( pSearchItem->IsLevenshtein() ); - if( m_pJapOptionsCB->IsVisible() ) + if ( m_pJapOptionsCB->IsVisible() ) m_pJapOptionsCB->Check( pSearchItem->IsUseAsianOptions() ); m_pIncludeDiacritics->Check( !aOpt.IsIgnoreDiacritics_CTL() ); - if (m_pIncludeKashida->IsVisible()) + if ( m_pIncludeKashida->IsVisible() ) m_pIncludeKashida->Check( !aOpt.IsIgnoreKashida_CTL() ); + if ( SvxSearchDialog::IsOtherOptionsExpanded() ) + m_pOtherOptionsExpander->set_expanded( true ); ApplyTransliterationFlags_Impl( pSearchItem->GetTransliterationFlags() ); ShowOptionalControls_Impl(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits