Kaydet (Commit) d8ceefaf authored tarafından Caolán McNamara's avatar Caolán McNamara Kaydeden (comit) Andras Timar

add (and call before dtor) Commit to SvtSearchOptions

i.e. follow up to

commit 465359c3
Author: Michael Stahl <mstahl@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 8d5a2116)
üst 09abb0aa
......@@ -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;
......
......@@ -380,10 +380,10 @@ bool SvxJSearchOptionsPage::FillItemSet( SfxItemSet* )
bModified = true;
}
if (bModified)
aOpt.Commit();
return bModified;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -35,6 +35,8 @@ public:
SvtSearchOptions();
~SvtSearchOptions();
void Commit();
sal_Int32 GetTransliterationFlags() const;
// General Options
......
......@@ -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())
......
......@@ -248,6 +248,11 @@ SvtSearchOptions::~SvtSearchOptions()
delete pImpl;
}
void SvtSearchOptions::Commit()
{
pImpl->Commit();
}
sal_Int32 SvtSearchOptions::GetTransliterationFlags() const
{
sal_Int32 nRes = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment