chart2/source/controller/dialogs/res_DataTableProperties.cxx | 8 chart2/source/controller/dialogs/res_ErrorBar.cxx | 8 chart2/source/controller/dialogs/res_Trendline.cxx | 8 chart2/source/controller/dialogs/tp_AxisLabel.cxx | 10 - chart2/source/controller/itemsetwrapper/ItemConverter.cxx | 2 chart2/source/controller/main/DrawCommandDispatch.cxx | 2 cui/source/tabpages/align.cxx | 14 - cui/source/tabpages/chardlg.cxx | 42 ++-- cui/source/tabpages/measure.cxx | 16 - cui/source/tabpages/numfmt.cxx | 2 cui/source/tabpages/paragrph.cxx | 26 +- cui/source/tabpages/textattr.cxx | 20 +- cui/source/tabpages/tparea.cxx | 2 cui/source/tabpages/tpbitmap.cxx | 20 +- cui/source/tabpages/tpline.cxx | 24 +- cui/source/tabpages/tplnedef.cxx | 2 cui/source/tabpages/tpshadow.cxx | 32 +-- cui/source/tabpages/tptrans.cxx | 4 editeng/source/editeng/editdbg.cxx | 2 editeng/source/uno/unofored.cxx | 6 editeng/source/uno/unotext.cxx | 12 - include/svl/itemset.hxx | 2 include/svl/poolitem.hxx | 8 include/svx/sdr/properties/properties.hxx | 2 sc/source/core/data/documen8.cxx | 2 sc/source/core/data/patattr.cxx | 4 sc/source/core/data/stlpool.cxx | 6 sc/source/core/tool/editutil.cxx | 6 sc/source/filter/html/htmlexp.cxx | 2 sc/source/filter/rtf/eeimpars.cxx | 4 sc/source/ui/app/inputhdl.cxx | 8 sc/source/ui/attrdlg/tabpages.cxx | 2 sc/source/ui/docshell/docsh6.cxx | 2 sc/source/ui/drawfunc/drtxtob.cxx | 14 - sc/source/ui/sidebar/AlignmentPropertyPanel.cxx | 2 sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx | 6 sc/source/ui/unoobj/cellsuno.cxx | 2 sc/source/ui/vba/vbafont.cxx | 18 - sc/source/ui/vba/vbaformat.cxx | 4 sc/source/ui/vba/vbarange.cxx | 6 sc/source/ui/view/editsh.cxx | 4 sc/source/ui/view/formatsh.cxx | 22 +- sc/source/ui/view/viewfun2.cxx | 4 sc/source/ui/view/viewutil.cxx | 2 sd/source/ui/dlg/tpaction.cxx | 4 sd/source/ui/func/fuconrec.cxx | 2 sd/source/ui/unoidl/unopback.cxx | 2 sd/source/ui/view/drtxtob.cxx | 4 sd/source/ui/view/drtxtob1.cxx | 2 sd/source/ui/view/drviews2.cxx | 6 sd/source/ui/view/drviewsf.cxx | 8 sfx2/source/control/bindings.cxx | 6 sfx2/source/control/ctrlitem.cxx | 4 sfx2/source/control/shell.cxx | 4 sfx2/source/control/unoctitm.cxx | 6 sfx2/source/dialog/tabdlg.cxx | 2 sfx2/source/doc/objcont.cxx | 2 sfx2/source/toolbox/tbxitem.cxx | 8 svl/source/items/itemset.cxx | 26 -- svx/inc/sdr/properties/e3dcompoundproperties.hxx | 2 svx/inc/sdr/properties/e3dsceneproperties.hxx | 2 svx/inc/sdr/properties/groupproperties.hxx | 2 svx/source/dialog/connctrl.cxx | 2 svx/source/dialog/rlrcitem.cxx | 2 svx/source/dialog/srchdlg.cxx | 9 svx/source/dialog/weldeditview.cxx | 6 svx/source/engine3d/float3d.cxx | 110 +++++------ svx/source/sdr/properties/e3dsceneproperties.cxx | 2 svx/source/sdr/properties/groupproperties.cxx | 2 svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx | 2 svx/source/svdraw/constructhelper.cxx | 2 svx/source/svdraw/svdedtv.cxx | 2 svx/source/svdraw/svdedtv1.cxx | 14 - svx/source/table/tablecontroller.cxx | 4 svx/source/tbxctrls/colrctrl.cxx | 2 sw/source/core/crsr/findattr.cxx | 8 sw/source/core/edit/edattr.cxx | 3 sw/source/core/unocore/unoobj2.cxx | 1 sw/source/uibase/app/docstyle.cxx | 2 sw/source/uibase/shells/annotsh.cxx | 2 sw/source/uibase/shells/drwtxtsh.cxx | 6 sw/source/uibase/shells/langhelper.cxx | 2 sw/source/uibase/shells/textsh1.cxx | 2 83 files changed, 331 insertions(+), 340 deletions(-)
New commits: commit d053413402956fecbcf65c9319ebbe2cd6c08dfa Author: Armin Le Grand (allotropia) <armin.le.grand.ext...@allotropia.de> AuthorDate: Tue Mar 19 18:39:10 2024 +0100 Commit: Armin Le Grand <armin.le.gr...@me.com> CommitDate: Thu Mar 21 21:39:57 2024 +0100 ITEM: Remove InvalidateAllItems() I checked if this is used, but it can be replaced using Clear() -> all. This prevents that the whole array of Items in an ItemSet gets set to INVALID_POOL_ITEM. I also checked if INVALID_POOL_ITEM/IsInvalidItem is needed at all representing SfxItemState::DONTCARE but it is and still will need to be set for individual Items. At last checked if SfxItemState::UNKNOWN and ::DISABLED really need to be separate states, but indeed there are some rare cases that need that. To make things more consistent I also renamed SfxItemState::DONTCARE to SfxItemState::INVALID to better match Set/IsInvalid calls at ItemSet. The build showed a missing UT and led to a problem due to the hand-made ItemSet-like SearchAttrItemList. The state 'invalid' seems to be used as 'unused' marker. It should be changed to use SfxPoolItemHolder and not need that. For now, set by using an own loop to set to that state. Change-Id: Ifc51aad60570569a1e37d3084a5e307eed47d06c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165035 Tested-by: Jenkins Reviewed-by: Armin Le Grand <armin.le.gr...@me.com> diff --git a/chart2/source/controller/dialogs/res_DataTableProperties.cxx b/chart2/source/controller/dialogs/res_DataTableProperties.cxx index bf87b3e6b9e3..327298e312d9 100644 --- a/chart2/source/controller/dialogs/res_DataTableProperties.cxx +++ b/chart2/source/controller/dialogs/res_DataTableProperties.cxx @@ -38,7 +38,7 @@ void DataTablePropertiesResources::initFromItemSet(const SfxItemSet& rInAttrs) SfxItemState aState; aState = rInAttrs.GetItemState(SCHATTR_DATA_TABLE_HORIZONTAL_BORDER, false, &pPoolItem); - if (aState == SfxItemState::DONTCARE) + if (aState == SfxItemState::INVALID) { m_xCbHorizontalBorder->set_state(TRISTATE_INDET); } @@ -50,7 +50,7 @@ void DataTablePropertiesResources::initFromItemSet(const SfxItemSet& rInAttrs) } aState = rInAttrs.GetItemState(SCHATTR_DATA_TABLE_VERTICAL_BORDER, false, &pPoolItem); - if (aState == SfxItemState::DONTCARE) + if (aState == SfxItemState::INVALID) { m_xCbVerticalBorder->set_state(TRISTATE_INDET); } @@ -61,7 +61,7 @@ void DataTablePropertiesResources::initFromItemSet(const SfxItemSet& rInAttrs) } aState = rInAttrs.GetItemState(SCHATTR_DATA_TABLE_OUTLINE, false, &pPoolItem); - if (aState == SfxItemState::DONTCARE) + if (aState == SfxItemState::INVALID) { m_xCbOutilne->set_state(TRISTATE_INDET); } @@ -72,7 +72,7 @@ void DataTablePropertiesResources::initFromItemSet(const SfxItemSet& rInAttrs) } aState = rInAttrs.GetItemState(SCHATTR_DATA_TABLE_KEYS, false, &pPoolItem); - if (aState == SfxItemState::DONTCARE) + if (aState == SfxItemState::INVALID) { m_xCbKeys->set_state(TRISTATE_INDET); } diff --git a/chart2/source/controller/dialogs/res_ErrorBar.cxx b/chart2/source/controller/dialogs/res_ErrorBar.cxx index 3eb875098b46..ae8e7cd28e2e 100644 --- a/chart2/source/controller/dialogs/res_ErrorBar.cxx +++ b/chart2/source/controller/dialogs/res_ErrorBar.cxx @@ -475,7 +475,7 @@ void ErrorBarResources::Reset(const SfxItemSet& rInAttrs) // category m_eErrorKind = SvxChartKindError::NONE; SfxItemState aState = rInAttrs.GetItemState( SCHATTR_STAT_KIND_ERROR, true, &pPoolItem ); - m_bErrorKindUnique = ( aState != SfxItemState::DONTCARE ); + m_bErrorKindUnique = ( aState != SfxItemState::INVALID ); if( aState == SfxItemState::SET ) m_eErrorKind = static_cast<const SvxChartKindErrorItem*>(pPoolItem)->GetValue(); @@ -531,7 +531,7 @@ void ErrorBarResources::Reset(const SfxItemSet& rInAttrs) // indicator aState = rInAttrs.GetItemState( SCHATTR_STAT_INDICATE, true, &pPoolItem ); - m_bIndicatorUnique = ( aState != SfxItemState::DONTCARE ); + m_bIndicatorUnique = ( aState != SfxItemState::INVALID ); if( aState == SfxItemState::SET) m_eIndicate = static_cast<const SvxChartIndicateItem *>(pPoolItem)->GetValue(); @@ -560,7 +560,7 @@ void ErrorBarResources::Reset(const SfxItemSet& rInAttrs) // ranges aState = rInAttrs.GetItemState( SCHATTR_STAT_RANGE_POS, true, &pPoolItem ); - m_bRangePosUnique = ( aState != SfxItemState::DONTCARE ); + m_bRangePosUnique = ( aState != SfxItemState::INVALID ); if( aState == SfxItemState::SET ) { OUString sRangePositive = static_cast< const SfxStringItem * >( pPoolItem )->GetValue(); @@ -568,7 +568,7 @@ void ErrorBarResources::Reset(const SfxItemSet& rInAttrs) } aState = rInAttrs.GetItemState( SCHATTR_STAT_RANGE_NEG, true, &pPoolItem ); - m_bRangeNegUnique = ( aState != SfxItemState::DONTCARE ); + m_bRangeNegUnique = ( aState != SfxItemState::INVALID ); if( aState == SfxItemState::SET ) { OUString sRangeNegative = static_cast< const SfxStringItem * >( pPoolItem )->GetValue(); diff --git a/chart2/source/controller/dialogs/res_Trendline.cxx b/chart2/source/controller/dialogs/res_Trendline.cxx index 58ef6497a538..3cbba1e59a28 100644 --- a/chart2/source/controller/dialogs/res_Trendline.cxx +++ b/chart2/source/controller/dialogs/res_Trendline.cxx @@ -156,7 +156,7 @@ void TrendlineResources::Reset( const SfxItemSet& rInAttrs ) const SfxPoolItem* pPoolItem = nullptr; SfxItemState aState = rInAttrs.GetItemState( SCHATTR_REGRESSION_TYPE, true, &pPoolItem ); - m_bTrendLineUnique = ( aState != SfxItemState::DONTCARE ); + m_bTrendLineUnique = ( aState != SfxItemState::INVALID ); if( aState == SfxItemState::SET ) { const SvxChartRegressItem * pItem = dynamic_cast< const SvxChartRegressItem * >( pPoolItem ); @@ -212,7 +212,7 @@ void TrendlineResources::Reset( const SfxItemSet& rInAttrs ) lcl_setValue(*m_xFmtFld_InterceptValue, nValue); aState = rInAttrs.GetItemState( SCHATTR_REGRESSION_SET_INTERCEPT, true, &pPoolItem ); - if( aState == SfxItemState::DONTCARE ) + if( aState == SfxItemState::INVALID ) { m_xCB_SetIntercept->set_state(TRISTATE_INDET); } @@ -223,7 +223,7 @@ void TrendlineResources::Reset( const SfxItemSet& rInAttrs ) } aState = rInAttrs.GetItemState( SCHATTR_REGRESSION_SHOW_EQUATION, true, &pPoolItem ); - if( aState == SfxItemState::DONTCARE ) + if( aState == SfxItemState::INVALID ) { m_xCB_ShowEquation->set_state(TRISTATE_INDET); } @@ -234,7 +234,7 @@ void TrendlineResources::Reset( const SfxItemSet& rInAttrs ) } aState = rInAttrs.GetItemState( SCHATTR_REGRESSION_SHOW_COEFF, true, &pPoolItem ); - if( aState == SfxItemState::DONTCARE ) + if( aState == SfxItemState::INVALID ) { m_xCB_ShowCorrelationCoeff->set_state(TRISTATE_INDET); } diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.cxx b/chart2/source/controller/dialogs/tp_AxisLabel.cxx index 33faff6c5335..79976618341c 100644 --- a/chart2/source/controller/dialogs/tp_AxisLabel.cxx +++ b/chart2/source/controller/dialogs/tp_AxisLabel.cxx @@ -134,7 +134,7 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet* rInAttrs ) // show description SfxItemState aState = rInAttrs->GetItemState( SCHATTR_AXIS_SHOWDESCR, false, &pPoolItem ); - if( aState == SfxItemState::DONTCARE ) + if( aState == SfxItemState::INVALID ) { m_xCbShowDescription->set_state( TRISTATE_INDET ); } @@ -157,7 +157,7 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet* rInAttrs ) if( aState == SfxItemState::SET ) m_nInitialDegrees = static_cast< const SdrAngleItem * >( pPoolItem )->GetValue(); - m_bHasInitialDegrees = aState != SfxItemState::DONTCARE; + m_bHasInitialDegrees = aState != SfxItemState::INVALID; if( m_bHasInitialDegrees ) m_xCtrlDial->SetRotation( m_nInitialDegrees ); else @@ -169,7 +169,7 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet* rInAttrs ) if( aState == SfxItemState::SET ) m_bInitialStacking = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue(); - m_bHasInitialStacking = aState != SfxItemState::DONTCARE; + m_bHasInitialStacking = aState != SfxItemState::INVALID; if( m_bHasInitialDegrees ) m_xCbStacked->set_state(m_bInitialStacking ? TRISTATE_TRUE : TRISTATE_FALSE); else @@ -181,7 +181,7 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet* rInAttrs ) // Text overlap ---------- aState = rInAttrs->GetItemState( SCHATTR_AXIS_LABEL_OVERLAP, false, &pPoolItem ); - if( aState == SfxItemState::DONTCARE ) + if( aState == SfxItemState::INVALID ) { m_xCbTextOverlap->set_state( TRISTATE_INDET ); } @@ -198,7 +198,7 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet* rInAttrs ) // text break ---------- aState = rInAttrs->GetItemState( SCHATTR_AXIS_LABEL_BREAK, false, &pPoolItem ); - if( aState == SfxItemState::DONTCARE ) + if( aState == SfxItemState::INVALID ) { m_xCbTextBreak->set_state( TRISTATE_INDET ); } diff --git a/chart2/source/controller/itemsetwrapper/ItemConverter.cxx b/chart2/source/controller/itemsetwrapper/ItemConverter.cxx index 4ef74c80a83b..3d4cf2abc309 100644 --- a/chart2/source/controller/itemsetwrapper/ItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/ItemConverter.cxx @@ -211,7 +211,7 @@ void ItemConverter::InvalidateUnequalItems( SfxItemSet &rDestSet, const SfxItem } } } - else if( nSourceItemState == SfxItemState::DONTCARE ) + else if( nSourceItemState == SfxItemState::INVALID ) rDestSet.InvalidateItem(nWhich); nWhich = aIter.NextWhich (); diff --git a/chart2/source/controller/main/DrawCommandDispatch.cxx b/chart2/source/controller/main/DrawCommandDispatch.cxx index 5a678ad7e594..0ecbf737994b 100644 --- a/chart2/source/controller/main/DrawCommandDispatch.cxx +++ b/chart2/source/controller/main/DrawCommandDispatch.cxx @@ -185,7 +185,7 @@ void DrawCommandDispatch::setLineEnds( SfxItemSet& rAttr ) pDrawViewWrapper->GetAttributes( aSet ); tools::Long nWidth = 300; // (1/100th mm) - if ( aSet.GetItemState( XATTR_LINEWIDTH ) != SfxItemState::DONTCARE ) + if ( aSet.GetItemState( XATTR_LINEWIDTH ) != SfxItemState::INVALID ) { tools::Long nValue = aSet.Get( XATTR_LINEWIDTH ).GetValue(); if ( nValue > 0 ) diff --git a/cui/source/tabpages/align.cxx b/cui/source/tabpages/align.cxx index 33b41164238f..d5816158d70b 100644 --- a/cui/source/tabpages/align.cxx +++ b/cui/source/tabpages/align.cxx @@ -402,7 +402,7 @@ namespace rBtn.set_sensitive(false); rTriState.bTriStateEnabled = false; break; - case SfxItemState::DONTCARE: + case SfxItemState::INVALID: rBtn.set_state(TRISTATE_INDET); rTriState.bTriStateEnabled = true; break; @@ -439,7 +439,7 @@ void AlignmentTabPage::Reset(const SfxItemSet* pCoreAttrs) case SfxItemState::DISABLED: m_xLbHorAlign->set_sensitive(false); break; - case SfxItemState::DONTCARE: + case SfxItemState::INVALID: m_xLbHorAlign->set_active(-1); break; case SfxItemState::DEFAULT: @@ -482,7 +482,7 @@ void AlignmentTabPage::Reset(const SfxItemSet* pCoreAttrs) case SfxItemState::DISABLED: m_xEdIndent->set_sensitive(false); break; - case SfxItemState::DONTCARE: + case SfxItemState::INVALID: m_xEdIndent->set_text(""); break; case SfxItemState::DEFAULT: @@ -505,7 +505,7 @@ void AlignmentTabPage::Reset(const SfxItemSet* pCoreAttrs) case SfxItemState::DISABLED: m_xLbVerAlign->set_sensitive(false); break; - case SfxItemState::DONTCARE: + case SfxItemState::INVALID: m_xLbVerAlign->set_active(-1); break; case SfxItemState::DEFAULT: @@ -546,7 +546,7 @@ void AlignmentTabPage::Reset(const SfxItemSet* pCoreAttrs) m_xNfRotate->set_sensitive(false); m_xCtrlDialWin->set_sensitive(false); break; - case SfxItemState::DONTCARE: + case SfxItemState::INVALID: m_xCtrlDial->SetNoRotation(); break; case SfxItemState::DEFAULT: @@ -568,7 +568,7 @@ void AlignmentTabPage::Reset(const SfxItemSet* pCoreAttrs) case SfxItemState::DISABLED: m_xVsRefEdge->set_sensitive(false); break; - case SfxItemState::DONTCARE: + case SfxItemState::INVALID: m_aVsRefEdge.SetNoSelection(); break; case SfxItemState::DEFAULT: @@ -606,7 +606,7 @@ void AlignmentTabPage::Reset(const SfxItemSet* pCoreAttrs) case SfxItemState::DISABLED: m_xLbFrameDir->set_sensitive(false); break; - case SfxItemState::DONTCARE: + case SfxItemState::INVALID: m_xLbFrameDir->set_active(-1); break; case SfxItemState::DEFAULT: diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index 1b34af9def2d..cd6965375003 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -679,7 +679,7 @@ void SvxCharNamePage::Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp eItalic = rItem.GetValue(); bStyle = true; } - bStyleAvailable = bStyleAvailable && (eState >= SfxItemState::DONTCARE); + bStyleAvailable = bStyleAvailable && (eState >= SfxItemState::INVALID); switch ( eLangGrp ) { @@ -696,7 +696,7 @@ void SvxCharNamePage::Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp } else bStyle = false; - bStyleAvailable = bStyleAvailable && (eState >= SfxItemState::DONTCARE); + bStyleAvailable = bStyleAvailable && (eState >= SfxItemState::INVALID); // currently chosen font if ( bStyle && pFontItem ) @@ -792,7 +792,7 @@ void SvxCharNamePage::Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp pLangBox->set_active_id(eLangType); break; } - case SfxItemState::DONTCARE: + case SfxItemState::INVALID: break; } @@ -1522,7 +1522,7 @@ void SvxCharEffectsPage::ResetColor_Impl( const SfxItemSet& rSet ) m_xFontColorLB->set_sensitive(false); break; - case SfxItemState::DONTCARE: + case SfxItemState::INVALID: //Related: tdf#106080 if there is no font color, then allow "none" //as a color so the listbox can display that state. EnableNoneFontColor(); @@ -1689,9 +1689,9 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet ) m_xUnderlineLB->set_active( 0 ); SfxItemState eState = rSet->GetItemState( nWhich ); - if ( eState >= SfxItemState::DONTCARE ) + if ( eState >= SfxItemState::INVALID ) { - if ( eState == SfxItemState::DONTCARE ) + if ( eState == SfxItemState::INVALID ) m_xUnderlineLB->set_active(-1); else { @@ -1729,9 +1729,9 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet ) m_xOverlineLB->set_active( 0 ); eState = rSet->GetItemState( nWhich ); - if ( eState >= SfxItemState::DONTCARE ) + if ( eState >= SfxItemState::INVALID ) { - if ( eState == SfxItemState::DONTCARE ) + if ( eState == SfxItemState::INVALID ) m_xOverlineLB->set_active(-1); else { @@ -1769,9 +1769,9 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet ) m_xStrikeoutLB->set_active( 0 ); eState = rSet->GetItemState( nWhich ); - if ( eState >= SfxItemState::DONTCARE ) + if ( eState >= SfxItemState::INVALID ) { - if ( eState == SfxItemState::DONTCARE ) + if ( eState == SfxItemState::INVALID ) m_xStrikeoutLB->set_active(-1); else { @@ -1809,7 +1809,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet ) m_xIndividualWordsBtn->set_sensitive(false); break; - case SfxItemState::DONTCARE: + case SfxItemState::INVALID: m_aIndividualWordsState.bTriStateEnabled = true; m_xIndividualWordsBtn->set_state( TRISTATE_INDET ); break; @@ -1851,7 +1851,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet ) if (nPos != -1) m_xPositionLB->set_active(nPos); } - else if ( eState == SfxItemState::DONTCARE ) + else if ( eState == SfxItemState::INVALID ) m_xEmphasisLB->set_active(-1); else if ( eState == SfxItemState::UNKNOWN ) { @@ -1886,7 +1886,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet ) m_xEffectsLB->set_sensitive(false); break; - case SfxItemState::DONTCARE: + case SfxItemState::INVALID: m_xEffectsLB->set_active(-1); break; @@ -1915,7 +1915,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet ) m_xReliefLB->set_sensitive(false); break; - case SfxItemState::DONTCARE: + case SfxItemState::INVALID: m_xReliefLB->set_active(-1); break; @@ -1944,7 +1944,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet ) m_xOutlineBtn->set_sensitive(false); break; - case SfxItemState::DONTCARE: + case SfxItemState::INVALID: m_aOutlineState.bTriStateEnabled = true; m_xOutlineBtn->set_state(TRISTATE_INDET); break; @@ -1975,7 +1975,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet ) m_xShadowBtn->set_sensitive(false); break; - case SfxItemState::DONTCARE: + case SfxItemState::INVALID: m_aShadowState.bTriStateEnabled = true; m_xShadowBtn->set_state( TRISTATE_INDET ); break; @@ -2006,7 +2006,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet ) m_xHiddenBtn->set_sensitive(false); break; - case SfxItemState::DONTCARE: + case SfxItemState::INVALID: m_aHiddenState.bTriStateEnabled = true; m_xHiddenBtn->set_state(TRISTATE_INDET); break; @@ -2223,7 +2223,7 @@ bool SvxCharEffectsPage::FillItemSet( SfxItemSet* rSet ) if ( pOld ) { - if( rOldSet.GetItemState( nWhich ) != SfxItemState::DONTCARE ) + if( rOldSet.GetItemState( nWhich ) != SfxItemState::INVALID ) { const SvxEmphasisMarkItem& rItem = *static_cast<const SvxEmphasisMarkItem*>(pOld); if ( rItem.GetEmphasisMark() == eMark ) @@ -2231,7 +2231,7 @@ bool SvxCharEffectsPage::FillItemSet( SfxItemSet* rSet ) } } - if (rOldSet.GetItemState( nWhich ) == SfxItemState::DONTCARE && + if (rOldSet.GetItemState( nWhich ) == SfxItemState::INVALID && m_xEmphasisLB->get_saved_value() == sMarkPos && m_xPositionLB->get_saved_value() == sPosPos) { bChanged = false; @@ -2852,7 +2852,7 @@ void SvxCharPositionPage::Reset( const SfxItemSet* rSet ) } else { - if( eState == SfxItemState::DONTCARE ) + if( eState == SfxItemState::INVALID ) { m_x0degRB->set_active(false); m_x90degRB->set_active(false); @@ -3190,7 +3190,7 @@ void SvxCharTwoLinesPage::Reset( const SfxItemSet* rSet ) sal_uInt16 nWhich = GetWhich( SID_ATTR_CHAR_TWO_LINES ); SfxItemState eState = rSet->GetItemState( nWhich ); - if ( eState >= SfxItemState::DONTCARE ) + if ( eState >= SfxItemState::INVALID ) { const SvxTwoLinesItem& rItem = static_cast<const SvxTwoLinesItem&>(rSet->Get( nWhich )); m_xTwoLinesBtn->set_active(rItem.GetValue()); diff --git a/cui/source/tabpages/measure.cxx b/cui/source/tabpages/measure.cxx index 3e53891e21e2..8c7b4dcd8351 100644 --- a/cui/source/tabpages/measure.cxx +++ b/cui/source/tabpages/measure.cxx @@ -186,7 +186,7 @@ void SvxMeasurePage::Reset( const SfxItemSet* rAttrs ) m_xMtrFldHelpline2Len->save_value(); // SdrMeasureBelowRefEdgeItem - if( rAttrs->GetItemState( SDRATTR_MEASUREBELOWREFEDGE ) != SfxItemState::DONTCARE ) + if( rAttrs->GetItemState( SDRATTR_MEASUREBELOWREFEDGE ) != SfxItemState::INVALID ) { m_xTsbBelowRefEdge->set_state( rAttrs->Get( SDRATTR_MEASUREBELOWREFEDGE ). GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE ); @@ -207,7 +207,7 @@ void SvxMeasurePage::Reset( const SfxItemSet* rAttrs ) // SdrMeasureTextRota90Item // Attention: negate ! - if( rAttrs->GetItemState( SDRATTR_MEASURETEXTROTA90 ) != SfxItemState::DONTCARE ) + if( rAttrs->GetItemState( SDRATTR_MEASURETEXTROTA90 ) != SfxItemState::INVALID ) { m_xTsbParallel->set_state( rAttrs->Get( SDRATTR_MEASURETEXTROTA90 ). GetValue() ? TRISTATE_FALSE : TRISTATE_TRUE ); @@ -219,7 +219,7 @@ void SvxMeasurePage::Reset( const SfxItemSet* rAttrs ) m_xTsbParallel->save_state(); // SdrMeasureShowUnitItem - if( rAttrs->GetItemState( SDRATTR_MEASURESHOWUNIT ) != SfxItemState::DONTCARE ) + if( rAttrs->GetItemState( SDRATTR_MEASURESHOWUNIT ) != SfxItemState::INVALID ) { m_xTsbShowUnit->set_state( rAttrs->Get( SDRATTR_MEASURESHOWUNIT ). GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE ); @@ -231,7 +231,7 @@ void SvxMeasurePage::Reset( const SfxItemSet* rAttrs ) m_xTsbShowUnit->save_state(); // SdrMeasureUnitItem - if( rAttrs->GetItemState( SDRATTR_MEASUREUNIT ) != SfxItemState::DONTCARE ) + if( rAttrs->GetItemState( SDRATTR_MEASUREUNIT ) != SfxItemState::INVALID ) { tools::Long nFieldUnit = static_cast<tools::Long>(rAttrs->Get( SDRATTR_MEASUREUNIT ).GetValue()); @@ -251,12 +251,12 @@ void SvxMeasurePage::Reset( const SfxItemSet* rAttrs ) m_xLbUnit->save_value(); // Position - if ( rAttrs->GetItemState( SDRATTR_MEASURETEXTVPOS ) != SfxItemState::DONTCARE ) + if ( rAttrs->GetItemState( SDRATTR_MEASURETEXTVPOS ) != SfxItemState::INVALID ) { css::drawing::MeasureTextVertPos eVPos = rAttrs->Get( SDRATTR_MEASURETEXTVPOS ).GetValue(); { - if ( rAttrs->GetItemState( SDRATTR_MEASURETEXTHPOS ) != SfxItemState::DONTCARE ) + if ( rAttrs->GetItemState( SDRATTR_MEASURETEXTHPOS ) != SfxItemState::INVALID ) { css::drawing::MeasureTextHorzPos eHPos = rAttrs->Get( SDRATTR_MEASURETEXTHPOS ).GetValue(); @@ -465,7 +465,7 @@ bool SvxMeasurePage::FillItemSet( SfxItemSet* rAttrs) if (m_xTsbAutoPosV->get_state() == TRISTATE_TRUE) eVPos = css::drawing::MeasureTextVertPos_AUTO; - if ( rAttrs->GetItemState( SDRATTR_MEASURETEXTVPOS ) != SfxItemState::DONTCARE ) + if ( rAttrs->GetItemState( SDRATTR_MEASURETEXTVPOS ) != SfxItemState::INVALID ) { css::drawing::MeasureTextVertPos eOldVPos = rOutAttrs.Get(SDRATTR_MEASURETEXTVPOS).GetValue(); if( eOldVPos != eVPos ) @@ -480,7 +480,7 @@ bool SvxMeasurePage::FillItemSet( SfxItemSet* rAttrs) bModified = true; } - if ( rAttrs->GetItemState( SDRATTR_MEASURETEXTHPOS ) != SfxItemState::DONTCARE ) + if ( rAttrs->GetItemState( SDRATTR_MEASURETEXTHPOS ) != SfxItemState::INVALID ) { css::drawing::MeasureTextHorzPos eOldHPos = rOutAttrs.Get( SDRATTR_MEASURETEXTHPOS ).GetValue(); if( eOldHPos != eHPos ) diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx index 21972673cc56..afaa43f0dc1c 100644 --- a/cui/source/tabpages/numfmt.cxx +++ b/cui/source/tabpages/numfmt.cxx @@ -446,7 +446,7 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet* rSet ) eState = rSet->GetItemState( GetWhich( SID_ATTR_NUMBERFORMAT_VALUE ) ); - if ( SfxItemState::DONTCARE != eState ) + if ( SfxItemState::INVALID != eState ) pValFmtAttr = GetItem( *rSet, SID_ATTR_NUMBERFORMAT_VALUE ); eValType = pNumItem->GetValueType(); diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx index abe2a1adc315..d0c38140653a 100644 --- a/cui/source/tabpages/paragrph.cxx +++ b/cui/source/tabpages/paragrph.cxx @@ -270,7 +270,7 @@ bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet* rOutSet ) if ( m_bLineDistToggled || !pOld || !( *static_cast<const SvxLineSpacingItem*>(pOld) == aSpacing ) || - SfxItemState::DONTCARE == GetItemSet().GetItemState( nWhich ) ) + SfxItemState::INVALID == GetItemSet().GetItemState( nWhich ) ) { rOutSet->Put( aSpacing ); bModified = true; @@ -313,7 +313,7 @@ bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet* rOutSet ) aMargin.SetContextValue(m_xContextualCB->get_active()); if ( !pOld || *static_cast<const SvxULSpaceItem*>(pOld) != aMargin || - SfxItemState::DONTCARE == GetItemSet().GetItemState( nWhich ) ) + SfxItemState::INVALID == GetItemSet().GetItemState( nWhich ) ) { rOutSet->Put( aMargin ); bModified = true; @@ -350,7 +350,7 @@ bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet* rOutSet ) item.SetTextLeft(m_aLeftIndent.GetCoreValue(eUnit)); } if (!pOld || *static_cast<const SvxTextLeftMarginItem*>(pOld) != item - || SfxItemState::DONTCARE == GetItemSet().GetItemState(nWhich)) + || SfxItemState::INVALID == GetItemSet().GetItemState(nWhich)) { rOutSet->Put(item); bModified = true; @@ -386,7 +386,7 @@ bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet* rOutSet ) item.SetRight(m_aRightIndent.GetCoreValue(eUnit)); } if (!pOld || *static_cast<const SvxRightMarginItem*>(pOld) != item - || SfxItemState::DONTCARE == GetItemSet().GetItemState(nWhich)) + || SfxItemState::INVALID == GetItemSet().GetItemState(nWhich)) { rOutSet->Put(item); bModified = true; @@ -429,7 +429,7 @@ bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet* rOutSet ) } if (!pOld || *static_cast<const SvxFirstLineIndentItem*>(pOld) != item - || SfxItemState::DONTCARE == GetItemSet().GetItemState(nWhich)) + || SfxItemState::INVALID == GetItemSet().GetItemState(nWhich)) { rOutSet->Put(item); bModified = true; @@ -483,7 +483,7 @@ bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet* rOutSet ) bNullTab = true; if ( !pOld || *static_cast<const SvxLRSpaceItem*>(pOld) != aMargin || - SfxItemState::DONTCARE == GetItemSet().GetItemState( nWhich ) ) + SfxItemState::INVALID == GetItemSet().GetItemState( nWhich ) ) { rOutSet->Put( aMargin ); bModified = true; @@ -1920,7 +1920,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* rSet ) m_xPagenumEdit->set_value(nPageNum); break; } - case SfxItemState::DONTCARE: + case SfxItemState::INVALID: { aPageNumState.bTriStateEnabled = true; m_xPageNumBox->set_state(TRISTATE_INDET); @@ -1978,7 +1978,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* rSet ) m_xApplyCollBtn->set_state(TRISTATE_FALSE); } } - else if ( SfxItemState::DONTCARE == eItemState ) + else if ( SfxItemState::INVALID == eItemState ) { aApplyCollState.bTriStateEnabled = true; m_xApplyCollBtn->set_state(TRISTATE_INDET); @@ -2050,7 +2050,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* rSet ) m_xBreakTypeLB->set_active(nType); m_xBreakPositionLB->set_active(nPosition); } - else if ( SfxItemState::DONTCARE == eItemState ) + else if ( SfxItemState::INVALID == eItemState ) m_xPageBreakBox->set_state(TRISTATE_INDET); else { @@ -2080,7 +2080,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* rSet ) else m_xKeepParaBox->set_state(TRISTATE_FALSE); } - else if ( SfxItemState::DONTCARE == eItemState ) + else if ( SfxItemState::INVALID == eItemState ) m_xKeepParaBox->set_state(TRISTATE_INDET); else m_xKeepParaBox->set_sensitive(false); @@ -2120,7 +2120,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* rSet ) m_xWidowBox->set_state(_bEnable ? TRISTATE_TRUE : TRISTATE_FALSE); m_xWidowRowNo->set_sensitive(_bEnable); } - else if ( SfxItemState::DONTCARE == eTmpState ) + else if ( SfxItemState::INVALID == eTmpState ) m_xWidowBox->set_state( TRISTATE_INDET ); else m_xWidowBox->set_sensitive(false); @@ -2142,13 +2142,13 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* rSet ) m_xOrphanRowLabel->set_sensitive(_bEnable); } - else if ( SfxItemState::DONTCARE == eTmpState ) + else if ( SfxItemState::INVALID == eTmpState ) m_xOrphanBox->set_state(TRISTATE_INDET); else m_xOrphanBox->set_sensitive(false); aOrphanState.eState = m_xOrphanBox->get_state(); } - else if ( SfxItemState::DONTCARE == eItemState ) + else if ( SfxItemState::INVALID == eItemState ) m_xAllowSplitBox->set_state(TRISTATE_INDET); else m_xAllowSplitBox->set_sensitive(false); diff --git a/cui/source/tabpages/textattr.cxx b/cui/source/tabpages/textattr.cxx index d97937f53542..a803efffe5cb 100644 --- a/cui/source/tabpages/textattr.cxx +++ b/cui/source/tabpages/textattr.cxx @@ -136,7 +136,7 @@ void SvxTextAttrPage::Reset( const SfxItemSet* rAttrs ) m_xMtrFldBottom->save_value(); // adjust to height and autogrowsize - if ( rAttrs->GetItemState( SDRATTR_TEXT_AUTOGROWHEIGHT ) != SfxItemState::DONTCARE ) + if ( rAttrs->GetItemState( SDRATTR_TEXT_AUTOGROWHEIGHT ) != SfxItemState::INVALID ) { m_xTsbAutoGrowHeight->set_state( rAttrs->Get( SDRATTR_TEXT_AUTOGROWHEIGHT ). GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE ); @@ -153,7 +153,7 @@ void SvxTextAttrPage::Reset( const SfxItemSet* rAttrs ) m_xTsbAutoGrowSize->save_state(); // adjust to width - if ( rAttrs->GetItemState( SDRATTR_TEXT_AUTOGROWWIDTH ) != SfxItemState::DONTCARE ) + if ( rAttrs->GetItemState( SDRATTR_TEXT_AUTOGROWWIDTH ) != SfxItemState::INVALID ) { m_xTsbAutoGrowWidth->set_state( rAttrs->Get( SDRATTR_TEXT_AUTOGROWWIDTH ). GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE ); @@ -163,7 +163,7 @@ void SvxTextAttrPage::Reset( const SfxItemSet* rAttrs ) m_xTsbAutoGrowWidth->save_state(); // wordwrap text - if ( rAttrs->GetItemState( SDRATTR_TEXT_WORDWRAP ) != SfxItemState::DONTCARE ) + if ( rAttrs->GetItemState( SDRATTR_TEXT_WORDWRAP ) != SfxItemState::INVALID ) { m_xTsbWordWrapText->set_state( rAttrs->Get( SDRATTR_TEXT_WORDWRAP ). GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE ); @@ -178,7 +178,7 @@ void SvxTextAttrPage::Reset( const SfxItemSet* rAttrs ) SfxItemState eVState = rAttrs->GetItemState( SDRATTR_TEXT_VERTADJUST ); SfxItemState eHState = rAttrs->GetItemState( SDRATTR_TEXT_HORZADJUST ); - if(SfxItemState::DONTCARE != eVState && SfxItemState::DONTCARE != eHState) + if(SfxItemState::INVALID != eVState && SfxItemState::INVALID != eHState) { // VertAdjust and HorAdjust are unequivocal, thus SdrTextVertAdjust eTVA = rAttrs->Get(SDRATTR_TEXT_VERTADJUST).GetValue(); @@ -254,7 +254,7 @@ void SvxTextAttrPage::Reset( const SfxItemSet* rAttrs ) } // adjust to border - if (rAttrs->GetItemState(SDRATTR_TEXT_FITTOSIZE) != SfxItemState::DONTCARE) + if (rAttrs->GetItemState(SDRATTR_TEXT_FITTOSIZE) != SfxItemState::INVALID) { drawing::TextFitToSizeType const eFTS = rAttrs->Get( SDRATTR_TEXT_FITTOSIZE ).GetValue(); @@ -267,7 +267,7 @@ void SvxTextAttrPage::Reset( const SfxItemSet* rAttrs ) m_xTsbFitToSize->set_state( TRISTATE_INDET ); m_xTsbFitToSize->save_state(); - if( rAttrs->GetItemState( SDRATTR_TEXT_CONTOURFRAME ) != SfxItemState::DONTCARE ) + if( rAttrs->GetItemState( SDRATTR_TEXT_CONTOURFRAME ) != SfxItemState::INVALID ) { bool bContour = rAttrs->Get( SDRATTR_TEXT_CONTOURFRAME ).GetValue(); m_xTsbContour->set_state( bContour ? TRISTATE_TRUE : TRISTATE_FALSE ); @@ -405,7 +405,7 @@ bool SvxTextAttrPage::FillItemSet( SfxItemSet* rAttrs) eTVA = SDRTEXTVERTADJUST_BLOCK; } - if ( rOutAttrs.GetItemState( SDRATTR_TEXT_VERTADJUST ) != SfxItemState::DONTCARE ) + if ( rOutAttrs.GetItemState( SDRATTR_TEXT_VERTADJUST ) != SfxItemState::INVALID ) { SdrTextVertAdjust eOldTVA = rOutAttrs.Get( SDRATTR_TEXT_VERTADJUST ).GetValue(); if( eOldTVA != eTVA ) @@ -414,7 +414,7 @@ bool SvxTextAttrPage::FillItemSet( SfxItemSet* rAttrs) else rAttrs->Put( SdrTextVertAdjustItem( eTVA ) ); - if ( rOutAttrs.GetItemState( SDRATTR_TEXT_HORZADJUST ) != SfxItemState::DONTCARE ) + if ( rOutAttrs.GetItemState( SDRATTR_TEXT_HORZADJUST ) != SfxItemState::INVALID ) { SdrTextHorzAdjust eOldTHA = rOutAttrs.Get( SDRATTR_TEXT_HORZADJUST ).GetValue(); if( eOldTHA != eTHA ) @@ -630,7 +630,7 @@ IMPL_LINK(SvxTextAttrPage, ClickHdl_Impl, weld::Toggleable&, rButton, void) // #103516# Do the setup based on states of hor/ver adjust SfxItemState eVState = rOutAttrs.GetItemState( SDRATTR_TEXT_VERTADJUST ); SfxItemState eHState = rOutAttrs.GetItemState( SDRATTR_TEXT_HORZADJUST ); - bool bHorAndVer(SfxItemState::DONTCARE == eVState || SfxItemState::DONTCARE == eHState); + bool bHorAndVer(SfxItemState::INVALID == eVState || SfxItemState::INVALID == eHState); // #83698# enable/disable text anchoring dependent of contour m_xFlPosition->set_sensitive(!bContour && !bHorAndVer); @@ -643,7 +643,7 @@ bool SvxTextAttrPage::IsTextDirectionLeftToRight() const bool bLeftToRightDirection = true; SfxItemState eState = rOutAttrs.GetItemState(SDRATTR_TEXTDIRECTION); - if(SfxItemState::DONTCARE != eState) + if(SfxItemState::INVALID != eState) { const SvxWritingModeItem& rItem = rOutAttrs.Get(SDRATTR_TEXTDIRECTION); if (rItem.GetValue() == css::text::WritingMode_TB_RL) diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx index fa6db41d2517..b67990e29625 100644 --- a/cui/source/tabpages/tparea.cxx +++ b/cui/source/tabpages/tparea.cxx @@ -167,7 +167,7 @@ SvxAreaTabPage::~SvxAreaTabPage() void SvxAreaTabPage::ActivatePage( const SfxItemSet& rSet ) { drawing::FillStyle eXFS = drawing::FillStyle_NONE; - if( rSet.GetItemState( XATTR_FILLSTYLE ) != SfxItemState::DONTCARE ) + if( rSet.GetItemState( XATTR_FILLSTYLE ) != SfxItemState::INVALID ) { XFillStyleItem aFillStyleItem( rSet.Get( GetWhich( XATTR_FILLSTYLE ) ) ); eXFS = aFillStyleItem.GetValue(); diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx index 2e142169b6af..2990f4473e91 100644 --- a/cui/source/tabpages/tpbitmap.cxx +++ b/cui/source/tabpages/tpbitmap.cxx @@ -298,9 +298,9 @@ void SvxBitmapTabPage::Reset( const SfxItemSet* rAttrs ) CalculateBitmapPresetSize(); bool bTiled = false; bool bStretched = false; - if(rAttrs->GetItemState( XATTR_FILLBMP_TILE ) != SfxItemState::DONTCARE) + if(rAttrs->GetItemState( XATTR_FILLBMP_TILE ) != SfxItemState::INVALID) bTiled = rAttrs->Get( XATTR_FILLBMP_TILE ).GetValue(); - if(rAttrs->GetItemState( XATTR_FILLBMP_STRETCH ) != SfxItemState::DONTCARE) + if(rAttrs->GetItemState( XATTR_FILLBMP_STRETCH ) != SfxItemState::INVALID) bStretched = rAttrs->Get( XATTR_FILLBMP_STRETCH ).GetValue(); if (bTiled) @@ -313,7 +313,7 @@ void SvxBitmapTabPage::Reset( const SfxItemSet* rAttrs ) tools::Long nWidth = 0; tools::Long nHeight = 0; - if(rAttrs->GetItemState(XATTR_FILLBMP_SIZELOG) != SfxItemState::DONTCARE) + if(rAttrs->GetItemState(XATTR_FILLBMP_SIZELOG) != SfxItemState::INVALID) { if (rAttrs->Get( XATTR_FILLBMP_SIZELOG ).GetValue()) m_xTsbScale->set_state(TRISTATE_FALSE); @@ -324,7 +324,7 @@ void SvxBitmapTabPage::Reset( const SfxItemSet* rAttrs ) m_xTsbScale->set_state(TRISTATE_INDET); TriState eRelative = TRISTATE_FALSE; - if(rAttrs->GetItemState(XATTR_FILLBMP_SIZEX) != SfxItemState::DONTCARE) + if(rAttrs->GetItemState(XATTR_FILLBMP_SIZEX) != SfxItemState::INVALID) { nWidth = static_cast<const XFillBmpSizeXItem&>( rAttrs->Get( XATTR_FILLBMP_SIZEX ) ).GetValue(); if(nWidth == 0) @@ -337,7 +337,7 @@ void SvxBitmapTabPage::Reset( const SfxItemSet* rAttrs ) } } - if(rAttrs->GetItemState( XATTR_FILLBMP_SIZEY ) != SfxItemState::DONTCARE) + if(rAttrs->GetItemState( XATTR_FILLBMP_SIZEY ) != SfxItemState::INVALID) { nHeight = rAttrs->Get( XATTR_FILLBMP_SIZEY ).GetValue(); if(nHeight == 0) @@ -367,13 +367,13 @@ void SvxBitmapTabPage::Reset( const SfxItemSet* rAttrs ) } } - if( rAttrs->GetItemState( XATTR_FILLBMP_POS ) != SfxItemState::DONTCARE ) + if( rAttrs->GetItemState( XATTR_FILLBMP_POS ) != SfxItemState::INVALID ) { RectPoint eValue = rAttrs->Get( XATTR_FILLBMP_POS ).GetValue(); m_xPositionLB->set_active( static_cast< sal_Int32 >(eValue) ); } - if( rAttrs->GetItemState( XATTR_FILLBMP_POSOFFSETX ) != SfxItemState::DONTCARE ) + if( rAttrs->GetItemState( XATTR_FILLBMP_POSOFFSETX ) != SfxItemState::INVALID ) { sal_Int32 nValue = rAttrs->Get( XATTR_FILLBMP_POSOFFSETX ).GetValue(); m_xPositionOffX->set_value(nValue, FieldUnit::PERCENT); @@ -381,7 +381,7 @@ void SvxBitmapTabPage::Reset( const SfxItemSet* rAttrs ) else m_xPositionOffX->set_text(""); - if( rAttrs->GetItemState( XATTR_FILLBMP_POSOFFSETY ) != SfxItemState::DONTCARE ) + if( rAttrs->GetItemState( XATTR_FILLBMP_POSOFFSETY ) != SfxItemState::INVALID ) { sal_Int32 nValue = rAttrs->Get( XATTR_FILLBMP_POSOFFSETY ).GetValue(); m_xPositionOffY->set_value(nValue, FieldUnit::PERCENT); @@ -389,7 +389,7 @@ void SvxBitmapTabPage::Reset( const SfxItemSet* rAttrs ) else m_xPositionOffY->set_text(""); - if( rAttrs->GetItemState( XATTR_FILLBMP_TILEOFFSETX ) != SfxItemState::DONTCARE) + if( rAttrs->GetItemState( XATTR_FILLBMP_TILEOFFSETX ) != SfxItemState::INVALID) { sal_Int32 nValue = rAttrs->Get( XATTR_FILLBMP_TILEOFFSETX ).GetValue(); if(nValue > 0) @@ -399,7 +399,7 @@ void SvxBitmapTabPage::Reset( const SfxItemSet* rAttrs ) } } - if( rAttrs->GetItemState( XATTR_FILLBMP_TILEOFFSETY ) != SfxItemState::DONTCARE ) + if( rAttrs->GetItemState( XATTR_FILLBMP_TILEOFFSETY ) != SfxItemState::INVALID ) { sal_Int32 nValue = rAttrs->Get( XATTR_FILLBMP_TILEOFFSETY ).GetValue(); if(nValue > 0) diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx index b4eb30ac2849..1c1635293823 100644 --- a/cui/source/tabpages/tpline.cxx +++ b/cui/source/tabpages/tpline.cxx @@ -914,7 +914,7 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs ) m_aSymbolLastSize=m_aSymbolSize; } - if( rAttrs->GetItemState( XATTR_LINESTYLE ) != SfxItemState::DONTCARE ) + if( rAttrs->GetItemState( XATTR_LINESTYLE ) != SfxItemState::INVALID ) { eXLS = rAttrs->Get( XATTR_LINESTYLE ).GetValue(); @@ -942,7 +942,7 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs ) } // Line strength - if( rAttrs->GetItemState( XATTR_LINEWIDTH ) != SfxItemState::DONTCARE ) + if( rAttrs->GetItemState( XATTR_LINEWIDTH ) != SfxItemState::INVALID ) { SetMetricValue( *m_xMtrLineWidth, rAttrs->Get( XATTR_LINEWIDTH ).GetValue(), m_ePoolUnit ); } @@ -952,7 +952,7 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs ) // Line color m_xLbColor->SetNoSelection(); - if ( rAttrs->GetItemState( XATTR_LINECOLOR ) != SfxItemState::DONTCARE ) + if ( rAttrs->GetItemState( XATTR_LINECOLOR ) != SfxItemState::INVALID ) { Color aCol = rAttrs->Get( XATTR_LINECOLOR ).GetColorValue(); m_xLbColor->SelectEntry( aCol ); @@ -963,7 +963,7 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs ) { m_xLbStartStyle->set_sensitive(false); } - else if( rAttrs->GetItemState( XATTR_LINESTART ) != SfxItemState::DONTCARE ) + else if( rAttrs->GetItemState( XATTR_LINESTART ) != SfxItemState::INVALID ) { // #86265# select entry using list and polygon, not string bool bSelected(false); @@ -995,7 +995,7 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs ) { m_xLbEndStyle->set_sensitive(false); } - else if( rAttrs->GetItemState( XATTR_LINEEND ) != SfxItemState::DONTCARE ) + else if( rAttrs->GetItemState( XATTR_LINEEND ) != SfxItemState::INVALID ) { // #86265# select entry using list and polygon, not string bool bSelected(false); @@ -1027,7 +1027,7 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs ) { m_xMtrStartWidth->set_sensitive(false); } - else if( rAttrs->GetItemState( XATTR_LINESTARTWIDTH ) != SfxItemState::DONTCARE ) + else if( rAttrs->GetItemState( XATTR_LINESTARTWIDTH ) != SfxItemState::INVALID ) { SetMetricValue( *m_xMtrStartWidth, rAttrs->Get( XATTR_LINESTARTWIDTH ).GetValue(), @@ -1041,7 +1041,7 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs ) { m_xMtrEndWidth->set_sensitive(false); } - else if( rAttrs->GetItemState( XATTR_LINEENDWIDTH ) != SfxItemState::DONTCARE ) + else if( rAttrs->GetItemState( XATTR_LINEENDWIDTH ) != SfxItemState::INVALID ) { SetMetricValue( *m_xMtrEndWidth, rAttrs->Get( XATTR_LINEENDWIDTH ).GetValue(), @@ -1055,7 +1055,7 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs ) { m_xTsbCenterStart->set_sensitive(false); } - else if( rAttrs->GetItemState( XATTR_LINESTARTCENTER ) != SfxItemState::DONTCARE ) + else if( rAttrs->GetItemState( XATTR_LINESTARTCENTER ) != SfxItemState::INVALID ) { if( rAttrs->Get( XATTR_LINESTARTCENTER ).GetValue() ) m_xTsbCenterStart->set_state(TRISTATE_TRUE); @@ -1072,7 +1072,7 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs ) { m_xTsbCenterEnd->set_sensitive(false); } - else if( rAttrs->GetItemState( XATTR_LINEENDCENTER ) != SfxItemState::DONTCARE ) + else if( rAttrs->GetItemState( XATTR_LINEENDCENTER ) != SfxItemState::INVALID ) { if( rAttrs->Get( XATTR_LINEENDCENTER ).GetValue() ) m_xTsbCenterEnd->set_state(TRISTATE_TRUE); @@ -1085,7 +1085,7 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs ) } // Transparency - if( rAttrs->GetItemState( XATTR_LINETRANSPARENCE ) != SfxItemState::DONTCARE ) + if( rAttrs->GetItemState( XATTR_LINETRANSPARENCE ) != SfxItemState::INVALID ) { sal_uInt16 nTransp = rAttrs->Get( XATTR_LINETRANSPARENCE ).GetValue(); m_xMtrTransparent->set_value(nTransp, FieldUnit::PERCENT); @@ -1115,7 +1115,7 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs ) // maFTEdgeStyle.set_sensitive(false); m_xLBEdgeStyle->set_sensitive(false); } - else if(SfxItemState::DONTCARE != rAttrs->GetItemState(XATTR_LINEJOINT)) + else if(SfxItemState::INVALID != rAttrs->GetItemState(XATTR_LINEJOINT)) { const css::drawing::LineJoint eLineJoint = rAttrs->Get(XATTR_LINEJOINT).GetValue(); @@ -1139,7 +1139,7 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs ) { m_xLBCapStyle->set_sensitive(false); } - else if(SfxItemState::DONTCARE != rAttrs->GetItemState(XATTR_LINECAP)) + else if(SfxItemState::INVALID != rAttrs->GetItemState(XATTR_LINECAP)) { const css::drawing::LineCap eLineCap(rAttrs->Get(XATTR_LINECAP).GetValue()); diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx index 702e8f2aafc0..c8c180b047e3 100644 --- a/cui/source/tabpages/tplnedef.cxx +++ b/cui/source/tabpages/tplnedef.cxx @@ -256,7 +256,7 @@ bool SvxLineDefTabPage::FillItemSet( SfxItemSet* rAttrs ) void SvxLineDefTabPage::Reset( const SfxItemSet* rAttrs ) { - if( rAttrs->GetItemState( GetWhich( XATTR_LINESTYLE ) ) != SfxItemState::DONTCARE ) + if( rAttrs->GetItemState( GetWhich( XATTR_LINESTYLE ) ) != SfxItemState::INVALID ) { drawing::LineStyle eXLS = rAttrs->Get( GetWhich( XATTR_LINESTYLE ) ).GetValue(); diff --git a/cui/source/tabpages/tpshadow.cxx b/cui/source/tabpages/tpshadow.cxx index 0f2df7b821ec..ca2bc3b8a574 100644 --- a/cui/source/tabpages/tpshadow.cxx +++ b/cui/source/tabpages/tpshadow.cxx @@ -91,27 +91,27 @@ SvxShadowTabPage::SvxShadowTabPage(weld::Container* pPage, weld::DialogControlle // setting the output device drawing::FillStyle eXFS = drawing::FillStyle_SOLID; - if( m_rOutAttrs.GetItemState( XATTR_FILLSTYLE ) != SfxItemState::DONTCARE ) + if( m_rOutAttrs.GetItemState( XATTR_FILLSTYLE ) != SfxItemState::INVALID ) { eXFS = m_rOutAttrs.Get( GetWhich( XATTR_FILLSTYLE ) ).GetValue(); switch( eXFS ) { case drawing::FillStyle_SOLID: - if( SfxItemState::DONTCARE != m_rOutAttrs.GetItemState( XATTR_FILLCOLOR ) ) + if( SfxItemState::INVALID != m_rOutAttrs.GetItemState( XATTR_FILLCOLOR ) ) { m_rXFSet.Put( m_rOutAttrs.Get( XATTR_FILLCOLOR ) ); } break; case drawing::FillStyle_GRADIENT: - if( SfxItemState::DONTCARE != m_rOutAttrs.GetItemState( XATTR_FILLGRADIENT ) ) + if( SfxItemState::INVALID != m_rOutAttrs.GetItemState( XATTR_FILLGRADIENT ) ) { m_rXFSet.Put( m_rOutAttrs.Get( XATTR_FILLGRADIENT ) ); } break; case drawing::FillStyle_HATCH: - if( SfxItemState::DONTCARE != m_rOutAttrs.GetItemState( XATTR_FILLHATCH ) ) + if( SfxItemState::INVALID != m_rOutAttrs.GetItemState( XATTR_FILLHATCH ) ) { m_rXFSet.Put( m_rOutAttrs.Get( XATTR_FILLHATCH ) ); } @@ -119,7 +119,7 @@ SvxShadowTabPage::SvxShadowTabPage(weld::Container* pPage, weld::DialogControlle case drawing::FillStyle_BITMAP: { - if( SfxItemState::DONTCARE != m_rOutAttrs.GetItemState( XATTR_FILLBITMAP ) ) + if( SfxItemState::INVALID != m_rOutAttrs.GetItemState( XATTR_FILLBITMAP ) ) { m_rXFSet.Put( m_rOutAttrs.Get( XATTR_FILLBITMAP ) ); } @@ -257,18 +257,18 @@ bool SvxShadowTabPage::FillItemSet( SfxItemSet* rAttrs ) case RectPoint::MM: break; } - // If the values of the shadow distances==SfxItemState::DONTCARE and the displayed + // If the values of the shadow distances==SfxItemState::INVALID and the displayed // string in the respective MetricField=="", then the comparison of the old // and the new distance values would return a wrong result because in such a // case the new distance values would match the default values of the MetricField !!!! if ( !m_xMtrDistance->get_text().isEmpty() || - m_rOutAttrs.GetItemState( SDRATTR_SHADOWXDIST ) != SfxItemState::DONTCARE || - m_rOutAttrs.GetItemState( SDRATTR_SHADOWYDIST ) != SfxItemState::DONTCARE ) + m_rOutAttrs.GetItemState( SDRATTR_SHADOWXDIST ) != SfxItemState::INVALID || + m_rOutAttrs.GetItemState( SDRATTR_SHADOWYDIST ) != SfxItemState::INVALID ) { sal_Int32 nOldX = 9876543; // impossible value, so DontCare sal_Int32 nOldY = 9876543; - if( m_rOutAttrs.GetItemState( SDRATTR_SHADOWXDIST ) != SfxItemState::DONTCARE && - m_rOutAttrs.GetItemState( SDRATTR_SHADOWYDIST ) != SfxItemState::DONTCARE ) + if( m_rOutAttrs.GetItemState( SDRATTR_SHADOWXDIST ) != SfxItemState::INVALID && + m_rOutAttrs.GetItemState( SDRATTR_SHADOWYDIST ) != SfxItemState::INVALID ) { nOldX = m_rOutAttrs.Get( SDRATTR_SHADOWXDIST ).GetValue(); nOldY = m_rOutAttrs.Get( SDRATTR_SHADOWYDIST ).GetValue(); @@ -338,7 +338,7 @@ void SvxShadowTabPage::Reset( const SfxItemSet* rAttrs ) // at the moment there are only 8 possible positions where a shadow can be set // has a shadow been set? - if( rAttrs->GetItemState( SDRATTR_SHADOW ) != SfxItemState::DONTCARE ) + if( rAttrs->GetItemState( SDRATTR_SHADOW ) != SfxItemState::INVALID ) { if( rAttrs->Get( SDRATTR_SHADOW ).GetValue() ) m_xTsbShowShadow->set_state(TRISTATE_TRUE); @@ -353,8 +353,8 @@ void SvxShadowTabPage::Reset( const SfxItemSet* rAttrs ) // distance (only 8 possible positions), // so there is only one item evaluated - if( rAttrs->GetItemState( SDRATTR_SHADOWXDIST ) != SfxItemState::DONTCARE && - rAttrs->GetItemState( SDRATTR_SHADOWYDIST ) != SfxItemState::DONTCARE ) + if( rAttrs->GetItemState( SDRATTR_SHADOWXDIST ) != SfxItemState::INVALID && + rAttrs->GetItemState( SDRATTR_SHADOWYDIST ) != SfxItemState::INVALID ) { sal_Int32 nX = rAttrs->Get( SDRATTR_SHADOWXDIST ).GetValue(); sal_Int32 nY = rAttrs->Get( SDRATTR_SHADOWYDIST ).GetValue(); @@ -394,14 +394,14 @@ void SvxShadowTabPage::Reset( const SfxItemSet* rAttrs ) m_aCtlPosition.SetActualRP( RectPoint::MM ); } - if( rAttrs->GetItemState( SDRATTR_SHADOWCOLOR ) != SfxItemState::DONTCARE ) + if( rAttrs->GetItemState( SDRATTR_SHADOWCOLOR ) != SfxItemState::INVALID ) { m_xLbShadowColor->SelectEntry( rAttrs->Get( SDRATTR_SHADOWCOLOR ).GetColorValue() ); } else m_xLbShadowColor->SetNoSelection(); - if( rAttrs->GetItemState( SDRATTR_SHADOWTRANSPARENCE ) != SfxItemState::DONTCARE ) + if( rAttrs->GetItemState( SDRATTR_SHADOWTRANSPARENCE ) != SfxItemState::INVALID ) { sal_uInt16 nTransp = rAttrs->Get( SDRATTR_SHADOWTRANSPARENCE ).GetValue(); m_xMtrTransparent->set_value(nTransp, FieldUnit::PERCENT); @@ -409,7 +409,7 @@ void SvxShadowTabPage::Reset( const SfxItemSet* rAttrs ) else m_xMtrTransparent->set_text(""); - if( rAttrs->GetItemState( SDRATTR_SHADOWBLUR ) != SfxItemState::DONTCARE ) + if( rAttrs->GetItemState( SDRATTR_SHADOWBLUR ) != SfxItemState::INVALID ) { sal_uInt16 nBlur = rAttrs->Get( SDRATTR_SHADOWBLUR ).GetValue(); m_xLbShadowBlurMetric->set_value(nBlur, FieldUnit::MM_100TH); diff --git a/cui/source/tabpages/tptrans.cxx b/cui/source/tabpages/tptrans.cxx index 04cbdfb6b24a..b2d6a10dea0a 100644 --- a/cui/source/tabpages/tptrans.cxx +++ b/cui/source/tabpages/tptrans.cxx @@ -250,8 +250,8 @@ bool SvxTransparenceTabPage::FillItemSet(SfxItemSet* rAttrs) bool bGradActive = (eStateGradient == SfxItemState::SET && static_cast<const XFillFloatTransparenceItem*>(pGradientItem)->IsEnabled()); bool bLinearActive = (eStateLinear == SfxItemState::SET && static_cast<const XFillTransparenceItem*>(pLinearItem)->GetValue() != 0); - bool bGradUsed = (eStateGradient == SfxItemState::DONTCARE); - bool bLinearUsed = (eStateLinear == SfxItemState::DONTCARE); + bool bGradUsed = (eStateGradient == SfxItemState::INVALID); + bool bLinearUsed = (eStateLinear == SfxItemState::INVALID); bool bModified(false); bool bSwitchOffLinear(false); diff --git a/editeng/source/editeng/editdbg.cxx b/editeng/source/editeng/editdbg.cxx index e4d4dd0bbfe6..f94bc2c7ea14 100644 --- a/editeng/source/editeng/editdbg.cxx +++ b/editeng/source/editeng/editdbg.cxx @@ -314,7 +314,7 @@ static void DbgOutItemSet(FILE* fp, const SfxItemSet& rSet, bool bSearchInParent fprintf( fp, " Which: %i ", nWhich ); if ( rSet.GetItemState( nWhich, bSearchInParent ) == SfxItemState::DEFAULT ) fprintf( fp, "ITEM_OFF " ); - else if ( rSet.GetItemState( nWhich, bSearchInParent ) == SfxItemState::DONTCARE ) + else if ( rSet.GetItemState( nWhich, bSearchInParent ) == SfxItemState::INVALID ) fprintf( fp, "ITEM_DC " ); else if ( rSet.GetItemState( nWhich, bSearchInParent ) == SfxItemState::SET ) fprintf( fp, "ITEM_ON *" ); diff --git a/editeng/source/uno/unofored.cxx b/editeng/source/uno/unofored.cxx index 66f4fde2bf78..fa2fa96118bf 100644 --- a/editeng/source/uno/unofored.cxx +++ b/editeng/source/uno/unofored.cxx @@ -228,7 +228,7 @@ SfxItemState GetSvxEditEngineItemState( EditEngine const & rEditEngine, const ES { // ... and its different to this one than the state is don't care if(*pParaItem != *(attrib.pAttr)) - return SfxItemState::DONTCARE; + return SfxItemState::INVALID; } else pParaItem = attrib.pAttr; @@ -248,7 +248,7 @@ SfxItemState GetSvxEditEngineItemState( EditEngine const & rEditEngine, const ES if( bEmpty ) eParaState = SfxItemState::DEFAULT; else if( bGaps ) - eParaState = SfxItemState::DONTCARE; + eParaState = SfxItemState::INVALID; else eParaState = SfxItemState::SET; @@ -256,7 +256,7 @@ SfxItemState GetSvxEditEngineItemState( EditEngine const & rEditEngine, const ES if( pLastItem ) { if( (pParaItem == nullptr) || (*pLastItem != *pParaItem) ) - return SfxItemState::DONTCARE; + return SfxItemState::INVALID; } else { diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx index e8886bbe12b4..09a117d82123 100644 --- a/editeng/source/uno/unotext.cxx +++ b/editeng/source/uno/unotext.cxx @@ -990,8 +990,8 @@ beans::PropertyState SvxUnoTextRangeBase::_getPropertyState(const SfxItemPropert switch( eTempItemState ) { case SfxItemState::DISABLED: - case SfxItemState::DONTCARE: - eItemState = SfxItemState::DONTCARE; + case SfxItemState::INVALID: + eItemState = SfxItemState::INVALID; bItemStateSet = true; break; @@ -1043,7 +1043,7 @@ beans::PropertyState SvxUnoTextRangeBase::_getPropertyState(const SfxItemPropert { switch( eItemState ) { - case SfxItemState::DONTCARE: + case SfxItemState::INVALID: case SfxItemState::DISABLED: return beans::PropertyState_AMBIGUOUS_VALUE; case SfxItemState::SET: @@ -1123,8 +1123,8 @@ bool SvxUnoTextRangeBase::_getOnePropertyStates(const SfxItemSet& rSet, const Sf switch( eTempItemState ) { case SfxItemState::DISABLED: - case SfxItemState::DONTCARE: - eItemState = SfxItemState::DONTCARE; + case SfxItemState::INVALID: + eItemState = SfxItemState::INVALID; bItemStateSet = true; break; @@ -1237,7 +1237,7 @@ bool SvxUnoTextRangeBase::_getOnePropertyStates(const SfxItemSet& rSet, const Sf case SfxItemState::DEFAULT: rState = beans::PropertyState_DEFAULT_VALUE; break; -// case SfxItemState::DONTCARE: +// case SfxItemState::INVALID: // case SfxItemState::DISABLED: default: rState = beans::PropertyState_AMBIGUOUS_VALUE; diff --git a/include/svl/itemset.hxx b/include/svl/itemset.hxx index 65f7076f69ab..3f1d3b2fd0e2 100644 --- a/include/svl/itemset.hxx +++ b/include/svl/itemset.hxx @@ -251,8 +251,6 @@ public: { DisableOrInvalidateItem_ForWhichID(false, nWhich); } sal_uInt16 ClearItem( sal_uInt16 nWhich = 0); void ClearInvalidItems(); - void InvalidateAllItems(); // HACK(via nWhich = 0) ??? - inline void SetParent( const SfxItemSet* pNew ); // add, delete items, work on items diff --git a/include/svl/poolitem.hxx b/include/svl/poolitem.hxx index cc475788b9db..b8817074991f 100644 --- a/include/svl/poolitem.hxx +++ b/include/svl/poolitem.hxx @@ -83,12 +83,14 @@ enum class SfxItemState { /** Specifies that the property is currently disabled. */ DISABLED = 0x0001, - /** Specifies that the property is currently in a don't care state. + /** Specifies that the property is currently in a don't care state + * and thus invalid * <br/> * This is normally used if a selection provides more than one state - * for a property at the same time. + * for a property at the same time, so the Item is over-defined and + * has no valid state -> invalid */ - DONTCARE = 0x0010, + INVALID = 0x0010, /** Specifies that the property is currently in a default state. */ DEFAULT = 0x0020, diff --git a/include/svx/sdr/properties/properties.hxx b/include/svx/sdr/properties/properties.hxx index d793753c6a39..629ef99aae96 100644 --- a/include/svx/sdr/properties/properties.hxx +++ b/include/svx/sdr/properties/properties.hxx @@ -105,7 +105,7 @@ namespace sdr::properties // get merged ItemSet. Normally, this maps directly to GetObjectItemSet(), but may // be overridden e.g for group objects to return a merged ItemSet of the object. // When using this method the returned ItemSet may contain items in the state - // SfxItemState::DONTCARE which means there were several such items with different + // SfxItemState::INVALID which means there were several such items with different // values. virtual const SfxItemSet& GetMergedItemSet() const; diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx index e2522605c9c5..b5758065b9b6 100644 --- a/sc/source/core/data/documen8.cxx +++ b/sc/source/core/data/documen8.cxx @@ -272,7 +272,7 @@ void ScDocument::ModifyStyleSheet( SfxStyleSheetBase& rStyleSheet, SfxItemState eState = rChanges.GetItemState( nWhich, false, &pItem ); if ( eState == SfxItemState::SET ) rSet.Put( *pItem ); - else if ( eState == SfxItemState::DONTCARE ) + else if ( eState == SfxItemState::INVALID ) rSet.ClearItem( nWhich ); // when Default nothing } diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx index 95823cee9473..c847d4b35128 100644 --- a/sc/source/core/data/patattr.cxx +++ b/sc/source/core/data/patattr.cxx @@ -331,7 +331,7 @@ ScPatternAttr::ScPatternAttr(CellAttributeHelper& rHelper, const SfxItemSet* pIt { // CAUTION: Use bInvalidAsDefault == false for the ::Put, // we *need* to take over also Items/Slots in state - // SfxItemState::DONTCARE aka IsInvalidItem, this is a precious + // SfxItemState::INVALID aka IsInvalidItem, this is a precious // value/information e.g. in ScDocument::CreateSelectionPattern maLocalSfxItemSet.Put(*pItemSet, false); } @@ -1288,7 +1288,7 @@ void ScPatternAttr::DeleteUnchanged( const ScPatternAttr* pOldAttrs ) mxVisible.reset(); } } - else if ( eOldState != SfxItemState::DONTCARE ) + else if ( eOldState != SfxItemState::INVALID ) { // not set in OldAttrs -> compare item value to default item if ( *pThisItem == rThisSet.GetPool()->GetUserOrPoolDefaultItem( nSubWhich ) ) diff --git a/sc/source/core/data/stlpool.cxx b/sc/source/core/data/stlpool.cxx index 1434798169fd..b7fd7ac70eba 100644 --- a/sc/source/core/data/stlpool.cxx +++ b/sc/source/core/data/stlpool.cxx @@ -143,7 +143,7 @@ void ScStyleSheetPool::CopyStyleFrom( SfxStyleSheetBasePool* pSrcPool, if (!pDestSheet) pDestSheet = &Make( rName, eFamily, pStyleSheet->GetMask() ); SfxItemSet& rDestSet = pDestSheet->GetItemSet(); - rDestSet.PutExtended( rSourceSet, SfxItemState::DONTCARE, SfxItemState::DEFAULT ); + rDestSet.PutExtended( rSourceSet, SfxItemState::INVALID, SfxItemState::DEFAULT ); if ( eFamily == SfxStyleFamily::Page ) { @@ -153,13 +153,13 @@ void ScStyleSheetPool::CopyStyleFrom( SfxStyleSheetBasePool* pSrcPool, { const SfxItemSet& rSrcSub = pSetItem->GetItemSet(); SfxItemSet aDestSub( *rDestSet.GetPool(), rSrcSub.GetRanges() ); - aDestSub.PutExtended( rSrcSub, SfxItemState::DONTCARE, SfxItemState::DEFAULT ); + aDestSub.PutExtended( rSrcSub, SfxItemState::INVALID, SfxItemState::DEFAULT ); } if ( const SvxSetItem* pSetItem = rSourceSet.GetItemIfSet( ATTR_PAGE_FOOTERSET, false ) ) { const SfxItemSet& rSrcSub = pSetItem->GetItemSet(); SfxItemSet aDestSub( *rDestSet.GetPool(), rSrcSub.GetRanges() ); - aDestSub.PutExtended( rSrcSub, SfxItemState::DONTCARE, SfxItemState::DEFAULT ); + aDestSub.PutExtended( rSrcSub, SfxItemState::INVALID, SfxItemState::DEFAULT ); rDestSet.Put( SvxSetItem( ATTR_PAGE_FOOTERSET, aDestSub ) ); } } diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx index 33fa00f8cc9a..c9a299465c32 100644 --- a/sc/source/core/tool/editutil.cxx +++ b/sc/source/core/tool/editutil.cxx @@ -472,7 +472,7 @@ ScEditAttrTester::ScEditAttrTester( ScEditEngineDefaulter* pEngine ) : for (sal_uInt16 nId = EE_CHAR_START; nId <= EE_CHAR_END && !bNeedsObject; nId++) { SfxItemState eState = pEditAttrs->GetItemState( nId, false, &pItem ); - if (eState == SfxItemState::DONTCARE) + if (eState == SfxItemState::INVALID) bNeedsObject = true; else if (eState == SfxItemState::SET) { @@ -498,13 +498,13 @@ ScEditAttrTester::ScEditAttrTester( ScEditEngineDefaulter* pEngine ) : // contains field commands? SfxItemState eFieldState = pEditAttrs->GetItemState( EE_FEATURE_FIELD, false ); - if ( eFieldState == SfxItemState::DONTCARE || eFieldState == SfxItemState::SET ) + if ( eFieldState == SfxItemState::INVALID || eFieldState == SfxItemState::SET ) bNeedsObject = true; // not converted characters? SfxItemState eConvState = pEditAttrs->GetItemState( EE_FEATURE_NOTCONV, false ); - if ( eConvState == SfxItemState::DONTCARE || eConvState == SfxItemState::SET ) + if ( eConvState == SfxItemState::INVALID || eConvState == SfxItemState::SET ) bNeedsObject = true; } } diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx index 6b55d066f727..a8e27a888337 100644 --- a/sc/source/filter/html/htmlexp.cxx +++ b/sc/source/filter/html/htmlexp.cxx @@ -1371,7 +1371,7 @@ bool ScHTMLExport::WriteFieldText( const EditTextObject* pData ) ESelection aSel( 0, 0, nParas-1, rEngine.GetTextLen( nParas-1 ) ); SfxItemSet aSet( rEngine.GetAttribs( aSel ) ); SfxItemState eFieldState = aSet.GetItemState( EE_FEATURE_FIELD, false ); - if ( eFieldState == SfxItemState::DONTCARE || eFieldState == SfxItemState::SET ) + if ( eFieldState == SfxItemState::INVALID || eFieldState == SfxItemState::SET ) bFields = true; } if ( bFields ) diff --git a/sc/source/filter/rtf/eeimpars.cxx b/sc/source/filter/rtf/eeimpars.cxx index 94a4e432b1f6..6e588ffdc30d 100644 --- a/sc/source/filter/rtf/eeimpars.cxx +++ b/sc/source/filter/rtf/eeimpars.cxx @@ -183,7 +183,7 @@ void ScEEImport::WriteToDocument( bool bSizeColsRows, double nOutputFactor, SvNu { const SfxPoolItem* pItem = nullptr; SfxItemState eState = aSet.GetItemState( nId, true, &pItem ); - if (eState == SfxItemState::DONTCARE) + if (eState == SfxItemState::INVALID) bSimple = false; else if (eState == SfxItemState::SET) { @@ -198,7 +198,7 @@ void ScEEImport::WriteToDocument( bool bSizeColsRows, double nOutputFactor, SvNu if ( bSimple ) { // Contains field commands? SfxItemState eFieldState = aSet.GetItemState( EE_FEATURE_FIELD, false ); - if ( eFieldState == SfxItemState::DONTCARE || eFieldState == SfxItemState::SET ) + if ( eFieldState == SfxItemState::INVALID || eFieldState == SfxItemState::SET ) bSimple = false; } diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index 293b4199eb42..d04d7fdab547 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -3312,7 +3312,7 @@ void ScInputHandler::EnterHandler( ScEnterMode nBlockMode, bool bBeforeSavingInL for (sal_uInt16 nId = EE_CHAR_START; nId <= EE_CHAR_END && !bAttrib; nId++) { SfxItemState eState = aOldAttribs.GetItemState( nId, false, &pItem ); - if (eState == SfxItemState::DONTCARE) + if (eState == SfxItemState::INVALID) bAttrib = true; else if (eState == SfxItemState::SET) { @@ -3328,12 +3328,12 @@ void ScInputHandler::EnterHandler( ScEnterMode nBlockMode, bool bBeforeSavingInL // Contains fields? SfxItemState eFieldState = aOldAttribs.GetItemState( EE_FEATURE_FIELD, false ); - if ( eFieldState == SfxItemState::DONTCARE || eFieldState == SfxItemState::SET ) + if ( eFieldState == SfxItemState::INVALID || eFieldState == SfxItemState::SET ) bAttrib = true; // Not converted characters? SfxItemState eConvState = aOldAttribs.GetItemState( EE_FEATURE_NOTCONV, false ); - if ( eConvState == SfxItemState::DONTCARE || eConvState == SfxItemState::SET ) + if ( eConvState == SfxItemState::INVALID || eConvState == SfxItemState::SET ) bAttrib = true; // Always recognize formulas as formulas @@ -4575,7 +4575,7 @@ bool ScInputHandler::GetTextAndFields( ScEditEngineDefaulter& rDestEngine ) sal_Int32 nParCnt = mpEditEngine->GetParagraphCount(); SfxItemSet aSet = mpEditEngine->GetAttribs( ESelection(0,0,nParCnt,0) ); SfxItemState eFieldState = aSet.GetItemState( EE_FEATURE_FIELD, false ); - if ( eFieldState == SfxItemState::DONTCARE || eFieldState == SfxItemState::SET ) + if ( eFieldState == SfxItemState::INVALID || eFieldState == SfxItemState::SET ) { // Copy content std::unique_ptr<EditTextObject> pObj = mpEditEngine->CreateTextObject(); diff --git a/sc/source/ui/attrdlg/tabpages.cxx b/sc/source/ui/attrdlg/tabpages.cxx index af0ed1d6ab9c..708fc4c630d6 100644 --- a/sc/source/ui/attrdlg/tabpages.cxx +++ b/sc/source/ui/attrdlg/tabpages.cxx @@ -70,7 +70,7 @@ void ScTabPageProtection::Reset( const SfxItemSet* rCoreAttrs ) // Is this a Default-Item? if ( eItemState == SfxItemState::DEFAULT ) pProtAttr = static_cast<const ScProtectionAttr*>(&(rCoreAttrs->Get(nWhich))); - // At SfxItemState::DONTCARE let to 0 + // At SfxItemState::INVALID let to 0 bTriEnabled = ( pProtAttr == nullptr ); // TriState, when DontCare bDontCare = bTriEnabled; diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx index 9b3dd1f4a9ae..02ba51f8d795 100644 --- a/sc/source/ui/docshell/docsh6.cxx +++ b/sc/source/ui/docshell/docsh6.cxx @@ -295,7 +295,7 @@ void ScDocShell::LoadStylesArgs( ScDocShell& rSource, bool bReplace, bool bCellS for ( sal_uInt16 i = 0; i < nFound; ++i ) { pStyles[i].pDest->GetItemSet().PutExtended( - pStyles[i].pSource->GetItemSet(), SfxItemState::DONTCARE, SfxItemState::DEFAULT); + pStyles[i].pSource->GetItemSet(), SfxItemState::INVALID, SfxItemState::DEFAULT); if(pStyles[i].pSource->HasParentSupport()) pStyles[i].pDest->SetParent(pStyles[i].pSource->GetParent()); // follow is never used diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx index 8daf5a7c355b..914a2e49b0e7 100644 --- a/sc/source/ui/drawfunc/drtxtob.cxx +++ b/sc/source/ui/drawfunc/drtxtob.cxx @@ -1071,7 +1071,7 @@ void ScDrawTextObjectBar::GetAttrState( SfxItemSet& rDestSet ) rDestSet.Put(aLR); Invalidate( SID_ATTR_PARA_LRSPACE ); SfxItemState eState = aAttrSet.GetItemState( EE_PARA_LRSPACE ); - if ( eState == SfxItemState::DONTCARE ) + if ( eState == SfxItemState::INVALID ) rDestSet.InvalidateItem(SID_ATTR_PARA_LRSPACE); //xuxu for Line Space SvxLineSpacingItem aLineSP = aAttrSet.Get( EE_PARA_SBL ); @@ -1079,7 +1079,7 @@ void ScDrawTextObjectBar::GetAttrState( SfxItemSet& rDestSet ) rDestSet.Put(aLineSP); Invalidate(SID_ATTR_PARA_LINESPACE); eState = aAttrSet.GetItemState( EE_PARA_SBL ); - if ( eState == SfxItemState::DONTCARE ) + if ( eState == SfxItemState::INVALID ) rDestSet.InvalidateItem(SID_ATTR_PARA_LINESPACE); //xuxu for UL Space SvxULSpaceItem aULSP = aAttrSet.Get( EE_PARA_ULSPACE ); @@ -1124,7 +1124,7 @@ void ScDrawTextObjectBar::GetAttrState( SfxItemSet& rDestSet ) // Underline eState = aAttrSet.GetItemState( EE_CHAR_UNDERLINE ); - if ( eState == SfxItemState::DONTCARE ) + if ( eState == SfxItemState::INVALID ) { rDestSet.InvalidateItem( SID_ULINE_VAL_NONE ); rDestSet.InvalidateItem( SID_ULINE_VAL_SINGLE ); @@ -1172,7 +1172,7 @@ void ScDrawTextObjectBar::GetAttrState( SfxItemSet& rDestSet ) rDestSet.DisableItem( SID_ATTR_PARA_LEFT_TO_RIGHT ); rDestSet.DisableItem( SID_ATTR_PARA_RIGHT_TO_LEFT ); } - else if ( aAttrSet.GetItemState( EE_PARA_WRITINGDIR ) == SfxItemState::DONTCARE ) + else if ( aAttrSet.GetItemState( EE_PARA_WRITINGDIR ) == SfxItemState::INVALID ) { rDestSet.InvalidateItem( SID_ATTR_PARA_LEFT_TO_RIGHT ); rDestSet.InvalidateItem( SID_ATTR_PARA_RIGHT_TO_LEFT ); @@ -1235,7 +1235,7 @@ void ScDrawTextObjectBar::GetStatePropPanelAttr(SfxItemSet &rSet) case SID_TABLE_VERT_BOTTOM: bool bContour = false; SfxItemState eConState = aEditAttr.GetItemState( SDRATTR_TEXT_CONTOURFRAME ); - if( eConState != SfxItemState::DONTCARE ) + if( eConState != SfxItemState::INVALID ) { bContour = aEditAttr.Get( SDRATTR_TEXT_CONTOURFRAME ).GetValue(); } @@ -1244,8 +1244,8 @@ void ScDrawTextObjectBar::GetStatePropPanelAttr(SfxItemSet &rSet) SfxItemState eVState = aEditAttr.GetItemState( SDRATTR_TEXT_VERTADJUST ); //SfxItemState eHState = aAttrs.GetItemState( SDRATTR_TEXT_HORZADJUST ); - //if(SfxItemState::DONTCARE != eVState && SfxItemState::DONTCARE != eHState) - if(SfxItemState::DONTCARE != eVState) + //if(SfxItemState::INVALID != eVState && SfxItemState::INVALID != eHState) + if(SfxItemState::INVALID != eVState) { SdrTextVertAdjust eTVA = aEditAttr.Get(SDRATTR_TEXT_VERTADJUST).GetValue(); bool bSet = (nSlotId == SID_TABLE_VERT_NONE && eTVA == SDRTEXTVERTADJUST_TOP) || diff --git a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx index 66f7e35871cb..369e262c8088 100644 --- a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx +++ b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx @@ -288,7 +288,7 @@ void AlignmentPropertyPanel::NotifyItemUpdate( const ScLineBreakCell* pItem = static_cast<const ScLineBreakCell*>(pState); mxCBXWrapText->set_active(pItem->GetValue()); } - else if(eState == SfxItemState::DONTCARE) + else if(eState == SfxItemState::INVALID) { mxCBXWrapText->set_state(TRISTATE_INDET); } diff --git a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx index 7d4081eda570..4f7e83a46d18 100644 --- a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx +++ b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx @@ -211,7 +211,7 @@ void CellAppearancePropertyPanel::NotifyItemUpdate( { case SID_FRAME_LINESTYLE: mbBorderStyleAvailable = false; - if( eState == SfxItemState::DONTCARE ) + if( eState == SfxItemState::INVALID ) { mbBorderStyleAvailable = true; mnInWidth = 0; @@ -315,7 +315,7 @@ void CellAppearancePropertyPanel::NotifyItemUpdate( break; case SID_ATTR_BORDER_DIAG_TLBR: mbDiagTLBR = false; - if( eState == SfxItemState::DONTCARE ) + if( eState == SfxItemState::INVALID ) { mbDiagTLBR = true; mnDiagTLBRInWidth = mnDiagTLBROutWidth = mnDiagTLBRDistance = 0; @@ -341,7 +341,7 @@ void CellAppearancePropertyPanel::NotifyItemUpdate( break; case SID_ATTR_BORDER_DIAG_BLTR: mbDiagBLTR = false; - if( eState == SfxItemState::DONTCARE ) + if( eState == SfxItemState::INVALID ) { mbDiagBLTR = true; mnDiagBLTRInWidth = mnDiagBLTROutWidth = mnDiagBLTRDistance = 0; diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index d5f69cd7d85f..aaf1c566a403 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -1751,7 +1751,7 @@ beans::PropertyState ScCellRangesBase::GetOnePropertyState( sal_uInt16 nItemWhic eRet = beans::PropertyState_DIRECT_VALUE; else if ( eState == SfxItemState::DEFAULT ) eRet = beans::PropertyState_DEFAULT_VALUE; - else if ( eState == SfxItemState::DONTCARE ) + else if ( eState == SfxItemState::INVALID ) eRet = beans::PropertyState_AMBIGUOUS_VALUE; else { diff --git a/sc/source/ui/vba/vbafont.cxx b/sc/source/ui/vba/vbafont.cxx index db49f013499c..815a077efc9e 100644 --- a/sc/source/ui/vba/vbafont.cxx +++ b/sc/source/ui/vba/vbafont.cxx @@ -56,7 +56,7 @@ uno::Any SAL_CALL ScVbaFont::getSize() { if ( GetDataSet() ) - if ( GetDataSet()->GetItemState( ATTR_FONT_HEIGHT) == SfxItemState::DONTCARE ) + if ( GetDataSet()->GetItemState( ATTR_FONT_HEIGHT) == SfxItemState::INVALID ) return aNULL(); return ScVbaFont_BASE::getSize(); } @@ -87,7 +87,7 @@ ScVbaFont::getColorIndex() if(mbFormControl) return uno::Any( sal_Int32(0) ); if ( GetDataSet() ) - if ( GetDataSet()->GetItemState( ATTR_FONT_COLOR) == SfxItemState::DONTCARE ) + if ( GetDataSet()->GetItemState( ATTR_FONT_COLOR) == SfxItemState::INVALID ) return aNULL(); return ScVbaFont_BASE::getColorIndex(); } @@ -177,7 +177,7 @@ uno::Any SAL_CALL ScVbaFont::getBold() { if ( GetDataSet() ) - if ( GetDataSet()->GetItemState( ATTR_FONT_WEIGHT) == SfxItemState::DONTCARE ) + if ( GetDataSet()->GetItemState( ATTR_FONT_WEIGHT) == SfxItemState::INVALID ) return aNULL(); return ScVbaFont_BASE::getBold(); } @@ -223,7 +223,7 @@ uno::Any SAL_CALL ScVbaFont::getUnderline() { if ( GetDataSet() ) - if ( GetDataSet()->GetItemState( ATTR_FONT_UNDERLINE) == SfxItemState::DONTCARE ) + if ( GetDataSet()->GetItemState( ATTR_FONT_UNDERLINE) == SfxItemState::INVALID ) return aNULL(); sal_Int32 nValue = awt::FontUnderline::NONE; @@ -254,7 +254,7 @@ uno::Any SAL_CALL ScVbaFont::getStrikethrough() { if ( GetDataSet() ) - if ( GetDataSet()->GetItemState( ATTR_FONT_CROSSEDOUT) == SfxItemState::DONTCARE ) + if ( GetDataSet()->GetItemState( ATTR_FONT_CROSSEDOUT) == SfxItemState::INVALID ) return aNULL(); return ScVbaFont_BASE::getStrikethrough(); } @@ -263,7 +263,7 @@ uno::Any SAL_CALL ScVbaFont::getShadow() { if ( GetDataSet() ) - if ( GetDataSet()->GetItemState( ATTR_FONT_SHADOWED) == SfxItemState::DONTCARE ) + if ( GetDataSet()->GetItemState( ATTR_FONT_SHADOWED) == SfxItemState::INVALID ) return aNULL(); return ScVbaFont_BASE::getShadow(); } @@ -272,7 +272,7 @@ uno::Any SAL_CALL ScVbaFont::getItalic() { if ( GetDataSet() ) - if ( GetDataSet()->GetItemState( ATTR_FONT_POSTURE) == SfxItemState::DONTCARE ) + if ( GetDataSet()->GetItemState( ATTR_FONT_POSTURE) == SfxItemState::INVALID ) return aNULL(); return ScVbaFont_BASE::getItalic(); @@ -282,7 +282,7 @@ uno::Any SAL_CALL ScVbaFont::getName() { if ( GetDataSet() ) - if ( GetDataSet()->GetItemState( ATTR_FONT) == SfxItemState::DONTCARE ) + if ( GetDataSet()->GetItemState( ATTR_FONT) == SfxItemState::INVALID ) return aNULL(); return ScVbaFont_BASE::getName(); } @@ -305,7 +305,7 @@ uno::Any SAL_CALL ScVbaFont::getOutlineFont() { if ( GetDataSet() ) - if ( GetDataSet()->GetItemState( ATTR_FONT_CONTOUR) == SfxItemState::DONTCARE ) + if ( GetDataSet()->GetItemState( ATTR_FONT_CONTOUR) == SfxItemState::INVALID ) return aNULL(); return mbFormControl ? uno::Any( false ) : mxFont->getPropertyValue("CharContoured"); } diff --git a/sc/source/ui/vba/vbaformat.cxx b/sc/source/ui/vba/vbaformat.cxx index 0ae7b298ab2c..c99d34879050 100644 --- a/sc/source/ui/vba/vbaformat.cxx +++ b/sc/source/ui/vba/vbaformat.cxx @@ -574,7 +574,7 @@ ScVbaFormat< Ifc... >::getLocked( ) { const ScProtectionAttr& rProtAttr = pDataSet->Get(ATTR_PROTECTION); SfxItemState eState = pDataSet->GetItemState(ATTR_PROTECTION); - if(eState != SfxItemState::DONTCARE) + if(eState != SfxItemState::INVALID) aCellProtection <<= rProtAttr.GetProtection(); } else // fallback to propertyset @@ -607,7 +607,7 @@ ScVbaFormat< Ifc... >::getFormulaHidden( ) { const ScProtectionAttr& rProtAttr = pDataSet->Get(ATTR_PROTECTION); SfxItemState eState = pDataSet->GetItemState(ATTR_PROTECTION); - if(eState != SfxItemState::DONTCARE) + if(eState != SfxItemState::INVALID) aBoolRet <<= rProtAttr.GetHideFormula(); } else diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index fe38b2fc6dce..0958b38288e1 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -521,7 +521,7 @@ public: SfxItemState eState = pDataSet->GetItemState( ATTR_VALUE_FORMAT); // one of the cells in the range is not like the other ;-) // so return a zero length format to indicate that - if ( eState == SfxItemState::DONTCARE ) + if ( eState == SfxItemState::INVALID ) return OUString(); } @@ -2724,7 +2724,7 @@ ScVbaRange::getWrapText() SfxItemSet* pDataSet = getCurrentDataSet(); SfxItemState eState = pDataSet->GetItemState( ATTR_LINEBREAK); - if ( eState == SfxItemState::DONTCARE ) + if ( eState == SfxItemState::INVALID ) return aNULL(); uno::Reference< beans::XPropertySet > xProps(mxRange, ::uno::UNO_QUERY_THROW ); @@ -4019,7 +4019,7 @@ ScVbaRange::getRowHeight() sal_Int32 nEndRow = thisAddress.EndRow; sal_uInt16 nRowTwips = 0; // #TODO probably possible to use the SfxItemSet (and see if - // SfxItemState::DONTCARE is set) to improve performance + // SfxItemState::INVALID is set) to improve performance // #CHECKME looks like this is general behaviour not just row Range specific // if ( mbIsRows ) ScDocShell* pShell = getScDocShell(); diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx index bafbb20d645d..80b11d0b9e4c 100644 --- a/sc/source/ui/view/editsh.cxx +++ b/sc/source/ui/view/editsh.cxx @@ -1262,7 +1262,7 @@ void ScEditShell::GetAttrState(SfxItemSet &rSet) // underline SfxItemState eState = aAttribs.GetItemState( EE_CHAR_UNDERLINE ); - if ( eState == SfxItemState::DONTCARE ) + if ( eState == SfxItemState::INVALID ) { rSet.InvalidateItem( SID_ULINE_VAL_NONE ); rSet.InvalidateItem( SID_ULINE_VAL_SINGLE ); @@ -1291,7 +1291,7 @@ void ScEditShell::GetAttrState(SfxItemSet &rSet) eState = aAttribs.GetItemState( EE_CHAR_KERNING ); rViewData.GetBindings().Invalidate( SID_ATTR_CHAR_KERNING ); - if ( eState == SfxItemState::DONTCARE ) + if ( eState == SfxItemState::INVALID ) { rSet.InvalidateItem(EE_CHAR_KERNING); } diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx index d95c5e09810c..b1924178c0bf 100644 --- a/sc/source/ui/view/formatsh.cxx +++ b/sc/source/ui/view/formatsh.cxx @@ -1291,7 +1291,7 @@ void ScFormatShell::GetAttrState( SfxItemSet& rSet ) case SID_BACKGROUND_COLOR: { rSet.Put( SvxColorItem( rBrushItem.GetColor(), SID_BACKGROUND_COLOR ) ); - if(SfxItemState::DONTCARE == rAttrSet.GetItemState(ATTR_BACKGROUND)) + if(SfxItemState::INVALID == rAttrSet.GetItemState(ATTR_BACKGROUND)) { rSet.InvalidateItem(SID_BACKGROUND_COLOR); } @@ -1507,7 +1507,7 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet ) // underline eState = rAttrSet.GetItemState( ATTR_FONT_UNDERLINE ); - if ( eState == SfxItemState::DONTCARE ) + if ( eState == SfxItemState::INVALID ) { rSet.InvalidateItem( SID_ULINE_VAL_NONE ); rSet.InvalidateItem( SID_ULINE_VAL_SINGLE ); @@ -1568,7 +1568,7 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet ) } break; - case SfxItemState::DONTCARE: + case SfxItemState::INVALID: rSet.InvalidateItem( SID_ALIGNLEFT ); rSet.InvalidateItem( SID_ALIGNRIGHT ); rSet.InvalidateItem( SID_ALIGNCENTERHOR ); @@ -1631,7 +1631,7 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet ) } break; - case SfxItemState::DONTCARE: + case SfxItemState::INVALID: rSet.InvalidateItem( SID_ALIGNTOP ); rSet.InvalidateItem( SID_ALIGNBOTTOM ); rSet.InvalidateItem( SID_ALIGNCENTERVER ); @@ -1678,12 +1678,12 @@ void ScFormatShell::GetAlignState( SfxItemSet& rSet ) sal_uInt16 nWhich = aIter.FirstWhich(); SvxCellHorJustify eHAlign = SvxCellHorJustify::Standard; - bool bHasHAlign = rAttrSet.GetItemState( ATTR_HOR_JUSTIFY ) != SfxItemState::DONTCARE; + bool bHasHAlign = rAttrSet.GetItemState( ATTR_HOR_JUSTIFY ) != SfxItemState::INVALID; if( bHasHAlign ) eHAlign = rAttrSet.Get( ATTR_HOR_JUSTIFY ).GetValue(); SvxCellVerJustify eVAlign = SvxCellVerJustify::Standard; - bool bHasVAlign = rAttrSet.GetItemState( ATTR_VER_JUSTIFY ) != SfxItemState::DONTCARE; + bool bHasVAlign = rAttrSet.GetItemState( ATTR_VER_JUSTIFY ) != SfxItemState::INVALID; if( bHasVAlign ) eVAlign = rAttrSet.Get( ATTR_VER_JUSTIFY ).GetValue(); @@ -1747,7 +1747,7 @@ void ScFormatShell::GetNumFormatState( SfxItemSet& rSet ) { case SID_NUMBER_THOUSANDS: { - bool bEnable = (SfxItemState::DONTCARE != eItemState); + bool bEnable = (SfxItemState::INVALID != eItemState); if (bEnable) { bEnable = ((nType != SvNumFormatType::ALL) && (nType & @@ -1774,7 +1774,7 @@ void ScFormatShell::GetNumFormatState( SfxItemSet& rSet ) case SID_NUMBER_FORMAT: // symphony version with format interpretation { - if(SfxItemState::DONTCARE != eItemState) + if(SfxItemState::INVALID != eItemState) { bool bThousand(false); bool bNegRed(false); @@ -1952,14 +1952,14 @@ void ScFormatShell::GetTextDirectionState( SfxItemSet& rSet ) const SfxItemSet& rAttrSet = pTabViewShell->GetSelectionPattern()->GetItemSet(); bool bVertDontCare = - (rAttrSet.GetItemState( ATTR_VERTICAL_ASIAN ) == SfxItemState::DONTCARE) || - (rAttrSet.GetItemState( ATTR_STACKED ) == SfxItemState::DONTCARE); + (rAttrSet.GetItemState( ATTR_VERTICAL_ASIAN ) == SfxItemState::INVALID) || + (rAttrSet.GetItemState( ATTR_STACKED ) == SfxItemState::INVALID); bool bLeftRight = !bVertDontCare && !rAttrSet.Get( ATTR_STACKED ).GetValue(); bool bTopBottom = !bVertDontCare && !bLeftRight && rAttrSet.Get( ATTR_VERTICAL_ASIAN ).GetValue(); - bool bBidiDontCare = (rAttrSet.GetItemState( ATTR_WRITINGDIR ) == SfxItemState::DONTCARE); + bool bBidiDontCare = (rAttrSet.GetItemState( ATTR_WRITINGDIR ) == SfxItemState::INVALID); EEHorizontalTextDirection eBidiDir = EEHorizontalTextDirection::Default; if ( !bBidiDontCare ) { diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index 19833c510599..50e95cc87065 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -3404,7 +3404,7 @@ void ScViewFunc::SetSelectionFrameLines( const SvxBorderLine* pLine, return; // none of the lines don't care? - if( (eItemState != SfxItemState::DONTCARE) && (eTLBRState != SfxItemState::DONTCARE) && (eBLTRState != SfxItemState::DONTCARE) ) + if( (eItemState != SfxItemState::INVALID) && (eTLBRState != SfxItemState::INVALID) && (eBLTRState != SfxItemState::INVALID) ) { SfxItemSetFixed<ATTR_PATTERN_START, ATTR_PATTERN_END> aOldSet( *rDoc.GetPool() ); SfxItemSetFixed<ATTR_PATTERN_START, ATTR_PATTERN_END> aNewSet( *rDoc.GetPool() ); @@ -3452,7 +3452,7 @@ void ScViewFunc::SetSelectionFrameLines( const SvxBorderLine* pLine, ApplyAttributes( aNewSet, aOldSet ); } - else // if ( eItemState == SfxItemState::DONTCARE ) + else // if ( eItemState == SfxItemState::INVALID ) { aFuncMark.MarkToMulti(); rDoc.ApplySelectionLineStyle( aFuncMark, pLine, bColorOnly ); diff --git a/sc/source/ui/view/viewutil.cxx b/sc/source/ui/view/viewutil.cxx index 9c345e4bf969..6ccf629c11a0 100644 --- a/sc/source/ui/view/viewutil.cxx +++ b/sc/source/ui/view/viewutil.cxx @@ -57,7 +57,7 @@ void ScViewUtil::PutItemScript( SfxItemSet& rShellSet, const SfxItemSet& rCoreSe SvxScriptSetItem aSetItem( rPool.GetSlotId(nWhichId), rPool ); // use PutExtended with eDefaultAs = SfxItemState::SET, so defaults from rCoreSet // (document pool) are read and put into rShellSet (MessagePool) - aSetItem.GetItemSet().PutExtended( rCoreSet, SfxItemState::DONTCARE, SfxItemState::SET ); + aSetItem.GetItemSet().PutExtended( rCoreSet, SfxItemState::INVALID, SfxItemState::SET ); const SfxPoolItem* pI = aSetItem.GetItemOfScript( nScript ); if (pI) { diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx index e8b6f55bc049..e778d5533f4c 100644 --- a/sd/source/ui/dlg/tpaction.cxx +++ b/sd/source/ui/dlg/tpaction.cxx @@ -287,7 +287,7 @@ void SdTPAction::Reset( const SfxItemSet* rAttrs ) OUString aFileName; // m_xLbAction - if( rAttrs->GetItemState( ATTR_ACTION ) != SfxItemState::DONTCARE ) + if( rAttrs->GetItemState( ATTR_ACTION ) != SfxItemState::INVALID ) { eCA = static_cast<presentation::ClickAction>( rAttrs-> Get( ATTR_ACTION ).GetValue()); @@ -297,7 +297,7 @@ void SdTPAction::Reset( const SfxItemSet* rAttrs ) m_xLbAction->set_active(-1); // m_xEdtSound - if( rAttrs->GetItemState( ATTR_ACTION_FILENAME ) != SfxItemState::DONTCARE ) + if( rAttrs->GetItemState( ATTR_ACTION_FILENAME ) != SfxItemState::INVALID ) { aFileName = rAttrs->Get( ATTR_ACTION_FILENAME ).GetValue(); SetEditText( aFileName ); diff --git a/sd/source/ui/func/fuconrec.cxx b/sd/source/ui/func/fuconrec.cxx index ddd432a6bb8a..a23f463b6d7f 100644 --- a/sd/source/ui/func/fuconrec.cxx +++ b/sd/source/ui/func/fuconrec.cxx @@ -732,7 +732,7 @@ void FuConstructRectangle::SetLineEnds(SfxItemSet& rAttr, SdrObject const & rObj ::tools::Long nWidth = 300; // (1/100th mm) // determine line width and calculate with it the line end width - if( aSet.GetItemState( XATTR_LINEWIDTH ) != SfxItemState::DONTCARE ) + if( aSet.GetItemState( XATTR_LINEWIDTH ) != SfxItemState::INVALID ) { ::tools::Long nValue = aSet.Get( XATTR_LINEWIDTH ).GetValue(); if( nValue > 0 ) diff --git a/sd/source/ui/unoidl/unopback.cxx b/sd/source/ui/unoidl/unopback.cxx index 1dc535b6e1f8..1d436d794eda 100644 --- a/sd/source/ui/unoidl/unopback.cxx +++ b/sd/source/ui/unoidl/unopback.cxx @@ -323,7 +323,7 @@ beans::PropertyState SAL_CALL SdUnoPageBackground::getPropertyState( const OUStr case SfxItemState::DEFAULT: return beans::PropertyState_DEFAULT_VALUE; default: -// case SfxItemState::DONTCARE: +// case SfxItemState::INVALID: // case SfxItemState::DISABLED: return beans::PropertyState_AMBIGUOUS_VALUE; } diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx index 15ceef57a572..01a1e94d74bf 100644 --- a/sd/source/ui/view/drtxtob.cxx +++ b/sd/source/ui/view/drtxtob.cxx @@ -134,7 +134,7 @@ void TextObjectBar::GetCharState( SfxItemSet& rSet ) rSet.Put(aKern); SfxItemState eState = aCharAttrSet.GetItemState( EE_CHAR_KERNING ); - if ( eState == SfxItemState::DONTCARE ) + if ( eState == SfxItemState::INVALID ) { rSet.InvalidateItem(EE_CHAR_KERNING); } @@ -591,7 +591,7 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet ) //Added by xuxu SfxItemState eState = aAttrSet.GetItemState( EE_PARA_LRSPACE ); - if ( eState == SfxItemState::DONTCARE ) + if ( eState == SfxItemState::INVALID ) { rSet.InvalidateItem(EE_PARA_LRSPACE); rSet.InvalidateItem(SID_ATTR_PARA_LRSPACE); diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx index b3787fe12edc..e7deb15750a3 100644 --- a/sd/source/ui/view/drtxtob1.cxx +++ b/sd/source/ui/view/drtxtob1.cxx @@ -491,8 +491,6 @@ void TextObjectBar::Execute( SfxRequest &rReq ) if( !pArgs ) { - //aNewAttr.InvalidateAllItems(); <- produces problems (#35465#) - switch ( nSlot ) { case SID_ATTR_CHAR_WEIGHT: diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index 93d4cca8cc6e..94ddb161ea88 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -4059,7 +4059,7 @@ void DrawViewShell::GetStatePropPanelAttr(SfxItemSet& rSet) case SID_TABLE_VERT_BOTTOM: bool bContour = false; SfxItemState eConState = aAttrs.GetItemState( SDRATTR_TEXT_CONTOURFRAME ); - if( eConState != SfxItemState::DONTCARE ) + if( eConState != SfxItemState::INVALID ) { bContour = aAttrs.Get( SDRATTR_TEXT_CONTOURFRAME ).GetValue(); } @@ -4068,8 +4068,8 @@ void DrawViewShell::GetStatePropPanelAttr(SfxItemSet& rSet) SfxItemState eVState = aAttrs.GetItemState( SDRATTR_TEXT_VERTADJUST ); //SfxItemState eHState = aAttrs.GetItemState( SDRATTR_TEXT_HORZADJUST ); - //if(SfxItemState::DONTCARE != eVState && SfxItemState::DONTCARE != eHState) - if(SfxItemState::DONTCARE != eVState) + //if(SfxItemState::INVALID != eVState && SfxItemState::INVALID != eHState) + if(SfxItemState::INVALID != eVState) { SdrTextVertAdjust eTVA = aAttrs.Get(SDRATTR_TEXT_VERTADJUST).GetValue(); bool bSet = (nSlotId == SID_TABLE_VERT_NONE && eTVA == SDRTEXTVERTADJUST_TOP) || diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx index ac7f5a062982..2d6d35913e6a 100644 --- a/sd/source/ui/view/drviewsf.cxx +++ b/sd/source/ui/view/drviewsf.cxx @@ -749,19 +749,19 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet ) } SfxItemState eState = pSet->GetItemState( EE_PARA_LRSPACE ); - if ( eState == SfxItemState::DONTCARE ) + if ( eState == SfxItemState::INVALID ) { rSet.InvalidateItem(EE_PARA_LRSPACE); rSet.InvalidateItem(SID_ATTR_PARA_LRSPACE); } eState = pSet->GetItemState( EE_PARA_SBL ); - if ( eState == SfxItemState::DONTCARE ) + if ( eState == SfxItemState::INVALID ) { rSet.InvalidateItem(EE_PARA_SBL); rSet.InvalidateItem(SID_ATTR_PARA_LINESPACE); } eState = pSet->GetItemState( EE_PARA_ULSPACE ); - if ( eState == SfxItemState::DONTCARE ) + if ( eState == SfxItemState::INVALID ) { rSet.InvalidateItem(EE_PARA_ULSPACE); rSet.InvalidateItem(SID_ATTR_PARA_ULSPACE); @@ -775,7 +775,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet ) rSet.Put(SfxBoolItem(SID_SET_SMALL_CAPS, eCaseMap == SvxCaseMap::SmallCaps)); eState = pSet->GetItemState( EE_CHAR_KERNING ); - if ( eState == SfxItemState::DONTCARE ) + if ( eState == SfxItemState::INVALID ) { rSet.InvalidateItem(EE_CHAR_KERNING); rSet.InvalidateItem(SID_ATTR_CHAR_KERNING); diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx index 458ef0431fc7..a557fdb05233 100644 --- a/sfx2/source/control/bindings.cxx +++ b/sfx2/source/control/bindings.cxx @@ -1024,7 +1024,7 @@ void SfxBindings::Execute_Impl( SfxRequest& aReq, const SfxSlot* pSlot, SfxShell OSL_FAIL( "Toggle only for Enums and Bools allowed" ); } } - else if ( SfxItemState::DONTCARE == eState ) + else if ( SfxItemState::INVALID == eState ) { // Create one Status-Item for each Factory std::unique_ptr<SfxPoolItem> pNewItem = pSlot->GetType()->CreateItem(); @@ -1195,10 +1195,10 @@ void SfxBindings::UpdateControllers_Impl if (!rCache.IsControllerDirty()) return; - if ( SfxItemState::DONTCARE == eState ) + if ( SfxItemState::INVALID == eState ) { // ambiguous - rCache.SetState( SfxItemState::DONTCARE, INVALID_POOL_ITEM ); + rCache.SetState( SfxItemState::INVALID, INVALID_POOL_ITEM ); } else if ( SfxItemState::DEFAULT == eState && SfxItemPool::IsSlot(rFound.nWhichId) ) diff --git a/sfx2/source/control/ctrlitem.cxx b/sfx2/source/control/ctrlitem.cxx index ad36e9d9660b..07b3f905e3c6 100644 --- a/sfx2/source/control/ctrlitem.cxx +++ b/sfx2/source/control/ctrlitem.cxx @@ -278,7 +278,7 @@ SfxItemState SfxControllerItem::GetItemState All other values that may appear should be reset to default. - SfxItemState::DONTCARE + SfxItemState::INVALID Enabled but there were only ambiguous values available (i.e. non that can be queried). @@ -292,7 +292,7 @@ SfxItemState SfxControllerItem::GetItemState return !pState ? SfxItemState::DISABLED : IsInvalidItem(pState) - ? SfxItemState::DONTCARE + ? SfxItemState::INVALID : IsDisabledItem(pState) ? SfxItemState::UNKNOWN : SfxItemState::DEFAULT; diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx index ffc4c2f753ae..3e3eb60506cc 100644 --- a/sfx2/source/control/shell.cxx +++ b/sfx2/source/control/shell.cxx @@ -499,7 +499,7 @@ SfxPoolItemHolder SfxShell::GetSlotState if ( SfxItemPool::IsWhich(nSlotId) ) pItem = &rPool.GetUserOrPoolDefaultItem(nSlotId); else - eState = SfxItemState::DONTCARE; + eState = SfxItemState::INVALID; } } @@ -511,7 +511,7 @@ SfxPoolItemHolder SfxShell::GetSlotState return SfxPoolItemHolder(); } - if ( bItemStateSet && eState == SfxItemState::DONTCARE ) + if ( bItemStateSet && eState == SfxItemState::INVALID ) { if ( pStateSet ) pStateSet->ClearItem(nSlotId); diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index f1af18fe672b..24beba448818 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -800,9 +800,9 @@ void SfxDispatchController_Impl::addStatusListener(const css::uno::Reference< cs css::uno::Any aState; if ( !pDispatcher && pBindings ) pDispatcher = GetBindings().GetDispatcher_Impl(); - SfxItemState eState = pDispatcher ? pDispatcher->QueryState( GetId(), aState ) : SfxItemState::DONTCARE; + SfxItemState eState = pDispatcher ? pDispatcher->QueryState( GetId(), aState ) : SfxItemState::INVALID; - if ( eState == SfxItemState::DONTCARE ) + if ( eState == SfxItemState::INVALID ) { // Use special uno struct to transport don't care state css::frame::status::ItemStatus aItemStatus; @@ -894,7 +894,7 @@ void SfxDispatchController_Impl::StateChanged( sal_uInt16 nSID, SfxItemState eSt pState->QueryValue( aState, static_cast<sal_uInt8>(nSubId) ); } - else if ( eState == SfxItemState::DONTCARE ) + else if ( eState == SfxItemState::INVALID ) { // Use special uno struct to transport don't care state css::frame::status::ItemStatus aItemStatus; diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index 4e95fa9302cf..01d6c0e440cf 100644 -e ... etc. - the rest is truncated