diff options
Diffstat (limited to 'svx/source/sidebar')
-rw-r--r-- | svx/source/sidebar/possize/PosSizePropertyPanel.cxx | 11 | ||||
-rw-r--r-- | svx/source/sidebar/possize/PosSizePropertyPanel.hxx | 2 |
2 files changed, 10 insertions, 3 deletions
diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx index 026fb8c55aaa..11e4f005ffa2 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 5aa420116325..21ada21e093d 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 |