summaryrefslogtreecommitdiff
path: root/svx/source/svdraw
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-09-10 17:53:41 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-09-12 06:08:32 +0000
commitea733ab5b632109d28bb8f1dc37116340b26229b (patch)
tree78a5c4d6cad5d6f2c58a89745ba0af130ef0e188 /svx/source/svdraw
parentcc3294e127a6aedb8f6da5741ac9063da1cc2135 (diff)
Turn SfxItemState into a C++11 scoped enumeration
...to gain further confidence in the claim "that none of the existing code tries to uses combinations of these enum values" (d92602c5b13d0a60439d86c5a033d124178726ca "more fixes for SfxItemState") Change-Id: I987922d945e8738e38adfde83b869adf3ff35b13 Reviewed-on: https://gerrit.libreoffice.org/11384 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'svx/source/svdraw')
-rw-r--r--svx/source/svdraw/svdedtv.cxx2
-rw-r--r--svx/source/svdraw/svdedtv1.cxx78
-rw-r--r--svx/source/svdraw/svdedxv.cxx2
-rw-r--r--svx/source/svdraw/svdetc.cxx2
-rw-r--r--svx/source/svdraw/svdibrow.cxx24
-rw-r--r--svx/source/svdraw/svdmodel.cxx2
-rw-r--r--svx/source/svdraw/svdmrkv.cxx2
-rw-r--r--svx/source/svdraw/svdobj.cxx52
-rw-r--r--svx/source/svdraw/svdpntv.cxx6
-rw-r--r--svx/source/svdraw/svdtext.cxx2
-rw-r--r--svx/source/svdraw/svdundo.cxx4
11 files changed, 88 insertions, 88 deletions
diff --git a/svx/source/svdraw/svdedtv.cxx b/svx/source/svdraw/svdedtv.cxx
index 130690d19761..fdca37d26875 100644
--- a/svx/source/svdraw/svdedtv.cxx
+++ b/svx/source/svdraw/svdedtv.cxx
@@ -519,7 +519,7 @@ void SdrEditView::CheckPossibilities()
const SfxItemSet& rSet = pObj->GetMergedItemSet();
SfxItemState eState = rSet.GetItemState(XATTR_FILLSTYLE, false);
- if(SFX_ITEM_DONTCARE != eState)
+ if(SfxItemState::DONTCARE != eState)
{
// If state is not DONTCARE, test the item
drawing::FillStyle eFillStyle = ((XFillStyleItem&)(rSet.Get(XATTR_FILLSTYLE))).GetValue();
diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx
index e776a7c513ba..500633aa3ca1 100644
--- a/svx/source/svdraw/svdedtv1.cxx
+++ b/svx/source/svdraw/svdedtv1.cxx
@@ -709,19 +709,19 @@ void SdrEditView::SetNotPersistAttrToMarked(const SfxItemSet& rAttr, bool /*bRep
// bReplaceAll has no effect here
Rectangle aAllSnapRect(GetMarkedObjRect());
const SfxPoolItem *pPoolItem=NULL;
- if (rAttr.GetItemState(SDRATTR_TRANSFORMREF1X,true,&pPoolItem)==SFX_ITEM_SET) {
+ if (rAttr.GetItemState(SDRATTR_TRANSFORMREF1X,true,&pPoolItem)==SfxItemState::SET) {
long n=((const SdrTransformRef1XItem*)pPoolItem)->GetValue();
SetRef1(Point(n,GetRef1().Y()));
}
- if (rAttr.GetItemState(SDRATTR_TRANSFORMREF1Y,true,&pPoolItem)==SFX_ITEM_SET) {
+ if (rAttr.GetItemState(SDRATTR_TRANSFORMREF1Y,true,&pPoolItem)==SfxItemState::SET) {
long n=((const SdrTransformRef1YItem*)pPoolItem)->GetValue();
SetRef1(Point(GetRef1().X(),n));
}
- if (rAttr.GetItemState(SDRATTR_TRANSFORMREF2X,true,&pPoolItem)==SFX_ITEM_SET) {
+ if (rAttr.GetItemState(SDRATTR_TRANSFORMREF2X,true,&pPoolItem)==SfxItemState::SET) {
long n=((const SdrTransformRef2XItem*)pPoolItem)->GetValue();
SetRef2(Point(n,GetRef2().Y()));
}
- if (rAttr.GetItemState(SDRATTR_TRANSFORMREF2Y,true,&pPoolItem)==SFX_ITEM_SET) {
+ if (rAttr.GetItemState(SDRATTR_TRANSFORMREF2Y,true,&pPoolItem)==SfxItemState::SET) {
long n=((const SdrTransformRef2YItem*)pPoolItem)->GetValue();
SetRef2(Point(GetRef2().X(),n));
}
@@ -730,19 +730,19 @@ void SdrEditView::SetNotPersistAttrToMarked(const SfxItemSet& rAttr, bool /*bRep
long nAllWdt=0; bool bAllWdt=false;
long nAllHgt=0; bool bAllHgt=false;
bool bDoIt=false;
- if (rAttr.GetItemState(SDRATTR_ALLPOSITIONX,true,&pPoolItem)==SFX_ITEM_SET) {
+ if (rAttr.GetItemState(SDRATTR_ALLPOSITIONX,true,&pPoolItem)==SfxItemState::SET) {
nAllPosX=((const SdrAllPositionXItem*)pPoolItem)->GetValue();
bAllPosX=true; bDoIt=true;
}
- if (rAttr.GetItemState(SDRATTR_ALLPOSITIONY,true,&pPoolItem)==SFX_ITEM_SET) {
+ if (rAttr.GetItemState(SDRATTR_ALLPOSITIONY,true,&pPoolItem)==SfxItemState::SET) {
nAllPosY=((const SdrAllPositionYItem*)pPoolItem)->GetValue();
bAllPosY=true; bDoIt=true;
}
- if (rAttr.GetItemState(SDRATTR_ALLSIZEWIDTH,true,&pPoolItem)==SFX_ITEM_SET) {
+ if (rAttr.GetItemState(SDRATTR_ALLSIZEWIDTH,true,&pPoolItem)==SfxItemState::SET) {
nAllWdt=((const SdrAllSizeWidthItem*)pPoolItem)->GetValue();
bAllWdt=true; bDoIt=true;
}
- if (rAttr.GetItemState(SDRATTR_ALLSIZEHEIGHT,true,&pPoolItem)==SFX_ITEM_SET) {
+ if (rAttr.GetItemState(SDRATTR_ALLSIZEHEIGHT,true,&pPoolItem)==SfxItemState::SET) {
nAllHgt=((const SdrAllSizeHeightItem*)pPoolItem)->GetValue();
bAllHgt=true; bDoIt=true;
}
@@ -754,23 +754,23 @@ void SdrEditView::SetNotPersistAttrToMarked(const SfxItemSet& rAttr, bool /*bRep
if (bAllHgt) aRect.Bottom()=aAllSnapRect.Top()+nAllHgt;
SetMarkedObjRect(aRect);
}
- if (rAttr.GetItemState(SDRATTR_RESIZEXALL,true,&pPoolItem)==SFX_ITEM_SET) {
+ if (rAttr.GetItemState(SDRATTR_RESIZEXALL,true,&pPoolItem)==SfxItemState::SET) {
Fraction aXFact=((const SdrResizeXAllItem*)pPoolItem)->GetValue();
ResizeMarkedObj(aAllSnapRect.TopLeft(),aXFact,Fraction(1,1));
}
- if (rAttr.GetItemState(SDRATTR_RESIZEYALL,true,&pPoolItem)==SFX_ITEM_SET) {
+ if (rAttr.GetItemState(SDRATTR_RESIZEYALL,true,&pPoolItem)==SfxItemState::SET) {
Fraction aYFact=((const SdrResizeYAllItem*)pPoolItem)->GetValue();
ResizeMarkedObj(aAllSnapRect.TopLeft(),Fraction(1,1),aYFact);
}
- if (rAttr.GetItemState(SDRATTR_ROTATEALL,true,&pPoolItem)==SFX_ITEM_SET) {
+ if (rAttr.GetItemState(SDRATTR_ROTATEALL,true,&pPoolItem)==SfxItemState::SET) {
long nAngle=((const SdrRotateAllItem*)pPoolItem)->GetValue();
RotateMarkedObj(aAllSnapRect.Center(),nAngle);
}
- if (rAttr.GetItemState(SDRATTR_HORZSHEARALL,true,&pPoolItem)==SFX_ITEM_SET) {
+ if (rAttr.GetItemState(SDRATTR_HORZSHEARALL,true,&pPoolItem)==SfxItemState::SET) {
long nAngle=((const SdrHorzShearAllItem*)pPoolItem)->GetValue();
ShearMarkedObj(aAllSnapRect.Center(),nAngle,false);
}
- if (rAttr.GetItemState(SDRATTR_VERTSHEARALL,true,&pPoolItem)==SFX_ITEM_SET) {
+ if (rAttr.GetItemState(SDRATTR_VERTSHEARALL,true,&pPoolItem)==SfxItemState::SET) {
long nAngle=((const SdrVertShearAllItem*)pPoolItem)->GetValue();
ShearMarkedObj(aAllSnapRect.Center(),nAngle,true);
}
@@ -937,12 +937,12 @@ void SdrEditView::MergeAttrFromMarked(SfxItemSet& rAttr, bool bOnlyHardAttr) con
{
if(!bOnlyHardAttr)
{
- if(SFX_ITEM_DONTCARE == rSet.GetItemState(nWhich, false))
+ if(SfxItemState::DONTCARE == rSet.GetItemState(nWhich, false))
rAttr.InvalidateItem(nWhich);
else
rAttr.MergeValue(rSet.Get(nWhich), true);
}
- else if(SFX_ITEM_SET == rSet.GetItemState(nWhich, false))
+ else if(SfxItemState::SET == rSet.GetItemState(nWhich, false))
{
const SfxPoolItem& rItem = rSet.Get(nWhich);
rAttr.MergeValue(rItem, true);
@@ -1008,7 +1008,7 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, bool bReplaceAll)
while(!bPossibleGeomChange && nWhich)
{
SfxItemState eState = rAttr.GetItemState(nWhich);
- if(eState == SFX_ITEM_SET)
+ if(eState == SfxItemState::SET)
{
if((nWhich >= SDRATTR_TEXT_MINFRAMEHEIGHT && nWhich <= SDRATTR_TEXT_CONTOURFRAME)
|| nWhich == SDRATTR_3DOBJ_PERCENT_DIAGONAL
@@ -1034,7 +1034,7 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, bool bReplaceAll)
const size_t nMarkAnz(GetMarkedObjectCount());
std::vector< E3DModifySceneSnapRectUpdater* > aUpdaters;
- // create ItemSet without SFX_ITEM_DONTCARE. Put()
+ // create ItemSet without SfxItemState::DONTCARE. Put()
// uses its second parameter (bInvalidAsDefault) to
// remove all such items to set them to default.
SfxItemSet aAttr(*rAttr.GetPool(), rAttr.GetRanges());
@@ -1044,7 +1044,7 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, bool bReplaceAll)
bool bResetAnimationTimer(false);
// check if LineWidth is part of the change
- const bool bLineWidthChange(SFX_ITEM_SET == aAttr.GetItemState(XATTR_LINEWIDTH));
+ const bool bLineWidthChange(SfxItemState::SET == aAttr.GetItemState(XATTR_LINEWIDTH));
sal_Int32 nNewLineWidth(0);
sal_Int32 nOldLineWidth(0);
@@ -1111,7 +1111,7 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, bool bReplaceAll)
if(nOldLineWidth != nNewLineWidth)
{
- if(SFX_ITEM_DONTCARE != rSet.GetItemState(XATTR_LINESTARTWIDTH))
+ if(SfxItemState::DONTCARE != rSet.GetItemState(XATTR_LINESTARTWIDTH))
{
const sal_Int32 nValAct(((const XLineStartWidthItem&)rSet.Get(XATTR_LINESTARTWIDTH)).GetValue());
const sal_Int32 nValNewStart(std::max((sal_Int32)0, nValAct + (((nNewLineWidth - nOldLineWidth) * 15) / 10)));
@@ -1119,7 +1119,7 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, bool bReplaceAll)
pObj->SetMergedItem(XLineStartWidthItem(nValNewStart));
}
- if(SFX_ITEM_DONTCARE != rSet.GetItemState(XATTR_LINEENDWIDTH))
+ if(SfxItemState::DONTCARE != rSet.GetItemState(XATTR_LINEENDWIDTH))
{
const sal_Int32 nValAct(((const XLineEndWidthItem&)rSet.Get(XATTR_LINEENDWIDTH)).GetValue());
const sal_Int32 nValNewEnd(std::max((sal_Int32)0, nValAct + (((nNewLineWidth - nOldLineWidth) * 15) / 10)));
@@ -1371,25 +1371,25 @@ SfxItemSet SdrEditView::GetGeoAttrFromMarked() const
SfxItemState eState=aMarkAttr.GetItemState(SDRATTR_TEXT_AUTOGROWWIDTH);
bool bAutoGrow=((SdrOnOffItem&)(aMarkAttr.Get(SDRATTR_TEXT_AUTOGROWWIDTH))).GetValue();
- if (eState==SFX_ITEM_DONTCARE) {
+ if (eState==SfxItemState::DONTCARE) {
aRetSet.InvalidateItem(SID_ATTR_TRANSFORM_AUTOWIDTH);
- } else if (eState==SFX_ITEM_SET) {
+ } else if (eState==SfxItemState::SET) {
aRetSet.Put(SfxBoolItem(SID_ATTR_TRANSFORM_AUTOWIDTH,bAutoGrow));
}
eState=aMarkAttr.GetItemState(SDRATTR_TEXT_AUTOGROWHEIGHT);
bAutoGrow=((SdrOnOffItem&)(aMarkAttr.Get(SDRATTR_TEXT_AUTOGROWHEIGHT))).GetValue();
- if (eState==SFX_ITEM_DONTCARE) {
+ if (eState==SfxItemState::DONTCARE) {
aRetSet.InvalidateItem(SID_ATTR_TRANSFORM_AUTOHEIGHT);
- } else if (eState==SFX_ITEM_SET) {
+ } else if (eState==SfxItemState::SET) {
aRetSet.Put(SfxBoolItem(SID_ATTR_TRANSFORM_AUTOHEIGHT,bAutoGrow));
}
eState=aMarkAttr.GetItemState(SDRATTR_ECKENRADIUS);
long nRadius=((SdrMetricItem&)(aMarkAttr.Get(SDRATTR_ECKENRADIUS))).GetValue();
- if (eState==SFX_ITEM_DONTCARE) {
+ if (eState==SfxItemState::DONTCARE) {
aRetSet.InvalidateItem(SDRATTR_ECKENRADIUS);
- } else if (eState==SFX_ITEM_SET) {
+ } else if (eState==SfxItemState::SET) {
aRetSet.Put(makeSdrEckenradiusItem(nRadius));
}
@@ -1512,21 +1512,21 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr)
const SfxPoolItem* pPoolItem=NULL;
// position
- if (SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_POS_X,true,&pPoolItem)) {
+ if (SfxItemState::SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_POS_X,true,&pPoolItem)) {
nPosDX=((const SfxInt32Item*)pPoolItem)->GetValue()-aRect.Left();
bChgPos=true;
}
- if (SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_POS_Y,true,&pPoolItem)){
+ if (SfxItemState::SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_POS_Y,true,&pPoolItem)){
nPosDY=((const SfxInt32Item*)pPoolItem)->GetValue()-aRect.Top();
bChgPos=true;
}
// size
- if (SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_WIDTH,true,&pPoolItem)) {
+ if (SfxItemState::SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_WIDTH,true,&pPoolItem)) {
nSizX=((const SfxUInt32Item*)pPoolItem)->GetValue();
bChgSiz=true;
bChgWdh=true;
}
- if (SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_HEIGHT,true,&pPoolItem)) {
+ if (SfxItemState::SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_HEIGHT,true,&pPoolItem)) {
nSizY=((const SfxUInt32Item*)pPoolItem)->GetValue();
bChgSiz=true;
bChgHgt=true;
@@ -1536,21 +1536,21 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr)
}
// rotation
- if (SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_ANGLE,true,&pPoolItem)) {
+ if (SfxItemState::SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_ANGLE,true,&pPoolItem)) {
nRotateAngle=((const SfxInt32Item*)pPoolItem)->GetValue()-nOldRotateAngle;
bRotate = (nRotateAngle != 0);
}
// position rotation point x
- if(bRotate || SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_ROT_X, true ,&pPoolItem))
+ if(bRotate || SfxItemState::SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_ROT_X, true ,&pPoolItem))
nRotateX = ((const SfxInt32Item&)rAttr.Get(SID_ATTR_TRANSFORM_ROT_X)).GetValue();
// position rotation point y
- if(bRotate || SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_ROT_Y, true ,&pPoolItem))
+ if(bRotate || SfxItemState::SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_ROT_Y, true ,&pPoolItem))
nRotateY = ((const SfxInt32Item&)rAttr.Get(SID_ATTR_TRANSFORM_ROT_Y)).GetValue();
// shearing
- if (SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_SHEAR,true,&pPoolItem)) {
+ if (SfxItemState::SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_SHEAR,true,&pPoolItem)) {
long nNewShearAngle=((const SfxInt32Item*)pPoolItem)->GetValue();
if (nNewShearAngle>SDRMAXSHEAR) nNewShearAngle=SDRMAXSHEAR;
if (nNewShearAngle<-SDRMAXSHEAR) nNewShearAngle=-SDRMAXSHEAR;
@@ -1579,20 +1579,20 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr)
}
// AutoGrow
- if (SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_AUTOWIDTH,true,&pPoolItem)) {
+ if (SfxItemState::SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_AUTOWIDTH,true,&pPoolItem)) {
bool bAutoGrow=((const SfxBoolItem*)pPoolItem)->GetValue();
aSetAttr.Put(makeSdrTextAutoGrowWidthItem(bAutoGrow));
bSetAttr=true;
}
- if (SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_AUTOHEIGHT,true,&pPoolItem)) {
+ if (SfxItemState::SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_AUTOHEIGHT,true,&pPoolItem)) {
bool bAutoGrow=((const SfxBoolItem*)pPoolItem)->GetValue();
aSetAttr.Put(makeSdrTextAutoGrowHeightItem(bAutoGrow));
bSetAttr=true;
}
// corner radius
- if (bEdgeRadiusAllowed && SFX_ITEM_SET==rAttr.GetItemState(SDRATTR_ECKENRADIUS,true,&pPoolItem)) {
+ if (bEdgeRadiusAllowed && SfxItemState::SET==rAttr.GetItemState(SDRATTR_ECKENRADIUS,true,&pPoolItem)) {
long nRadius=((SdrMetricItem*)pPoolItem)->GetValue();
aSetAttr.Put(makeSdrEckenradiusItem(nRadius));
bSetAttr=true;
@@ -1670,7 +1670,7 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr)
}
// protect position
- if(SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_TRANSFORM_PROTECT_POS, true, &pPoolItem))
+ if(SfxItemState::SET == rAttr.GetItemState(SID_ATTR_TRANSFORM_PROTECT_POS, true, &pPoolItem))
{
const bool bProtPos(((const SfxBoolItem*)pPoolItem)->GetValue());
bool bChanged(false);
@@ -1711,7 +1711,7 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr)
if(!bMoveProtect)
{
// protect size
- if(SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_TRANSFORM_PROTECT_SIZE, true, &pPoolItem))
+ if(SfxItemState::SET == rAttr.GetItemState(SID_ATTR_TRANSFORM_PROTECT_SIZE, true, &pPoolItem))
{
const bool bProtSize(((const SfxBoolItem*)pPoolItem)->GetValue());
bool bChanged(false);
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index 6945d2f66aca..ebef27daece7 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -1564,7 +1564,7 @@ bool SdrObjEditView::SetAttributes(const SfxItemSet& rSet, bool bReplaceAll)
{
const SfxPoolItem* pItem;
SfxItemState eState=pSet->GetItemState(nWhich,false,&pItem);
- if (eState==SFX_ITEM_SET) aSet.Put(*pItem);
+ if (eState==SfxItemState::SET) aSet.Put(*pItem);
nWhich=aIter.NextWhich();
}
diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx
index e5e373ea3d1e..4911c00aacd9 100644
--- a/svx/source/svdraw/svdetc.cxx
+++ b/svx/source/svdraw/svdetc.cxx
@@ -485,7 +485,7 @@ bool SearchOutlinerItems(const SfxItemSet& rSet, bool bInklDefaults, bool* pbOnl
// in other cases only the set items are.
// Disabled and DontCare are regarded as holes in the Which range.
SfxItemState eState=rSet.GetItemState(nWhich);
- if ((eState==SFX_ITEM_DEFAULT && bInklDefaults) || eState==SFX_ITEM_SET) {
+ if ((eState==SfxItemState::DEFAULT && bInklDefaults) || eState==SfxItemState::SET) {
if (nWhich<EE_ITEMS_START || nWhich>EE_ITEMS_END) bOnly=false;
else bHas=true;
}
diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx
index 70e30e67dbfd..18f354a0f240 100644
--- a/svx/source/svdraw/svdibrow.cxx
+++ b/svx/source/svdraw/svdibrow.cxx
@@ -95,7 +95,7 @@ public:
public:
ImpItemListRow()
- : eState(SFX_ITEM_UNKNOWN),
+ : eState(SfxItemState::UNKNOWN),
nWhichId(0),
pType(NULL),
eItemType(ITEM_DONTKNOW),
@@ -320,12 +320,12 @@ OUString _SdrItemBrowserControl::GetCellText(long _nRow, sal_uInt16 _nColId) con
{
switch (pEntry->eState)
{
- case SFX_ITEM_UNKNOWN : sRet = "Unknown"; break;
- case SFX_ITEM_DISABLED: sRet = "Disabled"; break;
- case SFX_ITEM_DONTCARE: sRet = "DontCare"; break;
- case SFX_ITEM_SET : sRet = "Set"; break;
- case SFX_ITEM_DEFAULT : sRet = "Default"; break;
- case SFX_ITEM_READONLY: sRet = "ReadOnly"; break;
+ case SfxItemState::UNKNOWN : sRet = "Unknown"; break;
+ case SfxItemState::DISABLED: sRet = "Disabled"; break;
+ case SfxItemState::DONTCARE: sRet = "DontCare"; break;
+ case SfxItemState::SET : sRet = "Set"; break;
+ case SfxItemState::DEFAULT : sRet = "Default"; break;
+ case SfxItemState::READONLY: sRet = "ReadOnly"; break;
} // switch
} break;
case ITEMBROWSER_TYPECOL_ID: sRet = pEntry->GetItemTypeStr(); break;
@@ -589,10 +589,10 @@ void _SdrItemBrowserControl::ImpSetEntry(const ImpItemListRow& rEntry, sal_uIntP
bool ImpGetItem(const SfxItemSet& rSet, sal_uInt16 nWhich, const SfxPoolItem*& rpItem)
{
SfxItemState eState=rSet.GetItemState(nWhich,true,&rpItem);
- if (eState==SFX_ITEM_DEFAULT) {
+ if (eState==SfxItemState::DEFAULT) {
rpItem=&rSet.Get(nWhich);
}
- return (eState==SFX_ITEM_DEFAULT || eState==SFX_ITEM_SET) && rpItem!=NULL;
+ return (eState==SfxItemState::DEFAULT || eState==SfxItemState::SET) && rpItem!=NULL;
}
bool IsItemIneffective(sal_uInt16 nWhich, const SfxItemSet* pSet, sal_uInt16& rIndent)
@@ -922,10 +922,10 @@ void _SdrItemBrowserControl::SetAttributes(const SfxItemSet* pSet, const SfxItem
SfxItemState eState=pSet->GetItemState(nWhich);
if (p2ndSet!=NULL) {
SfxItemState e2ndState=p2ndSet->GetItemState(nWhich);
- if (eState==SFX_ITEM_DEFAULT) eState=SFX_ITEM_DISABLED;
- else if (e2ndState==SFX_ITEM_DEFAULT) eState=SFX_ITEM_DEFAULT;
+ if (eState==SfxItemState::DEFAULT) eState=SfxItemState::DISABLED;
+ else if (e2ndState==SfxItemState::DEFAULT) eState=SfxItemState::DEFAULT;
}
- if (eState!=SFX_ITEM_DISABLED) {
+ if (eState!=SfxItemState::DISABLED) {
const SfxPoolItem& rItem=pSet->Get(nWhich);
sal_uInt16 nIndent=0;
if (!HAS_BASE(SfxVoidItem,&rItem) && !HAS_BASE(SfxSetItem,&rItem) && (!IsItemIneffective(nWhich,pSet,nIndent) || bDontHideIneffectiveItems)) {
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 4e7d9313738a..ce465ce52fe0 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -1814,7 +1814,7 @@ void SdrModel::MigrateItemSet( const SfxItemSet* pSourceSet, SfxItemSet* pDestSe
while(nWhich)
{
- if(SFX_ITEM_SET == pSourceSet->GetItemState(nWhich, false, &pPoolItem))
+ if(SfxItemState::SET == pSourceSet->GetItemState(nWhich, false, &pPoolItem))
{
const SfxPoolItem* pResultItem = NULL;
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index 8b066f0ab6e8..890a418f6817 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -928,7 +928,7 @@ void SdrMarkView::AddDragModeHdl(SdrDragMode eMode)
SdrModel* pModel = GetModel();
const SfxItemSet& rSet = pObj->GetMergedItemSet();
- if(SFX_ITEM_SET != rSet.GetItemState(XATTR_FILLFLOATTRANSPARENCE, false))
+ if(SfxItemState::SET != rSet.GetItemState(XATTR_FILLFLOATTRANSPARENCE, false))
{
// add this item, it's not yet there
XFillFloatTransparenceItem aNewItem(
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index ab285d42ddf5..76539b6f064b 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -2124,41 +2124,41 @@ void SdrObject::NbcApplyNotPersistAttr(const SfxItemSet& rAttr)
Point aRef1(rSnap.Center());
Point aRef2(aRef1); aRef2.Y()++;
const SfxPoolItem *pPoolItem=NULL;
- if (rAttr.GetItemState(SDRATTR_TRANSFORMREF1X,true,&pPoolItem)==SFX_ITEM_SET) {
+ if (rAttr.GetItemState(SDRATTR_TRANSFORMREF1X,true,&pPoolItem)==SfxItemState::SET) {
aRef1.X()=((const SdrTransformRef1XItem*)pPoolItem)->GetValue();
}
- if (rAttr.GetItemState(SDRATTR_TRANSFORMREF1Y,true,&pPoolItem)==SFX_ITEM_SET) {
+ if (rAttr.GetItemState(SDRATTR_TRANSFORMREF1Y,true,&pPoolItem)==SfxItemState::SET) {
aRef1.Y()=((const SdrTransformRef1YItem*)pPoolItem)->GetValue();
}
- if (rAttr.GetItemState(SDRATTR_TRANSFORMREF2X,true,&pPoolItem)==SFX_ITEM_SET) {
+ if (rAttr.GetItemState(SDRATTR_TRANSFORMREF2X,true,&pPoolItem)==SfxItemState::SET) {
aRef2.X()=((const SdrTransformRef2XItem*)pPoolItem)->GetValue();
}
- if (rAttr.GetItemState(SDRATTR_TRANSFORMREF2Y,true,&pPoolItem)==SFX_ITEM_SET) {
+ if (rAttr.GetItemState(SDRATTR_TRANSFORMREF2Y,true,&pPoolItem)==SfxItemState::SET) {
aRef2.Y()=((const SdrTransformRef2YItem*)pPoolItem)->GetValue();
}
Rectangle aNewSnap(rSnap);
- if (rAttr.GetItemState(SDRATTR_MOVEX,true,&pPoolItem)==SFX_ITEM_SET) {
+ if (rAttr.GetItemState(SDRATTR_MOVEX,true,&pPoolItem)==SfxItemState::SET) {
long n=((const SdrMoveXItem*)pPoolItem)->GetValue();
aNewSnap.Move(n,0);
}
- if (rAttr.GetItemState(SDRATTR_MOVEY,true,&pPoolItem)==SFX_ITEM_SET) {
+ if (rAttr.GetItemState(SDRATTR_MOVEY,true,&pPoolItem)==SfxItemState::SET) {
long n=((const SdrMoveYItem*)pPoolItem)->GetValue();
aNewSnap.Move(0,n);
}
- if (rAttr.GetItemState(SDRATTR_ONEPOSITIONX,true,&pPoolItem)==SFX_ITEM_SET) {
+ if (rAttr.GetItemState(SDRATTR_ONEPOSITIONX,true,&pPoolItem)==SfxItemState::SET) {
long n=((const SdrOnePositionXItem*)pPoolItem)->GetValue();
aNewSnap.Move(n-aNewSnap.Left(),0);
}
- if (rAttr.GetItemState(SDRATTR_ONEPOSITIONY,true,&pPoolItem)==SFX_ITEM_SET) {
+ if (rAttr.GetItemState(SDRATTR_ONEPOSITIONY,true,&pPoolItem)==SfxItemState::SET) {
long n=((const SdrOnePositionYItem*)pPoolItem)->GetValue();
aNewSnap.Move(0,n-aNewSnap.Top());
}
- if (rAttr.GetItemState(SDRATTR_ONESIZEWIDTH,true,&pPoolItem)==SFX_ITEM_SET) {
+ if (rAttr.GetItemState(SDRATTR_ONESIZEWIDTH,true,&pPoolItem)==SfxItemState::SET) {
long n=((const SdrOneSizeWidthItem*)pPoolItem)->GetValue();
aNewSnap.Right()=aNewSnap.Left()+n;
}
- if (rAttr.GetItemState(SDRATTR_ONESIZEHEIGHT,true,&pPoolItem)==SFX_ITEM_SET) {
+ if (rAttr.GetItemState(SDRATTR_ONESIZEHEIGHT,true,&pPoolItem)==SfxItemState::SET) {
long n=((const SdrOneSizeHeightItem*)pPoolItem)->GetValue();
aNewSnap.Bottom()=aNewSnap.Top()+n;
}
@@ -2170,7 +2170,7 @@ void SdrObject::NbcApplyNotPersistAttr(const SfxItemSet& rAttr)
}
}
- if (rAttr.GetItemState(SDRATTR_SHEARANGLE,true,&pPoolItem)==SFX_ITEM_SET) {
+ if (rAttr.GetItemState(SDRATTR_SHEARANGLE,true,&pPoolItem)==SfxItemState::SET) {
long n=((const SdrShearAngleItem*)pPoolItem)->GetValue();
n-=GetShearAngle();
if (n!=0) {
@@ -2178,7 +2178,7 @@ void SdrObject::NbcApplyNotPersistAttr(const SfxItemSet& rAttr)
NbcShear(aRef1,n,nTan,false);
}
}
- if (rAttr.GetItemState(SDRATTR_ROTATEANGLE,true,&pPoolItem)==SFX_ITEM_SET) {
+ if (rAttr.GetItemState(SDRATTR_ROTATEANGLE,true,&pPoolItem)==SfxItemState::SET) {
long n=((const SdrAngleItem*)pPoolItem)->GetValue();
n-=GetRotateAngle();
if (n!=0) {
@@ -2187,28 +2187,28 @@ void SdrObject::NbcApplyNotPersistAttr(const SfxItemSet& rAttr)
NbcRotate(aRef1,n,nSin,nCos);
}
}
- if (rAttr.GetItemState(SDRATTR_ROTATEONE,true,&pPoolItem)==SFX_ITEM_SET) {
+ if (rAttr.GetItemState(SDRATTR_ROTATEONE,true,&pPoolItem)==SfxItemState::SET) {
long n=((const SdrRotateOneItem*)pPoolItem)->GetValue();
double nSin=sin(n*nPi180);
double nCos=cos(n*nPi180);
NbcRotate(aRef1,n,nSin,nCos);
}
- if (rAttr.GetItemState(SDRATTR_HORZSHEARONE,true,&pPoolItem)==SFX_ITEM_SET) {
+ if (rAttr.GetItemState(SDRATTR_HORZSHEARONE,true,&pPoolItem)==SfxItemState::SET) {
long n=((const SdrHorzShearOneItem*)pPoolItem)->GetValue();
double nTan=tan(n*nPi180);
NbcShear(aRef1,n,nTan,false);
}
- if (rAttr.GetItemState(SDRATTR_VERTSHEARONE,true,&pPoolItem)==SFX_ITEM_SET) {
+ if (rAttr.GetItemState(SDRATTR_VERTSHEARONE,true,&pPoolItem)==SfxItemState::SET) {
long n=((const SdrVertShearOneItem*)pPoolItem)->GetValue();
double nTan=tan(n*nPi180);
NbcShear(aRef1,n,nTan,true);
}
- if (rAttr.GetItemState(SDRATTR_OBJMOVEPROTECT,true,&pPoolItem)==SFX_ITEM_SET) {
+ if (rAttr.GetItemState(SDRATTR_OBJMOVEPROTECT,true,&pPoolItem)==SfxItemState::SET) {
bool b=((const SdrYesNoItem*)pPoolItem)->GetValue();
SetMoveProtect(b);
}
- if (rAttr.GetItemState(SDRATTR_OBJSIZEPROTECT,true,&pPoolItem)==SFX_ITEM_SET) {
+ if (rAttr.GetItemState(SDRATTR_OBJSIZEPROTECT,true,&pPoolItem)==SfxItemState::SET) {
bool b=((const SdrYesNoItem*)pPoolItem)->GetValue();
SetResizeProtect(b);
}
@@ -2217,21 +2217,21 @@ void SdrObject::NbcApplyNotPersistAttr(const SfxItemSet& rAttr)
if( IsMoveProtect() )
SetResizeProtect( true );
- if (rAttr.GetItemState(SDRATTR_OBJPRINTABLE,true,&pPoolItem)==SFX_ITEM_SET) {
+ if (rAttr.GetItemState(SDRATTR_OBJPRINTABLE,true,&pPoolItem)==SfxItemState::SET) {
bool b=((const SdrObjPrintableItem*)pPoolItem)->GetValue();
SetPrintable(b);
}
- if (rAttr.GetItemState(SDRATTR_OBJVISIBLE,true,&pPoolItem)==SFX_ITEM_SET) {
+ if (rAttr.GetItemState(SDRATTR_OBJVISIBLE,true,&pPoolItem)==SfxItemState::SET) {
bool b=((const SdrObjVisibleItem*)pPoolItem)->GetValue();
SetVisible(b);
}
SdrLayerID nLayer=SDRLAYER_NOTFOUND;
- if (rAttr.GetItemState(SDRATTR_LAYERID,true,&pPoolItem)==SFX_ITEM_SET) {
+ if (rAttr.GetItemState(SDRATTR_LAYERID,true,&pPoolItem)==SfxItemState::SET) {
nLayer=((const SdrLayerIdItem*)pPoolItem)->GetValue();
}
- if (rAttr.GetItemState(SDRATTR_LAYERNAME,true,&pPoolItem)==SFX_ITEM_SET && pModel!=NULL) {
+ if (rAttr.GetItemState(SDRATTR_LAYERNAME,true,&pPoolItem)==SfxItemState::SET && pModel!=NULL) {
OUString aLayerName=((const SdrLayerNameItem*)pPoolItem)->GetValue();
const SdrLayerAdmin* pLayAd=pPage!=NULL ? &pPage->GetLayerAdmin() : pModel!=NULL ? &pModel->GetLayerAdmin() : NULL;
if (pLayAd!=NULL) {
@@ -2246,16 +2246,16 @@ void SdrObject::NbcApplyNotPersistAttr(const SfxItemSet& rAttr)
NbcSetLayer(nLayer);
}
- if (rAttr.GetItemState(SDRATTR_OBJECTNAME,true,&pPoolItem)==SFX_ITEM_SET) {
+ if (rAttr.GetItemState(SDRATTR_OBJECTNAME,true,&pPoolItem)==SfxItemState::SET) {
OUString aName=((const SfxStringItem*)pPoolItem)->GetValue();
SetName(aName);
}
Rectangle aNewLogic(rLogic);
- if (rAttr.GetItemState(SDRATTR_LOGICSIZEWIDTH,true,&pPoolItem)==SFX_ITEM_SET) {
+ if (rAttr.GetItemState(SDRATTR_LOGICSIZEWIDTH,true,&pPoolItem)==SfxItemState::SET) {
long n=((const SdrLogicSizeWidthItem*)pPoolItem)->GetValue();
aNewLogic.Right()=aNewLogic.Left()+n;
}
- if (rAttr.GetItemState(SDRATTR_LOGICSIZEHEIGHT,true,&pPoolItem)==SFX_ITEM_SET) {
+ if (rAttr.GetItemState(SDRATTR_LOGICSIZEHEIGHT,true,&pPoolItem)==SfxItemState::SET) {
long n=((const SdrLogicSizeHeightItem*)pPoolItem)->GetValue();
aNewLogic.Bottom()=aNewLogic.Top()+n;
}
@@ -2264,10 +2264,10 @@ void SdrObject::NbcApplyNotPersistAttr(const SfxItemSet& rAttr)
}
Fraction aResizeX(1,1);
Fraction aResizeY(1,1);
- if (rAttr.GetItemState(SDRATTR_RESIZEXONE,true,&pPoolItem)==SFX_ITEM_SET) {
+ if (rAttr.GetItemState(SDRATTR_RESIZEXONE,true,&pPoolItem)==SfxItemState::SET) {
aResizeX*=((const SdrResizeXOneItem*)pPoolItem)->GetValue();
}
- if (rAttr.GetItemState(SDRATTR_RESIZEYONE,true,&pPoolItem)==SFX_ITEM_SET) {
+ if (rAttr.GetItemState(SDRATTR_RESIZEYONE,true,&pPoolItem)==SfxItemState::SET) {
aResizeY*=((const SdrResizeYOneItem*)pPoolItem)->GetValue();
}
if (aResizeX!=Fraction(1,1) || aResizeY!=Fraction(1,1)) {
diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx
index bc790703b41f..8c2070d120f1 100644
--- a/svx/source/svdraw/svdpntv.cxx
+++ b/svx/source/svdraw/svdpntv.cxx
@@ -1000,7 +1000,7 @@ void SdrPaintView::SetNotPersistDefaultAttr(const SfxItemSet& rAttr, bool /*bRep
// bReplaceAll has no effect here at all.
bool bMeasure=ISA(SdrView) && ((SdrView*)this)->IsMeasureTool();
const SfxPoolItem *pPoolItem=NULL;
- if (rAttr.GetItemState(SDRATTR_LAYERID,true,&pPoolItem)==SFX_ITEM_SET) {
+ if (rAttr.GetItemState(SDRATTR_LAYERID,true,&pPoolItem)==SfxItemState::SET) {
SdrLayerID nLayerId=((const SdrLayerIdItem*)pPoolItem)->GetValue();
const SdrLayer* pLayer=pMod->GetLayerAdmin().GetLayerPerID(nLayerId);
if (pLayer!=NULL) {
@@ -1008,7 +1008,7 @@ void SdrPaintView::SetNotPersistDefaultAttr(const SfxItemSet& rAttr, bool /*bRep
else aAktLayer=pLayer->GetName();
}
}
- if (rAttr.GetItemState(SDRATTR_LAYERNAME,true,&pPoolItem)==SFX_ITEM_SET) {
+ if (rAttr.GetItemState(SDRATTR_LAYERNAME,true,&pPoolItem)==SfxItemState::SET) {
if (bMeasure) aMeasureLayer=((const SdrLayerNameItem*)pPoolItem)->GetValue();
else aAktLayer=((const SdrLayerNameItem*)pPoolItem)->GetValue();
}
@@ -1068,7 +1068,7 @@ void SdrPaintView::SetDefaultStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRe
SfxWhichIter aIter(pStyleSheet->GetItemSet());
sal_uInt16 nWhich=aIter.FirstWhich();
while (nWhich!=0) {
- if (pStyleSheet->GetItemSet().GetItemState(nWhich,true)==SFX_ITEM_SET) {
+ if (pStyleSheet->GetItemSet().GetItemState(nWhich,true)==SfxItemState::SET) {
aDefaultAttr.ClearItem(nWhich);
}
nWhich=aIter.NextWhich();
diff --git a/svx/source/svdraw/svdtext.cxx b/svx/source/svdraw/svdtext.cxx
index 0dc5081a0165..ed99ae31008f 100644
--- a/svx/source/svdraw/svdtext.cxx
+++ b/svx/source/svdraw/svdtext.cxx
@@ -127,7 +127,7 @@ void SdrText::SetModel( SdrModel* pNewModel )
if( mpOutlinerParaObject && pOldModel!=NULL && pNewModel!=NULL)
{
- bool bHgtSet = GetObjectItemSet().GetItemState(EE_CHAR_FONTHEIGHT, true) == SFX_ITEM_SET;
+ bool bHgtSet = GetObjectItemSet().GetItemState(EE_CHAR_FONTHEIGHT, true) == SfxItemState::SET;
MapUnit aOldUnit(pOldModel->GetScaleUnit());
MapUnit aNewUnit(pNewModel->GetScaleUnit());
diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx
index 05e8af3fea04..e8a84e52de82 100644
--- a/svx/source/svdraw/svdundo.cxx
+++ b/svx/source/svdraw/svdundo.cxx
@@ -391,7 +391,7 @@ void SdrUndoAttrObj::Undo()
while(nWhich)
{
- if(SFX_ITEM_SET != pUndoSet->GetItemState(nWhich, false))
+ if(SfxItemState::SET != pUndoSet->GetItemState(nWhich, false))
{
pObj->ClearMergedItem(nWhich);
}
@@ -468,7 +468,7 @@ void SdrUndoAttrObj::Redo()
while(nWhich)
{
- if(SFX_ITEM_SET != pRedoSet->GetItemState(nWhich, false))
+ if(SfxItemState::SET != pRedoSet->GetItemState(nWhich, false))
{
pObj->ClearMergedItem(nWhich);
}