summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/FileDefinitionWidgetDraw.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/gdi/FileDefinitionWidgetDraw.cxx')
-rw-r--r--vcl/source/gdi/FileDefinitionWidgetDraw.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/vcl/source/gdi/FileDefinitionWidgetDraw.cxx b/vcl/source/gdi/FileDefinitionWidgetDraw.cxx
index a15010014aa4..06b85f9a2928 100644
--- a/vcl/source/gdi/FileDefinitionWidgetDraw.cxx
+++ b/vcl/source/gdi/FileDefinitionWidgetDraw.cxx
@@ -775,10 +775,12 @@ bool FileDefinitionWidgetDraw::getNativeControlRegion(
if (!pPart)
return false;
- rNativeBoundingRegion = tools::Rectangle(
- rBoundingControlRegion.TopLeft(),
- Size(rBoundingControlRegion.GetWidth() + pPart->mnMarginWidth,
- rBoundingControlRegion.GetHeight() + pPart->mnMarginHeight));
+ long nWidth = std::max(rBoundingControlRegion.GetWidth() + pPart->mnMarginWidth,
+ long(pPart->mnWidth));
+ long nHeight = std::max(rBoundingControlRegion.GetHeight() + pPart->mnMarginHeight,
+ long(pPart->mnHeight));
+
+ rNativeBoundingRegion = tools::Rectangle(aLocation, Size(nWidth, nHeight));
rNativeContentRegion = rNativeBoundingRegion;
return true;
}