diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-08-04 11:29:51 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-08-04 11:29:51 +0200 |
commit | 768d32cf5b7dc35ab1b93e898e1bb5beab43c27c (patch) | |
tree | 7de7cb2ddb064469385520e0a74e03a349f4f689 /sd | |
parent | 83f37705679f5176f0aa0c8e58da681c0a3c2319 (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 'sd')
-rw-r--r-- | sd/qa/unit/export-tests.cxx | 8 | ||||
-rw-r--r-- | sd/qa/unit/import-tests.cxx | 8 | ||||
-rw-r--r-- | sd/source/core/drawdoc4.cxx | 16 | ||||
-rw-r--r-- | sd/source/filter/ppt/pptin.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/func/fuconrec.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/view/drviews3.cxx | 4 |
6 files changed, 26 insertions, 26 deletions
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx index 3a939d75c228..0492710c9611 100644 --- a/sd/qa/unit/export-tests.cxx +++ b/sd/qa/unit/export-tests.cxx @@ -412,10 +412,10 @@ void SdFiltersTest::testBnc862510_5() // Same as testBnc870237, but here we check the horizontal spacing const SdrObject* pObj = dynamic_cast<SdrObject*>( pPage->GetObj( 1 ) ); CPPUNIT_ASSERT_MESSAGE( "no object", pObj != NULL); - CPPUNIT_ASSERT_EQUAL( sal_Int32(0), (static_cast< const SdrTextUpperDistItem& >(pObj->GetMergedItem(SDRATTR_TEXT_UPPERDIST))).GetValue()); - CPPUNIT_ASSERT_EQUAL( sal_Int32(0), (static_cast< const SdrTextLowerDistItem& >(pObj->GetMergedItem(SDRATTR_TEXT_LOWERDIST))).GetValue()); - CPPUNIT_ASSERT_EQUAL( sal_Int32(7510), (static_cast< const SdrTextRightDistItem& >(pObj->GetMergedItem(SDRATTR_TEXT_RIGHTDIST))).GetValue()); - CPPUNIT_ASSERT_EQUAL( sal_Int32(0), (static_cast< const SdrTextLeftDistItem& >(pObj->GetMergedItem(SDRATTR_TEXT_LEFTDIST))).GetValue()); + CPPUNIT_ASSERT_EQUAL( sal_Int32(0), (static_cast< const SdrMetricItem& >(pObj->GetMergedItem(SDRATTR_TEXT_UPPERDIST))).GetValue()); + CPPUNIT_ASSERT_EQUAL( sal_Int32(0), (static_cast< const SdrMetricItem& >(pObj->GetMergedItem(SDRATTR_TEXT_LOWERDIST))).GetValue()); + CPPUNIT_ASSERT_EQUAL( sal_Int32(7510), (static_cast< const SdrMetricItem& >(pObj->GetMergedItem(SDRATTR_TEXT_RIGHTDIST))).GetValue()); + CPPUNIT_ASSERT_EQUAL( sal_Int32(0), (static_cast< const SdrMetricItem& >(pObj->GetMergedItem(SDRATTR_TEXT_LEFTDIST))).GetValue()); xDocShRef->DoClose(); } diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index d1ae4e875a71..20c770edec8d 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -545,10 +545,10 @@ void SdFiltersTest::testBnc870237() // Simulate a:ext inside dsp:txXfrm with changing the lower distance const SdrObjGroup* pObj = dynamic_cast<SdrObjGroup*>( pPage->GetObj( 0 ) ); CPPUNIT_ASSERT_MESSAGE( "no object", pObj != NULL); - CPPUNIT_ASSERT_EQUAL( sal_Int32(0), (static_cast< const SdrTextUpperDistItem& >(pObj->GetMergedItem(SDRATTR_TEXT_UPPERDIST))).GetValue()); - CPPUNIT_ASSERT_EQUAL( sal_Int32(9919), (static_cast< const SdrTextLowerDistItem& >(pObj->GetMergedItem(SDRATTR_TEXT_LOWERDIST))).GetValue()); - CPPUNIT_ASSERT_EQUAL( sal_Int32(0), (static_cast< const SdrTextRightDistItem& >(pObj->GetMergedItem(SDRATTR_TEXT_RIGHTDIST))).GetValue()); - CPPUNIT_ASSERT_EQUAL( sal_Int32(0), (static_cast< const SdrTextLeftDistItem& >(pObj->GetMergedItem(SDRATTR_TEXT_LEFTDIST))).GetValue()); + CPPUNIT_ASSERT_EQUAL( sal_Int32(0), (static_cast< const SdrMetricItem& >(pObj->GetMergedItem(SDRATTR_TEXT_UPPERDIST))).GetValue()); + CPPUNIT_ASSERT_EQUAL( sal_Int32(9919), (static_cast< const SdrMetricItem& >(pObj->GetMergedItem(SDRATTR_TEXT_LOWERDIST))).GetValue()); + CPPUNIT_ASSERT_EQUAL( sal_Int32(0), (static_cast< const SdrMetricItem& >(pObj->GetMergedItem(SDRATTR_TEXT_RIGHTDIST))).GetValue()); + CPPUNIT_ASSERT_EQUAL( sal_Int32(0), (static_cast< const SdrMetricItem& >(pObj->GetMergedItem(SDRATTR_TEXT_LEFTDIST))).GetValue()); xDocShRef->DoClose(); } diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx index 11a20a10a081..f15d1e5406d8 100644 --- a/sd/source/core/drawdoc4.cxx +++ b/sd/source/core/drawdoc4.cxx @@ -223,10 +223,10 @@ void SdDrawDocument::CreateLayoutTemplates() rISet.Put(SvxLRSpaceItem(EE_PARA_LRSPACE)); rISet.Put(SvxULSpaceItem(EE_PARA_ULSPACE)); - rISet.Put( SdrTextLeftDistItem( 250 ) ); // sj: (i33745) using text frame distances seems to be a better default - rISet.Put( SdrTextRightDistItem( 250 ) ); - rISet.Put( SdrTextUpperDistItem( 125 ) ); - rISet.Put( SdrTextLowerDistItem( 125 ) ); + rISet.Put( makeSdrTextLeftDistItem( 250 ) ); // sj: (i33745) using text frame distances seems to be a better default + rISet.Put( makeSdrTextRightDistItem( 250 ) ); + rISet.Put( makeSdrTextUpperDistItem( 125 ) ); + rISet.Put( makeSdrTextLowerDistItem( 125 ) ); rISet.Put( SvxLineSpacingItem( LINE_SPACE_DEFAULT_HEIGHT, EE_PARA_SBL ) ); @@ -587,10 +587,10 @@ void SdDrawDocument::CreateDefaultCellStyles() rISet.Put(SvxLRSpaceItem(EE_PARA_LRSPACE)); rISet.Put(SvxULSpaceItem(EE_PARA_ULSPACE)); - rISet.Put( SdrTextLeftDistItem( 250 ) ); - rISet.Put( SdrTextRightDistItem( 250 ) ); - rISet.Put( SdrTextUpperDistItem( 130 ) ); - rISet.Put( SdrTextLowerDistItem( 130 ) ); + rISet.Put( makeSdrTextLeftDistItem( 250 ) ); + rISet.Put( makeSdrTextRightDistItem( 250 ) ); + rISet.Put( makeSdrTextUpperDistItem( 130 ) ); + rISet.Put( makeSdrTextLowerDistItem( 130 ) ); rISet.Put( SvxLineSpacingItem( LINE_SPACE_DEFAULT_HEIGHT, EE_PARA_SBL ) ); rISet.Put( SvxAutoKernItem( true, EE_CHAR_PAIRKERNING ) ); diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx index d8263b50335e..a84e29dcea91 100644 --- a/sd/source/filter/ppt/pptin.cxx +++ b/sd/source/filter/ppt/pptin.cxx @@ -2258,10 +2258,10 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj if ( pSheet2 ) { SfxItemSet& rItemSet = pSheet2->GetItemSet(); - rItemSet.Put( (SdrTextLeftDistItem&)pText->GetMergedItem( SDRATTR_TEXT_LEFTDIST ) ); - rItemSet.Put( (SdrTextRightDistItem&)pText->GetMergedItem( SDRATTR_TEXT_RIGHTDIST ) ); - rItemSet.Put( (SdrTextUpperDistItem&)pText->GetMergedItem( SDRATTR_TEXT_UPPERDIST ) ); - rItemSet.Put( (SdrTextLowerDistItem&)pText->GetMergedItem( SDRATTR_TEXT_LOWERDIST ) ); + rItemSet.Put( (SdrMetricItem&)pText->GetMergedItem( SDRATTR_TEXT_LEFTDIST ) ); + rItemSet.Put( (SdrMetricItem&)pText->GetMergedItem( SDRATTR_TEXT_RIGHTDIST ) ); + rItemSet.Put( (SdrMetricItem&)pText->GetMergedItem( SDRATTR_TEXT_UPPERDIST ) ); + rItemSet.Put( (SdrMetricItem&)pText->GetMergedItem( SDRATTR_TEXT_LOWERDIST ) ); rItemSet.Put( (SdrTextVertAdjustItem&)pText->GetMergedItem( SDRATTR_TEXT_VERTADJUST ) ); rItemSet.Put( (SdrTextHorzAdjustItem&)pText->GetMergedItem( SDRATTR_TEXT_HORZADJUST ) ); if ( pTextObj->GetInstance() == TSS_TYPE_TITLE diff --git a/sd/source/ui/func/fuconrec.cxx b/sd/source/ui/func/fuconrec.cxx index 3758ba214392..a92d4bd24f4f 100644 --- a/sd/source/ui/func/fuconrec.cxx +++ b/sd/source/ui/func/fuconrec.cxx @@ -482,10 +482,10 @@ void FuConstructRectangle::SetAttributes(SfxItemSet& rAttr, SdrObject* pObj) rAttr.Put( SdrTextVertAdjustItem( SDRTEXTVERTADJUST_BLOCK ) ); rAttr.Put( SvxAdjustItem( SVX_ADJUST_CENTER, EE_PARA_JUST ) ); - rAttr.Put( SdrTextLeftDistItem( 100 ) ); - rAttr.Put( SdrTextRightDistItem( 100 ) ); - rAttr.Put( SdrTextUpperDistItem( 100 ) ); - rAttr.Put( SdrTextLowerDistItem( 100 ) ); + rAttr.Put( makeSdrTextLeftDistItem( 100 ) ); + rAttr.Put( makeSdrTextRightDistItem( 100 ) ); + rAttr.Put( makeSdrTextUpperDistItem( 100 ) ); + rAttr.Put( makeSdrTextLowerDistItem( 100 ) ); } else if (nSlotId == SID_DRAW_MEASURELINE) { diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx index d973def7da69..eb8a0e838eeb 100644 --- a/sd/source/ui/view/drviews3.cxx +++ b/sd/source/ui/view/drviews3.cxx @@ -934,7 +934,7 @@ void DrawViewShell::GetRulerState(SfxItemSet& rSet) if ( aEditAttr.GetItemState( SDRATTR_TEXT_LEFTDIST ) == SFX_ITEM_ON ) { - const SdrTextLeftDistItem& rTLDItem = (const SdrTextLeftDistItem&) + const SdrMetricItem& rTLDItem = (const SdrMetricItem&) aEditAttr.Get( SDRATTR_TEXT_LEFTDIST ); long nLD = rTLDItem.GetValue(); aPos.X() += nLD; @@ -946,7 +946,7 @@ void DrawViewShell::GetRulerState(SfxItemSet& rSet) if ( aEditAttr.GetItemState( SDRATTR_TEXT_LEFTDIST ) == SFX_ITEM_ON ) { - const SdrTextLeftDistItem& rTLDItem = (const SdrTextLeftDistItem&) + const SdrMetricItem& rTLDItem = (const SdrMetricItem&) aEditAttr.Get( SDRATTR_TEXT_LEFTDIST ); long nLD = rTLDItem.GetValue(); aLRSpace.SetLeft( aLRSpace.GetLeft() + nLD ); |