2000-09-18 23:08:29 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-10 15:26:21 +00:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2000-09-18 23:08:29 +00:00
|
|
|
*
|
2010-02-12 15:01:35 +01:00
|
|
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
2000-09-18 23:08:29 +00:00
|
|
|
*
|
2008-04-10 15:26:21 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2000-09-18 23:08:29 +00:00
|
|
|
*
|
2008-04-10 15:26:21 +00:00
|
|
|
* This file is part of OpenOffice.org.
|
2000-09-18 23:08:29 +00:00
|
|
|
*
|
2008-04-10 15:26:21 +00:00
|
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
* only, as published by the Free Software Foundation.
|
2000-09-18 23:08:29 +00:00
|
|
|
*
|
2008-04-10 15:26:21 +00:00
|
|
|
* OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Lesser General Public License version 3 for more details
|
|
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
2000-09-18 23:08:29 +00:00
|
|
|
*
|
2008-04-10 15:26:21 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
|
|
* <http://www.openoffice.org/license.html>
|
|
|
|
* for a copy of the LGPLv3 License.
|
2000-09-18 23:08:29 +00:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
2006-09-16 21:03:15 +00:00
|
|
|
// MARKER(update_precomp.py): autogen include statement, do not remove
|
|
|
|
#include "precompiled_sw.hxx"
|
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
#define _SVX_PARAITEM_HXX
|
|
|
|
#define _SVX_TEXTITEM_HXX
|
|
|
|
|
2007-09-27 08:43:09 +00:00
|
|
|
#include <com/sun/star/accessibility/XAccessible.hpp>
|
|
|
|
|
2004-10-04 18:15:02 +00:00
|
|
|
#include <sfx2/viewfrm.hxx>
|
2000-09-18 23:08:29 +00:00
|
|
|
#include <sfx2/progress.hxx>
|
|
|
|
#include <svx/srchdlg.hxx>
|
|
|
|
#include <svx/svdobj.hxx>
|
2000-10-17 08:25:31 +00:00
|
|
|
#include <sfx2/viewsh.hxx>
|
2000-09-18 23:08:29 +00:00
|
|
|
#ifndef _SHL_HXX
|
|
|
|
//#include <tools/shl.hxx>
|
|
|
|
#endif
|
|
|
|
#include <swwait.hxx>
|
|
|
|
#include <swmodule.hxx>
|
|
|
|
#include <fesh.hxx>
|
|
|
|
#include <doc.hxx>
|
|
|
|
#include <rootfrm.hxx>
|
|
|
|
#include <pagefrm.hxx>
|
|
|
|
#include <cntfrm.hxx>
|
|
|
|
#include <viewimp.hxx>
|
|
|
|
#include <frmtool.hxx>
|
|
|
|
#include <viewopt.hxx>
|
|
|
|
#include <dview.hxx>
|
|
|
|
#include <swregion.hxx>
|
|
|
|
#include <hints.hxx>
|
|
|
|
#include <fmtfsize.hxx>
|
|
|
|
#include <docufld.hxx>
|
|
|
|
#include <txtfrm.hxx>
|
|
|
|
#include <layact.hxx>
|
|
|
|
#include <mdiexp.hxx>
|
|
|
|
#include <fntcache.hxx>
|
|
|
|
#include <ptqueue.hxx>
|
|
|
|
#include <tabfrm.hxx>
|
|
|
|
#ifndef _DOCSH_HXX
|
|
|
|
#include <docsh.hxx>
|
|
|
|
#endif
|
|
|
|
#include <pagedesc.hxx>
|
|
|
|
#include <ndole.hxx>
|
|
|
|
#include <ndindex.hxx>
|
2002-02-20 17:14:14 +00:00
|
|
|
#include <accmap.hxx>
|
2003-03-27 14:45:43 +00:00
|
|
|
#include <svtools/colorcfg.hxx>
|
2002-05-06 11:11:40 +00:00
|
|
|
#include <svtools/accessibilityoptions.hxx>
|
2002-11-01 12:23:37 +00:00
|
|
|
#include <accessibilityoptions.hxx>
|
2000-09-18 23:08:29 +00:00
|
|
|
#ifndef _STATSTR_HRC
|
|
|
|
#include <statstr.hrc>
|
|
|
|
#endif
|
2007-08-03 12:40:32 +00:00
|
|
|
#ifndef _COMCORE_HRC
|
|
|
|
#include <comcore.hrc>
|
|
|
|
#endif
|
2003-03-27 14:45:43 +00:00
|
|
|
// OD 14.01.2003 #103492#
|
|
|
|
#include <pagepreviewlayout.hxx>
|
2004-08-02 13:19:04 +00:00
|
|
|
// --> OD 2004-05-24 #i28701#
|
|
|
|
#include <sortedobjs.hxx>
|
|
|
|
#include <anchoredobject.hxx>
|
|
|
|
// <--
|
2006-11-14 14:13:03 +00:00
|
|
|
|
2008-02-19 12:50:15 +00:00
|
|
|
#include "../../ui/inc/view.hxx"
|
2008-03-07 14:00:41 +00:00
|
|
|
#include <PostItMgr.hxx>
|
2006-11-14 14:13:03 +00:00
|
|
|
#include <vcl/virdev.hxx>
|
|
|
|
|
2007-08-03 12:40:32 +00:00
|
|
|
#include <vcl/svapp.hxx>
|
|
|
|
|
2007-06-26 10:58:09 +00:00
|
|
|
// #i74769#
|
|
|
|
#include <svx/sdrpaintwindow.hxx>
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool ViewShell::bLstAct = sal_False;
|
2000-09-18 23:08:29 +00:00
|
|
|
ShellResource *ViewShell::pShellRes = 0;
|
|
|
|
Window *ViewShell::pCareWindow = 0;
|
2007-08-03 12:40:32 +00:00
|
|
|
BitmapEx* ViewShell::pErrorBmp = NULL;
|
|
|
|
BitmapEx* ViewShell::pReplaceBmp = NULL;
|
2000-09-18 23:08:29 +00:00
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bInSizeNotify = sal_False;
|
2000-09-18 23:08:29 +00:00
|
|
|
|
2007-09-27 08:43:09 +00:00
|
|
|
DBG_NAME(LayoutIdle)
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
TYPEINIT0(ViewShell);
|
|
|
|
|
2007-09-27 08:43:09 +00:00
|
|
|
using namespace ::com::sun::star;
|
|
|
|
|
2007-01-22 14:11:13 +00:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// #i72754# 2nd set of Pre/PostPaints
|
|
|
|
// This time it uses the lock counter mnPrePostPaintCount to allow only one activation
|
|
|
|
// and deactivation and mpPrePostOutDev to remember the OutDev from the BeginDrawLayers
|
|
|
|
// call. That way, all places where paint take place can be handled the same way, even
|
|
|
|
// when calling other paint methods. This is the case at the places where SW paints
|
|
|
|
// buffered into VDevs to avoid flicker. Tis is in general problematic and should be
|
|
|
|
// solved once using the BufferedOutput functionality of the DrawView.
|
2000-09-18 23:08:29 +00:00
|
|
|
|
2008-08-19 23:28:32 +00:00
|
|
|
void ViewShell::PrePaint()
|
|
|
|
{
|
|
|
|
// forward PrePaint event from VCL Window to DrawingLayer
|
|
|
|
if(HasDrawView())
|
|
|
|
{
|
|
|
|
Imp()->GetDrawView()->PrePaint();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2007-01-22 14:11:13 +00:00
|
|
|
void ViewShell::DLPrePaint2(const Region& rRegion)
|
2006-11-14 14:13:03 +00:00
|
|
|
{
|
2007-06-26 10:58:09 +00:00
|
|
|
if(0L == mnPrePostPaintCount)
|
2006-11-14 14:13:03 +00:00
|
|
|
{
|
2007-06-26 10:58:09 +00:00
|
|
|
// #i75172# ensure DrawView to use DrawingLayer bufferings
|
|
|
|
if ( !HasDrawView() )
|
|
|
|
MakeDrawView();
|
|
|
|
|
|
|
|
// Prefer window; if tot available, get pOut (e.g. printer)
|
2007-01-22 14:11:13 +00:00
|
|
|
mpPrePostOutDev = (GetWin() ? GetWin() : GetOut());
|
2007-06-26 10:58:09 +00:00
|
|
|
|
|
|
|
// #i74769# use SdrPaintWindow now direct
|
|
|
|
mpTargetPaintWindow = Imp()->GetDrawView()->BeginDrawLayers(mpPrePostOutDev, rRegion);
|
|
|
|
OSL_ENSURE(mpTargetPaintWindow, "BeginDrawLayers: Got no SdrPaintWindow (!)");
|
|
|
|
|
|
|
|
// #i74769# if prerender, save OutDev and redirect to PreRenderDevice
|
|
|
|
if(mpTargetPaintWindow->GetPreRenderDevice())
|
|
|
|
{
|
|
|
|
mpBufferedOut = pOut;
|
|
|
|
pOut = &(mpTargetPaintWindow->GetTargetOutputDevice());
|
|
|
|
}
|
2008-08-19 23:28:32 +00:00
|
|
|
|
|
|
|
// remember original paint MapMode for wrapped FlyFrame paints
|
|
|
|
maPrePostMapMode = pOut->GetMapMode();
|
2006-11-14 14:13:03 +00:00
|
|
|
}
|
|
|
|
|
2007-01-22 14:11:13 +00:00
|
|
|
mnPrePostPaintCount++;
|
2006-11-14 14:13:03 +00:00
|
|
|
}
|
|
|
|
|
2009-01-20 09:49:16 +00:00
|
|
|
void ViewShell::DLPostPaint2(bool bPaintFormLayer)
|
2006-11-14 14:13:03 +00:00
|
|
|
{
|
2007-01-22 14:11:13 +00:00
|
|
|
OSL_ENSURE(mnPrePostPaintCount > 0L, "ViewShell::DLPostPaint2: Pre/PostPaint encapsulation broken (!)");
|
|
|
|
mnPrePostPaintCount--;
|
2006-11-14 14:13:03 +00:00
|
|
|
|
2007-06-26 10:58:09 +00:00
|
|
|
if((0L == mnPrePostPaintCount) && (0 != mpTargetPaintWindow))
|
2006-11-14 14:13:03 +00:00
|
|
|
{
|
2007-06-26 10:58:09 +00:00
|
|
|
// #i74769# restore buffered OutDev
|
|
|
|
if(mpTargetPaintWindow->GetPreRenderDevice())
|
|
|
|
{
|
|
|
|
pOut = mpBufferedOut;
|
|
|
|
}
|
|
|
|
|
|
|
|
// #i74769# use SdrPaintWindow now direct
|
2009-01-20 09:49:16 +00:00
|
|
|
Imp()->GetDrawView()->EndDrawLayers(*mpTargetPaintWindow, bPaintFormLayer);
|
2007-06-26 10:58:09 +00:00
|
|
|
mpTargetPaintWindow = 0;
|
2006-11-14 14:13:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2007-01-22 14:11:13 +00:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
|*
|
|
|
|
|* ViewShell::ImplEndAction()
|
|
|
|
|*
|
|
|
|
|* Letzte Aenderung MA 04. Sep. 96
|
|
|
|
|*
|
|
|
|
******************************************************************************/
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
void ViewShell::ImplEndAction( const sal_Bool bIdleEnd )
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
|
|
|
//Fuer den Drucker gibt es hier nichts zu tun.
|
|
|
|
if ( !GetWin() || IsPreView() )
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
bPaintWorks = sal_True;
|
2000-09-18 23:08:29 +00:00
|
|
|
UISizeNotify();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
bInEndAction = sal_True;
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
//Laeuft hiermit das EndAction der Letzten Shell im Ring?
|
2011-01-17 15:06:54 +01:00
|
|
|
ViewShell::bLstAct = sal_True;
|
2000-09-18 23:08:29 +00:00
|
|
|
ViewShell *pSh = (ViewShell*)this->GetNext();
|
|
|
|
while ( pSh != this )
|
|
|
|
{ if ( pSh->ActionPend() )
|
2011-01-17 15:06:54 +01:00
|
|
|
{ ViewShell::bLstAct = sal_False;
|
2000-09-18 23:08:29 +00:00
|
|
|
pSh = this;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
pSh = (ViewShell*)pSh->GetNext();
|
|
|
|
}
|
|
|
|
|
2008-03-07 14:00:41 +00:00
|
|
|
const bool bIsShellForCheckViewLayout = ( this == GetLayout()->GetCurrShell() );
|
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
SET_CURR_SHELL( this );
|
2006-12-12 15:29:44 +00:00
|
|
|
if ( Imp()->HasDrawView() && !Imp()->GetDrawView()->areMarkHandlesHidden() )
|
2000-09-18 23:08:29 +00:00
|
|
|
Imp()->StartAction();
|
|
|
|
|
|
|
|
if ( Imp()->GetRegion() && Imp()->GetRegion()->GetOrigin() != VisArea() )
|
2009-12-29 09:19:13 +01:00
|
|
|
Imp()->DelRegion();
|
2000-09-18 23:08:29 +00:00
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
const sal_Bool bExtraData = ::IsExtraData( GetDoc() );
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
if ( !bIdleEnd )
|
|
|
|
{
|
|
|
|
SwLayAction aAction( GetLayout(), Imp() );
|
2011-01-17 15:06:54 +01:00
|
|
|
aAction.SetComplete( sal_False );
|
2000-09-18 23:08:29 +00:00
|
|
|
if ( nLockPaint )
|
2011-01-17 15:06:54 +01:00
|
|
|
aAction.SetPaint( sal_False );
|
2000-09-18 23:08:29 +00:00
|
|
|
aAction.SetInputType( INPUT_KEYBOARD );
|
|
|
|
aAction.Action();
|
|
|
|
}
|
|
|
|
|
2008-03-07 14:00:41 +00:00
|
|
|
if ( bIsShellForCheckViewLayout )
|
|
|
|
GetLayout()->CheckViewLayout( GetViewOptions(), &aVisArea );
|
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
//Wenn wir selbst keine Paints erzeugen, so warten wir auf das Paint
|
|
|
|
//vom System. Dann ist das Clipping korrekt gesetzt; Beispiel: verschieben
|
|
|
|
//eines DrawObjektes.
|
2009-12-29 09:19:13 +01:00
|
|
|
if ( Imp()->GetRegion() ||
|
|
|
|
aInvalidRect.HasArea() ||
|
|
|
|
bExtraData )
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
|
|
|
if ( !nLockPaint )
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bPaintsFromSystem = aInvalidRect.HasArea();
|
2000-09-18 23:08:29 +00:00
|
|
|
GetWin()->Update();
|
|
|
|
if ( aInvalidRect.HasArea() )
|
|
|
|
{
|
|
|
|
if ( bPaintsFromSystem )
|
|
|
|
Imp()->AddPaintRect( aInvalidRect );
|
|
|
|
|
|
|
|
ResetInvalidRect();
|
2011-01-17 15:06:54 +01:00
|
|
|
bPaintsFromSystem = sal_True;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
2011-01-17 15:06:54 +01:00
|
|
|
bPaintWorks = sal_True;
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
SwRegionRects *pRegion = Imp()->GetRegion();
|
|
|
|
|
|
|
|
//JP 27.11.97: wer die Selection hided, muss sie aber auch
|
|
|
|
// wieder Showen. Sonst gibt es Paintfehler!
|
|
|
|
// z.B.: addional Mode, Seite vertikal hab zu sehen, in der
|
|
|
|
// Mitte eine Selektion und mit einem anderen Cursor an linken
|
|
|
|
// rechten Rand springen. Ohne ShowCrsr verschwindet die
|
|
|
|
// Selektion
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bShowCrsr = pRegion && IsA( TYPE(SwCrsrShell) );
|
2000-09-18 23:08:29 +00:00
|
|
|
if( bShowCrsr )
|
|
|
|
((SwCrsrShell*)this)->HideCrsrs();
|
|
|
|
|
|
|
|
if ( pRegion )
|
|
|
|
{
|
2010-06-13 15:22:56 +02:00
|
|
|
SwRootFrm* pCurrentLayout = GetLayout();
|
2000-09-18 23:08:29 +00:00
|
|
|
|
2001-11-05 12:43:40 +00:00
|
|
|
Imp()->pRegion = NULL;
|
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
//Erst Invert dann Compress, niemals andersherum!
|
|
|
|
pRegion->Invert();
|
|
|
|
|
|
|
|
pRegion->Compress();
|
|
|
|
|
|
|
|
VirtualDevice *pVout = 0;
|
|
|
|
while ( pRegion->Count() )
|
|
|
|
{
|
|
|
|
SwRect aRect( (*pRegion)[ pRegion->Count() - 1 ] );
|
|
|
|
pRegion->Remove( pRegion->Count() - 1 );
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bPaint = sal_True;
|
2000-09-18 23:08:29 +00:00
|
|
|
if ( IsEndActionByVirDev() )
|
|
|
|
{
|
|
|
|
//virtuelles device erzeugen und einstellen.
|
|
|
|
if ( !pVout )
|
|
|
|
pVout = new VirtualDevice( *GetOut() );
|
|
|
|
MapMode aMapMode( GetOut()->GetMapMode() );
|
|
|
|
pVout->SetMapMode( aMapMode );
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bSizeOK = sal_True;
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
Rectangle aTmp1( aRect.SVRect() );
|
|
|
|
aTmp1 = GetOut()->LogicToPixel( aTmp1 );
|
|
|
|
Rectangle aTmp2( GetOut()->PixelToLogic( aTmp1 ) );
|
|
|
|
if ( aTmp2.Left() > aRect.Left() )
|
|
|
|
aTmp1.Left() = Max( 0L, aTmp1.Left() - 1L );
|
|
|
|
if ( aTmp2.Top() > aRect.Top() )
|
|
|
|
aTmp1.Top() = Max( 0L, aTmp1.Top() - 1L );
|
|
|
|
aTmp1.Right() += 1;
|
|
|
|
aTmp1.Bottom() += 1;
|
|
|
|
aTmp1 = GetOut()->PixelToLogic( aTmp1 );
|
|
|
|
aRect = SwRect( aTmp1 );
|
|
|
|
|
|
|
|
const Size aTmp( pVout->GetOutputSize() );
|
|
|
|
if ( aTmp.Height() < aRect.Height() ||
|
|
|
|
aTmp.Width() < aRect.Width() )
|
|
|
|
{
|
|
|
|
bSizeOK = pVout->SetOutputSize( aRect.SSize() );
|
|
|
|
}
|
|
|
|
if ( bSizeOK )
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
bPaint = sal_False;
|
2007-07-31 16:43:00 +00:00
|
|
|
|
|
|
|
// --> OD 2007-07-26 #i79947#
|
|
|
|
// #i72754# start Pre/PostPaint encapsulation before pOut is changed to the buffering VDev
|
|
|
|
const Region aRepaintRegion(aRect.SVRect());
|
|
|
|
DLPrePaint2(aRepaintRegion);
|
|
|
|
// <--
|
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
OutputDevice *pOld = GetOut();
|
|
|
|
pVout->SetLineColor( pOld->GetLineColor() );
|
|
|
|
pVout->SetFillColor( pOld->GetFillColor() );
|
|
|
|
Point aOrigin( aRect.Pos() );
|
|
|
|
aOrigin.X() = -aOrigin.X(); aOrigin.Y() = -aOrigin.Y();
|
|
|
|
aMapMode.SetOrigin( aOrigin );
|
|
|
|
pVout->SetMapMode( aMapMode );
|
2007-01-22 14:11:13 +00:00
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
pOut = pVout;
|
2002-01-21 08:46:44 +00:00
|
|
|
if ( bPaintsFromSystem )
|
|
|
|
PaintDesktop( aRect );
|
2010-06-13 15:22:56 +02:00
|
|
|
pCurrentLayout->Paint( aRect );
|
2000-09-18 23:08:29 +00:00
|
|
|
pOld->DrawOutDev( aRect.Pos(), aRect.SSize(),
|
|
|
|
aRect.Pos(), aRect.SSize(), *pVout );
|
|
|
|
pOut = pOld;
|
|
|
|
|
2007-01-22 14:11:13 +00:00
|
|
|
// #i72754# end Pre/PostPaint encapsulation when pOut is back and content is painted
|
2009-01-20 09:49:16 +00:00
|
|
|
DLPostPaint2(true);
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
if ( bPaint )
|
2002-01-21 08:46:44 +00:00
|
|
|
{
|
2007-06-26 10:58:09 +00:00
|
|
|
// #i75172# begin DrawingLayer paint
|
|
|
|
// need to do begin/end DrawingLayer preparation for each single rectangle of the
|
|
|
|
// repaint region. I already tried to prepare only once for the whole Region. This
|
|
|
|
// seems to work (and does technically) but fails with transparent objects. Since the
|
|
|
|
// region given to BeginDarwLayers() defines the clip region for DrawingLayer paint,
|
|
|
|
// transparent objects in the single rectangles will indeed be painted multiple times.
|
|
|
|
DLPrePaint2(Region(aRect.SVRect()));
|
|
|
|
|
2002-01-21 08:46:44 +00:00
|
|
|
if ( bPaintsFromSystem )
|
|
|
|
PaintDesktop( aRect );
|
2010-06-13 15:22:56 +02:00
|
|
|
pCurrentLayout->Paint( aRect );
|
2007-06-26 10:58:09 +00:00
|
|
|
|
|
|
|
// #i75172# end DrawingLayer paint
|
2009-01-20 09:49:16 +00:00
|
|
|
DLPostPaint2(true);
|
2002-01-21 08:46:44 +00:00
|
|
|
}
|
2009-12-07 13:59:17 +00:00
|
|
|
|
|
|
|
// --> OD 2009-12-03 #i107365#
|
|
|
|
// Direct paint has been performed. Thus, take care of
|
|
|
|
// transparent child windows.
|
|
|
|
if ( GetWin() )
|
|
|
|
{
|
|
|
|
Window& rWindow = *(GetWin());
|
|
|
|
if(rWindow.IsChildTransparentModeEnabled() && rWindow.GetChildCount())
|
|
|
|
{
|
|
|
|
const Rectangle aRectanglePixel(rWindow.LogicToPixel(aRect.SVRect()));
|
|
|
|
|
|
|
|
for ( sal_uInt16 a(0); a < rWindow.GetChildCount(); a++ )
|
|
|
|
{
|
|
|
|
Window* pCandidate = rWindow.GetChild(a);
|
|
|
|
|
|
|
|
if ( pCandidate && pCandidate->IsPaintTransparent() )
|
|
|
|
{
|
|
|
|
const Rectangle aCandidatePosSizePixel(
|
|
|
|
pCandidate->GetPosPixel(),
|
|
|
|
pCandidate->GetSizePixel());
|
|
|
|
|
|
|
|
if ( aCandidatePosSizePixel.IsOver(aRectanglePixel) )
|
|
|
|
{
|
|
|
|
pCandidate->Invalidate( INVALIDATE_NOTRANSPARENT|INVALIDATE_CHILDREN );
|
|
|
|
pCandidate->Update();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// <--
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
2007-06-26 10:58:09 +00:00
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
delete pVout;
|
2001-11-05 12:43:40 +00:00
|
|
|
delete pRegion;
|
2009-12-29 09:19:13 +01:00
|
|
|
Imp()->DelRegion();
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
if( bShowCrsr )
|
2011-01-17 15:06:54 +01:00
|
|
|
((SwCrsrShell*)this)->ShowCrsrs( sal_True );
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-12-29 09:19:13 +01:00
|
|
|
Imp()->DelRegion();
|
2011-01-17 15:06:54 +01:00
|
|
|
bPaintWorks = sal_True;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
2011-01-17 15:06:54 +01:00
|
|
|
bPaintWorks = sal_True;
|
2000-09-18 23:08:29 +00:00
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
bInEndAction = sal_False;
|
|
|
|
ViewShell::bLstAct = sal_False;
|
2000-09-18 23:08:29 +00:00
|
|
|
Imp()->EndAction();
|
|
|
|
|
|
|
|
|
2006-08-14 15:59:17 +00:00
|
|
|
//Damit sich die automatischen Scrollbars auch richtig anordnen k?nnen
|
2000-09-18 23:08:29 +00:00
|
|
|
//muessen wir die Aktion hier kuenstlich beenden (EndAction loesst ein
|
|
|
|
//Notify aus, und das muss Start-/EndAction rufen um die Scrollbars
|
|
|
|
//klarzubekommen.
|
|
|
|
--nStartAction;
|
|
|
|
UISizeNotify();
|
|
|
|
++nStartAction;
|
|
|
|
|
2002-03-08 12:25:36 +00:00
|
|
|
if( Imp()->IsAccessible() )
|
|
|
|
Imp()->FireAccessibleEvents();
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
|*
|
|
|
|
|* ViewShell::ImplStartAction()
|
|
|
|
|*
|
|
|
|
|* Ersterstellung MA 25. Jul. 94
|
|
|
|
|* Letzte Aenderung MA 25. Jul. 94
|
|
|
|
|*
|
|
|
|
******************************************************************************/
|
|
|
|
|
|
|
|
void ViewShell::ImplStartAction()
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
bPaintWorks = sal_False;
|
2000-09-18 23:08:29 +00:00
|
|
|
Imp()->StartAction();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
|*
|
|
|
|
|* ViewShell::ImplLockPaint(), ImplUnlockPaint()
|
|
|
|
|*
|
|
|
|
|* Ersterstellung MA 11. Jun. 96
|
|
|
|
|* Letzte Aenderung MA 11. Jun. 96
|
|
|
|
|*
|
|
|
|
******************************************************************************/
|
|
|
|
|
|
|
|
void ViewShell::ImplLockPaint()
|
|
|
|
{
|
|
|
|
if ( GetWin() && GetWin()->IsVisible() )
|
2011-01-17 15:06:54 +01:00
|
|
|
GetWin()->EnablePaint( sal_False ); //Auch die Controls abklemmen.
|
2000-09-18 23:08:29 +00:00
|
|
|
Imp()->LockPaint();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
void ViewShell::ImplUnlockPaint( sal_Bool bVirDev )
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
|
|
|
SET_CURR_SHELL( this );
|
|
|
|
if ( GetWin() && GetWin()->IsVisible() )
|
|
|
|
{
|
|
|
|
if ( (bInSizeNotify || bVirDev ) && VisArea().HasArea() )
|
|
|
|
{
|
|
|
|
//Refresh mit virtuellem Device um das Flackern zu verhindern.
|
|
|
|
VirtualDevice *pVout = new VirtualDevice( *pOut );
|
|
|
|
pVout->SetMapMode( pOut->GetMapMode() );
|
|
|
|
Size aSize( VisArea().SSize() );
|
|
|
|
aSize.Width() += 20;
|
|
|
|
aSize.Height()+= 20;
|
|
|
|
if( pVout->SetOutputSize( aSize ) )
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
GetWin()->EnablePaint( sal_True );
|
2000-09-18 23:08:29 +00:00
|
|
|
GetWin()->Validate();
|
|
|
|
|
|
|
|
Imp()->UnlockPaint();
|
|
|
|
pVout->SetLineColor( pOut->GetLineColor() );
|
|
|
|
pVout->SetFillColor( pOut->GetFillColor() );
|
2007-01-22 14:11:13 +00:00
|
|
|
|
|
|
|
// #i72754# start Pre/PostPaint encapsulation before pOut is changed to the buffering VDev
|
|
|
|
const Region aRepaintRegion(VisArea().SVRect());
|
|
|
|
DLPrePaint2(aRepaintRegion);
|
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
OutputDevice *pOld = pOut;
|
|
|
|
pOut = pVout;
|
|
|
|
Paint( VisArea().SVRect() );
|
|
|
|
pOut = pOld;
|
|
|
|
pOut->DrawOutDev( VisArea().Pos(), aSize,
|
|
|
|
VisArea().Pos(), aSize, *pVout );
|
2007-01-22 14:11:13 +00:00
|
|
|
|
|
|
|
// #i72754# end Pre/PostPaint encapsulation when pOut is back and content is painted
|
2009-01-20 09:49:16 +00:00
|
|
|
DLPostPaint2(true);
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
Imp()->UnlockPaint();
|
2011-01-17 15:06:54 +01:00
|
|
|
GetWin()->EnablePaint( sal_True );
|
2000-09-18 23:08:29 +00:00
|
|
|
GetWin()->Invalidate( INVALIDATE_CHILDREN );
|
|
|
|
}
|
|
|
|
delete pVout;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
Imp()->UnlockPaint();
|
2011-01-17 15:06:54 +01:00
|
|
|
GetWin()->EnablePaint( sal_True );
|
2000-09-18 23:08:29 +00:00
|
|
|
GetWin()->Invalidate( INVALIDATE_CHILDREN );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
Imp()->UnlockPaint();
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
|*
|
|
|
|
|* ViewShell::AddPaintRect()
|
|
|
|
|*
|
|
|
|
|* Ersterstellung MA ??
|
|
|
|
|* Letzte Aenderung MA 09. Feb. 97
|
|
|
|
|*
|
|
|
|
******************************************************************************/
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool ViewShell::AddPaintRect( const SwRect & rRect )
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bRet = sal_False;
|
2000-09-18 23:08:29 +00:00
|
|
|
ViewShell *pSh = this;
|
|
|
|
do
|
|
|
|
{
|
2010-06-13 15:22:56 +02:00
|
|
|
if( pSh->Imp() )
|
|
|
|
{
|
2000-09-18 23:08:29 +00:00
|
|
|
if ( pSh->IsPreView() && pSh->GetWin() )
|
|
|
|
::RepaintPagePreview( pSh, rRect );
|
|
|
|
else
|
2010-06-13 15:22:56 +02:00
|
|
|
bRet |= pSh->Imp()->AddPaintRect( rRect );//swmod 080111
|
|
|
|
}
|
2000-09-18 23:08:29 +00:00
|
|
|
pSh = (ViewShell*)pSh->GetNext();
|
|
|
|
} while ( pSh != this );
|
|
|
|
return bRet;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
|*
|
|
|
|
|* ViewShell::InvalidateWindows()
|
|
|
|
|*
|
|
|
|
|* Ersterstellung MA ??
|
|
|
|
|* Letzte Aenderung MA 09. Feb. 97
|
|
|
|
|*
|
|
|
|
******************************************************************************/
|
|
|
|
|
|
|
|
void ViewShell::InvalidateWindows( const SwRect &rRect )
|
|
|
|
{
|
|
|
|
if ( !Imp()->IsCalcLayoutProgress() )
|
|
|
|
{
|
|
|
|
ViewShell *pSh = this;
|
|
|
|
do
|
|
|
|
{
|
|
|
|
if ( pSh->GetWin() )
|
|
|
|
{
|
|
|
|
if ( pSh->IsPreView() )
|
|
|
|
::RepaintPagePreview( pSh, rRect );
|
|
|
|
else if ( pSh->VisArea().IsOver( rRect ) )
|
|
|
|
pSh->GetWin()->Invalidate( rRect.SVRect() );
|
|
|
|
}
|
|
|
|
pSh = (ViewShell*)pSh->GetNext();
|
|
|
|
|
|
|
|
} while ( pSh != this );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
|*
|
|
|
|
|* ViewShell::MakeVisible()
|
|
|
|
|*
|
|
|
|
|* Ersterstellung MA ??
|
|
|
|
|* Letzte Aenderung AMA 10. Okt. 95
|
|
|
|
|*
|
|
|
|
******************************************************************************/
|
|
|
|
|
|
|
|
void ViewShell::MakeVisible( const SwRect &rRect )
|
|
|
|
{
|
2000-10-17 08:25:31 +00:00
|
|
|
if ( !VisArea().IsInside( rRect ) || IsScrollMDI( this, rRect ) || GetCareWin(*this) )
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
|
|
|
if ( !IsViewLocked() )
|
|
|
|
{
|
|
|
|
if( pWin )
|
|
|
|
{
|
2010-12-16 17:09:02 +01:00
|
|
|
const SwFrm* pRoot = GetLayout();
|
2001-09-19 16:09:29 +00:00
|
|
|
int nLoopCnt = 3;
|
|
|
|
long nOldH;
|
|
|
|
do{
|
|
|
|
nOldH = pRoot->Frm().Height();
|
|
|
|
StartAction();
|
|
|
|
ScrollMDI( this, rRect, USHRT_MAX, USHRT_MAX );
|
|
|
|
EndAction();
|
2010-06-13 15:22:56 +02:00
|
|
|
} while( nOldH != pRoot->Frm().Height() && nLoopCnt-- ); //swmod 071108//swmod 071225
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
2009-07-10 14:03:42 +02:00
|
|
|
#ifdef DBG_UTIL
|
2000-09-18 23:08:29 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
//MA: 04. Nov. 94, braucht doch keiner oder??
|
|
|
|
ASSERT( !this, "MakeVisible fuer Drucker wird doch gebraucht?" );
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
|*
|
|
|
|
|* ViewShell::CareChildWindow()
|
|
|
|
|*
|
|
|
|
|* Ersterstellung AMA 10. Okt. 95
|
|
|
|
|* Letzte Aenderung AMA 10. Okt. 95
|
|
|
|
|*
|
|
|
|
******************************************************************************/
|
|
|
|
|
2000-10-17 08:25:31 +00:00
|
|
|
Window* ViewShell::CareChildWin(ViewShell& rVSh)
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
2000-10-17 08:25:31 +00:00
|
|
|
if(rVSh.pSfxViewShell)
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
const sal_uInt16 nId = SvxSearchDialogWrapper::GetChildWindowId();
|
2000-10-17 08:25:31 +00:00
|
|
|
SfxViewFrame* pVFrame = rVSh.pSfxViewShell->GetViewFrame();
|
|
|
|
const SfxChildWindow* pChWin = pVFrame->GetChildWindow( nId );
|
|
|
|
Window *pWin = pChWin ? pChWin->GetWindow() : NULL;
|
|
|
|
if ( pWin && pWin->IsVisible() )
|
|
|
|
return pWin;
|
|
|
|
}
|
2000-09-18 23:08:29 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
|*
|
|
|
|
|* ViewShell::GetPagePos()
|
|
|
|
|*
|
|
|
|
|* Ersterstellung MA ??
|
|
|
|
|* Letzte Aenderung MA 04. Aug. 93
|
|
|
|
|*
|
|
|
|
******************************************************************************/
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
Point ViewShell::GetPagePos( sal_uInt16 nPageNum ) const
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
|
|
|
return GetLayout()->GetPagePos( nPageNum );
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
|*
|
|
|
|
|* ViewShell::GetNumPages()
|
|
|
|
|*
|
|
|
|
|* Ersterstellung MA ??
|
|
|
|
|* Letzte Aenderung MA 20. Apr. 94
|
|
|
|
|*
|
|
|
|
******************************************************************************/
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 ViewShell::GetNumPages()
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
|
|
|
//Es kann sein, das noch kein Layout existiert weil die Methode vom
|
|
|
|
//Root-Ctor gerufen wird.
|
|
|
|
return GetLayout() ? GetLayout()->GetPageNum() : 0;
|
|
|
|
}
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool ViewShell::IsDummyPage( sal_uInt16 nPageNum ) const
|
2002-03-15 10:47:59 +00:00
|
|
|
{
|
|
|
|
return GetLayout() ? GetLayout()->IsDummyPage( nPageNum ) : 0;
|
|
|
|
}
|
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* ViewShell::UpdateFlds()
|
|
|
|
|*
|
|
|
|
|* Ersterstellung BP 04.05.92
|
|
|
|
|* Beschreibung erzwingt ein Update fuer jedes Feld
|
|
|
|
|*
|
|
|
|
|* UpdateFlds benachrichtigt alle Felder mit pNewHt.
|
|
|
|
|* Wenn pNewHt == 0 ist (default), wird der Feldtyp verschickt.
|
|
|
|
|*
|
|
|
|
*************************************************************************/
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
void ViewShell::UpdateFlds(sal_Bool bCloseDB)
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
|
|
|
SET_CURR_SHELL( this );
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bCrsr = ISA(SwCrsrShell);
|
2000-09-18 23:08:29 +00:00
|
|
|
if ( bCrsr )
|
|
|
|
((SwCrsrShell*)this)->StartAction();
|
|
|
|
else
|
|
|
|
StartAction();
|
|
|
|
|
|
|
|
GetDoc()->UpdateFlds(0, bCloseDB);
|
|
|
|
|
|
|
|
if ( bCrsr )
|
|
|
|
((SwCrsrShell*)this)->EndAction();
|
|
|
|
else
|
|
|
|
EndAction();
|
|
|
|
}
|
|
|
|
|
|
|
|
// update all charts, for that exists any table
|
|
|
|
void ViewShell::UpdateAllCharts()
|
|
|
|
{
|
|
|
|
SET_CURR_SHELL( this );
|
|
|
|
// Start-/EndAction handled in the SwDoc-Method!
|
|
|
|
GetDoc()->UpdateAllCharts();
|
|
|
|
}
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool ViewShell::HasCharts() const
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bRet = sal_False;
|
2000-09-18 23:08:29 +00:00
|
|
|
const SwStartNode *pStNd;
|
|
|
|
SwNodeIndex aIdx( *GetDoc()->GetNodes().GetEndOfAutotext().
|
|
|
|
StartOfSectionNode(), 1 );
|
|
|
|
while ( 0 != (pStNd = aIdx.GetNode().GetStartNode()) )
|
|
|
|
{
|
|
|
|
aIdx++;
|
|
|
|
const SwOLENode *pNd = aIdx.GetNode().GetOLENode();
|
|
|
|
if( pNd && pNd->GetChartTblName().Len() )
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
bRet = sal_True;
|
2000-09-18 23:08:29 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return bRet;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* ViewShell::LayoutIdle()
|
|
|
|
|*
|
|
|
|
|* Ersterstellung MA 26. May. 92
|
|
|
|
|* Letzte Aenderung OG 19. Mar. 96
|
|
|
|
|*
|
|
|
|
*************************************************************************/
|
|
|
|
|
|
|
|
void ViewShell::LayoutIdle()
|
|
|
|
{
|
|
|
|
#ifdef TCOVER
|
|
|
|
//fuer TCV-Version: Ende der Startphase des Programmes
|
|
|
|
TCovCall::Idle();
|
|
|
|
#endif
|
|
|
|
if( !pOpt->IsIdle() || !GetWin() ||
|
|
|
|
( Imp()->HasDrawView() && Imp()->GetDrawView()->IsDragObj() ) )
|
|
|
|
return;
|
|
|
|
|
|
|
|
//Kein Idle wenn gerade gedruckt wird.
|
|
|
|
ViewShell *pSh = this;
|
|
|
|
do
|
|
|
|
{ if ( !pSh->GetWin() )
|
|
|
|
return;
|
|
|
|
pSh = (ViewShell*)pSh->GetNext();
|
|
|
|
|
|
|
|
} while ( pSh != this );
|
|
|
|
|
|
|
|
SET_CURR_SHELL( this );
|
|
|
|
|
2009-07-10 14:03:42 +02:00
|
|
|
#ifdef DBG_UTIL
|
2000-09-18 23:08:29 +00:00
|
|
|
// Wenn Test5 gedrueckt ist, wird der IdleFormatierer abgeknipst.
|
|
|
|
if( pOpt->IsTest5() )
|
|
|
|
return;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
{
|
|
|
|
DBG_PROFSTART( LayoutIdle );
|
|
|
|
|
|
|
|
//Cache vorbereiten und restaurieren, damit er nicht versaut wird.
|
|
|
|
SwSaveSetLRUOfst aSave( *SwTxtFrm::GetTxtCache(),
|
|
|
|
SwTxtFrm::GetTxtCache()->GetCurMax() - 50 );
|
2005-11-10 14:57:06 +00:00
|
|
|
// #125243# there are lots of stacktraces indicating that Imp() returns NULL
|
|
|
|
// this ViewShell seems to be invalid - but it's not clear why
|
|
|
|
// this return is only a workaround!
|
2008-11-10 15:06:12 +00:00
|
|
|
DBG_ASSERT(Imp(), "ViewShell already deleted?");
|
2005-11-10 14:57:06 +00:00
|
|
|
if(!Imp())
|
|
|
|
return;
|
2000-09-18 23:08:29 +00:00
|
|
|
SwLayIdle aIdle( GetLayout(), Imp() );
|
|
|
|
DBG_PROFSTOP( LayoutIdle );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-10-15 08:58:59 +00:00
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* DOCUMENT COMPATIBILITY FLAGS
|
|
|
|
|*
|
|
|
|
*************************************************************************/
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
void lcl_InvalidateAllCntnt( ViewShell& rSh, sal_uInt8 nInv )
|
2003-10-15 08:58:59 +00:00
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bCrsr = rSh.ISA(SwCrsrShell);
|
2003-10-15 08:58:59 +00:00
|
|
|
if ( bCrsr )
|
|
|
|
((SwCrsrShell&)rSh).StartAction();
|
|
|
|
else
|
|
|
|
rSh.StartAction();
|
|
|
|
rSh.GetLayout()->InvalidateAllCntnt( nInv );
|
|
|
|
if ( bCrsr )
|
|
|
|
((SwCrsrShell&)rSh).EndAction();
|
|
|
|
else
|
|
|
|
rSh.EndAction();
|
|
|
|
|
|
|
|
rSh.GetDoc()->SetModified();
|
|
|
|
}
|
|
|
|
|
2004-03-31 14:10:49 +00:00
|
|
|
/** local method to invalidate/re-calculate positions of floating screen
|
|
|
|
objects (Writer fly frame and drawing objects), which are anchored
|
|
|
|
to paragraph or to character.
|
|
|
|
|
|
|
|
OD 2004-03-16 #i11860#
|
|
|
|
|
|
|
|
@author OD
|
|
|
|
*/
|
|
|
|
void lcl_InvalidateAllObjPos( ViewShell &_rSh )
|
|
|
|
{
|
|
|
|
const bool bIsCrsrShell = _rSh.ISA(SwCrsrShell);
|
|
|
|
if ( bIsCrsrShell )
|
|
|
|
static_cast<SwCrsrShell&>(_rSh).StartAction();
|
|
|
|
else
|
|
|
|
_rSh.StartAction();
|
|
|
|
|
|
|
|
_rSh.GetLayout()->InvalidateAllObjPos();
|
|
|
|
|
|
|
|
if ( bIsCrsrShell )
|
|
|
|
static_cast<SwCrsrShell&>(_rSh).EndAction();
|
|
|
|
else
|
|
|
|
_rSh.EndAction();
|
|
|
|
|
|
|
|
_rSh.GetDoc()->SetModified();
|
|
|
|
}
|
|
|
|
|
2006-08-14 15:59:17 +00:00
|
|
|
void ViewShell::SetParaSpaceMax( bool bNew )
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
2006-08-14 15:59:17 +00:00
|
|
|
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
|
|
|
|
if( pIDSA->get(IDocumentSettingAccess::PARA_SPACE_MAX) != bNew )
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
|
2006-08-14 15:59:17 +00:00
|
|
|
pIDSA->set(IDocumentSettingAccess::PARA_SPACE_MAX, bNew );
|
2011-01-17 15:06:54 +01:00
|
|
|
const sal_uInt8 nInv = INV_PRTAREA | INV_TABLE | INV_SECTION;
|
2003-10-15 08:58:59 +00:00
|
|
|
lcl_InvalidateAllCntnt( *this, nInv );
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-08-14 15:59:17 +00:00
|
|
|
void ViewShell::SetParaSpaceMaxAtPages( bool bNew )
|
2001-05-03 09:14:42 +00:00
|
|
|
{
|
2006-08-14 15:59:17 +00:00
|
|
|
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
|
|
|
|
if( pIDSA->get(IDocumentSettingAccess::PARA_SPACE_MAX_AT_PAGES) != bNew )
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
|
2006-08-14 15:59:17 +00:00
|
|
|
pIDSA->set(IDocumentSettingAccess::PARA_SPACE_MAX_AT_PAGES, bNew );
|
2011-01-17 15:06:54 +01:00
|
|
|
const sal_uInt8 nInv = INV_PRTAREA | INV_TABLE | INV_SECTION;
|
2006-08-14 15:59:17 +00:00
|
|
|
lcl_InvalidateAllCntnt( *this, nInv );
|
|
|
|
}
|
2001-05-03 09:14:42 +00:00
|
|
|
}
|
|
|
|
|
2006-08-14 15:59:17 +00:00
|
|
|
void ViewShell::SetTabCompat( bool bNew )
|
2001-05-03 09:14:42 +00:00
|
|
|
{
|
2006-08-14 15:59:17 +00:00
|
|
|
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
|
|
|
|
if( pIDSA->get(IDocumentSettingAccess::TAB_COMPAT) != bNew )
|
2001-05-03 09:14:42 +00:00
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
|
2006-08-14 15:59:17 +00:00
|
|
|
pIDSA->set(IDocumentSettingAccess::TAB_COMPAT, bNew );
|
2011-01-17 15:06:54 +01:00
|
|
|
const sal_uInt8 nInv = INV_PRTAREA | INV_SIZE | INV_TABLE | INV_SECTION;
|
2008-01-10 11:31:29 +00:00
|
|
|
lcl_InvalidateAllCntnt( *this, nInv );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-08-14 15:59:17 +00:00
|
|
|
void ViewShell::SetAddExtLeading( bool bNew )
|
2003-10-15 08:58:59 +00:00
|
|
|
{
|
2006-08-14 15:59:17 +00:00
|
|
|
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
|
|
|
|
if ( pIDSA->get(IDocumentSettingAccess::ADD_EXT_LEADING) != bNew )
|
2003-10-15 08:58:59 +00:00
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
|
2006-08-14 15:59:17 +00:00
|
|
|
pIDSA->set(IDocumentSettingAccess::ADD_EXT_LEADING, bNew );
|
|
|
|
SdrModel* pTmpDrawModel = getIDocumentDrawModelAccess()->GetDrawModel();
|
|
|
|
if ( pTmpDrawModel )
|
|
|
|
pTmpDrawModel->SetAddExtLeading( bNew );
|
2011-01-17 15:06:54 +01:00
|
|
|
const sal_uInt8 nInv = INV_PRTAREA | INV_SIZE | INV_TABLE | INV_SECTION;
|
2003-10-15 08:58:59 +00:00
|
|
|
lcl_InvalidateAllCntnt( *this, nInv );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-08-14 15:59:17 +00:00
|
|
|
void ViewShell::SetUseVirDev( bool bNewVirtual )
|
2003-10-15 08:58:59 +00:00
|
|
|
{
|
2006-08-14 15:59:17 +00:00
|
|
|
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
|
|
|
|
if ( pIDSA->get(IDocumentSettingAccess::USE_VIRTUAL_DEVICE) != bNewVirtual )
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
|
2006-08-14 15:59:17 +00:00
|
|
|
// this sets the flag at the document and calls PrtDataChanged
|
|
|
|
IDocumentDeviceAccess* pIDDA = getIDocumentDeviceAccess();
|
|
|
|
pIDDA->setReferenceDeviceType( bNewVirtual, true );
|
|
|
|
}
|
2004-03-23 10:26:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// OD 2004-02-16 #106629# - control, if paragraph and table spacing is added
|
|
|
|
// at bottom of table cells
|
2006-08-14 15:59:17 +00:00
|
|
|
void ViewShell::SetAddParaSpacingToTableCells( bool _bAddParaSpacingToTableCells )
|
2004-03-23 10:26:32 +00:00
|
|
|
{
|
2006-08-14 15:59:17 +00:00
|
|
|
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
|
|
|
|
if ( pIDSA->get(IDocumentSettingAccess::ADD_PARA_SPACING_TO_TABLE_CELLS) != _bAddParaSpacingToTableCells )
|
2004-03-23 10:26:32 +00:00
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
|
2006-08-14 15:59:17 +00:00
|
|
|
pIDSA->set(IDocumentSettingAccess::ADD_PARA_SPACING_TO_TABLE_CELLS, _bAddParaSpacingToTableCells );
|
2011-01-17 15:06:54 +01:00
|
|
|
const sal_uInt8 nInv = INV_PRTAREA;
|
2004-03-23 10:26:32 +00:00
|
|
|
lcl_InvalidateAllCntnt( *this, nInv );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-02-26 16:01:29 +00:00
|
|
|
// OD 06.01.2004 #i11859# - control, if former formatting of text lines with
|
|
|
|
// proportional line spacing is used or not.
|
2006-08-14 15:59:17 +00:00
|
|
|
void ViewShell::SetUseFormerLineSpacing( bool _bUseFormerLineSpacing )
|
2004-02-26 16:01:29 +00:00
|
|
|
{
|
2006-08-14 15:59:17 +00:00
|
|
|
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
|
|
|
|
if ( pIDSA->get(IDocumentSettingAccess::OLD_LINE_SPACING) != _bUseFormerLineSpacing )
|
2004-02-26 16:01:29 +00:00
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
|
2006-08-14 15:59:17 +00:00
|
|
|
pIDSA->set(IDocumentSettingAccess::OLD_LINE_SPACING, _bUseFormerLineSpacing );
|
2011-01-17 15:06:54 +01:00
|
|
|
const sal_uInt8 nInv = INV_PRTAREA;
|
2004-02-26 16:01:29 +00:00
|
|
|
lcl_InvalidateAllCntnt( *this, nInv );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-03-31 14:10:49 +00:00
|
|
|
// OD 2004-03-12 #i11860# - control, if former object positioning is used or not.
|
2006-08-14 15:59:17 +00:00
|
|
|
void ViewShell::SetUseFormerObjectPositioning( bool _bUseFormerObjPos )
|
2004-03-31 14:10:49 +00:00
|
|
|
{
|
2006-08-14 15:59:17 +00:00
|
|
|
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
|
|
|
|
if ( pIDSA->get(IDocumentSettingAccess::USE_FORMER_OBJECT_POS) != _bUseFormerObjPos )
|
2004-03-31 14:10:49 +00:00
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
|
2006-08-14 15:59:17 +00:00
|
|
|
pIDSA->set(IDocumentSettingAccess::USE_FORMER_OBJECT_POS, _bUseFormerObjPos );
|
2004-03-31 14:10:49 +00:00
|
|
|
lcl_InvalidateAllObjPos( *this );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-08-02 13:19:04 +00:00
|
|
|
// OD 2004-05-05 #i28701#
|
2006-08-14 15:59:17 +00:00
|
|
|
void ViewShell::SetConsiderWrapOnObjPos( bool _bConsiderWrapOnObjPos )
|
2004-08-02 13:19:04 +00:00
|
|
|
{
|
2006-08-14 15:59:17 +00:00
|
|
|
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
|
|
|
|
if ( pIDSA->get(IDocumentSettingAccess::CONSIDER_WRAP_ON_OBJECT_POSITION) != _bConsiderWrapOnObjPos )
|
2004-08-02 13:19:04 +00:00
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
|
2006-08-14 15:59:17 +00:00
|
|
|
pIDSA->set(IDocumentSettingAccess::CONSIDER_WRAP_ON_OBJECT_POSITION, _bConsiderWrapOnObjPos );
|
2004-08-02 13:19:04 +00:00
|
|
|
lcl_InvalidateAllObjPos( *this );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-05-11 10:28:41 +00:00
|
|
|
// --> FME #108724#
|
2006-08-14 15:59:17 +00:00
|
|
|
void ViewShell::SetUseFormerTextWrapping( bool _bUseFormerTextWrapping )
|
2004-05-11 10:28:41 +00:00
|
|
|
{
|
2006-08-14 15:59:17 +00:00
|
|
|
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
|
|
|
|
if ( pIDSA->get(IDocumentSettingAccess::USE_FORMER_TEXT_WRAPPING) != _bUseFormerTextWrapping )
|
2004-05-11 10:28:41 +00:00
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
|
2006-08-14 15:59:17 +00:00
|
|
|
pIDSA->set(IDocumentSettingAccess::USE_FORMER_TEXT_WRAPPING, _bUseFormerTextWrapping );
|
2011-01-17 15:06:54 +01:00
|
|
|
const sal_uInt8 nInv = INV_PRTAREA | INV_SIZE | INV_TABLE | INV_SECTION;
|
2004-05-11 10:28:41 +00:00
|
|
|
lcl_InvalidateAllCntnt( *this, nInv );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// <--
|
|
|
|
|
2007-07-10 13:59:22 +00:00
|
|
|
// -> PB 2007-06-11 #i45491#
|
|
|
|
void ViewShell::SetDoNotJustifyLinesWithManualBreak( bool _bDoNotJustifyLinesWithManualBreak )
|
|
|
|
{
|
|
|
|
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
|
|
|
|
if ( pIDSA->get(IDocumentSettingAccess::DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK) != _bDoNotJustifyLinesWithManualBreak )
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
|
2007-07-10 13:59:22 +00:00
|
|
|
pIDSA->set(IDocumentSettingAccess::DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK, _bDoNotJustifyLinesWithManualBreak );
|
2011-01-17 15:06:54 +01:00
|
|
|
const sal_uInt8 nInv = INV_PRTAREA | INV_SIZE | INV_TABLE | INV_SECTION;
|
2007-07-10 13:59:22 +00:00
|
|
|
lcl_InvalidateAllCntnt( *this, nInv );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// <--
|
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
/******************************************************************************
|
|
|
|
|*
|
|
|
|
|* ViewShell::Reformat
|
|
|
|
|*
|
|
|
|
|* Ersterstellung BP ???
|
|
|
|
|* Letzte Aenderung MA 13. Feb. 98
|
|
|
|
|*
|
|
|
|
******************************************************************************/
|
|
|
|
|
|
|
|
void ViewShell::Reformat()
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
// Wir gehen auf Nummer sicher:
|
|
|
|
// Wir muessen die alten Fontinformationen wegschmeissen,
|
|
|
|
// wenn die Druckeraufloesung oder der Zoomfaktor sich aendert.
|
|
|
|
// Init() und Reformat() sind die sichersten Stellen.
|
|
|
|
#ifdef FNTMET
|
|
|
|
aFntMetList.Flush();
|
|
|
|
#else
|
|
|
|
pFntCache->Flush( );
|
|
|
|
#endif
|
|
|
|
|
2002-06-17 13:37:29 +00:00
|
|
|
if( GetLayout()->IsCallbackActionEnabled() )
|
|
|
|
{
|
|
|
|
|
|
|
|
StartAction();
|
2004-02-26 14:37:03 +00:00
|
|
|
GetLayout()->InvalidateAllCntnt( INV_SIZE | INV_POS | INV_PRTAREA );
|
2002-06-17 13:37:29 +00:00
|
|
|
EndAction();
|
|
|
|
}
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
|
2009-01-05 15:33:41 +00:00
|
|
|
void ViewShell::ChgNumberDigits()
|
|
|
|
{
|
|
|
|
SdrModel* pTmpDrawModel = getIDocumentDrawModelAccess()->GetDrawModel();
|
|
|
|
if ( pTmpDrawModel )
|
|
|
|
pTmpDrawModel->ReformatAllTextObjects();
|
|
|
|
Reformat();
|
|
|
|
}
|
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
/******************************************************************************
|
|
|
|
|*
|
|
|
|
|* ViewShell::CalcLayout()
|
|
|
|
|* Vollstaendige Formatierung von Layout und Inhalt.
|
|
|
|
|*
|
|
|
|
|* Ersterstellung MA 31. Jan. 94
|
|
|
|
|* Letzte Aenderung MA 08. Oct. 96
|
|
|
|
|*
|
|
|
|
******************************************************************************/
|
|
|
|
|
|
|
|
void ViewShell::CalcLayout()
|
|
|
|
{
|
|
|
|
SET_CURR_SHELL( this );
|
2011-01-17 15:06:54 +01:00
|
|
|
SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
//Cache vorbereiten und restaurieren, damit er nicht versaut wird.
|
|
|
|
SwSaveSetLRUOfst aSaveLRU( *SwTxtFrm::GetTxtCache(),
|
|
|
|
SwTxtFrm::GetTxtCache()->GetCurMax() - 50 );
|
|
|
|
|
|
|
|
//Progress einschalten wenn noch keiner Lauft.
|
2011-01-17 15:06:54 +01:00
|
|
|
const sal_Bool bEndProgress = SfxProgress::GetActiveProgress( GetDoc()->GetDocShell() ) == 0;
|
2000-09-18 23:08:29 +00:00
|
|
|
if ( bEndProgress )
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nEndPage = GetLayout()->GetPageNum();
|
2000-09-18 23:08:29 +00:00
|
|
|
nEndPage += nEndPage * 10 / 100;
|
|
|
|
::StartProgress( STR_STATSTR_REFORMAT, 0, nEndPage, GetDoc()->GetDocShell() );
|
|
|
|
}
|
|
|
|
|
|
|
|
SwLayAction aAction( GetLayout(), Imp() );
|
2011-01-17 15:06:54 +01:00
|
|
|
aAction.SetPaint( sal_False );
|
|
|
|
aAction.SetStatBar( sal_True );
|
|
|
|
aAction.SetCalcLayout( sal_True );
|
|
|
|
aAction.SetReschedule( sal_True );
|
2000-09-18 23:08:29 +00:00
|
|
|
GetDoc()->LockExpFlds();
|
|
|
|
aAction.Action();
|
|
|
|
GetDoc()->UnlockExpFlds();
|
|
|
|
|
|
|
|
//Das SetNewFldLst() am Doc wurde unterbunden und muss nachgeholt
|
|
|
|
//werden (siehe flowfrm.cxx, txtfld.cxx)
|
|
|
|
if ( aAction.IsExpFlds() )
|
|
|
|
{
|
|
|
|
aAction.Reset();
|
2011-01-17 15:06:54 +01:00
|
|
|
aAction.SetPaint( sal_False );
|
|
|
|
aAction.SetStatBar( sal_True );
|
|
|
|
aAction.SetReschedule( sal_True );
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
SwDocPosUpdate aMsgHnt( 0 );
|
|
|
|
GetDoc()->UpdatePageFlds( &aMsgHnt );
|
2006-08-14 15:59:17 +00:00
|
|
|
GetDoc()->UpdateExpFlds(NULL, true);
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
aAction.Action();
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( VisArea().HasArea() )
|
|
|
|
InvalidateWindows( VisArea() );
|
|
|
|
if ( bEndProgress )
|
|
|
|
::EndProgress( GetDoc()->GetDocShell() );
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
|*
|
|
|
|
|* ViewShell::SetFirstVisPageInvalid()
|
|
|
|
|*
|
|
|
|
|* Ersterstellung MA 19. May. 94
|
|
|
|
|* Letzte Aenderung MA 19. May. 94
|
|
|
|
|*
|
|
|
|
******************************************************************************/
|
|
|
|
|
|
|
|
void ViewShell::SetFirstVisPageInvalid()
|
|
|
|
{
|
|
|
|
ViewShell *pSh = this;
|
|
|
|
do
|
|
|
|
{ pSh->Imp()->SetFirstVisPageInvalid();
|
|
|
|
pSh = (ViewShell*)pSh->GetNext();
|
|
|
|
|
|
|
|
} while ( pSh != this );
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
|*
|
|
|
|
|* ViewShell::SizeChgNotify()
|
|
|
|
|*
|
|
|
|
|* Ersterstellung MA ??
|
|
|
|
|* Letzte Aenderung MA 17. Sep. 96
|
|
|
|
|*
|
|
|
|
******************************************************************************/
|
|
|
|
|
2007-09-27 08:43:09 +00:00
|
|
|
void ViewShell::SizeChgNotify()
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
|
|
|
if ( !pWin )
|
2011-01-17 15:06:54 +01:00
|
|
|
bDocSizeChgd = sal_True;
|
2000-09-18 23:08:29 +00:00
|
|
|
else if( ActionPend() || Imp()->IsCalcLayoutProgress() || bPaintInProgress )
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
bDocSizeChgd = sal_True;
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
if ( !Imp()->IsCalcLayoutProgress() && ISA( SwCrsrShell ) )
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
const SwFrm *pCnt = ((SwCrsrShell*)this)->GetCurrFrm( sal_False );
|
2000-09-18 23:08:29 +00:00
|
|
|
const SwPageFrm *pPage;
|
|
|
|
if ( pCnt && 0 != (pPage = pCnt->FindPageFrm()) )
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nVirtNum = pPage->GetVirtPageNum();
|
2001-02-23 11:45:30 +00:00
|
|
|
const SvxNumberType& rNum = pPage->GetPageDesc()->GetNumType();
|
2000-09-18 23:08:29 +00:00
|
|
|
String sDisplay = rNum.GetNumStr( nVirtNum );
|
|
|
|
PageNumNotify( this, pCnt->GetPhyPageNum(), nVirtNum, sDisplay );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
bDocSizeChgd = sal_False;
|
2008-02-19 12:50:15 +00:00
|
|
|
::SizeNotify( this, GetDocSize() );
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
|*
|
|
|
|
|* ViewShell::VisPortChgd()
|
|
|
|
|*
|
|
|
|
|* Ersterstellung MA ??
|
|
|
|
|* Letzte Aenderung MA 22. Jul. 96
|
|
|
|
|*
|
|
|
|
******************************************************************************/
|
|
|
|
|
|
|
|
void ViewShell::VisPortChgd( const SwRect &rRect)
|
|
|
|
{
|
|
|
|
ASSERT( GetWin(), "VisPortChgd ohne Window." );
|
|
|
|
|
|
|
|
if ( rRect == VisArea() )
|
|
|
|
return;
|
|
|
|
|
2009-07-10 14:03:42 +02:00
|
|
|
#ifdef DBG_UTIL
|
2000-09-18 23:08:29 +00:00
|
|
|
if ( bInEndAction )
|
|
|
|
{
|
|
|
|
//Da Rescheduled doch schon wieder irgendwo einer?
|
|
|
|
ASSERT( !this, "Scroll waehrend einer EndAction." );
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
//Ersteinmal die alte sichtbare Seite holen, dann braucht nacher nicht
|
|
|
|
//lange gesucht werden.
|
|
|
|
const SwFrm *pOldPage = Imp()->GetFirstVisPage();
|
|
|
|
|
|
|
|
const SwRect aPrevArea( VisArea() );
|
2011-01-17 15:06:54 +01:00
|
|
|
const sal_Bool bFull = aPrevArea.IsEmpty();
|
2000-09-18 23:08:29 +00:00
|
|
|
aVisArea = rRect;
|
|
|
|
SetFirstVisPageInvalid();
|
|
|
|
|
|
|
|
//Wenn noch eine PaintRegion herumsteht und sich die VisArea geaendert hat,
|
|
|
|
//so ist die PaintRegion spaetestens jetzt obsolete. Die PaintRegion kann
|
|
|
|
//vom RootFrm::Paint erzeugt worden sein.
|
|
|
|
if ( !bInEndAction &&
|
|
|
|
Imp()->GetRegion() && Imp()->GetRegion()->GetOrigin() != VisArea() )
|
2009-12-29 09:19:13 +01:00
|
|
|
Imp()->DelRegion();
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
SET_CURR_SHELL( this );
|
|
|
|
|
2008-02-19 12:50:15 +00:00
|
|
|
bool bScrolled = false;
|
2008-03-07 14:00:41 +00:00
|
|
|
|
|
|
|
SwPostItMgr* pPostItMgr = GetPostItMgr();
|
2008-02-19 12:50:15 +00:00
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
if ( bFull )
|
|
|
|
GetWin()->Invalidate();
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// Betrag ausrechnen, um den gescrolled werden muss.
|
|
|
|
const long nXDiff = aPrevArea.Left() - VisArea().Left();
|
|
|
|
const long nYDiff = aPrevArea.Top() - VisArea().Top();
|
|
|
|
|
2010-06-13 15:22:56 +02:00
|
|
|
if( !nXDiff && !GetViewOptions()->getBrowseMode() &&
|
2000-09-18 23:08:29 +00:00
|
|
|
(!Imp()->HasDrawView() || !Imp()->GetDrawView()->IsGridVisible() ) )
|
|
|
|
{
|
|
|
|
//Falls moeglich die Wiese nicht mit Scrollen.
|
|
|
|
//Also linke und rechte Kante des Scrollbereiches auf die
|
|
|
|
//Seiten begrenzen.
|
2010-06-13 15:22:56 +02:00
|
|
|
const SwPageFrm *pPage = (SwPageFrm*)GetLayout()->Lower(); //swmod 071108//swmod 071225
|
2000-09-18 23:08:29 +00:00
|
|
|
if ( pPage->Frm().Top() > pOldPage->Frm().Top() )
|
|
|
|
pPage = (SwPageFrm*)pOldPage;
|
|
|
|
SwRect aBoth( VisArea() );
|
|
|
|
aBoth.Union( aPrevArea );
|
|
|
|
const SwTwips nBottom = aBoth.Bottom();
|
|
|
|
SwTwips nMinLeft = LONG_MAX;
|
|
|
|
SwTwips nMaxRight= 0;
|
2008-03-07 14:00:41 +00:00
|
|
|
|
|
|
|
const SwTwips nSidebarWidth = pPostItMgr && pPostItMgr->ShowNotes() && pPostItMgr->HasNotes() ?
|
|
|
|
pPostItMgr->GetSidebarWidth() + pPostItMgr->GetSidebarBorderWidth() :
|
|
|
|
0;
|
|
|
|
const bool bBookMode = GetViewOptions()->IsViewLayoutBookMode();
|
|
|
|
|
|
|
|
while ( pPage && pPage->Frm().Top() <= nBottom )
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
2008-03-07 14:00:41 +00:00
|
|
|
SwRect aPageRect( pPage->Frm() );
|
|
|
|
if ( bBookMode )
|
|
|
|
{
|
|
|
|
const SwPageFrm& rFormatPage = static_cast<const SwPageFrm*>(pPage)->GetFormatPage();
|
|
|
|
aPageRect.SSize() = rFormatPage.Frm().SSize();
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( aPageRect.IsOver( aBoth ) )
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
2003-03-27 14:45:43 +00:00
|
|
|
// OD 12.02.2003 #i9719#, #105645# - consider new border
|
|
|
|
// and shadow width
|
2003-04-01 14:36:54 +00:00
|
|
|
const SwTwips nBorderWidth =
|
2003-03-27 14:45:43 +00:00
|
|
|
GetOut()->PixelToLogic( Size( pPage->BorderPxWidth(), 0 ) ).Width();
|
2003-04-01 14:36:54 +00:00
|
|
|
const SwTwips nShadowWidth =
|
2003-03-27 14:45:43 +00:00
|
|
|
GetOut()->PixelToLogic( Size( pPage->ShadowPxWidth(), 0 ) ).Width();
|
2008-03-07 14:00:41 +00:00
|
|
|
|
2008-02-19 12:50:15 +00:00
|
|
|
SwTwips nPageLeft = 0;
|
|
|
|
SwTwips nPageRight = 0;
|
2010-01-12 10:43:45 +01:00
|
|
|
switch ( pPage->SidebarPosition() )
|
2008-02-19 12:50:15 +00:00
|
|
|
{
|
2010-01-12 10:43:45 +01:00
|
|
|
case sw::sidebarwindows::SIDEBAR_LEFT:
|
|
|
|
{
|
|
|
|
nPageLeft = aPageRect.Left() - nBorderWidth - nSidebarWidth;
|
|
|
|
nPageRight = aPageRect.Right() + nBorderWidth + nShadowWidth;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case sw::sidebarwindows::SIDEBAR_RIGHT:
|
|
|
|
{
|
|
|
|
nPageLeft = aPageRect.Left() - nBorderWidth;
|
|
|
|
nPageRight = aPageRect.Right() + nBorderWidth + nShadowWidth + nSidebarWidth;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case sw::sidebarwindows::SIDEBAR_NONE:
|
|
|
|
// nothing to do
|
|
|
|
break;
|
2008-02-19 12:50:15 +00:00
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
if( nPageLeft < nMinLeft )
|
|
|
|
nMinLeft = nPageLeft;
|
2002-04-08 13:33:17 +00:00
|
|
|
if( nPageRight > nMaxRight )
|
|
|
|
nMaxRight = nPageRight;
|
2000-09-18 23:08:29 +00:00
|
|
|
//Zus. auf die Zeichenobjekte abgleichen.
|
|
|
|
//Einen Ofst beruecksichtigen, weil die Objekte u.U.
|
|
|
|
//selektiert sind und die Henkel dann hinausstehen.
|
|
|
|
if ( pPage->GetSortedObjs() )
|
|
|
|
{
|
|
|
|
const long nOfst = GetOut()->PixelToLogic(
|
|
|
|
Size(Imp()->GetDrawView()->GetMarkHdlSizePixel()/2,0)).Width();
|
2011-01-17 15:06:54 +01:00
|
|
|
for ( sal_uInt16 i = 0;
|
2000-09-18 23:08:29 +00:00
|
|
|
i < pPage->GetSortedObjs()->Count(); ++i )
|
|
|
|
{
|
2004-08-02 13:19:04 +00:00
|
|
|
SwAnchoredObject* pObj = (*pPage->GetSortedObjs())[i];
|
|
|
|
const Rectangle &rBound = pObj->GetObjRect().SVRect();
|
2003-04-01 14:36:54 +00:00
|
|
|
// OD 03.03.2003 #107927# - use correct datatype
|
|
|
|
const SwTwips nL = Max( 0L, rBound.Left() - nOfst );
|
2000-09-18 23:08:29 +00:00
|
|
|
if ( nL < nMinLeft )
|
|
|
|
nMinLeft = nL;
|
|
|
|
if( rBound.Right() + nOfst > nMaxRight )
|
|
|
|
nMaxRight = rBound.Right() + nOfst;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
pPage = (SwPageFrm*)pPage->GetNext();
|
|
|
|
}
|
|
|
|
Rectangle aRect( aPrevArea.SVRect() );
|
|
|
|
aRect.Left() = nMinLeft;
|
|
|
|
aRect.Right() = nMaxRight;
|
|
|
|
if( VisArea().IsOver( aPrevArea ) && !nLockPaint )
|
|
|
|
{
|
2008-02-19 12:50:15 +00:00
|
|
|
bScrolled = true;
|
2000-09-18 23:08:29 +00:00
|
|
|
aVisArea.Pos() = aPrevArea.Pos();
|
|
|
|
if ( SmoothScroll( nXDiff, nYDiff, &aRect ) )
|
|
|
|
return;
|
|
|
|
aVisArea.Pos() = rRect.Pos();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
GetWin()->Invalidate( aRect );
|
|
|
|
}
|
|
|
|
else if ( !nLockPaint ) //Wird im UnLock erledigt
|
|
|
|
{
|
|
|
|
if( VisArea().IsOver( aPrevArea ) )
|
|
|
|
{
|
2008-02-19 12:50:15 +00:00
|
|
|
bScrolled = true;
|
2000-09-18 23:08:29 +00:00
|
|
|
aVisArea.Pos() = aPrevArea.Pos();
|
|
|
|
if ( SmoothScroll( nXDiff, nYDiff, 0 ) )
|
|
|
|
return;
|
|
|
|
aVisArea.Pos() = rRect.Pos();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
GetWin()->Invalidate();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Point aPt( VisArea().Pos() );
|
|
|
|
aPt.X() = -aPt.X(); aPt.Y() = -aPt.Y();
|
|
|
|
MapMode aMapMode( GetWin()->GetMapMode() );
|
|
|
|
aMapMode.SetOrigin( aPt );
|
|
|
|
GetWin()->SetMapMode( aMapMode );
|
|
|
|
if ( HasDrawView() )
|
|
|
|
{
|
|
|
|
Imp()->GetDrawView()->VisAreaChanged( GetWin() );
|
|
|
|
Imp()->GetDrawView()->SetActualWin( GetWin() );
|
|
|
|
}
|
|
|
|
GetWin()->Update();
|
2002-02-20 17:14:14 +00:00
|
|
|
|
2010-02-16 14:30:17 +01:00
|
|
|
// --> OD 2010-02-11 #i88070#
|
|
|
|
if ( pPostItMgr )
|
|
|
|
{
|
|
|
|
pPostItMgr->Rescale();
|
|
|
|
pPostItMgr->CalcRects();
|
|
|
|
pPostItMgr->LayoutPostIts();
|
|
|
|
}
|
|
|
|
// <--
|
|
|
|
|
2008-05-20 17:54:49 +00:00
|
|
|
if ( !bScrolled && pPostItMgr && pPostItMgr->HasNotes() && pPostItMgr->ShowNotes() )
|
2008-02-19 12:50:15 +00:00
|
|
|
pPostItMgr->CorrectPositions();
|
|
|
|
|
2002-02-20 17:14:14 +00:00
|
|
|
if( Imp()->IsAccessible() )
|
|
|
|
Imp()->UpdateAccessible();
|
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
|*
|
|
|
|
|* ViewShell::SmoothScroll()
|
|
|
|
|*
|
|
|
|
|* Ersterstellung MA 04. Jul. 96
|
|
|
|
|* Letzte Aenderung MA 25. Mar. 97
|
|
|
|
|*
|
|
|
|
******************************************************************************/
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool ViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect )
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
const sal_uLong nColCnt = pOut->GetColorCount();
|
2000-09-18 23:08:29 +00:00
|
|
|
long lMult = 1, lMax = LONG_MAX;
|
|
|
|
if ( nColCnt == 65536 )
|
|
|
|
{
|
|
|
|
lMax = 7000;
|
|
|
|
lMult = 2;
|
|
|
|
}
|
|
|
|
if ( nColCnt == 16777216 )
|
|
|
|
{
|
|
|
|
lMax = 5000;
|
|
|
|
lMult = 6;
|
|
|
|
}
|
|
|
|
else if ( nColCnt == 1 )
|
|
|
|
{
|
|
|
|
lMax = 3000;
|
|
|
|
lMult = 12;
|
|
|
|
}
|
|
|
|
|
2007-06-26 10:58:09 +00:00
|
|
|
// #i75172# isolated static conditions
|
|
|
|
const bool bOnlyYScroll(!lXDiff && Abs(lYDiff) != 0 && Abs(lYDiff) < lMax);
|
|
|
|
const bool bAllowedWithChildWindows(GetWin()->GetWindowClipRegionPixel(WINDOW_GETCLIPREGION_NOCHILDREN|WINDOW_GETCLIPREGION_NULL).IsNull());
|
2009-08-27 14:36:29 +00:00
|
|
|
// --> OD 2009-08-12 #i98766# - disable smooth scrolling for Mac port builds
|
|
|
|
#ifdef QUARTZ
|
|
|
|
const bool bSmoothScrollAllowed(false);
|
|
|
|
(void) bOnlyYScroll;
|
|
|
|
(void) bAllowedWithChildWindows;
|
|
|
|
#else
|
2007-06-26 10:58:09 +00:00
|
|
|
const bool bSmoothScrollAllowed(bOnlyYScroll && bEnableSmooth && GetViewOptions()->IsSmoothScroll() && bAllowedWithChildWindows);
|
2009-08-27 14:36:29 +00:00
|
|
|
#endif
|
|
|
|
// <-
|
2007-06-26 10:58:09 +00:00
|
|
|
const bool bIAmCursorShell(ISA(SwCrsrShell));
|
2007-09-27 08:43:09 +00:00
|
|
|
(void) bIAmCursorShell;
|
2007-06-26 10:58:09 +00:00
|
|
|
|
|
|
|
// #i75172# with selection on overlay, smooth scroll should be allowed with it
|
|
|
|
const bool bAllowedForSelection(true || (bIAmCursorShell && !((SwCrsrShell*)this)->HasSelection()));
|
|
|
|
|
|
|
|
// #i75172# with cursors on overlay, smooth scroll should be allowed with it
|
|
|
|
const bool bAllowedForMultipleCursors(true || (bIAmCursorShell && ((SwCrsrShell*)this)->GetCrsrCnt() < 2));
|
|
|
|
|
|
|
|
if(bSmoothScrollAllowed && bAllowedForSelection && bAllowedForMultipleCursors)
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
Imp()->bStopSmooth = sal_False;
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
const SwRect aOldVis( VisArea() );
|
|
|
|
|
|
|
|
//Virtuelles Device erzeugen und einstellen.
|
|
|
|
const Size aPixSz = GetWin()->PixelToLogic(Size(1,1));
|
|
|
|
VirtualDevice *pVout = new VirtualDevice( *GetWin() );
|
|
|
|
pVout->SetLineColor( GetWin()->GetLineColor() );
|
|
|
|
pVout->SetFillColor( GetWin()->GetFillColor() );
|
|
|
|
MapMode aMapMode( GetWin()->GetMapMode() );
|
|
|
|
pVout->SetMapMode( aMapMode );
|
|
|
|
Size aSize( aVisArea.Width()+2*aPixSz.Width(), Abs(lYDiff)+(2*aPixSz.Height()) );
|
|
|
|
if ( pRect )
|
|
|
|
aSize.Width() = Min(aSize.Width(), pRect->GetWidth()+2*aPixSz.Width());
|
|
|
|
if ( pVout->SetOutputSize( aSize ) )
|
|
|
|
{
|
|
|
|
nLockPaint++;
|
|
|
|
|
|
|
|
//Ersteinmal alles neue in das VirDev Painten.
|
|
|
|
SwRect aRect( VisArea() );
|
|
|
|
aRect.Height( aSize.Height() );
|
|
|
|
if ( pRect )
|
|
|
|
{
|
|
|
|
aRect.Pos().X() = Max(aRect.Left(),pRect->Left()-aPixSz.Width());
|
|
|
|
aRect.Right( Min(aRect.Right()+2*aPixSz.Width(), pRect->Right()+aPixSz.Width()));
|
|
|
|
}
|
|
|
|
else
|
|
|
|
aRect.SSize().Width() += 2*aPixSz.Width();
|
|
|
|
aRect.Pos().Y() = lYDiff < 0 ? aOldVis.Bottom() - aPixSz.Height()
|
|
|
|
: aRect.Top() - aSize.Height() + aPixSz.Height();
|
|
|
|
aRect.Pos().X() = Max( 0L, aRect.Left()-aPixSz.Width() );
|
|
|
|
aRect.Pos() = GetWin()->PixelToLogic( GetWin()->LogicToPixel( aRect.Pos()));
|
|
|
|
aRect.SSize()= GetWin()->PixelToLogic( GetWin()->LogicToPixel( aRect.SSize()));
|
|
|
|
aVisArea = aRect;
|
|
|
|
const Point aPt( -aRect.Left(), -aRect.Top() );
|
|
|
|
aMapMode.SetOrigin( aPt );
|
|
|
|
pVout->SetMapMode( aMapMode );
|
|
|
|
OutputDevice *pOld = pOut;
|
|
|
|
pOut = pVout;
|
2007-06-26 10:58:09 +00:00
|
|
|
|
|
|
|
{
|
|
|
|
// #i75172# To get a clean repaint, a new ObjectContact is needed here. Without, the
|
|
|
|
// repaint would not be correct since it would use the wrong DrawPage visible region.
|
|
|
|
// This repaint IS about painting something currently outside the visible part (!).
|
|
|
|
// For that purpose, AddWindowToPaintView is used which creates a new SdrPageViewWindow
|
|
|
|
// and all the necessary stuff. It's not cheap, but necessary here. Alone because repaint
|
|
|
|
// target really is NOT the current window.
|
|
|
|
// Also will automatically NOT use PreRendering and overlay (since target is VirtualDevice)
|
|
|
|
if(!HasDrawView())
|
|
|
|
MakeDrawView();
|
|
|
|
SdrView* pDrawView = GetDrawView();
|
|
|
|
pDrawView->AddWindowToPaintView(pVout);
|
|
|
|
|
|
|
|
// clear pWin during DLPrePaint2 to get paint preparation for pOut, but set it again
|
|
|
|
// immediately afterwards. There are many decisions in SW which imply that Printing
|
|
|
|
// is used when pWin == 0 (wrong but widely used).
|
|
|
|
Window* pOldWin = pWin;
|
|
|
|
pWin = 0;
|
|
|
|
DLPrePaint2(Region(aRect.SVRect()));
|
|
|
|
pWin = pOldWin;
|
|
|
|
|
|
|
|
// SW paint stuff
|
|
|
|
PaintDesktop( aRect );
|
2011-01-17 15:06:54 +01:00
|
|
|
ViewShell::bLstAct = sal_True;
|
2007-06-26 10:58:09 +00:00
|
|
|
GetLayout()->Paint( aRect );
|
2011-01-17 15:06:54 +01:00
|
|
|
ViewShell::bLstAct = sal_False;
|
2007-06-26 10:58:09 +00:00
|
|
|
|
|
|
|
// end paint and destroy ObjectContact again
|
2009-01-20 09:49:16 +00:00
|
|
|
DLPostPaint2(true);
|
2007-06-26 10:58:09 +00:00
|
|
|
pDrawView->DeleteWindowFromPaintView(pVout);
|
|
|
|
|
|
|
|
// temporary debug paint checking...
|
|
|
|
static bool bDoSaveForVisualControl(false);
|
|
|
|
if(bDoSaveForVisualControl)
|
|
|
|
{
|
|
|
|
const bool bMapModeWasEnabledVDev(pVout->IsMapModeEnabled());
|
|
|
|
pVout->EnableMapMode(false);
|
|
|
|
const Bitmap aBitmap(pVout->GetBitmap(Point(), pVout->GetOutputSizePixel()));
|
2008-01-29 07:40:07 +00:00
|
|
|
const String aTmpString(ByteString( "c:\\test.bmp" ), RTL_TEXTENCODING_UTF8);
|
|
|
|
SvFileStream aNew(aTmpString, STREAM_WRITE|STREAM_TRUNC);
|
2007-06-26 10:58:09 +00:00
|
|
|
aNew << aBitmap;
|
|
|
|
pVout->EnableMapMode(bMapModeWasEnabledVDev);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
pOut = pOld;
|
|
|
|
aVisArea = aOldVis;
|
|
|
|
|
|
|
|
//Jetzt Stueckchenweise schieben und die neuen Pixel aus dem
|
|
|
|
//VirDev kopieren.
|
|
|
|
|
|
|
|
// ??????????????????????
|
|
|
|
// or is it better to get the scrollfactor from the User
|
|
|
|
// as option?
|
|
|
|
// ??????????????????????
|
|
|
|
long lMaDelta = aPixSz.Height();
|
|
|
|
if ( Abs(lYDiff) > ( aVisArea.Height() / 3 ) )
|
|
|
|
lMaDelta *= 6;
|
|
|
|
else
|
|
|
|
lMaDelta *= 2;
|
|
|
|
|
|
|
|
lMaDelta *= lMult;
|
|
|
|
|
|
|
|
if ( lYDiff < 0 )
|
|
|
|
lMaDelta = -lMaDelta;
|
|
|
|
|
|
|
|
long lDiff = lYDiff;
|
|
|
|
while ( lDiff )
|
|
|
|
{
|
|
|
|
long lScroll;
|
|
|
|
if ( Imp()->bStopSmooth || Abs(lDiff) <= Abs(lMaDelta) )
|
|
|
|
{
|
|
|
|
lScroll = lDiff;
|
|
|
|
lDiff = 0;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
lScroll = lMaDelta;
|
|
|
|
lDiff -= lMaDelta;
|
|
|
|
}
|
|
|
|
|
2007-09-27 08:43:09 +00:00
|
|
|
const SwRect aTmpOldVis = VisArea();
|
2000-09-18 23:08:29 +00:00
|
|
|
aVisArea.Pos().Y() -= lScroll;
|
|
|
|
aVisArea.Pos() = GetWin()->PixelToLogic( GetWin()->LogicToPixel( VisArea().Pos()));
|
2007-09-27 08:43:09 +00:00
|
|
|
lScroll = aTmpOldVis.Top() - VisArea().Top();
|
2000-09-18 23:08:29 +00:00
|
|
|
if ( pRect )
|
|
|
|
{
|
2007-09-27 08:43:09 +00:00
|
|
|
Rectangle aTmp( aTmpOldVis.SVRect() );
|
2000-09-18 23:08:29 +00:00
|
|
|
aTmp.Left() = pRect->Left();
|
|
|
|
aTmp.Right()= pRect->Right();
|
2007-06-26 10:58:09 +00:00
|
|
|
GetWin()->Scroll( 0, lScroll, aTmp, SCROLL_CHILDREN);
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
else
|
2007-09-27 08:43:09 +00:00
|
|
|
GetWin()->Scroll( 0, lScroll, SCROLL_CHILDREN );
|
2007-06-26 10:58:09 +00:00
|
|
|
|
2007-09-27 08:43:09 +00:00
|
|
|
const Point aTmpPt( -VisArea().Left(), -VisArea().Top() );
|
|
|
|
MapMode aTmpMapMode( GetWin()->GetMapMode() );
|
|
|
|
aTmpMapMode.SetOrigin( aTmpPt );
|
|
|
|
GetWin()->SetMapMode( aTmpMapMode );
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
if ( Imp()->HasDrawView() )
|
|
|
|
Imp()->GetDrawView()->VisAreaChanged( GetWin() );
|
|
|
|
|
|
|
|
SetFirstVisPageInvalid();
|
|
|
|
if ( !Imp()->bStopSmooth )
|
|
|
|
{
|
2007-06-26 10:58:09 +00:00
|
|
|
const bool bScrollDirectionIsUp(lScroll > 0);
|
2000-09-18 23:08:29 +00:00
|
|
|
Imp()->aSmoothRect = VisArea();
|
2007-06-26 10:58:09 +00:00
|
|
|
|
|
|
|
if(bScrollDirectionIsUp)
|
|
|
|
{
|
|
|
|
Imp()->aSmoothRect.Bottom( VisArea().Top() + lScroll + aPixSz.Height());
|
|
|
|
}
|
2000-09-18 23:08:29 +00:00
|
|
|
else
|
2007-06-26 10:58:09 +00:00
|
|
|
{
|
|
|
|
Imp()->aSmoothRect.Top( VisArea().Bottom() + lScroll - aPixSz.Height());
|
|
|
|
}
|
2000-09-18 23:08:29 +00:00
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
Imp()->bSmoothUpdate = sal_True;
|
2000-09-18 23:08:29 +00:00
|
|
|
GetWin()->Update();
|
2011-01-17 15:06:54 +01:00
|
|
|
Imp()->bSmoothUpdate = sal_False;
|
2000-09-18 23:08:29 +00:00
|
|
|
|
2007-06-26 10:58:09 +00:00
|
|
|
if(!Imp()->bStopSmooth)
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
2007-06-26 10:58:09 +00:00
|
|
|
static bool bDoItOnPixels(true);
|
|
|
|
if(bDoItOnPixels)
|
|
|
|
{
|
|
|
|
// start paint on logic base
|
|
|
|
const Rectangle aTargetLogic(Imp()->aSmoothRect.SVRect());
|
|
|
|
DLPrePaint2(Region(aTargetLogic));
|
|
|
|
|
|
|
|
// get target rectangle in discrete pixels
|
|
|
|
OutputDevice& rTargetDevice = mpTargetPaintWindow->GetTargetOutputDevice();
|
|
|
|
const Rectangle aTargetPixel(rTargetDevice.LogicToPixel(aTargetLogic));
|
|
|
|
|
|
|
|
// get source top-left in discrete pixels
|
|
|
|
const Point aSourceTopLeft(pVout->LogicToPixel(aTargetLogic.TopLeft()));
|
|
|
|
|
|
|
|
// switch off MapModes
|
|
|
|
const bool bMapModeWasEnabledDest(rTargetDevice.IsMapModeEnabled());
|
|
|
|
const bool bMapModeWasEnabledSource(pVout->IsMapModeEnabled());
|
|
|
|
rTargetDevice.EnableMapMode(false);
|
|
|
|
pVout->EnableMapMode(false);
|
|
|
|
|
|
|
|
// copy content
|
|
|
|
static bool bTestDirectToWindowPaint(false);
|
|
|
|
if(bTestDirectToWindowPaint)
|
|
|
|
{
|
|
|
|
const bool bMapModeWasEnabledWin(GetWin()->IsMapModeEnabled());
|
|
|
|
GetWin()->EnableMapMode(false);
|
|
|
|
|
|
|
|
GetWin()->DrawOutDev(
|
|
|
|
aTargetPixel.TopLeft(), aTargetPixel.GetSize(), // dest
|
|
|
|
aSourceTopLeft, aTargetPixel.GetSize(), // source
|
|
|
|
*pVout);
|
|
|
|
|
|
|
|
GetWin()->EnableMapMode(bMapModeWasEnabledWin);
|
|
|
|
}
|
|
|
|
|
|
|
|
rTargetDevice.DrawOutDev(
|
|
|
|
aTargetPixel.TopLeft(), aTargetPixel.GetSize(), // dest
|
|
|
|
aSourceTopLeft, aTargetPixel.GetSize(), // source
|
|
|
|
*pVout);
|
|
|
|
|
|
|
|
// restore MapModes
|
|
|
|
rTargetDevice.EnableMapMode(bMapModeWasEnabledDest);
|
|
|
|
pVout->EnableMapMode(bMapModeWasEnabledSource);
|
|
|
|
|
|
|
|
// end paint on logoc base
|
2009-01-20 09:49:16 +00:00
|
|
|
DLPostPaint2(true);
|
2007-06-26 10:58:09 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
Rectangle aRectangle(Imp()->aSmoothRect.SVRect());
|
|
|
|
aRectangle.Left() -= aPixSz.Width();
|
|
|
|
aRectangle.Right() += aPixSz.Width();
|
|
|
|
aRectangle.Top() -= aPixSz.Height();
|
|
|
|
aRectangle.Bottom() += aPixSz.Height();
|
|
|
|
const Point aUpdateTopLeft(aRectangle.TopLeft());
|
|
|
|
const Size aUpdateSize(aRectangle.GetSize());
|
|
|
|
|
|
|
|
// #i75172# the part getting visible needs to be handled like a repaint.
|
|
|
|
// For that, start with DLPrePaint2 and the correct Rectangle
|
|
|
|
DLPrePaint2(Region(aRectangle));
|
|
|
|
|
|
|
|
static bool bTestDirectToWindowPaint(false);
|
|
|
|
if(bTestDirectToWindowPaint)
|
|
|
|
{
|
|
|
|
GetWin()->DrawOutDev(aUpdateTopLeft, aUpdateSize, aUpdateTopLeft, aUpdateSize, *pVout);
|
|
|
|
}
|
|
|
|
|
|
|
|
mpTargetPaintWindow->GetTargetOutputDevice().DrawOutDev(aUpdateTopLeft, aUpdateSize, aUpdateTopLeft, aUpdateSize, *pVout);
|
|
|
|
|
|
|
|
// #i75172# Corret repaint end
|
|
|
|
// Note: This also correcty creates the overlay, thus smooth scroll will
|
|
|
|
// also be allowed now wth selection (see big IF above)
|
2009-01-20 09:49:16 +00:00
|
|
|
DLPostPaint2(true);
|
2007-06-26 10:58:09 +00:00
|
|
|
}
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
--nLockPaint;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
delete pVout;
|
|
|
|
GetWin()->Update();
|
|
|
|
if ( !Imp()->bStopSmooth )
|
|
|
|
--nLockPaint;
|
|
|
|
SetFirstVisPageInvalid();
|
2011-01-17 15:06:54 +01:00
|
|
|
return sal_True;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
delete pVout;
|
|
|
|
}
|
2006-08-14 15:59:17 +00:00
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
aVisArea.Pos().X() -= lXDiff;
|
|
|
|
aVisArea.Pos().Y() -= lYDiff;
|
|
|
|
if ( pRect )
|
2007-06-26 10:58:09 +00:00
|
|
|
GetWin()->Scroll( lXDiff, lYDiff, *pRect, SCROLL_CHILDREN);
|
2000-09-18 23:08:29 +00:00
|
|
|
else
|
2007-06-26 10:58:09 +00:00
|
|
|
GetWin()->Scroll( lXDiff, lYDiff, SCROLL_CHILDREN);
|
2011-01-17 15:06:54 +01:00
|
|
|
return sal_False;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
|*
|
|
|
|
|* ViewShell::PaintDesktop()
|
|
|
|
|*
|
|
|
|
|* Ersterstellung MA 16. Dec. 93
|
|
|
|
|* Letzte Aenderung MA 30. Nov. 95
|
|
|
|
|*
|
|
|
|
******************************************************************************/
|
|
|
|
|
|
|
|
void ViewShell::PaintDesktop( const SwRect &rRect )
|
|
|
|
{
|
|
|
|
if ( !GetWin() && !GetOut()->GetConnectMetaFile() )
|
|
|
|
return; //Fuer den Drucker tun wir hier nix
|
|
|
|
|
|
|
|
//Sonderfaelle abfangen, damit es nicht gar so ueberraschend aussieht.
|
|
|
|
//Kann z.B. waehrend des Idle'ns zwischenzeitlich auftreten.
|
|
|
|
//Die Rechtecke neben den Seiten muessen wir leider auf jedenfall Painten,
|
|
|
|
//den diese werden spaeter beim VisPortChgd ausgespart.
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bBorderOnly = sal_False;
|
2011-02-09 15:55:27 +01:00
|
|
|
const SwRootFrm *pRoot = GetLayout();//swmod 080305
|
2000-09-18 23:08:29 +00:00
|
|
|
if ( rRect.Top() > pRoot->Frm().Bottom() )
|
|
|
|
{
|
|
|
|
const SwFrm *pPg = pRoot->Lower();
|
|
|
|
while ( pPg && pPg->GetNext() )
|
|
|
|
pPg = pPg->GetNext();
|
|
|
|
if ( !pPg || !pPg->Frm().IsOver( VisArea() ) )
|
2011-01-17 15:06:54 +01:00
|
|
|
bBorderOnly = sal_True;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
|
2008-03-07 14:00:41 +00:00
|
|
|
const bool bBookMode = GetViewOptions()->IsViewLayoutBookMode();
|
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
SwRegionRects aRegion( rRect );
|
|
|
|
|
2008-02-19 12:50:15 +00:00
|
|
|
//mod #i6193: remove sidebar area to avoid flickering
|
2008-03-07 14:00:41 +00:00
|
|
|
const SwPostItMgr* pPostItMgr = GetPostItMgr();
|
|
|
|
const SwTwips nSidebarWidth = pPostItMgr && pPostItMgr->HasNotes() && pPostItMgr->ShowNotes() ?
|
|
|
|
pPostItMgr->GetSidebarWidth() + pPostItMgr->GetSidebarBorderWidth() :
|
|
|
|
0;
|
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
if ( bBorderOnly )
|
|
|
|
{
|
2010-06-13 15:22:56 +02:00
|
|
|
const SwFrm *pPage =pRoot->Lower(); //swmod 071108//swmod 071225
|
2000-09-18 23:08:29 +00:00
|
|
|
SwRect aLeft( rRect ), aRight( rRect );
|
|
|
|
while ( pPage )
|
|
|
|
{
|
|
|
|
long nTmp = pPage->Frm().Left();
|
|
|
|
if ( nTmp < aLeft.Right() )
|
|
|
|
aLeft.Right( nTmp );
|
|
|
|
nTmp = pPage->Frm().Right();
|
|
|
|
if ( nTmp > aRight.Left() )
|
2008-02-19 12:50:15 +00:00
|
|
|
{
|
2008-03-07 14:00:41 +00:00
|
|
|
aRight.Left( nTmp + nSidebarWidth );
|
2008-02-19 12:50:15 +00:00
|
|
|
}
|
2000-09-18 23:08:29 +00:00
|
|
|
pPage = pPage->GetNext();
|
|
|
|
}
|
|
|
|
aRegion.Remove( 0, aRegion.Count() );
|
|
|
|
if ( aLeft.HasArea() )
|
|
|
|
aRegion.Insert( aLeft, 0 );
|
|
|
|
if ( aRight.HasArea() )
|
|
|
|
aRegion.Insert( aRight, 1 );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
const SwFrm *pPage = Imp()->GetFirstVisPage();
|
|
|
|
const SwTwips nBottom = rRect.Bottom();
|
2008-03-07 14:00:41 +00:00
|
|
|
//const SwTwips nRight = rRect.Right();
|
2000-09-18 23:08:29 +00:00
|
|
|
while ( pPage && aRegion.Count() &&
|
2008-03-07 14:00:41 +00:00
|
|
|
(pPage->Frm().Top() <= nBottom) ) // PAGES01 && (pPage->Frm().Left() <= nRight))
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
2008-03-07 14:00:41 +00:00
|
|
|
SwRect aPageRect( pPage->Frm() );
|
|
|
|
if ( bBookMode )
|
|
|
|
{
|
|
|
|
const SwPageFrm& rFormatPage = static_cast<const SwPageFrm*>(pPage)->GetFormatPage();
|
|
|
|
aPageRect.SSize() = rFormatPage.Frm().SSize();
|
|
|
|
}
|
|
|
|
|
2010-01-12 10:43:45 +01:00
|
|
|
const bool bSidebarRight =
|
|
|
|
static_cast<const SwPageFrm*>(pPage)->SidebarPosition() == sw::sidebarwindows::SIDEBAR_RIGHT;
|
2008-03-07 14:00:41 +00:00
|
|
|
aPageRect.Pos().X() -= bSidebarRight ? 0 : nSidebarWidth;
|
|
|
|
aPageRect.SSize().Width() += nSidebarWidth;
|
|
|
|
|
|
|
|
if ( aPageRect.IsOver( rRect ) )
|
|
|
|
aRegion -= aPageRect;
|
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
pPage = pPage->GetNext();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ( aRegion.Count() )
|
|
|
|
_PaintDesktop( aRegion );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// PaintDesktop gesplittet, dieser Teil wird auch von PreViewPage benutzt
|
|
|
|
void ViewShell::_PaintDesktop( const SwRegionRects &rRegion )
|
|
|
|
{
|
2004-05-03 13:24:37 +00:00
|
|
|
// OD 2004-04-23 #116347#
|
|
|
|
GetOut()->Push( PUSH_FILLCOLOR|PUSH_LINECOLOR );
|
|
|
|
GetOut()->SetLineColor();
|
2006-11-14 14:13:03 +00:00
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
for ( sal_uInt16 i = 0; i < rRegion.Count(); ++i )
|
2006-11-14 14:13:03 +00:00
|
|
|
{
|
|
|
|
const Rectangle aRectangle(rRegion[i].SVRect());
|
|
|
|
|
2009-01-20 09:49:16 +00:00
|
|
|
// #i93170#
|
|
|
|
// Here we have a real Problem. On the one hand we have the buffering for paint
|
|
|
|
// and overlay which needs an embracing pair of DLPrePaint2/DLPostPaint2 calls,
|
|
|
|
// on the other hand the MapMode is not set correctly when this code is executed.
|
|
|
|
// This is done in the users of this method, for each SWpage before painting it.
|
|
|
|
// Since the MapMode is not correct here, the call to DLPostPaint2 will paint
|
|
|
|
// existing FormControls due to the current MapMode.
|
|
|
|
//
|
|
|
|
// There are basically three solutions for this:
|
|
|
|
//
|
|
|
|
// (1) Set the MapMode correct, move the background painting to the users of
|
|
|
|
// this code
|
|
|
|
//
|
|
|
|
// (2) Do no DLPrePaint2/DLPostPaint2 here; no SdrObjects are allowed to lie in
|
|
|
|
// the desktop region. Disadvantage: the desktop will not be part of the
|
|
|
|
// buffers, e.g. overlay. Thus, as soon as overlay will be used over the
|
|
|
|
// desktop, it will not work.
|
|
|
|
//
|
|
|
|
// (3) expand DLPostPaint2 with a flag to signal if FormControl paints shall
|
|
|
|
// be done or not
|
|
|
|
//
|
|
|
|
// Currently, (3) will be the best possible solution. It will keep overlay and
|
|
|
|
// buffering intact and work without MapMode for single pages. In the medium
|
|
|
|
// to long run, (1) will need to be used and the bool bPaintFormLayer needs
|
|
|
|
// to be removed again
|
|
|
|
|
2006-11-14 14:13:03 +00:00
|
|
|
// #i68597# inform Drawinglayer about display change
|
2007-01-22 14:11:13 +00:00
|
|
|
DLPrePaint2(Region(aRectangle));
|
2007-06-26 10:58:09 +00:00
|
|
|
|
|
|
|
// #i75172# needed to move line/Fill color setters into loop since DLPrePaint2
|
|
|
|
// may exchange GetOut(), that's it's purpose. This happens e.g. at print preview.
|
|
|
|
GetOut()->SetFillColor( SwViewOption::GetAppBackgroundColor());
|
|
|
|
GetOut()->SetLineColor();
|
2006-11-14 14:13:03 +00:00
|
|
|
GetOut()->DrawRect(aRectangle);
|
2007-06-26 10:58:09 +00:00
|
|
|
|
2009-01-20 09:49:16 +00:00
|
|
|
DLPostPaint2(false);
|
2006-11-14 14:13:03 +00:00
|
|
|
}
|
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
GetOut()->Pop();
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
|*
|
|
|
|
|* ViewShell::CheckInvalidForPaint()
|
|
|
|
|*
|
|
|
|
|* Ersterstellung MA 19. May. 94
|
|
|
|
|* Letzte Aenderung MA 09. Jun. 94
|
|
|
|
|*
|
|
|
|
******************************************************************************/
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool ViewShell::CheckInvalidForPaint( const SwRect &rRect )
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
|
|
|
if ( !GetWin() )
|
2011-01-17 15:06:54 +01:00
|
|
|
return sal_False;
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
const SwPageFrm *pPage = Imp()->GetFirstVisPage();
|
|
|
|
const SwTwips nBottom = VisArea().Bottom();
|
|
|
|
const SwTwips nRight = VisArea().Right();
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bRet = sal_False;
|
2000-09-18 23:08:29 +00:00
|
|
|
while ( !bRet && pPage && !((pPage->Frm().Top() > nBottom) ||
|
|
|
|
(pPage->Frm().Left() > nRight)))
|
|
|
|
{
|
|
|
|
if ( pPage->IsInvalid() || pPage->IsInvalidFly() )
|
2011-01-17 15:06:54 +01:00
|
|
|
bRet = sal_True;
|
2000-09-18 23:08:29 +00:00
|
|
|
pPage = (SwPageFrm*)pPage->GetNext();
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( bRet )
|
|
|
|
{
|
|
|
|
//Start/EndAction wuerden hier leider nix helfen, weil das Paint vom
|
|
|
|
//GUI 'reinkam und somit ein Clipping gesetzt ist gegen das wir nicht
|
|
|
|
//nicht ankommen.
|
|
|
|
//Ergo: Alles selbst machen (siehe ImplEndAction())
|
|
|
|
if ( Imp()->GetRegion() && Imp()->GetRegion()->GetOrigin() != VisArea())
|
2009-12-29 09:19:13 +01:00
|
|
|
Imp()->DelRegion();
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
SwLayAction aAction( GetLayout(), Imp() );
|
2011-01-17 15:06:54 +01:00
|
|
|
aAction.SetComplete( sal_False );
|
2001-12-12 09:54:00 +00:00
|
|
|
// We increment the action counter to avoid a recursive call of actions
|
|
|
|
// e.g. from a SwFEShell::RequestObjectResize(..) in bug 95829.
|
|
|
|
// A recursive call of actions is no good idea because the inner action
|
|
|
|
// can't format frames which are locked by the outer action. This may
|
|
|
|
// cause and endless loop.
|
|
|
|
++nStartAction;
|
2000-09-18 23:08:29 +00:00
|
|
|
aAction.Action();
|
2001-12-12 09:54:00 +00:00
|
|
|
--nStartAction;
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
SwRegionRects *pRegion = Imp()->GetRegion();
|
|
|
|
if ( pRegion && aAction.IsBrowseActionStop() )
|
|
|
|
{
|
|
|
|
//Nur dann interessant, wenn sich im sichtbaren Bereich etwas
|
|
|
|
//veraendert hat.
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bStop = sal_True;
|
|
|
|
for ( sal_uInt16 i = 0; i < pRegion->Count(); ++i )
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
|
|
|
const SwRect &rTmp = (*pRegion)[i];
|
2011-01-17 15:06:54 +01:00
|
|
|
if ( sal_False == (bStop = rTmp.IsOver( VisArea() )) )
|
2000-09-18 23:08:29 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
if ( bStop )
|
|
|
|
{
|
2009-12-29 09:19:13 +01:00
|
|
|
Imp()->DelRegion();
|
2000-09-18 23:08:29 +00:00
|
|
|
pRegion = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( pRegion )
|
|
|
|
{
|
|
|
|
//Erst Invert dann Compress, niemals andersherum!
|
|
|
|
pRegion->Invert();
|
|
|
|
pRegion->Compress();
|
2011-01-17 15:06:54 +01:00
|
|
|
bRet = sal_False;
|
2000-09-18 23:08:29 +00:00
|
|
|
if ( pRegion->Count() )
|
|
|
|
{
|
|
|
|
SwRegionRects aRegion( rRect );
|
2011-01-17 15:06:54 +01:00
|
|
|
for ( sal_uInt16 i = 0; i < pRegion->Count(); ++i )
|
2000-09-18 23:08:29 +00:00
|
|
|
{ const SwRect &rTmp = (*pRegion)[i];
|
|
|
|
if ( !rRect.IsInside( rTmp ) )
|
|
|
|
{
|
|
|
|
InvalidateWindows( rTmp );
|
|
|
|
if ( rTmp.IsOver( VisArea() ) )
|
|
|
|
{ aRegion -= rTmp;
|
2011-01-17 15:06:54 +01:00
|
|
|
bRet = sal_True;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ( bRet )
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
for ( sal_uInt16 i = 0; i < aRegion.Count(); ++i )
|
2000-09-18 23:08:29 +00:00
|
|
|
GetWin()->Invalidate( aRegion[i].SVRect() );
|
|
|
|
|
|
|
|
if ( rRect != VisArea() )
|
|
|
|
{
|
|
|
|
//rRect == VisArea ist der spezialfall fuer neu bzw.
|
|
|
|
//Shift-Ctrl-R, dafuer sollte es nicht notwendig sein
|
|
|
|
//das Rechteck nocheinmal in Dokumentkoordinaten v
|
|
|
|
//vorzuhalten.
|
|
|
|
if ( aInvalidRect.IsEmpty() )
|
|
|
|
aInvalidRect = rRect;
|
|
|
|
else
|
|
|
|
aInvalidRect.Union( rRect );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
2011-01-17 15:06:54 +01:00
|
|
|
bRet = sal_False;
|
2009-12-29 09:19:13 +01:00
|
|
|
Imp()->DelRegion();
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
else
|
2011-01-17 15:06:54 +01:00
|
|
|
bRet = sal_False;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
return bRet;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
|*
|
|
|
|
|* ViewShell::Paint()
|
|
|
|
|*
|
|
|
|
|* Ersterstellung MA ??
|
|
|
|
|* Letzte Aenderung MA 17. Sep. 96
|
|
|
|
|*
|
|
|
|
******************************************************************************/
|
|
|
|
|
|
|
|
void ViewShell::Paint(const Rectangle &rRect)
|
|
|
|
{
|
|
|
|
if ( nLockPaint )
|
|
|
|
{
|
|
|
|
if ( Imp()->bSmoothUpdate )
|
|
|
|
{
|
|
|
|
SwRect aTmp( rRect );
|
|
|
|
if ( !Imp()->aSmoothRect.IsInside( aTmp ) )
|
2011-01-17 15:06:54 +01:00
|
|
|
Imp()->bStopSmooth = sal_True;
|
2000-09-18 23:08:29 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
Imp()->aSmoothRect = aTmp;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( SwRootFrm::IsInPaint() )
|
|
|
|
{
|
|
|
|
//Waehrend der Ausgabe einer Seite beim Druckvorgang wird das
|
|
|
|
//Paint gepuffert.
|
|
|
|
SwPaintQueue::Add( this, SwRect( rRect ) );
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
//MA 30. Jul. 95: fix(16787): mit !nStartAction versuche ich mal mich gegen
|
|
|
|
//fehlerhaften Code an anderen Stellen zu wehren. Hoffentlich fuehrt das
|
|
|
|
//nicht zu Problemen!?
|
|
|
|
if ( bPaintWorks && !nStartAction )
|
|
|
|
{
|
|
|
|
if( GetWin() && GetWin()->IsVisible() )
|
|
|
|
{
|
|
|
|
SwRect aRect( rRect );
|
|
|
|
if ( bPaintInProgress ) //Schutz gegen doppelte Paints!
|
|
|
|
{
|
|
|
|
GetWin()->Invalidate( rRect );
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
bPaintInProgress = sal_True;
|
2000-09-18 23:08:29 +00:00
|
|
|
SET_CURR_SHELL( this );
|
2011-01-17 15:06:54 +01:00
|
|
|
SwRootFrm::SetNoVirDev( sal_True );
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
//Wir wollen nicht staendig hin und her Clippen, wir verlassen
|
|
|
|
//uns darauf, das sich alle auf das Rechteck beschraeken und
|
|
|
|
//brauchen das Clipping hier nur einmalig einkalkulieren. Das
|
|
|
|
//ClipRect wird hier einmal entfernt und nicht Restauriert, denn
|
|
|
|
//von aussen braucht es sowieso keiner mehr.
|
|
|
|
//Nicht wenn wir ein MetaFile aufzeichnen.
|
|
|
|
if( !GetOut()->GetConnectMetaFile() && GetOut()->IsClipRegion())
|
|
|
|
GetOut()->SetClipRegion();
|
|
|
|
|
|
|
|
if ( IsPreView() )
|
|
|
|
{
|
|
|
|
//Falls sinnvoll gleich das alte InvalidRect verarbeiten bzw.
|
|
|
|
//vernichten.
|
|
|
|
if ( aRect.IsInside( aInvalidRect ) )
|
|
|
|
ResetInvalidRect();
|
2011-01-17 15:06:54 +01:00
|
|
|
ViewShell::bLstAct = sal_True;
|
2000-09-18 23:08:29 +00:00
|
|
|
GetLayout()->Paint( aRect );
|
2011-01-17 15:06:54 +01:00
|
|
|
ViewShell::bLstAct = sal_False;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2006-11-14 14:13:03 +00:00
|
|
|
//SwSaveHdl *pSaveHdl = 0;
|
|
|
|
//if ( Imp()->HasDrawView() )
|
|
|
|
// pSaveHdl = new SwSaveHdl( Imp() );
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
//Wenn eine der sichtbaren Seiten noch irgendetwas zum Repaint
|
|
|
|
//angemeldet hat, so muessen Repaints ausgeloest werden.
|
|
|
|
if ( !CheckInvalidForPaint( aRect ) )
|
|
|
|
{
|
2009-08-27 14:36:29 +00:00
|
|
|
// --> OD 2009-08-12 #i101192#
|
|
|
|
// start Pre/PostPaint encapsulation to avoid screen blinking
|
|
|
|
const Region aRepaintRegion(aRect.SVRect());
|
|
|
|
DLPrePaint2(aRepaintRegion);
|
|
|
|
// <--
|
2000-09-18 23:08:29 +00:00
|
|
|
PaintDesktop( aRect );
|
|
|
|
//Falls sinnvoll gleich das alte InvalidRect verarbeiten bzw.
|
|
|
|
//vernichten.
|
|
|
|
if ( aRect.IsInside( aInvalidRect ) )
|
|
|
|
ResetInvalidRect();
|
2011-01-17 15:06:54 +01:00
|
|
|
ViewShell::bLstAct = sal_True;
|
2000-09-18 23:08:29 +00:00
|
|
|
GetLayout()->Paint( aRect );
|
2011-01-17 15:06:54 +01:00
|
|
|
ViewShell::bLstAct = sal_False;
|
2009-08-27 14:36:29 +00:00
|
|
|
// --> OD 2009-08-12 #i101192#
|
|
|
|
// end Pre/PostPaint encapsulation
|
|
|
|
DLPostPaint2(true);
|
|
|
|
// <--
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
2006-11-14 14:13:03 +00:00
|
|
|
|
|
|
|
//delete pSaveHdl;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
2011-01-17 15:06:54 +01:00
|
|
|
SwRootFrm::SetNoVirDev( sal_False );
|
|
|
|
bPaintInProgress = sal_False;
|
2000-09-18 23:08:29 +00:00
|
|
|
UISizeNotify();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if ( aInvalidRect.IsEmpty() )
|
|
|
|
aInvalidRect = SwRect( rRect );
|
|
|
|
else
|
|
|
|
aInvalidRect.Union( SwRect( rRect ) );
|
|
|
|
|
|
|
|
if ( bInEndAction && GetWin() )
|
|
|
|
{
|
|
|
|
Region aRegion( GetWin()->GetPaintRegion() );
|
|
|
|
RegionHandle hHdl( aRegion.BeginEnumRects() );
|
|
|
|
Rectangle aRect;
|
|
|
|
while ( aRegion.GetNextEnumRect( hHdl, aRect ) )
|
|
|
|
Imp()->AddPaintRect( aRect );
|
|
|
|
aRegion.EndEnumRects( hHdl );
|
|
|
|
}
|
|
|
|
else if ( SfxProgress::GetActiveProgress( GetDoc()->GetDocShell() ) &&
|
|
|
|
GetOut() == GetWin() )
|
|
|
|
{
|
2007-01-22 14:11:13 +00:00
|
|
|
// #i68597#
|
|
|
|
const Region aDLRegion(rRect);
|
|
|
|
DLPrePaint2(aDLRegion);
|
|
|
|
|
2004-05-03 13:24:37 +00:00
|
|
|
// OD 2004-04-23 #116347#
|
|
|
|
pOut->Push( PUSH_FILLCOLOR|PUSH_LINECOLOR );
|
2000-09-18 23:08:29 +00:00
|
|
|
pOut->SetFillColor( Imp()->GetRetoucheColor() );
|
2004-05-03 13:24:37 +00:00
|
|
|
pOut->SetLineColor();
|
2000-09-18 23:08:29 +00:00
|
|
|
pOut->DrawRect( rRect );
|
|
|
|
pOut->Pop();
|
2007-01-22 14:11:13 +00:00
|
|
|
|
|
|
|
// #i68597#
|
2009-01-20 09:49:16 +00:00
|
|
|
DLPostPaint2(true);
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
|*
|
|
|
|
|* ViewShell::SetBrowseBorder()
|
|
|
|
|*
|
|
|
|
|* Ersterstellung AMA 20. Aug. 96
|
|
|
|
|* Letzte Aenderung AMA 20. Aug. 96
|
|
|
|
|*
|
|
|
|
******************************************************************************/
|
|
|
|
|
|
|
|
void ViewShell::SetBrowseBorder( const Size& rNew )
|
|
|
|
{
|
2008-02-19 12:50:15 +00:00
|
|
|
if( rNew != aBrowseBorder )
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
|
|
|
aBrowseBorder = rNew;
|
|
|
|
if ( aVisArea.HasArea() )
|
2011-01-17 15:06:54 +01:00
|
|
|
CheckBrowseView( sal_False );
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-02-19 12:50:15 +00:00
|
|
|
const Size& ViewShell::GetBrowseBorder() const
|
|
|
|
{
|
|
|
|
return aBrowseBorder;
|
|
|
|
}
|
|
|
|
|
|
|
|
sal_Int32 ViewShell::GetBrowseWidth() const
|
|
|
|
{
|
2008-03-07 14:00:41 +00:00
|
|
|
const SwPostItMgr* pPostItMgr = GetPostItMgr();
|
2008-02-19 12:50:15 +00:00
|
|
|
if ( pPostItMgr && pPostItMgr->HasNotes() && pPostItMgr->ShowNotes() )
|
|
|
|
{
|
|
|
|
Size aBorder( aBrowseBorder );
|
|
|
|
aBorder.Width() += aBrowseBorder.Width();
|
|
|
|
aBorder.Width() += pPostItMgr->GetSidebarWidth(true) + pPostItMgr->GetSidebarBorderWidth(true);
|
|
|
|
return aVisArea.Width() - GetOut()->PixelToLogic(aBorder).Width();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
return aVisArea.Width() - 2 * GetOut()->PixelToLogic(aBrowseBorder).Width();
|
|
|
|
}
|
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
/******************************************************************************
|
|
|
|
|*
|
|
|
|
|* ViewShell::CheckBrowseView()
|
|
|
|
|*
|
|
|
|
|* Ersterstellung MA 04. Mar. 96
|
|
|
|
|* Letzte Aenderung MA 04. Jul. 96
|
|
|
|
|*
|
|
|
|
******************************************************************************/
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
void ViewShell::CheckBrowseView( sal_Bool bBrowseChgd )
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
2010-06-13 15:22:56 +02:00
|
|
|
if ( !bBrowseChgd && !GetViewOptions()->getBrowseMode() )
|
2000-09-18 23:08:29 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
SET_CURR_SHELL( this );
|
|
|
|
|
|
|
|
ASSERT( GetLayout(), "Layout not ready" );
|
|
|
|
|
|
|
|
// Wenn das Layout noch nicht einmal eine Hoehe hat,
|
|
|
|
// ist sowieso nichts formatiert.
|
|
|
|
// Dann eruebrigt sich die Invalidierung
|
2006-08-14 15:59:17 +00:00
|
|
|
// Falsch, z.B. beim Anlegen einer neuen View wird der Inhalt eingef?gt
|
2000-09-18 23:08:29 +00:00
|
|
|
// und formatiert (trotz einer leeren VisArea). Hier muessen deshalb
|
|
|
|
// die Seiten zur Formatierung angeregt werden.
|
|
|
|
if( !GetLayout()->Frm().Height() )
|
|
|
|
{
|
|
|
|
SwFrm* pPage = GetLayout()->Lower();
|
|
|
|
while( pPage )
|
|
|
|
{
|
|
|
|
pPage->_InvalidateSize();
|
|
|
|
pPage = pPage->GetNext();
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
LockPaint();
|
|
|
|
StartAction();
|
|
|
|
|
|
|
|
SwPageFrm *pPg = (SwPageFrm*)GetLayout()->Lower();
|
|
|
|
do
|
|
|
|
{ pPg->InvalidateSize();
|
|
|
|
pPg->_InvalidatePrt();
|
|
|
|
pPg->InvaPercentLowers();
|
|
|
|
if ( bBrowseChgd )
|
|
|
|
{
|
|
|
|
pPg->PrepareHeader();
|
|
|
|
pPg->PrepareFooter();
|
|
|
|
}
|
|
|
|
pPg = (SwPageFrm*)pPg->GetNext();
|
|
|
|
} while ( pPg );
|
|
|
|
|
|
|
|
// Wenn sich die Groessenverhaeltnise im BrowseModus aendern,
|
|
|
|
// muss die Position und PrtArea der Cntnt- und Tab-Frames invalidiert werden.
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt8 nInv = INV_PRTAREA | INV_TABLE | INV_POS;
|
2000-09-18 23:08:29 +00:00
|
|
|
// Beim BrowseModus-Wechsel benoetigen die CntntFrms
|
|
|
|
// wg. der Drucker/Bildschirmformatierung eine Size-Invalidierung
|
|
|
|
if( bBrowseChgd )
|
2001-09-19 07:45:10 +00:00
|
|
|
nInv |= INV_SIZE | INV_DIRECTION;
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
GetLayout()->InvalidateAllCntnt( nInv );
|
|
|
|
|
|
|
|
SwFrm::CheckPageDescs( (SwPageFrm*)GetLayout()->Lower() );
|
|
|
|
|
|
|
|
EndAction();
|
|
|
|
UnlockPaint();
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* ViewShell::GetLayout()
|
|
|
|
|* ViewShell::GetNodes()
|
|
|
|
|*
|
|
|
|
|* Ersterstellung OK 26. May. 92
|
|
|
|
|* Letzte Aenderung MA 16. Sep. 93
|
|
|
|
|*
|
|
|
|
*************************************************************************/
|
|
|
|
|
|
|
|
SwRootFrm *ViewShell::GetLayout() const
|
|
|
|
{
|
2010-06-13 15:22:56 +02:00
|
|
|
return pLayout.get(); //swmod 080116
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
2010-06-13 15:22:56 +02:00
|
|
|
/***********************************************************************/
|
2000-09-18 23:08:29 +00:00
|
|
|
|
2003-04-01 08:59:34 +00:00
|
|
|
OutputDevice& ViewShell::GetRefDev() const
|
|
|
|
{
|
2003-06-12 06:40:01 +00:00
|
|
|
OutputDevice* pTmpOut = 0;
|
2006-08-14 15:59:17 +00:00
|
|
|
if ( GetWin() &&
|
2010-06-13 15:22:56 +02:00
|
|
|
GetViewOptions()->getBrowseMode() &&
|
2006-08-14 15:59:17 +00:00
|
|
|
!GetViewOptions()->IsPrtFormat() )
|
2003-06-12 06:40:01 +00:00
|
|
|
pTmpOut = GetWin();
|
|
|
|
else if ( 0 != mpTmpRef )
|
|
|
|
pTmpOut = mpTmpRef;
|
|
|
|
else
|
2006-08-14 15:59:17 +00:00
|
|
|
pTmpOut = GetDoc()->getReferenceDevice( true );
|
2003-06-12 06:40:01 +00:00
|
|
|
|
|
|
|
return *pTmpOut;
|
2003-04-01 08:59:34 +00:00
|
|
|
}
|
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
const SwNodes& ViewShell::GetNodes() const
|
|
|
|
{
|
|
|
|
return pDoc->GetNodes();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-09-27 08:43:09 +00:00
|
|
|
void ViewShell::DrawSelChanged()
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Size ViewShell::GetDocSize() const
|
|
|
|
{
|
|
|
|
Size aSz;
|
|
|
|
const SwRootFrm* pRoot = GetLayout();
|
|
|
|
if( pRoot )
|
|
|
|
aSz = pRoot->Frm().SSize();
|
2008-02-19 12:50:15 +00:00
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
return aSz;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
SfxItemPool& ViewShell::GetAttrPool()
|
|
|
|
{
|
|
|
|
return GetDoc()->GetAttrPool();
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
|*
|
|
|
|
|* ViewShell::ApplyViewOptions(), ImplApplyViewOptions()
|
|
|
|
|*
|
|
|
|
|* Ersterstellung ??
|
|
|
|
|* Letzte Aenderung MA 03. Mar. 98
|
|
|
|
|*
|
|
|
|
******************************************************************************/
|
|
|
|
|
|
|
|
void ViewShell::ApplyViewOptions( const SwViewOption &rOpt )
|
|
|
|
{
|
|
|
|
|
|
|
|
ViewShell *pSh = this;
|
|
|
|
do
|
|
|
|
{ pSh->StartAction();
|
|
|
|
pSh = (ViewShell*)pSh->GetNext();
|
|
|
|
} while ( pSh != this );
|
|
|
|
|
|
|
|
ImplApplyViewOptions( rOpt );
|
|
|
|
|
2010-06-13 15:22:56 +02:00
|
|
|
// swmod 080115
|
|
|
|
// With one layout per view it is not longer necessary
|
|
|
|
// to sync these "layout related" view options
|
|
|
|
// But as long as we have to disable "multiple layout"
|
2000-09-18 23:08:29 +00:00
|
|
|
pSh = (ViewShell*)this->GetNext();
|
|
|
|
while ( pSh != this )
|
|
|
|
{
|
|
|
|
SwViewOption aOpt( *pSh->GetViewOptions() );
|
|
|
|
aOpt.SetFldName( rOpt.IsFldName() );
|
2009-09-11 10:21:51 +00:00
|
|
|
aOpt.SetShowHiddenField( rOpt.IsShowHiddenField() );
|
2000-09-18 23:08:29 +00:00
|
|
|
aOpt.SetShowHiddenPara( rOpt.IsShowHiddenPara() );
|
2009-09-11 10:21:51 +00:00
|
|
|
aOpt.SetShowHiddenChar( rOpt.IsShowHiddenChar() );
|
|
|
|
aOpt.SetViewLayoutBookMode( rOpt.IsViewLayoutBookMode() );
|
|
|
|
aOpt.SetViewLayoutColumns( rOpt.GetViewLayoutColumns() );
|
|
|
|
aOpt.SetPostIts(rOpt.IsPostIts());
|
2000-09-18 23:08:29 +00:00
|
|
|
if ( !(aOpt == *pSh->GetViewOptions()) )
|
|
|
|
pSh->ImplApplyViewOptions( aOpt );
|
|
|
|
pSh = (ViewShell*)pSh->GetNext();
|
|
|
|
}
|
2010-06-13 15:22:56 +02:00
|
|
|
// End of disabled multiple window
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
pSh = this;
|
|
|
|
do
|
|
|
|
{ pSh->EndAction();
|
|
|
|
pSh = (ViewShell*)pSh->GetNext();
|
|
|
|
} while ( pSh != this );
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
void ViewShell::ImplApplyViewOptions( const SwViewOption &rOpt )
|
|
|
|
{
|
2010-02-16 16:03:23 +01:00
|
|
|
if (*pOpt == rOpt)
|
|
|
|
return;
|
2000-09-18 23:08:29 +00:00
|
|
|
|
2007-09-27 08:43:09 +00:00
|
|
|
Window *pMyWin = GetWin();
|
|
|
|
if( !pMyWin )
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
2007-09-27 08:43:09 +00:00
|
|
|
ASSERT( pMyWin, "ViewShell::ApplyViewOptions: no window" );
|
2000-09-18 23:08:29 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
SET_CURR_SHELL( this );
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bReformat = sal_False;
|
2000-09-18 23:08:29 +00:00
|
|
|
|
2004-02-26 14:37:03 +00:00
|
|
|
if( pOpt->IsShowHiddenField() != rOpt.IsShowHiddenField() )
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
|
|
|
((SwHiddenTxtFieldType*)pDoc->GetSysFldType( RES_HIDDENTXTFLD ))->
|
2004-02-26 14:37:03 +00:00
|
|
|
SetHiddenFlag( !rOpt.IsShowHiddenField() );
|
2011-01-17 15:06:54 +01:00
|
|
|
bReformat = sal_True;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
if ( pOpt->IsShowHiddenPara() != rOpt.IsShowHiddenPara() )
|
|
|
|
{
|
|
|
|
SwHiddenParaFieldType* pFldType = (SwHiddenParaFieldType*)GetDoc()->
|
|
|
|
GetSysFldType(RES_HIDDENPARAFLD);
|
|
|
|
if( pFldType && pFldType->GetDepends() )
|
|
|
|
{
|
|
|
|
SwMsgPoolItem aHnt( RES_HIDDENPARA_PRINT );
|
2010-12-17 09:02:23 +01:00
|
|
|
pFldType->ModifyNotification( &aHnt, 0);
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
2011-01-17 15:06:54 +01:00
|
|
|
bReformat = sal_True;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
2004-02-26 14:37:03 +00:00
|
|
|
if ( !bReformat && pOpt->IsShowHiddenChar() != rOpt.IsShowHiddenChar() )
|
|
|
|
{
|
|
|
|
bReformat = GetDoc()->ContainsHiddenChars();
|
|
|
|
}
|
2000-09-18 23:08:29 +00:00
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
// bReformat wird sal_True, wenn ...
|
2000-09-18 23:08:29 +00:00
|
|
|
// - Feldnamen anzeigen oder nicht ...
|
|
|
|
// ( - SwEndPortion muessen _nicht_ mehr generiert werden. )
|
|
|
|
// - Das Window ist natuerlich was ganz anderes als der Drucker...
|
2004-02-26 14:37:03 +00:00
|
|
|
bReformat = bReformat || pOpt->IsFldName() != rOpt.IsFldName();
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
// Der Mapmode wird veraendert, Minima/Maxima werden von der UI beachtet
|
|
|
|
if( pOpt->GetZoom() != rOpt.GetZoom() && !IsPreView() )
|
|
|
|
{
|
2007-09-27 08:43:09 +00:00
|
|
|
MapMode aMode( pMyWin->GetMapMode() );
|
2000-09-18 23:08:29 +00:00
|
|
|
Fraction aNewFactor( rOpt.GetZoom(), 100 );
|
|
|
|
aMode.SetScaleX( aNewFactor );
|
|
|
|
aMode.SetScaleY( aNewFactor );
|
2007-09-27 08:43:09 +00:00
|
|
|
pMyWin->SetMapMode( aMode );
|
2000-09-18 23:08:29 +00:00
|
|
|
// Wenn kein ReferenzDevice (Drucker) zum Formatieren benutzt wird,
|
|
|
|
// sondern der Bildschirm, muss bei Zoomfaktoraenderung neu formatiert
|
|
|
|
// werden.
|
2010-06-13 15:22:56 +02:00
|
|
|
if( pOpt->getBrowseMode() )
|
2011-01-17 15:06:54 +01:00
|
|
|
bReformat = sal_True;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
|
2010-06-13 15:22:56 +02:00
|
|
|
bool bBrowseModeChanged = false;
|
|
|
|
if( pOpt->getBrowseMode() != rOpt.getBrowseMode() )
|
|
|
|
{
|
|
|
|
bBrowseModeChanged = true;
|
2011-02-09 15:55:27 +01:00
|
|
|
bReformat = sal_True;
|
2010-06-13 15:22:56 +02:00
|
|
|
}
|
|
|
|
else if( pOpt->getBrowseMode() && pOpt->IsPrtFormat() != rOpt.IsPrtFormat() )
|
2011-01-17 15:06:54 +01:00
|
|
|
bReformat = sal_True;
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
if ( HasDrawView() || rOpt.IsGridVisible() )
|
|
|
|
{
|
|
|
|
if ( !HasDrawView() )
|
|
|
|
MakeDrawView();
|
|
|
|
|
|
|
|
SwDrawView *pDView = Imp()->GetDrawView();
|
|
|
|
if ( pDView->IsDragStripes() != rOpt.IsCrossHair() )
|
|
|
|
pDView->SetDragStripes( rOpt.IsCrossHair() );
|
|
|
|
|
|
|
|
if ( pDView->IsGridSnap() != rOpt.IsSnap() )
|
|
|
|
pDView->SetGridSnap( rOpt.IsSnap() );
|
|
|
|
|
|
|
|
if ( pDView->IsGridVisible() != rOpt.IsGridVisible() )
|
|
|
|
pDView->SetGridVisible( rOpt.IsGridVisible() );
|
|
|
|
|
|
|
|
const Size &rSz = rOpt.GetSnapSize();
|
|
|
|
pDView->SetGridCoarse( rSz );
|
|
|
|
|
|
|
|
const Size aFSize
|
|
|
|
( rSz.Width() ? rSz.Width() / (rOpt.GetDivisionX()+1) : 0,
|
|
|
|
rSz.Height()? rSz.Height()/ (rOpt.GetDivisionY()+1) : 0);
|
|
|
|
pDView->SetGridFine( aFSize );
|
|
|
|
Fraction aSnGrWdtX(rSz.Width(), rOpt.GetDivisionX() + 1);
|
|
|
|
Fraction aSnGrWdtY(rSz.Height(), rOpt.GetDivisionY() + 1);
|
|
|
|
pDView->SetSnapGridWidth( aSnGrWdtX, aSnGrWdtY );
|
|
|
|
|
|
|
|
if ( pOpt->IsSolidMarkHdl() != rOpt.IsSolidMarkHdl() )
|
|
|
|
pDView->SetSolidMarkHdl( rOpt.IsSolidMarkHdl() );
|
|
|
|
|
|
|
|
// it's a JOE interface !
|
|
|
|
if ( pOpt->IsBigMarkHdl() != rOpt.IsBigMarkHdl() )
|
|
|
|
pDView->SetMarkHdlSizePixel(rOpt.IsBigMarkHdl() ? 9 : 7);
|
|
|
|
}
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bOnlineSpellChgd = pOpt->IsOnlineSpell() != rOpt.IsOnlineSpell();
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
*pOpt = rOpt; // Erst jetzt werden die Options uebernommen.
|
|
|
|
pOpt->SetUIOptions(rOpt);
|
|
|
|
|
2006-08-14 15:59:17 +00:00
|
|
|
pDoc->set(IDocumentSettingAccess::HTML_MODE, 0 != ::GetHtmlMode(pDoc->GetDocShell()));
|
2000-09-18 23:08:29 +00:00
|
|
|
|
2010-06-13 15:22:56 +02:00
|
|
|
if( bBrowseModeChanged )
|
|
|
|
{
|
|
|
|
// --> FME 2005-03-16 #i44963# Good occasion to check if page sizes in
|
|
|
|
// page descriptions are still set to (LONG_MAX, LONG_MAX) (html import)
|
|
|
|
pDoc->CheckDefaultPageFmt();
|
|
|
|
// <--
|
|
|
|
CheckBrowseView( TRUE );
|
|
|
|
}
|
|
|
|
|
2007-09-27 08:43:09 +00:00
|
|
|
pMyWin->Invalidate();
|
2000-09-18 23:08:29 +00:00
|
|
|
if ( bReformat )
|
|
|
|
{
|
|
|
|
// Es hilft alles nichts, wir muessen an alle CntntFrms ein
|
|
|
|
// Prepare verschicken, wir formatieren neu:
|
|
|
|
StartAction();
|
|
|
|
Reformat();
|
|
|
|
EndAction();
|
|
|
|
}
|
|
|
|
|
|
|
|
if( bOnlineSpellChgd )
|
|
|
|
{
|
|
|
|
ViewShell *pSh = (ViewShell*)this->GetNext();
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bOnlineSpl = rOpt.IsOnlineSpell();
|
2000-09-18 23:08:29 +00:00
|
|
|
while( pSh != this )
|
|
|
|
{ pSh->pOpt->SetOnlineSpell( bOnlineSpl );
|
|
|
|
Window *pTmpWin = pSh->GetWin();
|
|
|
|
if( pTmpWin )
|
|
|
|
pTmpWin->Invalidate();
|
|
|
|
pSh = (ViewShell*)pSh->GetNext();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
|*
|
|
|
|
|* ViewShell::SetUIOptions()
|
|
|
|
|*
|
|
|
|
|* Ersterstellung OS 29.07.96
|
|
|
|
|* Letzte Aenderung OS 29.07.96
|
|
|
|
|*
|
|
|
|
******************************************************************************/
|
|
|
|
|
|
|
|
void ViewShell::SetUIOptions( const SwViewOption &rOpt )
|
|
|
|
{
|
|
|
|
pOpt->SetUIOptions(rOpt);
|
|
|
|
//the API-Flag of the view options is set but never reset
|
|
|
|
//it is required to set scroll bars in readonly documents
|
|
|
|
if(rOpt.IsStarOneSetting())
|
2011-01-17 15:06:54 +01:00
|
|
|
pOpt->SetStarOneSetting(sal_True);
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
pOpt->SetSymbolFont(rOpt.GetSymbolFont());
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
|*
|
|
|
|
|* ViewShell::SetReadonly()
|
|
|
|
|*
|
|
|
|
|* Ersterstellung OS 05.09.96
|
|
|
|
|* Letzte Aenderung MA 12. Feb. 97
|
|
|
|
|*
|
|
|
|
******************************************************************************/
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
void ViewShell::SetReadonlyOption(sal_Bool bSet)
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
|
|
|
//JP 01.02.99: bei ReadOnly Flag richtig abfragen und ggfs. neu
|
|
|
|
// formatieren; Bug 61335
|
|
|
|
|
|
|
|
// Schalten wir gerade von Readonly auf Bearbeiten um?
|
|
|
|
if( bSet != pOpt->IsReadonly() )
|
|
|
|
{
|
|
|
|
// damit die Flags richtig erfragt werden koennen.
|
2011-01-17 15:06:54 +01:00
|
|
|
pOpt->SetReadonly( sal_False );
|
2000-09-18 23:08:29 +00:00
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bReformat = pOpt->IsFldName();
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
pOpt->SetReadonly( bSet );
|
|
|
|
|
|
|
|
if( bReformat )
|
|
|
|
{
|
|
|
|
StartAction();
|
|
|
|
Reformat();
|
|
|
|
if ( GetWin() )
|
|
|
|
GetWin()->Invalidate();
|
|
|
|
EndAction();
|
|
|
|
}
|
|
|
|
else if ( GetWin() )
|
|
|
|
GetWin()->Invalidate();
|
2002-03-21 11:54:23 +00:00
|
|
|
if( Imp()->IsAccessible() )
|
|
|
|
Imp()->InvalidateAccessibleEditableState( sal_False );
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
}
|
2003-09-11 08:40:50 +00:00
|
|
|
/* -----------------28.08.2003 15:45-----------------
|
|
|
|
|
|
|
|
--------------------------------------------------*/
|
|
|
|
void ViewShell::SetPDFExportOption(sal_Bool bSet)
|
|
|
|
{
|
|
|
|
if( bSet != pOpt->IsPDFExport() )
|
|
|
|
{
|
2010-06-13 15:22:56 +02:00
|
|
|
if( bSet && pOpt->getBrowseMode() )
|
2011-01-17 15:06:54 +01:00
|
|
|
pOpt->SetPrtFormat( sal_True );
|
2003-09-11 08:40:50 +00:00
|
|
|
pOpt->SetPDFExport(bSet);
|
|
|
|
}
|
|
|
|
}
|
2002-08-01 13:13:38 +00:00
|
|
|
/* -----------------------------2002/07/31 17:06------------------------------
|
2000-09-18 23:08:29 +00:00
|
|
|
|
2002-08-01 13:13:38 +00:00
|
|
|
---------------------------------------------------------------------------*/
|
|
|
|
void ViewShell::SetReadonlySelectionOption(sal_Bool bSet)
|
|
|
|
{
|
|
|
|
if( bSet != pOpt->IsSelectionInReadonly() )
|
|
|
|
{
|
|
|
|
pOpt->SetSelectionInReadonly(bSet);
|
|
|
|
}
|
|
|
|
}
|
2000-09-18 23:08:29 +00:00
|
|
|
/******************************************************************************
|
|
|
|
|*
|
|
|
|
|* ViewShell::SetPrtFormatOption()
|
|
|
|
|*
|
|
|
|
|* Ersterstellung AMA 10. Sep. 97
|
|
|
|
|* Letzte Aenderung AMA 10. Sep. 97
|
|
|
|
|*
|
|
|
|
******************************************************************************/
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
void ViewShell::SetPrtFormatOption( sal_Bool bSet )
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
|
|
|
pOpt->SetPrtFormat( bSet );
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
|*
|
|
|
|
|* ViewShell::UISizeNotify()
|
|
|
|
|*
|
|
|
|
|* Ersterstellung MA 14. Jan. 97
|
|
|
|
|* Letzte Aenderung MA 14. Jan. 97
|
|
|
|
|*
|
|
|
|
******************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
void ViewShell::UISizeNotify()
|
|
|
|
{
|
|
|
|
if ( bDocSizeChgd )
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
bDocSizeChgd = sal_False;
|
|
|
|
sal_Bool bOld = bInSizeNotify;
|
|
|
|
bInSizeNotify = sal_True;
|
2008-02-19 12:50:15 +00:00
|
|
|
::SizeNotify( this, GetDocSize() );
|
2000-09-18 23:08:29 +00:00
|
|
|
bInSizeNotify = bOld;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
void ViewShell::SetRestoreActions(sal_uInt16 nSet)
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
2008-11-10 15:06:12 +00:00
|
|
|
DBG_ASSERT(!GetRestoreActions()||!nSet, "mehrfaches Restore der Actions ?");
|
2000-09-18 23:08:29 +00:00
|
|
|
Imp()->SetRestoreActions(nSet);
|
|
|
|
}
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 ViewShell::GetRestoreActions() const
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
|
|
|
return Imp()->GetRestoreActions();
|
|
|
|
}
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool ViewShell::IsNewLayout() const
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
|
|
|
return GetLayout()->IsNewLayout();
|
|
|
|
}
|
|
|
|
|
2007-09-27 08:43:09 +00:00
|
|
|
uno::Reference< ::com::sun::star::accessibility::XAccessible > ViewShell::CreateAccessible()
|
2002-02-20 17:14:14 +00:00
|
|
|
{
|
2007-09-27 08:43:09 +00:00
|
|
|
uno::Reference< ::com::sun::star::accessibility::XAccessible > xAcc;
|
2000-09-18 23:08:29 +00:00
|
|
|
|
2002-02-20 17:14:14 +00:00
|
|
|
// We require a layout and an XModel to be accessible.
|
2010-06-13 15:22:56 +02:00
|
|
|
ASSERT( pLayout, "no layout, no access" );
|
2002-02-20 17:14:14 +00:00
|
|
|
ASSERT( GetWin(), "no window, no access" );
|
|
|
|
|
2010-06-13 15:22:56 +02:00
|
|
|
if( pDoc->GetCurrentViewShell() && GetWin() ) //swmod 071108
|
2002-02-20 17:14:14 +00:00
|
|
|
xAcc = Imp()->GetAccessibleMap().GetDocumentView();
|
|
|
|
|
|
|
|
return xAcc;
|
|
|
|
}
|
2002-05-16 07:22:32 +00:00
|
|
|
|
2007-09-27 08:43:09 +00:00
|
|
|
uno::Reference< ::com::sun::star::accessibility::XAccessible >
|
2003-03-27 14:45:43 +00:00
|
|
|
ViewShell::CreateAccessiblePreview()
|
2002-05-22 10:48:43 +00:00
|
|
|
{
|
|
|
|
DBG_ASSERT( IsPreView(),
|
|
|
|
"Can't create accessible preview for non-preview ViewShell" );
|
|
|
|
|
|
|
|
// We require a layout and an XModel to be accessible.
|
2010-06-13 15:22:56 +02:00
|
|
|
ASSERT( pLayout, "no layout, no access" );
|
2002-05-22 10:48:43 +00:00
|
|
|
ASSERT( GetWin(), "no window, no access" );
|
|
|
|
|
2003-03-27 14:45:43 +00:00
|
|
|
// OD 15.01.2003 #103492# - add condition <IsPreView()>
|
2010-06-13 15:22:56 +02:00
|
|
|
if ( IsPreView() && GetLayout()&& GetWin() )
|
2003-03-27 14:45:43 +00:00
|
|
|
{
|
|
|
|
// OD 14.01.2003 #103492# - adjustment for new method signature
|
2002-05-22 10:48:43 +00:00
|
|
|
return Imp()->GetAccessibleMap().GetDocumentPreview(
|
2003-03-27 14:45:43 +00:00
|
|
|
PagePreviewLayout()->maPrevwPages,
|
|
|
|
GetWin()->GetMapMode().GetScaleX(),
|
2010-06-13 15:22:56 +02:00
|
|
|
GetLayout()->GetPageByPageNum( PagePreviewLayout()->mnSelectedPageNum ),
|
|
|
|
PagePreviewLayout()->maWinSize ); //swmod 080305
|
2003-03-27 14:45:43 +00:00
|
|
|
}
|
2002-05-22 10:48:43 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2002-05-16 07:22:32 +00:00
|
|
|
void ViewShell::InvalidateAccessibleFocus()
|
|
|
|
{
|
|
|
|
if( Imp()->IsAccessible() )
|
|
|
|
Imp()->GetAccessibleMap().InvalidateFocus();
|
|
|
|
}
|
2002-05-22 10:48:43 +00:00
|
|
|
|
2006-02-01 13:26:17 +00:00
|
|
|
/** invalidate CONTENT_FLOWS_FROM/_TO relation for paragraphs
|
|
|
|
|
|
|
|
OD 2005-12-01 #i27138#
|
|
|
|
|
|
|
|
@author OD
|
|
|
|
*/
|
|
|
|
void ViewShell::InvalidateAccessibleParaFlowRelation( const SwTxtFrm* _pFromTxtFrm,
|
|
|
|
const SwTxtFrm* _pToTxtFrm )
|
|
|
|
{
|
|
|
|
if ( GetLayout() && GetLayout()->IsAnyShellAccessible() )
|
|
|
|
{
|
|
|
|
Imp()->_InvalidateAccessibleParaFlowRelation( _pFromTxtFrm, _pToTxtFrm );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/** invalidate text selection for paragraphs
|
|
|
|
|
|
|
|
OD 2005-12-12 #i27301#
|
|
|
|
|
|
|
|
@author OD
|
|
|
|
*/
|
|
|
|
void ViewShell::InvalidateAccessibleParaTextSelection()
|
|
|
|
{
|
|
|
|
if ( GetLayout() && GetLayout()->IsAnyShellAccessible() )
|
|
|
|
{
|
|
|
|
Imp()->_InvalidateAccessibleParaTextSelection();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-02-27 05:38:42 +00:00
|
|
|
/** invalidate attributes for paragraphs
|
|
|
|
|
|
|
|
OD 2009-01-06 #i88069#
|
|
|
|
|
|
|
|
@author OD
|
|
|
|
*/
|
|
|
|
void ViewShell::InvalidateAccessibleParaAttrs( const SwTxtFrm& rTxtFrm )
|
|
|
|
{
|
|
|
|
if ( GetLayout() && GetLayout()->IsAnyShellAccessible() )
|
|
|
|
{
|
|
|
|
Imp()->_InvalidateAccessibleParaAttrs( rTxtFrm );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-02-02 15:11:26 +01:00
|
|
|
SwAccessibleMap* ViewShell::GetAccessibleMap()
|
|
|
|
{
|
|
|
|
if ( Imp()->IsAccessible() )
|
|
|
|
{
|
|
|
|
return &(Imp()->GetAccessibleMap());
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
2002-05-06 11:11:40 +00:00
|
|
|
/* -----------------------------06.05.2002 13:23------------------------------
|
|
|
|
|
|
|
|
---------------------------------------------------------------------------*/
|
|
|
|
void ViewShell::ApplyAccessiblityOptions(SvtAccessibilityOptions& rAccessibilityOptions)
|
|
|
|
{
|
|
|
|
if(pOpt->IsPagePreview() && !rAccessibilityOptions.GetIsForPagePreviews())
|
|
|
|
{
|
2002-11-01 12:23:37 +00:00
|
|
|
pAccOptions->SetAlwaysAutoColor(sal_False);
|
|
|
|
pAccOptions->SetStopAnimatedGraphics(sal_False);
|
|
|
|
pAccOptions->SetStopAnimatedText(sal_False);
|
2002-05-06 11:11:40 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2002-11-01 12:23:37 +00:00
|
|
|
pAccOptions->SetAlwaysAutoColor(rAccessibilityOptions.GetIsAutomaticFontColor());
|
|
|
|
pAccOptions->SetStopAnimatedGraphics(! rAccessibilityOptions.GetIsAllowAnimatedGraphics());
|
|
|
|
pAccOptions->SetStopAnimatedText(! rAccessibilityOptions.GetIsAllowAnimatedText());
|
2002-08-28 11:24:07 +00:00
|
|
|
|
2004-11-16 09:24:16 +00:00
|
|
|
// --> FME 2004-06-29 #114856# Formular view
|
|
|
|
// Always set this option, not only if document is read-only:
|
|
|
|
pOpt->SetSelectionInReadonly(rAccessibilityOptions.IsSelectionInReadonly());
|
2002-05-06 11:11:40 +00:00
|
|
|
}
|
|
|
|
}
|
2004-02-26 14:37:03 +00:00
|
|
|
|
2004-05-10 15:16:55 +00:00
|
|
|
ShellResource* ViewShell::GetShellRes()
|
|
|
|
{
|
|
|
|
return pShellRes;
|
|
|
|
}
|
2004-09-08 15:55:24 +00:00
|
|
|
|
2004-05-10 15:16:55 +00:00
|
|
|
void ViewShell::SetCareWin( Window* pNew )
|
|
|
|
{
|
|
|
|
pCareWindow = pNew;
|
|
|
|
}
|
|
|
|
|
2010-06-13 15:22:56 +02:00
|
|
|
sal_uInt16 ViewShell::GetPageCount() const
|
|
|
|
{
|
|
|
|
return GetLayout() ? GetLayout()->GetPageNum() : 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
const Size ViewShell::GetPageSize( sal_uInt16 nPageNum, bool bSkipEmptyPages ) const
|
|
|
|
{
|
|
|
|
Size aSize;
|
|
|
|
const SwRootFrm* pTmpRoot = GetLayout();
|
|
|
|
if( pTmpRoot && nPageNum )
|
|
|
|
{
|
|
|
|
const SwPageFrm* pPage = static_cast<const SwPageFrm*>
|
|
|
|
(pTmpRoot->Lower());
|
|
|
|
|
|
|
|
while( --nPageNum && pPage->GetNext() )
|
|
|
|
pPage = static_cast<const SwPageFrm*>( pPage->GetNext() );
|
|
|
|
|
|
|
|
if( !bSkipEmptyPages && pPage->IsEmptyPage() && pPage->GetNext() )
|
|
|
|
pPage = static_cast<const SwPageFrm*>( pPage->GetNext() );
|
|
|
|
|
|
|
|
aSize = pPage->Frm().SSize();
|
|
|
|
}
|
|
|
|
return aSize;
|
|
|
|
}
|
2004-09-08 15:55:24 +00:00
|
|
|
|
|
|
|
// --> FME 2004-06-15 #i12836# enhanced pdf export
|
|
|
|
sal_Int32 ViewShell::GetPageNumAndSetOffsetForPDF( OutputDevice& rOut, const SwRect& rRect ) const
|
|
|
|
{
|
|
|
|
ASSERT( GetLayout(), "GetPageNumAndSetOffsetForPDF assumes presence of layout" )
|
2005-03-08 12:47:33 +00:00
|
|
|
|
|
|
|
sal_Int32 nRet = -1;
|
|
|
|
|
2005-01-21 09:42:30 +00:00
|
|
|
// --> FME 2005-01-07 #i40059# Position out of bounds:
|
|
|
|
SwRect aRect( rRect );
|
2008-03-07 14:00:41 +00:00
|
|
|
aRect.Pos().X() = Max( aRect.Left(), GetLayout()->Frm().Left() );
|
2005-01-21 09:42:30 +00:00
|
|
|
// <--
|
2005-03-08 12:47:33 +00:00
|
|
|
|
2005-01-21 09:42:30 +00:00
|
|
|
const SwPageFrm* pPage = GetLayout()->GetPageAtPos( aRect.Center() );
|
2005-03-08 12:47:33 +00:00
|
|
|
if ( pPage )
|
|
|
|
{
|
|
|
|
ASSERT( pPage, "GetPageNumAndSetOffsetForPDF: No page found" )
|
|
|
|
|
|
|
|
Point aOffset( pPage->Frm().Pos() );
|
|
|
|
aOffset.X() = -aOffset.X();
|
|
|
|
aOffset.Y() = -aOffset.Y();
|
2004-09-08 15:55:24 +00:00
|
|
|
|
2005-03-08 12:47:33 +00:00
|
|
|
MapMode aMapMode( rOut.GetMapMode() );
|
|
|
|
aMapMode.SetOrigin( aOffset );
|
|
|
|
rOut.SetMapMode( aMapMode );
|
2004-09-08 15:55:24 +00:00
|
|
|
|
2005-03-08 12:47:33 +00:00
|
|
|
nRet = pPage->GetPhyPageNum() - 1;
|
|
|
|
}
|
2004-09-08 15:55:24 +00:00
|
|
|
|
2005-03-08 12:47:33 +00:00
|
|
|
return nRet;
|
2004-09-08 15:55:24 +00:00
|
|
|
}
|
|
|
|
// <--
|
2006-08-14 15:59:17 +00:00
|
|
|
|
2007-08-03 12:40:32 +00:00
|
|
|
// --> PB 2007-05-30 #146850#
|
|
|
|
const BitmapEx& ViewShell::GetReplacementBitmap( bool bIsErrorState )
|
|
|
|
{
|
|
|
|
BitmapEx** ppRet;
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nResId = 0, nHCResId = 0;
|
2007-08-03 12:40:32 +00:00
|
|
|
if( bIsErrorState )
|
|
|
|
{
|
|
|
|
ppRet = &pErrorBmp;
|
|
|
|
nResId = RID_GRAPHIC_ERRORBMP;
|
|
|
|
nHCResId = RID_GRAPHIC_ERRORBMP_HC;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ppRet = &pReplaceBmp;
|
|
|
|
nResId = RID_GRAPHIC_REPLACEBMP;
|
|
|
|
nHCResId = RID_GRAPHIC_REPLACEBMP_HC;
|
|
|
|
}
|
|
|
|
|
|
|
|
if( !*ppRet )
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nBmpResId =
|
2009-11-03 18:12:19 +01:00
|
|
|
Application::GetSettings().GetStyleSettings().GetHighContrastMode()
|
2007-08-03 12:40:32 +00:00
|
|
|
? nHCResId : nResId;
|
|
|
|
*ppRet = new BitmapEx( SW_RES( nBmpResId ) );
|
|
|
|
}
|
|
|
|
return **ppRet;
|
|
|
|
}
|
|
|
|
|
|
|
|
void ViewShell::DeleteReplacementBitmaps()
|
|
|
|
{
|
|
|
|
DELETEZ( pErrorBmp );
|
|
|
|
DELETEZ( pReplaceBmp );
|
|
|
|
}
|
|
|
|
// <--
|
|
|
|
|
2008-03-07 14:00:41 +00:00
|
|
|
SwPostItMgr* ViewShell::GetPostItMgr()
|
|
|
|
{
|
|
|
|
SwView* pView = GetDoc()->GetDocShell() ? GetDoc()->GetDocShell()->GetView() : 0;
|
|
|
|
if ( pView )
|
|
|
|
return pView->GetPostItMgr();
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2006-08-14 15:59:17 +00:00
|
|
|
/*
|
|
|
|
* Document Interface Access
|
|
|
|
*/
|
|
|
|
const IDocumentSettingAccess* ViewShell::getIDocumentSettingAccess() const { return pDoc; }
|
|
|
|
IDocumentSettingAccess* ViewShell::getIDocumentSettingAccess() { return pDoc; }
|
|
|
|
const IDocumentDeviceAccess* ViewShell::getIDocumentDeviceAccess() const { return pDoc; }
|
|
|
|
IDocumentDeviceAccess* ViewShell::getIDocumentDeviceAccess() { return pDoc; }
|
CWS-TOOLING: integrate CWS swrefactormarks2
2009-04-09 12:51:41 +0200 b_michaelsen r270689 : #i94949# cleaned up assertions after rebasing
2009-04-08 17:37:08 +0200 b_michaelsen r270658 : fixing sw/source/ui/utlui/makefile.mk
2009-04-07 17:56:54 +0200 b_michaelsen r270606 : added bookctrl.cxx to EXCEPTIONFILES, because this is needed for stl on unxsols4
2009-04-07 17:05:20 +0200 b_michaelsen r270603 : added crbm.cxx to EXCEPTIONFILES, because this is needed for stl on unxsols4
2009-04-02 23:44:38 +0200 b_michaelsen r270436 : CWS-TOOLING: rebase CWS swrefactormarks2 to trunk@270033 (milestone: DEV300:m45)
2009-02-27 16:25:31 +0100 b_michaelsen r268606 : #i94949# fixed Windows buildbreaker
2009-02-25 18:01:13 +0100 b_michaelsen r268464 : #i94949# Bookmarktest document filter roundtrips
2009-02-24 18:23:55 +0100 b_michaelsen r268404 : #i94949# Bookmark unittests
2009-02-23 19:47:44 +0100 b_michaelsen r268370 : #i94949# added unittest for bookmarks
2009-02-23 12:22:07 +0100 b_michaelsen r268348 : #i94949# fixing CheckCrossReferences testcase
2009-02-20 18:12:50 +0100 b_michaelsen r268335 : #i94949# fixing SwXTextRange
2009-02-18 18:32:57 +0100 b_michaelsen r268252 : #i94949# deregistering DdeBookmarks on delete
2009-02-18 18:29:08 +0100 b_michaelsen r268251 : fixing dbgoutsw.cxx for debug builds
2009-02-16 18:42:43 +0100 b_michaelsen r267834 : CWS-TOOLING: rebase CWS swrefactormarks2 to trunk@267171 (milestone: DEV300:m41)
2009-02-12 15:32:02 +0100 b_michaelsen r267667 : #i94949 fixed crossrefbookmark naming
2009-02-11 18:30:08 +0100 b_michaelsen r267624 : #94949# fixing bookmark navigation
2009-02-11 13:55:26 +0100 b_michaelsen r267599 : #i94949# fixed bookmark naming
2009-02-10 17:53:05 +0100 b_michaelsen r267571 : #i94949# renamed HasOtherMarkPos to IsExpanded
2009-02-10 17:23:01 +0100 b_michaelsen r267564 : #i94949# renamed ::sw::bookmark namespace to more fitting ::sw::mark
2009-02-10 16:16:32 +0100 b_michaelsen r267553 : #i94949# creating only CrossRefBookmark per Txtnode
2009-02-10 12:14:05 +0100 b_michaelsen r267547 : #i94949# fixed bookmark count in navigator
2009-02-09 19:12:18 +0100 b_michaelsen r267532 : #i94949# lcl_CopyBookmarks(..) - handle marks on boundaries correctly
2009-02-09 17:32:45 +0100 b_michaelsen r267524 : #i94949# setting the refobject of the DdeBookmark in Sin SwServerObject::SetDdeBookmark(..)
2009-02-09 17:22:15 +0100 b_michaelsen r267523 : #i94949# trying to harden SwServerObject
2009-02-09 16:47:32 +0100 b_michaelsen r267521 : #i94949# lcl_CopyBookmarks(..): try to get the source mark name, if possible
2009-02-09 16:05:42 +0100 b_michaelsen r267519 : #i94949# clearing the OtherMarkPos if PaM has no mark in repositionMark(..), swapping inverted bookmarks without hissing an assertion
2009-02-09 15:55:38 +0100 b_michaelsen r267518 : #i94949# checking for out-of-bounds in SwView::ExecuteStatusLine(..)
2009-02-09 15:23:47 +0100 b_michaelsen r267517 : #i94949# using an UNO_BOOKMARK in ui/dbui/dbinsdlg.cxx
2009-02-09 14:14:47 +0100 b_michaelsen r267514 : #i94949# IDocumentMarkAccess::GetType(..) asserts on unknown type
2009-02-09 14:04:25 +0100 b_michaelsen r267513 : #i94949# using rtl strings instead of tools-strings in CrossRefBookmarks
2009-02-09 13:55:01 +0100 b_michaelsen r267510 : #i94949# using empty string for UnoMark construction
2009-02-09 13:46:46 +0100 b_michaelsen r267509 : #i94949# removed superfluous #includes, removed superfluous member DdeBookmark::bGenerateName, initialized DdeBookmark::m_aRefObj removed superfluous local _FindItem::ClearObj
2009-02-06 14:38:37 +0100 b_michaelsen r267462 : #i94949# fixing FN_STAT_BOOKMARK dispatches
2009-02-05 18:05:07 +0100 b_michaelsen r267436 : #i94949# removing superfluous #includes
2009-02-04 15:51:31 +0100 b_michaelsen r267391 : fixing resync merge error
2009-02-02 19:39:55 +0100 b_michaelsen r267294 : #i94949# bookmark performance
2009-01-30 19:30:51 +0100 b_michaelsen r267229 : #i94949# throwing IllegalArgumentException, if appropriate
2009-01-30 19:29:56 +0100 b_michaelsen r267228 : #i94949# refactored lcl_FillBookmarkArray, comments, constness
2009-01-30 19:23:49 +0100 b_michaelsen r267227 : #i94949# refactored lcl_FillBookmarkArray, comments, constness
2009-01-30 19:16:06 +0100 b_michaelsen r267226 : #i94949# refactored lcl_FillBookmarkArray
2009-01-30 17:59:27 +0100 b_michaelsen r267222 : #i94949# removed superficial #include
2009-01-30 17:50:02 +0100 b_michaelsen r267220 : #i94949# SwXTextRange remembers its UNO bookmark
2009-01-29 20:19:58 +0100 b_michaelsen r267168 : #i94949# implemented IDocumentMarkAccess::findBookmark
2009-01-29 17:22:17 +0100 b_michaelsen r267162 : #i94949# implemented renameMark in Markmanager
2009-01-29 14:17:10 +0100 b_michaelsen r267134 : #i94949# cleanup in SwXBookmark, whitespace
2009-01-29 13:21:54 +0100 b_michaelsen r267125 : #i94949# cleanup in SwXBookmark, whitespace
2009-01-29 13:06:10 +0100 b_michaelsen r267120 : #i94949# cleanup in SwXBookmark, whitespace
2009-01-29 13:00:09 +0100 b_michaelsen r267118 : #i94949# cleanup in SwXBookmark, whitespace
2009-01-29 10:35:10 +0100 b_michaelsen r267101 : #i94949# renamed SetCrsrToBkmk to SetCrsrToMark, moving to start/end of doc if no more bookmarks can be found
2009-01-28 17:05:36 +0100 b_michaelsen r267070 : #i94949# fixed order in aProvNamesId in unocoll.cxx
2009-01-28 15:46:13 +0100 b_michaelsen r267063 : #i94949# documentation
2009-01-28 15:36:59 +0100 b_michaelsen r267062 : #i94949# removing superficial #include
2009-01-28 15:30:36 +0100 b_michaelsen r267061 : #i94949# basic code conventions
2009-01-28 11:14:30 +0100 b_michaelsen r267039 : #i94949# comparing to the actual name of the new mark
2009-01-26 15:22:25 +0100 b_michaelsen r266927 : #i94949# performance fixes
2009-01-14 21:16:56 +0100 b_michaelsen r266332 : #i94949# fixing linux x86-64 compiler warnings
2009-01-14 19:52:06 +0100 b_michaelsen r266331 : #i94949# fixing some compiler warnings
2008-12-15 13:04:49 +0100 b_michaelsen r265474 : #i94949# fixed microsoft compiler warnings
2008-12-12 18:26:02 +0100 b_michaelsen r265434 : #i94949# fixed pro platform buildbreakers
2008-12-11 17:51:24 +0100 b_michaelsen r265342 : CWS-TOOLING: rebase CWS swrefactormarks2 to trunk@264807 (milestone: DEV300:m37)
2008-12-09 18:30:59 +0100 b_michaelsen r265134 : #i94949# fixed IDocumentMarkAccess::GetType for new mark inheritance tree
2008-12-09 16:56:26 +0100 b_michaelsen r265118 : #i94949# fixed deleteMark optimization
2008-12-09 14:55:58 +0100 b_michaelsen r265092 : #i94949# DdeLink and DdeBookmark
2008-12-05 18:28:05 +0100 b_michaelsen r264914 : #i94949# fixed InitDoc in bookmarks
2008-12-02 02:23:51 +0100 b_michaelsen r264649 : #i94949# removed obsolete naming proposal code in SwXTextRange, fixed navigator reminders to forget the oldest reminder when the pool is empty
2008-12-02 02:05:19 +0100 b_michaelsen r264648 : #i94949# using bisect search for delete
2008-12-02 01:58:16 +0100 b_michaelsen r264647 : #i94949# using bisect search for delete
2008-12-02 01:37:33 +0100 b_michaelsen r264646 : #i94949# using bisect search for delete
2008-12-02 01:03:29 +0100 b_michaelsen r264645 : #i94949# fixed deleteMark crash
2008-12-01 20:55:00 +0100 b_michaelsen r264638 : #i94949# removed crossrefs from ui enumerations
2008-12-01 15:48:12 +0100 b_michaelsen r264613 : #i94949# removed superfluous local functions
2008-12-01 15:01:19 +0100 b_michaelsen r264608 : #i94949# optimized insertion of new marks
2008-12-01 14:33:21 +0100 b_michaelsen r264603 : #i94949# simplified code finding Fieldmark for a position
2008-12-01 14:05:55 +0100 b_michaelsen r264598 : #i94949# fixed reverse travelling through marks, removed obsolete getUniqueMarkName()
2008-11-27 18:48:15 +0100 b_michaelsen r264515 : #i94949# fixed _SaveCntntIdx and friends
2008-11-27 15:59:49 +0100 b_michaelsen r264500 : #i94949# fix Mark position only in ctor
2008-11-27 15:52:28 +0100 b_michaelsen r264497 : #i94949# fixed Bug in SwXBookmark, was using pDoc too early
2008-11-26 14:54:22 +0100 b_michaelsen r264396 : #i94949# fixed documentation, simplified navigator reminder code
2008-11-24 20:45:51 +0100 b_michaelsen r264266 : #i94949# removed last obsolete getUniqueMarkName calls
2008-11-24 20:21:35 +0100 b_michaelsen r264265 : #i94949# fixed typo in IDocumentMarkAccess, removed obsolete getUniqueMarkName calls
2008-11-24 18:34:32 +0100 b_michaelsen r264264 : #i94949# repositioning of Marks, removed possibility to delete marks by name in the core, refactoring of navigator reminder generation
2008-11-21 14:08:49 +0100 b_michaelsen r264137 : #i94949# simplified makeMark
2008-11-21 12:07:09 +0100 b_michaelsen r264120 : #i94949# moved ShortName and KeyCode from IMark to IBookmark
2008-11-19 12:50:49 +0100 b_michaelsen r263981 : #i94949# starting refactoring of bookmark naming
2008-11-19 11:31:08 +0100 b_michaelsen r263972 : #i94949# getting rid of obsolete dynamic casts
2008-11-18 19:06:09 +0100 b_michaelsen r263795 : #i94949# getting rid of index based mark access, IDocumentMarkAccess already provides iterators
2008-11-18 17:50:18 +0100 b_michaelsen r263792 : #i94949# getting rid of index based mark access, IDocumentMarkAccess already provides iterators
2008-11-18 16:48:20 +0100 b_michaelsen r263783 : #i94949# removed methods from crsrsh which are already available directly via IDocumentMarkAccess
2008-11-18 11:31:35 +0100 b_michaelsen r263753 : #i94949# cleaning up mark code in crsrsh
2008-11-17 10:15:25 +0100 b_michaelsen r263705 : #i94949# removed possible integer overflow
2008-11-14 18:48:45 +0100 b_michaelsen r263695 : #i94949# management of mark names in MarkManager
2008-11-14 18:23:40 +0100 b_michaelsen r263693 : #i94949# using polymorphism to do mark-specific setup in SwDoc
2008-11-14 16:27:09 +0100 b_michaelsen r263684 : #i94949# got rid of makeCrossRefBookmark
2008-11-14 13:03:32 +0100 b_michaelsen r263674 : #i94949# refactored Correction methods
2008-11-13 12:27:55 +0100 b_michaelsen r263631 : #i94949# got rid of old-style tools assertions in new code
2008-11-12 16:58:16 +0100 b_michaelsen r263608 : #i94949# added assertion for unique names
2008-11-12 16:55:18 +0100 b_michaelsen r263607 : #i94949# maked XFormField deprecated
2008-11-12 13:04:29 +0100 b_michaelsen r263587 : #i94949# replaced IDocumentMarkAccess::GetType with simple dynamic_cast where possible
2008-11-11 18:45:53 +0100 b_michaelsen r263572 : #i94949# cleaned up SwHstryBookmark
2008-11-11 13:48:18 +0100 b_michaelsen r263557 : #i94949# removed dynamic_casts to SwModify by inheriting IMark from it
2008-11-11 11:26:28 +0100 b_michaelsen r263548 : #i94949# fixed SwXBookmark
2008-11-10 17:01:19 +0100 b_michaelsen r263529 : #i94949# fixed DdeBookmarks in clipboard
2008-11-10 16:44:52 +0100 b_michaelsen r263527 : #i94949# formatting
2008-11-10 16:29:16 +0100 b_michaelsen r263526 : #i94949# fixing unoobj.cxx
2008-11-10 16:23:50 +0100 b_michaelsen r263525 : #i94949# cleaning up crossrefbookmark.cxx/.hxx
2008-11-10 16:02:08 +0100 b_michaelsen r263524 : #i94949# Pdf Export should only generate 'real' bookmarks
2008-11-10 15:33:58 +0100 b_michaelsen r263521 : #i94949# removed const_casts
2008-11-10 15:12:06 +0100 b_michaelsen r263520 : #i94949# moved _DelBookmarks into MarksManager
2008-11-07 18:48:38 +0100 b_michaelsen r263480 : #i94949# using iterator interface
2008-11-07 18:41:46 +0100 b_michaelsen r263478 : #i94949# using iterator interface
2008-11-07 18:07:41 +0100 b_michaelsen r263477 : #i94949# using iterator interface
2008-11-07 17:54:41 +0100 b_michaelsen r263476 : #i94949# using iterator interface
2008-11-07 17:44:41 +0100 b_michaelsen r263475 : #i94949# moved correction methods into MarkManager
2008-11-06 18:47:28 +0100 b_michaelsen r263404 : #i94949# getting rid of superfluous const_casts
2008-11-06 17:58:01 +0100 b_michaelsen r263403 : #i94949# no more setting of mark positions outside of the core
2008-11-06 17:08:37 +0100 b_michaelsen r263401 : #i94949# removed setters from IMark
2008-11-06 13:55:25 +0100 b_michaelsen r263383 : #i94949 SwDoc does not implement IDocumentMarkAccess anymore
2008-11-04 18:17:03 +0100 b_michaelsen r263333 : #i94949# began removing IDocumentMarkAccess from SwDoc
2008-11-04 16:48:34 +0100 b_michaelsen r263330 : removing dead code (SwBitArray) found by mst
2008-11-04 16:29:32 +0100 b_michaelsen r263329 : removing dead code (SwBitArray) found by mst
2008-11-04 14:57:48 +0100 b_michaelsen r263326 : removing dead code (SwBitArray) found by mst
2008-11-04 14:50:18 +0100 b_michaelsen r263325 : #i94949# stricter typing in IDocumentMarkAccess
2008-10-24 15:16:27 +0200 b_michaelsen r262647 : #i94949# renamed ::sw::bookmark::SimpleMark to NavigatorReminder to fit the IDocumentMarkAccess enum
2008-10-24 15:10:10 +0200 b_michaelsen r262646 : #i94949# only 'real' bookmark implement IBookmark, Marks also get removed from m_vFieldmarks on delete/clear
2008-10-24 13:06:23 +0200 b_michaelsen r262636 : #i94949# Fieldmark tabnavigation
2008-10-23 12:16:36 +0200 b_michaelsen r262619 : #i94949# Fieldmark classes and filters
2008-10-22 13:17:18 +0200 b_michaelsen r262597 : #i94949# writer import fixes
2008-10-21 11:30:38 +0200 b_michaelsen r262565 : #i94949# renamed methods containing Bookmark in the generic IMark interface
2008-10-20 14:09:02 +0200 b_michaelsen r262318 : #i94949# fixed SwDoc::CorrRel
2008-10-16 22:45:13 +0200 b_michaelsen r262273 : #i94949 simplified Before/After methods
2008-10-16 21:40:57 +0200 b_michaelsen r262271 : #i94949 renamed SimpleMark to NavigatorReminder
2008-10-16 21:15:23 +0200 b_michaelsen r262270 : #i94949 using shared_ptr only in MarkManager
2008-10-16 17:46:37 +0200 b_michaelsen r262269 : #i94949# getFieldmarkBefore and getFieldmarkAfter
2008-10-16 17:12:13 +0200 b_michaelsen r262265 : #i94949# cleanup in crbm.cxx
2008-10-16 12:49:01 +0200 b_michaelsen r262257 : #i94949# fixed usage of invalid iterator, fixed invalid cast
2008-10-15 15:34:20 +0200 b_michaelsen r262239 : #i94949# added moved files
2008-10-15 15:26:45 +0200 b_michaelsen r262237 : #i94949# initial reimplementation of Bookmarks
2009-04-21 15:40:02 +00:00
|
|
|
const IDocumentMarkAccess* ViewShell::getIDocumentMarkAccess() const { return pDoc->getIDocumentMarkAccess(); }
|
|
|
|
IDocumentMarkAccess* ViewShell::getIDocumentMarkAccess() { return pDoc->getIDocumentMarkAccess(); }
|
2006-08-14 15:59:17 +00:00
|
|
|
const IDocumentDrawModelAccess* ViewShell::getIDocumentDrawModelAccess() const { return pDoc; }
|
|
|
|
IDocumentDrawModelAccess* ViewShell::getIDocumentDrawModelAccess() { return pDoc; }
|
|
|
|
const IDocumentRedlineAccess* ViewShell::getIDocumentRedlineAccess() const { return pDoc; }
|
|
|
|
IDocumentRedlineAccess* ViewShell::getIDocumentRedlineAccess() { return pDoc; }
|
|
|
|
const IDocumentLayoutAccess* ViewShell::getIDocumentLayoutAccess() const { return pDoc; }
|
|
|
|
IDocumentLayoutAccess* ViewShell::getIDocumentLayoutAccess() { return pDoc; }
|
|
|
|
const IDocumentFieldsAccess* ViewShell::getIDocumentFieldsAccess() const { return pDoc; }
|
|
|
|
IDocumentContentOperations* ViewShell::getIDocumentContentOperations() { return pDoc; }
|
|
|
|
IDocumentStylePoolAccess* ViewShell::getIDocumentStylePoolAccess() { return pDoc; }
|
|
|
|
const IDocumentStatistics* ViewShell::getIDocumentStatistics() const { return pDoc; }
|
2010-11-25 14:31:08 +01:00
|
|
|
|
2010-12-15 09:14:02 +01:00
|
|
|
IDocumentUndoRedo & ViewShell::GetIDocumentUndoRedo()
|
|
|
|
{ return pDoc->GetIDocumentUndoRedo(); }
|
|
|
|
IDocumentUndoRedo const& ViewShell::GetIDocumentUndoRedo() const
|
|
|
|
{ return pDoc->GetIDocumentUndoRedo(); }
|
2010-11-25 14:31:08 +01:00
|
|
|
|
2008-02-26 09:43:47 +00:00
|
|
|
// --> OD 2007-11-14 #i83479#
|
|
|
|
const IDocumentListItems* ViewShell::getIDocumentListItemsAccess() const
|
|
|
|
{
|
|
|
|
return pDoc;
|
|
|
|
}
|
|
|
|
const IDocumentOutlineNodes* ViewShell::getIDocumentOutlineNodesAccess() const
|
|
|
|
{
|
|
|
|
return pDoc;
|
|
|
|
}
|
|
|
|
// <--
|