summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorCarsten Driesner <cd@openoffice.org>2011-03-09 10:03:44 +0100
committerCarsten Driesner <cd@openoffice.org>2011-03-09 10:03:44 +0100
commitc2e4254b329463732e203e8e7f3cd57c592990e8 (patch)
treea10104dfeb3b7f6a74674ff4d3cb25fd2450421b /toolkit
parent20755856d6007b9f4316c6ba2a571b26d0de85da (diff)
fwk167: #i87596# Remove decoration on windowResized() only in design mode. VCL works without decoration and so does the toolkit. In design mode the drawing layer wants to include the decoration. So using mbDesignMode helps to complete the fix
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/source/controls/dialogcontrol.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx
index 15eeb2aa1939..e507267c1aed 100644
--- a/toolkit/source/controls/dialogcontrol.cxx
+++ b/toolkit/source/controls/dialogcontrol.cxx
@@ -354,7 +354,10 @@ throw (::com::sun::star::uno::RuntimeException)
Reference< XControl > xDialogControl( *this, UNO_QUERY_THROW );
Reference< XDevice > xDialogDevice( xDialogControl->getPeer(), UNO_QUERY );
OSL_ENSURE( xDialogDevice.is(), "UnoDialogControl::windowResized: no peer, but a windowResized event?" );
- if ( xDialogDevice.is() )
+
+ // #i87592 In design mode the drawing layer works with sizes with decoration.
+ // Therefore we have to substract them before writing back to the properties (model).
+ if ( xDialogDevice.is() && mbDesignMode )
{
DeviceInfo aDeviceInfo( xDialogDevice->getInfo() );
aAppFontSize.Width() -= aDeviceInfo.LeftInset + aDeviceInfo.RightInset;