summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorArmin Le Grand (allotropia) <armin.le.grand.extern@allotropia.de>2024-03-19 18:39:10 +0100
committerArmin Le Grand <Armin.Le.Grand@me.com>2024-03-21 21:39:57 +0100
commitd053413402956fecbcf65c9319ebbe2cd6c08dfa (patch)
tree4bafd4584551d8a36431a483fbd6e1161a94c14b /sc/source/ui
parent1f912bdbf7848f8d4073be62ccb589927d60a95f (diff)
ITEM: Remove InvalidateAllItems()
I checked if this is used, but it can be replaced using Clear() -> all. This prevents that the whole array of Items in an ItemSet gets set to INVALID_POOL_ITEM. I also checked if INVALID_POOL_ITEM/IsInvalidItem is needed at all representing SfxItemState::DONTCARE but it is and still will need to be set for individual Items. At last checked if SfxItemState::UNKNOWN and ::DISABLED really need to be separate states, but indeed there are some rare cases that need that. To make things more consistent I also renamed SfxItemState::DONTCARE to SfxItemState::INVALID to better match Set/IsInvalid calls at ItemSet. The build showed a missing UT and led to a problem due to the hand-made ItemSet-like SearchAttrItemList. The state 'invalid' seems to be used as 'unused' marker. It should be changed to use SfxPoolItemHolder and not need that. For now, set by using an own loop to set to that state. Change-Id: Ifc51aad60570569a1e37d3084a5e307eed47d06c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165035 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/app/inputhdl.cxx8
-rw-r--r--sc/source/ui/attrdlg/tabpages.cxx2
-rw-r--r--sc/source/ui/docshell/docsh6.cxx2
-rw-r--r--sc/source/ui/drawfunc/drtxtob.cxx14
-rw-r--r--sc/source/ui/sidebar/AlignmentPropertyPanel.cxx2
-rw-r--r--sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx6
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx2
-rw-r--r--sc/source/ui/vba/vbafont.cxx18
-rw-r--r--sc/source/ui/vba/vbaformat.cxx4
-rw-r--r--sc/source/ui/vba/vbarange.cxx6
-rw-r--r--sc/source/ui/view/editsh.cxx4
-rw-r--r--sc/source/ui/view/formatsh.cxx22
-rw-r--r--sc/source/ui/view/viewfun2.cxx4
-rw-r--r--sc/source/ui/view/viewutil.cxx2
14 files changed, 48 insertions, 48 deletions
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)
{