summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2009-02-13 00:09:16 +0000
committerKurt Zenker <kz@openoffice.org>2009-02-13 00:09:16 +0000
commit97f8a47f35a6fedb9c4a1f6e5f3e7e1bbe022ae5 (patch)
tree71ba5a4d447c264cbb4f9b6be9ef021cd345c8af
parente9fbb304f600248e87c465fd43cac58e4192f21e (diff)
CWS-TOOLING: integrate CWS fwk101_OOO310
2009-01-26 10:28:54 +0100 pb r266908 : fix: #i98391# nTextWidth could be null
-rw-r--r--uui/source/masterpasscrtdlg.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/uui/source/masterpasscrtdlg.cxx b/uui/source/masterpasscrtdlg.cxx
index c2f4445a2e..da39011b84 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();