summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-01-13 09:12:45 +0100
committerAshod Nakashian <ashod.nakashian@collabora.co.uk>2016-07-20 01:25:55 -0400
commite83e6dfd99795ec7031fa772018fd60140ba8e4a (patch)
treec093782a40e452485a669e7ecc913156ad439940 /sc
parent0fff0759e16974a14b124ff1e4a331815113106b (diff)
sc: clean up remaining non-static isTiledRendering() usage
Change-Id: I546f644e220069904fc2723f953ce2e6e2bfaca3 (cherry picked from commit 64659d59310b17ce6ca410bfca2e231d8b79b0ff)
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/documen3.cxx4
-rw-r--r--sc/source/ui/view/gridwin.cxx18
-rw-r--r--sc/source/ui/view/gridwin2.cxx3
-rw-r--r--sc/source/ui/view/gridwin3.cxx3
-rw-r--r--sc/source/ui/view/gridwin4.cxx6
-rw-r--r--sc/source/ui/view/viewdata.cxx12
-rw-r--r--sc/source/ui/view/viewfun2.cxx2
7 files changed, 24 insertions, 24 deletions
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index 1f643f4e1d6f..0ae4e7ac761b 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -1305,7 +1305,7 @@ bool ScDocument::SearchAndReplace(
rSearchItem, nCol, nRow );
// notify LibreOfficeKit about changed page
- if ( GetDrawLayer() && GetDrawLayer()->isTiledRendering() )
+ if ( comphelper::LibreOfficeKit::isActive() )
{
OString aPayload = OString::number(nTab);
if (comphelper::LibreOfficeKit::isViewCallback())
@@ -1341,7 +1341,7 @@ bool ScDocument::SearchAndReplace(
rSearchItem, nCol, nRow );
// notify LibreOfficeKit about changed page
- if ( GetDrawLayer() && GetDrawLayer()->isTiledRendering() )
+ if ( comphelper::LibreOfficeKit::isActive() )
{
OString aPayload = OString::number(nTab);
if (comphelper::LibreOfficeKit::isViewCallback())
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 47a43970a028..081bd373e5e7 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -135,6 +135,7 @@
#include <vcl/svapp.hxx>
#include <svx/sdr/overlay/overlayselection.hxx>
#include <comphelper/string.hxx>
+#include <comphelper/lok.hxx>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
#include <comphelper/lok.hxx>
@@ -1784,7 +1785,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt, MouseEventSta
bool bEditMode = pViewData->HasEditView(eWhich); // also in Mode==SC_INPUT_TYPE
bool bDouble = (rMEvt.GetClicks() == 2);
ScDocument* pDoc = pViewData->GetDocument();
- bool bIsTiledRendering = pDoc->GetDrawLayer()->isTiledRendering();
+ bool bIsTiledRendering = comphelper::LibreOfficeKit::isActive();
// DeactivateIP does only happen when MarkListHasChanged
@@ -2344,7 +2345,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
// double click (only left button)
// in the tiled rendering case, single click works this way too
- bool bIsTiledRendering = pViewData->GetDocument()->GetDrawLayer()->isTiledRendering();
+ bool bIsTiledRendering = comphelper::LibreOfficeKit::isActive();
bool bDouble = ( rMEvt.GetClicks() == 2 && rMEvt.IsLeft() );
if ((bDouble || bIsTiledRendering) && !bRefMode && (nMouseStatus == SC_GM_DBLDOWN || bIsTiledRendering) && !pScMod->IsRefDialogOpen())
{
@@ -5986,7 +5987,7 @@ void ScGridWindow::UpdateCopySourceOverlay()
*/
static void updateLibreOfficeKitSelection(ScViewData* pViewData, ScDrawLayer* pDrawLayer, const std::vector<Rectangle>& rRectangles, std::vector<Rectangle>* pLogicRects = nullptr)
{
- if (!pDrawLayer->isTiledRendering())
+ if (!comphelper::LibreOfficeKit::isActive())
return;
double nPPTX = pViewData->GetPPTX();
@@ -6066,9 +6067,7 @@ void ScGridWindow::UpdateCursorOverlay()
const ScPatternAttr* pPattern = pDoc->GetPattern(nX,nY,nTab);
- ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer();
-
- if (!pDrawLayer->isTiledRendering() && !maVisibleRange.isInside(nX, nY))
+ if (!comphelper::LibreOfficeKit::isActive() && !maVisibleRange.isInside(nX, nY))
{
if (maVisibleRange.mnCol2 < nX || maVisibleRange.mnRow2 < nY)
return; // no further check needed, nothing visible
@@ -6091,7 +6090,7 @@ void ScGridWindow::UpdateCursorOverlay()
bool bOverlapped = rMergeFlag.IsOverlapped();
// left or above of the screen?
- bool bVis = pDrawLayer->isTiledRendering() || ( nX>=pViewData->GetPosX(eHWhich) && nY>=pViewData->GetPosY(eVWhich) );
+ bool bVis = comphelper::LibreOfficeKit::isActive() || ( nX>=pViewData->GetPosX(eHWhich) && nY>=pViewData->GetPosY(eVWhich) );
if (!bVis)
{
SCCOL nEndX = nX;
@@ -6121,7 +6120,7 @@ void ScGridWindow::UpdateCursorOverlay()
}
// in the tiled rendering case, don't limit to the screen size
- if (bMaybeVisible || pDrawLayer->isTiledRendering())
+ if (bMaybeVisible || comphelper::LibreOfficeKit::isActive())
{
long nSizeXPix;
long nSizeYPix;
@@ -6166,7 +6165,8 @@ void ScGridWindow::UpdateCursorOverlay()
if ( !aPixelRects.empty() )
{
- if (pDrawLayer->isTiledRendering()) {
+ if (comphelper::LibreOfficeKit::isActive())
+ {
mpOOCursors.reset(new sdr::overlay::OverlayObjectList);
updateLibreOfficeKitCellCursor();
}
diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx
index b249802186b7..c90d8dbf6d3a 100644
--- a/sc/source/ui/view/gridwin2.cxx
+++ b/sc/source/ui/view/gridwin2.cxx
@@ -20,6 +20,7 @@
#include "scitems.hxx"
#include <vcl/msgbox.hxx>
#include <vcl/settings.hxx>
+#include <comphelper/lok.hxx>
#include "gridwin.hxx"
#include "tabvwsh.hxx"
@@ -594,7 +595,7 @@ bool ScGridWindow::UpdateVisibleRange()
SCCOL nXRight = MAXCOL;
SCROW nYBottom = MAXROW;
- if (rDoc.GetDrawLayer()->isTiledRendering())
+ if (comphelper::LibreOfficeKit::isActive())
{
// entire table in the tiled rendering case
SCTAB nTab = pViewData->GetTabNo();
diff --git a/sc/source/ui/view/gridwin3.cxx b/sc/source/ui/view/gridwin3.cxx
index 4f97aa4f6679..e8335c437f19 100644
--- a/sc/source/ui/view/gridwin3.cxx
+++ b/sc/source/ui/view/gridwin3.cxx
@@ -42,6 +42,7 @@
#include "userdat.hxx"
#include "unitconv.hxx"
#include <svx/svdpage.hxx>
+#include <comphelper/lok.hxx>
bool ScGridWindow::DrawMouseButtonDown(const MouseEvent& rMEvt)
{
@@ -242,7 +243,7 @@ MapMode ScGridWindow::GetDrawMapMode( bool bForce )
// work in the logic coordinates (ideally 100ths of mm - so that it is
// the same as editeng and drawinglayer), and get rid of all the
// SetMapMode's and other unneccessary fun we have with pixels
- if (pDoc->GetDrawLayer() && pDoc->GetDrawLayer()->isTiledRendering())
+ if (comphelper::LibreOfficeKit::isActive())
{
return pViewData->GetLogicMode();
}
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 0d86705d584c..5a3bf1bae3a8 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -384,7 +384,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
// all the rendering should go through PaintTile() in that case.
// TODO revisit if we can actually turn this into an assert(), and clean
// up the callers
- if (rDoc.GetDrawLayer()->isTiledRendering())
+ if (comphelper::LibreOfficeKit::isActive())
return;
ScModule* pScMod = SC_MOD();
@@ -524,7 +524,7 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
ScDocShell* pDocSh = pViewData->GetDocShell();
ScDocument& rDoc = pDocSh->GetDocument();
const ScViewOptions& rOpts = pViewData->GetOptions();
- bool bIsTiledRendering = rDoc.GetDrawLayer()->isTiledRendering();
+ bool bIsTiledRendering = comphelper::LibreOfficeKit::isActive();
SCTAB nTab = aOutputData.nTab;
SCCOL nX1 = aOutputData.nX1;
@@ -1684,7 +1684,7 @@ void ScGridWindow::GetSelectionRects( ::std::vector< Rectangle >& rPixelRects )
if (nY1 < nPosY)
nY1 = nPosY;
- if (!pDoc->GetDrawLayer()->isTiledRendering())
+ if (!comphelper::LibreOfficeKit::isActive())
{
// limit the selection to only what is visible on the screen
SCCOL nXRight = nPosX + pViewData->VisibleCellsX(eHWhich);
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index d006e916e6f3..98f50c82c246 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -62,6 +62,7 @@
#include <comphelper/lok.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/string.hxx>
+#include <comphelper/lok.hxx>
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/document/NamedPropertyValues.hpp>
@@ -945,7 +946,7 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich,
{
pEditView[eWhich] = new EditView( pNewEngine, pWin );
- if (pDoc->GetDrawLayer() && pDoc->GetDrawLayer()->isTiledRendering())
+ if (pDoc->GetDrawLayer() && comphelper::LibreOfficeKit::isActive())
{
if (comphelper::LibreOfficeKit::isViewCallback())
pEditView[eWhich]->registerLibreOfficeKitViewCallback(pViewShell);
@@ -1527,8 +1528,7 @@ Point ScViewData::GetScrPos( SCCOL nWhereX, SCROW nWhereY, ScSplitPos eWhich,
}
sal_uInt16 nTSize;
- ScDrawLayer* pModel = GetDocument()->GetDrawLayer();
- bool bIsTiledRendering = pModel && pModel->isTiledRendering();
+ bool bIsTiledRendering = comphelper::LibreOfficeKit::isActive();
SCCOL nPosX = GetPosX(eWhichX);
SCCOL nX;
@@ -1873,8 +1873,7 @@ void ScViewData::GetMouseQuadrant( const Point& rClickPos, ScSplitPos eWhich,
void ScViewData::SetPosX( ScHSplitPos eWhich, SCCOL nNewPosX )
{
// in the tiled rendering case, nPosX [the leftmost visible column] must be 0
- ScDrawLayer* pModel = GetDocument()->GetDrawLayer();
- bool bIsTiledRendering = pModel && pModel->isTiledRendering();
+ bool bIsTiledRendering = comphelper::LibreOfficeKit::isActive();
if (nNewPosX != 0 && !bIsTiledRendering)
{
SCCOL nOldPosX = pThisTab->nPosX[eWhich];
@@ -1913,8 +1912,7 @@ void ScViewData::SetPosX( ScHSplitPos eWhich, SCCOL nNewPosX )
void ScViewData::SetPosY( ScVSplitPos eWhich, SCROW nNewPosY )
{
// in the tiled rendering case, nPosY [the topmost visible row] must be 0
- ScDrawLayer* pModel = GetDocument()->GetDrawLayer();
- bool bIsTiledRendering = pModel && pModel->isTiledRendering();
+ bool bIsTiledRendering = comphelper::LibreOfficeKit::isActive();
if (nNewPosY != 0 && !bIsTiledRendering)
{
SCROW nOldPosY = pThisTab->nPosY[eWhich];
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 29a0ae86887c..37af4f618fa6 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -1846,7 +1846,7 @@ bool ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem,
AlignToCursor( nCol, nRow, SC_FOLLOW_JUMP );
SetCursor( nCol, nRow, true );
- if (rDoc.GetDrawLayer()->isTiledRendering())
+ if (comphelper::LibreOfficeKit::isActive())
{
Point aCurPos = GetViewData().GetScrPos(nCol, nRow, GetViewData().GetActivePart());