Files
libreoffice/sw/source/core/view/viewsh.cxx

2785 lines
93 KiB
C++
Raw Normal View History

2000-09-18 23:08:29 +00:00
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2000-09-18 23:08:29 +00:00
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
2000-09-18 23:08:29 +00:00
*
* OpenOffice.org - a multi-platform office productivity suite
2000-09-18 23:08:29 +00:00
*
* This file is part of OpenOffice.org.
2000-09-18 23:08:29 +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
*
* 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
*
* 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
*
************************************************************************/
// 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
#include <com/sun/star/accessibility/XAccessible.hpp>
#include <sfx2/viewfrm.hxx>
2000-09-18 23:08:29 +00:00
#include <sfx2/progress.hxx>
#include <svx/srchdlg.hxx>
#include <svx/svdobj.hxx>
#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>
#include <accmap.hxx>
#include <svtools/colorcfg.hxx>
#include <svtools/accessibilityoptions.hxx>
#include <accessibilityoptions.hxx>
2000-09-18 23:08:29 +00:00
#ifndef _STATSTR_HRC
#include <statstr.hrc>
#endif
#ifndef _COMCORE_HRC
#include <comcore.hrc>
#endif
// OD 14.01.2003 #103492#
#include <pagepreviewlayout.hxx>
// --> OD 2004-05-24 #i28701#
#include <sortedobjs.hxx>
#include <anchoredobject.hxx>
// <--
#include "../../ui/inc/view.hxx"
#include <PostItMgr.hxx>
#include <vcl/virdev.hxx>
#include <vcl/svapp.hxx>
// #i74769#
#include <svx/sdrpaintwindow.hxx>
2000-09-18 23:08:29 +00:00
BOOL ViewShell::bLstAct = FALSE;
ShellResource *ViewShell::pShellRes = 0;
Window *ViewShell::pCareWindow = 0;
BitmapEx* ViewShell::pErrorBmp = NULL;
BitmapEx* ViewShell::pReplaceBmp = NULL;
2000-09-18 23:08:29 +00:00
BOOL bInSizeNotify = FALSE;
2000-09-18 23:08:29 +00:00
DBG_NAME(LayoutIdle)
2000-09-18 23:08:29 +00:00
TYPEINIT0(ViewShell);
using namespace ::com::sun::star;
//////////////////////////////////////////////////////////////////////////////
// #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
void ViewShell::PrePaint()
{
// forward PrePaint event from VCL Window to DrawingLayer
if(HasDrawView())
{
Imp()->GetDrawView()->PrePaint();
}
}
void ViewShell::DLPrePaint2(const Region& rRegion)
{
if(0L == mnPrePostPaintCount)
{
// #i75172# ensure DrawView to use DrawingLayer bufferings
if ( !HasDrawView() )
MakeDrawView();
// Prefer window; if tot available, get pOut (e.g. printer)
mpPrePostOutDev = (GetWin() ? GetWin() : GetOut());
// #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());
}
// remember original paint MapMode for wrapped FlyFrame paints
maPrePostMapMode = pOut->GetMapMode();
}
mnPrePostPaintCount++;
}
CWS-TOOLING: integrate CWS aw061 2009-01-13 19:18:08 +0100 aw r266250 : #i96669# changed initialisation order in Embedded3DPrimitive2D::Embedded3DPrimitive2D due to TinderBox 2009-01-13 19:15:37 +0100 aw r266249 : #i96669# changed initialisation order in Embedded3DPrimitive2D::Embedded3DPrimitive2D due to TinderBox 2009-01-12 11:53:37 +0100 aw r266141 : #i97874# corrected include for TinderBox build 2009-01-08 17:48:23 +0100 aw r266029 : #i97874# extended SdrTextObj::ImpConvertAddText to copy needed attributes from original object 2009-01-08 14:59:08 +0100 aw r266015 : #i96350# added fallback to solid fill in shadow TabPage when no fill is defined to get a reasonable shadow preview 2009-01-08 12:40:49 +0100 aw r265995 : #i94832# remuved not needed E3DModifySceneSnapRectUpdater usages 2009-01-08 01:53:46 +0100 thb r265982 : #i94860# Blacklisting another ATI card/driver that causes blank screens 2009-01-08 01:46:38 +0100 thb r265981 : #i97853# Changed all gradient texture methods to use basegfx gradienttools. consolidated quite some code 2009-01-08 01:45:09 +0100 thb r265980 : #i97853# Added lerp methods, slight changes to have everything necessary contained in the ODFGradientInfo struct 2009-01-08 00:01:54 +0100 thb r265979 : #i97853# First part of the move - duplicated the stuff to basegfx 2009-01-06 16:23:09 +0100 aw r265930 : #i97197# Changed SwDrawVirtObj to work well with changed aOutRect and bBoundRectValid functionality 2009-01-06 12:41:24 +0100 aw r265909 : #i97784# corrected regression with connectors 2009-01-05 17:30:31 +0100 aw r265881 : #i97772# added missing usage of reduce factor for BitmapPrimitive creation 2009-01-05 12:24:01 +0100 aw r265863 : #i97321# added direct handling of HatchTexturePrimitive3D to not use it's decomposition for HitTest 2008-12-23 13:57:27 +0100 aw r265782 : #i96669# changed SW's FlyFrame paint fallback with primitives to use createLocalDecomposition since get2Decomposition does not have to stay virtual on the long run 2008-12-23 13:47:59 +0100 aw r265781 : #i96669# optimized impCreateTextPortionPrimitive to only create TextDecoratedPortionPrimitive2D when needed 2008-12-23 13:44:45 +0100 aw r265780 : #i96669# added B2DRange buffering to some primitive implementations where it is most necessary 2008-12-19 15:45:45 +0100 aw r265729 : #i96669# prepared TextPrimitives to work without DXarray, too. Had to rework impSplitSingleWords which gets active when a text portion has some word-wise decorations. Tested before committing 2008-12-19 15:44:16 +0100 aw r265728 : #i96669# corrected error in createPolygonFromUnitEllipseSegment which popped up when investigating 2008-12-18 17:45:58 +0100 aw r265708 : #i97149# added ActionChanged() call when visualisation object is modified 2008-12-18 15:34:42 +0100 aw r265695 : #i96598# corrected SdrPageObj's usage of aOutRect 2008-12-17 16:59:37 +0100 aw r265647 : #i96537# exchanged the marker for point number in string with correct one 2008-12-16 17:50:33 +0100 aw r265566 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:50:17 +0100 aw r265565 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:50:00 +0100 aw r265564 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:49:48 +0100 aw r265563 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:49:35 +0100 aw r265562 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer
2009-01-20 09:49:16 +00:00
void ViewShell::DLPostPaint2(bool bPaintFormLayer)
{
OSL_ENSURE(mnPrePostPaintCount > 0L, "ViewShell::DLPostPaint2: Pre/PostPaint encapsulation broken (!)");
mnPrePostPaintCount--;
if((0L == mnPrePostPaintCount) && (0 != mpTargetPaintWindow))
{
// #i74769# restore buffered OutDev
if(mpTargetPaintWindow->GetPreRenderDevice())
{
pOut = mpBufferedOut;
}
// #i74769# use SdrPaintWindow now direct
CWS-TOOLING: integrate CWS aw061 2009-01-13 19:18:08 +0100 aw r266250 : #i96669# changed initialisation order in Embedded3DPrimitive2D::Embedded3DPrimitive2D due to TinderBox 2009-01-13 19:15:37 +0100 aw r266249 : #i96669# changed initialisation order in Embedded3DPrimitive2D::Embedded3DPrimitive2D due to TinderBox 2009-01-12 11:53:37 +0100 aw r266141 : #i97874# corrected include for TinderBox build 2009-01-08 17:48:23 +0100 aw r266029 : #i97874# extended SdrTextObj::ImpConvertAddText to copy needed attributes from original object 2009-01-08 14:59:08 +0100 aw r266015 : #i96350# added fallback to solid fill in shadow TabPage when no fill is defined to get a reasonable shadow preview 2009-01-08 12:40:49 +0100 aw r265995 : #i94832# remuved not needed E3DModifySceneSnapRectUpdater usages 2009-01-08 01:53:46 +0100 thb r265982 : #i94860# Blacklisting another ATI card/driver that causes blank screens 2009-01-08 01:46:38 +0100 thb r265981 : #i97853# Changed all gradient texture methods to use basegfx gradienttools. consolidated quite some code 2009-01-08 01:45:09 +0100 thb r265980 : #i97853# Added lerp methods, slight changes to have everything necessary contained in the ODFGradientInfo struct 2009-01-08 00:01:54 +0100 thb r265979 : #i97853# First part of the move - duplicated the stuff to basegfx 2009-01-06 16:23:09 +0100 aw r265930 : #i97197# Changed SwDrawVirtObj to work well with changed aOutRect and bBoundRectValid functionality 2009-01-06 12:41:24 +0100 aw r265909 : #i97784# corrected regression with connectors 2009-01-05 17:30:31 +0100 aw r265881 : #i97772# added missing usage of reduce factor for BitmapPrimitive creation 2009-01-05 12:24:01 +0100 aw r265863 : #i97321# added direct handling of HatchTexturePrimitive3D to not use it's decomposition for HitTest 2008-12-23 13:57:27 +0100 aw r265782 : #i96669# changed SW's FlyFrame paint fallback with primitives to use createLocalDecomposition since get2Decomposition does not have to stay virtual on the long run 2008-12-23 13:47:59 +0100 aw r265781 : #i96669# optimized impCreateTextPortionPrimitive to only create TextDecoratedPortionPrimitive2D when needed 2008-12-23 13:44:45 +0100 aw r265780 : #i96669# added B2DRange buffering to some primitive implementations where it is most necessary 2008-12-19 15:45:45 +0100 aw r265729 : #i96669# prepared TextPrimitives to work without DXarray, too. Had to rework impSplitSingleWords which gets active when a text portion has some word-wise decorations. Tested before committing 2008-12-19 15:44:16 +0100 aw r265728 : #i96669# corrected error in createPolygonFromUnitEllipseSegment which popped up when investigating 2008-12-18 17:45:58 +0100 aw r265708 : #i97149# added ActionChanged() call when visualisation object is modified 2008-12-18 15:34:42 +0100 aw r265695 : #i96598# corrected SdrPageObj's usage of aOutRect 2008-12-17 16:59:37 +0100 aw r265647 : #i96537# exchanged the marker for point number in string with correct one 2008-12-16 17:50:33 +0100 aw r265566 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:50:17 +0100 aw r265565 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:50:00 +0100 aw r265564 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:49:48 +0100 aw r265563 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:49:35 +0100 aw r265562 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer
2009-01-20 09:49:16 +00:00
Imp()->GetDrawView()->EndDrawLayers(*mpTargetPaintWindow, bPaintFormLayer);
mpTargetPaintWindow = 0;
}
}
//////////////////////////////////////////////////////////////////////////////
/******************************************************************************
|*
|* ViewShell::ImplEndAction()
|*
|* Letzte Aenderung MA 04. Sep. 96
|*
******************************************************************************/
2000-09-18 23:08:29 +00:00
void ViewShell::ImplEndAction( const BOOL bIdleEnd )
{
//Fuer den Drucker gibt es hier nichts zu tun.
if ( !GetWin() || IsPreView() )
{
bPaintWorks = TRUE;
UISizeNotify();
return;
}
bInEndAction = TRUE;
//Laeuft hiermit das EndAction der Letzten Shell im Ring?
ViewShell::bLstAct = TRUE;
ViewShell *pSh = (ViewShell*)this->GetNext();
while ( pSh != this )
{ if ( pSh->ActionPend() )
{ ViewShell::bLstAct = FALSE;
pSh = this;
}
else
pSh = (ViewShell*)pSh->GetNext();
}
const bool bIsShellForCheckViewLayout = ( this == GetLayout()->GetCurrShell() );
2000-09-18 23:08:29 +00:00
SET_CURR_SHELL( this );
if ( Imp()->HasDrawView() && !Imp()->GetDrawView()->areMarkHandlesHidden() )
2000-09-18 23:08:29 +00:00
Imp()->StartAction();
if ( Imp()->GetRegion() && Imp()->GetRegion()->GetOrigin() != VisArea() )
Imp()->DelRegion();
2000-09-18 23:08:29 +00:00
const BOOL bExtraData = ::IsExtraData( GetDoc() );
2000-09-18 23:08:29 +00:00
if ( !bIdleEnd )
{
SwLayAction aAction( GetLayout(), Imp() );
aAction.SetComplete( FALSE );
if ( nLockPaint )
aAction.SetPaint( FALSE );
aAction.SetInputType( INPUT_KEYBOARD );
aAction.Action();
}
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.
if ( Imp()->GetRegion() ||
aInvalidRect.HasArea() ||
bExtraData )
2000-09-18 23:08:29 +00:00
{
if ( !nLockPaint )
{
BOOL bPaintsFromSystem = aInvalidRect.HasArea();
2000-09-18 23:08:29 +00:00
GetWin()->Update();
if ( aInvalidRect.HasArea() )
{
if ( bPaintsFromSystem )
Imp()->AddPaintRect( aInvalidRect );
ResetInvalidRect();
bPaintsFromSystem = TRUE;
}
bPaintWorks = TRUE;
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
BOOL bShowCrsr = pRegion && IsA( TYPE(SwCrsrShell) );
2000-09-18 23:08:29 +00:00
if( bShowCrsr )
((SwCrsrShell*)this)->HideCrsrs();
if ( pRegion )
{
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 );
BOOL bPaint = TRUE;
if ( IsEndActionByVirDev() )
{
//virtuelles device erzeugen und einstellen.
if ( !pVout )
pVout = new VirtualDevice( *GetOut() );
MapMode aMapMode( GetOut()->GetMapMode() );
pVout->SetMapMode( aMapMode );
BOOL bSizeOK = TRUE;
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 )
{
bPaint = FALSE;
// --> 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 );
2000-09-18 23:08:29 +00:00
pOut = pVout;
if ( bPaintsFromSystem )
PaintDesktop( aRect );
pCurrentLayout->Paint( aRect );
2000-09-18 23:08:29 +00:00
pOld->DrawOutDev( aRect.Pos(), aRect.SSize(),
aRect.Pos(), aRect.SSize(), *pVout );
pOut = pOld;
// #i72754# end Pre/PostPaint encapsulation when pOut is back and content is painted
CWS-TOOLING: integrate CWS aw061 2009-01-13 19:18:08 +0100 aw r266250 : #i96669# changed initialisation order in Embedded3DPrimitive2D::Embedded3DPrimitive2D due to TinderBox 2009-01-13 19:15:37 +0100 aw r266249 : #i96669# changed initialisation order in Embedded3DPrimitive2D::Embedded3DPrimitive2D due to TinderBox 2009-01-12 11:53:37 +0100 aw r266141 : #i97874# corrected include for TinderBox build 2009-01-08 17:48:23 +0100 aw r266029 : #i97874# extended SdrTextObj::ImpConvertAddText to copy needed attributes from original object 2009-01-08 14:59:08 +0100 aw r266015 : #i96350# added fallback to solid fill in shadow TabPage when no fill is defined to get a reasonable shadow preview 2009-01-08 12:40:49 +0100 aw r265995 : #i94832# remuved not needed E3DModifySceneSnapRectUpdater usages 2009-01-08 01:53:46 +0100 thb r265982 : #i94860# Blacklisting another ATI card/driver that causes blank screens 2009-01-08 01:46:38 +0100 thb r265981 : #i97853# Changed all gradient texture methods to use basegfx gradienttools. consolidated quite some code 2009-01-08 01:45:09 +0100 thb r265980 : #i97853# Added lerp methods, slight changes to have everything necessary contained in the ODFGradientInfo struct 2009-01-08 00:01:54 +0100 thb r265979 : #i97853# First part of the move - duplicated the stuff to basegfx 2009-01-06 16:23:09 +0100 aw r265930 : #i97197# Changed SwDrawVirtObj to work well with changed aOutRect and bBoundRectValid functionality 2009-01-06 12:41:24 +0100 aw r265909 : #i97784# corrected regression with connectors 2009-01-05 17:30:31 +0100 aw r265881 : #i97772# added missing usage of reduce factor for BitmapPrimitive creation 2009-01-05 12:24:01 +0100 aw r265863 : #i97321# added direct handling of HatchTexturePrimitive3D to not use it's decomposition for HitTest 2008-12-23 13:57:27 +0100 aw r265782 : #i96669# changed SW's FlyFrame paint fallback with primitives to use createLocalDecomposition since get2Decomposition does not have to stay virtual on the long run 2008-12-23 13:47:59 +0100 aw r265781 : #i96669# optimized impCreateTextPortionPrimitive to only create TextDecoratedPortionPrimitive2D when needed 2008-12-23 13:44:45 +0100 aw r265780 : #i96669# added B2DRange buffering to some primitive implementations where it is most necessary 2008-12-19 15:45:45 +0100 aw r265729 : #i96669# prepared TextPrimitives to work without DXarray, too. Had to rework impSplitSingleWords which gets active when a text portion has some word-wise decorations. Tested before committing 2008-12-19 15:44:16 +0100 aw r265728 : #i96669# corrected error in createPolygonFromUnitEllipseSegment which popped up when investigating 2008-12-18 17:45:58 +0100 aw r265708 : #i97149# added ActionChanged() call when visualisation object is modified 2008-12-18 15:34:42 +0100 aw r265695 : #i96598# corrected SdrPageObj's usage of aOutRect 2008-12-17 16:59:37 +0100 aw r265647 : #i96537# exchanged the marker for point number in string with correct one 2008-12-16 17:50:33 +0100 aw r265566 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:50:17 +0100 aw r265565 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:50:00 +0100 aw r265564 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:49:48 +0100 aw r265563 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:49:35 +0100 aw r265562 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer
2009-01-20 09:49:16 +00:00
DLPostPaint2(true);
2000-09-18 23:08:29 +00:00
}
}
if ( bPaint )
{
// #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()));
if ( bPaintsFromSystem )
PaintDesktop( aRect );
pCurrentLayout->Paint( aRect );
// #i75172# end DrawingLayer paint
CWS-TOOLING: integrate CWS aw061 2009-01-13 19:18:08 +0100 aw r266250 : #i96669# changed initialisation order in Embedded3DPrimitive2D::Embedded3DPrimitive2D due to TinderBox 2009-01-13 19:15:37 +0100 aw r266249 : #i96669# changed initialisation order in Embedded3DPrimitive2D::Embedded3DPrimitive2D due to TinderBox 2009-01-12 11:53:37 +0100 aw r266141 : #i97874# corrected include for TinderBox build 2009-01-08 17:48:23 +0100 aw r266029 : #i97874# extended SdrTextObj::ImpConvertAddText to copy needed attributes from original object 2009-01-08 14:59:08 +0100 aw r266015 : #i96350# added fallback to solid fill in shadow TabPage when no fill is defined to get a reasonable shadow preview 2009-01-08 12:40:49 +0100 aw r265995 : #i94832# remuved not needed E3DModifySceneSnapRectUpdater usages 2009-01-08 01:53:46 +0100 thb r265982 : #i94860# Blacklisting another ATI card/driver that causes blank screens 2009-01-08 01:46:38 +0100 thb r265981 : #i97853# Changed all gradient texture methods to use basegfx gradienttools. consolidated quite some code 2009-01-08 01:45:09 +0100 thb r265980 : #i97853# Added lerp methods, slight changes to have everything necessary contained in the ODFGradientInfo struct 2009-01-08 00:01:54 +0100 thb r265979 : #i97853# First part of the move - duplicated the stuff to basegfx 2009-01-06 16:23:09 +0100 aw r265930 : #i97197# Changed SwDrawVirtObj to work well with changed aOutRect and bBoundRectValid functionality 2009-01-06 12:41:24 +0100 aw r265909 : #i97784# corrected regression with connectors 2009-01-05 17:30:31 +0100 aw r265881 : #i97772# added missing usage of reduce factor for BitmapPrimitive creation 2009-01-05 12:24:01 +0100 aw r265863 : #i97321# added direct handling of HatchTexturePrimitive3D to not use it's decomposition for HitTest 2008-12-23 13:57:27 +0100 aw r265782 : #i96669# changed SW's FlyFrame paint fallback with primitives to use createLocalDecomposition since get2Decomposition does not have to stay virtual on the long run 2008-12-23 13:47:59 +0100 aw r265781 : #i96669# optimized impCreateTextPortionPrimitive to only create TextDecoratedPortionPrimitive2D when needed 2008-12-23 13:44:45 +0100 aw r265780 : #i96669# added B2DRange buffering to some primitive implementations where it is most necessary 2008-12-19 15:45:45 +0100 aw r265729 : #i96669# prepared TextPrimitives to work without DXarray, too. Had to rework impSplitSingleWords which gets active when a text portion has some word-wise decorations. Tested before committing 2008-12-19 15:44:16 +0100 aw r265728 : #i96669# corrected error in createPolygonFromUnitEllipseSegment which popped up when investigating 2008-12-18 17:45:58 +0100 aw r265708 : #i97149# added ActionChanged() call when visualisation object is modified 2008-12-18 15:34:42 +0100 aw r265695 : #i96598# corrected SdrPageObj's usage of aOutRect 2008-12-17 16:59:37 +0100 aw r265647 : #i96537# exchanged the marker for point number in string with correct one 2008-12-16 17:50:33 +0100 aw r265566 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:50:17 +0100 aw r265565 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:50:00 +0100 aw r265564 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:49:48 +0100 aw r265563 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:49:35 +0100 aw r265562 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer
2009-01-20 09:49:16 +00:00
DLPostPaint2(true);
}
// --> 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
}
2000-09-18 23:08:29 +00:00
delete pVout;
2001-11-05 12:43:40 +00:00
delete pRegion;
Imp()->DelRegion();
2000-09-18 23:08:29 +00:00
}
if( bShowCrsr )
((SwCrsrShell*)this)->ShowCrsrs( TRUE );
}
else
{
Imp()->DelRegion();
2000-09-18 23:08:29 +00:00
bPaintWorks = TRUE;
}
}
else
bPaintWorks = TRUE;
bInEndAction = FALSE;
ViewShell::bLstAct = FALSE;
Imp()->EndAction();
//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;
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()
{
bPaintWorks = FALSE;
Imp()->StartAction();
}
/******************************************************************************
|*
|* ViewShell::ImplLockPaint(), ImplUnlockPaint()
|*
|* Ersterstellung MA 11. Jun. 96
|* Letzte Aenderung MA 11. Jun. 96
|*
******************************************************************************/
void ViewShell::ImplLockPaint()
{
if ( GetWin() && GetWin()->IsVisible() )
GetWin()->EnablePaint( FALSE ); //Auch die Controls abklemmen.
Imp()->LockPaint();
}
void ViewShell::ImplUnlockPaint( BOOL bVirDev )
{
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 ) )
{
GetWin()->EnablePaint( TRUE );
GetWin()->Validate();
Imp()->UnlockPaint();
pVout->SetLineColor( pOut->GetLineColor() );
pVout->SetFillColor( pOut->GetFillColor() );
// #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 );
// #i72754# end Pre/PostPaint encapsulation when pOut is back and content is painted
CWS-TOOLING: integrate CWS aw061 2009-01-13 19:18:08 +0100 aw r266250 : #i96669# changed initialisation order in Embedded3DPrimitive2D::Embedded3DPrimitive2D due to TinderBox 2009-01-13 19:15:37 +0100 aw r266249 : #i96669# changed initialisation order in Embedded3DPrimitive2D::Embedded3DPrimitive2D due to TinderBox 2009-01-12 11:53:37 +0100 aw r266141 : #i97874# corrected include for TinderBox build 2009-01-08 17:48:23 +0100 aw r266029 : #i97874# extended SdrTextObj::ImpConvertAddText to copy needed attributes from original object 2009-01-08 14:59:08 +0100 aw r266015 : #i96350# added fallback to solid fill in shadow TabPage when no fill is defined to get a reasonable shadow preview 2009-01-08 12:40:49 +0100 aw r265995 : #i94832# remuved not needed E3DModifySceneSnapRectUpdater usages 2009-01-08 01:53:46 +0100 thb r265982 : #i94860# Blacklisting another ATI card/driver that causes blank screens 2009-01-08 01:46:38 +0100 thb r265981 : #i97853# Changed all gradient texture methods to use basegfx gradienttools. consolidated quite some code 2009-01-08 01:45:09 +0100 thb r265980 : #i97853# Added lerp methods, slight changes to have everything necessary contained in the ODFGradientInfo struct 2009-01-08 00:01:54 +0100 thb r265979 : #i97853# First part of the move - duplicated the stuff to basegfx 2009-01-06 16:23:09 +0100 aw r265930 : #i97197# Changed SwDrawVirtObj to work well with changed aOutRect and bBoundRectValid functionality 2009-01-06 12:41:24 +0100 aw r265909 : #i97784# corrected regression with connectors 2009-01-05 17:30:31 +0100 aw r265881 : #i97772# added missing usage of reduce factor for BitmapPrimitive creation 2009-01-05 12:24:01 +0100 aw r265863 : #i97321# added direct handling of HatchTexturePrimitive3D to not use it's decomposition for HitTest 2008-12-23 13:57:27 +0100 aw r265782 : #i96669# changed SW's FlyFrame paint fallback with primitives to use createLocalDecomposition since get2Decomposition does not have to stay virtual on the long run 2008-12-23 13:47:59 +0100 aw r265781 : #i96669# optimized impCreateTextPortionPrimitive to only create TextDecoratedPortionPrimitive2D when needed 2008-12-23 13:44:45 +0100 aw r265780 : #i96669# added B2DRange buffering to some primitive implementations where it is most necessary 2008-12-19 15:45:45 +0100 aw r265729 : #i96669# prepared TextPrimitives to work without DXarray, too. Had to rework impSplitSingleWords which gets active when a text portion has some word-wise decorations. Tested before committing 2008-12-19 15:44:16 +0100 aw r265728 : #i96669# corrected error in createPolygonFromUnitEllipseSegment which popped up when investigating 2008-12-18 17:45:58 +0100 aw r265708 : #i97149# added ActionChanged() call when visualisation object is modified 2008-12-18 15:34:42 +0100 aw r265695 : #i96598# corrected SdrPageObj's usage of aOutRect 2008-12-17 16:59:37 +0100 aw r265647 : #i96537# exchanged the marker for point number in string with correct one 2008-12-16 17:50:33 +0100 aw r265566 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:50:17 +0100 aw r265565 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:50:00 +0100 aw r265564 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:49:48 +0100 aw r265563 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:49:35 +0100 aw r265562 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer
2009-01-20 09:49:16 +00:00
DLPostPaint2(true);
2000-09-18 23:08:29 +00:00
}
else
{
Imp()->UnlockPaint();
GetWin()->EnablePaint( TRUE );
GetWin()->Invalidate( INVALIDATE_CHILDREN );
}
delete pVout;
}
else
{
Imp()->UnlockPaint();
GetWin()->EnablePaint( TRUE );
GetWin()->Invalidate( INVALIDATE_CHILDREN );
}
}
else
Imp()->UnlockPaint();
}
/******************************************************************************
|*
|* ViewShell::AddPaintRect()
|*
|* Ersterstellung MA ??
|* Letzte Aenderung MA 09. Feb. 97
|*
******************************************************************************/
BOOL ViewShell::AddPaintRect( const SwRect & rRect )
{
BOOL bRet = FALSE;
ViewShell *pSh = this;
do
{
if( pSh->Imp() )
{
2000-09-18 23:08:29 +00:00
if ( pSh->IsPreView() && pSh->GetWin() )
::RepaintPagePreview( pSh, rRect );
else
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() )
// pSh->GetWin()->Invalidate();
::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 )
{
if ( !VisArea().IsInside( rRect ) || IsScrollMDI( this, rRect ) || GetCareWin(*this) )
2000-09-18 23:08:29 +00:00
{
if ( !IsViewLocked() )
{
if( pWin )
{
const SwFrm* pRoot = /*GetDoc()->GetCurrentViewShell()->*/GetLayout();
int nLoopCnt = 3;
long nOldH;
do{
nOldH = pRoot->Frm().Height();
StartAction();
ScrollMDI( this, rRect, USHRT_MAX, USHRT_MAX );
EndAction();
} while( nOldH != pRoot->Frm().Height() && nLoopCnt-- ); //swmod 071108//swmod 071225
2000-09-18 23:08:29 +00: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
|*
******************************************************************************/
Window* ViewShell::CareChildWin(ViewShell& rVSh)
2000-09-18 23:08:29 +00:00
{
if(rVSh.pSfxViewShell)
{
const USHORT nId = SvxSearchDialogWrapper::GetChildWindowId();
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
|*
******************************************************************************/
Point ViewShell::GetPagePos( USHORT nPageNum ) const
{
return GetLayout()->GetPagePos( nPageNum );
}
/******************************************************************************
|*
|* ViewShell::GetNumPages()
|*
|* Ersterstellung MA ??
|* Letzte Aenderung MA 20. Apr. 94
|*
******************************************************************************/
USHORT ViewShell::GetNumPages()
{
//Es kann sein, das noch kein Layout existiert weil die Methode vom
//Root-Ctor gerufen wird.
return GetLayout() ? GetLayout()->GetPageNum() : 0;
}
2002-03-15 10:47:59 +00:00
sal_Bool ViewShell::IsDummyPage( USHORT nPageNum ) const
{
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.
|*
*************************************************************************/
void ViewShell::UpdateFlds(BOOL bCloseDB)
{
SET_CURR_SHELL( this );
BOOL bCrsr = ISA(SwCrsrShell);
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();
}
BOOL ViewShell::HasCharts() const
{
BOOL bRet = FALSE;
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() )
{
bRet = TRUE;
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 );
#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 );
// #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!
DBG_ASSERT(Imp(), "ViewShell already deleted?");
if(!Imp())
return;
2000-09-18 23:08:29 +00:00
SwLayIdle aIdle( GetLayout(), Imp() );
DBG_PROFSTOP( LayoutIdle );
}
}
/*************************************************************************
|*
|* DOCUMENT COMPATIBILITY FLAGS
|*
*************************************************************************/
void lcl_InvalidateAllCntnt( ViewShell& rSh, BYTE nInv )
{
BOOL bCrsr = rSh.ISA(SwCrsrShell);
if ( bCrsr )
((SwCrsrShell&)rSh).StartAction();
else
rSh.StartAction();
rSh.GetLayout()->InvalidateAllCntnt( nInv );
if ( bCrsr )
((SwCrsrShell&)rSh).EndAction();
else
rSh.EndAction();
rSh.GetDoc()->SetModified();
}
/** 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();
}
void ViewShell::SetParaSpaceMax( bool bNew )
2000-09-18 23:08:29 +00:00
{
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
if( pIDSA->get(IDocumentSettingAccess::PARA_SPACE_MAX) != bNew )
2000-09-18 23:08:29 +00:00
{
SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
pIDSA->set(IDocumentSettingAccess::PARA_SPACE_MAX, bNew );
const BYTE nInv = INV_PRTAREA | INV_TABLE | INV_SECTION;
lcl_InvalidateAllCntnt( *this, nInv );
2000-09-18 23:08:29 +00:00
}
}
void ViewShell::SetParaSpaceMaxAtPages( bool bNew )
2001-05-03 09:14:42 +00:00
{
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
if( pIDSA->get(IDocumentSettingAccess::PARA_SPACE_MAX_AT_PAGES) != bNew )
{
SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
pIDSA->set(IDocumentSettingAccess::PARA_SPACE_MAX_AT_PAGES, bNew );
const BYTE nInv = INV_PRTAREA | INV_TABLE | INV_SECTION;
lcl_InvalidateAllCntnt( *this, nInv );
}
2001-05-03 09:14:42 +00:00
}
void ViewShell::SetTabCompat( bool bNew )
2001-05-03 09:14:42 +00:00
{
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
if( pIDSA->get(IDocumentSettingAccess::TAB_COMPAT) != bNew )
2001-05-03 09:14:42 +00:00
{
SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
pIDSA->set(IDocumentSettingAccess::TAB_COMPAT, bNew );
const BYTE nInv = INV_PRTAREA | INV_SIZE | INV_TABLE | INV_SECTION;
lcl_InvalidateAllCntnt( *this, nInv );
}
}
void ViewShell::SetAddExtLeading( bool bNew )
{
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
if ( pIDSA->get(IDocumentSettingAccess::ADD_EXT_LEADING) != bNew )
{
SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
pIDSA->set(IDocumentSettingAccess::ADD_EXT_LEADING, bNew );
SdrModel* pTmpDrawModel = getIDocumentDrawModelAccess()->GetDrawModel();
if ( pTmpDrawModel )
pTmpDrawModel->SetAddExtLeading( bNew );
const BYTE nInv = INV_PRTAREA | INV_SIZE | INV_TABLE | INV_SECTION;
lcl_InvalidateAllCntnt( *this, nInv );
}
}
void ViewShell::SetUseVirDev( bool bNewVirtual )
{
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
if ( pIDSA->get(IDocumentSettingAccess::USE_VIRTUAL_DEVICE) != bNewVirtual )
{
SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
// this sets the flag at the document and calls PrtDataChanged
IDocumentDeviceAccess* pIDDA = getIDocumentDeviceAccess();
pIDDA->setReferenceDeviceType( bNewVirtual, true );
}
}
// OD 2004-02-16 #106629# - control, if paragraph and table spacing is added
// at bottom of table cells
void ViewShell::SetAddParaSpacingToTableCells( bool _bAddParaSpacingToTableCells )
{
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
if ( pIDSA->get(IDocumentSettingAccess::ADD_PARA_SPACING_TO_TABLE_CELLS) != _bAddParaSpacingToTableCells )
{
SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
pIDSA->set(IDocumentSettingAccess::ADD_PARA_SPACING_TO_TABLE_CELLS, _bAddParaSpacingToTableCells );
const BYTE nInv = INV_PRTAREA;
lcl_InvalidateAllCntnt( *this, nInv );
}
}
// OD 06.01.2004 #i11859# - control, if former formatting of text lines with
// proportional line spacing is used or not.
void ViewShell::SetUseFormerLineSpacing( bool _bUseFormerLineSpacing )
{
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
if ( pIDSA->get(IDocumentSettingAccess::OLD_LINE_SPACING) != _bUseFormerLineSpacing )
{
SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
pIDSA->set(IDocumentSettingAccess::OLD_LINE_SPACING, _bUseFormerLineSpacing );
const BYTE nInv = INV_PRTAREA;
lcl_InvalidateAllCntnt( *this, nInv );
}
}
// OD 2004-03-12 #i11860# - control, if former object positioning is used or not.
void ViewShell::SetUseFormerObjectPositioning( bool _bUseFormerObjPos )
{
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
if ( pIDSA->get(IDocumentSettingAccess::USE_FORMER_OBJECT_POS) != _bUseFormerObjPos )
{
SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
pIDSA->set(IDocumentSettingAccess::USE_FORMER_OBJECT_POS, _bUseFormerObjPos );
lcl_InvalidateAllObjPos( *this );
}
}
// OD 2004-05-05 #i28701#
void ViewShell::SetConsiderWrapOnObjPos( bool _bConsiderWrapOnObjPos )
{
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
if ( pIDSA->get(IDocumentSettingAccess::CONSIDER_WRAP_ON_OBJECT_POSITION) != _bConsiderWrapOnObjPos )
{
SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
pIDSA->set(IDocumentSettingAccess::CONSIDER_WRAP_ON_OBJECT_POSITION, _bConsiderWrapOnObjPos );
lcl_InvalidateAllObjPos( *this );
}
}
// --> FME #108724#
void ViewShell::SetUseFormerTextWrapping( bool _bUseFormerTextWrapping )
{
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
if ( pIDSA->get(IDocumentSettingAccess::USE_FORMER_TEXT_WRAPPING) != _bUseFormerTextWrapping )
{
SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
pIDSA->set(IDocumentSettingAccess::USE_FORMER_TEXT_WRAPPING, _bUseFormerTextWrapping );
const BYTE nInv = INV_PRTAREA | INV_SIZE | INV_TABLE | INV_SECTION;
lcl_InvalidateAllCntnt( *this, nInv );
}
}
// <--
// -> 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 )
{
SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
pIDSA->set(IDocumentSettingAccess::DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK, _bDoNotJustifyLinesWithManualBreak );
const BYTE nInv = INV_PRTAREA | INV_SIZE | INV_TABLE | INV_SECTION;
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()
{
SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
// 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
if( GetLayout()->IsCallbackActionEnabled() )
{
StartAction();
GetLayout()->InvalidateAllCntnt( INV_SIZE | INV_POS | INV_PRTAREA );
EndAction();
}
2000-09-18 23:08:29 +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 );
SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
//Cache vorbereiten und restaurieren, damit er nicht versaut wird.
SwSaveSetLRUOfst aSaveLRU( *SwTxtFrm::GetTxtCache(),
SwTxtFrm::GetTxtCache()->GetCurMax() - 50 );
//Progress einschalten wenn noch keiner Lauft.
const BOOL bEndProgress = SfxProgress::GetActiveProgress( GetDoc()->GetDocShell() ) == 0;
if ( bEndProgress )
{
USHORT nEndPage = GetLayout()->GetPageNum();
nEndPage += nEndPage * 10 / 100;
::StartProgress( STR_STATSTR_REFORMAT, 0, nEndPage, GetDoc()->GetDocShell() );
}
SwLayAction aAction( GetLayout(), Imp() );
aAction.SetPaint( FALSE );
aAction.SetStatBar( TRUE );
aAction.SetCalcLayout( TRUE );
aAction.SetReschedule( TRUE );
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();
aAction.SetPaint( FALSE );
aAction.SetStatBar( TRUE );
aAction.SetReschedule( TRUE );
SwDocPosUpdate aMsgHnt( 0 );
GetDoc()->UpdatePageFlds( &aMsgHnt );
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
|*
******************************************************************************/
void ViewShell::SizeChgNotify()
2000-09-18 23:08:29 +00:00
{
if ( !pWin )
bDocSizeChgd = TRUE;
else if( ActionPend() || Imp()->IsCalcLayoutProgress() || bPaintInProgress )
{
bDocSizeChgd = TRUE;
if ( !Imp()->IsCalcLayoutProgress() && ISA( SwCrsrShell ) )
{
const SwFrm *pCnt = ((SwCrsrShell*)this)->GetCurrFrm( FALSE );
const SwPageFrm *pPage;
if ( pCnt && 0 != (pPage = pCnt->FindPageFrm()) )
{
USHORT nVirtNum = pPage->GetVirtPageNum();
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
{
bDocSizeChgd = FALSE;
::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;
#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() );
const BOOL bFull = aPrevArea.IsEmpty();
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() )
Imp()->DelRegion();
2000-09-18 23:08:29 +00:00
SET_CURR_SHELL( this );
bool bScrolled = false;
SwPostItMgr* pPostItMgr = GetPostItMgr();
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();
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.
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;
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
{
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
{
// OD 12.02.2003 #i9719#, #105645# - consider new border
// and shadow width
const SwTwips nBorderWidth =
GetOut()->PixelToLogic( Size( pPage->BorderPxWidth(), 0 ) ).Width();
const SwTwips nShadowWidth =
GetOut()->PixelToLogic( Size( pPage->ShadowPxWidth(), 0 ) ).Width();
SwTwips nPageLeft = 0;
SwTwips nPageRight = 0;
switch ( pPage->SidebarPosition() )
{
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;
}
if( nPageLeft < nMinLeft )
nMinLeft = nPageLeft;
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();
for ( USHORT i = 0;
i < pPage->GetSortedObjs()->Count(); ++i )
{
SwAnchoredObject* pObj = (*pPage->GetSortedObjs())[i];
const Rectangle &rBound = pObj->GetObjRect().SVRect();
// 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 )
{
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 ) )
{
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();
// --> OD 2010-02-11 #i88070#
if ( pPostItMgr )
{
pPostItMgr->Rescale();
pPostItMgr->CalcRects();
pPostItMgr->LayoutPostIts();
}
// <--
if ( !bScrolled && pPostItMgr && pPostItMgr->HasNotes() && pPostItMgr->ShowNotes() )
pPostItMgr->CorrectPositions();
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
|*
******************************************************************************/
BOOL ViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect )
{
const ULONG nColCnt = pOut->GetColorCount();
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;
}
// #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());
CWS-TOOLING: integrate CWS sw32bf02 2009-08-25 15:52:04 +0200 hde r275366 : reactived testcases hit by issue 102752 2009-08-21 13:52:17 +0200 od r275245 : #i102921# delete files whose deletion has been forgotten in cws impress172 2009-08-21 11:20:47 +0200 od r275225 : CWS-TOOLING: rebase CWS sw32bf02 to trunk@275001 (milestone: DEV300:m55) 2009-08-20 16:21:30 +0200 od r275191 : #i92511# method <lcl_MoveAllLowerObjs(..)> - invalidation of cache for object rectangle inclusive spaces is needed. 2009-08-20 15:50:40 +0200 od r275188 : #i96726# method <SwPagePreView::DocSzChgd(..)> - trigger recalculation of page preview layout even if the count of pages is not changing 2009-08-20 12:37:32 +0200 od r275172 : #i100466# correction for showing and hiding redlines 2009-08-18 13:25:18 +0200 od r275100 : #i103817# method <XMLTextImportHelper::SetStyleAndAttrs(..) - assure that a heading applies the outline style, if no other list style is applied. 2009-08-18 13:21:38 +0200 od r275098 : #i103817# allow the outline style - list style for outline numbering - to be set directly at the paragraph 2009-08-17 14:13:02 +0200 od r275052 : #i103684# add missing documentation for new optional OutlineLevel attribute introduced in OOo 3.1 2009-08-17 14:00:25 +0200 od r275049 : #i100481# method <XMLTextFrameContext_Impl::CreateChildContext(..)># - correct condition for handling embedded documents and embedded math objects 2009-08-12 14:11:34 +0200 od r274891 : #i97379# assure that columns are not applied to fly frames, which represent graphics or embedded objects 2009-08-12 12:51:43 +0200 od r274889 : #i101870# method <SwTxtNode::_MakeNewTxtNode(..)> - perform action on different paragraph styles before applying new paragraph style 2009-08-12 12:24:44 +0200 od r274888 : #i101092# method <ViewShell::Paint(..)> - encapsulate paint of document background and document into pre and post drawing layer paint calls 2009-08-12 11:38:48 +0200 od r274886 : #i98766# minor adjustment in order to be warning free under Mac port builds 2009-08-12 11:33:54 +0200 od r274885 : #i99267# method <SwTabFrm::MakeAll()> - reset <bSplit> after forward move to assure that follows can be joined, if further space is available. 2009-08-12 11:11:49 +0200 od r274882 : #i98766# method <ViewShell::SmoothScroll(..) - disable smooth scroll for Mac port builds 2009-08-10 12:17:58 +0200 od r274801 : CWS-TOOLING: rebase CWS sw32bf02 to trunk@274622 (milestone: DEV300:m54) 2009-07-21 16:56:45 +0200 od r274206 : #i103685# method <SwTxtFormatter::NewTabPortion(..)> - adjust condition to apply automatic tab stop at left margin correctly in case that tab stops are not relative to indent 2009-07-10 11:53:53 +0200 od r273883 : #i102752 method <SwDrawContact::Modify(..)> - assure that a ShapePropertyChangeNotifier exists 2009-07-07 12:01:58 +0200 mst r273788 : #i103304# apply patch by dtardon to fix bogus conditional 2009-07-07 09:01:13 +0200 od r273767 : CWS-TOOLING: rebase CWS sw32bf02 to trunk@273468 (milestone: DEV300:m51)
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
const bool bSmoothScrollAllowed(bOnlyYScroll && bEnableSmooth && GetViewOptions()->IsSmoothScroll() && bAllowedWithChildWindows);
CWS-TOOLING: integrate CWS sw32bf02 2009-08-25 15:52:04 +0200 hde r275366 : reactived testcases hit by issue 102752 2009-08-21 13:52:17 +0200 od r275245 : #i102921# delete files whose deletion has been forgotten in cws impress172 2009-08-21 11:20:47 +0200 od r275225 : CWS-TOOLING: rebase CWS sw32bf02 to trunk@275001 (milestone: DEV300:m55) 2009-08-20 16:21:30 +0200 od r275191 : #i92511# method <lcl_MoveAllLowerObjs(..)> - invalidation of cache for object rectangle inclusive spaces is needed. 2009-08-20 15:50:40 +0200 od r275188 : #i96726# method <SwPagePreView::DocSzChgd(..)> - trigger recalculation of page preview layout even if the count of pages is not changing 2009-08-20 12:37:32 +0200 od r275172 : #i100466# correction for showing and hiding redlines 2009-08-18 13:25:18 +0200 od r275100 : #i103817# method <XMLTextImportHelper::SetStyleAndAttrs(..) - assure that a heading applies the outline style, if no other list style is applied. 2009-08-18 13:21:38 +0200 od r275098 : #i103817# allow the outline style - list style for outline numbering - to be set directly at the paragraph 2009-08-17 14:13:02 +0200 od r275052 : #i103684# add missing documentation for new optional OutlineLevel attribute introduced in OOo 3.1 2009-08-17 14:00:25 +0200 od r275049 : #i100481# method <XMLTextFrameContext_Impl::CreateChildContext(..)># - correct condition for handling embedded documents and embedded math objects 2009-08-12 14:11:34 +0200 od r274891 : #i97379# assure that columns are not applied to fly frames, which represent graphics or embedded objects 2009-08-12 12:51:43 +0200 od r274889 : #i101870# method <SwTxtNode::_MakeNewTxtNode(..)> - perform action on different paragraph styles before applying new paragraph style 2009-08-12 12:24:44 +0200 od r274888 : #i101092# method <ViewShell::Paint(..)> - encapsulate paint of document background and document into pre and post drawing layer paint calls 2009-08-12 11:38:48 +0200 od r274886 : #i98766# minor adjustment in order to be warning free under Mac port builds 2009-08-12 11:33:54 +0200 od r274885 : #i99267# method <SwTabFrm::MakeAll()> - reset <bSplit> after forward move to assure that follows can be joined, if further space is available. 2009-08-12 11:11:49 +0200 od r274882 : #i98766# method <ViewShell::SmoothScroll(..) - disable smooth scroll for Mac port builds 2009-08-10 12:17:58 +0200 od r274801 : CWS-TOOLING: rebase CWS sw32bf02 to trunk@274622 (milestone: DEV300:m54) 2009-07-21 16:56:45 +0200 od r274206 : #i103685# method <SwTxtFormatter::NewTabPortion(..)> - adjust condition to apply automatic tab stop at left margin correctly in case that tab stops are not relative to indent 2009-07-10 11:53:53 +0200 od r273883 : #i102752 method <SwDrawContact::Modify(..)> - assure that a ShapePropertyChangeNotifier exists 2009-07-07 12:01:58 +0200 mst r273788 : #i103304# apply patch by dtardon to fix bogus conditional 2009-07-07 09:01:13 +0200 od r273767 : CWS-TOOLING: rebase CWS sw32bf02 to trunk@273468 (milestone: DEV300:m51)
2009-08-27 14:36:29 +00:00
#endif
// <-
const bool bIAmCursorShell(ISA(SwCrsrShell));
(void) bIAmCursorShell;
// #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
{
Imp()->bStopSmooth = FALSE;
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;
{
// #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 );
ViewShell::bLstAct = TRUE;
GetLayout()->Paint( aRect );
ViewShell::bLstAct = FALSE;
// end paint and destroy ObjectContact again
CWS-TOOLING: integrate CWS aw061 2009-01-13 19:18:08 +0100 aw r266250 : #i96669# changed initialisation order in Embedded3DPrimitive2D::Embedded3DPrimitive2D due to TinderBox 2009-01-13 19:15:37 +0100 aw r266249 : #i96669# changed initialisation order in Embedded3DPrimitive2D::Embedded3DPrimitive2D due to TinderBox 2009-01-12 11:53:37 +0100 aw r266141 : #i97874# corrected include for TinderBox build 2009-01-08 17:48:23 +0100 aw r266029 : #i97874# extended SdrTextObj::ImpConvertAddText to copy needed attributes from original object 2009-01-08 14:59:08 +0100 aw r266015 : #i96350# added fallback to solid fill in shadow TabPage when no fill is defined to get a reasonable shadow preview 2009-01-08 12:40:49 +0100 aw r265995 : #i94832# remuved not needed E3DModifySceneSnapRectUpdater usages 2009-01-08 01:53:46 +0100 thb r265982 : #i94860# Blacklisting another ATI card/driver that causes blank screens 2009-01-08 01:46:38 +0100 thb r265981 : #i97853# Changed all gradient texture methods to use basegfx gradienttools. consolidated quite some code 2009-01-08 01:45:09 +0100 thb r265980 : #i97853# Added lerp methods, slight changes to have everything necessary contained in the ODFGradientInfo struct 2009-01-08 00:01:54 +0100 thb r265979 : #i97853# First part of the move - duplicated the stuff to basegfx 2009-01-06 16:23:09 +0100 aw r265930 : #i97197# Changed SwDrawVirtObj to work well with changed aOutRect and bBoundRectValid functionality 2009-01-06 12:41:24 +0100 aw r265909 : #i97784# corrected regression with connectors 2009-01-05 17:30:31 +0100 aw r265881 : #i97772# added missing usage of reduce factor for BitmapPrimitive creation 2009-01-05 12:24:01 +0100 aw r265863 : #i97321# added direct handling of HatchTexturePrimitive3D to not use it's decomposition for HitTest 2008-12-23 13:57:27 +0100 aw r265782 : #i96669# changed SW's FlyFrame paint fallback with primitives to use createLocalDecomposition since get2Decomposition does not have to stay virtual on the long run 2008-12-23 13:47:59 +0100 aw r265781 : #i96669# optimized impCreateTextPortionPrimitive to only create TextDecoratedPortionPrimitive2D when needed 2008-12-23 13:44:45 +0100 aw r265780 : #i96669# added B2DRange buffering to some primitive implementations where it is most necessary 2008-12-19 15:45:45 +0100 aw r265729 : #i96669# prepared TextPrimitives to work without DXarray, too. Had to rework impSplitSingleWords which gets active when a text portion has some word-wise decorations. Tested before committing 2008-12-19 15:44:16 +0100 aw r265728 : #i96669# corrected error in createPolygonFromUnitEllipseSegment which popped up when investigating 2008-12-18 17:45:58 +0100 aw r265708 : #i97149# added ActionChanged() call when visualisation object is modified 2008-12-18 15:34:42 +0100 aw r265695 : #i96598# corrected SdrPageObj's usage of aOutRect 2008-12-17 16:59:37 +0100 aw r265647 : #i96537# exchanged the marker for point number in string with correct one 2008-12-16 17:50:33 +0100 aw r265566 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:50:17 +0100 aw r265565 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:50:00 +0100 aw r265564 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:49:48 +0100 aw r265563 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:49:35 +0100 aw r265562 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer
2009-01-20 09:49:16 +00:00
DLPostPaint2(true);
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()));
const String aTmpString(ByteString( "c:\\test.bmp" ), RTL_TEXTENCODING_UTF8);
SvFileStream aNew(aTmpString, STREAM_WRITE|STREAM_TRUNC);
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;
}
const SwRect aTmpOldVis = VisArea();
2000-09-18 23:08:29 +00:00
aVisArea.Pos().Y() -= lScroll;
aVisArea.Pos() = GetWin()->PixelToLogic( GetWin()->LogicToPixel( VisArea().Pos()));
lScroll = aTmpOldVis.Top() - VisArea().Top();
2000-09-18 23:08:29 +00:00
if ( pRect )
{
Rectangle aTmp( aTmpOldVis.SVRect() );
2000-09-18 23:08:29 +00:00
aTmp.Left() = pRect->Left();
aTmp.Right()= pRect->Right();
GetWin()->Scroll( 0, lScroll, aTmp, SCROLL_CHILDREN);
2000-09-18 23:08:29 +00:00
}
else
GetWin()->Scroll( 0, lScroll, SCROLL_CHILDREN );
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 )
{
const bool bScrollDirectionIsUp(lScroll > 0);
2000-09-18 23:08:29 +00:00
Imp()->aSmoothRect = VisArea();
if(bScrollDirectionIsUp)
{
Imp()->aSmoothRect.Bottom( VisArea().Top() + lScroll + aPixSz.Height());
}
2000-09-18 23:08:29 +00:00
else
{
Imp()->aSmoothRect.Top( VisArea().Bottom() + lScroll - aPixSz.Height());
}
2000-09-18 23:08:29 +00:00
Imp()->bSmoothUpdate = TRUE;
GetWin()->Update();
Imp()->bSmoothUpdate = FALSE;
if(!Imp()->bStopSmooth)
2000-09-18 23:08:29 +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
CWS-TOOLING: integrate CWS aw061 2009-01-13 19:18:08 +0100 aw r266250 : #i96669# changed initialisation order in Embedded3DPrimitive2D::Embedded3DPrimitive2D due to TinderBox 2009-01-13 19:15:37 +0100 aw r266249 : #i96669# changed initialisation order in Embedded3DPrimitive2D::Embedded3DPrimitive2D due to TinderBox 2009-01-12 11:53:37 +0100 aw r266141 : #i97874# corrected include for TinderBox build 2009-01-08 17:48:23 +0100 aw r266029 : #i97874# extended SdrTextObj::ImpConvertAddText to copy needed attributes from original object 2009-01-08 14:59:08 +0100 aw r266015 : #i96350# added fallback to solid fill in shadow TabPage when no fill is defined to get a reasonable shadow preview 2009-01-08 12:40:49 +0100 aw r265995 : #i94832# remuved not needed E3DModifySceneSnapRectUpdater usages 2009-01-08 01:53:46 +0100 thb r265982 : #i94860# Blacklisting another ATI card/driver that causes blank screens 2009-01-08 01:46:38 +0100 thb r265981 : #i97853# Changed all gradient texture methods to use basegfx gradienttools. consolidated quite some code 2009-01-08 01:45:09 +0100 thb r265980 : #i97853# Added lerp methods, slight changes to have everything necessary contained in the ODFGradientInfo struct 2009-01-08 00:01:54 +0100 thb r265979 : #i97853# First part of the move - duplicated the stuff to basegfx 2009-01-06 16:23:09 +0100 aw r265930 : #i97197# Changed SwDrawVirtObj to work well with changed aOutRect and bBoundRectValid functionality 2009-01-06 12:41:24 +0100 aw r265909 : #i97784# corrected regression with connectors 2009-01-05 17:30:31 +0100 aw r265881 : #i97772# added missing usage of reduce factor for BitmapPrimitive creation 2009-01-05 12:24:01 +0100 aw r265863 : #i97321# added direct handling of HatchTexturePrimitive3D to not use it's decomposition for HitTest 2008-12-23 13:57:27 +0100 aw r265782 : #i96669# changed SW's FlyFrame paint fallback with primitives to use createLocalDecomposition since get2Decomposition does not have to stay virtual on the long run 2008-12-23 13:47:59 +0100 aw r265781 : #i96669# optimized impCreateTextPortionPrimitive to only create TextDecoratedPortionPrimitive2D when needed 2008-12-23 13:44:45 +0100 aw r265780 : #i96669# added B2DRange buffering to some primitive implementations where it is most necessary 2008-12-19 15:45:45 +0100 aw r265729 : #i96669# prepared TextPrimitives to work without DXarray, too. Had to rework impSplitSingleWords which gets active when a text portion has some word-wise decorations. Tested before committing 2008-12-19 15:44:16 +0100 aw r265728 : #i96669# corrected error in createPolygonFromUnitEllipseSegment which popped up when investigating 2008-12-18 17:45:58 +0100 aw r265708 : #i97149# added ActionChanged() call when visualisation object is modified 2008-12-18 15:34:42 +0100 aw r265695 : #i96598# corrected SdrPageObj's usage of aOutRect 2008-12-17 16:59:37 +0100 aw r265647 : #i96537# exchanged the marker for point number in string with correct one 2008-12-16 17:50:33 +0100 aw r265566 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:50:17 +0100 aw r265565 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:50:00 +0100 aw r265564 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:49:48 +0100 aw r265563 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:49:35 +0100 aw r265562 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer
2009-01-20 09:49:16 +00:00
DLPostPaint2(true);
}
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)
CWS-TOOLING: integrate CWS aw061 2009-01-13 19:18:08 +0100 aw r266250 : #i96669# changed initialisation order in Embedded3DPrimitive2D::Embedded3DPrimitive2D due to TinderBox 2009-01-13 19:15:37 +0100 aw r266249 : #i96669# changed initialisation order in Embedded3DPrimitive2D::Embedded3DPrimitive2D due to TinderBox 2009-01-12 11:53:37 +0100 aw r266141 : #i97874# corrected include for TinderBox build 2009-01-08 17:48:23 +0100 aw r266029 : #i97874# extended SdrTextObj::ImpConvertAddText to copy needed attributes from original object 2009-01-08 14:59:08 +0100 aw r266015 : #i96350# added fallback to solid fill in shadow TabPage when no fill is defined to get a reasonable shadow preview 2009-01-08 12:40:49 +0100 aw r265995 : #i94832# remuved not needed E3DModifySceneSnapRectUpdater usages 2009-01-08 01:53:46 +0100 thb r265982 : #i94860# Blacklisting another ATI card/driver that causes blank screens 2009-01-08 01:46:38 +0100 thb r265981 : #i97853# Changed all gradient texture methods to use basegfx gradienttools. consolidated quite some code 2009-01-08 01:45:09 +0100 thb r265980 : #i97853# Added lerp methods, slight changes to have everything necessary contained in the ODFGradientInfo struct 2009-01-08 00:01:54 +0100 thb r265979 : #i97853# First part of the move - duplicated the stuff to basegfx 2009-01-06 16:23:09 +0100 aw r265930 : #i97197# Changed SwDrawVirtObj to work well with changed aOutRect and bBoundRectValid functionality 2009-01-06 12:41:24 +0100 aw r265909 : #i97784# corrected regression with connectors 2009-01-05 17:30:31 +0100 aw r265881 : #i97772# added missing usage of reduce factor for BitmapPrimitive creation 2009-01-05 12:24:01 +0100 aw r265863 : #i97321# added direct handling of HatchTexturePrimitive3D to not use it's decomposition for HitTest 2008-12-23 13:57:27 +0100 aw r265782 : #i96669# changed SW's FlyFrame paint fallback with primitives to use createLocalDecomposition since get2Decomposition does not have to stay virtual on the long run 2008-12-23 13:47:59 +0100 aw r265781 : #i96669# optimized impCreateTextPortionPrimitive to only create TextDecoratedPortionPrimitive2D when needed 2008-12-23 13:44:45 +0100 aw r265780 : #i96669# added B2DRange buffering to some primitive implementations where it is most necessary 2008-12-19 15:45:45 +0100 aw r265729 : #i96669# prepared TextPrimitives to work without DXarray, too. Had to rework impSplitSingleWords which gets active when a text portion has some word-wise decorations. Tested before committing 2008-12-19 15:44:16 +0100 aw r265728 : #i96669# corrected error in createPolygonFromUnitEllipseSegment which popped up when investigating 2008-12-18 17:45:58 +0100 aw r265708 : #i97149# added ActionChanged() call when visualisation object is modified 2008-12-18 15:34:42 +0100 aw r265695 : #i96598# corrected SdrPageObj's usage of aOutRect 2008-12-17 16:59:37 +0100 aw r265647 : #i96537# exchanged the marker for point number in string with correct one 2008-12-16 17:50:33 +0100 aw r265566 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:50:17 +0100 aw r265565 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:50:00 +0100 aw r265564 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:49:48 +0100 aw r265563 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:49:35 +0100 aw r265562 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer
2009-01-20 09:49:16 +00:00
DLPostPaint2(true);
}
2000-09-18 23:08:29 +00:00
}
else
--nLockPaint;
}
}
delete pVout;
GetWin()->Update();
if ( !Imp()->bStopSmooth )
--nLockPaint;
SetFirstVisPageInvalid();
return TRUE;
}
delete pVout;
}
2000-09-18 23:08:29 +00:00
aVisArea.Pos().X() -= lXDiff;
aVisArea.Pos().Y() -= lYDiff;
if ( pRect )
GetWin()->Scroll( lXDiff, lYDiff, *pRect, SCROLL_CHILDREN);
2000-09-18 23:08:29 +00:00
else
GetWin()->Scroll( lXDiff, lYDiff, SCROLL_CHILDREN);
2000-09-18 23:08:29 +00:00
return FALSE;
}
/******************************************************************************
|*
|* 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.
BOOL bBorderOnly = FALSE;
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() ) )
bBorderOnly = TRUE;
} //swmod 071108//swmod 071225
2000-09-18 23:08:29 +00:00
const bool bBookMode = GetViewOptions()->IsViewLayoutBookMode();
2000-09-18 23:08:29 +00:00
SwRegionRects aRegion( rRect );
//mod #i6193: remove sidebar area to avoid flickering
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 )
{
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() )
{
aRight.Left( nTmp + nSidebarWidth );
}
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();
//const SwTwips nRight = rRect.Right();
2000-09-18 23:08:29 +00:00
while ( pPage && aRegion.Count() &&
(pPage->Frm().Top() <= nBottom) ) // PAGES01 && (pPage->Frm().Left() <= nRight))
2000-09-18 23:08:29 +00:00
{
SwRect aPageRect( pPage->Frm() );
if ( bBookMode )
{
const SwPageFrm& rFormatPage = static_cast<const SwPageFrm*>(pPage)->GetFormatPage();
aPageRect.SSize() = rFormatPage.Frm().SSize();
}
const bool bSidebarRight =
static_cast<const SwPageFrm*>(pPage)->SidebarPosition() == sw::sidebarwindows::SIDEBAR_RIGHT;
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 )
{
// OD 2004-04-23 #116347#
GetOut()->Push( PUSH_FILLCOLOR|PUSH_LINECOLOR );
GetOut()->SetLineColor();
2000-09-18 23:08:29 +00:00
for ( USHORT i = 0; i < rRegion.Count(); ++i )
{
const Rectangle aRectangle(rRegion[i].SVRect());
CWS-TOOLING: integrate CWS aw061 2009-01-13 19:18:08 +0100 aw r266250 : #i96669# changed initialisation order in Embedded3DPrimitive2D::Embedded3DPrimitive2D due to TinderBox 2009-01-13 19:15:37 +0100 aw r266249 : #i96669# changed initialisation order in Embedded3DPrimitive2D::Embedded3DPrimitive2D due to TinderBox 2009-01-12 11:53:37 +0100 aw r266141 : #i97874# corrected include for TinderBox build 2009-01-08 17:48:23 +0100 aw r266029 : #i97874# extended SdrTextObj::ImpConvertAddText to copy needed attributes from original object 2009-01-08 14:59:08 +0100 aw r266015 : #i96350# added fallback to solid fill in shadow TabPage when no fill is defined to get a reasonable shadow preview 2009-01-08 12:40:49 +0100 aw r265995 : #i94832# remuved not needed E3DModifySceneSnapRectUpdater usages 2009-01-08 01:53:46 +0100 thb r265982 : #i94860# Blacklisting another ATI card/driver that causes blank screens 2009-01-08 01:46:38 +0100 thb r265981 : #i97853# Changed all gradient texture methods to use basegfx gradienttools. consolidated quite some code 2009-01-08 01:45:09 +0100 thb r265980 : #i97853# Added lerp methods, slight changes to have everything necessary contained in the ODFGradientInfo struct 2009-01-08 00:01:54 +0100 thb r265979 : #i97853# First part of the move - duplicated the stuff to basegfx 2009-01-06 16:23:09 +0100 aw r265930 : #i97197# Changed SwDrawVirtObj to work well with changed aOutRect and bBoundRectValid functionality 2009-01-06 12:41:24 +0100 aw r265909 : #i97784# corrected regression with connectors 2009-01-05 17:30:31 +0100 aw r265881 : #i97772# added missing usage of reduce factor for BitmapPrimitive creation 2009-01-05 12:24:01 +0100 aw r265863 : #i97321# added direct handling of HatchTexturePrimitive3D to not use it's decomposition for HitTest 2008-12-23 13:57:27 +0100 aw r265782 : #i96669# changed SW's FlyFrame paint fallback with primitives to use createLocalDecomposition since get2Decomposition does not have to stay virtual on the long run 2008-12-23 13:47:59 +0100 aw r265781 : #i96669# optimized impCreateTextPortionPrimitive to only create TextDecoratedPortionPrimitive2D when needed 2008-12-23 13:44:45 +0100 aw r265780 : #i96669# added B2DRange buffering to some primitive implementations where it is most necessary 2008-12-19 15:45:45 +0100 aw r265729 : #i96669# prepared TextPrimitives to work without DXarray, too. Had to rework impSplitSingleWords which gets active when a text portion has some word-wise decorations. Tested before committing 2008-12-19 15:44:16 +0100 aw r265728 : #i96669# corrected error in createPolygonFromUnitEllipseSegment which popped up when investigating 2008-12-18 17:45:58 +0100 aw r265708 : #i97149# added ActionChanged() call when visualisation object is modified 2008-12-18 15:34:42 +0100 aw r265695 : #i96598# corrected SdrPageObj's usage of aOutRect 2008-12-17 16:59:37 +0100 aw r265647 : #i96537# exchanged the marker for point number in string with correct one 2008-12-16 17:50:33 +0100 aw r265566 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:50:17 +0100 aw r265565 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:50:00 +0100 aw r265564 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:49:48 +0100 aw r265563 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:49:35 +0100 aw r265562 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer
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
// #i68597# inform Drawinglayer about display change
DLPrePaint2(Region(aRectangle));
// #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();
GetOut()->DrawRect(aRectangle);
CWS-TOOLING: integrate CWS aw061 2009-01-13 19:18:08 +0100 aw r266250 : #i96669# changed initialisation order in Embedded3DPrimitive2D::Embedded3DPrimitive2D due to TinderBox 2009-01-13 19:15:37 +0100 aw r266249 : #i96669# changed initialisation order in Embedded3DPrimitive2D::Embedded3DPrimitive2D due to TinderBox 2009-01-12 11:53:37 +0100 aw r266141 : #i97874# corrected include for TinderBox build 2009-01-08 17:48:23 +0100 aw r266029 : #i97874# extended SdrTextObj::ImpConvertAddText to copy needed attributes from original object 2009-01-08 14:59:08 +0100 aw r266015 : #i96350# added fallback to solid fill in shadow TabPage when no fill is defined to get a reasonable shadow preview 2009-01-08 12:40:49 +0100 aw r265995 : #i94832# remuved not needed E3DModifySceneSnapRectUpdater usages 2009-01-08 01:53:46 +0100 thb r265982 : #i94860# Blacklisting another ATI card/driver that causes blank screens 2009-01-08 01:46:38 +0100 thb r265981 : #i97853# Changed all gradient texture methods to use basegfx gradienttools. consolidated quite some code 2009-01-08 01:45:09 +0100 thb r265980 : #i97853# Added lerp methods, slight changes to have everything necessary contained in the ODFGradientInfo struct 2009-01-08 00:01:54 +0100 thb r265979 : #i97853# First part of the move - duplicated the stuff to basegfx 2009-01-06 16:23:09 +0100 aw r265930 : #i97197# Changed SwDrawVirtObj to work well with changed aOutRect and bBoundRectValid functionality 2009-01-06 12:41:24 +0100 aw r265909 : #i97784# corrected regression with connectors 2009-01-05 17:30:31 +0100 aw r265881 : #i97772# added missing usage of reduce factor for BitmapPrimitive creation 2009-01-05 12:24:01 +0100 aw r265863 : #i97321# added direct handling of HatchTexturePrimitive3D to not use it's decomposition for HitTest 2008-12-23 13:57:27 +0100 aw r265782 : #i96669# changed SW's FlyFrame paint fallback with primitives to use createLocalDecomposition since get2Decomposition does not have to stay virtual on the long run 2008-12-23 13:47:59 +0100 aw r265781 : #i96669# optimized impCreateTextPortionPrimitive to only create TextDecoratedPortionPrimitive2D when needed 2008-12-23 13:44:45 +0100 aw r265780 : #i96669# added B2DRange buffering to some primitive implementations where it is most necessary 2008-12-19 15:45:45 +0100 aw r265729 : #i96669# prepared TextPrimitives to work without DXarray, too. Had to rework impSplitSingleWords which gets active when a text portion has some word-wise decorations. Tested before committing 2008-12-19 15:44:16 +0100 aw r265728 : #i96669# corrected error in createPolygonFromUnitEllipseSegment which popped up when investigating 2008-12-18 17:45:58 +0100 aw r265708 : #i97149# added ActionChanged() call when visualisation object is modified 2008-12-18 15:34:42 +0100 aw r265695 : #i96598# corrected SdrPageObj's usage of aOutRect 2008-12-17 16:59:37 +0100 aw r265647 : #i96537# exchanged the marker for point number in string with correct one 2008-12-16 17:50:33 +0100 aw r265566 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:50:17 +0100 aw r265565 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:50:00 +0100 aw r265564 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:49:48 +0100 aw r265563 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:49:35 +0100 aw r265562 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer
2009-01-20 09:49:16 +00:00
DLPostPaint2(false);
}
2000-09-18 23:08:29 +00:00
GetOut()->Pop();
}
/******************************************************************************
|*
|* ViewShell::CheckInvalidForPaint()
|*
|* Ersterstellung MA 19. May. 94
|* Letzte Aenderung MA 09. Jun. 94
|*
******************************************************************************/
BOOL ViewShell::CheckInvalidForPaint( const SwRect &rRect )
{
if ( !GetWin() )
return FALSE;
const SwPageFrm *pPage = Imp()->GetFirstVisPage();
const SwTwips nBottom = VisArea().Bottom();
const SwTwips nRight = VisArea().Right();
BOOL bRet = FALSE;
while ( !bRet && pPage && !((pPage->Frm().Top() > nBottom) ||
(pPage->Frm().Left() > nRight)))
{
if ( pPage->IsInvalid() || pPage->IsInvalidFly() )
bRet = TRUE;
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())
Imp()->DelRegion();
2000-09-18 23:08:29 +00:00
SwLayAction aAction( GetLayout(), Imp() );
aAction.SetComplete( FALSE );
// 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();
--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.
BOOL bStop = TRUE;
for ( USHORT i = 0; i < pRegion->Count(); ++i )
{
const SwRect &rTmp = (*pRegion)[i];
if ( FALSE == (bStop = rTmp.IsOver( VisArea() )) )
break;
}
if ( bStop )
{
Imp()->DelRegion();
2000-09-18 23:08:29 +00:00
pRegion = 0;
}
}
if ( pRegion )
{
//Erst Invert dann Compress, niemals andersherum!
pRegion->Invert();
pRegion->Compress();
bRet = FALSE;
if ( pRegion->Count() )
{
SwRegionRects aRegion( rRect );
for ( USHORT i = 0; i < pRegion->Count(); ++i )
{ const SwRect &rTmp = (*pRegion)[i];
if ( !rRect.IsInside( rTmp ) )
{
InvalidateWindows( rTmp );
if ( rTmp.IsOver( VisArea() ) )
{ aRegion -= rTmp;
bRet = TRUE;
}
}
}
if ( bRet )
{
for ( USHORT i = 0; i < aRegion.Count(); ++i )
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
bRet = FALSE;
Imp()->DelRegion();
2000-09-18 23:08:29 +00:00
}
else
bRet = FALSE;
}
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 ) )
Imp()->bStopSmooth = TRUE;
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;
}
bPaintInProgress = TRUE;
SET_CURR_SHELL( this );
SwRootFrm::SetNoVirDev( TRUE );
//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();
ViewShell::bLstAct = TRUE;
GetLayout()->Paint( aRect );
ViewShell::bLstAct = FALSE;
}
else
{
//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 ) )
{
CWS-TOOLING: integrate CWS sw32bf02 2009-08-25 15:52:04 +0200 hde r275366 : reactived testcases hit by issue 102752 2009-08-21 13:52:17 +0200 od r275245 : #i102921# delete files whose deletion has been forgotten in cws impress172 2009-08-21 11:20:47 +0200 od r275225 : CWS-TOOLING: rebase CWS sw32bf02 to trunk@275001 (milestone: DEV300:m55) 2009-08-20 16:21:30 +0200 od r275191 : #i92511# method <lcl_MoveAllLowerObjs(..)> - invalidation of cache for object rectangle inclusive spaces is needed. 2009-08-20 15:50:40 +0200 od r275188 : #i96726# method <SwPagePreView::DocSzChgd(..)> - trigger recalculation of page preview layout even if the count of pages is not changing 2009-08-20 12:37:32 +0200 od r275172 : #i100466# correction for showing and hiding redlines 2009-08-18 13:25:18 +0200 od r275100 : #i103817# method <XMLTextImportHelper::SetStyleAndAttrs(..) - assure that a heading applies the outline style, if no other list style is applied. 2009-08-18 13:21:38 +0200 od r275098 : #i103817# allow the outline style - list style for outline numbering - to be set directly at the paragraph 2009-08-17 14:13:02 +0200 od r275052 : #i103684# add missing documentation for new optional OutlineLevel attribute introduced in OOo 3.1 2009-08-17 14:00:25 +0200 od r275049 : #i100481# method <XMLTextFrameContext_Impl::CreateChildContext(..)># - correct condition for handling embedded documents and embedded math objects 2009-08-12 14:11:34 +0200 od r274891 : #i97379# assure that columns are not applied to fly frames, which represent graphics or embedded objects 2009-08-12 12:51:43 +0200 od r274889 : #i101870# method <SwTxtNode::_MakeNewTxtNode(..)> - perform action on different paragraph styles before applying new paragraph style 2009-08-12 12:24:44 +0200 od r274888 : #i101092# method <ViewShell::Paint(..)> - encapsulate paint of document background and document into pre and post drawing layer paint calls 2009-08-12 11:38:48 +0200 od r274886 : #i98766# minor adjustment in order to be warning free under Mac port builds 2009-08-12 11:33:54 +0200 od r274885 : #i99267# method <SwTabFrm::MakeAll()> - reset <bSplit> after forward move to assure that follows can be joined, if further space is available. 2009-08-12 11:11:49 +0200 od r274882 : #i98766# method <ViewShell::SmoothScroll(..) - disable smooth scroll for Mac port builds 2009-08-10 12:17:58 +0200 od r274801 : CWS-TOOLING: rebase CWS sw32bf02 to trunk@274622 (milestone: DEV300:m54) 2009-07-21 16:56:45 +0200 od r274206 : #i103685# method <SwTxtFormatter::NewTabPortion(..)> - adjust condition to apply automatic tab stop at left margin correctly in case that tab stops are not relative to indent 2009-07-10 11:53:53 +0200 od r273883 : #i102752 method <SwDrawContact::Modify(..)> - assure that a ShapePropertyChangeNotifier exists 2009-07-07 12:01:58 +0200 mst r273788 : #i103304# apply patch by dtardon to fix bogus conditional 2009-07-07 09:01:13 +0200 od r273767 : CWS-TOOLING: rebase CWS sw32bf02 to trunk@273468 (milestone: DEV300:m51)
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();
ViewShell::bLstAct = TRUE;
GetLayout()->Paint( aRect );
ViewShell::bLstAct = FALSE;
CWS-TOOLING: integrate CWS sw32bf02 2009-08-25 15:52:04 +0200 hde r275366 : reactived testcases hit by issue 102752 2009-08-21 13:52:17 +0200 od r275245 : #i102921# delete files whose deletion has been forgotten in cws impress172 2009-08-21 11:20:47 +0200 od r275225 : CWS-TOOLING: rebase CWS sw32bf02 to trunk@275001 (milestone: DEV300:m55) 2009-08-20 16:21:30 +0200 od r275191 : #i92511# method <lcl_MoveAllLowerObjs(..)> - invalidation of cache for object rectangle inclusive spaces is needed. 2009-08-20 15:50:40 +0200 od r275188 : #i96726# method <SwPagePreView::DocSzChgd(..)> - trigger recalculation of page preview layout even if the count of pages is not changing 2009-08-20 12:37:32 +0200 od r275172 : #i100466# correction for showing and hiding redlines 2009-08-18 13:25:18 +0200 od r275100 : #i103817# method <XMLTextImportHelper::SetStyleAndAttrs(..) - assure that a heading applies the outline style, if no other list style is applied. 2009-08-18 13:21:38 +0200 od r275098 : #i103817# allow the outline style - list style for outline numbering - to be set directly at the paragraph 2009-08-17 14:13:02 +0200 od r275052 : #i103684# add missing documentation for new optional OutlineLevel attribute introduced in OOo 3.1 2009-08-17 14:00:25 +0200 od r275049 : #i100481# method <XMLTextFrameContext_Impl::CreateChildContext(..)># - correct condition for handling embedded documents and embedded math objects 2009-08-12 14:11:34 +0200 od r274891 : #i97379# assure that columns are not applied to fly frames, which represent graphics or embedded objects 2009-08-12 12:51:43 +0200 od r274889 : #i101870# method <SwTxtNode::_MakeNewTxtNode(..)> - perform action on different paragraph styles before applying new paragraph style 2009-08-12 12:24:44 +0200 od r274888 : #i101092# method <ViewShell::Paint(..)> - encapsulate paint of document background and document into pre and post drawing layer paint calls 2009-08-12 11:38:48 +0200 od r274886 : #i98766# minor adjustment in order to be warning free under Mac port builds 2009-08-12 11:33:54 +0200 od r274885 : #i99267# method <SwTabFrm::MakeAll()> - reset <bSplit> after forward move to assure that follows can be joined, if further space is available. 2009-08-12 11:11:49 +0200 od r274882 : #i98766# method <ViewShell::SmoothScroll(..) - disable smooth scroll for Mac port builds 2009-08-10 12:17:58 +0200 od r274801 : CWS-TOOLING: rebase CWS sw32bf02 to trunk@274622 (milestone: DEV300:m54) 2009-07-21 16:56:45 +0200 od r274206 : #i103685# method <SwTxtFormatter::NewTabPortion(..)> - adjust condition to apply automatic tab stop at left margin correctly in case that tab stops are not relative to indent 2009-07-10 11:53:53 +0200 od r273883 : #i102752 method <SwDrawContact::Modify(..)> - assure that a ShapePropertyChangeNotifier exists 2009-07-07 12:01:58 +0200 mst r273788 : #i103304# apply patch by dtardon to fix bogus conditional 2009-07-07 09:01:13 +0200 od r273767 : CWS-TOOLING: rebase CWS sw32bf02 to trunk@273468 (milestone: DEV300:m51)
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
}
//delete pSaveHdl;
2000-09-18 23:08:29 +00:00
}
SwRootFrm::SetNoVirDev( FALSE );
bPaintInProgress = FALSE;
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() )
{
// #i68597#
const Region aDLRegion(rRect);
DLPrePaint2(aDLRegion);
// OD 2004-04-23 #116347#
pOut->Push( PUSH_FILLCOLOR|PUSH_LINECOLOR );
2000-09-18 23:08:29 +00:00
pOut->SetFillColor( Imp()->GetRetoucheColor() );
pOut->SetLineColor();
2000-09-18 23:08:29 +00:00
pOut->DrawRect( rRect );
pOut->Pop();
// #i68597#
CWS-TOOLING: integrate CWS aw061 2009-01-13 19:18:08 +0100 aw r266250 : #i96669# changed initialisation order in Embedded3DPrimitive2D::Embedded3DPrimitive2D due to TinderBox 2009-01-13 19:15:37 +0100 aw r266249 : #i96669# changed initialisation order in Embedded3DPrimitive2D::Embedded3DPrimitive2D due to TinderBox 2009-01-12 11:53:37 +0100 aw r266141 : #i97874# corrected include for TinderBox build 2009-01-08 17:48:23 +0100 aw r266029 : #i97874# extended SdrTextObj::ImpConvertAddText to copy needed attributes from original object 2009-01-08 14:59:08 +0100 aw r266015 : #i96350# added fallback to solid fill in shadow TabPage when no fill is defined to get a reasonable shadow preview 2009-01-08 12:40:49 +0100 aw r265995 : #i94832# remuved not needed E3DModifySceneSnapRectUpdater usages 2009-01-08 01:53:46 +0100 thb r265982 : #i94860# Blacklisting another ATI card/driver that causes blank screens 2009-01-08 01:46:38 +0100 thb r265981 : #i97853# Changed all gradient texture methods to use basegfx gradienttools. consolidated quite some code 2009-01-08 01:45:09 +0100 thb r265980 : #i97853# Added lerp methods, slight changes to have everything necessary contained in the ODFGradientInfo struct 2009-01-08 00:01:54 +0100 thb r265979 : #i97853# First part of the move - duplicated the stuff to basegfx 2009-01-06 16:23:09 +0100 aw r265930 : #i97197# Changed SwDrawVirtObj to work well with changed aOutRect and bBoundRectValid functionality 2009-01-06 12:41:24 +0100 aw r265909 : #i97784# corrected regression with connectors 2009-01-05 17:30:31 +0100 aw r265881 : #i97772# added missing usage of reduce factor for BitmapPrimitive creation 2009-01-05 12:24:01 +0100 aw r265863 : #i97321# added direct handling of HatchTexturePrimitive3D to not use it's decomposition for HitTest 2008-12-23 13:57:27 +0100 aw r265782 : #i96669# changed SW's FlyFrame paint fallback with primitives to use createLocalDecomposition since get2Decomposition does not have to stay virtual on the long run 2008-12-23 13:47:59 +0100 aw r265781 : #i96669# optimized impCreateTextPortionPrimitive to only create TextDecoratedPortionPrimitive2D when needed 2008-12-23 13:44:45 +0100 aw r265780 : #i96669# added B2DRange buffering to some primitive implementations where it is most necessary 2008-12-19 15:45:45 +0100 aw r265729 : #i96669# prepared TextPrimitives to work without DXarray, too. Had to rework impSplitSingleWords which gets active when a text portion has some word-wise decorations. Tested before committing 2008-12-19 15:44:16 +0100 aw r265728 : #i96669# corrected error in createPolygonFromUnitEllipseSegment which popped up when investigating 2008-12-18 17:45:58 +0100 aw r265708 : #i97149# added ActionChanged() call when visualisation object is modified 2008-12-18 15:34:42 +0100 aw r265695 : #i96598# corrected SdrPageObj's usage of aOutRect 2008-12-17 16:59:37 +0100 aw r265647 : #i96537# exchanged the marker for point number in string with correct one 2008-12-16 17:50:33 +0100 aw r265566 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:50:17 +0100 aw r265565 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:50:00 +0100 aw r265564 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:49:48 +0100 aw r265563 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:49:35 +0100 aw r265562 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer
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 )
{
if( rNew != aBrowseBorder )
2000-09-18 23:08:29 +00:00
{
aBrowseBorder = rNew;
if ( aVisArea.HasArea() )
CheckBrowseView( FALSE );
}
}
const Size& ViewShell::GetBrowseBorder() const
{
return aBrowseBorder;
}
sal_Int32 ViewShell::GetBrowseWidth() const
{
const SwPostItMgr* pPostItMgr = GetPostItMgr();
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
|*
******************************************************************************/
void ViewShell::CheckBrowseView( BOOL bBrowseChgd )
2000-09-18 23:08:29 +00: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
// 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.
BYTE nInv = INV_PRTAREA | INV_TABLE | INV_POS;
// Beim BrowseModus-Wechsel benoetigen die CntntFrms
// wg. der Drucker/Bildschirmformatierung eine Size-Invalidierung
if( bBrowseChgd )
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
{
return pLayout.get(); //swmod 080116
2000-09-18 23:08:29 +00:00
}
/***********************************************************************/
2000-09-18 23:08:29 +00:00
OutputDevice& ViewShell::GetRefDev() const
{
OutputDevice* pTmpOut = 0;
if ( GetWin() &&
GetViewOptions()->getBrowseMode() &&
!GetViewOptions()->IsPrtFormat() )
pTmpOut = GetWin();
else if ( 0 != mpTmpRef )
pTmpOut = mpTmpRef;
else
pTmpOut = GetDoc()->getReferenceDevice( true );
return *pTmpOut;
}
2000-09-18 23:08:29 +00:00
const SwNodes& ViewShell::GetNodes() const
{
return pDoc->GetNodes();
}
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();
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 );
// 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() );
aOpt.SetShowHiddenField( rOpt.IsShowHiddenField() );
2000-09-18 23:08:29 +00:00
aOpt.SetShowHiddenPara( rOpt.IsShowHiddenPara() );
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();
}
// 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 )
{
if (*pOpt == rOpt)
return;
2000-09-18 23:08:29 +00:00
Window *pMyWin = GetWin();
if( !pMyWin )
2000-09-18 23:08:29 +00:00
{
ASSERT( pMyWin, "ViewShell::ApplyViewOptions: no window" );
2000-09-18 23:08:29 +00:00
return;
}
SET_CURR_SHELL( this );
BOOL bReformat = FALSE;
if( pOpt->IsShowHiddenField() != rOpt.IsShowHiddenField() )
2000-09-18 23:08:29 +00:00
{
((SwHiddenTxtFieldType*)pDoc->GetSysFldType( RES_HIDDENTXTFLD ))->
SetHiddenFlag( !rOpt.IsShowHiddenField() );
2000-09-18 23:08:29 +00:00
bReformat = TRUE;
}
if ( pOpt->IsShowHiddenPara() != rOpt.IsShowHiddenPara() )
{
SwHiddenParaFieldType* pFldType = (SwHiddenParaFieldType*)GetDoc()->
GetSysFldType(RES_HIDDENPARAFLD);
if( pFldType && pFldType->GetDepends() )
{
SwMsgPoolItem aHnt( RES_HIDDENPARA_PRINT );
pFldType->Modify( &aHnt, 0);
}
bReformat = TRUE;
}
if ( !bReformat && pOpt->IsShowHiddenChar() != rOpt.IsShowHiddenChar() )
{
bReformat = GetDoc()->ContainsHiddenChars();
}
2000-09-18 23:08:29 +00:00
// bReformat wird TRUE, wenn ...
// - Feldnamen anzeigen oder nicht ...
// ( - SwEndPortion muessen _nicht_ mehr generiert werden. )
// - Das Window ist natuerlich was ganz anderes als der Drucker...
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() )
{
MapMode aMode( pMyWin->GetMapMode() );
2000-09-18 23:08:29 +00:00
Fraction aNewFactor( rOpt.GetZoom(), 100 );
aMode.SetScaleX( aNewFactor );
aMode.SetScaleY( aNewFactor );
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.
if( pOpt->getBrowseMode() )
2000-09-18 23:08:29 +00:00
bReformat = TRUE;
}
bool bBrowseModeChanged = false;
if( pOpt->getBrowseMode() != rOpt.getBrowseMode() )
{
bBrowseModeChanged = true;
bReformat = TRUE;
}
else if( pOpt->getBrowseMode() && pOpt->IsPrtFormat() != rOpt.IsPrtFormat() )
bReformat = 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);
}
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);
pDoc->set(IDocumentSettingAccess::HTML_MODE, 0 != ::GetHtmlMode(pDoc->GetDocShell()));
2000-09-18 23:08:29 +00: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 );
}
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();
BOOL bOnlineSpl = rOpt.IsOnlineSpell();
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())
pOpt->SetStarOneSetting(TRUE);
pOpt->SetSymbolFont(rOpt.GetSymbolFont());
}
/******************************************************************************
|*
|* ViewShell::SetReadonly()
|*
|* Ersterstellung OS 05.09.96
|* Letzte Aenderung MA 12. Feb. 97
|*
******************************************************************************/
void ViewShell::SetReadonlyOption(BOOL bSet)
{
//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.
pOpt->SetReadonly( FALSE );
BOOL bReformat = pOpt->IsFldName();
pOpt->SetReadonly( bSet );
if( bReformat )
{
StartAction();
Reformat();
if ( GetWin() )
GetWin()->Invalidate();
EndAction();
}
else if ( GetWin() )
GetWin()->Invalidate();
if( Imp()->IsAccessible() )
Imp()->InvalidateAccessibleEditableState( sal_False );
2000-09-18 23:08:29 +00:00
}
}
/* -----------------28.08.2003 15:45-----------------
--------------------------------------------------*/
void ViewShell::SetPDFExportOption(sal_Bool bSet)
{
if( bSet != pOpt->IsPDFExport() )
{
if( bSet && pOpt->getBrowseMode() )
pOpt->SetPrtFormat( TRUE );
pOpt->SetPDFExport(bSet);
}
}
/* -----------------------------2002/07/31 17:06------------------------------
2000-09-18 23:08:29 +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
|*
******************************************************************************/
void ViewShell::SetPrtFormatOption( BOOL bSet )
{
pOpt->SetPrtFormat( bSet );
}
/******************************************************************************
|*
|* ViewShell::UISizeNotify()
|*
|* Ersterstellung MA 14. Jan. 97
|* Letzte Aenderung MA 14. Jan. 97
|*
******************************************************************************/
void ViewShell::UISizeNotify()
{
if ( bDocSizeChgd )
{
bDocSizeChgd = FALSE;
BOOL bOld = bInSizeNotify;
2000-09-18 23:08:29 +00:00
bInSizeNotify = TRUE;
::SizeNotify( this, GetDocSize() );
2000-09-18 23:08:29 +00:00
bInSizeNotify = bOld;
}
}
void ViewShell::SetRestoreActions(USHORT nSet)
{
DBG_ASSERT(!GetRestoreActions()||!nSet, "mehrfaches Restore der Actions ?");
2000-09-18 23:08:29 +00:00
Imp()->SetRestoreActions(nSet);
}
USHORT ViewShell::GetRestoreActions() const
{
return Imp()->GetRestoreActions();
}
BOOL ViewShell::IsNewLayout() const
{
return GetLayout()->IsNewLayout();
}
uno::Reference< ::com::sun::star::accessibility::XAccessible > ViewShell::CreateAccessible()
{
uno::Reference< ::com::sun::star::accessibility::XAccessible > xAcc;
2000-09-18 23:08:29 +00:00
// We require a layout and an XModel to be accessible.
ASSERT( pLayout, "no layout, no access" );
ASSERT( GetWin(), "no window, no access" );
if( pDoc->GetCurrentViewShell() && GetWin() ) //swmod 071108
xAcc = Imp()->GetAccessibleMap().GetDocumentView();
return xAcc;
}
2002-05-16 07:22:32 +00:00
uno::Reference< ::com::sun::star::accessibility::XAccessible >
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.
ASSERT( pLayout, "no layout, no access" );
2002-05-22 10:48:43 +00:00
ASSERT( GetWin(), "no window, no access" );
// OD 15.01.2003 #103492# - add condition <IsPreView()>
if ( IsPreView() && GetLayout()&& GetWin() )
{
// OD 14.01.2003 #103492# - adjustment for new method signature
2002-05-22 10:48:43 +00:00
return Imp()->GetAccessibleMap().GetDocumentPreview(
PagePreviewLayout()->maPrevwPages,
GetWin()->GetMapMode().GetScaleX(),
GetLayout()->GetPageByPageNum( PagePreviewLayout()->mnSelectedPageNum ),
PagePreviewLayout()->maWinSize ); //swmod 080305
}
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
/** 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();
}
}
/** invalidate attributes for paragraphs
OD 2009-01-06 #i88069#
@author OD
*/
void ViewShell::InvalidateAccessibleParaAttrs( const SwTxtFrm& rTxtFrm )
{
if ( GetLayout() && GetLayout()->IsAnyShellAccessible() )
{
Imp()->_InvalidateAccessibleParaAttrs( rTxtFrm );
}
}
SwAccessibleMap* ViewShell::GetAccessibleMap()
{
if ( Imp()->IsAccessible() )
{
return &(Imp()->GetAccessibleMap());
}
return 0;
}
/* -----------------------------06.05.2002 13:23------------------------------
---------------------------------------------------------------------------*/
void ViewShell::ApplyAccessiblityOptions(SvtAccessibilityOptions& rAccessibilityOptions)
{
if(pOpt->IsPagePreview() && !rAccessibilityOptions.GetIsForPagePreviews())
{
pAccOptions->SetAlwaysAutoColor(sal_False);
pAccOptions->SetStopAnimatedGraphics(sal_False);
pAccOptions->SetStopAnimatedText(sal_False);
}
else
{
pAccOptions->SetAlwaysAutoColor(rAccessibilityOptions.GetIsAutomaticFontColor());
pAccOptions->SetStopAnimatedGraphics(! rAccessibilityOptions.GetIsAllowAnimatedGraphics());
pAccOptions->SetStopAnimatedText(! rAccessibilityOptions.GetIsAllowAnimatedText());
// --> FME 2004-06-29 #114856# Formular view
// Always set this option, not only if document is read-only:
pOpt->SetSelectionInReadonly(rAccessibilityOptions.IsSelectionInReadonly());
}
}
ShellResource* ViewShell::GetShellRes()
{
return pShellRes;
}
void ViewShell::SetCareWin( Window* pNew )
{
pCareWindow = pNew;
}
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;
}
// --> 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" )
sal_Int32 nRet = -1;
// --> FME 2005-01-07 #i40059# Position out of bounds:
SwRect aRect( rRect );
aRect.Pos().X() = Max( aRect.Left(), GetLayout()->Frm().Left() );
// <--
const SwPageFrm* pPage = GetLayout()->GetPageAtPos( aRect.Center() );
if ( pPage )
{
ASSERT( pPage, "GetPageNumAndSetOffsetForPDF: No page found" )
Point aOffset( pPage->Frm().Pos() );
aOffset.X() = -aOffset.X();
aOffset.Y() = -aOffset.Y();
MapMode aMapMode( rOut.GetMapMode() );
aMapMode.SetOrigin( aOffset );
rOut.SetMapMode( aMapMode );
nRet = pPage->GetPhyPageNum() - 1;
}
return nRet;
}
// <--
// --> PB 2007-05-30 #146850#
const BitmapEx& ViewShell::GetReplacementBitmap( bool bIsErrorState )
{
BitmapEx** ppRet;
USHORT nResId = 0, nHCResId = 0;
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 )
{
USHORT nBmpResId =
Application::GetSettings().GetStyleSettings().GetHighContrastMode()
? nHCResId : nResId;
*ppRet = new BitmapEx( SW_RES( nBmpResId ) );
}
return **ppRet;
}
void ViewShell::DeleteReplacementBitmaps()
{
DELETEZ( pErrorBmp );
DELETEZ( pReplaceBmp );
}
// <--
SwPostItMgr* ViewShell::GetPostItMgr()
{
SwView* pView = GetDoc()->GetDocShell() ? GetDoc()->GetDocShell()->GetView() : 0;
if ( pView )
return pView->GetPostItMgr();
return 0;
}
/*
* 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(); }
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; }
IDocumentUndoRedo* ViewShell::getIDocumentUndoRedoAccess() { return pDoc; }
// --> OD 2007-11-14 #i83479#
const IDocumentListItems* ViewShell::getIDocumentListItemsAccess() const
{
return pDoc;
}
const IDocumentOutlineNodes* ViewShell::getIDocumentOutlineNodesAccess() const
{
return pDoc;
}
// <--