[Libreoffice-commits] core.git: cui/source filter/source include/svx sc/source sd/source svx/source sw/source
Stephan Bergmann
sbergman at redhat.com
Mon Aug 18 05:57:32 PDT 2014
cui/source/tabpages/textattr.cxx | 4 ++--
filter/source/msfilter/msdffimp.cxx | 2 +-
include/svx/sdtcfitm.hxx | 11 +++--------
sc/source/ui/drawfunc/drtxtob.cxx | 2 +-
sd/source/core/sdpage.cxx | 2 +-
sd/source/ui/view/drviews2.cxx | 2 +-
svx/source/sdr/primitive2d/sdrattributecreator.cxx | 2 +-
svx/source/svdraw/svdattr.cxx | 2 +-
svx/source/svdraw/svdotext.cxx | 2 +-
sw/source/filter/ww8/ww8par.cxx | 2 +-
sw/source/uibase/shells/drwtxtsh.cxx | 2 +-
11 files changed, 14 insertions(+), 19 deletions(-)
New commits:
commit 08edafa656dc15089fad4d07c71fe40585f89f4b
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Mon Aug 18 14:56:20 2014 +0200
Consistency around SdrOnOffItem in svx/sdtcfitm.hxx
...similar to what has been done for svx/sdtmfitm.hxx in
6a2ea81ca1622d2c2ad55bea8ddc28167fcc2794 "Remove unused ctors" and
68969cc61adecac481ae9656978ef952f435b310 "Consistency around SdrMetricItem."
Change-Id: Ib461b5d3702e00a9d7cef3229c44e3328c776e1d
diff --git a/cui/source/tabpages/textattr.cxx b/cui/source/tabpages/textattr.cxx
index a09a7ee..2b6e531 100644
--- a/cui/source/tabpages/textattr.cxx
+++ b/cui/source/tabpages/textattr.cxx
@@ -304,7 +304,7 @@ void SvxTextAttrPage::Reset( const SfxItemSet* rAttrs )
if( rAttrs->GetItemState( SDRATTR_TEXT_CONTOURFRAME ) != SFX_ITEM_DONTCARE )
{
- bool bContour = ( ( const SdrTextContourFrameItem& )rAttrs->Get( SDRATTR_TEXT_CONTOURFRAME ) ).GetValue();
+ bool bContour = ( ( const SdrOnOffItem& )rAttrs->Get( SDRATTR_TEXT_CONTOURFRAME ) ).GetValue();
m_pTsbContour->SetState( bContour ? TRISTATE_TRUE : TRISTATE_FALSE );
m_pTsbContour->EnableTriState( false );
}
@@ -381,7 +381,7 @@ bool SvxTextAttrPage::FillItemSet( SfxItemSet* rAttrs)
eState = m_pTsbContour->GetState();
if( m_pTsbContour->IsValueChangedFromSaved() )
{
- rAttrs->Put( SdrTextContourFrameItem( TRISTATE_TRUE == eState ) );
+ rAttrs->Put( makeSdrTextContourFrameItem( TRISTATE_TRUE == eState ) );
}
eState = m_pTsbFitToSize->GetState();
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 293e439..b6bf96d 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -5147,7 +5147,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
}
break;
case mso_wrapByPoints :
- aSet.Put( SdrTextContourFrameItem( true ) );
+ aSet.Put( makeSdrTextContourFrameItem( true ) );
break;
default: break;
}
diff --git a/include/svx/sdtcfitm.hxx b/include/svx/sdtcfitm.hxx
index 8a9cb61..aca6298 100644
--- a/include/svx/sdtcfitm.hxx
+++ b/include/svx/sdtcfitm.hxx
@@ -22,14 +22,9 @@
#include <svx/sdooitm.hxx>
#include <svx/svddef.hxx>
-/*
- * class SdrTextContourFrameItem
- */
-class SdrTextContourFrameItem: public SdrOnOffItem {
-public:
- SdrTextContourFrameItem(bool bOn=false): SdrOnOffItem(SDRATTR_TEXT_CONTOURFRAME,bOn) {}
- SdrTextContourFrameItem(SvStream& rIn) : SdrOnOffItem(SDRATTR_TEXT_CONTOURFRAME,rIn) {}
-};
+inline SdrOnOffItem makeSdrTextContourFrameItem(bool bOn) {
+ return SdrOnOffItem(SDRATTR_TEXT_CONTOURFRAME, bOn);
+}
#endif
diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx
index ba9f349..08dc34c 100644
--- a/sc/source/ui/drawfunc/drtxtob.cxx
+++ b/sc/source/ui/drawfunc/drtxtob.cxx
@@ -1178,7 +1178,7 @@ void ScDrawTextObjectBar::GetStatePropPanelAttr(SfxItemSet &rSet)
SfxItemState eConState = aEditAttr.GetItemState( SDRATTR_TEXT_CONTOURFRAME );
if( eConState != SFX_ITEM_DONTCARE )
{
- bContour = ( ( const SdrTextContourFrameItem& )aEditAttr.Get( SDRATTR_TEXT_CONTOURFRAME ) ).GetValue();
+ bContour = ( ( const SdrOnOffItem& )aEditAttr.Get( SDRATTR_TEXT_CONTOURFRAME ) ).GetValue();
}
if (bContour) break;
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 4a631d9..7d875f7 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -535,7 +535,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const Rec
eObjKind == PRESOBJ_GRAPHIC )
{
SfxItemSet aSet( ((SdDrawDocument*) pModel)->GetPool() );
- aSet.Put( SdrTextContourFrameItem( true ) );
+ aSet.Put( makeSdrTextContourFrameItem( true ) );
aSet.Put( SvxAdjustItem( SVX_ADJUST_CENTER, EE_PARA_JUST ) );
pSdrObj->SetMergedItemSet(aSet);
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 8ce78f1..657df96 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -3214,7 +3214,7 @@ void DrawViewShell::GetStatePropPanelAttr(SfxItemSet& rSet)
SfxItemState eConState = aAttrs.GetItemState( SDRATTR_TEXT_CONTOURFRAME );
if( eConState != SFX_ITEM_DONTCARE )
{
- bContour = ( ( const SdrTextContourFrameItem& )aAttrs.Get( SDRATTR_TEXT_CONTOURFRAME ) ).GetValue();
+ bContour = ( ( const SdrOnOffItem& )aAttrs.Get( SDRATTR_TEXT_CONTOURFRAME ) ).GetValue();
}
if (bContour) break;
diff --git a/svx/source/sdr/primitive2d/sdrattributecreator.cxx b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
index ef44f3f..3b8074b 100644
--- a/svx/source/sdr/primitive2d/sdrattributecreator.cxx
+++ b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
@@ -572,7 +572,7 @@ namespace drawinglayer
pLower ? *pLower : rTextObj.GetTextLowerDistance(),
rTextObj.GetTextHorizontalAdjust(rSet),
rTextObj.GetTextVerticalAdjust(rSet),
- ((const SdrTextContourFrameItem&)rSet.Get(SDRATTR_TEXT_CONTOURFRAME)).GetValue(),
+ ((const SdrOnOffItem&)rSet.Get(SDRATTR_TEXT_CONTOURFRAME)).GetValue(),
rTextObj.IsFitToSize(),
rTextObj.IsAutoFit(),
((const XFormTextHideFormItem&)rSet.Get(XATTR_FORMTXTHIDEFORM)).GetValue(),
diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx
index 917274e..9f148ad 100644
--- a/svx/source/svdraw/svdattr.cxx
+++ b/svx/source/svdraw/svdattr.cxx
@@ -166,7 +166,7 @@ SdrItemPool::SdrItemPool(
mppLocalPoolDefaults[SDRATTR_TEXT_ANICOUNT -SDRATTR_START]=new SdrTextAniCountItem;
mppLocalPoolDefaults[SDRATTR_TEXT_ANIDELAY -SDRATTR_START]=new SdrTextAniDelayItem;
mppLocalPoolDefaults[SDRATTR_TEXT_ANIAMOUNT -SDRATTR_START]=new SdrTextAniAmountItem;
- mppLocalPoolDefaults[SDRATTR_TEXT_CONTOURFRAME -SDRATTR_START]=new SdrTextContourFrameItem;
+ mppLocalPoolDefaults[SDRATTR_TEXT_CONTOURFRAME -SDRATTR_START]=new SdrOnOffItem(SDRATTR_TEXT_CONTOURFRAME, false);
mppLocalPoolDefaults[SDRATTR_CUSTOMSHAPE_ADJUSTMENT -SDRATTR_START]=new SdrCustomShapeAdjustmentItem;
mppLocalPoolDefaults[SDRATTR_XMLATTRIBUTES -SDRATTR_START]=new SvXMLAttrContainerItem( SDRATTR_XMLATTRIBUTES );
mppLocalPoolDefaults[SDRATTR_TEXT_USEFIXEDCELLHEIGHT -SDRATTR_START]=new SdrTextFixedCellHeightItem;
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index 4586035..7e339f2 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -1794,7 +1794,7 @@ bool SdrTextObj::IsHideContour() const
bool SdrTextObj::IsContourTextFrame() const
{
return (bTextFrame) ? false // ContourFrame not together with normal TextFrames
- : ((SdrTextContourFrameItem&)(GetObjectItemSet().Get(SDRATTR_TEXT_CONTOURFRAME))).GetValue();
+ : ((SdrOnOffItem&)(GetObjectItemSet().Get(SDRATTR_TEXT_CONTOURFRAME))).GetValue();
}
long SdrTextObj::GetTextLeftDistance() const
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index c4eb547..4465890 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -859,7 +859,7 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
pImpRec->bAutoWidth = true;
break;
case mso_wrapByPoints :
- aSet.Put( SdrTextContourFrameItem( true ) );
+ aSet.Put( makeSdrTextContourFrameItem( true ) );
break;
default:
;
diff --git a/sw/source/uibase/shells/drwtxtsh.cxx b/sw/source/uibase/shells/drwtxtsh.cxx
index 1a1f6f5..0a9d6f7 100644
--- a/sw/source/uibase/shells/drwtxtsh.cxx
+++ b/sw/source/uibase/shells/drwtxtsh.cxx
@@ -850,7 +850,7 @@ void SwDrawTextShell::GetStatePropPanelAttr(SfxItemSet &rSet)
SfxItemState eConState = aAttrs.GetItemState( SDRATTR_TEXT_CONTOURFRAME );
if( eConState != SFX_ITEM_DONTCARE )
{
- bContour = ( ( const SdrTextContourFrameItem& )aAttrs.Get( SDRATTR_TEXT_CONTOURFRAME ) ).GetValue();
+ bContour = ( ( const SdrOnOffItem& )aAttrs.Get( SDRATTR_TEXT_CONTOURFRAME ) ).GetValue();
}
if (bContour) break;
More information about the Libreoffice-commits
mailing list