summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2020-12-27 20:26:00 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-12-28 07:23:31 +0100
commitcc66c52faac53b682732cc184fcd64e04100dfab (patch)
tree48cba9026ef3e4a33252072c3735358d9ed6af14 /sw
parent9bbe89dab96d13f2a97d653c31128988fd815808 (diff)
use SdrAngleItem for SID_ATTR_TRANSFORM_ANGLE
as a precursor to introdcing a strong_int type for hundredths of a degree Change-Id: Ie2d7ad3b48d01defb43bf2e11e6494c4b999de0e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108378 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx5
-rw-r--r--sw/source/uibase/shells/frmsh.cxx3
-rw-r--r--sw/source/uibase/shells/grfsh.cxx7
-rw-r--r--sw/source/uibase/shells/slotadd.cxx1
4 files changed, 10 insertions, 6 deletions
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index cdb94dc6254a..b8eedd8100ae 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -37,6 +37,7 @@
#include <editeng/frmdiritem.hxx>
#include <svx/swframeposstrings.hxx>
#include <svx/swframevalidation.hxx>
+#include <svx/sdangitm.hxx>
#include <comphelper/classids.hxx>
#include <tools/globname.hxx>
#include <tools/urlobj.hxx>
@@ -2353,7 +2354,7 @@ void SwGrfExtPage::Reset(const SfxItemSet *rSet)
// RotGrfFlyFrame: Get RotationAngle and set at control
if(SfxItemState::SET == rSet->GetItemState( SID_ATTR_TRANSFORM_ANGLE, false, &pItem))
{
- m_xCtlAngle->SetRotation(static_cast<const SfxInt32Item*>(pItem)->GetValue());
+ m_xCtlAngle->SetRotation(static_cast<const SdrAngleItem*>(pItem)->GetValue());
}
else
{
@@ -2494,7 +2495,7 @@ bool SwGrfExtPage::FillItemSet( SfxItemSet *rSet )
// RotGrfFlyFrame: Safe rotation if modified
if(m_xCtlAngle->IsValueModified())
{
- rSet->Put(SfxInt32Item(GetWhich(SID_ATTR_TRANSFORM_ANGLE), m_xCtlAngle->GetRotation()));
+ rSet->Put(SdrAngleItem(GetWhich(SID_ATTR_TRANSFORM_ANGLE), m_xCtlAngle->GetRotation()));
bModified = true;
}
diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx
index e6a758b37e5c..1d352cafb16a 100644
--- a/sw/source/uibase/shells/frmsh.cxx
+++ b/sw/source/uibase/shells/frmsh.cxx
@@ -36,6 +36,7 @@
#include <vcl/EnumContext.hxx>
#include <svx/hlnkitem.hxx>
#include <svx/svdview.hxx>
+#include <svx/sdangitm.hxx>
#include <vcl/commandinfoprovider.hxx>
#include <sal/log.hxx>
@@ -409,7 +410,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
// 100th degrees in SID_ATTR_TRANSFORM_ANGLE to 10th degrees in RES_GRFATR_ROTATION
if (pArgs && SfxItemState::SET == pArgs->GetItemState(SID_ATTR_TRANSFORM_ANGLE, false, &pItem))
{
- const sal_uInt32 nNewRot(static_cast<const SfxUInt32Item*>(pItem)->GetValue() / 10);
+ const sal_uInt32 nNewRot(static_cast<const SdrAngleItem*>(pItem)->GetValue() / 10);
// RotGrfFlyFrame: Rotation change here, SwFlyFrameAttrMgr aMgr is available
aMgr.SetRotation(nOldRot, nNewRot, rRotation.GetUnrotatedSize());
diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx
index f792b9429427..76139243ca92 100644
--- a/sw/source/uibase/shells/grfsh.cxx
+++ b/sw/source/uibase/shells/grfsh.cxx
@@ -37,6 +37,7 @@
#include <svx/grfflt.hxx>
#include <svx/compressgraphicdialog.hxx>
#include <svx/tbxcolor.hxx>
+#include <svx/sdangitm.hxx>
#include <drawdoc.hxx>
#include <view.hxx>
#include <wrtsh.hxx>
@@ -393,7 +394,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
const SwRotationGrf& rRotation = aTmpSet.Get(RES_GRFATR_ROTATION);
nCurrentRotation = rRotation.GetValue();
aUnrotatedSize = rRotation.GetUnrotatedSize();
- aSet.Put(SfxInt32Item(SID_ATTR_TRANSFORM_ANGLE, nCurrentRotation * 10));
+ aSet.Put(SdrAngleItem(SID_ATTR_TRANSFORM_ANGLE, nCurrentRotation * 10));
}
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
@@ -510,7 +511,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
// RotGrfFlyFrame: Get and process evtl. changed RotationAngle
if ( SfxItemState::SET == pSet->GetItemState(SID_ATTR_TRANSFORM_ANGLE, false, &pItem ))
{
- const sal_Int32 aNewRotation((static_cast<const SfxInt32Item*>(pItem)->GetValue() / 10) % 3600);
+ const sal_Int32 aNewRotation((static_cast<const SdrAngleItem*>(pItem)->GetValue() / 10) % 3600);
// RotGrfFlyFrame: Possible rotation change here, SwFlyFrameAttrMgr aMgr is available
aMgr.SetRotation(nCurrentRotation, aNewRotation, aUnrotatedSize);
@@ -989,7 +990,7 @@ void SwGrfShell::GetAttrStateForRotation(SfxItemSet &rSet)
SfxItemSet aSet( rShell.GetAttrPool(), svl::Items<RES_GRFATR_ROTATION, RES_GRFATR_ROTATION>{} );
rShell.GetCurAttr( aSet );
const SwRotationGrf& rRotation = aSet.Get(RES_GRFATR_ROTATION);
- rSet.Put(SfxInt32Item(SID_ATTR_TRANSFORM_ANGLE, rRotation.GetValue() * 10));
+ rSet.Put(SdrAngleItem(SID_ATTR_TRANSFORM_ANGLE, rRotation.GetValue() * 10));
break;
}
default:
diff --git a/sw/source/uibase/shells/slotadd.cxx b/sw/source/uibase/shells/slotadd.cxx
index 06a134b22424..3aa3469db14d 100644
--- a/sw/source/uibase/shells/slotadd.cxx
+++ b/sw/source/uibase/shells/slotadd.cxx
@@ -124,6 +124,7 @@
#include <svx/xlncapit.hxx>
#include <svx/xlinjoit.hxx>
#include <svx/galleryitem.hxx>
+#include <svx/sdangitm.hxx>
#define SFX_TYPEMAP
#include <sfx2/msg.hxx>