summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-08-04 19:22:55 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-08-04 19:22:55 +0200
commit151fbebf8ced85ee8582fe1ad8a8176e061845a6 (patch)
tree1615fcdaf075969b08302c5fb33e0f10d31d4d1e /svx
parent013744a5b475e151ca0918565fb369e22dfbc1db (diff)
Consistency around SdrOnOffItem in svx/sdtagitm.hxx
...similar to what has been done for svx/sdtmfitm.hxx in 6a2ea81ca1622d2c2ad55bea8ddc28167fcc2794 "Remove unused ctors" and 68969cc61adecac481ae9656978ef952f435b310 "Consistency around SdrMetricItem." Change-Id: I6d8b3709d6d55bd6958d38f262141c43779dfdcc
Diffstat (limited to 'svx')
-rw-r--r--svx/source/sdr/properties/customshapeproperties.cxx2
-rw-r--r--svx/source/svdraw/svdattr.cxx4
-rw-r--r--svx/source/svdraw/svddrgmt.cxx6
-rw-r--r--svx/source/svdraw/svdedtv1.cxx8
-rw-r--r--svx/source/svdraw/svdfmtf.cxx4
-rw-r--r--svx/source/svdraw/svdibrow.cxx4
-rw-r--r--svx/source/svdraw/svdoashp.cxx6
-rw-r--r--svx/source/svdraw/svdotext.cxx16
8 files changed, 25 insertions, 25 deletions
diff --git a/svx/source/sdr/properties/customshapeproperties.cxx b/svx/source/sdr/properties/customshapeproperties.cxx
index d36d33c7d8ad..97d49210fa98 100644
--- a/svx/source/sdr/properties/customshapeproperties.cxx
+++ b/svx/source/sdr/properties/customshapeproperties.cxx
@@ -39,7 +39,7 @@ namespace sdr
// change TextFrame flag when bResizeShapeToFitText changes (which is mapped
// on the item SDRATTR_TEXT_AUTOGROWHEIGHT for custom shapes, argh)
- rObj.bTextFrame = static_cast< const SdrTextAutoGrowHeightItem& >(GetObjectItemSet().Get(SDRATTR_TEXT_AUTOGROWHEIGHT)).GetValue();
+ rObj.bTextFrame = static_cast< const SdrOnOffItem& >(GetObjectItemSet().Get(SDRATTR_TEXT_AUTOGROWHEIGHT)).GetValue();
// check if it did change
if(rObj.bTextFrame != bOld)
diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx
index 3118a3160d88..83460b717f69 100644
--- a/svx/source/svdraw/svdattr.cxx
+++ b/svx/source/svdraw/svdattr.cxx
@@ -147,7 +147,7 @@ SdrItemPool::SdrItemPool(
mppLocalPoolDefaults[SDRATTR_CAPTIONFITLINELEN-SDRATTR_START]=new SdrCaptionFitLineLenItem;
mppLocalPoolDefaults[SDRATTR_ECKENRADIUS -SDRATTR_START]=new SdrEckenradiusItem;
mppLocalPoolDefaults[SDRATTR_TEXT_MINFRAMEHEIGHT -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_MINFRAMEHEIGHT, 0);
- mppLocalPoolDefaults[SDRATTR_TEXT_AUTOGROWHEIGHT -SDRATTR_START]=new SdrTextAutoGrowHeightItem;
+ mppLocalPoolDefaults[SDRATTR_TEXT_AUTOGROWHEIGHT -SDRATTR_START]=new SdrOnOffItem(SDRATTR_TEXT_AUTOGROWHEIGHT, true);
mppLocalPoolDefaults[SDRATTR_TEXT_FITTOSIZE -SDRATTR_START]=new SdrTextFitToSizeTypeItem;
mppLocalPoolDefaults[SDRATTR_TEXT_LEFTDIST -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_LEFTDIST, 0);
mppLocalPoolDefaults[SDRATTR_TEXT_RIGHTDIST -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_RIGHTDIST, 0);
@@ -157,7 +157,7 @@ SdrItemPool::SdrItemPool(
mppLocalPoolDefaults[SDRATTR_TEXT_MAXFRAMEHEIGHT -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_MAXFRAMEHEIGHT, 0);
mppLocalPoolDefaults[SDRATTR_TEXT_MINFRAMEWIDTH -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_MINFRAMEWIDTH, 0);
mppLocalPoolDefaults[SDRATTR_TEXT_MAXFRAMEWIDTH -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_MAXFRAMEWIDTH, 0);
- mppLocalPoolDefaults[SDRATTR_TEXT_AUTOGROWWIDTH -SDRATTR_START]=new SdrTextAutoGrowWidthItem;
+ mppLocalPoolDefaults[SDRATTR_TEXT_AUTOGROWWIDTH -SDRATTR_START]=new SdrOnOffItem(SDRATTR_TEXT_AUTOGROWWIDTH, false);
mppLocalPoolDefaults[SDRATTR_TEXT_HORZADJUST -SDRATTR_START]=new SdrTextHorzAdjustItem;
mppLocalPoolDefaults[SDRATTR_TEXT_ANIKIND -SDRATTR_START]=new SdrTextAniKindItem;
mppLocalPoolDefaults[SDRATTR_TEXT_ANIDIRECTION -SDRATTR_START]=new SdrTextAniDirectionItem;
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx
index 04d2c59a87f3..0952a23e1989 100644
--- a/svx/source/svdraw/svddrgmt.cxx
+++ b/svx/source/svdraw/svddrgmt.cxx
@@ -1355,12 +1355,12 @@ void SdrDragObjOwn::MoveSdrDrag(const Point& rNoSnapPnt)
// also this (pretty indirect) property change is possible. If it gets
// changed, it needs to be copied to the original since nothing will
// happen when it only changes in the drag clone
- const bool bOldAutoGrowWidth(((SdrTextAutoGrowWidthItem&)pObj->GetMergedItem(SDRATTR_TEXT_AUTOGROWWIDTH)).GetValue());
- const bool bNewAutoGrowWidth(((SdrTextAutoGrowWidthItem&)mpClone->GetMergedItem(SDRATTR_TEXT_AUTOGROWWIDTH)).GetValue());
+ const bool bOldAutoGrowWidth(((SdrOnOffItem&)pObj->GetMergedItem(SDRATTR_TEXT_AUTOGROWWIDTH)).GetValue());
+ const bool bNewAutoGrowWidth(((SdrOnOffItem&)mpClone->GetMergedItem(SDRATTR_TEXT_AUTOGROWWIDTH)).GetValue());
if(bOldAutoGrowWidth != bNewAutoGrowWidth)
{
- GetDragObj()->SetMergedItem(SdrTextAutoGrowWidthItem(bNewAutoGrowWidth));
+ GetDragObj()->SetMergedItem(makeSdrTextAutoGrowWidthItem(bNewAutoGrowWidth));
}
}
diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx
index 7945d2cb69be..d8a96d92e500 100644
--- a/svx/source/svdraw/svdedtv1.cxx
+++ b/svx/source/svdraw/svdedtv1.cxx
@@ -1370,7 +1370,7 @@ SfxItemSet SdrEditView::GetGeoAttrFromMarked() const
}
SfxItemState eState=aMarkAttr.GetItemState(SDRATTR_TEXT_AUTOGROWWIDTH);
- bool bAutoGrow=((SdrTextAutoGrowWidthItem&)(aMarkAttr.Get(SDRATTR_TEXT_AUTOGROWWIDTH))).GetValue();
+ bool bAutoGrow=((SdrOnOffItem&)(aMarkAttr.Get(SDRATTR_TEXT_AUTOGROWWIDTH))).GetValue();
if (eState==SFX_ITEM_DONTCARE) {
aRetSet.InvalidateItem(SID_ATTR_TRANSFORM_AUTOWIDTH);
} else if (eState==SFX_ITEM_SET) {
@@ -1378,7 +1378,7 @@ SfxItemSet SdrEditView::GetGeoAttrFromMarked() const
}
eState=aMarkAttr.GetItemState(SDRATTR_TEXT_AUTOGROWHEIGHT);
- bAutoGrow=((SdrTextAutoGrowHeightItem&)(aMarkAttr.Get(SDRATTR_TEXT_AUTOGROWHEIGHT))).GetValue();
+ bAutoGrow=((SdrOnOffItem&)(aMarkAttr.Get(SDRATTR_TEXT_AUTOGROWHEIGHT))).GetValue();
if (eState==SFX_ITEM_DONTCARE) {
aRetSet.InvalidateItem(SID_ATTR_TRANSFORM_AUTOHEIGHT);
} else if (eState==SFX_ITEM_SET) {
@@ -1581,13 +1581,13 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr)
// AutoGrow
if (SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_AUTOWIDTH,true,&pPoolItem)) {
bool bAutoGrow=((const SfxBoolItem*)pPoolItem)->GetValue();
- aSetAttr.Put(SdrTextAutoGrowWidthItem(bAutoGrow));
+ aSetAttr.Put(makeSdrTextAutoGrowWidthItem(bAutoGrow));
bSetAttr=true;
}
if (SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_AUTOHEIGHT,true,&pPoolItem)) {
bool bAutoGrow=((const SfxBoolItem*)pPoolItem)->GetValue();
- aSetAttr.Put(SdrTextAutoGrowHeightItem(bAutoGrow));
+ aSetAttr.Put(makeSdrTextAutoGrowHeightItem(bAutoGrow));
bSetAttr=true;
}
diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx
index e7e28d692c02..e7cbae2d0edd 100644
--- a/svx/source/svdraw/svdfmtf.cxx
+++ b/svx/source/svdraw/svdfmtf.cxx
@@ -1028,13 +1028,13 @@ void ImpSdrGDIMetaFileImport::ImportText( const Point& rPos, const OUString& rSt
if ( aFnt.GetWidth() || ( rAct.GetType() == META_STRETCHTEXT_ACTION ) )
{
pText->ClearMergedItem( SDRATTR_TEXT_AUTOGROWWIDTH );
- pText->SetMergedItem( SdrTextAutoGrowHeightItem( false ) );
+ pText->SetMergedItem( makeSdrTextAutoGrowHeightItem( false ) );
// don't let the margins eat the space needed for the text
pText->SetMergedItem( SdrTextFitToSizeTypeItem( SDRTEXTFIT_ALLLINES ) );
}
else
{
- pText->SetMergedItem( SdrTextAutoGrowWidthItem( true ) );
+ pText->SetMergedItem( makeSdrTextAutoGrowWidthItem( true ) );
}
pText->SetModel(mpModel);
diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx
index 40ca0d9f212a..05de58c280bd 100644
--- a/svx/source/svdraw/svdibrow.cxx
+++ b/svx/source/svdraw/svdibrow.cxx
@@ -789,7 +789,7 @@ bool IsItemIneffective(sal_uInt16 nWhich, const SfxItemSet* pSet, sal_uInt16& rI
case SDRATTR_TEXT_MAXFRAMEHEIGHT: {
rIndent=1;
if (ImpGetItem(*pSet,SDRATTR_TEXT_AUTOGROWHEIGHT,pItem)) {
- bool bAutoGrow=((const SdrTextAutoGrowHeightItem*)pItem)->GetValue();
+ bool bAutoGrow=((const SdrOnOffItem*)pItem)->GetValue();
if (!bAutoGrow) return true;
}
} break;
@@ -797,7 +797,7 @@ bool IsItemIneffective(sal_uInt16 nWhich, const SfxItemSet* pSet, sal_uInt16& rI
case SDRATTR_TEXT_MAXFRAMEWIDTH: {
rIndent=1;
if (ImpGetItem(*pSet,SDRATTR_TEXT_AUTOGROWWIDTH,pItem)) {
- bool bAutoGrow=((const SdrTextAutoGrowWidthItem*)pItem)->GetValue();
+ bool bAutoGrow=((const SdrOnOffItem*)pItem)->GetValue();
if (!bAutoGrow) return true;
}
} break;
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index f6fab1311c43..177771473fe7 100644
--- a/svx/source/svdraw/svdoashp.cxx
+++ b/svx/source/svdraw/svdoashp.cxx
@@ -1445,7 +1445,7 @@ void SdrObjCustomShape::AdaptTextMinSize()
{
if(!pModel || !pModel->IsPasteResize())
{
- const bool bResizeShapeToFitText(static_cast< const SdrTextAutoGrowHeightItem& >(GetObjectItem(SDRATTR_TEXT_AUTOGROWHEIGHT)).GetValue());
+ const bool bResizeShapeToFitText(static_cast< const SdrOnOffItem& >(GetObjectItem(SDRATTR_TEXT_AUTOGROWHEIGHT)).GetValue());
SfxItemSet aSet(
*GetObjectItemSet().GetPool(),
SDRATTR_TEXT_MINFRAMEHEIGHT, SDRATTR_TEXT_AUTOGROWHEIGHT,
@@ -2239,7 +2239,7 @@ basegfx::B2DPolyPolygon SdrObjCustomShape::TakeCreatePoly(const SdrDragStat& /*r
bool SdrObjCustomShape::IsAutoGrowHeight() const
{
const SfxItemSet& rSet = GetMergedItemSet();
- bool bIsAutoGrowHeight = ((SdrTextAutoGrowHeightItem&)(rSet.Get(SDRATTR_TEXT_AUTOGROWHEIGHT))).GetValue();
+ bool bIsAutoGrowHeight = ((SdrOnOffItem&)(rSet.Get(SDRATTR_TEXT_AUTOGROWHEIGHT))).GetValue();
if ( bIsAutoGrowHeight && IsVerticalWriting() )
bIsAutoGrowHeight = !((SdrTextWordWrapItem&)(rSet.Get(SDRATTR_TEXT_WORDWRAP))).GetValue();
return bIsAutoGrowHeight;
@@ -2247,7 +2247,7 @@ bool SdrObjCustomShape::IsAutoGrowHeight() const
bool SdrObjCustomShape::IsAutoGrowWidth() const
{
const SfxItemSet& rSet = GetMergedItemSet();
- bool bIsAutoGrowWidth = ((SdrTextAutoGrowHeightItem&)(rSet.Get(SDRATTR_TEXT_AUTOGROWHEIGHT))).GetValue();
+ bool bIsAutoGrowWidth = ((SdrOnOffItem&)(rSet.Get(SDRATTR_TEXT_AUTOGROWHEIGHT))).GetValue();
if ( bIsAutoGrowWidth && !IsVerticalWriting() )
bIsAutoGrowWidth = !((SdrTextWordWrapItem&)(rSet.Get(SDRATTR_TEXT_WORDWRAP))).GetValue();
return bIsAutoGrowWidth;
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index f08a01726cca..225d0dd958bd 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -301,7 +301,7 @@ bool SdrTextObj::IsAutoGrowHeight() const
return false; // AutoGrow only together with TextFrames
const SfxItemSet& rSet = GetObjectItemSet();
- bool bRet = ((SdrTextAutoGrowHeightItem&)(rSet.Get(SDRATTR_TEXT_AUTOGROWHEIGHT))).GetValue();
+ bool bRet = ((SdrOnOffItem&)(rSet.Get(SDRATTR_TEXT_AUTOGROWHEIGHT))).GetValue();
if(bRet)
{
@@ -326,7 +326,7 @@ bool SdrTextObj::IsAutoGrowWidth() const
return false; // AutoGrow only together with TextFrames
const SfxItemSet& rSet = GetObjectItemSet();
- bool bRet = ((SdrTextAutoGrowWidthItem&)(rSet.Get(SDRATTR_TEXT_AUTOGROWWIDTH))).GetValue();
+ bool bRet = ((SdrOnOffItem&)(rSet.Get(SDRATTR_TEXT_AUTOGROWWIDTH))).GetValue();
bool bInEditMOde = IsInEditMode();
@@ -571,7 +571,7 @@ void SdrTextObj::AdaptTextMinSize()
if(!IsVerticalWriting() && bDisableAutoWidthOnDragging)
{
bDisableAutoWidthOnDragging = true;
- aSet.Put(SdrTextAutoGrowWidthItem(false));
+ aSet.Put(makeSdrTextAutoGrowWidthItem(false));
}
}
@@ -585,7 +585,7 @@ void SdrTextObj::AdaptTextMinSize()
if(IsVerticalWriting() && bDisableAutoWidthOnDragging)
{
bDisableAutoWidthOnDragging = false;
- aSet.Put(SdrTextAutoGrowHeightItem(false));
+ aSet.Put(makeSdrTextAutoGrowHeightItem(false));
}
}
@@ -1531,8 +1531,8 @@ void SdrTextObj::SetVerticalWriting(bool bVertical)
{
// get item settings
const SfxItemSet& rSet = GetObjectItemSet();
- bool bAutoGrowWidth = ((SdrTextAutoGrowWidthItem&)rSet.Get(SDRATTR_TEXT_AUTOGROWWIDTH)).GetValue();
- bool bAutoGrowHeight = ((SdrTextAutoGrowHeightItem&)rSet.Get(SDRATTR_TEXT_AUTOGROWHEIGHT)).GetValue();
+ bool bAutoGrowWidth = ((SdrOnOffItem&)rSet.Get(SDRATTR_TEXT_AUTOGROWWIDTH)).GetValue();
+ bool bAutoGrowHeight = ((SdrOnOffItem&)rSet.Get(SDRATTR_TEXT_AUTOGROWHEIGHT)).GetValue();
// Also exchange hor/ver adjust items
SdrTextHorzAdjust eHorz = ((SdrTextHorzAdjustItem&)(rSet.Get(SDRATTR_TEXT_HORZADJUST))).GetValue();
@@ -1550,8 +1550,8 @@ void SdrTextObj::SetVerticalWriting(bool bVertical)
0, 0);
aNewSet.Put(rSet);
- aNewSet.Put(SdrTextAutoGrowWidthItem(bAutoGrowHeight));
- aNewSet.Put(SdrTextAutoGrowHeightItem(bAutoGrowWidth));
+ aNewSet.Put(makeSdrTextAutoGrowWidthItem(bAutoGrowHeight));
+ aNewSet.Put(makeSdrTextAutoGrowHeightItem(bAutoGrowWidth));
// Exchange horz and vert adjusts
switch(eVert)