diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2007-08-03 13:09:04 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2007-08-03 13:09:04 +0000 |
commit | e3f9a73ab318f2857e1d6c96b4bbb91d3b53d580 (patch) | |
tree | df575a2736c93f35cf69d89b44fcbc5c8c9b6ad4 /vcl/source/window | |
parent | ea3cef1303b0e9e200a395ffb05a8fe5c0a00986 (diff) |
INTEGRATION: CWS aquavcl02 (1.258.68); FILE MERGED
2007/07/31 09:16:48 pjanik 1.258.68.4: RESYNC: (1.260-1.261); FILE MERGED
2007/07/12 17:50:22 pl 1.258.68.3: #i79300# change in DrawProgress API, SetBorderStyle can remove border window, removed a now unneeded workaround (flush in ImplCallPaint)
2007/07/11 10:51:16 pjanik 1.258.68.2: RESYNC: (1.258-1.260); FILE MERGED
2007/07/02 11:53:50 pl 1.258.68.1: join from aquavcl01
Diffstat (limited to 'vcl/source/window')
-rw-r--r-- | vcl/source/window/window.cxx | 41 |
1 files changed, 33 insertions, 8 deletions
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 891e4e791470..38afc9e3b1f5 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -4,9 +4,9 @@ * * $RCSfile: window.cxx,v $ * - * $Revision: 1.262 $ + * $Revision: 1.263 $ * - * last change: $Author: hr $ $Date: 2007-07-31 16:09:47 $ + * last change: $Author: hr $ $Date: 2007-08-03 14:09:04 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -2479,9 +2479,6 @@ void Window::ImplCallPaint( const Region* pRegion, USHORT nPaintFlags ) if ( pChildRegion ) delete pChildRegion; - - if( mpWindowImpl->mbFrame && mpWindowImpl->mnNativeBackground ) - Flush(); } // ----------------------------------------------------------------------- @@ -5584,10 +5581,38 @@ void Window::SetBorderStyle( USHORT nBorderStyle ) if ( mpWindowImpl->mpBorderWindow ) { - if ( mpWindowImpl->mpBorderWindow->GetType() == WINDOW_BORDERWINDOW ) - ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->SetBorderStyle( nBorderStyle ); + if( nBorderStyle == WINDOW_BORDER_REMOVEBORDER && + ! mpWindowImpl->mpBorderWindow->mpWindowImpl->mbFrame && + mpWindowImpl->mpBorderWindow->mpWindowImpl->mpParent + ) + { + // this is a little awkward: some controls (e.g. svtools ProgressBar) + // cannot avoid getting constructed with WB_BORDER but want to disable + // borders in case of NWF drawing. So they need a method to remove their border window + Window* pBorderWin = mpWindowImpl->mpBorderWindow; + // remove us as border window's client + pBorderWin->mpWindowImpl->mpClientWindow = NULL; + mpWindowImpl->mpBorderWindow = NULL; + mpWindowImpl->mpRealParent = pBorderWin->mpWindowImpl->mpParent; + // reparent us above the border window + SetParent( pBorderWin->mpWindowImpl->mpParent ); + // set us to the position and size of our previous border + Point aBorderPos( pBorderWin->GetPosPixel() ); + Size aBorderSize( pBorderWin->GetSizePixel() ); + SetPosSizePixel( aBorderPos.X(), aBorderPos.Y(), aBorderSize.Width(), aBorderSize.Height() ); + // release border window + delete pBorderWin; + + // set new style bits + SetStyle( GetStyle() & (~WB_BORDER) ); + } else - mpWindowImpl->mpBorderWindow->SetBorderStyle( nBorderStyle ); + { + if ( mpWindowImpl->mpBorderWindow->GetType() == WINDOW_BORDERWINDOW ) + ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->SetBorderStyle( nBorderStyle ); + else + mpWindowImpl->mpBorderWindow->SetBorderStyle( nBorderStyle ); + } } } |