diff options
author | Oliver Bolte <obo@openoffice.org> | 2009-02-11 10:53:35 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2009-02-11 10:53:35 +0000 |
commit | 177f85939b7eac38e13263f224cb708ef8a92050 (patch) | |
tree | b6c34e94edbb9d1509b857f097e2fcd71ab40e22 /framework | |
parent | f7fc1a3031b591ab364257dc47032419cbc2d7e2 (diff) |
CWS-TOOLING: integrate CWS vcl98
2009-01-16 15:17:38 +0100 pl r266422 : #i93515# add fix for compiz (thanks cmc)
2009-01-15 10:55:36 +0100 thb r266352 : #i97399# start==end angle means no arc at all
2009-01-14 18:54:37 +0100 pl r266327 : #i96536# #i96396# add: pagescroll for wheel events (thanks mod)
2009-01-14 18:21:06 +0100 pl r266325 : #i96536# #i96396# add: gestures, bracket matching (thanks mod)
2009-01-13 12:03:29 +0100 hdu r266206 : #i98024# preserve glyph zero-advance for artificial bold and vertical layout (thanks CMC!)
2009-01-12 16:32:20 +0100 hdu r266167 : #i97991# fix rotated text: temporary workaround for #i87686#
2009-01-08 17:16:17 +0100 hdu r266028 : #159054# ignore empty ATSULayout
2009-01-08 16:59:05 +0100 hdu r266026 : #159054# prevent invalid ATSUStyle
2009-01-07 19:04:06 +0100 pl r265976 : #158288# add extraction of fonts and individual object streams to pdfunzip
2009-01-07 14:42:17 +0100 pl r265969 : #i93011# workaround our ancient accelerator mechanisms to have deeper child window hirearchies working
2009-01-07 14:39:15 +0100 pl r265967 : #i93011# workaround our ancient accelerator mechanisms to have deeper child window hirearchies working
2009-01-07 11:10:58 +0100 hdu r265956 : #i97522# getPixel() returns COL_BLACK on printers or when out of bounds
2009-01-06 18:41:48 +0100 pl r265938 : #i97696# do not force user password to owner password after all
2009-01-06 18:00:52 +0100 pl r265934 : #i97157# fix a snafu
2009-01-06 13:23:38 +0100 pl r265914 : #i93515# support for _NET_WM_USER_TIME (thanks cmc)
2009-01-06 12:50:37 +0100 hdu r265912 : #i97538# get rid of compiler warnings for complex logical expressions
2009-01-06 12:49:09 +0100 hdu r265911 : #i97538# get rid of compiler warnings for complex logical expressions
2009-01-06 12:14:07 +0100 hdu r265906 : #i97522# implemented AquaSalGraphics::getPixel()
2008-12-18 16:46:59 +0100 pl r265706 : #i96343# reset quick job flag
2008-12-18 16:44:22 +0100 pl r265705 : #i96343# reset quick job flag
2008-12-18 14:08:22 +0100 pl r265688 : #i93241# fix bit field query
2008-12-18 12:41:52 +0100 pl r265682 : #i93241# eliminate useless static locale variable
2008-12-17 19:23:07 +0100 pl r265654 : #i97064# set language to OOo user configured UI language (thanks cmc)
2008-12-17 17:44:38 +0100 hdu r265651 : #i97326# debug-helper: print cairo version
2008-12-17 17:43:15 +0100 hdu r265650 : #i97326# ignore cairo changing the transformation of our FT_FACE
2008-12-17 14:44:32 +0100 pl r265604 : #i93631# refine control positioning
2008-12-17 12:40:39 +0100 hdu r265596 : #i97167# update VCL.xcu for MacOSX for Japanese (thanks maho!)
2008-12-17 11:59:51 +0100 hdu r265592 : #i97317# code movement to prevent needless and expensive construction/destruction in error path
2008-12-17 11:54:43 +0100 hdu r265590 : #i97317# workaround QUARTZ bug with drawing small polygons
2008-12-16 17:57:02 +0100 pl r265567 : #i97138# select num copies when grabbing focus
2008-12-16 17:15:11 +0100 pl r265561 : #i93173# lazy deletion of toolbars
2008-12-16 16:33:51 +0100 pl r265558 : #i93173# lazy deletion of toolbars: reparent floating DockingWindows in doLazyDelete
2008-12-16 13:23:17 +0100 pl r265536 : #i97196# ensure style engine has been loaded (thanks cmc)
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/services/backingwindow.cxx | 55 | ||||
-rw-r--r-- | framework/source/uielement/toolbarmanager.cxx | 3 |
2 files changed, 42 insertions, 16 deletions
diff --git a/framework/source/services/backingwindow.cxx b/framework/source/services/backingwindow.cxx index b6b1624e33..73fef9e21f 100644 --- a/framework/source/services/backingwindow.cxx +++ b/framework/source/services/backingwindow.cxx @@ -595,18 +595,49 @@ void BackingWindow::Resize() maControlRect = Rectangle( Point( (aWindowSize.Width() - aControlSize.Width()) / 2, (aWindowSize.Height() - aControlSize.Height()) / 2 ), aControlSize ); + + maToolbox.calcMinSize(); + Size aTBSize( maToolbox.getMinSize() ); + Point aTBPos( maControlRect.Right() - aTBSize.Width() - 10, + maControlRect.Bottom() - aTBSize.Height() - 10 ); + maToolbox.SetPosSizePixel( aTBPos, aTBSize ); + + // #i93631# squeeze controls so they fit into the box + // this can be necessary due to application font height which has small deviations + // from the size set + const long nWDelta = maWelcomeSize.Height(); + const long nW2Delta = (maWelcomeSize.Height()*3)/2; + const long nPDelta = (maProductSize.Height()*3)/2; + const long nCDelta = (maCreateSize.Height()*3)/2; + const long nBDelta = maButtonImageSize.Height() + 10; + const long nB2Delta = 3*maButtonImageSize.Height()/2; + const long nLastDelta = maButtonImageSize.Height(); + long nDiff = 0; + while( ( maControlRect.Top() + + (nWDelta - nDiff) + + (nW2Delta- nDiff) + + (nPDelta - nDiff) + + (nCDelta - nDiff) + + 3 * (nBDelta - nDiff) + + (nB2Delta- nDiff) + + nLastDelta + ) > aTBPos.Y() ) + { + nDiff++; + } + long nYPos = maControlRect.Top(); - nYPos += (maWelcomeSize.Height()*3)/2; + nYPos += nW2Delta - nDiff; maWelcome.SetPosSizePixel( Point( maControlRect.Left() + nBtnPos, nYPos ), Size( maControlRect.GetWidth() - nBtnPos - 5, (maWelcomeSize.Height()*20)/19 ) ); - nYPos += maWelcomeSize.Height(); + nYPos += nWDelta - nDiff; maProduct.SetPosSizePixel( Point( maControlRect.Left() + nBtnPos, nYPos ), Size( maControlRect.GetWidth() - nBtnPos - 5, (maProductSize.Height()*20)/19 ) ); - nYPos += (maProductSize.Height()*3)/2; + nYPos += nPDelta - nDiff; maCreateText.SetPosSizePixel( Point( maControlRect.Left() + nBtnPos, nYPos ), Size( maControlRect.GetWidth() - nBtnPos - 5, maCreateSize.Height() ) ); - nYPos += (maCreateSize.Height()*3)/2; + nYPos += nCDelta - nDiff; maWriterButton.SetPosSizePixel( Point( maControlRect.Left() + nBtnPos, nYPos ), maButtonImageSize ); maWriterText.SetPosSizePixel( Point( maControlRect.Left() + nBtnPos + maButtonImageSize.Width() + 10, nYPos ), @@ -614,14 +645,14 @@ void BackingWindow::Resize() maCalcButton.SetPosSizePixel( Point( maControlRect.Left() + nBtnPos + mnColumnWidth[0], nYPos ), maButtonImageSize ); maCalcText.SetPosSizePixel( Point( maControlRect.Left() + nBtnPos + maButtonImageSize.Width() + 10 + mnColumnWidth[0], nYPos ), Size( mnColumnWidth[1] - maButtonImageSize.Width() - 10, maButtonImageSize.Height() ) ); - nYPos += maButtonImageSize.Height() + 10; + nYPos += nBDelta - nDiff; maImpressButton.SetPosSizePixel( Point( maControlRect.Left() + nBtnPos, nYPos ), maButtonImageSize ); maImpressText.SetPosSizePixel( Point( maControlRect.Left() + nBtnPos + maButtonImageSize.Width() + 10, nYPos ), Size( mnColumnWidth[0] - maButtonImageSize.Width() - 10, maButtonImageSize.Height() ) ); maDrawButton.SetPosSizePixel( Point( maControlRect.Left() + nBtnPos + mnColumnWidth[0], nYPos ), maButtonImageSize ); maDrawText.SetPosSizePixel( Point( maControlRect.Left() + nBtnPos + maButtonImageSize.Width() + 10 + mnColumnWidth[0], nYPos ), Size( mnColumnWidth[1] - maButtonImageSize.Width() - 10, maButtonImageSize.Height() ) ); - nYPos += maButtonImageSize.Height() + 10; + nYPos += nBDelta - nDiff; maDBButton.SetPosSizePixel( Point( maControlRect.Left() + nBtnPos, nYPos ), maButtonImageSize ); maDBText.SetPosSizePixel( Point( maControlRect.Left() + nBtnPos + maButtonImageSize.Width() + 10, nYPos ), Size( mnColumnWidth[0] - maButtonImageSize.Width() - 10, maButtonImageSize.Height() ) ); @@ -629,21 +660,15 @@ void BackingWindow::Resize() maMathText.SetPosSizePixel( Point( maControlRect.Left() + nBtnPos + maButtonImageSize.Width() + 10 + mnColumnWidth[0], nYPos ), Size( mnColumnWidth[1] - maButtonImageSize.Width() - 10, maButtonImageSize.Height() ) ); - nYPos += 3*maButtonImageSize.Height()/2; + nYPos += nB2Delta - nDiff; maTemplateButton.SetPosSizePixel( Point( maControlRect.Left() + nBtnPos, nYPos ), maButtonImageSize ); maTemplateText.SetPosSizePixel( Point( maControlRect.Left() + nBtnPos + maButtonImageSize.Width() + 10, nYPos ), Size( mnColumnWidth[0]+mnColumnWidth[1] - maButtonImageSize.Width() - 10, maButtonImageSize.Height() ) ); - nYPos += maButtonImageSize.Height() + 10; + nYPos += nBDelta - nDiff; maOpenButton.SetPosSizePixel( Point( maControlRect.Left() + nBtnPos, nYPos ), maButtonImageSize ); maOpenText.SetPosSizePixel( Point( maControlRect.Left() + nBtnPos + maButtonImageSize.Width() + 10, nYPos ), Size( mnColumnWidth[0]+mnColumnWidth[1] - maButtonImageSize.Width() - 10, maButtonImageSize.Height() ) ); - nYPos += maButtonImageSize.Height() + 10; - - maToolbox.calcMinSize(); - Size aTBSize( maToolbox.getMinSize() ); - maToolbox.SetPosSizePixel( Point( maControlRect.Right() - aTBSize.Width() - 10, - maControlRect.Bottom() - aTBSize.Height() - 10 ), - aTBSize ); + nYPos += nBDelta - nDiff; } IMPL_LINK( BackingWindow, ToolboxHdl, void*, EMPTYARG ) diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index 7d75f8a374..d4948a90ce 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -336,7 +336,8 @@ void ToolBarManager::Destroy() delete static_cast< AddonsParams* >( m_pToolBar->GetItemData( nItemId )); } - delete m_pToolBar; + // #i93173# delete toolbar lazily as we can still be in one of its handlers + m_pToolBar->doLazyDelete(); m_pToolBar = 0; } |