summaryrefslogtreecommitdiff
path: root/sw/source/core
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-12-11 08:04:47 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-12-11 08:06:29 +0100
commitfd205e40c58aa749fbe458d74ca0c2373a1017dc (patch)
treecea0d6809b0a6d3d1acc6df952f9b0ccf53f4dab /sw/source/core
parentbd05eec9e30647394c0624c94b97e46bf8b7533f (diff)
sw: clean up no longer needed SwViewShell::isTiledRendering()
Change-Id: Icd719c461613f8c59cad81b256678307f69974e1
Diffstat (limited to 'sw/source/core')
-rw-r--r--sw/source/core/crsr/swcrsr.cxx3
-rw-r--r--sw/source/core/crsr/viscrs.cxx4
-rw-r--r--sw/source/core/layout/trvlfrm.cxx3
-rw-r--r--sw/source/core/view/viewimp.cxx5
-rw-r--r--sw/source/core/view/viewsh.cxx20
5 files changed, 17 insertions, 18 deletions
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index dfba8e38369d..471fa9e5aa69 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -52,6 +52,7 @@
#include <redline.hxx>
#include <txatbase.hxx>
#include <memory>
+#include <comphelper/lok.hxx>
using namespace ::com::sun::star::i18n;
@@ -1379,7 +1380,7 @@ bool SwCursor::SelectWordWT( SwViewShell* pViewShell, sal_Int16 nWordType, const
nWordType,
bForward ));
- if (pViewShell->isTiledRendering() && aBndry.startPos == aBndry.endPos && nPtPos > 0)
+ if (comphelper::LibreOfficeKit::isActive() && aBndry.startPos == aBndry.endPos && nPtPos > 0)
{
// nPtPos is the end of the paragraph, select the last word then.
--nPtPos;
diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index 044083b0431e..50344ee42e9e 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -92,7 +92,7 @@ void SwVisibleCursor::Show()
m_bIsVisible = true;
// display at all?
- if( m_pCursorShell->VisArea().IsOver( m_pCursorShell->m_aCharRect ) || m_pCursorShell->isTiledRendering() )
+ if( m_pCursorShell->VisArea().IsOver( m_pCursorShell->m_aCharRect ) || comphelper::LibreOfficeKit::isActive() )
_SetPosAndShow();
}
}
@@ -756,7 +756,7 @@ void SwShellTableCursor::FillRects()
bool bStart = true;
SwRegionRects aReg( GetShell()->VisArea() );
- if (GetShell()->isTiledRendering())
+ if (comphelper::LibreOfficeKit::isActive())
aReg = GetShell()->getIDocumentLayoutAccess().GetCurrentLayout()->Frame();
SwNodes& rNds = GetDoc()->GetNodes();
SwFrame* pEndFrame = nullptr;
diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx
index aa8673225901..c955254f9116 100644
--- a/sw/source/core/layout/trvlfrm.cxx
+++ b/sw/source/core/layout/trvlfrm.cxx
@@ -47,6 +47,7 @@
#include <cfloat>
#include <swselectionlist.hxx>
+#include <comphelper/lok.hxx>
namespace {
bool lcl_GetCursorOfst_Objects( const SwPageFrame* pPageFrame, bool bSearchBackground,
@@ -2020,7 +2021,7 @@ void SwRootFrame::CalcFrameRects(SwShellCursor &rCursor)
bool bIgnoreVisArea = true;
if (pSh)
- bIgnoreVisArea = pSh->GetViewOptions()->IsPDFExport() || pSh->isTiledRendering();
+ bIgnoreVisArea = pSh->GetViewOptions()->IsPDFExport() || comphelper::LibreOfficeKit::isActive();
// #i12836# enhanced pdf
SwRegionRects aRegion( !bIgnoreVisArea ?
diff --git a/sw/source/core/view/viewimp.cxx b/sw/source/core/view/viewimp.cxx
index d84ffa91d15d..7d6017ce23d7 100644
--- a/sw/source/core/view/viewimp.cxx
+++ b/sw/source/core/view/viewimp.cxx
@@ -35,6 +35,7 @@
#include <pagepreviewlayout.hxx>
#include <comcore.hrc>
#include <svx/svdundo.hxx>
+#include <comphelper/lok.hxx>
#include <IDocumentLayoutAccess.hxx>
#include <IDocumentDrawModelAccess.hxx>
#include <IDocumentDeviceAccess.hxx>
@@ -132,13 +133,13 @@ void SwViewShellImp::DelRegion()
bool SwViewShellImp::AddPaintRect( const SwRect &rRect )
{
// In case of tiled rendering the visual area is the last painted tile -> not interesting.
- if ( rRect.IsOver( m_pShell->VisArea() ) || m_pShell->isTiledRendering() )
+ if ( rRect.IsOver( m_pShell->VisArea() ) || comphelper::LibreOfficeKit::isActive() )
{
if ( !m_pRegion )
{
// In case of normal rendering, this makes sure only visible rectangles are painted.
// Otherwise get the rectangle of the full document, so all paint rectangles are invalidated.
- const SwRect& rArea = m_pShell->isTiledRendering() ? m_pShell->GetLayout()->Frame() : m_pShell->VisArea();
+ const SwRect& rArea = comphelper::LibreOfficeKit::isActive() ? m_pShell->GetLayout()->Frame() : m_pShell->VisArea();
m_pRegion = new SwRegionRects( rArea );
}
(*m_pRegion) -= rRect;
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 1b01d6e6d02c..e0ff3fd4e3f5 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -80,6 +80,7 @@
#include <svx/sdrpaintwindow.hxx>
#include <svx/sdr/overlay/overlaymanager.hxx>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
+#include <comphelper/lok.hxx>
#if !HAVE_FEATURE_DESKTOP
#include <vcl/sysdata.hxx>
@@ -134,11 +135,6 @@ void SwViewShell::setTiledRendering(bool bTiledRendering)
getIDocumentDrawModelAccess().GetDrawModel()->setTiledRendering(bTiledRendering);
}
-bool SwViewShell::isTiledRendering() const
-{
- return getIDocumentDrawModelAccess().GetDrawModel()->isTiledRendering();
-}
-
void SwViewShell::setOutputToWindow(bool bOutputToWindow)
{
mbOutputToWindow = bOutputToWindow;
@@ -195,7 +191,7 @@ void SwViewShell::DLPrePaint2(const vcl::Region& rRegion)
MakeDrawView();
// Prefer window; if not available, get mpOut (e.g. printer)
- const bool bWindow = GetWin() && !isTiledRendering() && !isOutputToWindow();
+ const bool bWindow = GetWin() && !comphelper::LibreOfficeKit::isActive() && !isOutputToWindow();
mpPrePostOutDev = bWindow ? GetWin(): GetOut();
// #i74769# use SdrPaintWindow now direct
@@ -424,7 +420,7 @@ void SwViewShell::ImplEndAction( const bool bIdleEnd )
if ( bPaintsFromSystem )
PaintDesktop(*GetOut(), aRect);
- if (!isTiledRendering())
+ if (!comphelper::LibreOfficeKit::isActive())
pCurrentLayout->Paint( *mpOut, aRect );
else
pCurrentLayout->GetCurrShell()->InvalidateWindows(aRect.SVRect());
@@ -567,7 +563,7 @@ void SwViewShell::InvalidateWindows( const SwRect &rRect )
::RepaintPagePreview( &rSh, rRect );
// In case of tiled rendering, invalidation is wanted even if
// the rectangle is outside the visual area.
- else if ( rSh.VisArea().IsOver( rRect ) || rSh.isTiledRendering() )
+ else if ( rSh.VisArea().IsOver( rRect ) || comphelper::LibreOfficeKit::isActive() )
rSh.GetWin()->Invalidate( rRect.SVRect() );
}
}
@@ -578,7 +574,7 @@ const SwRect& SwViewShell::VisArea() const
{
// when using the tiled rendering, consider the entire document as our
// visible area
- return isTiledRendering()? GetLayout()->Frame(): maVisArea;
+ return comphelper::LibreOfficeKit::isActive()? GetLayout()->Frame(): maVisArea;
}
void SwViewShell::MakeVisible( const SwRect &rRect )
@@ -1022,7 +1018,7 @@ void SwViewShell::SizeChgNotify()
OUString sDisplay = rNum.GetNumStr( nVirtNum );
PageNumNotify( this, pCnt->GetPhyPageNum(), nVirtNum, sDisplay );
- if (isTiledRendering())
+ if (comphelper::LibreOfficeKit::isActive())
{
Size aDocSize = GetDocSize();
std::stringstream ss;
@@ -1182,7 +1178,7 @@ void SwViewShell::VisPortChgd( const SwRect &rRect)
// When tiled rendering, the map mode of the window is disabled, avoid
// enabling it here.
- if (!isTiledRendering())
+ if (!comphelper::LibreOfficeKit::isActive())
{
Point aPt( VisArea().Pos() );
aPt.X() = -aPt.X(); aPt.Y() = -aPt.Y();
@@ -1860,7 +1856,7 @@ void SwViewShell::PaintTile(VirtualDevice &rDevice, int contextWidth, int contex
// TODO clean up SwViewShell's approach to output devices (the many of
// them - mpBufferedOut, mpOut, mpWin, ...)
OutputDevice *pSaveOut = mpOut;
- bool bTiledRendering = isTiledRendering();
+ bool bTiledRendering = comphelper::LibreOfficeKit::isActive();
setTiledRendering(true);
mbInLibreOfficeKitCallback = true;
mpOut = &rDevice;