diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2020-10-20 07:27:44 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-10-21 08:13:05 +0200 |
commit | 0fb58a1ff168ae122e9c8993a3136658e3b0e3f0 (patch) | |
tree | 908983b02f466e0a49599edc70aaa1baaa240371 /sw/source/filter | |
parent | b84afd2188d6993c91081885dc24664bd3f1cc73 (diff) |
new tools::Degree10 strong typedef
partly to flush some use of "long" out the codebase,
but also to make it obvious which units are being used
for angle values.
Change-Id: I1dc22494ca42c4677a63f685d5903f2b89886dc2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104548
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/filter')
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtww8.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par6.cxx | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 78e6bba0bde2..53f7462de3a9 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -4686,7 +4686,7 @@ void DocxAttributeOutput::OutputDefaultItem(const SfxPoolItem& rHt) break; case RES_CHRATR_ROTATE: - bMustWrite = static_cast< const SvxCharRotateItem& >(rHt).GetValue() != 0; + bMustWrite = static_cast< const SvxCharRotateItem& >(rHt).GetValue() != Degree10(0); break; case RES_CHRATR_EMPHASIS_MARK: bMustWrite = static_cast< const SvxEmphasisMarkItem& >(rHt).GetEmphasisMark() != FontEmphasisMark::NONE; @@ -9095,7 +9095,7 @@ void DocxAttributeOutput::FormatFillGradient( const XFillGradientItem& rFillGrad // /oox/source/vml/vmlformatting.cxx :: FillModel::pushToPropMap // and also in // /oox/source/drawingml/fillproperties.cxx :: FillProperties::pushToPropMap - sal_Int32 nReverseAngle = 4500 - rGradient.GetAngle(); + sal_Int32 nReverseAngle = (Degree10(4500) - rGradient.GetAngle()).get(); nReverseAngle = nReverseAngle / 10; nReverseAngle = (270 - nReverseAngle) % 360; if (nReverseAngle != 0) diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index b28c2bd4d2cf..413ef854121d 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -2076,11 +2076,11 @@ static sal_uInt16 lcl_TCFlags(SwDoc &rDoc, const SwTableBox * pBox, sal_Int32 nR if ( SfxItemState::SET == aCoreSet.GetItemState(RES_CHRATR_ROTATE, true, &pRotItem)) { const SvxCharRotateItem * pRotate = static_cast<const SvxCharRotateItem*>(pRotItem); - if(pRotate && pRotate->GetValue() == 900) + if(pRotate && pRotate->GetValue() == Degree10(900)) { nFlags = nFlags | 0x0004 | 0x0008; } - else if(pRotate && pRotate->GetValue() == 2700 ) + else if(pRotate && pRotate->GetValue() == Degree10(2700) ) { nFlags = nFlags | 0x0004 | 0x0010; } diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 849d68ca1dbb..59e5b6beb731 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -3559,7 +3559,7 @@ void SwWW8ImplReader::Read_DoubleLine_Rotate( sal_uInt16, const sal_uInt8* pData case 1: // rotated characters { bool bFitToLine = 0 != *(pData+1); - NewAttr( SvxCharRotateItem( 900, bFitToLine, RES_CHRATR_ROTATE )); + NewAttr( SvxCharRotateItem( Degree10(900), bFitToLine, RES_CHRATR_ROTATE )); } break; } |