diff options
83 files changed, 331 insertions, 340 deletions
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, "\nWhich: %i\t", 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 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -272,7 +272,7 @@ const SfxPoolItem* SfxTabPage::GetOldItem( const SfxItemSet& rSet, if (mpImpl->mbStandard && rOldSet.GetParent()) pItem = GetItem( *rOldSet.GetParent(), nSlot ); else if ( rSet.GetParent() && - SfxItemState::DONTCARE == rSet.GetItemState( nWh ) ) + SfxItemState::INVALID == rSet.GetItemState( nWh ) ) pItem = GetItem( *rSet.GetParent(), nSlot ); else pItem = GetItem( rOldSet, nSlot ); diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx index acaeb1047339..8c3939b5f392 100644 --- a/sfx2/source/doc/objcont.cxx +++ b/sfx2/source/doc/objcont.cxx @@ -408,7 +408,7 @@ void SfxObjectShell::LoadStyles for ( sal_uInt16 i = 0; i < nFound; ++i ) { - pFound[i].pDest->GetItemSet().PutExtended(pFound[i].pSource->GetItemSet(), SfxItemState::DONTCARE, SfxItemState::DEFAULT); + pFound[i].pDest->GetItemSet().PutExtended(pFound[i].pSource->GetItemSet(), SfxItemState::INVALID, SfxItemState::DEFAULT); if(pFound[i].pSource->HasParentSupport()) pFound[i].pDest->SetParent(pFound[i].pSource->GetParent()); if(pFound[i].pSource->HasFollowSupport()) diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx index 78a6e5df33ab..60f033a65662 100644 --- a/sfx2/source/toolbox/tbxitem.cxx +++ b/sfx2/source/toolbox/tbxitem.cxx @@ -219,7 +219,7 @@ SfxItemState SfxToolBoxControl::GetItemState( All other displayed values should be reset to the default if possible. - SfxItemState::DONTCARE + SfxItemState::INVALID Enabled but there were only ambiguous values available (i.e. none that could be queried). @@ -233,7 +233,7 @@ SfxItemState SfxToolBoxControl::GetItemState( return !pState ? SfxItemState::DISABLED : IsInvalidItem(pState) - ? SfxItemState::DONTCARE + ? SfxItemState::INVALID : IsDisabledItem(pState) ? SfxItemState::UNKNOWN : SfxItemState::DEFAULT; @@ -357,7 +357,7 @@ void SAL_CALL SfxToolBoxControl::statusChanged( const FeatureStateEvent& rEvent SfxItemState tmpState = static_cast<SfxItemState>(aItemStatus.State); // make sure no-one tries to send us a combination of states if (tmpState != SfxItemState::UNKNOWN && tmpState != SfxItemState::DISABLED && - tmpState != SfxItemState::DONTCARE && + tmpState != SfxItemState::INVALID && tmpState != SfxItemState::DEFAULT && tmpState != SfxItemState::SET) throw css::uno::RuntimeException("unknown status"); eState = tmpState; @@ -464,7 +464,7 @@ void SfxToolBoxControl::StateChangedAtToolBoxControl } break; - case SfxItemState::DONTCARE: + case SfxItemState::INVALID: { eTri = TRISTATE_INDET; nItemBits |= ToolBoxItemBits::CHECKABLE; diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx index a3efb65fe674..c9c7ceec3df1 100644 --- a/svl/source/items/itemset.cxx +++ b/svl/source/items/itemset.cxx @@ -480,7 +480,7 @@ SfxPoolItem const* implCreateItemEntry(SfxItemPool& rPool, SfxPoolItem const* pS return nullptr; // if (IsInvalidItem(pSource)) - // // SfxItemState::DONTCARE aka INVALID_POOL_ITEM + // // SfxItemState::INVALID aka INVALID_POOL_ITEM // // just use pSource which equals INVALID_POOL_ITEM // return pSource; @@ -675,12 +675,12 @@ void implCleanupItemEntry(SfxPoolItem const* pSource) return; // if (IsInvalidItem(pSource)) - // // SfxItemState::DONTCARE aka INVALID_POOL_ITEM + // // SfxItemState::INVALID aka INVALID_POOL_ITEM // // nothing to do for invalid item entries // return; // if (IsDisabledItem(pSource)) - // // SfxItemState::DONTCARE aka DISABLED_POOL_ITEM + // // SfxItemState::INVALID aka DISABLED_POOL_ITEM // // nothing to do for disabled item entries // return; @@ -1005,18 +1005,6 @@ void SfxItemSet::ClearInvalidItems() } } -void SfxItemSet::InvalidateAllItems() -{ - // instead of just asserting, do the change. Clear all items - ClearAllItemsImpl(); - - // set all to invalid - std::fill(begin(), begin() + TotalCount(), INVALID_POOL_ITEM); - - // ...and correct the count - invalid items get counted - m_nCount = TotalCount(); -} - SfxItemState SfxItemSet::GetItemState_ForWhichID( SfxItemState eState, sal_uInt16 nWhich, bool bSrchInParent, const SfxPoolItem **ppItem) const { const sal_uInt16 nOffset(GetRanges().getOffsetFromWhich(nWhich)); @@ -1051,7 +1039,7 @@ SfxItemState SfxItemSet::GetItemState_ForOffset( sal_uInt16 nOffset, const SfxPo if (IsInvalidItem(pCandidate)) // Different ones are present - return SfxItemState::DONTCARE; + return SfxItemState::INVALID; if (IsDisabledItem(pCandidate)) // Item is Disabled @@ -1227,7 +1215,7 @@ bool SfxItemSet::Put(const SfxItemSet& rSource, bool bInvalidAsDefault) * * SfxItemState::SET: Hard set to the default of the Pool * SfxItemState::DEFAULT: Deleted (0 pointer) - * SfxItemState::DONTCARE: Invalid (-1 pointer) + * SfxItemState::INVALID: Invalid (-1 pointer) * * NB: All other values for 'eDontCareAs' and 'eDefaultAs' are invalid */ @@ -1260,7 +1248,7 @@ void SfxItemSet::PutExtended ClearSingleItem_ForWhichID(nWhich); break; - case SfxItemState::DONTCARE: + case SfxItemState::INVALID: DisableOrInvalidateItem_ForWhichID(false, nWhich); break; @@ -1287,7 +1275,7 @@ void SfxItemSet::PutExtended ClearSingleItem_ForWhichID(nWhich); break; - case SfxItemState::DONTCARE: + case SfxItemState::INVALID: DisableOrInvalidateItem_ForWhichID(false, nWhich); break; diff --git a/svx/inc/sdr/properties/e3dcompoundproperties.hxx b/svx/inc/sdr/properties/e3dcompoundproperties.hxx index 96abc06f2df2..e776abfdbc59 100644 --- a/svx/inc/sdr/properties/e3dcompoundproperties.hxx +++ b/svx/inc/sdr/properties/e3dcompoundproperties.hxx @@ -47,7 +47,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 override; diff --git a/svx/inc/sdr/properties/e3dsceneproperties.hxx b/svx/inc/sdr/properties/e3dsceneproperties.hxx index 4606499bdffe..4ffa1a4f4815 100644 --- a/svx/inc/sdr/properties/e3dsceneproperties.hxx +++ b/svx/inc/sdr/properties/e3dsceneproperties.hxx @@ -46,7 +46,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 override; diff --git a/svx/inc/sdr/properties/groupproperties.hxx b/svx/inc/sdr/properties/groupproperties.hxx index d31806d06bd1..49e6107a25dd 100644 --- a/svx/inc/sdr/properties/groupproperties.hxx +++ b/svx/inc/sdr/properties/groupproperties.hxx @@ -49,7 +49,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 override; diff --git a/svx/source/dialog/connctrl.cxx b/svx/source/dialog/connctrl.cxx index 13677849fa44..c10bdd0fff7b 100644 --- a/svx/source/dialog/connctrl.cxx +++ b/svx/source/dialog/connctrl.cxx @@ -239,7 +239,7 @@ sal_uInt16 SvxXConnectionPreview::GetLineDeltaCount() const const SfxItemSet& rSet = pEdgeObj->GetMergedItemSet(); sal_uInt16 nCount(0); - if(SfxItemState::DONTCARE != rSet.GetItemState(SDRATTR_EDGELINEDELTACOUNT)) + if(SfxItemState::INVALID != rSet.GetItemState(SDRATTR_EDGELINEDELTACOUNT)) nCount = rSet.Get(SDRATTR_EDGELINEDELTACOUNT).GetValue(); return nCount; diff --git a/svx/source/dialog/rlrcitem.cxx b/svx/source/dialog/rlrcitem.cxx index a73cd00bdac5..36ecbb02699e 100644 --- a/svx/source/dialog/rlrcitem.cxx +++ b/svx/source/dialog/rlrcitem.cxx @@ -41,7 +41,7 @@ SvxRulerItem::SvxRulerItem(sal_uInt16 _nId, SvxRuler &rRul, SfxBindings &rBindin void SvxRulerItem::StateChangedAtToolBoxControl( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState) { - // SfxItemState::DONTCARE => pState == -1 => PTR_CAST buff + // SfxItemState::INVALID => pState == -1 => PTR_CAST buff if ( eState != SfxItemState::DEFAULT ) pState = nullptr; diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index 4482774a2482..dbd55651fbc3 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -22,6 +22,7 @@ #include <svl/slstitm.hxx> #include <svl/itemiter.hxx> #include <svl/style.hxx> +#include <svl/whiter.hxx> #include <unotools/intlwrapper.hxx> #include <unotools/moduleoptions.hxx> #include <unotools/searchopt.hxx> @@ -1978,7 +1979,13 @@ IMPL_LINK_NOARG(SvxSearchDialog, FormatHdl_Impl, weld::Button&, void) OUString aTxt; - aSet.InvalidateAllItems(); + // ITEM: here we have 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 + SfxWhichIter aIter(aSet); + for ( sal_uInt16 nWh = aIter.FirstWhich(); nWh != 0; nWh = aIter.NextWhich() ) + aSet.InvalidateItem(nWh); aSet.Put(SvxBrushItem(nBrushWhich)); if ( bSearch ) diff --git a/svx/source/dialog/weldeditview.cxx b/svx/source/dialog/weldeditview.cxx index 6292bd56cb9f..ceb09f37ff81 100644 --- a/svx/source/dialog/weldeditview.cxx +++ b/svx/source/dialog/weldeditview.cxx @@ -1141,7 +1141,7 @@ static SfxItemState GetSvxEditEngineItemState(EditEngine const& rEditEngine, con { // ... and its different to this one than the state is don't care if (*pParaItem != *(rAttrib.pAttr)) - return SfxItemState::DONTCARE; + return SfxItemState::INVALID; } else { @@ -1162,7 +1162,7 @@ static SfxItemState GetSvxEditEngineItemState(EditEngine const& rEditEngine, con if (bEmpty) eParaState = SfxItemState::DEFAULT; else if (bGaps) - eParaState = SfxItemState::DONTCARE; + eParaState = SfxItemState::INVALID; else eParaState = SfxItemState::SET; @@ -1170,7 +1170,7 @@ static SfxItemState GetSvxEditEngineItemState(EditEngine const& rEditEngine, con if (pLastItem) { if ((pParaItem == nullptr) || (*pLastItem != *pParaItem)) - return SfxItemState::DONTCARE; + return SfxItemState::INVALID; } else { diff --git a/svx/source/engine3d/float3d.cxx b/svx/source/engine3d/float3d.cxx index aa27d5319a3c..82b4056b4039 100644 --- a/svx/source/engine3d/float3d.cxx +++ b/svx/source/engine3d/float3d.cxx @@ -476,7 +476,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) while(nWhich) { SfxItemState eState = rAttrs.GetItemState(nWhich, false); - if(SfxItemState::DONTCARE == eState) + if(SfxItemState::INVALID == eState) mpRemember2DAttributes->InvalidateItem(nWhich); else if(SfxItemState::SET == eState) mpRemember2DAttributes->Put(rAttrs.Get(nWhich, false)); @@ -565,7 +565,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) // Bitmap fill ? -> Status bool bBitmap(false); eState = rAttrs.GetItemState(XATTR_FILLSTYLE); - if(eState != SfxItemState::DONTCARE) + if(eState != SfxItemState::INVALID) { drawing::FillStyle eXFS = rAttrs.Get(XATTR_FILLSTYLE).GetValue(); bBitmap = (eXFS == drawing::FillStyle_BITMAP || eXFS == drawing::FillStyle_GRADIENT || eXFS == drawing::FillStyle_HATCH); @@ -578,7 +578,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) if( m_xNumHorizontal->get_sensitive() ) { eState = rAttrs.GetItemState(SDRATTR_3DOBJ_HORZ_SEGS); - if(eState != SfxItemState::DONTCARE) + if(eState != SfxItemState::INVALID) { sal_uInt32 nValue = rAttrs.Get(SDRATTR_3DOBJ_HORZ_SEGS).GetValue(); if (nValue != static_cast<sal_uInt32>(m_xNumHorizontal->get_value())) @@ -603,7 +603,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) if( m_xNumVertical->get_sensitive() ) { eState = rAttrs.GetItemState(SDRATTR_3DOBJ_VERT_SEGS); - if( eState != SfxItemState::DONTCARE ) + if( eState != SfxItemState::INVALID ) { sal_uInt32 nValue = rAttrs.Get(SDRATTR_3DOBJ_VERT_SEGS).GetValue(); if( nValue != static_cast<sal_uInt32>(m_xNumVertical->get_value()) ) @@ -628,7 +628,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) if( m_xMtrDepth->get_sensitive() ) { eState = rAttrs.GetItemState(SDRATTR_3DOBJ_DEPTH); - if( eState != SfxItemState::DONTCARE ) + if( eState != SfxItemState::INVALID ) { sal_uInt32 nValue = rAttrs.Get(SDRATTR_3DOBJ_DEPTH).GetValue(); sal_uInt32 nValue2 = GetCoreValue(*m_xMtrDepth, ePoolUnit); @@ -655,7 +655,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) // Double walled / Double sided eState = rAttrs.GetItemState(SDRATTR_3DOBJ_DOUBLE_SIDED); - if( eState != SfxItemState::DONTCARE ) + if( eState != SfxItemState::INVALID ) { bool bValue = rAttrs.Get(SDRATTR_3DOBJ_DOUBLE_SIDED).GetValue(); if( bValue != m_xBtnDoubleSided->get_active() ) @@ -679,7 +679,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) if( m_xMtrPercentDiagonal->get_sensitive() ) { eState = rAttrs.GetItemState(SDRATTR_3DOBJ_PERCENT_DIAGONAL); - if( eState != SfxItemState::DONTCARE ) + if( eState != SfxItemState::INVALID ) { sal_uInt16 nValue = rAttrs.Get(SDRATTR_3DOBJ_PERCENT_DIAGONAL).GetValue(); if( nValue != m_xMtrPercentDiagonal->get_value(FieldUnit::PERCENT) ) @@ -704,7 +704,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) if( m_xMtrBackscale->get_sensitive() ) { eState = rAttrs.GetItemState(SDRATTR_3DOBJ_BACKSCALE); - if( eState != SfxItemState::DONTCARE ) + if( eState != SfxItemState::INVALID ) { sal_uInt16 nValue = rAttrs.Get(SDRATTR_3DOBJ_BACKSCALE).GetValue(); if( nValue != m_xMtrBackscale->get_value(FieldUnit::PERCENT) ) @@ -729,7 +729,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) if( m_xMtrEndAngle->get_sensitive() ) { eState = rAttrs.GetItemState(SDRATTR_3DOBJ_END_ANGLE); - if( eState != SfxItemState::DONTCARE ) + if( eState != SfxItemState::INVALID ) { sal_Int32 nValue = rAttrs.Get(SDRATTR_3DOBJ_END_ANGLE).GetValue(); if( nValue != m_xMtrEndAngle->get_value(FieldUnit::DEGREE) ) @@ -750,7 +750,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) // Normal type eState = rAttrs.GetItemState(SDRATTR_3DOBJ_NORMALS_KIND); - if( eState != SfxItemState::DONTCARE ) + if( eState != SfxItemState::INVALID ) { sal_uInt16 nValue = rAttrs.Get(SDRATTR_3DOBJ_NORMALS_KIND).GetValue(); @@ -779,7 +779,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) // Normal inverted eState = rAttrs.GetItemState(SDRATTR_3DOBJ_NORMALS_INVERT); - if( eState != SfxItemState::DONTCARE ) + if( eState != SfxItemState::INVALID ) { bool bValue = rAttrs.Get(SDRATTR_3DOBJ_NORMALS_INVERT).GetValue(); if( bValue != m_xBtnNormalsInvert->get_active() ) @@ -801,7 +801,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) // 2-sided lighting eState = rAttrs.GetItemState(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING); - if( eState != SfxItemState::DONTCARE ) + if( eState != SfxItemState::INVALID ) { bool bValue = rAttrs.Get(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING).GetValue(); if( bValue != m_xBtnTwoSidedLighting->get_active() ) @@ -824,7 +824,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) // Representation // Shademode eState = rAttrs.GetItemState(SDRATTR_3DSCENE_SHADE_MODE); - if( eState != SfxItemState::DONTCARE ) + if( eState != SfxItemState::INVALID ) { sal_uInt16 nValue = rAttrs.Get(SDRATTR_3DSCENE_SHADE_MODE).GetValue(); if( nValue != m_xLbShademode->get_active() ) @@ -844,7 +844,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) // 3D-Shadow eState = rAttrs.GetItemState(SDRATTR_3DOBJ_SHADOW_3D); - if( eState != SfxItemState::DONTCARE ) + if( eState != SfxItemState::INVALID ) { bool bValue = rAttrs.Get(SDRATTR_3DOBJ_SHADOW_3D).GetValue(); if( bValue != m_xBtnShadow3d->get_active() ) @@ -868,7 +868,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) // Inclination (Shadow) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_SHADOW_SLANT); - if( eState != SfxItemState::DONTCARE ) + if( eState != SfxItemState::INVALID ) { sal_uInt16 nValue = rAttrs.Get(SDRATTR_3DSCENE_SHADOW_SLANT).GetValue(); if( nValue != m_xMtrSlant->get_value(FieldUnit::DEGREE) ) @@ -888,7 +888,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) // Distance eState = rAttrs.GetItemState(SDRATTR_3DSCENE_DISTANCE); - if( eState != SfxItemState::DONTCARE ) + if( eState != SfxItemState::INVALID ) { sal_uInt32 nValue = rAttrs.Get(SDRATTR_3DSCENE_DISTANCE).GetValue(); sal_uInt32 nValue2 = GetCoreValue(*m_xMtrDistance, ePoolUnit); @@ -912,7 +912,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) // Focal length eState = rAttrs.GetItemState(SDRATTR_3DSCENE_FOCAL_LENGTH); - if( eState != SfxItemState::DONTCARE ) + if( eState != SfxItemState::INVALID ) { sal_uInt32 nValue = rAttrs.Get(SDRATTR_3DSCENE_FOCAL_LENGTH).GetValue(); sal_uInt32 nValue2 = GetCoreValue(*m_xMtrFocalLength, ePoolUnit); @@ -938,7 +938,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) Color aColor; // Light 1 (Color) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_1); - if( eState != SfxItemState::DONTCARE ) + if( eState != SfxItemState::INVALID ) { aColor = rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_1).GetValue(); ColorListBox* pLb = m_xLbLight1.get(); @@ -958,7 +958,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) } // Light 1 (on/off) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_1); - if( eState != SfxItemState::DONTCARE ) + if( eState != SfxItemState::INVALID ) { bool bOn = rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_1).GetValue(); if (bOn != m_xBtnLight1->isLightOn()) @@ -979,14 +979,14 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) } // Light 1 (direction) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTDIRECTION_1); - if( eState != SfxItemState::DONTCARE ) + if( eState != SfxItemState::INVALID ) { bUpdate = true; } //Light 2 (color) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_2); - if( eState != SfxItemState::DONTCARE ) + if( eState != SfxItemState::INVALID ) { aColor = rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_2).GetValue(); ColorListBox* pLb = m_xLbLight2.get(); @@ -1006,7 +1006,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) } // Light 2 (on/off) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_2); - if( eState != SfxItemState::DONTCARE ) + if( eState != SfxItemState::INVALID ) { bool bOn = rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_2).GetValue(); if (bOn != m_xBtnLight2->isLightOn()) @@ -1027,14 +1027,14 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) } //Light 2 (Direction) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTDIRECTION_2); - if( eState != SfxItemState::DONTCARE ) + if( eState != SfxItemState::INVALID ) { bUpdate = true; } //Light 3 (color) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_3); - if( eState != SfxItemState::DONTCARE ) + if( eState != SfxItemState::INVALID ) { aColor = rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_3).GetValue(); ColorListBox* pLb = m_xLbLight3.get(); @@ -1054,7 +1054,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) } // Light 3 (on/off) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_3); - if( eState != SfxItemState::DONTCARE ) + if( eState != SfxItemState::INVALID ) { bool bOn = rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_3).GetValue(); if (bOn != m_xBtnLight3->isLightOn()) @@ -1075,14 +1075,14 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) } // Light 3 (Direction) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTDIRECTION_3); - if( eState != SfxItemState::DONTCARE ) + if( eState != SfxItemState::INVALID ) { bUpdate = true; } // Light 4 (Color) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_4); - if( eState != SfxItemState::DONTCARE ) + if( eState != SfxItemState::INVALID ) { aColor = rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_4).GetValue(); ColorListBox* pLb = m_xLbLight4.get(); @@ -1102,7 +1102,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) } // Light 4 (on/off) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_4); - if( eState != SfxItemState::DONTCARE ) + if( eState != SfxItemState::INVALID ) { bool bOn = rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_4).GetValue(); if (bOn != m_xBtnLight4->isLightOn()) @@ -1123,14 +1123,14 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) } // Light 4 (direction) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTDIRECTION_4); - if( eState != SfxItemState::DONTCARE ) + if( eState != SfxItemState::INVALID ) { bUpdate = true; } // Light 5 (color) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_5); - if( eState != SfxItemState::DONTCARE ) + if( eState != SfxItemState::INVALID ) { aColor = rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_5).GetValue(); ColorListBox* pLb = m_xLbLight5.get(); @@ -1150,7 +1150,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) } // Light 5 (on/off) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_5); - if( eState != SfxItemState::DONTCARE ) + if( eState != SfxItemState::INVALID ) { bool bOn = rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_5).GetValue(); if (bOn != m_xBtnLight5->isLightOn()) @@ -1171,14 +1171,14 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) } // Light 5 (direction) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTDIRECTION_5); - if( eState != SfxItemState::DONTCARE ) + if( eState != SfxItemState::INVALID ) { bUpdate = true; } // Light 6 (color) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_6); - if( eState != SfxItemState::DONTCARE ) + if( eState != SfxItemState::INVALID ) { aColor = rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_6).GetValue(); ColorListBox* pLb = m_xLbLight6.get(); @@ -1198,7 +1198,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) } // Light 6 (on/off) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_6); - if( eState != SfxItemState::DONTCARE ) + if( eState != SfxItemState::INVALID ) { bool bOn = rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_6).GetValue(); if (bOn != m_xBtnLight6->isLightOn()) @@ -1219,14 +1219,14 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) } // Light 6 (direction) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTDIRECTION_6); - if( eState != SfxItemState::DONTCARE ) + if( eState != SfxItemState::INVALID ) { bUpdate = true; } // Light 7 (color) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_7); - if( eState != SfxItemState::DONTCARE ) + if( eState != SfxItemState::INVALID ) { aColor = rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_7).GetValue(); ColorListBox* pLb = m_xLbLight7.get(); @@ -1246,7 +1246,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) } // Light 7 (on/off) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_7); - if( eState != SfxItemState::DONTCARE ) + if( eState != SfxItemState::INVALID ) { bool bOn = rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_7).GetValue(); if (bOn != m_xBtnLight7->isLightOn()) @@ -1267,14 +1267,14 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) } // Light 7 (direction) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTDIRECTION_7); - if( eState != SfxItemState::DONTCARE ) + if( eState != SfxItemState::INVALID ) { bUpdate = true; } // Light 8 (color) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_8); - if( eState != SfxItemState::DONTCARE ) + if( eState != SfxItemState::INVALID ) { aColor = rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_8).GetValue(); ColorListBox* pLb = m_xLbLight8.get(); @@ -1294,7 +1294,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) } // Light 8 (on/off) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_8); - if( eState != SfxItemState::DONTCARE ) + if( eState != SfxItemState::INVALID ) { bool bOn = rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_8).GetValue(); if (bOn != m_xBtnLight8->isLightOn()) @@ -1315,14 +1315,14 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) } // Light 8 (direction) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTDIRECTION_8); - if( eState != SfxItemState::DONTCARE ) + if( eState != SfxItemState::INVALID ) { bUpdate = true; } // Ambient light eState = rAttrs.GetItemState(SDRATTR_3DSCENE_AMBIENTCOLOR); - if( eState != SfxItemState::DONTCARE ) + if( eState != SfxItemState::INVALID ) { aColor = rAttrs.Get(SDRATTR_3DSCENE_AMBIENTCOLOR).GetValue(); ColorListBox* pLb = m_xLbAmbientlight.get(); @@ -1347,7 +1347,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) if( bBitmap ) { eState = rAttrs.GetItemState(SDRATTR_3DOBJ_TEXTURE_KIND); - if( eState != SfxItemState::DONTCARE ) + if( eState != SfxItemState::INVALID ) { sal_uInt16 nValue = rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_KIND).GetValue(); drawing::TextureKind2 objTextKind = static_cast<drawing::TextureKind2>(nValue); @@ -1373,7 +1373,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) // Mode eState = rAttrs.GetItemState(SDRATTR_3DOBJ_TEXTURE_MODE); - if( eState != SfxItemState::DONTCARE ) + if( eState != SfxItemState::INVALID ) { sal_uInt16 nValue = rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_MODE).GetValue(); @@ -1398,7 +1398,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) // Projection X eState = rAttrs.GetItemState(SDRATTR_3DOBJ_TEXTURE_PROJ_X); - if( eState != SfxItemState::DONTCARE ) + if( eState != SfxItemState::INVALID ) { sal_uInt16 nValue = rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_PROJ_X).GetValue(); @@ -1427,7 +1427,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) // Projection Y eState = rAttrs.GetItemState(SDRATTR_3DOBJ_TEXTURE_PROJ_Y); - if( eState != SfxItemState::DONTCARE ) + if( eState != SfxItemState::INVALID ) { sal_uInt16 nValue = rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_PROJ_Y).GetValue(); @@ -1456,7 +1456,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) // Filter eState = rAttrs.GetItemState(SDRATTR_3DOBJ_TEXTURE_FILTER); - if( eState != SfxItemState::DONTCARE ) + if( eState != SfxItemState::INVALID ) { bool bValue = rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_FILTER).GetValue(); if( bValue != m_xBtnTexFilter->get_active() ) @@ -1483,7 +1483,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) // Object color eState = rAttrs.GetItemState(XATTR_FILLCOLOR); - if( eState != SfxItemState::DONTCARE ) + if( eState != SfxItemState::INVALID ) { aColor = rAttrs.Get(XATTR_FILLCOLOR).GetColorValue(); ColorListBox* pLb = m_xLbMatColor.get(); @@ -1504,7 +1504,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) // Self-luminous color eState = rAttrs.GetItemState(SDRATTR_3DOBJ_MAT_EMISSION); - if( eState != SfxItemState::DONTCARE ) + if( eState != SfxItemState::INVALID ) { aColor = rAttrs.Get(SDRATTR_3DOBJ_MAT_EMISSION).GetValue(); ColorListBox* pLb = m_xLbMatEmission.get(); @@ -1525,7 +1525,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) // Specular eState = rAttrs.GetItemState(SDRATTR_3DOBJ_MAT_SPECULAR); - if( eState != SfxItemState::DONTCARE ) + if( eState != SfxItemState::INVALID ) { aColor = rAttrs.Get(SDRATTR_3DOBJ_MAT_SPECULAR).GetValue(); ColorListBox* pLb = m_xLbMatSpecular.get(); @@ -1546,7 +1546,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) // Specular Intensity eState = rAttrs.GetItemState(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY); - if( eState != SfxItemState::DONTCARE ) + if( eState != SfxItemState::INVALID ) { sal_uInt16 nValue = rAttrs.Get(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY).GetValue(); if( nValue != m_xMtrMatSpecularIntensity->get_value(FieldUnit::PERCENT) ) @@ -1568,7 +1568,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) // Other // Perspective eState = rAttrs.GetItemState(SDRATTR_3DSCENE_PERSPECTIVE); - if( eState != SfxItemState::DONTCARE ) + if( eState != SfxItemState::INVALID ) { ProjectionType ePT = static_cast<ProjectionType>(rAttrs.Get(SDRATTR_3DSCENE_PERSPECTIVE).GetValue()); if( ( !m_xBtnPerspective->get_active() && ePT == ProjectionType::Perspective ) || @@ -1604,9 +1604,9 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) if(SfxItemState::SET != aSet.GetItemState(XATTR_LINESTYLE, false)) aSet.Put(XLineStyleItem(drawing::LineStyle_NONE)); - // set FillColor hard to WHITE when it's SfxItemState::DONTCARE so that + // set FillColor hard to WHITE when it's SfxItemState::INVALID so that // the default (Blue7) is not used for 3d preview - if(SfxItemState::DONTCARE == aSet.GetItemState(XATTR_FILLCOLOR, false)) + if(SfxItemState::INVALID == aSet.GetItemState(XATTR_FILLCOLOR, false)) aSet.Put(XFillColorItem(OUString(), COL_WHITE)); m_xCtlPreview->Set3DAttributes(aSet); @@ -1654,7 +1654,7 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs ) while(nWhich) { SfxItemState eState = aIter.GetItemState(false); - if(SfxItemState::DONTCARE == eState) + if(SfxItemState::INVALID == eState) rAttrs.InvalidateItem(nWhich); else if(SfxItemState::SET == eState) rAttrs.Put(mpRemember2DAttributes->Get(nWhich, false)); diff --git a/svx/source/sdr/properties/e3dsceneproperties.cxx b/svx/source/sdr/properties/e3dsceneproperties.cxx index b08d534aa685..5483ec4ae01c 100644 --- a/svx/source/sdr/properties/e3dsceneproperties.cxx +++ b/svx/source/sdr/properties/e3dsceneproperties.cxx @@ -83,7 +83,7 @@ namespace sdr::properties // and always equal. if(nWhich <= SDRATTR_3DSCENE_FIRST || nWhich >= SDRATTR_3DSCENE_LAST) { - if(SfxItemState::DONTCARE == aIter.GetItemState(false)) + if(SfxItemState::INVALID == aIter.GetItemState(false)) { moItemSet->InvalidateItem(nWhich); } diff --git a/svx/source/sdr/properties/groupproperties.cxx b/svx/source/sdr/properties/groupproperties.cxx index e6a83d329d3c..8d4d3a965957 100644 --- a/svx/source/sdr/properties/groupproperties.cxx +++ b/svx/source/sdr/properties/groupproperties.cxx @@ -77,7 +77,7 @@ namespace sdr::properties while(nWhich) { - if(SfxItemState::DONTCARE == aIter.GetItemState(false)) + if(SfxItemState::INVALID == aIter.GetItemState(false)) { moMergedItemSet->InvalidateItem(nWhich); } diff --git a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx index 0046453614a4..0cf38cb93837 100644 --- a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx +++ b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx @@ -218,7 +218,7 @@ void ParaLineSpacingControl::Initialize() mpActLineDistFld->set_text(""); } - else // !bItemStateSet || eState == SfxItemState::DONTCARE || eState == SfxItemState::UNKNOWN + else // !bItemStateSet || eState == SfxItemState::INVALID || eState == SfxItemState::UNKNOWN { mxLineDistLabel->set_sensitive(false); mpActLineDistFld->set_sensitive(false); diff --git a/svx/source/svdraw/constructhelper.cxx b/svx/source/svdraw/constructhelper.cxx index d7c7f20a5cc8..4eec7dfc815c 100644 --- a/svx/source/svdraw/constructhelper.cxx +++ b/svx/source/svdraw/constructhelper.cxx @@ -110,7 +110,7 @@ void ConstructHelper::SetLineEnds(SfxItemSet& rAttr, const SdrObject& rObj, sal_ SfxItemSet aSet(rModel.GetItemPool()); // 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/svx/source/svdraw/svdedtv.cxx b/svx/source/svdraw/svdedtv.cxx index 2a97a6dbc02d..be6fd1fd85f0 100644 --- a/svx/source/svdraw/svdedtv.cxx +++ b/svx/source/svdraw/svdedtv.cxx @@ -538,7 +538,7 @@ void SdrEditView::CheckPossibilities() const SfxItemSet& rSet = pObj->GetMergedItemSet(); SfxItemState eState = rSet.GetItemState(XATTR_FILLSTYLE, false); - if(SfxItemState::DONTCARE != eState) + if(SfxItemState::INVALID != eState) { // If state is not DONTCARE, test the item drawing::FillStyle eFillStyle = rSet.Get(XATTR_FILLSTYLE).GetValue(); diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx index 13e3231c502a..7729cb52d06c 100644 --- a/svx/source/svdraw/svdedtv1.cxx +++ b/svx/source/svdraw/svdedtv1.cxx @@ -924,7 +924,7 @@ void SdrEditView::MergeAttrFromMarked(SfxItemSet& rAttr, bool bOnlyHardAttr) con { if(!bOnlyHardAttr) { - if(SfxItemState::DONTCARE == aIter.GetItemState(false)) + if(SfxItemState::INVALID == aIter.GetItemState(false)) rAttr.InvalidateItem(nWhich); else rAttr.MergeValue(rSet.Get(nWhich), true); @@ -1128,7 +1128,7 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, bool bReplaceAll) const size_t nMarkCount(GetMarkedObjectCount()); std::vector< E3DModifySceneSnapRectUpdater* > aUpdaters; - // create ItemSet without SfxItemState::DONTCARE. Put() + // create ItemSet without SfxItemState::INVALID. Put() // uses its second parameter (bInvalidAsDefault) to // remove all such items to set them to default. SfxItemSet aAttr(*rAttr.GetPool(), rAttr.GetRanges()); @@ -1207,7 +1207,7 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, bool bReplaceAll) if(nOldLineWidth != nNewLineWidth) { - if(SfxItemState::DONTCARE != rSet.GetItemState(XATTR_LINESTARTWIDTH)) + if(SfxItemState::INVALID != rSet.GetItemState(XATTR_LINESTARTWIDTH)) { const sal_Int32 nValAct(rSet.Get(XATTR_LINESTARTWIDTH).GetValue()); const sal_Int32 nValNewStart(std::max(sal_Int32(0), nValAct + (((nNewLineWidth - nOldLineWidth) * 15) / 10))); @@ -1215,7 +1215,7 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, bool bReplaceAll) pObj->SetMergedItem(XLineStartWidthItem(nValNewStart)); } - if(SfxItemState::DONTCARE != rSet.GetItemState(XATTR_LINEENDWIDTH)) + if(SfxItemState::INVALID != rSet.GetItemState(XATTR_LINEENDWIDTH)) { const sal_Int32 nValAct(rSet.Get(XATTR_LINEENDWIDTH).GetValue()); const sal_Int32 nValNewEnd(std::max(sal_Int32(0), nValAct + (((nNewLineWidth - nOldLineWidth) * 15) / 10))); @@ -1459,7 +1459,7 @@ SfxItemSet SdrEditView::GetGeoAttrFromMarked() const SfxItemState eState=aMarkAttr.GetItemState(SDRATTR_TEXT_AUTOGROWWIDTH); bool bAutoGrow=aMarkAttr.Get(SDRATTR_TEXT_AUTOGROWWIDTH).GetValue(); - if (eState==SfxItemState::DONTCARE) { + if (eState==SfxItemState::INVALID) { aRetSet.InvalidateItem(SID_ATTR_TRANSFORM_AUTOWIDTH); } else if (eState==SfxItemState::SET) { aRetSet.Put(SfxBoolItem(SID_ATTR_TRANSFORM_AUTOWIDTH,bAutoGrow)); @@ -1467,7 +1467,7 @@ SfxItemSet SdrEditView::GetGeoAttrFromMarked() const eState=aMarkAttr.GetItemState(SDRATTR_TEXT_AUTOGROWHEIGHT); bAutoGrow=aMarkAttr.Get(SDRATTR_TEXT_AUTOGROWHEIGHT).GetValue(); - if (eState==SfxItemState::DONTCARE) { + if (eState==SfxItemState::INVALID) { aRetSet.InvalidateItem(SID_ATTR_TRANSFORM_AUTOHEIGHT); } else if (eState==SfxItemState::SET) { aRetSet.Put(SfxBoolItem(SID_ATTR_TRANSFORM_AUTOHEIGHT,bAutoGrow)); @@ -1475,7 +1475,7 @@ SfxItemSet SdrEditView::GetGeoAttrFromMarked() const eState=aMarkAttr.GetItemState(SDRATTR_CORNER_RADIUS); tools::Long nRadius=aMarkAttr.Get(SDRATTR_CORNER_RADIUS).GetValue(); - if (eState==SfxItemState::DONTCARE) { + if (eState==SfxItemState::INVALID) { aRetSet.InvalidateItem(SDRATTR_CORNER_RADIUS); } else if (eState==SfxItemState::SET) { aRetSet.Put(makeSdrEckenradiusItem(nRadius)); diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx index 874fd1cfee81..e259e18e8e7d 100644 --- a/svx/source/table/tablecontroller.cxx +++ b/svx/source/table/tablecontroller.cxx @@ -458,7 +458,7 @@ void SvxTableController::GetState( SfxItemSet& rSet ) SdrTextVertAdjust eAdj = SDRTEXTVERTADJUST_BLOCK; - if (oSet->GetItemState( SDRATTR_TEXT_VERTADJUST ) != SfxItemState::DONTCARE) + if (oSet->GetItemState( SDRATTR_TEXT_VERTADJUST ) != SfxItemState::INVALID) eAdj = oSet->Get(SDRATTR_TEXT_VERTADJUST).GetValue(); rSet.Put(SfxBoolItem(SID_TABLE_VERT_BOTTOM, eAdj == SDRTEXTVERTADJUST_BOTTOM)); @@ -2429,7 +2429,7 @@ void SvxTableController::MergeAttrFromSelectedCells(SfxItemSet& rAttr, bool bOnl SfxItemState nState = aIter.GetItemState(false); if(!bOnlyHardAttr) { - if(SfxItemState::DONTCARE == nState) + if(SfxItemState::INVALID == nState) rAttr.InvalidateItem(nWhich); else rAttr.MergeValue(rSet.Get(nWhich), true); diff --git a/svx/source/tbxctrls/colrctrl.cxx b/svx/source/tbxctrls/colrctrl.cxx index daf1a2012492..da2a83be8198 100644 --- a/svx/source/tbxctrls/colrctrl.cxx +++ b/svx/source/tbxctrls/colrctrl.cxx @@ -361,7 +361,7 @@ IMPL_LINK_NOARG(SvxColorDockingWindow, SelectHdl, ValueSet*, void) { SfxItemSet aAttrSet(pView->GetModel().GetItemPool()); pView->GetAttributes( aAttrSet ); - if ( aAttrSet.GetItemState( XATTR_LINESTYLE ) != SfxItemState::DONTCARE ) + if ( aAttrSet.GetItemState( XATTR_LINESTYLE ) != SfxItemState::INVALID ) { drawing::LineStyle eXLS = aAttrSet.Get( XATTR_LINESTYLE ).GetValue(); diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx index f06e31fe6465..7c4932f745d0 100644 --- a/sw/source/core/crsr/findattr.cxx +++ b/sw/source/core/crsr/findattr.cxx @@ -357,7 +357,7 @@ bool SwAttrCheckArr::SetAttrFwd( const SwTextAttr& rAttr ) while( pTmpItem ) { SfxItemState eState = m_aComapeSet.GetItemState( nWhch, false, &pItem ); - if( SfxItemState::DONTCARE == eState || SfxItemState::SET == eState ) + if( SfxItemState::INVALID == eState || SfxItemState::SET == eState ) { sal_uInt16 n; SwSrchChrAttr* pCmp; @@ -409,7 +409,7 @@ bool SwAttrCheckArr::SetAttrFwd( const SwTextAttr& rAttr ) bool bContinue = false; - if( SfxItemState::DONTCARE == eState ) + if( SfxItemState::INVALID == eState ) { // Will the attribute become valid? if( !CmpAttr( m_aComapeSet.GetPool()->GetUserOrPoolDefaultItem( nWhch ), @@ -517,7 +517,7 @@ bool SwAttrCheckArr::SetAttrBwd( const SwTextAttr& rAttr ) while( pTmpItem ) { SfxItemState eState = m_aComapeSet.GetItemState( nWhch, false, &pItem ); - if( SfxItemState::DONTCARE == eState || SfxItemState::SET == eState ) + if( SfxItemState::INVALID == eState || SfxItemState::SET == eState ) { sal_uInt16 n; SwSrchChrAttr* pCmp; @@ -567,7 +567,7 @@ bool SwAttrCheckArr::SetAttrBwd( const SwTextAttr& rAttr ) } bool bContinue = false; - if( SfxItemState::DONTCARE == eState ) + if( SfxItemState::INVALID == eState ) { // Will the attribute become valid? if( !CmpAttr( m_aComapeSet.GetPool()->GetUserOrPoolDefaultItem( nWhch ), diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx index dc79e9c3c9d0..d3445944e6cb 100644 --- a/sw/source/core/edit/edattr.cxx +++ b/sw/source/core/edit/edattr.cxx @@ -62,7 +62,7 @@ bool SwEditShell::GetPaMAttr( SwPaM* pPaM, SfxItemSet& rSet, // ??? pPaM can be different from the Cursor ??? if( GetCursorCnt() > getMaxLookup() ) { - rSet.InvalidateAllItems(); + rSet.ClearItem(); return false; } @@ -113,7 +113,6 @@ bool SwEditShell::GetPaMAttr( SwPaM* pPaM, SfxItemSet& rSet, if( sal_Int32(nEndNd - nSttNd) >= getMaxLookup() ) { rSet.ClearItem(); - rSet.InvalidateAllItems(); return false; } diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index 5cb73bf7b8f0..effb9d36c853 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -319,7 +319,6 @@ void SwUnoCursorHelper::GetCursorAttr(SwPaM & rPam, if (nEndNd - nSttNd >= SwNodeOffset(nMaxLookup)) { rSet.ClearItem(); - rSet.InvalidateAllItems(); return;// uno::Any(); } diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx index 89cf5055175e..9d981d905a26 100644 --- a/sw/source/uibase/app/docstyle.cxx +++ b/sw/source/uibase/app/docstyle.cxx @@ -1821,7 +1821,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, const bool bBroadcast, m_rDoc.ChgNumRuleFormats( aSetRule ); } break; - case SfxItemState::DONTCARE: + case SfxItemState::INVALID: // set NumRule to default values // what are the default values? { diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx index 0a867cdef858..d6f018e98ac6 100644 --- a/sw/source/uibase/shells/annotsh.cxx +++ b/sw/source/uibase/shells/annotsh.cxx @@ -875,7 +875,7 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet) if(nEEWhich == EE_CHAR_KERNING) { SfxItemState eState = aEditAttr.GetItemState( EE_CHAR_KERNING ); - if ( eState == SfxItemState::DONTCARE ) + if ( eState == SfxItemState::INVALID ) { rSet.InvalidateItem(EE_CHAR_KERNING); } diff --git a/sw/source/uibase/shells/drwtxtsh.cxx b/sw/source/uibase/shells/drwtxtsh.cxx index ae5d6879cecb..eccfa7936f2c 100644 --- a/sw/source/uibase/shells/drwtxtsh.cxx +++ b/sw/source/uibase/shells/drwtxtsh.cxx @@ -829,7 +829,7 @@ void SwDrawTextShell::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(); } @@ -838,8 +838,8 @@ void SwDrawTextShell::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/sw/source/uibase/shells/langhelper.cxx b/sw/source/uibase/shells/langhelper.cxx index f5325f9a68e6..b7c2f44828f8 100644 --- a/sw/source/uibase/shells/langhelper.cxx +++ b/sw/source/uibase/shells/langhelper.cxx @@ -379,7 +379,7 @@ namespace SwLangHelper // since the attribute is not set: retrieve the default value nLang = aSet.GetPool()->GetUserOrPoolDefaultItem( nLangWhichId ).GetLanguage(); } - else if (nState == SfxItemState::DONTCARE) + else if (nState == SfxItemState::INVALID) { // there is more than one language... nLang = LANGUAGE_DONTKNOW; diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index d5b1c76046b9..39f655d115bd 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -2652,7 +2652,7 @@ void SwTextShell::GetState( SfxItemSet &rSet ) // If a hyperlink is selected, either alone or along with other text... if (SfxItemState::SET <= aSet.GetItemState(RES_TXTATR_INETFMT) - || aSet.GetItemState(RES_TXTATR_INETFMT) == SfxItemState::DONTCARE) + || aSet.GetItemState(RES_TXTATR_INETFMT) == SfxItemState::INVALID) { break; } |