Kaydet (Commit) 0765c16b authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Consistency around SdrOnOffItem in svx/sxcaitm.hxx

...similar to what has been done for svx/sdtmfitm.hxx in
6a2ea81c "Remove unused ctors" and
68969cc6 "Consistency around SdrMetricItem."

Change-Id: I1a88c73c8e4c764a6beadb8bb54910d868a12d93
üst 81bf87fe
......@@ -24,18 +24,10 @@
#include <svx/sdangitm.hxx>
#include <svx/sdooitm.hxx>
// class SdrCaptionFixedAngleItem
// SDRATTR_CAPTIONFIXEDANGLE SdrOnOffItem:
// sal_True=Winkel durch SdrCaptionAngleItem vorgegeben
// sal_False=Freier Winkel
class SdrCaptionFixedAngleItem: public SdrOnOffItem {
public:
SdrCaptionFixedAngleItem(bool bFix=true): SdrOnOffItem(SDRATTR_CAPTIONFIXEDANGLE,bFix) {}
SdrCaptionFixedAngleItem(SvStream& rIn) : SdrOnOffItem(SDRATTR_CAPTIONFIXEDANGLE,rIn) {}
};
// class SdrCaptionAngleItem
// Winkelangabe in 1/100 Degree
// Nur bei Type2, Type3 und Type4
......
......@@ -136,7 +136,7 @@ SdrItemPool::SdrItemPool(
mppLocalPoolDefaults[SDRATTR_SHADOW3D -SDRATTR_START]=new SfxVoidItem(SDRATTR_SHADOW3D );
mppLocalPoolDefaults[SDRATTR_SHADOWPERSP -SDRATTR_START]=new SfxVoidItem(SDRATTR_SHADOWPERSP );
mppLocalPoolDefaults[SDRATTR_CAPTIONTYPE -SDRATTR_START]=new SdrCaptionTypeItem ;
mppLocalPoolDefaults[SDRATTR_CAPTIONFIXEDANGLE-SDRATTR_START]=new SdrCaptionFixedAngleItem;
mppLocalPoolDefaults[SDRATTR_CAPTIONFIXEDANGLE-SDRATTR_START]=new SdrOnOffItem(SDRATTR_CAPTIONFIXEDANGLE, true);
mppLocalPoolDefaults[SDRATTR_CAPTIONANGLE -SDRATTR_START]=new SdrCaptionAngleItem ;
mppLocalPoolDefaults[SDRATTR_CAPTIONGAP -SDRATTR_START]=new SdrCaptionGapItem ;
mppLocalPoolDefaults[SDRATTR_CAPTIONESCDIR -SDRATTR_START]=new SdrCaptionEscDirItem ;
......
......@@ -764,7 +764,7 @@ bool IsItemIneffective(sal_uInt16 nWhich, const SfxItemSet* pSet, sal_uInt16& rI
case SDRATTR_CAPTIONANGLE: {
rIndent=1;
if (ImpGetItem(*pSet,SDRATTR_CAPTIONFIXEDANGLE,pItem)) {
bool bFixed=((const SdrCaptionFixedAngleItem*)pItem)->GetValue();
bool bFixed=((const SdrOnOffItem*)pItem)->GetValue();
if (!bFixed) return true;
}
} break;
......
......@@ -421,7 +421,7 @@ void SdrCaptionObj::ImpGetCaptParams(ImpCaptParams& rPara) const
{
const SfxItemSet& rSet = GetObjectItemSet();
rPara.eType =((SdrCaptionTypeItem&) (rSet.Get(SDRATTR_CAPTIONTYPE ))).GetValue();
rPara.bFixedAngle=((SdrCaptionFixedAngleItem&)(rSet.Get(SDRATTR_CAPTIONFIXEDANGLE))).GetValue();
rPara.bFixedAngle=((SdrOnOffItem&)(rSet.Get(SDRATTR_CAPTIONFIXEDANGLE))).GetValue();
rPara.nAngle =((SdrCaptionAngleItem&) (rSet.Get(SDRATTR_CAPTIONANGLE ))).GetValue();
rPara.nGap =((SdrCaptionGapItem&) (rSet.Get(SDRATTR_CAPTIONGAP ))).GetValue();
rPara.eEscDir =((SdrCaptionEscDirItem&) (rSet.Get(SDRATTR_CAPTIONESCDIR ))).GetValue();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment