summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-08-04 11:29:51 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-08-04 11:29:51 +0200
commit768d32cf5b7dc35ab1b93e898e1bb5beab43c27c (patch)
tree7de7cb2ddb064469385520e0a74e03a349f4f689 /svx
parent83f37705679f5176f0aa0c8e58da681c0a3c2319 (diff)
Consistency around SdrMetricItem in svx/sdtditm.hxx
...similar to what has been done for svx/sdtmfitm.hxx in 6a2ea81ca1622d2c2ad55bea8ddc28167fcc2794 "Remove unused ctors" and 68969cc61adecac481ae9656978ef952f435b310 "Consistency around SdrMetricItem." Change-Id: Ib0234883d441be668700df5ccd0e855973dc5426
Diffstat (limited to 'svx')
-rw-r--r--svx/source/sdr/properties/textproperties.cxx18
-rw-r--r--svx/source/svdraw/svdattr.cxx8
-rw-r--r--svx/source/svdraw/svdfmtf.cxx8
-rw-r--r--svx/source/svdraw/svdotext.cxx8
-rw-r--r--svx/source/table/cell.cxx8
-rw-r--r--svx/source/table/tablecontroller.cxx16
6 files changed, 33 insertions, 33 deletions
diff --git a/svx/source/sdr/properties/textproperties.cxx b/svx/source/sdr/properties/textproperties.cxx
index c81fe2d2b167..6ab12eddae69 100644
--- a/svx/source/sdr/properties/textproperties.cxx
+++ b/svx/source/sdr/properties/textproperties.cxx
@@ -211,15 +211,15 @@ namespace sdr
if(bLineVisible)
{
- const sal_Int32 nLeftDist(((const SdrTextLeftDistItem&)GetItem(SDRATTR_TEXT_LEFTDIST)).GetValue());
- const sal_Int32 nRightDist(((const SdrTextRightDistItem&)GetItem(SDRATTR_TEXT_RIGHTDIST)).GetValue());
- const sal_Int32 nUpperDist(((const SdrTextUpperDistItem&)GetItem(SDRATTR_TEXT_UPPERDIST)).GetValue());
- const sal_Int32 nLowerDist(((const SdrTextLowerDistItem&)GetItem(SDRATTR_TEXT_LOWERDIST)).GetValue());
-
- SetObjectItemDirect(SdrTextLeftDistItem(nLeftDist + nDifference));
- SetObjectItemDirect(SdrTextRightDistItem(nRightDist + nDifference));
- SetObjectItemDirect(SdrTextUpperDistItem(nUpperDist + nDifference));
- SetObjectItemDirect(SdrTextLowerDistItem(nLowerDist + nDifference));
+ const sal_Int32 nLeftDist(((const SdrMetricItem&)GetItem(SDRATTR_TEXT_LEFTDIST)).GetValue());
+ const sal_Int32 nRightDist(((const SdrMetricItem&)GetItem(SDRATTR_TEXT_RIGHTDIST)).GetValue());
+ const sal_Int32 nUpperDist(((const SdrMetricItem&)GetItem(SDRATTR_TEXT_UPPERDIST)).GetValue());
+ const sal_Int32 nLowerDist(((const SdrMetricItem&)GetItem(SDRATTR_TEXT_LOWERDIST)).GetValue());
+
+ SetObjectItemDirect(makeSdrTextLeftDistItem(nLeftDist + nDifference));
+ SetObjectItemDirect(makeSdrTextRightDistItem(nRightDist + nDifference));
+ SetObjectItemDirect(makeSdrTextUpperDistItem(nUpperDist + nDifference));
+ SetObjectItemDirect(makeSdrTextLowerDistItem(nLowerDist + nDifference));
}
}
}
diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx
index cf4c6f5e1829..3118a3160d88 100644
--- a/svx/source/svdraw/svdattr.cxx
+++ b/svx/source/svdraw/svdattr.cxx
@@ -149,10 +149,10 @@ SdrItemPool::SdrItemPool(
mppLocalPoolDefaults[SDRATTR_TEXT_MINFRAMEHEIGHT -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_MINFRAMEHEIGHT, 0);
mppLocalPoolDefaults[SDRATTR_TEXT_AUTOGROWHEIGHT -SDRATTR_START]=new SdrTextAutoGrowHeightItem;
mppLocalPoolDefaults[SDRATTR_TEXT_FITTOSIZE -SDRATTR_START]=new SdrTextFitToSizeTypeItem;
- mppLocalPoolDefaults[SDRATTR_TEXT_LEFTDIST -SDRATTR_START]=new SdrTextLeftDistItem;
- mppLocalPoolDefaults[SDRATTR_TEXT_RIGHTDIST -SDRATTR_START]=new SdrTextRightDistItem;
- mppLocalPoolDefaults[SDRATTR_TEXT_UPPERDIST -SDRATTR_START]=new SdrTextUpperDistItem;
- mppLocalPoolDefaults[SDRATTR_TEXT_LOWERDIST -SDRATTR_START]=new SdrTextLowerDistItem;
+ mppLocalPoolDefaults[SDRATTR_TEXT_LEFTDIST -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_LEFTDIST, 0);
+ mppLocalPoolDefaults[SDRATTR_TEXT_RIGHTDIST -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_RIGHTDIST, 0);
+ mppLocalPoolDefaults[SDRATTR_TEXT_UPPERDIST -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_UPPERDIST, 0);
+ mppLocalPoolDefaults[SDRATTR_TEXT_LOWERDIST -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_LOWERDIST, 0);
mppLocalPoolDefaults[SDRATTR_TEXT_VERTADJUST -SDRATTR_START]=new SdrTextVertAdjustItem;
mppLocalPoolDefaults[SDRATTR_TEXT_MAXFRAMEHEIGHT -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_MAXFRAMEHEIGHT, 0);
mppLocalPoolDefaults[SDRATTR_TEXT_MINFRAMEWIDTH -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_MINFRAMEWIDTH, 0);
diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx
index b0ef005f4e07..e7e28d692c02 100644
--- a/svx/source/svdraw/svdfmtf.cxx
+++ b/svx/source/svdraw/svdfmtf.cxx
@@ -1020,10 +1020,10 @@ void ImpSdrGDIMetaFileImport::ImportText( const Point& rPos, const OUString& rSt
Rectangle aTextRect( aPos, aSize );
SdrRectObj* pText =new SdrRectObj( OBJ_TEXT, aTextRect );
- pText->SetMergedItem ( SdrTextUpperDistItem (0));
- pText->SetMergedItem ( SdrTextLowerDistItem (0));
- pText->SetMergedItem ( SdrTextRightDistItem (0));
- pText->SetMergedItem ( SdrTextLeftDistItem (0));
+ pText->SetMergedItem ( makeSdrTextUpperDistItem (0));
+ pText->SetMergedItem ( makeSdrTextLowerDistItem (0));
+ pText->SetMergedItem ( makeSdrTextRightDistItem (0));
+ pText->SetMergedItem ( makeSdrTextLeftDistItem (0));
if ( aFnt.GetWidth() || ( rAct.GetType() == META_STRETCHTEXT_ACTION ) )
{
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index a69e188321cd..f08a01726cca 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -1799,22 +1799,22 @@ bool SdrTextObj::IsContourTextFrame() const
long SdrTextObj::GetTextLeftDistance() const
{
- return ((SdrTextLeftDistItem&)(GetObjectItemSet().Get(SDRATTR_TEXT_LEFTDIST))).GetValue();
+ return ((SdrMetricItem&)(GetObjectItemSet().Get(SDRATTR_TEXT_LEFTDIST))).GetValue();
}
long SdrTextObj::GetTextRightDistance() const
{
- return ((SdrTextRightDistItem&)(GetObjectItemSet().Get(SDRATTR_TEXT_RIGHTDIST))).GetValue();
+ return ((SdrMetricItem&)(GetObjectItemSet().Get(SDRATTR_TEXT_RIGHTDIST))).GetValue();
}
long SdrTextObj::GetTextUpperDistance() const
{
- return ((SdrTextUpperDistItem&)(GetObjectItemSet().Get(SDRATTR_TEXT_UPPERDIST))).GetValue();
+ return ((SdrMetricItem&)(GetObjectItemSet().Get(SDRATTR_TEXT_UPPERDIST))).GetValue();
}
long SdrTextObj::GetTextLowerDistance() const
{
- return ((SdrTextLowerDistItem&)(GetObjectItemSet().Get(SDRATTR_TEXT_LOWERDIST))).GetValue();
+ return ((SdrMetricItem&)(GetObjectItemSet().Get(SDRATTR_TEXT_LOWERDIST))).GetValue();
}
SdrTextAniKind SdrTextObj::GetTextAniKind() const
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx
index a4a37a998c0b..cf182d314d7f 100644
--- a/svx/source/table/cell.cxx
+++ b/svx/source/table/cell.cxx
@@ -718,28 +718,28 @@ sal_Int32 Cell::getMinimumHeight()
long Cell::GetTextLeftDistance() const
{
- return ((SdrTextLeftDistItem&)(GetItemSet().Get(SDRATTR_TEXT_LEFTDIST))).GetValue();
+ return ((SdrMetricItem&)(GetItemSet().Get(SDRATTR_TEXT_LEFTDIST))).GetValue();
}
long Cell::GetTextRightDistance() const
{
- return ((SdrTextRightDistItem&)(GetItemSet().Get(SDRATTR_TEXT_RIGHTDIST))).GetValue();
+ return ((SdrMetricItem&)(GetItemSet().Get(SDRATTR_TEXT_RIGHTDIST))).GetValue();
}
long Cell::GetTextUpperDistance() const
{
- return ((SdrTextUpperDistItem&)(GetItemSet().Get(SDRATTR_TEXT_UPPERDIST))).GetValue();
+ return ((SdrMetricItem&)(GetItemSet().Get(SDRATTR_TEXT_UPPERDIST))).GetValue();
}
long Cell::GetTextLowerDistance() const
{
- return ((SdrTextLowerDistItem&)(GetItemSet().Get(SDRATTR_TEXT_LOWERDIST))).GetValue();
+ return ((SdrMetricItem&)(GetItemSet().Get(SDRATTR_TEXT_LOWERDIST))).GetValue();
}
diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx
index 4404c4709abe..2902607e3bb8 100644
--- a/svx/source/table/tablecontroller.cxx
+++ b/svx/source/table/tablecontroller.cxx
@@ -730,10 +730,10 @@ void SvxTableController::onFormatTable( SfxRequest& rReq )
// merge drawing layer text distance items into SvxBoxItem used by the dialog
SvxBoxItem aBoxItem( static_cast< const SvxBoxItem& >( aNewAttr.Get( SDRATTR_TABLE_BORDER ) ) );
- aBoxItem.SetDistance( sal::static_int_cast< sal_uInt16 >( ((SdrTextLeftDistItem&)(aNewAttr.Get(SDRATTR_TEXT_LEFTDIST))).GetValue()), BOX_LINE_LEFT );
- aBoxItem.SetDistance( sal::static_int_cast< sal_uInt16 >( ((SdrTextRightDistItem&)(aNewAttr.Get(SDRATTR_TEXT_RIGHTDIST))).GetValue()), BOX_LINE_RIGHT );
- aBoxItem.SetDistance( sal::static_int_cast< sal_uInt16 >( ((SdrTextUpperDistItem&)(aNewAttr.Get(SDRATTR_TEXT_UPPERDIST))).GetValue()), BOX_LINE_TOP );
- aBoxItem.SetDistance( sal::static_int_cast< sal_uInt16 >( ((SdrTextLowerDistItem&)(aNewAttr.Get(SDRATTR_TEXT_LOWERDIST))).GetValue()), BOX_LINE_BOTTOM );
+ aBoxItem.SetDistance( sal::static_int_cast< sal_uInt16 >( ((SdrMetricItem&)(aNewAttr.Get(SDRATTR_TEXT_LEFTDIST))).GetValue()), BOX_LINE_LEFT );
+ aBoxItem.SetDistance( sal::static_int_cast< sal_uInt16 >( ((SdrMetricItem&)(aNewAttr.Get(SDRATTR_TEXT_RIGHTDIST))).GetValue()), BOX_LINE_RIGHT );
+ aBoxItem.SetDistance( sal::static_int_cast< sal_uInt16 >( ((SdrMetricItem&)(aNewAttr.Get(SDRATTR_TEXT_UPPERDIST))).GetValue()), BOX_LINE_TOP );
+ aBoxItem.SetDistance( sal::static_int_cast< sal_uInt16 >( ((SdrMetricItem&)(aNewAttr.Get(SDRATTR_TEXT_LOWERDIST))).GetValue()), BOX_LINE_BOTTOM );
SvxBoxInfoItem aBoxInfoItem( static_cast< const SvxBoxInfoItem& >( aNewAttr.Get( SDRATTR_TABLE_BORDER_INNER ) ) );
@@ -753,16 +753,16 @@ void SvxTableController::onFormatTable( SfxRequest& rReq )
SvxBoxItem aNewBoxItem( static_cast< const SvxBoxItem& >( aNewSet.Get( SDRATTR_TABLE_BORDER ) ) );
if( aNewBoxItem.GetDistance( BOX_LINE_LEFT ) != aBoxItem.GetDistance( BOX_LINE_LEFT ) )
- aNewSet.Put(SdrTextLeftDistItem( aNewBoxItem.GetDistance( BOX_LINE_LEFT ) ) );
+ aNewSet.Put(SdrMetricItem( aNewBoxItem.GetDistance( BOX_LINE_LEFT ) ) );
if( aNewBoxItem.GetDistance( BOX_LINE_RIGHT ) != aBoxItem.GetDistance( BOX_LINE_RIGHT ) )
- aNewSet.Put(SdrTextRightDistItem( aNewBoxItem.GetDistance( BOX_LINE_RIGHT ) ) );
+ aNewSet.Put(makeSdrTextRightDistItem( aNewBoxItem.GetDistance( BOX_LINE_RIGHT ) ) );
if( aNewBoxItem.GetDistance( BOX_LINE_TOP ) != aBoxItem.GetDistance( BOX_LINE_TOP ) )
- aNewSet.Put(SdrTextUpperDistItem( aNewBoxItem.GetDistance( BOX_LINE_TOP ) ) );
+ aNewSet.Put(makeSdrTextUpperDistItem( aNewBoxItem.GetDistance( BOX_LINE_TOP ) ) );
if( aNewBoxItem.GetDistance( BOX_LINE_BOTTOM ) != aBoxItem.GetDistance( BOX_LINE_BOTTOM ) )
- aNewSet.Put(SdrTextLowerDistItem( aNewBoxItem.GetDistance( BOX_LINE_BOTTOM ) ) );
+ aNewSet.Put(makeSdrTextLowerDistItem( aNewBoxItem.GetDistance( BOX_LINE_BOTTOM ) ) );
SetAttrToSelectedCells(aNewSet, false);
}