summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormanujvashist <manujvashist@gmail.com>2018-03-12 15:38:09 +0530
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2018-05-21 16:03:18 +0200
commit813397885356c0d63271472adb7d3800e4ac2ca8 (patch)
treef3fd4318a55700331181b96756a56acf086b1133
parent7c5f1caa775e6a3d178c7dae7171d3fca2874635 (diff)
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 <manujvashist@gmail.com> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
-rw-r--r--include/svx/srchdlg.hxx2
-rw-r--r--svx/source/dialog/srchdlg.cxx24
2 files changed, 24 insertions, 2 deletions
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();