diff options
author | Oliver Bolte <obo@openoffice.org> | 2009-02-17 11:10:59 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2009-02-17 11:10:59 +0000 |
commit | 83c5f27a85e57132980c8d4f3d1687089a1eddfe (patch) | |
tree | 679d203184107f22eefd4a8490ae9a7f486bcc59 /uui | |
parent | 39a2c7bd82e014267de6cdce1f5be0a7b0bbc735 (diff) |
CWS-TOOLING: integrate CWS fwk101
2009-01-26 10:28:54 +0100 pb r266908 : fix: #i98391# nTextWidth could be null
Diffstat (limited to 'uui')
-rw-r--r-- | uui/source/masterpasscrtdlg.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/uui/source/masterpasscrtdlg.cxx b/uui/source/masterpasscrtdlg.cxx index d8844381f7a8..2c20991bdc59 100644 --- a/uui/source/masterpasscrtdlg.cxx +++ b/uui/source/masterpasscrtdlg.cxx @@ -115,9 +115,12 @@ MasterPasswordCreateDialog::MasterPasswordCreateDialog Rectangle aRect = aFTMasterPasswordWarning.GetTextRect( aLabelRect, aFTMasterPasswordWarning.GetText() ); long nNewLabelHeight = 0; - for( nNewLabelHeight = ( nTextWidth / nLableWidth + 1 ) * nTextHeight; - nNewLabelHeight < aRect.GetHeight(); - nNewLabelHeight += nTextHeight ) ; + if ( nTextWidth > 0 ) + { + for( nNewLabelHeight = ( nTextWidth / nLableWidth + 1 ) * nTextHeight; + nNewLabelHeight < aRect.GetHeight(); + nNewLabelHeight += nTextHeight ); + } long nDelta = nNewLabelHeight - nLabelHeight; Size aNewDlgSize = GetSizePixel(); |