summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2008-04-03 14:49:34 +0000
committerKurt Zenker <kz@openoffice.org>2008-04-03 14:49:34 +0000
commit675420b402cb9cdf8880f08f4cda3287abc856df (patch)
tree48f1a18b06daaabb40fcf4ffaf0f8dcde37c9059 /vcl
parent4bf12cba85869110be8b65042e4cf327503e2852 (diff)
INTEGRATION: CWS presenterview (1.263.40); FILE MERGED
2008/03/26 10:49:54 cl 1.263.40.6: RESYNC: (1.274-1.276); FILE MERGED 2008/02/26 09:05:54 af 1.263.40.5: RESYNC: (1.267-1.274); FILE MERGED 2007/12/13 10:31:12 af 1.263.40.4: RESYNC: (1.264-1.267); FILE MERGED 2007/10/31 14:47:32 af 1.263.40.3: #i82554# Correct positioning of system child windows. 2007/10/17 15:17:28 af 1.263.40.2: RESYNC: (1.263-1.264); FILE MERGED 2007/10/12 13:25:56 pl 1.263.40.1: #i82554# add WB_SYSTEMCHILDWINDOW
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/window.cxx38
1 files changed, 32 insertions, 6 deletions
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 6a1a014c0ac3..6b3e739827ae 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: window.cxx,v $
*
- * $Revision: 1.276 $
+ * $Revision: 1.277 $
*
- * last change: $Author: kz $ $Date: 2008-03-06 19:11:25 $
+ * last change: $Author: kz $ $Date: 2008-04-03 15:49:34 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -797,10 +797,21 @@ void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSyste
if ( !mpWindowImpl->mbOverlapWin && pParent && (pParent->GetStyle() & WB_3DLOOK) )
nStyle |= WB_3DLOOK;
- // Wenn wir einen Border haben, muessen wir ein BorderWindow anlegen
- if ( !mpWindowImpl->mbFrame && !mpWindowImpl->mbBorderWin && !mpWindowImpl->mpBorderWindow && (nStyle & WB_BORDER) )
+ // create border window if necessary
+ if ( !mpWindowImpl->mbFrame && !mpWindowImpl->mbBorderWin && !mpWindowImpl->mpBorderWindow
+ && (nStyle & (WB_BORDER | WB_SYSTEMCHILDWINDOW) ) )
{
- ImplBorderWindow* pBorderWin = new ImplBorderWindow( pParent, nStyle & (WB_BORDER | WB_DIALOGCONTROL | WB_NODIALOGCONTROL) );
+ USHORT nBorderTypeStyle = 0;
+ if( (nStyle & WB_SYSTEMCHILDWINDOW) )
+ {
+ // handle WB_SYSTEMCHILDWINDOW
+ // these should be analogous to a top level frame; meaning they
+ // should have a border window with style BORDERWINDOW_STYLE_FRAME
+ // which controls their size
+ nBorderTypeStyle |= BORDERWINDOW_STYLE_FRAME;
+ nStyle |= WB_BORDER;
+ }
+ ImplBorderWindow* pBorderWin = new ImplBorderWindow( pParent, nStyle & (WB_BORDER | WB_DIALOGCONTROL | WB_NODIALOGCONTROL), nBorderTypeStyle );
((Window*)pBorderWin)->mpWindowImpl->mpClientWindow = this;
pBorderWin->GetBorder( mpWindowImpl->mnLeftBorder, mpWindowImpl->mnTopBorder, mpWindowImpl->mnRightBorder, mpWindowImpl->mnBottomBorder );
mpWindowImpl->mpBorderWindow = pBorderWin;
@@ -864,6 +875,9 @@ void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSyste
if( nStyle & WB_NOSHADOW )
nFrameStyle |= SAL_FRAME_STYLE_NOSHADOW;
+ if( nStyle & WB_SYSTEMCHILDWINDOW )
+ nFrameStyle |= SAL_FRAME_STYLE_SYSTEMCHILD;
+
switch (mpWindowImpl->mnType)
{
case WINDOW_DIALOG:
@@ -885,7 +899,7 @@ void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSyste
pParentFrame = pParent->mpWindowImpl->mpFrame;
SalFrame* pFrame;
if ( pSystemParentData )
- pFrame = pSVData->mpDefInst->CreateChildFrame( pSystemParentData, nFrameStyle | SAL_FRAME_STYLE_CHILD );
+ pFrame = pSVData->mpDefInst->CreateChildFrame( pSystemParentData, nFrameStyle | SAL_FRAME_STYLE_PLUG );
else
pFrame = pSVData->mpDefInst->CreateFrame( pParentFrame, nFrameStyle );
if ( !pFrame )
@@ -7242,6 +7256,11 @@ void Window::SetPosSizePixel( long nX, long nY,
if( nFlags & WINDOW_POSSIZE_X )
{
nSysFlags |= SAL_FRAME_POSSIZE_X;
+ if( pWindow->GetParent() && (pWindow->GetStyle() & WB_SYSTEMCHILDWINDOW) )
+ {
+ Window* pParent = pWindow->GetParent();
+ nX += pParent->mnOutOffX;
+ }
if( GetParent() && GetParent()->ImplHasMirroredGraphics() && !GetParent()->IsRTLEnabled() )
{
// --- RTL --- (re-mirror at parent window)
@@ -7277,7 +7296,14 @@ void Window::SetPosSizePixel( long nX, long nY,
}
}
if( nFlags & WINDOW_POSSIZE_Y )
+ {
nSysFlags |= SAL_FRAME_POSSIZE_Y;
+ if( pWindow->GetParent() && (pWindow->GetStyle() & WB_SYSTEMCHILDWINDOW) )
+ {
+ Window* pParent = pWindow->GetParent();
+ nY += pParent->mnOutOffY;
+ }
+ }
if( nSysFlags & (SAL_FRAME_POSSIZE_WIDTH|SAL_FRAME_POSSIZE_HEIGHT) )
{