summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-07-31 15:57:12 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-07-31 15:57:12 +0200
commit68969cc61adecac481ae9656978ef952f435b310 (patch)
tree823f5a951bd5ebf9e465fae8297ddc220cb6a2d5 /sd/source
parent8b91280386f478f2e972e2aa71080f106783d762 (diff)
Consistency around SdrMetricItem
...where some instances of SDRATTR_TEXT_MINFRAMEHEIGHT etc. where SdrMetricItem while others where of trivial derived classes SdrTextMinFrameHeightItem etc., that appear to only existed for better-named constructors. Change-Id: If0af79fbb803275ed09fc7b950868c5de7d61615
Diffstat (limited to 'sd/source')
-rw-r--r--sd/source/core/sdpage.cxx8
-rw-r--r--sd/source/filter/ppt/pptin.cxx2
-rw-r--r--sd/source/ui/func/fuconrec.cxx4
-rw-r--r--sd/source/ui/func/futext.cxx20
4 files changed, 17 insertions, 17 deletions
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index a33bdccb4c85..351f544fff08 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -415,9 +415,9 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const Rec
SfxItemSet aTempAttr( ((SdDrawDocument*) pModel)->GetPool() );
if( bVertical )
- aTempAttr.Put( SdrTextMinFrameWidthItem( rRect.GetSize().Width() ) );
+ aTempAttr.Put( makeSdrTextMinFrameWidthItem( rRect.GetSize().Width() ) );
else
- aTempAttr.Put( SdrTextMinFrameHeightItem( rRect.GetSize().Height() ) );
+ aTempAttr.Put( makeSdrTextMinFrameHeightItem( rRect.GetSize().Height() ) );
if (mbMaster)
{
@@ -2238,7 +2238,7 @@ SdrObject* SdPage::InsertAutoLayoutShape( SdrObject* pObj, PresObjKind eObjKind,
{
// switch off AutoGrowHeight, set new MinHeight
SfxItemSet aTempAttr( ((SdDrawDocument*) pModel)->GetPool() );
- SdrTextMinFrameHeightItem aMinHeight( aRect.GetSize().Height() );
+ SdrMetricItem aMinHeight( makeSdrTextMinFrameHeightItem(aRect.GetSize().Height()) );
aTempAttr.Put( aMinHeight );
aTempAttr.Put( SdrTextAutoGrowHeightItem(false) );
pTextObject->SetMergedItemSet(aTempAttr);
@@ -2255,7 +2255,7 @@ SdrObject* SdPage::InsertAutoLayoutShape( SdrObject* pObj, PresObjKind eObjKind,
{
// switch off AutoGrowWidth , set new MinWidth
SfxItemSet aTempAttr( ((SdDrawDocument*) pModel)->GetPool() );
- SdrTextMinFrameWidthItem aMinWidth( aRect.GetSize().Width() );
+ SdrMetricItem aMinWidth( makeSdrTextMinFrameWidthItem(aRect.GetSize().Width()) );
aTempAttr.Put( aMinWidth );
aTempAttr.Put( SdrTextAutoGrowWidthItem(false) );
pTextObject->SetMergedItemSet(aTempAttr);
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index e5e637721535..d8263b50335e 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -2274,7 +2274,7 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
}
SfxItemSet aTempAttr( mpDoc->GetPool() );
- SdrTextMinFrameHeightItem aMinHeight( pText->GetLogicRect().GetSize().Height() );
+ SdrMetricItem aMinHeight( makeSdrTextMinFrameHeightItem(pText->GetLogicRect().GetSize().Height()) );
aTempAttr.Put( aMinHeight );
SdrTextAutoGrowHeightItem aAutoGrowHeight( false );
aTempAttr.Put( aAutoGrowHeight );
diff --git a/sd/source/ui/func/fuconrec.cxx b/sd/source/ui/func/fuconrec.cxx
index 6b8775862e55..3758ba214392 100644
--- a/sd/source/ui/func/fuconrec.cxx
+++ b/sd/source/ui/func/fuconrec.cxx
@@ -470,8 +470,8 @@ void FuConstructRectangle::SetAttributes(SfxItemSet& rAttr, SdrObject* pObj)
{
// legend object
Size aSize(pObj->GetLogicRect().GetSize());
- rAttr.Put( SdrTextMinFrameHeightItem( aSize.Height() ) );
- rAttr.Put( SdrTextMinFrameWidthItem( aSize.Width() ) );
+ rAttr.Put( makeSdrTextMinFrameHeightItem( aSize.Height() ) );
+ rAttr.Put( makeSdrTextMinFrameWidthItem( aSize.Width() ) );
rAttr.Put( SdrTextAutoGrowHeightItem( true ) );
rAttr.Put( SdrTextAutoGrowWidthItem( true ) );
diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx
index e4268088a576..d7075e4b4934 100644
--- a/sd/source/ui/func/futext.cxx
+++ b/sd/source/ui/func/futext.cxx
@@ -480,18 +480,18 @@ void FuText::ImpSetAttributesForNewTextObject(SdrTextObj* pTxtObj)
We get the correct height during the subsequent creation of the
object, otherwise we draw to much */
SfxItemSet aSet(mpViewShell->GetPool());
- aSet.Put(SdrTextMinFrameHeightItem(0));
+ aSet.Put(makeSdrTextMinFrameHeightItem(0));
aSet.Put(SdrTextAutoGrowWidthItem(false));
aSet.Put(SdrTextAutoGrowHeightItem(true));
pTxtObj->SetMergedItemSet(aSet);
pTxtObj->AdjustTextFrameWidthAndHeight();
- aSet.Put(SdrTextMaxFrameHeightItem(pTxtObj->GetLogicRect().GetSize().Height()));
+ aSet.Put(makeSdrTextMaxFrameHeightItem(pTxtObj->GetLogicRect().GetSize().Height()));
pTxtObj->SetMergedItemSet(aSet);
}
else if( nSlotId == SID_ATTR_CHAR_VERTICAL )
{
SfxItemSet aSet(mpViewShell->GetPool());
- aSet.Put(SdrTextMinFrameWidthItem(0));
+ aSet.Put(makeSdrTextMinFrameWidthItem(0));
aSet.Put(SdrTextAutoGrowWidthItem(true));
aSet.Put(SdrTextAutoGrowHeightItem(false));
@@ -499,7 +499,7 @@ void FuText::ImpSetAttributesForNewTextObject(SdrTextObj* pTxtObj)
aSet.Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_RIGHT));
pTxtObj->SetMergedItemSet(aSet);
pTxtObj->AdjustTextFrameWidthAndHeight();
- aSet.Put(SdrTextMaxFrameWidthItem(pTxtObj->GetLogicRect().GetSize().Width()));
+ aSet.Put(makeSdrTextMaxFrameWidthItem(pTxtObj->GetLogicRect().GetSize().Width()));
pTxtObj->SetMergedItemSet(aSet);
}
}
@@ -558,8 +558,8 @@ void FuText::ImpSetAttributesFitCommon(SdrTextObj* pTxtObj)
{
// Impress text object (rescales to line height)
SfxItemSet aSet(mpViewShell->GetPool());
- aSet.Put(SdrTextMinFrameHeightItem(0));
- aSet.Put(SdrTextMaxFrameHeightItem(0));
+ aSet.Put(makeSdrTextMinFrameHeightItem(0));
+ aSet.Put(makeSdrTextMaxFrameHeightItem(0));
aSet.Put(SdrTextAutoGrowHeightItem(true));
aSet.Put(SdrTextAutoGrowWidthItem(false));
pTxtObj->SetMergedItemSet(aSet);
@@ -567,8 +567,8 @@ void FuText::ImpSetAttributesFitCommon(SdrTextObj* pTxtObj)
else if( nSlotId == SID_ATTR_CHAR_VERTICAL )
{
SfxItemSet aSet(mpViewShell->GetPool());
- aSet.Put(SdrTextMinFrameWidthItem(0));
- aSet.Put(SdrTextMaxFrameWidthItem(0));
+ aSet.Put(makeSdrTextMinFrameWidthItem(0));
+ aSet.Put(makeSdrTextMaxFrameWidthItem(0));
aSet.Put(SdrTextAutoGrowWidthItem(true));
aSet.Put(SdrTextAutoGrowHeightItem(false));
pTxtObj->SetMergedItemSet(aSet);
@@ -787,8 +787,8 @@ bool FuText::MouseButtonUp(const MouseEvent& rMEvt)
if(mxTextObj.is())
{
SfxItemSet aSet(mpViewShell->GetPool());
- aSet.Put(SdrTextMinFrameHeightItem(0));
- aSet.Put(SdrTextMinFrameWidthItem(0));
+ aSet.Put(makeSdrTextMinFrameHeightItem(0));
+ aSet.Put(makeSdrTextMinFrameWidthItem(0));
aSet.Put(SdrTextAutoGrowHeightItem(true));
aSet.Put(SdrTextAutoGrowWidthItem(true));