diff options
author | Noel Grandin <noel@peralex.com> | 2014-05-08 14:53:29 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-05-08 14:55:12 +0200 |
commit | bf30c8b16d9ac9304a49020ec2d4f744d90abe26 (patch) | |
tree | 0296cec9ca0729874ed1a1963af9f1311366c326 /sw | |
parent | d15540c431587368d749b53074af25cf865e7a5f (diff) |
use new VCL IsValueChangedFromSaved method
follow to commit ff1a7a59434f5f793d4044aad615bcf78148e963
"RFC: add IsValueChangedFromSaved to VCL button and listbox"
Change-Id: If2e6d9e7c18590dc4abbc90362d7897ca2557dd6
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/chrdlg/chardlg.cxx | 8 | ||||
-rw-r--r-- | sw/source/ui/chrdlg/numpara.cxx | 16 | ||||
-rw-r--r-- | sw/source/ui/config/mailconfigpage.cxx | 10 | ||||
-rw-r--r-- | sw/source/ui/config/optload.cxx | 14 | ||||
-rw-r--r-- | sw/source/ui/config/optpage.cxx | 44 | ||||
-rw-r--r-- | sw/source/ui/dbui/mmgreetingspage.cxx | 8 | ||||
-rw-r--r-- | sw/source/ui/fldui/flddb.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/fldui/flddinf.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/fldui/flddok.cxx | 8 | ||||
-rw-r--r-- | sw/source/ui/fldui/fldfunc.cxx | 10 | ||||
-rw-r--r-- | sw/source/ui/fldui/fldref.cxx | 10 | ||||
-rw-r--r-- | sw/source/ui/fldui/fldvar.cxx | 14 | ||||
-rw-r--r-- | sw/source/ui/frmdlg/column.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/frmdlg/frmpage.cxx | 45 | ||||
-rw-r--r-- | sw/source/ui/misc/pggrid.cxx | 26 | ||||
-rw-r--r-- | sw/source/ui/table/tabledlg.cxx | 30 |
16 files changed, 123 insertions, 126 deletions
diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx index 93b4eecc1b34..ee145956bac5 100644 --- a/sw/source/ui/chrdlg/chardlg.cxx +++ b/sw/source/ui/chrdlg/chardlg.cxx @@ -249,9 +249,9 @@ bool SwCharURLPage::FillItemSet(SfxItemSet& rSet) SwFmtINetFmt aINetFmt(sURL, m_pTargetFrmLB->GetText()); aINetFmt.SetName(m_pNameED->GetText()); - bModified |= m_pURLED->GetText() != m_pURLED->GetSavedValue(); + bModified |= m_pURLED->IsValueChangedFromSaved(); bModified |= m_pNameED->IsModified(); - bModified |= m_pTargetFrmLB->GetSavedValue() != m_pTargetFrmLB->GetText(); + bModified |= m_pTargetFrmLB->IsValueChangedFromSaved(); // set valid settings first OUString sEntry = m_pVisitedLB->GetSelectEntry(); @@ -265,10 +265,10 @@ bool SwCharURLPage::FillItemSet(SfxItemSet& rSet) if( pINetItem && !pINetItem->GetMacroTable().empty() ) aINetFmt.SetMacroTbl( &pINetItem->GetMacroTable() ); - if(m_pVisitedLB->GetSavedValue() != m_pVisitedLB->GetSelectEntryPos()) + if(m_pVisitedLB->IsValueChangedFromSaved()) bModified = true; - if(m_pNotVisitedLB->GetSavedValue() != m_pNotVisitedLB->GetSelectEntryPos()) + if(m_pNotVisitedLB->IsValueChangedFromSaved()) bModified = true; if(m_pTextED->IsModified()) diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx index 90b49decb0e3..ab8bdac22bb5 100644 --- a/sw/source/ui/chrdlg/numpara.cxx +++ b/sw/source/ui/chrdlg/numpara.cxx @@ -105,7 +105,7 @@ const sal_uInt16* SwParagraphNumTabPage::GetRanges() bool SwParagraphNumTabPage::FillItemSet( SfxItemSet& rSet ) { - if( m_pOutlineLvLB->GetSelectEntryPos() != m_pOutlineLvLB->GetSavedValue()) + if( m_pOutlineLvLB->IsValueChangedFromSaved()) { const sal_uInt16 aOutlineLv = m_pOutlineLvLB->GetSelectEntryPos(); const SfxUInt16Item* pOldOutlineLv = (const SfxUInt16Item*)GetOldItem( rSet, SID_ATTR_PARA_OUTLINE_LEVEL); @@ -116,7 +116,7 @@ bool SwParagraphNumTabPage::FillItemSet( SfxItemSet& rSet ) bModified = true; } - if( m_pNumberStyleLB->GetSelectEntryPos() != m_pNumberStyleLB->GetSavedValue()) + if( m_pNumberStyleLB->IsValueChangedFromSaved()) { OUString aStyle; if(m_pNumberStyleLB->GetSelectEntryPos()) @@ -131,9 +131,9 @@ bool SwParagraphNumTabPage::FillItemSet( SfxItemSet& rSet ) bModified = true; } } - if(m_pNewStartCB->GetState() != m_pNewStartCB->GetSavedValue() || - m_pNewStartNumberCB->GetState() != m_pNewStartNumberCB->GetSavedValue()|| - m_pNewStartNF->GetText() != m_pNewStartNF->GetSavedValue()) + if(m_pNewStartCB->IsValueChangedFromSaved() || + m_pNewStartNumberCB->IsValueChangedFromSaved()|| + m_pNewStartNF->IsValueChangedFromSaved()) { bModified = true; bool bNewStartChecked = TRISTATE_TRUE == m_pNewStartCB->GetState(); @@ -143,9 +143,9 @@ bool SwParagraphNumTabPage::FillItemSet( SfxItemSet& rSet ) bNumberNewStartChecked && bNewStartChecked ? (sal_uInt16)m_pNewStartNF->GetValue() : USHRT_MAX)); } - if(m_pCountParaCB->GetSavedValue() != m_pCountParaCB->GetState() || - m_pRestartParaCountCB->GetSavedValue() != m_pRestartParaCountCB->GetState() || - m_pRestartNF->GetSavedValue() != m_pRestartNF->GetText() ) + if(m_pCountParaCB->IsValueChangedFromSaved()|| + m_pRestartParaCountCB->IsValueChangedFromSaved() || + m_pRestartNF->IsValueChangedFromSaved() ) { SwFmtLineNumber aFmt; aFmt.SetStartValue( static_cast< sal_uLong >(m_pRestartParaCountCB->GetState() == TRISTATE_TRUE ? diff --git a/sw/source/ui/config/mailconfigpage.cxx b/sw/source/ui/config/mailconfigpage.cxx index a03676e5b395..2c60e5ea14fc 100644 --- a/sw/source/ui/config/mailconfigpage.cxx +++ b/sw/source/ui/config/mailconfigpage.cxx @@ -145,15 +145,15 @@ SfxTabPage* SwMailConfigPage::Create( Window* pParent, const SfxItemSet& rAttrS bool SwMailConfigPage::FillItemSet( SfxItemSet& /*rSet*/ ) { - if(m_pDisplayNameED->GetText() != m_pDisplayNameED->GetSavedValue()) + if(m_pDisplayNameED->IsValueChangedFromSaved()) m_pConfigItem->SetMailDisplayName(m_pDisplayNameED->GetText()); - if(m_pAddressED->GetText() != m_pAddressED->GetSavedValue()) + if(m_pAddressED->IsValueChangedFromSaved()) m_pConfigItem->SetMailAddress(m_pAddressED->GetText()); - if( m_pReplyToCB->GetSavedValue() != TriState(m_pReplyToCB->IsChecked())) + if( m_pReplyToCB->IsValueChangedFromSaved() ) m_pConfigItem->SetMailReplyTo(m_pReplyToCB->IsChecked()); - if(m_pReplyToED->GetText() != m_pReplyToED->GetSavedValue()) + if(m_pReplyToED->IsValueChangedFromSaved()) m_pConfigItem->SetMailReplyTo(m_pReplyToED->GetText()); - if(m_pServerED->GetText() != m_pServerED->GetSavedValue()) + if(m_pServerED->IsValueChangedFromSaved()) m_pConfigItem->SetMailServer(m_pServerED->GetText()); if(m_pPortNF->IsModified()) diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx index 55f047129e6a..baf04a4400b8 100644 --- a/sw/source/ui/config/optload.cxx +++ b/sw/source/ui/config/optload.cxx @@ -141,8 +141,8 @@ bool SwLoadOptPage::FillItemSet( SfxItemSet& rSet ) SwFldUpdateFlags eFldFlags = m_pAutoUpdateFields->IsChecked() ? m_pAutoUpdateCharts->IsChecked() ? AUTOUPD_FIELD_AND_CHARTS : AUTOUPD_FIELD_ONLY : AUTOUPD_OFF; - if(TriState(m_pAutoUpdateFields->IsChecked()) != m_pAutoUpdateFields->GetSavedValue() || - TriState(m_pAutoUpdateCharts->IsChecked()) != m_pAutoUpdateCharts->GetSavedValue()) + if(m_pAutoUpdateFields->IsValueChangedFromSaved() || + m_pAutoUpdateCharts->IsValueChangedFromSaved()) { pMod->ApplyFldUpdateFlags(eFldFlags); if(m_pWrtShell) @@ -165,7 +165,7 @@ bool SwLoadOptPage::FillItemSet( SfxItemSet& rSet ) } const sal_Int32 nMPos = m_pMetricLB->GetSelectEntryPos(); - if ( nMPos != m_pMetricLB->GetSavedValue() ) + if ( m_pMetricLB->IsValueChangedFromSaved() ) { // Double-Cast for VA3.0 const sal_uInt16 nFieldUnit = (sal_uInt16)(sal_IntPtr)m_pMetricLB->GetEntryData( nMPos ); @@ -173,7 +173,7 @@ bool SwLoadOptPage::FillItemSet( SfxItemSet& rSet ) bRet = true; } - if(m_pTabMF->IsVisible() && m_pTabMF->GetText() != m_pTabMF->GetSavedValue()) + if(m_pTabMF->IsVisible() && m_pTabMF->IsValueChangedFromSaved()) { rSet.Put(SfxUInt16Item(SID_ATTR_DEFTABSTOP, (sal_uInt16)m_pTabMF->Denormalize(m_pTabMF->GetValue(FUNIT_TWIP)))); @@ -182,14 +182,14 @@ bool SwLoadOptPage::FillItemSet( SfxItemSet& rSet ) bool bIsUseCharUnitFlag = m_pUseCharUnit->IsChecked(); SvtCJKOptions aCJKOptions; - bIsUseCharUnitFlag = bIsUseCharUnitFlag && aCJKOptions.IsAsianTypographyEnabled(); + bIsUseCharUnitFlag = bIsUseCharUnitFlag && aCJKOptions.IsAsianTypographyEnabled(); if( (bIsUseCharUnitFlag ? 1 : 0) != m_pUseCharUnit->GetSavedValue()) { rSet.Put(SfxBoolItem(SID_ATTR_APPLYCHARUNIT, bIsUseCharUnitFlag )); bRet = true; } - if (m_pWordCountED->GetText() != m_pWordCountED->GetSavedValue()) + if( m_pWordCountED->IsValueChangedFromSaved() ) { boost::shared_ptr< comphelper::ConfigurationChanges > batch( comphelper::ConfigurationChanges::create()); @@ -199,7 +199,7 @@ bool SwLoadOptPage::FillItemSet( SfxItemSet& rSet ) } bool bIsSquaredPageModeFlag = m_pUseSquaredPageMode->IsChecked(); - if ( (bIsSquaredPageModeFlag ? 1 : 0) != m_pUseSquaredPageMode->GetSavedValue() ) + if ( m_pUseSquaredPageMode->IsValueChangedFromSaved() ) { pMod->ApplyDefaultPageMode( bIsSquaredPageModeFlag ); if ( m_pWrtShell ) diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 2740bf96fdff..6199f3c56db7 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -240,7 +240,7 @@ bool SwContentOptPage::FillItemSet(SfxItemSet& rSet) sal_Int32 nMPos = m_pMetricLB->GetSelectEntryPos(); sal_Int32 nGlobalMetricPos = nMPos; - if ( nMPos != m_pMetricLB->GetSavedValue() ) + if ( m_pMetricLB->IsValueChangedFromSaved() ) { // Double-Cast for VA3.0 const sal_uInt16 nFieldUnit = (sal_uInt16)(sal_IntPtr)m_pMetricLB->GetEntryData( nMPos ); @@ -249,7 +249,7 @@ bool SwContentOptPage::FillItemSet(SfxItemSet& rSet) } nMPos = m_pHMetric->GetSelectEntryPos(); - if ( nMPos != m_pHMetric->GetSavedValue() || nMPos != nGlobalMetricPos ) + if ( m_pHMetric->IsValueChangedFromSaved() || nMPos != nGlobalMetricPos ) { // Double-Cast for VA3.0 const sal_uInt16 nFieldUnit = (sal_uInt16)(sal_IntPtr)m_pHMetric->GetEntryData( nMPos ); @@ -257,7 +257,7 @@ bool SwContentOptPage::FillItemSet(SfxItemSet& rSet) bRet = true; } nMPos = m_pVMetric->GetSelectEntryPos(); - if ( nMPos != m_pVMetric->GetSavedValue() || nMPos != nGlobalMetricPos ) + if ( m_pVMetric->IsValueChangedFromSaved() || nMPos != nGlobalMetricPos ) { // Double-Cast for VA3.0 const sal_uInt16 nFieldUnit = (sal_uInt16)(sal_IntPtr)m_pVMetric->GetEntryData( nMPos ); @@ -629,11 +629,11 @@ bool SwStdFontTabPage::FillItemSet( SfxItemSet& ) const OUString sLabel = pLabelBox->GetText(); const OUString sIdx = pIdxBox->GetText(); - bool bStandardHeightChanged = pStandardHeightLB->GetSavedValue() != pStandardHeightLB->GetText(); - bool bTitleHeightChanged = pTitleHeightLB->GetSavedValue() != pTitleHeightLB->GetText(); - bool bListHeightChanged = pListHeightLB->GetSavedValue() != pListHeightLB->GetText() && (!bListHeightDefault || !bSetListHeightDefault ); - bool bLabelHeightChanged = pLabelHeightLB->GetSavedValue() != pLabelHeightLB->GetText() && (!bLabelHeightDefault || !bSetLabelHeightDefault ); - bool bIndexHeightChanged = pIndexHeightLB->GetSavedValue() != pIndexHeightLB->GetText() && (!bIndexHeightDefault || !bSetIndexHeightDefault ); + bool bStandardHeightChanged = pStandardHeightLB->IsValueChangedFromSaved(); + bool bTitleHeightChanged = pTitleHeightLB->IsValueChangedFromSaved(); + bool bListHeightChanged = pListHeightLB->IsValueChangedFromSaved() && (!bListHeightDefault || !bSetListHeightDefault ); + bool bLabelHeightChanged = pLabelHeightLB->IsValueChangedFromSaved() && (!bLabelHeightDefault || !bSetLabelHeightDefault ); + bool bIndexHeightChanged = pIndexHeightLB->IsValueChangedFromSaved() && (!bIndexHeightDefault || !bSetIndexHeightDefault ); if(bNotDocOnly) { pFontConfig->SetFontStandard(sStandard, nFontGroup); @@ -1159,27 +1159,27 @@ bool SwTableOptionsTabPage::FillItemSet( SfxItemSet& ) if (pBorderCB->IsChecked()) aInsOpts.mnInsMode |= tabopts::DEFAULT_BORDER; - if (pHeaderCB->GetSavedValue() != pHeaderCB->GetState() || - pRepeatHeaderCB->GetSavedValue() != pRepeatHeaderCB->GetState() || - pDontSplitCB->GetSavedValue() != pDontSplitCB->GetState() || - pBorderCB->GetSavedValue() != pBorderCB->GetState()) + if (pHeaderCB->IsValueChangedFromSaved() || + pRepeatHeaderCB->IsValueChangedFromSaved() || + pDontSplitCB->IsValueChangedFromSaved() || + pBorderCB->IsValueChangedFromSaved()) { pModOpt->SetInsTblFlags(bHTMLMode, aInsOpts); } - if (pNumFormattingCB->GetSavedValue() != pNumFormattingCB->GetState()) + if (pNumFormattingCB->IsValueChangedFromSaved()) { pModOpt->SetInsTblFormatNum(bHTMLMode, pNumFormattingCB->IsChecked()); bRet = true; } - if (pNumFmtFormattingCB->GetSavedValue() != pNumFmtFormattingCB->GetState()) + if (pNumFmtFormattingCB->IsValueChangedFromSaved()) { pModOpt->SetInsTblChangeNumFormat(bHTMLMode, pNumFmtFormattingCB->IsChecked()); bRet = true; } - if (pNumAlignmentCB->GetSavedValue() != pNumAlignmentCB->GetState()) + if (pNumAlignmentCB->IsValueChangedFromSaved()) { pModOpt->SetInsTblAlignNum(bHTMLMode, pNumAlignmentCB->IsChecked()); bRet = true; @@ -1369,10 +1369,10 @@ bool SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet& rSet ) if (m_pWrtShell) { m_pWrtShell->GetDoc()->set( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT, m_pMathBaselineAlignmentCB->IsChecked() ); - bRet |= TriState(m_pMathBaselineAlignmentCB->IsChecked()) != m_pMathBaselineAlignmentCB->GetSavedValue(); + bRet |= m_pMathBaselineAlignmentCB->IsValueChangedFromSaved(); } - if( TriState(m_pCrsrInProtCB->IsChecked()) != m_pCrsrInProtCB->GetSavedValue()) + if( m_pCrsrInProtCB->IsValueChangedFromSaved()) { rSet.Put(SfxBoolItem(FN_PARAM_CRSR_IN_PROTECTED, m_pCrsrInProtCB->IsChecked())); bRet = true; @@ -2246,9 +2246,9 @@ bool SwCompareOptionsTabPage::FillItemSet( SfxItemSet& ) bool bRet = false; SwModuleOptions *pOpt = SW_MOD()->GetModuleConfig(); - if( m_pAutoRB->IsChecked() != m_pAutoRB->GetSavedValue() || - m_pWordRB->IsChecked() != m_pWordRB->GetSavedValue() || - m_pCharRB->IsChecked() != m_pCharRB->GetSavedValue() ) + if( m_pAutoRB->IsValueChangedFromSaved() || + m_pWordRB->IsValueChangedFromSaved() || + m_pCharRB->IsValueChangedFromSaved() ) { SvxCompareMode eCmpMode = SVX_CMP_AUTO; @@ -2260,13 +2260,13 @@ bool SwCompareOptionsTabPage::FillItemSet( SfxItemSet& ) bRet = true; } - if( TriState(m_pRsidCB->IsChecked()) != m_pRsidCB->GetSavedValue() ) + if( m_pRsidCB->IsValueChangedFromSaved() ) { pOpt->SetUseRsid( m_pRsidCB->IsChecked() ); bRet = true; } - if( TriState(m_pIgnoreCB->IsChecked()) != m_pIgnoreCB->GetSavedValue() ) + if( m_pIgnoreCB->IsValueChangedFromSaved() ) { pOpt->SetIgnorePieces( m_pIgnoreCB->IsChecked() ); bRet = true; diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx index ab7a5e1b062a..48a6db8a88a8 100644 --- a/sw/source/ui/dbui/mmgreetingspage.cxx +++ b/sw/source/ui/dbui/mmgreetingspage.cxx @@ -324,7 +324,7 @@ bool SwMailMergeGreetingsPage::commitPage( ::svt::WizardTypes::CommitPageReason { SwMailMergeConfigItem& rConfig = m_pWizard->GetConfigItem(); - if (m_pFemaleColumnLB->GetSelectEntryPos() != m_pFemaleColumnLB->GetSavedValue()) + if (m_pFemaleColumnLB->IsValueChangedFromSaved()) { const SwDBData& rDBData = rConfig.GetCurrentDBData(); Sequence< OUString> aAssignment = rConfig.GetColumnAssignment( rDBData ); @@ -333,7 +333,7 @@ bool SwMailMergeGreetingsPage::commitPage( ::svt::WizardTypes::CommitPageReason aAssignment[MM_PART_GENDER] = m_pFemaleColumnLB->GetSelectEntry(); rConfig.SetColumnAssignment( rDBData, aAssignment ); } - if (m_pFemaleFieldCB->GetText() != m_pFemaleFieldCB->GetSavedValue()) + if (m_pFemaleFieldCB->IsValueChangedFromSaved()) rConfig.SetFemaleGenderValue(m_pFemaleFieldCB->GetText()); lcl_StoreGreetingsBox(*m_pFemaleLB, rConfig, SwMailMergeConfigItem::FEMALE); @@ -505,7 +505,7 @@ IMPL_LINK_NOARG(SwMailBodyDialog, OKHdl) rConfigItem.SetIndividualGreeting( m_aPersonalizedCB.IsChecked(), false); - if(m_aFemaleColumnLB.GetSelectEntryPos() != m_aFemaleColumnLB.GetSavedValue()) + if(m_aFemaleColumnLB.IsValueChangedFromSaved()) { const SwDBData& rDBData = rConfigItem.GetCurrentDBData(); Sequence< OUString> aAssignment = rConfigItem.GetColumnAssignment( rDBData ); @@ -518,7 +518,7 @@ IMPL_LINK_NOARG(SwMailBodyDialog, OKHdl) aAssignment[MM_PART_GENDER] = OUString(); rConfigItem.SetColumnAssignment( rDBData, aAssignment ); } - if(m_aFemaleFieldCB.GetText() != m_aFemaleFieldCB.GetSavedValue()) + if(m_aFemaleFieldCB.IsValueChangedFromSaved()) rConfigItem.SetFemaleGenderValue(m_aFemaleFieldCB.GetText()); EndDialog(RET_OK); diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx index 2fe526173002..966ab35e6481 100644 --- a/sw/source/ui/fldui/flddb.cxx +++ b/sw/source/ui/fldui/flddb.cxx @@ -236,7 +236,7 @@ bool SwFldDBPage::FillItemSet(SfxItemSet& ) bool bDBListBoxChanged = m_sOldDBName != sTempDBName || m_sOldTableName != sTempTableName || m_sOldColumnName != sTempColumnName; if (!IsFldEdit() || - m_pConditionED->GetSavedValue() != m_pConditionED->GetText() || + m_pConditionED->IsValueChangedFromSaved() || m_pValueED->GetSavedValue() != aVal || bDBListBoxChanged || m_nOldFormat != nFormat || m_nOldSubType != nSubType) diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx index 6334fc37b856..08564a5960f2 100644 --- a/sw/source/ui/fldui/flddinf.cxx +++ b/sw/source/ui/fldui/flddinf.cxx @@ -440,7 +440,7 @@ bool SwFldDokInfPage::FillItemSet(SfxItemSet& ) nFormat = m_pFormatLB->GetFormat(); if (!IsFldEdit() || nOldSel != m_pSelectionLB->GetSelectEntryPos() || - nOldFormat != nFormat || m_pFixedCB->GetState() != m_pFixedCB->GetSavedValue() + nOldFormat != nFormat || m_pFixedCB->IsValueChangedFromSaved() || (DI_CUSTOM == nSubType && aName != m_sOldCustomFieldName )) { InsertFld(TYP_DOCINFOFLD, nSubType, aName, aEmptyOUStr, nFormat, diff --git a/sw/source/ui/fldui/flddok.cxx b/sw/source/ui/fldui/flddok.cxx index 27c125d8e33e..7b265d170c1d 100644 --- a/sw/source/ui/fldui/flddok.cxx +++ b/sw/source/ui/fldui/flddok.cxx @@ -621,10 +621,10 @@ bool SwFldDokPage::FillItemSet(SfxItemSet& ) if (!IsFldEdit() || nOldSel != m_pSelectionLB->GetSelectEntryPos() || nOldFormat != nFormat || - m_pFixedCB->GetState() != m_pFixedCB->GetSavedValue() || - m_pValueED->GetText() != m_pValueED->GetSavedValue() || - m_pLevelED->GetText() != m_pLevelED->GetSavedValue() || - m_pDateOffsetED->GetText() != m_pDateOffsetED->GetSavedValue()) + m_pFixedCB->IsValueChangedFromSaved() || + m_pValueED->IsValueChangedFromSaved() || + m_pLevelED->IsValueChangedFromSaved() || + m_pDateOffsetED->IsValueChangedFromSaved()) { InsertFld( nTypeId, nSubType, aEmptyOUStr, aVal, nFormat, ' ', m_pNumFormatLB->IsAutomaticLanguage() ); } diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx index 400b5005350e..f4c476262bbf 100644 --- a/sw/source/ui/fldui/fldfunc.cxx +++ b/sw/source/ui/fldui/fldfunc.cxx @@ -562,11 +562,11 @@ bool SwFldFuncPage::FillItemSet(SfxItemSet& ) } if (!IsFldEdit() || - m_pNameED->GetSavedValue() != m_pNameED->GetText() || - m_pValueED->GetSavedValue() != m_pValueED->GetText() || - m_pCond1ED->GetSavedValue() != m_pCond1ED->GetText() || - m_pCond2ED->GetSavedValue() != m_pCond2ED->GetText() || - m_pListNameED->GetSavedValue() != m_pListNameED->GetText() || + m_pNameED->IsValueChangedFromSaved() || + m_pValueED->IsValueChangedFromSaved() || + m_pCond1ED->IsValueChangedFromSaved() || + m_pCond2ED->IsValueChangedFromSaved() || + m_pListNameED->IsValueChangedFromSaved() || bDropDownLBChanged || nOldFormat != nFormat) { diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx index 87daaac6c63e..af5582a306ff 100644 --- a/sw/source/ui/fldui/fldref.cxx +++ b/sw/source/ui/fldui/fldref.cxx @@ -929,11 +929,11 @@ bool SwFldRefPage::FillItemSet(SfxItemSet& ) } if (!IsFldEdit() || bModified || - m_pNameED->GetSavedValue() != m_pNameED->GetText() || - m_pValueED->GetSavedValue() != m_pValueED->GetText() || - m_pTypeLB->GetSavedValue() != m_pTypeLB->GetSelectEntryPos() || - m_pSelectionLB->GetSavedValue() != m_pSelectionLB->GetSelectEntryPos() || - m_pFormatLB->GetSavedValue() != m_pFormatLB->GetSelectEntryPos()) + m_pNameED->IsValueChangedFromSaved() || + m_pValueED->IsValueChangedFromSaved() || + m_pTypeLB->IsValueChangedFromSaved() || + m_pSelectionLB->IsValueChangedFromSaved() || + m_pFormatLB->IsValueChangedFromSaved()) { InsertFld( nTypeId, nSubType, aName, aVal, nFormat ); } diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx index 4e4ae2f3dc82..24b0b8fab082 100644 --- a/sw/source/ui/fldui/fldvar.cxx +++ b/sw/source/ui/fldui/fldvar.cxx @@ -1203,14 +1203,14 @@ bool SwFldVarPage::FillItemSet(SfxItemSet& ) } if (!IsFldEdit() || - m_pNameED->GetSavedValue() != m_pNameED->GetText() || - m_pValueED->GetSavedValue() != m_pValueED->GetText() || - m_pSelectionLB->GetSavedValue() != m_pSelectionLB->GetSelectEntryPos() || - m_pFormatLB->GetSavedValue() != m_pFormatLB->GetSelectEntryPos() || + m_pNameED->IsValueChangedFromSaved() || + m_pValueED->IsValueChangedFromSaved() || + m_pSelectionLB->IsValueChangedFromSaved() || + m_pFormatLB->IsValueChangedFromSaved() || nOldFormat != m_pNumFormatLB->GetFormat() || - m_pInvisibleCB->GetState() != m_pInvisibleCB->GetSavedValue() || - m_pChapterLevelLB->GetSavedValue() != m_pChapterLevelLB->GetSelectEntryPos() || - m_pSeparatorED->GetSavedValue() != m_pSeparatorED->GetText()) + m_pInvisibleCB->IsValueChangedFromSaved() || + m_pChapterLevelLB->IsValueChangedFromSaved() || + m_pSeparatorED->IsValueChangedFromSaved()) { InsertFld( nTypeId, nSubType, aName, aVal, nFormat, cSeparator, m_pNumFormatLB->IsAutomaticLanguage() ); diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx index 3e1d5aa59fcd..d32551aef89a 100644 --- a/sw/source/ui/frmdlg/column.cxx +++ b/sw/source/ui/frmdlg/column.cxx @@ -657,7 +657,7 @@ bool SwColumnPage::FillItemSet(SfxItemSet &rSet) if( m_pTextDirectionLB->IsVisible()) { const sal_Int32 nPos = m_pTextDirectionLB->GetSelectEntryPos(); - if ( nPos != m_pTextDirectionLB->GetSavedValue() ) + if ( m_pTextDirectionLB->IsValueChangedFromSaved() ) { sal_uInt32 nDirection = (sal_uInt32)(sal_IntPtr)m_pTextDirectionLB->GetEntryData( nPos ); rSet.Put( SvxFrameDirectionItem( (SvxFrameDirection)nDirection, RES_FRAMEDIR)); diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index 8242c6d7cfa1..9a9cc62cc57b 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -1057,8 +1057,8 @@ bool SwFrmPage::FillItemSet(SfxItemSet &rSet) aHoriOrient.SetRelationOrient( eRel ); aHoriOrient.SetPosToggle(m_pMirrorPagesCB->IsChecked()); - bool bMod = m_pAtHorzPosED->GetText() != m_pAtHorzPosED->GetSavedValue(); - bMod |= m_pMirrorPagesCB->GetState() != m_pMirrorPagesCB->GetSavedValue(); + bool bMod = m_pAtHorzPosED->IsValueChangedFromSaved(); + bMod |= m_pMirrorPagesCB->IsValueChangedFromSaved(); if ( eHOri == text::HoriOrientation::NONE && (bNew || (bAtHorzPosModified || bMod) || nOldH != eHOri ) ) @@ -1092,7 +1092,7 @@ bool SwFrmPage::FillItemSet(SfxItemSet &rSet) aVertOrient.SetVertOrient ( eVOri); aVertOrient.SetRelationOrient( eRel ); - bool bMod = m_pAtVertPosED->GetText() != m_pAtVertPosED->GetSavedValue(); + bool bMod = m_pAtVertPosED->IsValueChangedFromSaved(); if ( eVOri == text::VertOrientation::NONE && ( bNew || (bAtVertPosModified || bMod) || nOldV != eVOri) ) @@ -1148,8 +1148,8 @@ bool SwFrmPage::FillItemSet(SfxItemSet &rSet) } bool bValueModified = (m_aWidthED.IsValueModified() || m_aHeightED.IsValueModified()); - bool bCheckChanged = (m_pRelWidthCB->GetSavedValue() != TriState(m_pRelWidthCB->IsChecked()) - || m_pRelHeightCB->GetSavedValue() != TriState(m_pRelHeightCB->IsChecked())); + bool bCheckChanged = m_pRelWidthCB->IsValueChangedFromSaved() + || m_pRelHeightCB->IsValueChangedFromSaved(); bool bLegalValue = !(!rOldSize.GetWidth () && !rOldSize.GetHeight() && m_aWidthED .GetValue() == m_aWidthED .GetMin() && @@ -1183,20 +1183,20 @@ bool SwFrmPage::FillItemSet(SfxItemSet &rSet) } if( !IsInGraficMode() ) { - if( m_pAutoHeightCB->GetState() != m_pAutoHeightCB->GetSavedValue() ) + if( m_pAutoHeightCB->IsValueChangedFromSaved() ) { SwFrmSize eFrmSize = m_pAutoHeightCB->IsChecked()? ATT_MIN_SIZE : ATT_FIX_SIZE; if( eFrmSize != aSz.GetHeightSizeType() ) aSz.SetHeightSizeType(eFrmSize); } - if( m_pAutoWidthCB->GetState() != m_pAutoWidthCB->GetSavedValue() ) + if( m_pAutoWidthCB->IsValueChangedFromSaved() ) { SwFrmSize eFrmSize = m_pAutoWidthCB->IsChecked()? ATT_MIN_SIZE : ATT_FIX_SIZE; if( eFrmSize != aSz.GetWidthSizeType() ) aSz.SetWidthSizeType( eFrmSize ); } } - if( !bFormat && m_pFixedRatioCB->GetSavedValue() != TriState(m_pFixedRatioCB->IsChecked())) + if( !bFormat && m_pFixedRatioCB->IsValueChangedFromSaved() ) bRet |= 0 != rSet.Put(SfxBoolItem(FN_KEEP_ASPECT_RATIO, m_pFixedRatioCB->IsChecked())); pOldItem = GetOldItem(rSet, RES_FRM_SIZE); @@ -1211,7 +1211,7 @@ bool SwFrmPage::FillItemSet(SfxItemSet &rSet) bRet |= 0 != rSet.Put( aSz ); } - if(TriState(m_pFollowTextFlowCB->IsChecked()) != m_pFollowTextFlowCB->GetSavedValue()) + if(m_pFollowTextFlowCB->IsValueChangedFromSaved()) { bRet |= 0 != rSet.Put(SwFmtFollowTextFlow(m_pFollowTextFlowCB->IsChecked())); } @@ -2487,11 +2487,11 @@ void SwGrfExtPage::ActivatePage(const SfxItemSet& rSet) bool SwGrfExtPage::FillItemSet( SfxItemSet &rSet ) { bool bModified = false; - if ( m_pMirrorHorzBox->GetSavedValue() != TriState(m_pMirrorHorzBox->IsChecked()) || - m_pMirrorVertBox->GetSavedValue() != TriState(m_pMirrorVertBox->IsChecked()) || - m_pAllPagesRB->GetSavedValue() != m_pAllPagesRB->IsChecked() || - m_pLeftPagesRB->GetSavedValue() != m_pLeftPagesRB->IsChecked() || - m_pRightPagesRB->GetSavedValue() != m_pRightPagesRB->IsChecked()) + if ( m_pMirrorHorzBox->IsValueChangedFromSaved() || + m_pMirrorVertBox->IsValueChangedFromSaved() || + m_pAllPagesRB->IsValueChangedFromSaved() || + m_pLeftPagesRB->IsValueChangedFromSaved() || + m_pRightPagesRB->IsValueChangedFromSaved() ) { bModified = true; @@ -3047,9 +3047,9 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet ) bool SwFrmAddPage::FillItemSet(SfxItemSet &rSet) { bool bRet = false; - if (pNameED->GetText() != pNameED->GetSavedValue()) + if (pNameED->IsValueChangedFromSaved()) bRet |= 0 != rSet.Put(SfxStringItem(FN_SET_FRM_NAME, pNameED->GetText())); - if (pAltNameED->GetText() != pAltNameED->GetSavedValue()) + if (pAltNameED->IsValueChangedFromSaved()) bRet |= 0 != rSet.Put(SfxStringItem(FN_SET_FRM_ALT_NAME, pAltNameED->GetText())); const SfxPoolItem* pOldItem; @@ -3061,18 +3061,17 @@ bool SwFrmAddPage::FillItemSet(SfxItemSet &rSet) aProt != *pOldItem ) bRet |= 0 != rSet.Put( aProt); - bool bChecked; - if ( (bChecked = pEditInReadonlyCB->IsChecked()) != (pEditInReadonlyCB->GetSavedValue() == 1) ) - bRet |= 0 != rSet.Put( SwFmtEditInReadonly( RES_EDIT_IN_READONLY, bChecked)); + if ( pEditInReadonlyCB->IsValueChangedFromSaved() ) + bRet |= 0 != rSet.Put( SwFmtEditInReadonly( RES_EDIT_IN_READONLY, pEditInReadonlyCB->IsChecked())); - if ( (bChecked = pPrintFrameCB->IsChecked()) != (pPrintFrameCB->GetSavedValue() == 1) ) - bRet |= 0 != rSet.Put( SvxPrintItem( RES_PRINT, bChecked)); + if ( pPrintFrameCB->IsValueChangedFromSaved() ) + bRet |= 0 != rSet.Put( SvxPrintItem( RES_PRINT, pPrintFrameCB->IsChecked())); // textflow if( pTextFlowLB->IsVisible() ) { sal_Int32 nPos = pTextFlowLB->GetSelectEntryPos(); - if( nPos != pTextFlowLB->GetSavedValue() ) + if( pTextFlowLB->IsValueChangedFromSaved() ) { sal_uInt16 nData = (sal_uInt16)(sal_IntPtr)pTextFlowLB->GetEntryData( nPos ); bRet |= 0 != rSet.Put( SvxFrameDirectionItem( @@ -3104,7 +3103,7 @@ bool SwFrmAddPage::FillItemSet(SfxItemSet &rSet) } } - if(m_pVertAlignLB->GetSelectEntryPos() != m_pVertAlignLB->GetSavedValue()) + if(m_pVertAlignLB->IsValueChangedFromSaved()) { SdrTextVertAdjust nAdjust; switch(m_pVertAlignLB->GetSelectEntryPos()) diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx index 96c7669d5fc0..a0539e93ae6b 100644 --- a/sw/source/ui/misc/pggrid.cxx +++ b/sw/source/ui/misc/pggrid.cxx @@ -161,20 +161,18 @@ SfxTabPage *SwTextGridPage::Create(Window *pParent, const SfxItemSet &rSet) bool SwTextGridPage::FillItemSet(SfxItemSet &rSet) { bool bRet = false; - if(m_pNoGridRB->GetSavedValue() != m_pNoGridRB->IsChecked()|| - m_pLinesGridRB->GetSavedValue() != m_pLinesGridRB->IsChecked()|| - m_pLinesPerPageNF->GetSavedValue().toInt32() - != m_pLinesPerPageNF->GetValue()|| - m_pTextSizeMF->GetSavedValue().toInt32() != m_pTextSizeMF->GetValue()|| - m_pCharsPerLineNF->GetSavedValue().toInt32() - != m_pCharsPerLineNF->GetValue()|| - m_pSnapToCharsCB->GetSavedValue() != TriState(m_pSnapToCharsCB->IsChecked()) || - m_pRubySizeMF->GetSavedValue().toInt32() != m_pRubySizeMF->GetValue()|| - m_pCharWidthMF->GetSavedValue().toInt32() != m_pCharWidthMF->GetValue()|| - m_pRubyBelowCB->GetSavedValue() != TriState(m_pRubyBelowCB->IsChecked())|| - m_pDisplayCB->GetSavedValue() != TriState(m_pDisplayCB->IsChecked())|| - m_pPrintCB->GetSavedValue() != TriState(m_pPrintCB->IsChecked())|| - m_pColorLB->GetSavedValue() != m_pColorLB->GetSelectEntryPos()) + if(m_pNoGridRB->IsValueChangedFromSaved() || + m_pLinesGridRB->IsValueChangedFromSaved() || + m_pLinesPerPageNF->IsValueChangedFromSaved() || + m_pTextSizeMF->IsValueChangedFromSaved() || + m_pCharsPerLineNF->IsValueChangedFromSaved() || + m_pSnapToCharsCB->IsValueChangedFromSaved() || + m_pRubySizeMF->IsValueChangedFromSaved() || + m_pCharWidthMF->IsValueChangedFromSaved() || + m_pRubyBelowCB->IsValueChangedFromSaved() || + m_pDisplayCB->IsValueChangedFromSaved() || + m_pPrintCB->IsValueChangedFromSaved() || + m_pColorLB->IsValueChangedFromSaved()) { PutGridItem(rSet); bRet = true; diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx index 9c4dce4dcbb0..62a9bb6c3187 100644 --- a/sw/source/ui/table/tabledlg.cxx +++ b/sw/source/ui/table/tabledlg.cxx @@ -390,8 +390,8 @@ bool SwFormatTablePage::FillItemSet( SfxItemSet& rCoreSet ) if(bModified) { - if( m_pBottomMF->GetText() != m_pBottomMF->GetSavedValue() || - m_pTopMF->GetText() != m_pTopMF->GetSavedValue() ) + if( m_pBottomMF->IsValueChangedFromSaved() || + m_pTopMF->IsValueChangedFromSaved() ) { SvxULSpaceItem aULSpace(RES_UL_SPACE); aULSpace.SetUpper( m_pTopMF->Denormalize(m_pTopMF->GetValue( FUNIT_TWIP ))); @@ -400,7 +400,7 @@ bool SwFormatTablePage::FillItemSet( SfxItemSet& rCoreSet ) } } - if(m_pNameED->GetText() != m_pNameED->GetSavedValue()) + if(m_pNameED->IsValueChangedFromSaved()) { rCoreSet.Put(SfxStringItem( FN_PARAM_TABLE_NAME, m_pNameED->GetText())); bModified = true; @@ -409,7 +409,7 @@ bool SwFormatTablePage::FillItemSet( SfxItemSet& rCoreSet ) if( m_pTextDirectionLB->IsVisible() ) { const sal_Int32 nPos = m_pTextDirectionLB->GetSelectEntryPos(); - if ( nPos != m_pTextDirectionLB->GetSavedValue() ) + if ( m_pTextDirectionLB->IsValueChangedFromSaved() ) { const sal_uInt32 nDirection = (sal_uInt32)(sal_uIntPtr)m_pTextDirectionLB->GetEntryData( nPos ); @@ -616,7 +616,7 @@ int SwFormatTablePage::DeactivatePage( SfxItemSet* _pSet ) SwTwips lRight = static_cast< SwTwips >(m_aRightMF.DenormalizePercent(m_aRightMF.GetValue( FUNIT_TWIP ))); if( m_aLeftMF.GetText() != m_aLeftMF.GetSavedValue() || - m_aRightMF.GetText() != m_aRightMF.GetSavedValue() ) + m_aRightMF.GetText() != m_aRightMF.GetSavedValue() ) { pTblData->SetWidthChanged(); pTblData->SetLeftSpace( lLeft); @@ -1326,19 +1326,19 @@ bool SwTextFlowPage::FillItemSet( SfxItemSet& rSet ) bool bModified = false; //Repeat Heading - if(TriState(m_pHeadLineCB->IsChecked()) != m_pHeadLineCB->GetSavedValue() || - OUString::number( static_cast< sal_Int32 >(m_pRepeatHeaderNF->GetValue()) ) != m_pRepeatHeaderNF->GetSavedValue() ) + if(m_pHeadLineCB->IsValueChangedFromSaved() || + m_pRepeatHeaderNF->IsValueChangedFromSaved() ) { bModified |= 0 != rSet.Put( SfxUInt16Item(FN_PARAM_TABLE_HEADLINE, m_pHeadLineCB->IsChecked()? sal_uInt16(m_pRepeatHeaderNF->GetValue()) : 0 )); } - if(TriState(m_pKeepCB->IsChecked()) != m_pKeepCB->GetSavedValue()) + if(m_pKeepCB->IsValueChangedFromSaved()) bModified |= 0 != rSet.Put( SvxFmtKeepItem( m_pKeepCB->IsChecked(), RES_KEEP)); - if(TriState(m_pSplitCB->IsChecked()) != m_pSplitCB->GetSavedValue()) + if(m_pSplitCB->IsValueChangedFromSaved()) bModified |= 0 != rSet.Put( SwFmtLayoutSplit( m_pSplitCB->IsChecked())); - if(TriState(m_pSplitRowCB->IsChecked()) != m_pSplitRowCB->GetSavedValue()) + if(m_pSplitRowCB->IsValueChangedFromSaved()) bModified |= 0 != rSet.Put( SwFmtRowSplit( m_pSplitRowCB->IsChecked())); const SvxFmtBreakItem* pBreak = (const SvxFmtBreakItem*)GetOldItem( rSet, RES_BREAK ); @@ -1350,7 +1350,7 @@ bool SwTextFlowPage::FillItemSet( SfxItemSet& rSet ) bool bPageItemPut = false; if ( bState != (m_pPageCollCB->GetSavedValue() == 1) || ( bState && - m_pPageCollLB->GetSelectEntryPos() != m_pPageCollLB->GetSavedValue() ) + m_pPageCollLB->IsValueChangedFromSaved() ) || (m_pPageNoNF->IsEnabled() && m_pPageNoNF->IsValueModified()) ) { OUString sPage; @@ -1374,8 +1374,8 @@ bool SwTextFlowPage::FillItemSet( SfxItemSet& rSet ) if ( !bPageItemPut && ( bState != (m_pPageCollCB->GetSavedValue() == 1) || bIsChecked != (m_pPgBrkCB->GetSavedValue() ==1) || - m_pPgBrkBeforeRB->IsChecked() != m_pPgBrkBeforeRB->GetSavedValue() || - m_pPgBrkRB->IsChecked() != m_pPgBrkRB->GetSavedValue() )) + m_pPgBrkBeforeRB->IsValueChangedFromSaved() || + m_pPgBrkRB->IsValueChangedFromSaved() )) { SvxFmtBreakItem aBreak( (const SvxFmtBreakItem&)GetItemSet().Get( RES_BREAK ) ); @@ -1410,7 +1410,7 @@ bool SwTextFlowPage::FillItemSet( SfxItemSet& rSet ) } } - if(m_pTextDirectionLB->GetSelectEntryPos() != m_pTextDirectionLB->GetSavedValue()) + if(m_pTextDirectionLB->IsValueChangedFromSaved()) { bModified |= 0 != rSet.Put( SvxFrameDirectionItem( @@ -1418,7 +1418,7 @@ bool SwTextFlowPage::FillItemSet( SfxItemSet& rSet ) , FN_TABLE_BOX_TEXTORIENTATION)); } - if(m_pVertOrientLB->GetSelectEntryPos() != m_pVertOrientLB->GetSavedValue()) + if(m_pVertOrientLB->IsValueChangedFromSaved()) { sal_uInt16 nOrient = USHRT_MAX; switch(m_pVertOrientLB->GetSelectEntryPos()) |