[Libreoffice-commits] core.git: sd/source sd/uiconfig
Laurent Balland-Poirier
laurent.balland-poirier at laposte.net
Sun Aug 13 11:48:55 UTC 2017
sd/source/ui/dlg/copydlg.cxx | 19 +++++++++++++++++++
sd/uiconfig/sdraw/ui/copydlg.ui | 4 ++--
2 files changed, 21 insertions(+), 2 deletions(-)
New commits:
commit 0b133fdb67cc56fba46ec355283144e611e8bf83
Author: Laurent Balland-Poirier <laurent.balland-poirier at laposte.net>
Date: Sat Apr 22 01:22:11 2017 +0200
tdf#61561 Increase limitation placement and enlargement
Limit placement to +/- page size
Limit enlargement to - object size/+ page size
Change-Id: I180dc8dfd3ce24e917b9e0893bb640aa9995293b
Reviewed-on: https://gerrit.libreoffice.org/36815
Tested-by: Jenkins <ci at libreoffice.org>
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 80209f44ddf1..fc39e1b57777 100644
--- a/sd/source/ui/dlg/copydlg.cxx
+++ b/sd/source/ui/dlg/copydlg.cxx
@@ -124,6 +124,25 @@ void CopyDlg::dispose()
*/
void CopyDlg::Reset()
{
+ // Set Min/Max values
+ ::tools::Rectangle aRect = mpView->GetAllMarkedRect();
+ Size aPageSize = mpView->GetSdrPageView()->GetPage()->GetSize();
+ SetMetricValue( *m_pMtrFldMoveX, Fraction(1000000L) / maUIScale, MapUnit::Map100thMM);
+ double fScaleFactor = m_pMtrFldMoveX->GetValue()/1000000.0;
+
+ long nPageWidth = aPageSize.Width() * fScaleFactor;
+ long nPageHeight = aPageSize.Height() * fScaleFactor;
+ long nRectWidth = aRect.GetWidth() * fScaleFactor;
+ long nRectHeight = aRect.GetHeight() * fScaleFactor;
+ m_pMtrFldMoveX->SetMin( -nPageWidth );
+ m_pMtrFldMoveX->SetMax( nPageWidth );
+ m_pMtrFldMoveY->SetMin( -nPageHeight );
+ m_pMtrFldMoveY->SetMax( nPageHeight );
+ m_pMtrFldWidth->SetMin( -nRectWidth );
+ m_pMtrFldWidth->SetMax( nPageWidth );
+ m_pMtrFldHeight->SetMin( -nRectHeight );
+ m_pMtrFldHeight->SetMax( nPageHeight );
+
const SfxPoolItem* pPoolItem = nullptr;
OUString aStr( GetExtraData() );
diff --git a/sd/uiconfig/sdraw/ui/copydlg.ui b/sd/uiconfig/sdraw/ui/copydlg.ui
index 87baa25e17ae..8ba01c9f8aa3 100644
--- a/sd/uiconfig/sdraw/ui/copydlg.ui
+++ b/sd/uiconfig/sdraw/ui/copydlg.ui
@@ -16,8 +16,8 @@
<property name="page_increment">10</property>
</object>
<object class="GtkAdjustment" id="adjustment3">
- <property name="lower">-120</property>
- <property name="upper">120</property>
+ <property name="lower">-1000000</property>
+ <property name="upper">1000000</property>
<property name="step_increment">0.10000000000000001</property>
<property name="page_increment">1</property>
</object>
More information about the Libreoffice-commits
mailing list