[Libreoffice-commits] core.git: svx/source
Rishabh
kris.kr296 at gmail.com
Fri Feb 12 10:05:37 CET 2016
svx/source/sidebar/possize/PosSizePropertyPanel.cxx | 11 +++++++++--
svx/source/sidebar/possize/PosSizePropertyPanel.hxx | 2 +-
2 files changed, 10 insertions(+), 3 deletions(-)
New commits:
commit 0acbf9404a40e5ca87642af299218846d51cf009
Author: Rishabh <kris.kr296 at gmail.com>
Date: Thu Feb 11 03:49:37 2016 +0530
tdf#82396:Incorrect behavior on update of Size values in sidebar
Added limits for Width and Height
Change-Id: I2aa80c86aeca826009b4594e5e9a0d5ed7f67ef9
Reviewed-on: https://gerrit.libreoffice.org/22274
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>
diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
index 026fb8c..11e4f00 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
@@ -917,7 +917,7 @@ void PosSizePropertyPanel::MetricState( SfxItemState eState, const SfxPoolItem*
SetFieldUnit( *mpMtrPosY, meDlgUnit, true );
if(bPosYBlank)
mpMtrPosY->SetText(OUString());
- SetPosXYMinMax();
+ SetPosSizeMinMax();
if (mpMtrWidth->GetText().isEmpty())
bWidthBlank = true;
@@ -1051,7 +1051,7 @@ void PosSizePropertyPanel::DisableControls()
}
}
-void PosSizePropertyPanel::SetPosXYMinMax()
+void PosSizePropertyPanel::SetPosSizeMinMax()
{
SdrPageView* pPV = mpView->GetSdrPageView();
if (!pPV)
@@ -1096,6 +1096,13 @@ void PosSizePropertyPanel::SetPosXYMinMax()
mpMtrPosY->SetFirst(basegfx::fround64(fTop));
mpMtrPosY->SetMax(basegfx::fround64(fBottom));
mpMtrPosY->SetLast(basegfx::fround64(fBottom));
+
+ double fMaxWidth = maWorkArea.getWidth() - (maRect.getMinX() - fLeft);
+ double fMaxHeight = maWorkArea.getHeight() - (maRect.getMinY() - fTop);
+ mpMtrWidth->SetMax(basegfx::fround64(fMaxWidth));
+ mpMtrWidth->SetLast(basegfx::fround64(fMaxWidth));
+ mpMtrHeight->SetMax(basegfx::fround64(fMaxHeight));
+ mpMtrHeight->SetLast(basegfx::fround64(fMaxHeight));
}
void PosSizePropertyPanel::UpdateUIScale()
diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx
index 5aa4201..21ada21 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx
@@ -167,7 +167,7 @@ private:
void MetricState( SfxItemState eState, const SfxPoolItem* pState );
static FieldUnit GetCurrentUnit( SfxItemState eState, const SfxPoolItem* pState );
void DisableControls();
- void SetPosXYMinMax();
+ void SetPosSizeMinMax();
/** Check if the UI scale has changed and handle such a change.
UI scale is an SD only feature. The UI scale is represented by items
More information about the Libreoffice-commits
mailing list