summaryrefslogtreecommitdiff
path: root/sfx2/source
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2019-07-10 14:35:24 +0200
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2019-07-11 07:26:00 +0200
commit241dbf223c17800ceff7023452f3b9c79e77ebc0 (patch)
treeff73842de4a45196f4f96f4f4118fe5277d64d92 /sfx2/source
parent4e3304892171a494101c4defc4d805599cf1fc7b (diff)
Warn when LayoutSize constraints were not respected
Change-Id: I5145bc4e10928ed456b36617de3345512b7a35d9 Reviewed-on: https://gerrit.libreoffice.org/75351 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'sfx2/source')
-rw-r--r--sfx2/source/sidebar/DeckLayouter.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/sfx2/source/sidebar/DeckLayouter.cxx b/sfx2/source/sidebar/DeckLayouter.cxx
index 120906307e9a..a27f6f7847ca 100644
--- a/sfx2/source/sidebar/DeckLayouter.cxx
+++ b/sfx2/source/sidebar/DeckLayouter.cxx
@@ -377,6 +377,17 @@ void GetRequestedSizes (
if (xPanel.is())
{
aLayoutSize = xPanel->getHeightForWidth(rContentBox.GetWidth());
+ if (!(0 <= aLayoutSize.Minimum && aLayoutSize.Minimum <= aLayoutSize.Preferred
+ && aLayoutSize.Preferred <= aLayoutSize.Maximum))
+ {
+ SAL_WARN("sfx.sidebar", "Please follow LayoutSize constraints: 0 ≤ "
+ "Minimum ≤ Preferred ≤ Maximum."
+ " Currently: Minimum: "
+ << aLayoutSize.Minimum
+ << " Preferred: " << aLayoutSize.Preferred
+ << " Maximum: " << aLayoutSize.Maximum);
+ }
+
sal_Int32 nWidth = xPanel->getMinimalWidth();
uno::Reference<frame::XDesktop2> xDesktop