diff options
Diffstat (limited to 'sfx2/source/dialog/splitwin.cxx')
-rw-r--r-- | sfx2/source/dialog/splitwin.cxx | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx index 2d5c98bd1b..f2f363394e 100644 --- a/sfx2/source/dialog/splitwin.cxx +++ b/sfx2/source/dialog/splitwin.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -35,7 +36,6 @@ #include <string> // HACK: prevent conflict between STLPORT and Workshop headers -#ifndef _WRKWIN_HXX //autogen #include <vcl/wrkwin.hxx> #endif #include <unotools/viewoptions.hxx> @@ -60,7 +60,7 @@ using namespace ::rtl; #define VERSION 1 #define nPixel 30L -#define USERITEM_NAME OUString::createFromAscii( "UserItem" ) +#define USERITEM_NAME OUString(RTL_CONSTASCII_USTRINGPARAM("UserItem")) struct SfxDock_Impl { @@ -618,6 +618,7 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize // Das Fenster mu\s vor dem ersten Fenster eingef"ugt werden, das die // gleiche oder eine gr"o\sere Position hat als pDockWin. USHORT nCount = pDockArr->Count(); + USHORT nLastWindowIdx(0); // Wenn gar kein Fenster gefunden wird, wird als erstes eingef"ugt USHORT nInsertPos = 0; @@ -631,6 +632,7 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize // Wenn kein geeignetes Fenster hinter der gew"unschten Einf"ugeposition // gefunden wird, wird am Ende eingef"ugt nInsertPos = nCount; + nLastWindowIdx = n; USHORT nL=0, nP=0; GetWindowPos( pD->pWin, nL, nP ); @@ -646,11 +648,15 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize pDock->bNewLine = TRUE; } - nInsertPos = n; + nInsertPos = n != 0 ? nLastWindowIdx + 1 : 0; // ignore all non-windows after the last window break; } } } + if (nCount != 0 && nInsertPos == nCount && nLastWindowIdx != nCount - 1) + { + nInsertPos = nLastWindowIdx + 1; // ignore all non-windows after the last window + } pDockArr->Insert(pDock, nInsertPos); InsertWindow_Impl( pDock, rSize, nLine, nPos, bNewLine ); @@ -1302,3 +1308,4 @@ void SfxSplitWindow::SetActiveWindow_Impl( SfxDockingWindow* pWin ) } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |