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

2447 lines
80 KiB
C++
Raw Normal View History

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
re-base on ALv2 code. Includes: Patches contributed by Oliver-Rainer Wittmann sw34bf06: #i117783# - Writer's implementation of XPagePrintable - apply print settings to new printing routines http://svn.apache.org/viewvc?view=revision&revision=1172115 sw34bf06: #o12311627# use <rtl_random> methods to create unique ids for list styles and list ids http://svn.apache.org/viewvc?view=revision&revision=1172112 sw34bf06 #i114725#,#i115828# - method <SwDoc::ClearDoc()> - clear list structures completely http://svn.apache.org/viewvc?view=revision&revision=1172122 i#118572 - remove ui string and help content regarding usage of Java Mail in Writer's Mail Merge as Java Mail is not used. http://svn.apache.org/viewvc?view=revision&revision=1197035 Patches contributed by Mathias Bauer cws mba34issues01: #i117718#: provide filter name in case storage of medium does not allow to detect one http://svn.apache.org/viewvc?view=revision&revision=1172350 cws mba34issues01: #i117721#: directly provide parameters retrieved from SfxMedium http://svn.apache.org/viewvc?view=revision&revision=1172353 gnumake4 work variously http://svn.apache.org/viewvc?view=revision&revision=1394707 http://svn.apache.org/viewvc?view=revision&revision=1394326 http://svn.apache.org/viewvc?view=revision&revision=1396797 http://svn.apache.org/viewvc?view=revision&revision=1397315 cws mba34issues01: #i117723#: convert assertion into trace http://svn.apache.org/viewvc?view=revision&revision=1172355 cws mba34issues01: #i117699#: keep layout alive until swdoc dies http://svn.apache.org/viewvc?view=revision&revision=1172362 cws mba34issues01: #i117943#: missing color attributes in RTF clipboard http://svn.apache.org/viewvc?view=revision&revision=1172363 Patch contributed by Henning Brinkmann imported patch i#103878 http://svn.apache.org/viewvc?view=revision&revision=1172109 Patches contributed by Michael Stahl sw34bf06: #i117955#: WW8 export: disable storing of section breaks in endnotes http://svn.apache.org/viewvc?view=revision&revision=1172119 Patch contributed by imacat Fixed the Asian language work count. http://svn.apache.org/viewvc?view=revision&revision=1241345 Patch contributed by Pedro Giffuni i#20878 - Add comment with BZ issue for reference. http://svn.apache.org/viewvc?view=revision&revision=1244517 Patch contributed by Andre Fischer Do not add targets for junit tests when junit is disabled. http://svn.apache.org/viewvc?view=revision&revision=1241508 add writerperfect dependency.
2011-03-31 10:05:04 +02:00
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
2000-09-18 23:08:29 +00:00
#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
#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>
#include <docsh.hxx>
#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
#include <statstr.hrc>
#include <comcore.hrc>
#include <pagepreviewlayout.hxx>
#include <sortedobjs.hxx>
#include <anchoredobject.hxx>
#include "../../ui/inc/view.hxx"
#include <PostItMgr.hxx>
#include <vcl/virdev.hxx>
#include <vcl/svapp.hxx>
#include <svx/sdrpaintwindow.hxx>
sal_Bool ViewShell::mbLstAct = sal_False;
ShellResource *ViewShell::mpShellRes = 0;
Window *ViewShell::mpCareWindow = 0;
BitmapEx* ViewShell::mpErrorBmp = NULL;
BitmapEx* ViewShell::mpReplaceBmp = 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;
void ViewShell::ToggleHeaderFooterEdit()
{
mbHeaderFooterEdit = !mbHeaderFooterEdit;
if ( !mbHeaderFooterEdit )
{
SetShowHeaderFooterSeparator( Header, false );
SetShowHeaderFooterSeparator( Footer, false );
}
// Avoid corner case
if ( !IsShowHeaderFooterSeparator( Header ) &&
!IsShowHeaderFooterSeparator( Footer ) )
{
mbHeaderFooterEdit = false;
}
// Repaint everything
GetWin()->Invalidate();
}
//////////////////////////////////////////////////////////////////////////////
// #i72754# 2nd set of Pre/PostPaints
// This time it uses the lock counter (mPrePostPaintRegions empty/non-empty) 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(mPrePostPaintRegions.empty())
{
mPrePostPaintRegions.push( rRegion );
// #i75172# ensure DrawView to use DrawingLayer bufferings
if ( !HasDrawView() )
MakeDrawView();
// Prefer window; if tot available, get mpOut (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 = mpOut;
mpOut = &(mpTargetPaintWindow->GetTargetOutputDevice());
}
// remember original paint MapMode for wrapped FlyFrame paints
maPrePostMapMode = mpOut->GetMapMode();
}
else
{
// region needs to be updated to the given one
if( mPrePostPaintRegions.top() != rRegion )
Imp()->GetDrawView()->UpdateDrawLayersRegion(mpPrePostOutDev, rRegion);
mPrePostPaintRegions.push( rRegion );
}
}
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(!mPrePostPaintRegions.empty(), "ViewShell::DLPostPaint2: Pre/PostPaint encapsulation broken (!)");
if( mPrePostPaintRegions.size() > 1 )
{
Region current = mPrePostPaintRegions.top();
mPrePostPaintRegions.pop();
if( current != mPrePostPaintRegions.top())
Imp()->GetDrawView()->UpdateDrawLayersRegion(mpPrePostOutDev, mPrePostPaintRegions.top());
return;
}
mPrePostPaintRegions.pop(); // clear
if(0 != mpTargetPaintWindow)
{
// #i74769# restore buffered OutDev
if(mpTargetPaintWindow->GetPreRenderDevice())
{
mpOut = 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;
}
}
//////////////////////////////////////////////////////////////////////////////
void ViewShell::ImplEndAction( const sal_Bool bIdleEnd )
2000-09-18 23:08:29 +00:00
{
// Nothing to do for the printer?
2000-09-18 23:08:29 +00:00
if ( !GetWin() || IsPreView() )
{
mbPaintWorks = sal_True;
2000-09-18 23:08:29 +00:00
UISizeNotify();
return;
}
mbInEndAction = sal_True;
//will this put the EndAction of the last shell in the sequence?
2000-09-18 23:08:29 +00:00
ViewShell::mbLstAct = sal_True;
2000-09-18 23:08:29 +00:00
ViewShell *pSh = (ViewShell*)this->GetNext();
while ( pSh != this )
2010-10-01 21:57:36 +02:00
{
if ( pSh->ActionPend() )
{
ViewShell::mbLstAct = sal_False;
2000-09-18 23:08:29 +00:00
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( sal_False );
if ( mnLockPaint )
aAction.SetPaint( sal_False );
aAction.SetInputType( VCL_INPUT_KEYBOARD );
2000-09-18 23:08:29 +00:00
aAction.Action();
}
if ( bIsShellForCheckViewLayout )
GetLayout()->CheckViewLayout( GetViewOptions(), &maVisArea );
//If we don't call Paints, we wait for the Paint of the system.
//Then the clipping is set correctly; e.g. shifting of a Draw object
if ( Imp()->GetRegion() ||
maInvalidRect.HasArea() ||
bExtraData )
2000-09-18 23:08:29 +00:00
{
if ( !mnLockPaint )
2000-09-18 23:08:29 +00:00
{
2012-03-06 09:45:08 +00:00
SolarMutexGuard aGuard;
sal_Bool bPaintsFromSystem = maInvalidRect.HasArea();
2000-09-18 23:08:29 +00:00
GetWin()->Update();
if ( maInvalidRect.HasArea() )
2000-09-18 23:08:29 +00:00
{
if ( bPaintsFromSystem )
Imp()->AddPaintRect( maInvalidRect );
2000-09-18 23:08:29 +00:00
ResetInvalidRect();
bPaintsFromSystem = sal_True;
2000-09-18 23:08:29 +00:00
}
mbPaintWorks = sal_True;
2000-09-18 23:08:29 +00:00
SwRegionRects *pRegion = Imp()->GetRegion();
//JP 27.11.97: what hid the selection, must also Show it,
// else we get Paint errors!
// e.g. additional mode, page half visible vertically, in the
// middle a selection and with an other cursor jump to left
// right border. Without ShowCrsr the selection disappears.
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;
//First Invert then Compress, never the other way round!
2000-09-18 23:08:29 +00:00
pRegion->Invert();
pRegion->Compress();
VirtualDevice *pVout = 0;
while ( !pRegion->empty() )
2000-09-18 23:08:29 +00:00
{
SwRect aRect( pRegion->back() );
pRegion->pop_back();
2000-09-18 23:08:29 +00:00
bool bPaint = true;
2000-09-18 23:08:29 +00:00
if ( IsEndActionByVirDev() )
{
//create virtual device and set.
2000-09-18 23:08:29 +00:00
if ( !pVout )
pVout = new VirtualDevice( *GetOut() );
MapMode aMapMode( GetOut()->GetMapMode() );
pVout->SetMapMode( aMapMode );
sal_Bool bSizeOK = sal_True;
2000-09-18 23:08:29 +00:00
Rectangle aTmp1( aRect.SVRect() );
aTmp1 = GetOut()->LogicToPixel( aTmp1 );
Rectangle aTmp2( GetOut()->PixelToLogic( aTmp1 ) );
if ( aTmp2.Left() > aRect.Left() )
aTmp1.Left() = Max( 0L, aTmp1.Left() - 1L );
if ( aTmp2.Top() > aRect.Top() )
aTmp1.Top() = Max( 0L, aTmp1.Top() - 1L );
aTmp1.Right() += 1;
aTmp1.Bottom() += 1;
aTmp1 = GetOut()->PixelToLogic( aTmp1 );
aRect = SwRect( aTmp1 );
const Size aTmp( pVout->GetOutputSize() );
if ( aTmp.Height() < aRect.Height() ||
aTmp.Width() < aRect.Width() )
{
bSizeOK = pVout->SetOutputSize( aRect.SSize() );
}
if ( bSizeOK )
{
bPaint = false;
// --> OD 2007-07-26 #i79947#
// #i72754# start Pre/PostPaint encapsulation before mpOut 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 );
mpOut = 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 );
mpOut = pOld;
2000-09-18 23:08:29 +00:00
// #i72754# end Pre/PostPaint encapsulation when mpOut 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);
}
2011-02-05 17:11:34 -05:00
// #i107365#
// Direct paint has been performed. Thus, take care of
// transparent child windows.
if ( GetWin() )
{
Window& rWindow = *(GetWin());
if (rWindow.IsChildTransparentModeEnabled())
{
Window* pCandidate = rWindow.GetWindow( WINDOW_FIRSTCHILD );
if (pCandidate)
{
const Rectangle aRectanglePixel(rWindow.LogicToPixel(aRect.SVRect()));
while (pCandidate)
{
if ( pCandidate->IsPaintTransparent() )
{
const Rectangle aCandidatePosSizePixel(
pCandidate->GetPosPixel(),
pCandidate->GetSizePixel());
if ( aCandidatePosSizePixel.IsOver(aRectanglePixel) )
{
pCandidate->Invalidate( INVALIDATE_NOTRANSPARENT|INVALIDATE_CHILDREN );
pCandidate->Update();
}
}
pCandidate = pCandidate->GetWindow( WINDOW_NEXT );
}
}
}
}
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( sal_True );
2000-09-18 23:08:29 +00:00
}
else
{
Imp()->DelRegion();
mbPaintWorks = sal_True;
2000-09-18 23:08:29 +00:00
}
}
else
mbPaintWorks = sal_True;
2000-09-18 23:08:29 +00:00
mbInEndAction = sal_False;
ViewShell::mbLstAct = sal_False;
2000-09-18 23:08:29 +00:00
Imp()->EndAction();
//We artificially end the action here to enable the automatic scrollbars
//to adjust themselves correctly
//EndAction sends a Notify, and that must call Start-/EndAction to
//adjust the scrollbars correctly
--mnStartAction;
2000-09-18 23:08:29 +00:00
UISizeNotify();
++mnStartAction;
2000-09-18 23:08:29 +00:00
if( Imp()->IsAccessible() )
Imp()->FireAccessibleEvents();
2000-09-18 23:08:29 +00:00
}
2000-09-18 23:08:29 +00:00
void ViewShell::ImplStartAction()
{
mbPaintWorks = sal_False;
2000-09-18 23:08:29 +00:00
Imp()->StartAction();
}
2000-09-18 23:08:29 +00:00
void ViewShell::ImplLockPaint()
{
if ( GetWin() && GetWin()->IsVisible() )
GetWin()->EnablePaint( sal_False ); //Also cut off the controls.
2000-09-18 23:08:29 +00:00
Imp()->LockPaint();
}
void ViewShell::ImplUnlockPaint( sal_Bool bVirDev )
2000-09-18 23:08:29 +00:00
{
SET_CURR_SHELL( this );
if ( GetWin() && GetWin()->IsVisible() )
{
if ( (bInSizeNotify || bVirDev ) && VisArea().HasArea() )
{
//Refresh with virtual device to avoid flickering.
VirtualDevice *pVout = new VirtualDevice( *mpOut );
pVout->SetMapMode( mpOut->GetMapMode() );
2000-09-18 23:08:29 +00:00
Size aSize( VisArea().SSize() );
aSize.Width() += 20;
aSize.Height()+= 20;
if( pVout->SetOutputSize( aSize ) )
{
GetWin()->EnablePaint( sal_True );
2000-09-18 23:08:29 +00:00
GetWin()->Validate();
Imp()->UnlockPaint();
pVout->SetLineColor( mpOut->GetLineColor() );
pVout->SetFillColor( mpOut->GetFillColor() );
// #i72754# start Pre/PostPaint encapsulation before mpOut is changed to the buffering VDev
const Region aRepaintRegion(VisArea().SVRect());
DLPrePaint2(aRepaintRegion);
OutputDevice *pOld = mpOut;
mpOut = pVout;
2000-09-18 23:08:29 +00:00
Paint( VisArea().SVRect() );
mpOut = pOld;
mpOut->DrawOutDev( VisArea().Pos(), aSize,
2000-09-18 23:08:29 +00:00
VisArea().Pos(), aSize, *pVout );
// #i72754# end Pre/PostPaint encapsulation when mpOut 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( sal_True );
2000-09-18 23:08:29 +00:00
GetWin()->Invalidate( INVALIDATE_CHILDREN );
}
delete pVout;
}
else
{
Imp()->UnlockPaint();
GetWin()->EnablePaint( sal_True );
2000-09-18 23:08:29 +00:00
GetWin()->Invalidate( INVALIDATE_CHILDREN );
}
}
else
Imp()->UnlockPaint();
}
sal_Bool ViewShell::AddPaintRect( const SwRect & rRect )
2000-09-18 23:08:29 +00:00
{
sal_Bool bRet = sal_False;
2000-09-18 23:08:29 +00:00
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 );
}
2000-09-18 23:08:29 +00:00
pSh = (ViewShell*)pSh->GetNext();
} while ( pSh != this );
return bRet;
}
2000-09-18 23:08:29 +00:00
void ViewShell::InvalidateWindows( const SwRect &rRect )
{
if ( !Imp()->IsCalcLayoutProgress() )
{
ViewShell *pSh = this;
do
{
if ( pSh->GetWin() )
{
if ( pSh->IsPreView() )
::RepaintPagePreview( pSh, rRect );
else if ( pSh->VisArea().IsOver( rRect ) )
pSh->GetWin()->Invalidate( rRect.SVRect() );
}
pSh = (ViewShell*)pSh->GetNext();
} while ( pSh != this );
}
}
2000-09-18 23:08:29 +00:00
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( mpWin )
2000-09-18 23:08:29 +00:00
{
const SwFrm* pRoot = 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
}
#if OSL_DEBUG_LEVEL > 0
2000-09-18 23:08:29 +00:00
else
{
//MA: 04. Nov. 94, no one needs this, does one?
OSL_ENSURE( !this, "MakeVisible fuer Drucker wird doch gebraucht?" );
2000-09-18 23:08:29 +00:00
}
#endif
}
}
}
Window* ViewShell::CareChildWin(ViewShell& rVSh)
2000-09-18 23:08:29 +00:00
{
if(rVSh.mpSfxViewShell)
{
const sal_uInt16 nId = SvxSearchDialogWrapper::GetChildWindowId();
SfxViewFrame* pVFrame = rVSh.mpSfxViewShell->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;
}
Point ViewShell::GetPagePos( sal_uInt16 nPageNum ) const
2000-09-18 23:08:29 +00:00
{
return GetLayout()->GetPagePos( nPageNum );
}
sal_uInt16 ViewShell::GetNumPages()
2000-09-18 23:08:29 +00:00
{
//It is possible that no layout exists when the method from
//root-Ctor is called.
2000-09-18 23:08:29 +00:00
return GetLayout() ? GetLayout()->GetPageNum() : 0;
}
sal_Bool ViewShell::IsDummyPage( sal_uInt16 nPageNum ) const
2002-03-15 10:47:59 +00:00
{
return GetLayout() ? GetLayout()->IsDummyPage( nPageNum ) : 0;
}
/**
* Forces update of each field.
* It notifies all fields with pNewHt. If that is 0 (default), the field
* type is sent (???).
* @param[in] bCloseDB Passed in to GetDoc()->UpdateFlds. [TODO] Purpose???
*/
void ViewShell::UpdateFlds(sal_Bool bCloseDB)
2000-09-18 23:08:29 +00:00
{
SET_CURR_SHELL( this );
sal_Bool bCrsr = ISA(SwCrsrShell);
2000-09-18 23:08:29 +00:00
if ( bCrsr )
((SwCrsrShell*)this)->StartAction();
else
StartAction();
GetDoc()->UpdateFlds(0, bCloseDB);
if ( bCrsr )
((SwCrsrShell*)this)->EndAction();
else
EndAction();
}
/** update all charts for which any table exists */
2000-09-18 23:08:29 +00:00
void ViewShell::UpdateAllCharts()
{
SET_CURR_SHELL( this );
// Start-/EndAction handled in the SwDoc-Method!
GetDoc()->UpdateAllCharts();
}
sal_Bool ViewShell::HasCharts() const
2000-09-18 23:08:29 +00:00
{
sal_Bool bRet = sal_False;
2000-09-18 23:08:29 +00:00
const SwStartNode *pStNd;
SwNodeIndex aIdx( *GetDoc()->GetNodes().GetEndOfAutotext().
StartOfSectionNode(), 1 );
while ( 0 != (pStNd = aIdx.GetNode().GetStartNode()) )
{
++aIdx;
2000-09-18 23:08:29 +00:00
const SwOLENode *pNd = aIdx.GetNode().GetOLENode();
if( pNd && pNd->GetChartTblName().Len() )
{
bRet = sal_True;
2000-09-18 23:08:29 +00:00
break;
}
}
return bRet;
}
2000-09-18 23:08:29 +00:00
void ViewShell::LayoutIdle()
{
#ifdef TCOVER
//for TCV-version: end of start phase of the application
2000-09-18 23:08:29 +00:00
TCovCall::Idle();
#endif
if( !mpOpt->IsIdle() || !GetWin() ||
2000-09-18 23:08:29 +00:00
( Imp()->HasDrawView() && Imp()->GetDrawView()->IsDragObj() ) )
return;
//No idle when printing is going on.
2000-09-18 23:08:29 +00:00
ViewShell *pSh = this;
do
{ if ( !pSh->GetWin() )
return;
pSh = (ViewShell*)pSh->GetNext();
} while ( pSh != this );
SET_CURR_SHELL( this );
#ifdef DBG_UTIL
// When Test5 has been printed, the IdleFormatter is ended.
if( mpOpt->IsTest5() )
2000-09-18 23:08:29 +00:00
return;
#endif
{
DBG_PROFSTART( LayoutIdle );
//Prepare and recover cache, so that it will not get fouled.
2000-09-18 23:08:29 +00:00
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!
OSL_ENSURE(Imp(), "ViewShell already deleted?");
if(!Imp())
return;
2000-09-18 23:08:29 +00:00
SwLayIdle aIdle( GetLayout(), Imp() );
DBG_PROFSTOP( LayoutIdle );
}
}
static void lcl_InvalidateAllCntnt( ViewShell& rSh, sal_uInt8 nInv )
{
sal_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. #i11860#
*/
static 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(), sal_True );
pIDSA->set(IDocumentSettingAccess::PARA_SPACE_MAX, bNew );
const sal_uInt8 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(), sal_True );
pIDSA->set(IDocumentSettingAccess::PARA_SPACE_MAX_AT_PAGES, bNew );
const sal_uInt8 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(), sal_True );
pIDSA->set(IDocumentSettingAccess::TAB_COMPAT, bNew );
const sal_uInt8 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(), sal_True );
pIDSA->set(IDocumentSettingAccess::ADD_EXT_LEADING, bNew );
SdrModel* pTmpDrawModel = getIDocumentDrawModelAccess()->GetDrawModel();
if ( pTmpDrawModel )
pTmpDrawModel->SetAddExtLeading( bNew );
const sal_uInt8 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(), sal_True );
// this sets the flag at the document and calls PrtDataChanged
IDocumentDeviceAccess* pIDDA = getIDocumentDeviceAccess();
pIDDA->setReferenceDeviceType( bNewVirtual, true );
}
}
/** Sets if paragraph and table spacing is added at bottom of table cells.
* #106629#
* @param[in] (bool) setting of the new value
*/
void ViewShell::SetAddParaSpacingToTableCells( bool _bAddParaSpacingToTableCells )
{
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
if ( pIDSA->get(IDocumentSettingAccess::ADD_PARA_SPACING_TO_TABLE_CELLS) != _bAddParaSpacingToTableCells )
{
SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
pIDSA->set(IDocumentSettingAccess::ADD_PARA_SPACING_TO_TABLE_CELLS, _bAddParaSpacingToTableCells );
const sal_uInt8 nInv = INV_PRTAREA;
lcl_InvalidateAllCntnt( *this, nInv );
}
}
/**
* Sets if former formatting of text lines with proportional line spacing should used.
* #i11859#
* @param[in] (bool) setting of the new value
*/
void ViewShell::SetUseFormerLineSpacing( bool _bUseFormerLineSpacing )
{
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
if ( pIDSA->get(IDocumentSettingAccess::OLD_LINE_SPACING) != _bUseFormerLineSpacing )
{
SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
pIDSA->set(IDocumentSettingAccess::OLD_LINE_SPACING, _bUseFormerLineSpacing );
const sal_uInt8 nInv = INV_PRTAREA;
lcl_InvalidateAllCntnt( *this, nInv );
}
}
/**
* Sets IDocumentSettingAccess if former object positioning should be used.
* #i11860#
* @param[in] (bool) setting the new value
*/
void ViewShell::SetUseFormerObjectPositioning( bool _bUseFormerObjPos )
{
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
if ( pIDSA->get(IDocumentSettingAccess::USE_FORMER_OBJECT_POS) != _bUseFormerObjPos )
{
SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
pIDSA->set(IDocumentSettingAccess::USE_FORMER_OBJECT_POS, _bUseFormerObjPos );
lcl_InvalidateAllObjPos( *this );
}
}
// #i28701#
void ViewShell::SetConsiderWrapOnObjPos( bool _bConsiderWrapOnObjPos )
{
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
if ( pIDSA->get(IDocumentSettingAccess::CONSIDER_WRAP_ON_OBJECT_POSITION) != _bConsiderWrapOnObjPos )
{
SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
pIDSA->set(IDocumentSettingAccess::CONSIDER_WRAP_ON_OBJECT_POSITION, _bConsiderWrapOnObjPos );
lcl_InvalidateAllObjPos( *this );
}
}
void ViewShell::SetUseFormerTextWrapping( bool _bUseFormerTextWrapping )
{
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
if ( pIDSA->get(IDocumentSettingAccess::USE_FORMER_TEXT_WRAPPING) != _bUseFormerTextWrapping )
{
SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
pIDSA->set(IDocumentSettingAccess::USE_FORMER_TEXT_WRAPPING, _bUseFormerTextWrapping );
const sal_uInt8 nInv = INV_PRTAREA | INV_SIZE | INV_TABLE | INV_SECTION;
lcl_InvalidateAllCntnt( *this, nInv );
}
}
// #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(), sal_True );
pIDSA->set(IDocumentSettingAccess::DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK, _bDoNotJustifyLinesWithManualBreak );
const sal_uInt8 nInv = INV_PRTAREA | INV_SIZE | INV_TABLE | INV_SECTION;
lcl_InvalidateAllCntnt( *this, nInv );
}
}
2000-09-18 23:08:29 +00:00
2000-09-18 23:08:29 +00:00
void ViewShell::Reformat()
{
SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
2000-09-18 23:08:29 +00:00
// we go for safe: get rid of the old font information,
// when the printer resolution or zoom factor changes.
// Init() and Reformat() are the safest locations.
2000-09-18 23:08:29 +00:00
#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
void ViewShell::CalcLayout()
{
SET_CURR_SHELL( this );
SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
2000-09-18 23:08:29 +00:00
//prepare and recover cache, so that it will not get fouled.
2000-09-18 23:08:29 +00:00
SwSaveSetLRUOfst aSaveLRU( *SwTxtFrm::GetTxtCache(),
SwTxtFrm::GetTxtCache()->GetCurMax() - 50 );
//switch on Progress when none is running yet.
const bool bEndProgress = SfxProgress::GetActiveProgress( GetDoc()->GetDocShell() ) == 0;
2000-09-18 23:08:29 +00:00
if ( bEndProgress )
{
sal_uInt16 nEndPage = GetLayout()->GetPageNum();
2000-09-18 23:08:29 +00:00
nEndPage += nEndPage * 10 / 100;
::StartProgress( STR_STATSTR_REFORMAT, 0, nEndPage, GetDoc()->GetDocShell() );
}
SwLayAction aAction( GetLayout(), Imp() );
aAction.SetPaint( sal_False );
aAction.SetStatBar( sal_True );
aAction.SetCalcLayout( sal_True );
aAction.SetReschedule( sal_True );
2000-09-18 23:08:29 +00:00
GetDoc()->LockExpFlds();
aAction.Action();
GetDoc()->UnlockExpFlds();
//the SetNewFldLst() on the Doc was cut off and must be fetched again
//(see flowfrm.cxx, txtfld.cxx)
2000-09-18 23:08:29 +00:00
if ( aAction.IsExpFlds() )
{
aAction.Reset();
aAction.SetPaint( sal_False );
aAction.SetStatBar( sal_True );
aAction.SetReschedule( sal_True );
2000-09-18 23:08:29 +00:00
SwDocPosUpdate aMsgHnt( 0 );
GetDoc()->UpdatePageFlds( &aMsgHnt );
GetDoc()->UpdateExpFlds(NULL, true);
2000-09-18 23:08:29 +00:00
aAction.Action();
}
if ( VisArea().HasArea() )
InvalidateWindows( VisArea() );
if ( bEndProgress )
::EndProgress( GetDoc()->GetDocShell() );
}
2000-09-18 23:08:29 +00:00
void ViewShell::SetFirstVisPageInvalid()
{
ViewShell *pSh = this;
do
{
if ( pSh->Imp() )
pSh->Imp()->SetFirstVisPageInvalid();
2000-09-18 23:08:29 +00:00
pSh = (ViewShell*)pSh->GetNext();
} while ( pSh != this );
}
void ViewShell::SizeChgNotify()
2000-09-18 23:08:29 +00:00
{
if ( !mpWin )
mbDocSizeChgd = sal_True;
else if( ActionPend() || Imp()->IsCalcLayoutProgress() || mbPaintInProgress )
2000-09-18 23:08:29 +00:00
{
mbDocSizeChgd = sal_True;
2000-09-18 23:08:29 +00:00
if ( !Imp()->IsCalcLayoutProgress() && ISA( SwCrsrShell ) )
{
const SwFrm *pCnt = ((SwCrsrShell*)this)->GetCurrFrm( sal_False );
2000-09-18 23:08:29 +00:00
const SwPageFrm *pPage;
if ( pCnt && 0 != (pPage = pCnt->FindPageFrm()) )
{
sal_uInt16 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
{
mbDocSizeChgd = sal_False;
::SizeNotify( this, GetDocSize() );
2000-09-18 23:08:29 +00:00
}
}
2000-09-18 23:08:29 +00:00
void ViewShell::VisPortChgd( const SwRect &rRect)
{
OSL_ENSURE( GetWin(), "VisPortChgd ohne Window." );
2000-09-18 23:08:29 +00:00
if ( rRect == VisArea() )
return;
#if OSL_DEBUG_LEVEL > 1
if ( mbInEndAction )
2000-09-18 23:08:29 +00:00
{
//Is someone rescheduling again?
OSL_ENSURE( !this, "Scroll waehrend einer EndAction." );
2000-09-18 23:08:29 +00:00
}
#endif
//First get the old visible page, so we don't have to look
//for it afterwards.
2000-09-18 23:08:29 +00:00
const SwFrm *pOldPage = Imp()->GetFirstVisPage();
const SwRect aPrevArea( VisArea() );
const sal_Bool bFull = aPrevArea.IsEmpty();
maVisArea = rRect;
2000-09-18 23:08:29 +00:00
SetFirstVisPageInvalid();
//When there a PaintRegion still exists and the VisArea has changed,
//the PaintRegion is at least by now obsolete. The PaintRegion can
//have been created by RootFrm::Paint.
if ( !mbInEndAction &&
2000-09-18 23:08:29 +00:00
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
{
//Calculate amount to be scrolled.
2000-09-18 23:08:29 +00:00
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() ) )
{
//If possible, don't scroll the pastures/meadows (?, German Wiese)
//Also limit the left and right side of the scroll range to the pages.
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 bool bBookMode = GetViewOptions()->IsViewLayoutBookMode();
while ( pPage && pPage->Frm().Top() <= nBottom )
2000-09-18 23:08:29 +00:00
{
SwRect aPageRect( pPage->GetBoundRect() );
if ( bBookMode )
{
const SwPageFrm& rFormatPage = static_cast<const SwPageFrm*>(pPage)->GetFormatPage();
aPageRect.SSize() = rFormatPage.GetBoundRect().SSize();
}
// OD 12.02.2003 #i9719#, #105645# - consider new border
// and shadow width
if ( aPageRect.IsOver( aBoth ) )
2000-09-18 23:08:29 +00:00
{
SwTwips nPageLeft = 0;
SwTwips nPageRight = 0;
const sw::sidebarwindows::SidebarPosition aSidebarPos = pPage->SidebarPosition();
if( aSidebarPos != sw::sidebarwindows::SIDEBAR_NONE )
{
nPageLeft = aPageRect.Left();
nPageRight = aPageRect.Right();
}
if( nPageLeft < nMinLeft )
nMinLeft = nPageLeft;
if( nPageRight > nMaxRight )
nMaxRight = nPageRight;
//match with the draw objects
//take nOfst into account as the objects have been
//selected and have handles attached.
2000-09-18 23:08:29 +00:00
if ( pPage->GetSortedObjs() )
{
const long nOfst = GetOut()->PixelToLogic(
Size(Imp()->GetDrawView()->GetMarkHdlSizePixel()/2,0)).Width();
for ( sal_uInt16 i = 0;
2000-09-18 23:08:29 +00:00
i < pPage->GetSortedObjs()->Count(); ++i )
{
SwAnchoredObject* pObj = (*pPage->GetSortedObjs())[i];
2011-05-05 14:38:19 +02:00
// ignore objects that are not actually placed on the page
if (pObj->IsFormatPossible())
{
const Rectangle &rBound = pObj->GetObjRect().SVRect();
// OD 03.03.2003 #107927# - use correct datatype
2011-05-05 14:38:19 +02:00
const SwTwips nL = Max( 0L, rBound.Left() - nOfst );
if ( nL < nMinLeft )
nMinLeft = nL;
if( rBound.Right() + nOfst > nMaxRight )
nMaxRight = rBound.Right() + nOfst;
}
2000-09-18 23:08:29 +00:00
}
}
}
pPage = (SwPageFrm*)pPage->GetNext();
}
Rectangle aRect( aPrevArea.SVRect() );
aRect.Left() = nMinLeft;
aRect.Right() = nMaxRight;
if( VisArea().IsOver( aPrevArea ) && !mnLockPaint )
2000-09-18 23:08:29 +00:00
{
bScrolled = true;
maVisArea.Pos() = aPrevArea.Pos();
2000-09-18 23:08:29 +00:00
if ( SmoothScroll( nXDiff, nYDiff, &aRect ) )
return;
maVisArea.Pos() = rRect.Pos();
2000-09-18 23:08:29 +00:00
}
else
GetWin()->Invalidate( aRect );
}
else if ( !mnLockPaint ) //will be released in Unlock
2000-09-18 23:08:29 +00:00
{
if( VisArea().IsOver( aPrevArea ) )
{
bScrolled = true;
maVisArea.Pos() = aPrevArea.Pos();
2000-09-18 23:08:29 +00:00
if ( SmoothScroll( nXDiff, nYDiff, 0 ) )
return;
maVisArea.Pos() = rRect.Pos();
2000-09-18 23:08:29 +00:00
}
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
}
sal_Bool ViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect )
2000-09-18 23:08:29 +00:00
{
#if !defined(MACOSX) && !defined(ANDROID) && !defined(IOS)
// #i98766# - disable smooth scrolling for Mac
const sal_uLong nColCnt = mpOut->GetColorCount();
2000-09-18 23:08:29 +00:00
long lMult = 1, lMax = LONG_MAX;
if ( nColCnt == 65536 )
{
lMax = 7000;
lMult = 2;
}
if ( nColCnt == 16777216 )
{
lMax = 5000;
lMult = 6;
}
else if ( nColCnt == 1 )
{
lMax = 3000;
lMult = 12;
}
// #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());
const bool bSmoothScrollAllowed(bOnlyYScroll && mbEnableSmooth && GetViewOptions()->IsSmoothScroll() && bAllowedWithChildWindows);
if(bSmoothScrollAllowed)
2000-09-18 23:08:29 +00:00
{
Imp()->bStopSmooth = sal_False;
2000-09-18 23:08:29 +00:00
const SwRect aOldVis( VisArea() );
//create virtual device and set.
2000-09-18 23:08:29 +00:00
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( maVisArea.Width()+2*aPixSz.Width(), Abs(lYDiff)+(2*aPixSz.Height()) );
2000-09-18 23:08:29 +00:00
if ( pRect )
aSize.Width() = Min(aSize.Width(), pRect->GetWidth()+2*aPixSz.Width());
if ( pVout->SetOutputSize( aSize ) )
{
mnLockPaint++;
2000-09-18 23:08:29 +00:00
//First Paint everything in the virtual device.
2000-09-18 23:08:29 +00:00
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()));
maVisArea = aRect;
2000-09-18 23:08:29 +00:00
const Point aPt( -aRect.Left(), -aRect.Top() );
aMapMode.SetOrigin( aPt );
pVout->SetMapMode( aMapMode );
OutputDevice *pOld = mpOut;
mpOut = 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 mpWin during DLPrePaint2 to get paint preparation for mpOut, but set it again
// immediately afterwards. There are many decisions in SW which imply that Printing
// is used when mpWin == 0 (wrong but widely used).
Window* pOldWin = mpWin;
mpWin = 0;
DLPrePaint2(Region(aRect.SVRect()));
mpWin = pOldWin;
// SW paint stuff
PaintDesktop( aRect );
ViewShell::mbLstAct = sal_True;
GetLayout()->Paint( aRect );
ViewShell::mbLstAct = sal_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);
}
mpOut = pOld;
maVisArea = aOldVis;
2000-09-18 23:08:29 +00:00
//Now shift in parts and copy the new Pixel from the virtual device.
// ??????????????????????
// or is it better to get the scrollfactor from the User
// as option?
// ??????????????????????
2000-09-18 23:08:29 +00:00
long lMaDelta = aPixSz.Height();
if ( Abs(lYDiff) > ( maVisArea.Height() / 3 ) )
2000-09-18 23:08:29 +00:00
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();
maVisArea.Pos().Y() -= lScroll;
maVisArea.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 = sal_True;
2000-09-18 23:08:29 +00:00
GetWin()->Update();
Imp()->bSmoothUpdate = sal_False;
2000-09-18 23:08:29 +00:00
if(!Imp()->bStopSmooth)
2000-09-18 23:08:29 +00:00
{
// 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);
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);
2000-09-18 23:08:29 +00:00
}
else
--mnLockPaint;
2000-09-18 23:08:29 +00:00
}
}
delete pVout;
GetWin()->Update();
if ( !Imp()->bStopSmooth )
--mnLockPaint;
2000-09-18 23:08:29 +00:00
SetFirstVisPageInvalid();
return sal_True;
2000-09-18 23:08:29 +00:00
}
delete pVout;
}
#endif
maVisArea.Pos().X() -= lXDiff;
maVisArea.Pos().Y() -= lYDiff;
2000-09-18 23:08:29 +00:00
if ( pRect )
GetWin()->Scroll( lXDiff, lYDiff, *pRect, SCROLL_CHILDREN);
2000-09-18 23:08:29 +00:00
else
GetWin()->Scroll( lXDiff, lYDiff, SCROLL_CHILDREN);
return sal_False;
2000-09-18 23:08:29 +00:00
}
2000-09-18 23:08:29 +00:00
void ViewShell::PaintDesktop( const SwRect &rRect )
{
if ( !GetWin() && !GetOut()->GetConnectMetaFile() )
return; //for the printer we don't do anything here.
//Catch exceptions, so that it doesn't look so surprising.
//Can e.g. happen during Idle.
//Unfortunately we must at any rate Paint the rectangles next to the pages,
//as these are left open at VisPortChgd.
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;
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.clear();
2000-09-18 23:08:29 +00:00
if ( aLeft.HasArea() )
aRegion.push_back( aLeft );
2000-09-18 23:08:29 +00:00
if ( aRight.HasArea() )
aRegion.push_back( aRight );
2000-09-18 23:08:29 +00:00
}
else
{
const SwFrm *pPage = Imp()->GetFirstVisPage();
const SwTwips nBottom = rRect.Bottom();
while ( pPage && !aRegion.empty() &&
(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();
}
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.empty() )
2000-09-18 23:08:29 +00:00
_PaintDesktop( aRegion );
}
// PaintDesktop is split in two, this part is also used by PreViewPage
2000-09-18 23:08:29 +00:00
void ViewShell::_PaintDesktop( const SwRegionRects &rRegion )
{
// OD 2004-04-23 #116347#
GetOut()->Push( PUSH_FILLCOLOR|PUSH_LINECOLOR );
GetOut()->SetLineColor();
for ( sal_uInt16 i = 0; i < rRegion.size(); ++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();
}
sal_Bool ViewShell::CheckInvalidForPaint( const SwRect &rRect )
2000-09-18 23:08:29 +00:00
{
if ( !GetWin() )
return sal_False;
2000-09-18 23:08:29 +00:00
const SwPageFrm *pPage = Imp()->GetFirstVisPage();
const SwTwips nBottom = VisArea().Bottom();
const SwTwips nRight = VisArea().Right();
sal_Bool bRet = sal_False;
2000-09-18 23:08:29 +00:00
while ( !bRet && pPage && !((pPage->Frm().Top() > nBottom) ||
(pPage->Frm().Left() > nRight)))
{
if ( pPage->IsInvalid() || pPage->IsInvalidFly() )
bRet = sal_True;
2000-09-18 23:08:29 +00:00
pPage = (SwPageFrm*)pPage->GetNext();
}
if ( bRet )
{
//Unfortunately Start/EndAction won't help here, as the Paint originated
//from GUI and so Clipping has been set against getting through.
//Ergo: do it all yourself (see ImplEndAction())
2000-09-18 23:08:29 +00:00
if ( Imp()->GetRegion() && Imp()->GetRegion()->GetOrigin() != VisArea())
Imp()->DelRegion();
2000-09-18 23:08:29 +00:00
SwLayAction aAction( GetLayout(), Imp() );
aAction.SetComplete( sal_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.
++mnStartAction;
2000-09-18 23:08:29 +00:00
aAction.Action();
--mnStartAction;
2000-09-18 23:08:29 +00:00
SwRegionRects *pRegion = Imp()->GetRegion();
if ( pRegion && aAction.IsBrowseActionStop() )
{
//only of interest when something has changed in the visible range
sal_Bool bStop = sal_True;
for ( sal_uInt16 i = 0; i < pRegion->size(); ++i )
2000-09-18 23:08:29 +00:00
{
const SwRect &rTmp = (*pRegion)[i];
if ( sal_False == (bStop = rTmp.IsOver( VisArea() )) )
2000-09-18 23:08:29 +00:00
break;
}
if ( bStop )
{
Imp()->DelRegion();
2000-09-18 23:08:29 +00:00
pRegion = 0;
}
}
if ( pRegion )
{
//First Invert then Compress, never the other way round!
2000-09-18 23:08:29 +00:00
pRegion->Invert();
pRegion->Compress();
bRet = sal_False;
if ( !pRegion->empty() )
2000-09-18 23:08:29 +00:00
{
SwRegionRects aRegion( rRect );
for ( sal_uInt16 i = 0; i < pRegion->size(); ++i )
2000-09-18 23:08:29 +00:00
{ const SwRect &rTmp = (*pRegion)[i];
if ( !rRect.IsInside( rTmp ) )
{
InvalidateWindows( rTmp );
if ( rTmp.IsOver( VisArea() ) )
{ aRegion -= rTmp;
bRet = sal_True;
2000-09-18 23:08:29 +00:00
}
}
}
if ( bRet )
{
for ( sal_uInt16 i = 0; i < aRegion.size(); ++i )
2000-09-18 23:08:29 +00:00
GetWin()->Invalidate( aRegion[i].SVRect() );
if ( rRect != VisArea() )
{
//rRect == VisArea is the special case for new or
//Shift-Ctrl-R, when it shouldn't be necessary to
//hold the rRect again in Document coordinates.
if ( maInvalidRect.IsEmpty() )
maInvalidRect = rRect;
2000-09-18 23:08:29 +00:00
else
maInvalidRect.Union( rRect );
2000-09-18 23:08:29 +00:00
}
}
}
else
bRet = sal_False;
Imp()->DelRegion();
2000-09-18 23:08:29 +00:00
}
else
bRet = sal_False;
2000-09-18 23:08:29 +00:00
}
return bRet;
}
2000-09-18 23:08:29 +00:00
void ViewShell::Paint(const Rectangle &rRect)
{
if ( mnLockPaint )
2000-09-18 23:08:29 +00:00
{
if ( Imp()->bSmoothUpdate )
{
SwRect aTmp( rRect );
if ( !Imp()->aSmoothRect.IsInside( aTmp ) )
Imp()->bStopSmooth = sal_True;
2000-09-18 23:08:29 +00:00
else
{
Imp()->aSmoothRect = aTmp;
return;
}
}
else
return;
}
if ( SwRootFrm::IsInPaint() )
{
//During the publication of a page at printing the Paint is buffered.
2000-09-18 23:08:29 +00:00
SwPaintQueue::Add( this, SwRect( rRect ) );
return;
}
//With !nStartAction I try to protect me against erroneous code at other places.
//Hopefully it will not lead to problems!?
if ( mbPaintWorks && !mnStartAction )
2000-09-18 23:08:29 +00:00
{
if( GetWin() && GetWin()->IsVisible() )
{
SwRect aRect( rRect );
if ( mbPaintInProgress ) //Guard against double Paints!
2000-09-18 23:08:29 +00:00
{
GetWin()->Invalidate( rRect );
return;
}
mbPaintInProgress = sal_True;
2000-09-18 23:08:29 +00:00
SET_CURR_SHELL( this );
SwRootFrm::SetNoVirDev( sal_True );
2000-09-18 23:08:29 +00:00
//We don't want to Clip to and fro, we trust that all are limited
//to the rectangle and only need to calculate the clipping once.
//The ClipRect is removed here once and not recovered, as externally
//no one needs it anymore anyway.
//Not when we paint a Metafile.
2000-09-18 23:08:29 +00:00
if( !GetOut()->GetConnectMetaFile() && GetOut()->IsClipRegion())
GetOut()->SetClipRegion();
if ( IsPreView() )
{
//When useful, process or destroy the old InvalidRect.
if ( aRect.IsInside( maInvalidRect ) )
2000-09-18 23:08:29 +00:00
ResetInvalidRect();
ViewShell::mbLstAct = sal_True;
2000-09-18 23:08:29 +00:00
GetLayout()->Paint( aRect );
ViewShell::mbLstAct = sal_False;
2000-09-18 23:08:29 +00:00
}
else
{
//When one of the visible pages still has anything entered for
//Repaint, Repaint must be triggered.
2000-09-18 23:08:29 +00:00
if ( !CheckInvalidForPaint( aRect ) )
{
// --> OD 2009-08-12 #i101192#
// start Pre/PostPaint encapsulation to avoid screen blinking
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
const Region aRepaintRegion(aRect.SVRect());
DLPrePaint2(aRepaintRegion);
2010-10-01 21:57:36 +02:00
// <--
2000-09-18 23:08:29 +00:00
PaintDesktop( aRect );
2010-10-01 21:57:36 +02:00
//When useful, process or destroy the old InvalidRect.
if ( aRect.IsInside( maInvalidRect ) )
2000-09-18 23:08:29 +00:00
ResetInvalidRect();
ViewShell::mbLstAct = sal_True;
2000-09-18 23:08:29 +00:00
GetLayout()->Paint( aRect );
ViewShell::mbLstAct = sal_False;
// --> OD 2009-08-12 #i101192#
// end Pre/PostPaint encapsulation
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
DLPostPaint2(true);
// <--
2010-10-01 21:57:36 +02:00
}
2000-09-18 23:08:29 +00:00
}
SwRootFrm::SetNoVirDev( sal_False );
mbPaintInProgress = sal_False;
2000-09-18 23:08:29 +00:00
UISizeNotify();
}
}
else
{
if ( maInvalidRect.IsEmpty() )
maInvalidRect = SwRect( rRect );
2000-09-18 23:08:29 +00:00
else
maInvalidRect.Union( SwRect( rRect ) );
2000-09-18 23:08:29 +00:00
if ( mbInEndAction && GetWin() )
2000-09-18 23:08:29 +00:00
{
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);
mpOut->Push( PUSH_FILLCOLOR|PUSH_LINECOLOR );
mpOut->SetFillColor( Imp()->GetRetoucheColor() );
mpOut->SetLineColor();
mpOut->DrawRect( rRect );
mpOut->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
}
}
}
2000-09-18 23:08:29 +00:00
void ViewShell::SetBrowseBorder( const Size& rNew )
{
if( rNew != maBrowseBorder )
2000-09-18 23:08:29 +00:00
{
maBrowseBorder = rNew;
if ( maVisArea.HasArea() )
CheckBrowseView( sal_False );
2000-09-18 23:08:29 +00:00
}
}
const Size& ViewShell::GetBrowseBorder() const
{
return maBrowseBorder;
}
sal_Int32 ViewShell::GetBrowseWidth() const
{
const SwPostItMgr* pPostItMgr = GetPostItMgr();
if ( pPostItMgr && pPostItMgr->HasNotes() && pPostItMgr->ShowNotes() )
{
Size aBorder( maBrowseBorder );
aBorder.Width() += maBrowseBorder.Width();
aBorder.Width() += pPostItMgr->GetSidebarWidth(true) + pPostItMgr->GetSidebarBorderWidth(true);
return maVisArea.Width() - GetOut()->PixelToLogic(aBorder).Width();
}
else
return maVisArea.Width() - 2 * GetOut()->PixelToLogic(maBrowseBorder).Width();
}
void ViewShell::CheckBrowseView( sal_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 );
OSL_ENSURE( GetLayout(), "Layout not ready" );
2000-09-18 23:08:29 +00:00
// When the Layout doesn't have a height yet, nothing is formatted.
// That leads to problems with Invalidate, e.g. when setting up an new View
// the content is inserted and formatted (regardless of empty VisArea).
// Therefore the pages must be roused for formatting.
2000-09-18 23:08:29 +00:00
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 );
// When the size ratios in browse mode change,
// the Position and PrtArea of the Cntnt and Tab frames must be Invalidated.
sal_uInt8 nInv = INV_PRTAREA | INV_TABLE | INV_POS;
// In case of browse mode change the CntntFrms need a size-Invalidate
// because of printer/screen formatting
2000-09-18 23:08:29 +00:00
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();
}
2000-09-18 23:08:29 +00:00
SwRootFrm *ViewShell::GetLayout() const
{
return mpLayout.get();
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 mpDoc->GetNodes();
2000-09-18 23:08:29 +00:00
}
void ViewShell::DrawSelChanged()
2000-09-18 23:08:29 +00:00
{
}
Size ViewShell::GetDocSize() const
{
Size aSz;
const SwRootFrm* pRoot = GetLayout();
if( pRoot )
aSz = pRoot->Frm().SSize();
2000-09-18 23:08:29 +00:00
return aSz;
}
SfxItemPool& ViewShell::GetAttrPool()
{
return GetDoc()->GetAttrPool();
}
2000-09-18 23:08:29 +00:00
void ViewShell::ApplyViewOptions( const SwViewOption &rOpt )
{
ViewShell *pSh = this;
do
{ pSh->StartAction();
pSh = (ViewShell*)pSh->GetNext();
} while ( pSh != this );
ImplApplyViewOptions( rOpt );
// 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 (*mpOpt == rOpt)
return;
2000-09-18 23:08:29 +00:00
Window *pMyWin = GetWin();
if( !pMyWin )
2000-09-18 23:08:29 +00:00
{
OSL_ENSURE( pMyWin, "ViewShell::ApplyViewOptions: no window" );
2000-09-18 23:08:29 +00:00
return;
}
SET_CURR_SHELL( this );
sal_Bool bReformat = sal_False;
2000-09-18 23:08:29 +00:00
if( mpOpt->IsShowHiddenField() != rOpt.IsShowHiddenField() )
2000-09-18 23:08:29 +00:00
{
((SwHiddenTxtFieldType*)mpDoc->GetSysFldType( RES_HIDDENTXTFLD ))->
SetHiddenFlag( !rOpt.IsShowHiddenField() );
bReformat = sal_True;
2000-09-18 23:08:29 +00:00
}
if ( mpOpt->IsShowHiddenPara() != rOpt.IsShowHiddenPara() )
2000-09-18 23:08:29 +00:00
{
SwHiddenParaFieldType* pFldType = (SwHiddenParaFieldType*)GetDoc()->
GetSysFldType(RES_HIDDENPARAFLD);
if( pFldType && pFldType->GetDepends() )
{
SwMsgPoolItem aHnt( RES_HIDDENPARA_PRINT );
pFldType->ModifyNotification( &aHnt, 0);
2000-09-18 23:08:29 +00:00
}
bReformat = sal_True;
2000-09-18 23:08:29 +00:00
}
if ( !bReformat && mpOpt->IsShowHiddenChar() != rOpt.IsShowHiddenChar() )
{
bReformat = GetDoc()->ContainsHiddenChars();
}
2000-09-18 23:08:29 +00:00
// bReformat becomes sal_True, if ...
// - fieldnames apply or not ...
// ( - SwEndPortion must _no_ longer be generated. )
// - Of course, the screen is something completely different than the printer ...
bReformat = bReformat || mpOpt->IsFldName() != rOpt.IsFldName();
2000-09-18 23:08:29 +00:00
// The map mode is changed, minima/maxima will be attended by UI
if( mpOpt->GetZoom() != rOpt.GetZoom() && !IsPreView() )
2000-09-18 23:08:29 +00:00
{
MapMode aMode( pMyWin->GetMapMode() );
2000-09-18 23:08:29 +00:00
Fraction aNewFactor( rOpt.GetZoom(), 100 );
aMode.SetScaleX( aNewFactor );
aMode.SetScaleY( aNewFactor );
pMyWin->SetMapMode( aMode );
// if not a reference device (printer) is used for formatting,
// but the screen, new formatting is needed for zoomfactor changes.
if( mpOpt->getBrowseMode() )
bReformat = sal_True;
2000-09-18 23:08:29 +00:00
}
bool bBrowseModeChanged = false;
if( mpOpt->getBrowseMode() != rOpt.getBrowseMode() )
{
bBrowseModeChanged = true;
bReformat = sal_True;
}
else if( mpOpt->getBrowseMode() && mpOpt->IsPrtFormat() != rOpt.IsPrtFormat() )
bReformat = sal_True;
2000-09-18 23:08:29 +00:00
if ( HasDrawView() || rOpt.IsGridVisible() )
{
if ( !HasDrawView() )
MakeDrawView();
SwDrawView *pDView = Imp()->GetDrawView();
if ( pDView->IsDragStripes() != rOpt.IsCrossHair() )
pDView->SetDragStripes( rOpt.IsCrossHair() );
if ( pDView->IsGridSnap() != rOpt.IsSnap() )
pDView->SetGridSnap( rOpt.IsSnap() );
if ( pDView->IsGridVisible() != rOpt.IsGridVisible() )
pDView->SetGridVisible( rOpt.IsGridVisible() );
const Size &rSz = rOpt.GetSnapSize();
pDView->SetGridCoarse( rSz );
const Size aFSize
( rSz.Width() ? rSz.Width() / (rOpt.GetDivisionX()+1) : 0,
rSz.Height()? rSz.Height()/ (rOpt.GetDivisionY()+1) : 0);
pDView->SetGridFine( aFSize );
Fraction aSnGrWdtX(rSz.Width(), rOpt.GetDivisionX() + 1);
Fraction aSnGrWdtY(rSz.Height(), rOpt.GetDivisionY() + 1);
pDView->SetSnapGridWidth( aSnGrWdtX, aSnGrWdtY );
// set handle size to 9 pixels, always
pDView->SetMarkHdlSizePixel(9);
2000-09-18 23:08:29 +00:00
}
bool bOnlineSpellChgd = mpOpt->IsOnlineSpell() != rOpt.IsOnlineSpell();
2000-09-18 23:08:29 +00:00
*mpOpt = rOpt; // First the options are taken.
mpOpt->SetUIOptions(rOpt);
2000-09-18 23:08:29 +00:00
mpDoc->set(IDocumentSettingAccess::HTML_MODE, 0 != ::GetHtmlMode(mpDoc->GetDocShell()));
2000-09-18 23:08:29 +00:00
if( bBrowseModeChanged )
{
// #i44963# Good occasion to check if page sizes in
// page descriptions are still set to (LONG_MAX, LONG_MAX) (html import)
mpDoc->CheckDefaultPageFmt();
CheckBrowseView( sal_True );
}
pMyWin->Invalidate();
2000-09-18 23:08:29 +00:00
if ( bReformat )
{
// Nothing helps, we need to send all CntntFrms a
// Prepare, we format anew:
2000-09-18 23:08:29 +00:00
StartAction();
Reformat();
EndAction();
}
if( bOnlineSpellChgd )
{
ViewShell *pSh = (ViewShell*)this->GetNext();
sal_Bool bOnlineSpl = rOpt.IsOnlineSpell();
2000-09-18 23:08:29 +00:00
while( pSh != this )
{ pSh->mpOpt->SetOnlineSpell( bOnlineSpl );
2000-09-18 23:08:29 +00:00
Window *pTmpWin = pSh->GetWin();
if( pTmpWin )
pTmpWin->Invalidate();
pSh = (ViewShell*)pSh->GetNext();
}
}
}
2000-09-18 23:08:29 +00:00
void ViewShell::SetUIOptions( const SwViewOption &rOpt )
{
mpOpt->SetUIOptions(rOpt);
2000-09-18 23:08:29 +00:00
//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())
mpOpt->SetStarOneSetting(sal_True);
2000-09-18 23:08:29 +00:00
mpOpt->SetSymbolFont(rOpt.GetSymbolFont());
2000-09-18 23:08:29 +00:00
}
void ViewShell::SetReadonlyOption(sal_Bool bSet)
2000-09-18 23:08:29 +00:00
{
//JP 01.02.99: at readonly flag query properly
// and if need be format; Bug 61335
// Are we switching from readonly to edit?
if( bSet != mpOpt->IsReadonly() )
2000-09-18 23:08:29 +00:00
{
// so that the flags can be queried properly.
mpOpt->SetReadonly( sal_False );
2000-09-18 23:08:29 +00:00
sal_Bool bReformat = mpOpt->IsFldName();
2000-09-18 23:08:29 +00:00
mpOpt->SetReadonly( bSet );
2000-09-18 23:08:29 +00:00
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
}
}
void ViewShell::SetPDFExportOption(sal_Bool bSet)
{
if( bSet != mpOpt->IsPDFExport() )
{
if( bSet && mpOpt->getBrowseMode() )
mpOpt->SetPrtFormat( sal_True );
mpOpt->SetPDFExport(bSet);
}
}
2000-09-18 23:08:29 +00:00
void ViewShell::SetReadonlySelectionOption(sal_Bool bSet)
{
if( bSet != mpOpt->IsSelectionInReadonly() )
{
mpOpt->SetSelectionInReadonly(bSet);
}
}
2000-09-18 23:08:29 +00:00
void ViewShell::SetPrtFormatOption( sal_Bool bSet )
2000-09-18 23:08:29 +00:00
{
mpOpt->SetPrtFormat( bSet );
2000-09-18 23:08:29 +00:00
}
2000-09-18 23:08:29 +00:00
void ViewShell::UISizeNotify()
{
if ( mbDocSizeChgd )
2000-09-18 23:08:29 +00:00
{
mbDocSizeChgd = sal_False;
bool bOld = bInSizeNotify;
bInSizeNotify = true;
::SizeNotify( this, GetDocSize() );
2000-09-18 23:08:29 +00:00
bInSizeNotify = bOld;
}
}
void ViewShell::SetRestoreActions(sal_uInt16 nSet)
2000-09-18 23:08:29 +00:00
{
OSL_ENSURE(!GetRestoreActions()||!nSet, "multiple restore of the Actions ?");
2000-09-18 23:08:29 +00:00
Imp()->SetRestoreActions(nSet);
}
sal_uInt16 ViewShell::GetRestoreActions() const
2000-09-18 23:08:29 +00:00
{
return Imp()->GetRestoreActions();
}
sal_Bool ViewShell::IsNewLayout() const
2000-09-18 23:08:29 +00:00
{
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.
OSL_ENSURE( mpLayout, "no layout, no access" );
OSL_ENSURE( GetWin(), "no window, no access" );
if( mpDoc->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
{
OSL_ENSURE( IsPreView(),
2002-05-22 10:48:43 +00:00
"Can't create accessible preview for non-preview ViewShell" );
// We require a layout and an XModel to be accessible.
OSL_ENSURE( mpLayout, "no layout, no access" );
OSL_ENSURE( GetWin(), "no window, no access" );
2002-05-22 10:48:43 +00:00
if ( IsPreView() && GetLayout()&& GetWin() )
{
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 #i27138#
*/
void ViewShell::InvalidateAccessibleParaFlowRelation( const SwTxtFrm* _pFromTxtFrm,
const SwTxtFrm* _pToTxtFrm )
{
if ( GetLayout() && GetLayout()->IsAnyShellAccessible() )
{
Imp()->_InvalidateAccessibleParaFlowRelation( _pFromTxtFrm, _pToTxtFrm );
}
}
/*
* invalidate text selection for paragraphs #i27301#
*/
void ViewShell::InvalidateAccessibleParaTextSelection()
{
if ( GetLayout() && GetLayout()->IsAnyShellAccessible() )
{
Imp()->_InvalidateAccessibleParaTextSelection();
}
}
/**
* invalidate attributes for paragraphs #i88069#
*/
void ViewShell::InvalidateAccessibleParaAttrs( const SwTxtFrm& rTxtFrm )
{
if ( GetLayout() && GetLayout()->IsAnyShellAccessible() )
{
Imp()->_InvalidateAccessibleParaAttrs( rTxtFrm );
}
}
SwAccessibleMap* ViewShell::GetAccessibleMap()
{
if ( Imp()->IsAccessible() )
{
return &(Imp()->GetAccessibleMap());
}
return 0;
}
void ViewShell::ApplyAccessiblityOptions(SvtAccessibilityOptions& rAccessibilityOptions)
{
if(mpOpt->IsPagePreview() && !rAccessibilityOptions.GetIsForPagePreviews())
{
mpAccOptions->SetAlwaysAutoColor(sal_False);
mpAccOptions->SetStopAnimatedGraphics(sal_False);
mpAccOptions->SetStopAnimatedText(sal_False);
}
else
{
mpAccOptions->SetAlwaysAutoColor(rAccessibilityOptions.GetIsAutomaticFontColor());
mpAccOptions->SetStopAnimatedGraphics(! rAccessibilityOptions.GetIsAllowAnimatedGraphics());
mpAccOptions->SetStopAnimatedText(! rAccessibilityOptions.GetIsAllowAnimatedText());
2011-02-05 17:11:34 -05:00
// Formular view
// Always set this option, not only if document is read-only:
mpOpt->SetSelectionInReadonly(rAccessibilityOptions.IsSelectionInReadonly());
}
}
ShellResource* ViewShell::GetShellRes()
{
return mpShellRes;
}
void ViewShell::SetCareWin( Window* pNew )
{
mpCareWindow = 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;
}
// #i12836# enhanced pdf export
sal_Int32 ViewShell::GetPageNumAndSetOffsetForPDF( OutputDevice& rOut, const SwRect& rRect ) const
{
OSL_ENSURE( GetLayout(), "GetPageNumAndSetOffsetForPDF assumes presence of layout" );
sal_Int32 nRet = -1;
// #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 )
{
OSL_ENSURE( 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;
Merge commit 'ooo/DEV300_m101' into integration/dev300_m101 Conflicts: starmath/inc/applicat.hxx starmath/inc/dialog.hxx starmath/inc/document.hxx starmath/inc/edit.hxx starmath/inc/format.hxx starmath/inc/node.hxx starmath/inc/parse.hxx starmath/inc/rect.hxx starmath/inc/smdll.hxx starmath/inc/smmod.hxx starmath/inc/starmath.hrc starmath/inc/symbol.hxx starmath/inc/toolbox.hxx starmath/inc/utility.hxx starmath/inc/view.hxx starmath/prj/build.lst starmath/qa/cppunit/version.map starmath/sdi/smslots.sdi starmath/source/accessibility.cxx starmath/source/cfgitem.cxx starmath/source/cfgitem.hxx starmath/source/config.cxx starmath/source/dialog.cxx starmath/source/document.cxx starmath/source/edit.cxx starmath/source/format.cxx starmath/source/makefile.mk starmath/source/math_pch.cxx starmath/source/mathmlexport.cxx starmath/source/mathmlimport.cxx starmath/source/mathtype.cxx starmath/source/node.cxx starmath/source/parse.cxx starmath/source/rect.cxx starmath/source/register.cxx starmath/source/smdetect.cxx starmath/source/smdll.cxx starmath/source/smmod.cxx starmath/source/smres.src starmath/source/symbol.cxx starmath/source/toolbox.cxx starmath/source/unomodel.cxx starmath/source/utility.cxx starmath/source/view.cxx sw/JunitTest_sw_unoapi.mk sw/Library_swd.mk sw/Makefile sw/inc/IDocumentFieldsAccess.hxx sw/inc/IDocumentSettingAccess.hxx sw/inc/IDocumentUndoRedo.hxx sw/inc/IShellCursorSupplier.hxx sw/inc/SwUndoField.hxx sw/inc/acmplwrd.hxx sw/inc/authfld.hxx sw/inc/bparr.hxx sw/inc/calbck.hxx sw/inc/calc.hxx sw/inc/ccoll.hxx sw/inc/cellatr.hxx sw/inc/cellfml.hxx sw/inc/chpfld.hxx sw/inc/cmdid.h sw/inc/crsrsh.hxx sw/inc/crstate.hxx sw/inc/dbfld.hxx sw/inc/dbmgr.hxx sw/inc/dcontact.hxx sw/inc/ddefld.hxx sw/inc/doc.hxx sw/inc/docary.hxx sw/inc/docsh.hxx sw/inc/docstat.hxx sw/inc/docstyle.hxx sw/inc/docufld.hxx sw/inc/editsh.hxx sw/inc/errhdl.hxx sw/inc/expfld.hxx sw/inc/fchrfmt.hxx sw/inc/fesh.hxx sw/inc/fldbas.hxx sw/inc/flddat.hxx sw/inc/flddropdown.hxx sw/inc/flypos.hxx sw/inc/fmtanchr.hxx sw/inc/fmtautofmt.hxx sw/inc/fmtclds.hxx sw/inc/fmtcnct.hxx sw/inc/fmtcol.hxx sw/inc/fmtfsize.hxx sw/inc/fmtftn.hxx sw/inc/fmtftntx.hxx sw/inc/fmthdft.hxx sw/inc/fmtinfmt.hxx sw/inc/fmtline.hxx sw/inc/fmtornt.hxx sw/inc/fmtpdsc.hxx sw/inc/fmtruby.hxx sw/inc/fmtsrnd.hxx sw/inc/fmturl.hxx sw/inc/fmtwrapinfluenceonobjpos.hxx sw/inc/format.hxx sw/inc/frmatr.hxx sw/inc/frmfmt.hxx sw/inc/grfatr.hxx sw/inc/helpid.h sw/inc/hintids.hxx sw/inc/hints.hxx sw/inc/htmltbl.hxx sw/inc/inetfld.hxx sw/inc/io.hxx sw/inc/iodetect.hxx sw/inc/itabenum.hxx sw/inc/ndarr.hxx sw/inc/ndgrf.hxx sw/inc/ndindex.hxx sw/inc/ndnotxt.hxx sw/inc/ndole.hxx sw/inc/ndtxt.hxx sw/inc/ndtyp.hxx sw/inc/node.hxx sw/inc/numrule.hxx sw/inc/pagedesc.hxx sw/inc/pagepreviewlayout.hxx sw/inc/pam.hxx sw/inc/paratr.hxx sw/inc/poolfmt.awk sw/inc/poolfmt.hxx sw/inc/printdata.hxx sw/inc/reffld.hxx sw/inc/shellio.hxx sw/inc/shellres.hxx sw/inc/swabstdlg.hxx sw/inc/swatrset.hxx sw/inc/swerror.h sw/inc/swprtopt.hxx sw/inc/swtable.hxx sw/inc/swtypes.hxx sw/inc/tblafmt.hxx sw/inc/tgrditem.hxx sw/inc/tox.hxx sw/inc/undobj.hxx sw/inc/unocoll.hxx sw/inc/unoframe.hxx sw/inc/unoprnms.hxx sw/inc/usrfld.hxx sw/inc/viewopt.hxx sw/inc/viewsh.hxx sw/inc/viscrs.hxx sw/prj/build.lst sw/qa/complex/accessibility/makefile.mk sw/qa/core/Test-BigPtrArray.cxx sw/qa/core/makefile.mk sw/sdi/makefile.mk sw/source/core/access/makefile.mk sw/source/core/access/textmarkuphelper.cxx sw/source/core/attr/calbck.cxx sw/source/core/attr/cellatr.cxx sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx sw/source/core/attr/format.cxx sw/source/core/attr/hints.cxx sw/source/core/bastyp/calc.cxx sw/source/core/bastyp/init.cxx sw/source/core/bastyp/makefile.mk sw/source/core/bastyp/swcache.cxx sw/source/core/crsr/bookmrk.cxx sw/source/core/crsr/callnk.cxx sw/source/core/crsr/crsrsh.cxx sw/source/core/crsr/crstrvl.cxx sw/source/core/crsr/findattr.cxx sw/source/core/crsr/findcoll.cxx sw/source/core/crsr/makefile.mk sw/source/core/crsr/pam.cxx sw/source/core/crsr/swcrsr.cxx sw/source/core/crsr/trvltbl.cxx sw/source/core/crsr/unocrsr.cxx sw/source/core/crsr/viscrs.cxx sw/source/core/doc/acmplwrd.cxx sw/source/core/doc/doc.cxx sw/source/core/doc/docbm.cxx sw/source/core/doc/doccomp.cxx sw/source/core/doc/docdesc.cxx sw/source/core/doc/docdraw.cxx sw/source/core/doc/docedt.cxx sw/source/core/doc/docfld.cxx sw/source/core/doc/docfly.cxx sw/source/core/doc/docfmt.cxx sw/source/core/doc/docftn.cxx sw/source/core/doc/docglbl.cxx sw/source/core/doc/docglos.cxx sw/source/core/doc/doclay.cxx sw/source/core/doc/docnew.cxx sw/source/core/doc/docnum.cxx sw/source/core/doc/docredln.cxx sw/source/core/doc/docruby.cxx sw/source/core/doc/docsort.cxx sw/source/core/doc/docstat.cxx sw/source/core/doc/doctxm.cxx sw/source/core/doc/fmtcol.cxx sw/source/core/doc/gctable.cxx sw/source/core/doc/htmltbl.cxx sw/source/core/doc/makefile.mk sw/source/core/doc/number.cxx sw/source/core/doc/poolfmt.cxx sw/source/core/doc/tblafmt.cxx sw/source/core/doc/tblcpy.cxx sw/source/core/doc/tblrwcl.cxx sw/source/core/docnode/makefile.mk sw/source/core/docnode/ndcopy.cxx sw/source/core/docnode/ndnum.cxx sw/source/core/docnode/ndsect.cxx sw/source/core/docnode/ndtbl.cxx sw/source/core/docnode/ndtbl1.cxx sw/source/core/docnode/node.cxx sw/source/core/docnode/node2lay.cxx sw/source/core/docnode/nodes.cxx sw/source/core/docnode/section.cxx sw/source/core/docnode/swbaslnk.cxx sw/source/core/draw/dcontact.cxx sw/source/core/draw/dflyobj.cxx sw/source/core/draw/drawdoc.cxx sw/source/core/draw/dview.cxx sw/source/core/draw/makefile.mk sw/source/core/edit/autofmt.cxx sw/source/core/edit/edattr.cxx sw/source/core/edit/eddel.cxx sw/source/core/edit/edfcol.cxx sw/source/core/edit/edfld.cxx sw/source/core/edit/edfldexp.cxx sw/source/core/edit/edfmt.cxx sw/source/core/edit/edglss.cxx sw/source/core/edit/editsh.cxx sw/source/core/edit/edlingu.cxx sw/source/core/edit/ednumber.cxx sw/source/core/edit/edsect.cxx sw/source/core/edit/edtab.cxx sw/source/core/edit/edtox.cxx sw/source/core/edit/edundo.cxx sw/source/core/edit/makefile.mk sw/source/core/except/dbgloop.cxx sw/source/core/except/errhdl.cxx sw/source/core/fields/authfld.cxx sw/source/core/fields/cellfml.cxx sw/source/core/fields/chpfld.cxx sw/source/core/fields/dbfld.cxx sw/source/core/fields/ddefld.cxx sw/source/core/fields/ddetbl.cxx sw/source/core/fields/docufld.cxx sw/source/core/fields/expfld.cxx sw/source/core/fields/fldbas.cxx sw/source/core/fields/flddat.cxx sw/source/core/fields/flddropdown.cxx sw/source/core/fields/macrofld.cxx sw/source/core/fields/makefile.mk sw/source/core/fields/reffld.cxx sw/source/core/fields/scrptfld.cxx sw/source/core/fields/tblcalc.cxx sw/source/core/fields/usrfld.cxx sw/source/core/frmedt/fecopy.cxx sw/source/core/frmedt/fedesc.cxx sw/source/core/frmedt/fefly1.cxx sw/source/core/frmedt/feshview.cxx sw/source/core/frmedt/fetab.cxx sw/source/core/frmedt/fews.cxx sw/source/core/frmedt/makefile.mk sw/source/core/frmedt/tblsel.cxx sw/source/core/graphic/grfatr.cxx sw/source/core/inc/SwUndoFmt.hxx sw/source/core/inc/SwUndoTOXChange.hxx sw/source/core/inc/anchoredobjectposition.hxx sw/source/core/inc/dbgloop.hxx sw/source/core/inc/drawfont.hxx sw/source/core/inc/flowfrm.hxx sw/source/core/inc/frame.hxx sw/source/core/inc/frmtool.hxx sw/source/core/inc/layact.hxx sw/source/core/inc/layfrm.hxx sw/source/core/inc/notxtfrm.hxx sw/source/core/inc/rolbck.hxx sw/source/core/inc/rootfrm.hxx sw/source/core/inc/scriptinfo.hxx sw/source/core/inc/swblocks.hxx sw/source/core/inc/swcache.hxx sw/source/core/inc/tabfrm.hxx sw/source/core/inc/txmsrt.hxx sw/source/core/inc/undoflystrattr.hxx sw/source/core/inc/viewimp.hxx sw/source/core/layout/atrfrm.cxx sw/source/core/layout/calcmove.cxx sw/source/core/layout/dbg_lay.cxx sw/source/core/layout/findfrm.cxx sw/source/core/layout/flowfrm.cxx sw/source/core/layout/fly.cxx sw/source/core/layout/flycnt.cxx sw/source/core/layout/flyincnt.cxx sw/source/core/layout/flylay.cxx sw/source/core/layout/frmtool.cxx sw/source/core/layout/ftnfrm.cxx sw/source/core/layout/layact.cxx sw/source/core/layout/laycache.cxx sw/source/core/layout/makefile.mk sw/source/core/layout/objectformatter.cxx sw/source/core/layout/pagechg.cxx sw/source/core/layout/pagedesc.cxx sw/source/core/layout/paintfrm.cxx sw/source/core/layout/sectfrm.cxx sw/source/core/layout/tabfrm.cxx sw/source/core/layout/trvlfrm.cxx sw/source/core/layout/unusedf.cxx sw/source/core/layout/wsfrm.cxx sw/source/core/makefile.mk sw/source/core/objectpositioning/anchoredobjectposition.cxx sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx sw/source/core/objectpositioning/makefile.mk sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx sw/source/core/ole/ndole.cxx sw/source/core/para/makefile.mk sw/source/core/para/paratr.cxx sw/source/core/sw3io/makefile.mk sw/source/core/sw3io/sw3convert.cxx sw/source/core/swg/SwXMLTextBlocks.cxx sw/source/core/swg/makefile.mk sw/source/core/swg/swblocks.cxx sw/source/core/table/swnewtable.cxx sw/source/core/table/swtable.cxx sw/source/core/text/EnhancedPDFExportHelper.cxx sw/source/core/text/atrstck.cxx sw/source/core/text/frmcrsr.cxx sw/source/core/text/frmform.cxx sw/source/core/text/itrcrsr.cxx sw/source/core/text/itrform2.cxx sw/source/core/text/makefile.mk sw/source/core/text/porlay.cxx sw/source/core/text/pormulti.cxx sw/source/core/text/txtfld.cxx sw/source/core/text/txtfrm.cxx sw/source/core/text/txtio.cxx sw/source/core/tox/makefile.mk sw/source/core/tox/txmsrt.cxx sw/source/core/txtnode/fmtatr2.cxx sw/source/core/txtnode/fntcache.cxx sw/source/core/txtnode/fntcap.cxx sw/source/core/txtnode/makefile.mk sw/source/core/txtnode/ndhints.cxx sw/source/core/txtnode/ndtxt.cxx sw/source/core/txtnode/swfont.cxx sw/source/core/txtnode/thints.cxx sw/source/core/txtnode/txtatr2.cxx sw/source/core/txtnode/txtedt.cxx sw/source/core/undo/SwUndoField.cxx sw/source/core/undo/SwUndoPageDesc.cxx sw/source/core/undo/SwUndoTOXChange.cxx sw/source/core/undo/docundo.cxx sw/source/core/undo/makefile.mk sw/source/core/undo/rolbck.cxx sw/source/core/undo/unbkmk.cxx sw/source/core/undo/undel.cxx sw/source/core/undo/undobj.cxx sw/source/core/undo/undobj1.cxx sw/source/core/undo/unfmco.cxx sw/source/core/undo/unins.cxx sw/source/core/undo/unnum.cxx sw/source/core/undo/unoutl.cxx sw/source/core/undo/unredln.cxx sw/source/core/undo/unsect.cxx sw/source/core/undo/unsort.cxx sw/source/core/undo/unspnd.cxx sw/source/core/undo/untbl.cxx sw/source/core/unocore/makefile.mk sw/source/core/unocore/swunohelper.cxx sw/source/core/unocore/unobkm.cxx sw/source/core/unocore/unocoll.cxx sw/source/core/unocore/unocrsrhelper.cxx sw/source/core/unocore/unodraw.cxx sw/source/core/unocore/unofield.cxx sw/source/core/unocore/unoframe.cxx sw/source/core/unocore/unomap.cxx sw/source/core/unocore/unoprnms.cxx sw/source/core/unocore/unoredlines.cxx sw/source/core/unocore/unosett.cxx sw/source/core/unocore/unosrch.cxx sw/source/core/unocore/unostyle.cxx sw/source/core/unocore/unotbl.cxx sw/source/core/view/vdraw.cxx sw/source/core/view/viewimp.cxx sw/source/core/view/viewpg.cxx sw/source/core/view/viewsh.cxx sw/source/core/view/vnew.cxx sw/source/core/view/vprint.cxx sw/source/filter/ascii/ascatr.cxx sw/source/filter/ascii/makefile.mk sw/source/filter/ascii/wrtasc.cxx sw/source/filter/basflt/fltini.cxx sw/source/filter/basflt/iodetect.cxx sw/source/filter/basflt/makefile.mk sw/source/filter/html/SwAppletImpl.cxx sw/source/filter/html/css1atr.cxx sw/source/filter/html/htmlatr.cxx sw/source/filter/html/htmlbas.cxx sw/source/filter/html/htmlcss1.cxx sw/source/filter/html/htmlfly.cxx sw/source/filter/html/htmlftn.cxx sw/source/filter/html/htmlgrin.cxx sw/source/filter/html/htmlnum.cxx sw/source/filter/html/htmlplug.cxx sw/source/filter/html/htmltab.cxx sw/source/filter/html/makefile.mk sw/source/filter/html/parcss1.cxx sw/source/filter/html/svxcss1.cxx sw/source/filter/html/swhtml.cxx sw/source/filter/inc/msfilter.hxx sw/source/filter/inc/wrtswtbl.hxx sw/source/filter/rtf/makefile.mk sw/source/filter/rtf/rtffly.cxx sw/source/filter/rtf/rtfnum.cxx sw/source/filter/rtf/rtftbl.cxx sw/source/filter/rtf/swparrtf.cxx sw/source/filter/rtf/swparrtf.hxx sw/source/filter/writer/makefile.mk sw/source/filter/writer/writer.cxx sw/source/filter/writer/wrt_fn.cxx sw/source/filter/writer/wrtswtbl.cxx sw/source/filter/ww1/fltshell.cxx sw/source/filter/ww1/makefile.mk sw/source/filter/ww1/w1class.cxx sw/source/filter/ww1/w1class.hxx sw/source/filter/ww1/w1filter.cxx sw/source/filter/ww1/w1par.cxx sw/source/filter/ww1/w1sprm.cxx sw/source/filter/ww1/w1struct.hxx sw/source/filter/ww8/README-rtf.txt sw/source/filter/ww8/attributeoutputbase.hxx sw/source/filter/ww8/docxattributeoutput.cxx sw/source/filter/ww8/docxattributeoutput.hxx sw/source/filter/ww8/docxexport.cxx sw/source/filter/ww8/docxexport.hxx sw/source/filter/ww8/docxexportfilter.cxx sw/source/filter/ww8/dump/dump8.cxx sw/source/filter/ww8/dump/dump8a.cxx sw/source/filter/ww8/dump/msvbasic.cxx sw/source/filter/ww8/dump/msvbasic.hxx sw/source/filter/ww8/dump/ww8darr.cxx sw/source/filter/ww8/dump/ww8darr.hxx sw/source/filter/ww8/dump/ww8dout.cxx sw/source/filter/ww8/dump/ww8dout.hxx sw/source/filter/ww8/dump/ww8scan.cxx sw/source/filter/ww8/dump/ww8scan.hxx sw/source/filter/ww8/dump/ww8struc.hxx sw/source/filter/ww8/makefile.mk sw/source/filter/ww8/rtfattributeoutput.cxx sw/source/filter/ww8/rtfattributeoutput.hxx sw/source/filter/ww8/rtfexport.cxx sw/source/filter/ww8/rtfexport.hxx sw/source/filter/ww8/rtfexportfilter.cxx sw/source/filter/ww8/rtfexportfilter.hxx sw/source/filter/ww8/rtfimportfilter.cxx sw/source/filter/ww8/rtfimportfilter.hxx sw/source/filter/ww8/rtfsdrexport.cxx sw/source/filter/ww8/rtfsdrexport.hxx sw/source/filter/ww8/writerhelper.cxx sw/source/filter/ww8/writerwordglue.cxx sw/source/filter/ww8/wrtw8esh.cxx sw/source/filter/ww8/wrtw8nds.cxx sw/source/filter/ww8/wrtw8num.cxx sw/source/filter/ww8/wrtw8sty.cxx sw/source/filter/ww8/wrtww8.cxx sw/source/filter/ww8/wrtww8.hxx sw/source/filter/ww8/wrtww8gr.cxx sw/source/filter/ww8/ww8atr.cxx sw/source/filter/ww8/ww8attributeoutput.hxx sw/source/filter/ww8/ww8graf.cxx sw/source/filter/ww8/ww8graf.hxx sw/source/filter/ww8/ww8graf2.cxx sw/source/filter/ww8/ww8par.cxx sw/source/filter/ww8/ww8par.hxx sw/source/filter/ww8/ww8par2.cxx sw/source/filter/ww8/ww8par3.cxx sw/source/filter/ww8/ww8par5.cxx sw/source/filter/ww8/ww8par6.cxx sw/source/filter/ww8/ww8scan.cxx sw/source/filter/ww8/ww8scan.hxx sw/source/filter/ww8/ww8struc.hxx sw/source/filter/xml/makefile.mk sw/source/filter/xml/xmlimpit.cxx sw/source/filter/xml/xmltble.cxx sw/source/filter/xml/xmltbli.cxx sw/source/ui/app/appenv.cxx sw/source/ui/app/apphdl.cxx sw/source/ui/app/applab.cxx sw/source/ui/app/appopt.cxx sw/source/ui/app/docsh.cxx sw/source/ui/app/docsh2.cxx sw/source/ui/app/docshini.cxx sw/source/ui/app/docst.cxx sw/source/ui/app/docstyle.cxx sw/source/ui/app/makefile.mk sw/source/ui/app/mn.src sw/source/ui/app/swmodul1.cxx sw/source/ui/cctrl/makefile.mk sw/source/ui/cctrl/swlbox.cxx sw/source/ui/chrdlg/break.cxx sw/source/ui/chrdlg/ccoll.cxx sw/source/ui/chrdlg/chardlg.cxx sw/source/ui/chrdlg/drpcps.cxx sw/source/ui/chrdlg/makefile.mk sw/source/ui/chrdlg/numpara.cxx sw/source/ui/chrdlg/pardlg.cxx sw/source/ui/chrdlg/swuiccoll.cxx sw/source/ui/config/barcfg.cxx sw/source/ui/config/caption.cxx sw/source/ui/config/cfgitems.cxx sw/source/ui/config/fontcfg.cxx sw/source/ui/config/mailconfigpage.cxx sw/source/ui/config/makefile.mk sw/source/ui/config/modcfg.cxx sw/source/ui/config/optcomp.cxx sw/source/ui/config/optload.cxx sw/source/ui/config/optpage.cxx sw/source/ui/config/prtopt.cxx sw/source/ui/config/uinums.cxx sw/source/ui/config/usrpref.cxx sw/source/ui/config/viewopt.cxx sw/source/ui/dbui/dbinsdlg.cxx sw/source/ui/dbui/dbmgr.cxx sw/source/ui/dbui/dbtree.cxx sw/source/ui/dbui/makefile.mk sw/source/ui/dbui/mmaddressblockpage.cxx sw/source/ui/dbui/mmdocselectpage.cxx sw/source/ui/dbui/mmoutputpage.cxx sw/source/ui/dbui/swdbtoolsclient.cxx sw/source/ui/dialog/abstract.cxx sw/source/ui/dialog/ascfldlg.cxx sw/source/ui/dialog/macassgn.cxx sw/source/ui/dialog/makefile.mk sw/source/ui/dialog/regionsw.cxx sw/source/ui/dialog/swdlgfact.cxx sw/source/ui/dialog/swdlgfact.hxx sw/source/ui/dialog/uiregionsw.cxx sw/source/ui/dochdl/gloshdl.cxx sw/source/ui/dochdl/makefile.mk sw/source/ui/dochdl/swdtflvr.cxx sw/source/ui/docvw/PostItMgr.cxx sw/source/ui/docvw/SidebarWin.cxx sw/source/ui/docvw/edtdd.cxx sw/source/ui/docvw/edtwin.cxx sw/source/ui/docvw/edtwin2.cxx sw/source/ui/docvw/edtwin3.cxx sw/source/ui/docvw/makefile.mk sw/source/ui/docvw/romenu.cxx sw/source/ui/docvw/romenu.hxx sw/source/ui/docvw/srcedtw.cxx sw/source/ui/envelp/envfmt.cxx sw/source/ui/envelp/envimg.cxx sw/source/ui/envelp/envlop1.cxx sw/source/ui/envelp/envprt.cxx sw/source/ui/envelp/label1.cxx sw/source/ui/envelp/labfmt.cxx sw/source/ui/envelp/labprt.cxx sw/source/ui/envelp/mailmrge.cxx sw/source/ui/envelp/makefile.mk sw/source/ui/fldui/flddb.cxx sw/source/ui/fldui/flddinf.cxx sw/source/ui/fldui/flddok.cxx sw/source/ui/fldui/fldedt.cxx sw/source/ui/fldui/fldfunc.cxx sw/source/ui/fldui/fldmgr.cxx sw/source/ui/fldui/fldpage.cxx sw/source/ui/fldui/fldref.cxx sw/source/ui/fldui/fldtdlg.cxx sw/source/ui/fldui/fldvar.cxx sw/source/ui/fldui/fldwrap.cxx sw/source/ui/fldui/inpdlg.cxx sw/source/ui/fldui/makefile.mk sw/source/ui/fmtui/makefile.mk sw/source/ui/fmtui/tmpdlg.cxx sw/source/ui/frmdlg/colmgr.cxx sw/source/ui/frmdlg/column.cxx sw/source/ui/frmdlg/cption.cxx sw/source/ui/frmdlg/frmdlg.cxx sw/source/ui/frmdlg/frmmgr.cxx sw/source/ui/frmdlg/frmpage.cxx sw/source/ui/frmdlg/makefile.mk sw/source/ui/frmdlg/wrap.cxx sw/source/ui/globdoc/makefile.mk sw/source/ui/inc/bmpwin.hxx sw/source/ui/inc/colmgr.hxx sw/source/ui/inc/column.hxx sw/source/ui/inc/envimg.hxx sw/source/ui/inc/envlop.hxx sw/source/ui/inc/frmpage.hxx sw/source/ui/inc/inputwin.hxx sw/source/ui/inc/javaedit.hxx sw/source/ui/inc/num.hxx sw/source/ui/inc/optpage.hxx sw/source/ui/inc/regionsw.hxx sw/source/ui/inc/split.hxx sw/source/ui/inc/swlbox.hxx sw/source/ui/inc/swmn_tmpl.hrc sw/source/ui/inc/swuiidxmrk.hxx sw/source/ui/inc/tabsh.hxx sw/source/ui/inc/toxmgr.hxx sw/source/ui/inc/uiitems.hxx sw/source/ui/inc/view.hxx sw/source/ui/inc/workctrl.hxx sw/source/ui/inc/wrap.hxx sw/source/ui/inc/wrtsh.hxx sw/source/ui/index/cnttab.cxx sw/source/ui/index/makefile.mk sw/source/ui/index/toxmgr.cxx sw/source/ui/lingu/hhcwrp.cxx sw/source/ui/lingu/makefile.mk sw/source/ui/lingu/olmenu.cxx sw/source/ui/misc/bookmark.cxx sw/source/ui/misc/docfnote.cxx sw/source/ui/misc/glosbib.cxx sw/source/ui/misc/glosdoc.cxx sw/source/ui/misc/glshell.cxx sw/source/ui/misc/insfnote.cxx sw/source/ui/misc/linenum.cxx sw/source/ui/misc/makefile.mk sw/source/ui/misc/num.cxx sw/source/ui/misc/numberingtypelistbox.cxx sw/source/ui/misc/outline.cxx sw/source/ui/misc/pgfnote.cxx sw/source/ui/misc/pggrid.cxx sw/source/ui/misc/redlndlg.cxx sw/source/ui/misc/srtdlg.cxx sw/source/ui/misc/swmodalredlineacceptdlg.cxx sw/source/ui/ribbar/conarc.cxx sw/source/ui/ribbar/drawbase.cxx sw/source/ui/ribbar/inputwin.cxx sw/source/ui/ribbar/inputwin.src sw/source/ui/ribbar/makefile.mk sw/source/ui/ribbar/tbxanchr.cxx sw/source/ui/ribbar/workctrl.cxx sw/source/ui/ribbar/workctrl.src sw/source/ui/shells/annotsh.cxx sw/source/ui/shells/basesh.cxx sw/source/ui/shells/beziersh.cxx sw/source/ui/shells/drawdlg.cxx sw/source/ui/shells/drwbassh.cxx sw/source/ui/shells/drwtxtex.cxx sw/source/ui/shells/drwtxtsh.cxx sw/source/ui/shells/frmsh.cxx sw/source/ui/shells/grfsh.cxx sw/source/ui/shells/grfshex.cxx sw/source/ui/shells/makefile.mk sw/source/ui/shells/tabsh.cxx sw/source/ui/shells/textfld.cxx sw/source/ui/shells/textglos.cxx sw/source/ui/shells/textsh.cxx sw/source/ui/shells/textsh1.cxx sw/source/ui/shells/txtattr.cxx sw/source/ui/shells/txtcrsr.cxx sw/source/ui/shells/txtnum.cxx sw/source/ui/table/convert.cxx sw/source/ui/table/instable.cxx sw/source/ui/table/makefile.mk sw/source/ui/table/swtablerep.cxx sw/source/ui/table/tabledlg.cxx sw/source/ui/table/tablemgr.cxx sw/source/ui/table/tablepg.hxx sw/source/ui/table/tautofmt.cxx sw/source/ui/uiview/formatclipboard.cxx sw/source/ui/uiview/makefile.mk sw/source/ui/uiview/pview.cxx sw/source/ui/uiview/pview.src sw/source/ui/uiview/scroll.cxx sw/source/ui/uiview/srcview.cxx sw/source/ui/uiview/swcli.cxx sw/source/ui/uiview/uivwimp.cxx sw/source/ui/uiview/view.cxx sw/source/ui/uiview/view1.cxx sw/source/ui/uiview/view2.cxx sw/source/ui/uiview/viewcoll.cxx sw/source/ui/uiview/viewdlg2.cxx sw/source/ui/uiview/viewling.cxx sw/source/ui/uiview/viewmdi.cxx sw/source/ui/uiview/viewport.cxx sw/source/ui/uiview/viewprt.cxx sw/source/ui/uiview/viewsrch.cxx sw/source/ui/uiview/viewtab.cxx sw/source/ui/uno/SwXDocumentSettings.cxx sw/source/ui/uno/SwXPrintPreviewSettings.cxx sw/source/ui/uno/SwXPrintPreviewSettings.hxx sw/source/ui/uno/unoatxt.cxx sw/source/ui/uno/unomod.cxx sw/source/ui/uno/unotxdoc.cxx sw/source/ui/uno/unotxvw.cxx sw/source/ui/utlui/attrdesc.cxx sw/source/ui/utlui/content.cxx sw/source/ui/utlui/glbltree.cxx sw/source/ui/utlui/initui.cxx sw/source/ui/utlui/makefile.mk sw/source/ui/utlui/navipi.cxx sw/source/ui/utlui/navipi.src sw/source/ui/utlui/numfmtlb.cxx sw/source/ui/utlui/prcntfld.cxx sw/source/ui/utlui/uiitems.cxx sw/source/ui/utlui/uitool.cxx sw/source/ui/utlui/unotools.cxx sw/source/ui/utlui/viewlayoutctrl.cxx sw/source/ui/utlui/zoomctrl.cxx sw/source/ui/vba/makefile.mk sw/source/ui/vba/service.cxx sw/source/ui/web/makefile.mk sw/source/ui/wrtsh/makefile.mk sw/source/ui/wrtsh/wrtsh1.cxx sw/source/ui/wrtsh/wrtsh2.cxx sw/source/ui/wrtsh/wrtsh4.cxx sw/source/ui/wrtsh/wrtundo.cxx sw/util/hidother.src sw/util/makefile.mk sw/util/msword.map
2011-03-14 16:51:14 +00:00
sal_uInt16 nResId = 0;
if( bIsErrorState )
{
ppRet = &mpErrorBmp;
nResId = RID_GRAPHIC_ERRORBMP;
}
else
{
ppRet = &mpReplaceBmp;
nResId = RID_GRAPHIC_REPLACEBMP;
}
if( !*ppRet )
{
2010-11-16 11:08:17 +01:00
*ppRet = new BitmapEx( SW_RES( nResId ) );
}
return **ppRet;
}
void ViewShell::DeleteReplacementBitmaps()
{
DELETEZ( mpErrorBmp );
DELETEZ( mpReplaceBmp );
}
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 mpDoc; }
IDocumentSettingAccess* ViewShell::getIDocumentSettingAccess() { return mpDoc; }
const IDocumentDeviceAccess* ViewShell::getIDocumentDeviceAccess() const { return mpDoc; }
IDocumentDeviceAccess* ViewShell::getIDocumentDeviceAccess() { return mpDoc; }
const IDocumentMarkAccess* ViewShell::getIDocumentMarkAccess() const { return mpDoc->getIDocumentMarkAccess(); }
IDocumentMarkAccess* ViewShell::getIDocumentMarkAccess() { return mpDoc->getIDocumentMarkAccess(); }
const IDocumentDrawModelAccess* ViewShell::getIDocumentDrawModelAccess() const { return mpDoc; }
IDocumentDrawModelAccess* ViewShell::getIDocumentDrawModelAccess() { return mpDoc; }
const IDocumentRedlineAccess* ViewShell::getIDocumentRedlineAccess() const { return mpDoc; }
IDocumentRedlineAccess* ViewShell::getIDocumentRedlineAccess() { return mpDoc; }
const IDocumentLayoutAccess* ViewShell::getIDocumentLayoutAccess() const { return mpDoc; }
IDocumentLayoutAccess* ViewShell::getIDocumentLayoutAccess() { return mpDoc; }
IDocumentContentOperations* ViewShell::getIDocumentContentOperations() { return mpDoc; }
IDocumentStylePoolAccess* ViewShell::getIDocumentStylePoolAccess() { return mpDoc; }
const IDocumentStatistics* ViewShell::getIDocumentStatistics() const { return mpDoc; }
IDocumentUndoRedo & ViewShell::GetIDocumentUndoRedo()
{ return mpDoc->GetIDocumentUndoRedo(); }
IDocumentUndoRedo const& ViewShell::GetIDocumentUndoRedo() const
{ return mpDoc->GetIDocumentUndoRedo(); }
// --> OD 2007-11-14 #i83479#
const IDocumentListItems* ViewShell::getIDocumentListItemsAccess() const
{
return mpDoc;
}
const IDocumentOutlineNodes* ViewShell::getIDocumentOutlineNodesAccess() const
{
return mpDoc;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */