[Libreoffice-commits] core.git: sd/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Fri Jan 1 07:58:10 UTC 2021


 sd/source/ui/dlg/copydlg.cxx |    5 +++--
 sd/source/ui/func/fucopy.cxx |    3 ++-
 2 files changed, 5 insertions(+), 3 deletions(-)

New commits:
commit f3805d006356651eb2fbac188457d6f89813f8db
Author:     Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Wed Dec 30 14:13:20 2020 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Jan 1 08:57:27 2021 +0100

    use SdrAngleItem for ATTR_COPY_ANGLE
    
    Change-Id: Ieea4d18cec6fd46d2f8d5f58f6246857e07f2129
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108520
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sd/source/ui/dlg/copydlg.cxx b/sd/source/ui/dlg/copydlg.cxx
index 398f9e4ee567..e1e26a542767 100644
--- a/sd/source/ui/dlg/copydlg.cxx
+++ b/sd/source/ui/dlg/copydlg.cxx
@@ -20,6 +20,7 @@
 #include <copydlg.hxx>
 #include <svx/colorbox.hxx>
 #include <svx/svdpagv.hxx>
+#include <svx/sdangitm.hxx>
 #include <sfx2/module.hxx>
 #include <svx/xcolit.hxx>
 #include <svl/intitem.hxx>
@@ -131,7 +132,7 @@ void CopyDlg::Reset()
         SetMetricValue( *m_xMtrFldMoveY, tools::Long(nMoveY / maUIScale), MapUnit::Map100thMM);
 
         if( SfxItemState::SET == mrOutAttrs.GetItemState( ATTR_COPY_ANGLE, true, &pPoolItem ) )
-            m_xMtrFldAngle->set_value(static_cast<const SfxInt32Item*>( pPoolItem )->GetValue(), FieldUnit::NONE);
+            m_xMtrFldAngle->set_value(static_cast<const SdrAngleItem*>( pPoolItem )->GetValue(), FieldUnit::NONE);
         else
             m_xMtrFldAngle->set_value(0, FieldUnit::NONE);
 
@@ -187,7 +188,7 @@ void CopyDlg::GetAttr( SfxItemSet& rOutAttrs )
     rOutAttrs.Put( SfxUInt16Item( ATTR_COPY_NUMBER, static_cast<sal_uInt16>(m_xNumFldCopies->get_value()) ) );
     rOutAttrs.Put( SfxInt32Item( ATTR_COPY_MOVE_X, nMoveX ) );
     rOutAttrs.Put( SfxInt32Item( ATTR_COPY_MOVE_Y, nMoveY ) );
-    rOutAttrs.Put( SfxInt32Item( ATTR_COPY_ANGLE, static_cast<sal_Int32>(m_xMtrFldAngle->get_value(FieldUnit::DEGREE)) ) );
+    rOutAttrs.Put( SdrAngleItem( ATTR_COPY_ANGLE, static_cast<sal_Int32>(m_xMtrFldAngle->get_value(FieldUnit::DEGREE)) ) );
     rOutAttrs.Put( SfxInt32Item( ATTR_COPY_WIDTH, nWidth ) );
     rOutAttrs.Put( SfxInt32Item( ATTR_COPY_HEIGHT, nHeight ) );
 
diff --git a/sd/source/ui/func/fucopy.cxx b/sd/source/ui/func/fucopy.cxx
index 8a10daaec5d6..ba50612dce3d 100644
--- a/sd/source/ui/func/fucopy.cxx
+++ b/sd/source/ui/func/fucopy.cxx
@@ -33,6 +33,7 @@
 #include <svx/xflclit.hxx>
 #include <svx/xdef.hxx>
 #include <svx/xfillit0.hxx>
+#include <svx/sdangitm.hxx>
 #include <sfx2/request.hxx>
 #include <sdabstdlg.hxx>
 #include <memory>
@@ -135,7 +136,7 @@ void FuCopy::DoExecute( SfxRequest& rReq )
     if( pArgs && SfxItemState::SET == pArgs->GetItemState( ATTR_COPY_MOVE_Y, true, &pPoolItem ) )
         lSizeY = static_cast<const SfxInt32Item*>( pPoolItem )->GetValue();
     if( pArgs && SfxItemState::SET == pArgs->GetItemState( ATTR_COPY_ANGLE, true, &pPoolItem ) )
-        lAngle = static_cast<const SfxInt32Item*>( pPoolItem )->GetValue();
+        lAngle = static_cast<const SdrAngleItem*>( pPoolItem )->GetValue();
 
     // scale
     if( pArgs && SfxItemState::SET == pArgs->GetItemState( ATTR_COPY_WIDTH, true, &pPoolItem ) )


More information about the Libreoffice-commits mailing list