[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - cui/source include/unotools svx/source unotools/source
Caolán McNamara
caolanm at redhat.com
Mon Jun 8 09:36:33 PDT 2015
cui/source/options/optgdlg.cxx | 5 +++--
cui/source/options/optjsearch.cxx | 6 +++---
include/unotools/searchopt.hxx | 2 ++
svx/source/dialog/srchdlg.cxx | 2 ++
unotools/source/config/searchopt.cxx | 5 +++++
5 files changed, 15 insertions(+), 5 deletions(-)
New commits:
commit f5607ec73e8a54bdde7d1b5280c96ef69484ff16
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jun 8 17:04:49 2015 +0100
add (and call before dtor) Commit to SvtSearchOptions
i.e. follow up to
commit 465359c35fcd8c30a2bedd3d0beb07c0c1c36cba
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed Mar 11 16:39:24 2015 +0100
do not call virtual Commit() from dtors of utl::ConfigItem subclasses
~SvtAppFilterOptions_Impl() demonstrates that this is a bad idea, by not
invoking its subclasses' ImplCommit() but its own.
to avoid assert in SvtSearchOptions dtor
Change-Id: I0eaf93450e1daddb81a9463f2c1df48a334dfb22
(cherry picked from commit 8d5a2116bc198f51ee394ca48c48f04ef4ba1658)
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 893ab53..5de00a6 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -1511,8 +1511,9 @@ bool OfaLanguagesTabPage::FillItemSet( SfxItemSet* rSet )
if ( m_pCTLSupportCB->IsValueChangedFromSaved() )
{
SvtSearchOptions aOpt;
- aOpt.SetIgnoreDiacritics_CTL (true);
- aOpt.SetIgnoreKashida_CTL (true);
+ aOpt.SetIgnoreDiacritics_CTL(true);
+ aOpt.SetIgnoreKashida_CTL(true);
+ aOpt.Commit();
pLangConfig->aLanguageOptions.SetCTLFontEnabled( m_pCTLSupportCB->IsChecked() );
const sal_uInt16 STATE_COUNT = 1;
diff --git a/cui/source/options/optjsearch.cxx b/cui/source/options/optjsearch.cxx
index 2bd5401..9ef6499 100644
--- a/cui/source/options/optjsearch.cxx
+++ b/cui/source/options/optjsearch.cxx
@@ -380,10 +380,10 @@ bool SvxJSearchOptionsPage::FillItemSet( SfxItemSet* )
bModified = true;
}
+ if (bModified)
+ aOpt.Commit();
+
return bModified;
}
-
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/unotools/searchopt.hxx b/include/unotools/searchopt.hxx
index 83bbed4..a34e449 100644
--- a/include/unotools/searchopt.hxx
+++ b/include/unotools/searchopt.hxx
@@ -35,6 +35,8 @@ public:
SvtSearchOptions();
~SvtSearchOptions();
+ void Commit();
+
sal_Int32 GetTransliterationFlags() const;
// General Options
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index be44214..b9c38ff 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -564,6 +564,7 @@ bool SvxSearchDialog::Close()
aOpt.SetNotes ( m_pNotesBtn->IsChecked() );
aOpt.SetIgnoreDiacritics_CTL ( m_pIgnoreDiacritics->IsChecked() );
aOpt.SetIgnoreKashida_CTL ( m_pIgnoreKashida->IsChecked() );
+ aOpt.Commit();
const SfxPoolItem* ppArgs[] = { pSearchItem, 0 };
rBindings.GetDispatcher()->Execute( FID_SEARCH_OFF, SfxCallMode::SLOT, ppArgs );
@@ -2218,6 +2219,7 @@ void SvxSearchDialog::SaveToModule_Impl()
SvtSearchOptions aOpt;
aOpt.SetIgnoreDiacritics_CTL(GetCheckBoxValue(m_pIgnoreDiacritics));
aOpt.SetIgnoreKashida_CTL(GetCheckBoxValue(m_pIgnoreKashida));
+ aOpt.Commit();
sal_Int32 nFlags = GetTransliterationFlags();
if( !pSearchItem->IsUseAsianOptions())
diff --git a/unotools/source/config/searchopt.cxx b/unotools/source/config/searchopt.cxx
index 3c442ab..97bd396 100644
--- a/unotools/source/config/searchopt.cxx
+++ b/unotools/source/config/searchopt.cxx
@@ -248,6 +248,11 @@ SvtSearchOptions::~SvtSearchOptions()
delete pImpl;
}
+void SvtSearchOptions::Commit()
+{
+ pImpl->Commit();
+}
+
sal_Int32 SvtSearchOptions::GetTransliterationFlags() const
{
sal_Int32 nRes = 0;
More information about the Libreoffice-commits
mailing list