summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-12-18 08:25:35 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-12-18 08:25:35 +0100
commit68f411fb19d265ba391e730d16051b5887a30aa3 (patch)
tree0d68300433046877658d7e4338d6a43063edb1d3 /editeng
parentdcca78f4a720e2d073e49e631b34af3210e0e27f (diff)
editeng: clean up no longer necessary isTiledRendering() member functions
Change-Id: I4bf3e9bd9cbf2b32d79cebd5ba0a818b1f4970c2
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/editview.cxx10
-rw-r--r--editeng/source/editeng/impedit.cxx17
-rw-r--r--editeng/source/editeng/impedit.hxx1
-rw-r--r--editeng/source/editeng/impedit2.cxx5
-rw-r--r--editeng/source/editeng/impedit3.cxx5
5 files changed, 15 insertions, 23 deletions
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index 5653731c0248..935fe5ef5213 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -63,6 +63,7 @@
#include <linguistic/lngprops.hxx>
#include <vcl/settings.hxx>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
+#include <comphelper/lok.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
@@ -400,7 +401,7 @@ void EditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor )
bGotoCursor = false;
pImpEditView->ShowCursor( bGotoCursor, bForceVisCursor );
- if (pImpEditView->isTiledRendering())
+ if (comphelper::LibreOfficeKit::isActive())
pImpEditView->libreOfficeKitCallback(LOK_CALLBACK_CURSOR_VISIBLE, OString::boolean(true).getStr());
}
}
@@ -408,7 +409,7 @@ void EditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor )
void EditView::HideCursor()
{
pImpEditView->GetCursor()->Hide();
- if (pImpEditView->isTiledRendering())
+ if (comphelper::LibreOfficeKit::isActive())
pImpEditView->libreOfficeKitCallback(LOK_CALLBACK_CURSOR_VISIBLE, OString::boolean(false).getStr());
}
@@ -587,11 +588,6 @@ void EditView::setTiledRendering(bool bTiledRendering)
pImpEditView->setTiledRendering(bTiledRendering);
}
-bool EditView::isTiledRendering()
-{
- return pImpEditView->isTiledRendering();
-}
-
void EditView::registerLibreOfficeKitCallback(LibreOfficeKitCallback pCallback, void* pLibreOfficeKitData)
{
pImpEditView->registerLibreOfficeKitCallback(pCallback, pLibreOfficeKitData);
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
index 453bcbea467e..d8e9a2d33507 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -123,11 +123,6 @@ void ImpEditView::setTiledRendering(bool bTiledRendering)
mbTiledRendering = bTiledRendering;
}
-bool ImpEditView::isTiledRendering() const
-{
- return mbTiledRendering;
-}
-
void ImpEditView::registerLibreOfficeKitCallback(LibreOfficeKitCallback pCallback, void* pData)
{
mpLibreOfficeKitCallback = pCallback;
@@ -145,7 +140,7 @@ void ImpEditView::SetEditSelection( const EditSelection& rEditSelection )
// set state before notification
aEditSelection = rEditSelection;
- if (isTiledRendering())
+ if (comphelper::LibreOfficeKit::isActive())
// Tiled rendering: selections are only painted when we are in selection mode.
pEditEngine->SetInSelectionMode(aEditSelection.HasRange());
@@ -188,7 +183,7 @@ void ImpEditView::DrawSelection( EditSelection aTmpSel, vcl::Region* pRegion, Ou
vcl::Region* pOldRegion = pRegion;
vcl::Region aRegion;
- if (isTiledRendering() && !pRegion)
+ if (comphelper::LibreOfficeKit::isActive() && !pRegion)
pRegion = &aRegion;
tools::PolyPolygon* pPolyPoly = nullptr;
@@ -325,7 +320,7 @@ void ImpEditView::DrawSelection( EditSelection aTmpSel, vcl::Region* pRegion, Ou
{
*pRegion = vcl::Region( *pPolyPoly );
- if (isTiledRendering() && !pOldRegion)
+ if (comphelper::LibreOfficeKit::isActive() && !pOldRegion)
{
bool bMm100ToTwip = pOutWin->GetMapMode().GetMapUnit() == MAP_100TH_MM;
@@ -947,7 +942,7 @@ void ImpEditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor, sal_uInt16
GetCursor()->SetSize( aCursorSz );
- if (isTiledRendering())
+ if (comphelper::LibreOfficeKit::isActive())
{
const Point& rPos = GetCursor()->GetPos();
Rectangle aRect(rPos.getX(), rPos.getY(), rPos.getX() + GetCursor()->GetWidth(), rPos.getY() + GetCursor()->GetHeight());
@@ -1562,8 +1557,8 @@ bool ImpEditView::SetCursorAtPoint( const Point& rPointPixel )
EditPaM aPaM = pEditEngine->GetPaM(aDocPos);
bool bGotoCursor = DoAutoScroll();
- // aTmpNewSel: Diff between old and new, not the new selection, unless tiled rendering
- EditSelection aTmpNewSel( isTiledRendering() ? GetEditSelection().Min() : GetEditSelection().Max(), aPaM );
+ // aTmpNewSel: Diff between old and new, not the new selection, unless for tiled rendering
+ EditSelection aTmpNewSel( comphelper::LibreOfficeKit::isActive() ? GetEditSelection().Min() : GetEditSelection().Max(), aPaM );
// #i27299#
// work on copy of current selection and set new selection, if it has changed.
diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx
index 1c988459675d..e1da8ca7754e 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -369,7 +369,6 @@ public:
return ( pBackgroundColor ? *pBackgroundColor : pOutWin->GetBackground().GetColor() ); }
void setTiledRendering(bool bTiledRendering);
- bool isTiledRendering() const;
/// @see vcl::ITiledRenderable::registerCallback().
void registerLibreOfficeKitCallback(LibreOfficeKitCallback pCallback, void* pLibreOfficeKitData);
/// Invokes the registered callback, if there are any.
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 1ae1dd8a722d..1f9bc7430b25 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -62,6 +62,7 @@
#include <sot/exchange.hxx>
#include <sot/formats.hxx>
#include <o3tl/make_unique.hxx>
+#include <comphelper/lok.hxx>
#include <unicode/ubidi.h>
#include <algorithm>
@@ -570,7 +571,7 @@ bool ImpEditEngine::MouseButtonUp( const MouseEvent& rMEvt, EditView* pView )
// FIXME I believe resetting bInSelection should not be here even in the
// non-tiled-rendering case, but it has been here since 2000 (and before)
// so who knows what corner case it was supposed to solve back then
- if (!pView->pImpEditView->isTiledRendering())
+ if (!comphelper::LibreOfficeKit::isActive())
bInSelection = false;
// Special treatments
@@ -906,7 +907,7 @@ EditSelection ImpEditEngine::MoveCursor( const KeyEvent& rKeyEvent, EditView* pE
if ( bKeyModifySelection )
{
// Then the selection is expanded ... or the whole selection is painted in case of tiled rendering.
- EditSelection aTmpNewSel( pEditView->isTiledRendering() ? pEditView->pImpEditView->GetEditSelection().Min() : aOldEnd, aPaM );
+ EditSelection aTmpNewSel( comphelper::LibreOfficeKit::isActive() ? pEditView->pImpEditView->GetEditSelection().Min() : aOldEnd, aPaM );
pEditView->pImpEditView->DrawSelection( aTmpNewSel );
}
else
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 5b3498e07985..2f1465ed4923 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -74,6 +74,7 @@
#include <comphelper/processfactory.hxx>
#include <rtl/ustrbuf.hxx>
#include <comphelper/string.hxx>
+#include <comphelper/lok.hxx>
#include <memory>
using namespace ::com::sun::star;
@@ -293,7 +294,7 @@ void ImpEditEngine::UpdateViews( EditView* pCurView )
aClipRect = pView->pImpEditView->GetWindowPos( aClipRect );
// For tiled rendering, we have to always go via Invalidate().
- if ( pView == pCurView && !pView->isTiledRendering())
+ if ( pView == pCurView && !comphelper::LibreOfficeKit::isActive())
Paint( pView->pImpEditView, aClipRect, nullptr, true );
else
pView->GetWindow()->Invalidate( aClipRect );
@@ -3886,7 +3887,7 @@ void ImpEditEngine::Paint( ImpEditView* pView, const Rectangle& rRect, OutputDev
// In case of tiled rendering pass a region to DrawSelection(), so that
// selection callbacks are not emitted during every repaint.
vcl::Region aRegion;
- pView->DrawSelection(pView->GetEditSelection(), pView->isTiledRendering() ? &aRegion : nullptr, pTarget);
+ pView->DrawSelection(pView->GetEditSelection(), comphelper::LibreOfficeKit::isActive() ? &aRegion : nullptr, pTarget);
}
}