summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2015-03-24 11:28:21 +0200
committerTor Lillqvist <tml@collabora.com>2015-03-24 15:30:27 +0200
commit4cc1bcbaedd483482240f0ffbf42e56dd6052612 (patch)
tree81ddf9b524118b6b6338b8642c17939ab890a65c /sw
parent38c22ed2b8b8f3530b8a0fe5a23a329e8e511c76 (diff)
Kill dead <touch/touch.h> API
Has all been obsoleted by LibreOfficeKit. Only some MOBILE_* constant #defines are now left in touch.h, but probably those are used only by dead code. Change-Id: I646945c4408b4e6cd5510da535cfc12088dd391c
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/pch/precompiled_sw.hxx1
-rw-r--r--sw/source/core/crsr/crsrsh.cxx4
-rw-r--r--sw/source/core/crsr/viscrs.cxx11
-rw-r--r--sw/source/core/view/viewsh.cxx52
-rw-r--r--sw/source/uibase/docvw/edtwin.cxx82
5 files changed, 0 insertions, 150 deletions
diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx
index 3755950c665e..44aa8cc86805 100644
--- a/sw/inc/pch/precompiled_sw.hxx
+++ b/sw/inc/pch/precompiled_sw.hxx
@@ -1038,7 +1038,6 @@
#include <tools/stream.hxx>
#include <tools/time.hxx>
#include <tools/urlobj.hxx>
-#include <touch/touch-impl.h>
#include <touch/touch.h>
#include <ucbhelper/content.hxx>
#include <ucbhelper/contentidentifier.hxx>
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index ef020fdd5f09..19b78610dad8 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -64,10 +64,6 @@
#include <IDocumentLayoutAccess.hxx>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
-#if defined(IOS)
-#include <touch/touch.h>
-#endif
-
using namespace com::sun::star;
using namespace util;
diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index 3c62a4ad48ce..a26cd78fa2a7 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -53,7 +53,6 @@
#include <boost/scoped_ptr.hpp>
-#include <touch/touch.h>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
#include <paintfrm.hxx>
@@ -385,16 +384,6 @@ void SwSelPaintRects::Show()
}
}
-#if !HAVE_FEATURE_DESKTOP
-
-extern "C" void touch_lo_selection_attempt_resize(const void * /* documentHandle */,
- MLORect * /* selectedRectangles */,
- int /* numberOfRectangles */)
-{
-}
-
-#endif
-
void SwSelPaintRects::HighlightInputFld()
{
std::vector< basegfx::B2DRange > aInputFldRanges;
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index b5920a19977a..cf37dbe0ae2b 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -19,8 +19,6 @@
#include <config_features.h>
-#include <touch/touch.h>
-
#include <com/sun/star/accessibility/XAccessible.hpp>
#include <sfx2/viewfrm.hxx>
#include <sfx2/progress.hxx>
@@ -1833,56 +1831,6 @@ void SwViewShell::PaintTile(VirtualDevice &rDevice, int contextWidth, int contex
setTiledRendering(bTiledRendering);
}
-#if !HAVE_FEATURE_DESKTOP
-extern "C"
-MLODpxSize touch_lo_get_content_size()
-{
-#ifdef IOS
- SwWrtShell *pViewShell;
- // FIXME: make sure this is not called before we have a document...
- while (!(pViewShell = GetActiveWrtShell()))
- {
- sleep(1);
- }
-
- if (pViewShell)
- {
- static const MLORip WIDTH_ADDITION = 6L * DOCUMENTBORDER;
- static const MLORip HEIGHT_ADDITION = 2L * DOCUMENTBORDER;
- Size documentSize =pViewShell->GetView().GetDocSz();
- return MLODpxSizeByRips(((MLORip)documentSize.Width()) + WIDTH_ADDITION,
- ((MLORip)documentSize.Height()) + HEIGHT_ADDITION);
- }
- return MLODpxSizeByDpxes(0,0);
-#else
- return MLODpxSize();
-#endif
-}
-
-extern "C"
-MLORipPoint MLORipPointByDpxPoint(MLODpxPoint mloDpxPoint)
-{
-#ifdef IOS
- //MLODpxSize contentSize = touch_lo_get_content_size();
- MLORip x = MLORipByDpx(mloDpxPoint.x /*- (contentSize.width/2.0f)*/);
- MLORip y = MLORipByDpx(mloDpxPoint.y);
- return MLORipPointByRips(x,y);
-#else
- (void) mloDpxPoint;
- return MLORipPoint();
-#endif
-}
-
-extern "C"
-MLODpxPoint MLODpxPointByRipPoint(MLORipPoint mloRipPoint)
-{
- //MLODpxSize contentSize = touch_lo_get_content_size();
- MLODpx x = MLODpxByRip(mloRipPoint.x)/* + (contentSize.width/2.0f)*/;
- MLODpx y = MLODpxByRip(mloRipPoint.y);
- return MLODpxPointByDpxes(x,y);
-}
-#endif
-
void SwViewShell::SetBrowseBorder( const Size& rNew )
{
if( rNew != maBrowseBorder )
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index 6356b9883f1b..b02b8afdb83e 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -68,7 +68,6 @@
#include <basegfx/color/bcolortools.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
-#include <touch/touch-impl.h>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
#include <editeng/acorrcfg.hxx>
@@ -2703,87 +2702,6 @@ static bool lcl_urlOverBackground(SwWrtShell& rSh, const Point& rDocPos)
return rSh.GetContentAtPos(rDocPos, aSwContentAtPos) && pSelectableObj->GetLayer() == rSh.GetDoc()->getIDocumentDrawModelAccess().GetHellId();
}
-#if !HAVE_FEATURE_DESKTOP
-
-// As such these two functions could be more or less anywhere, I have
-// them now in this source file because the act of moving a selection
-// end point is somewhat the same as what happens when one
-// shift-clicks on either side of an existing selection.
-
-void touch_lo_selection_start_move_impl(const void *documentHandle,
- int x,
- int y)
-{
- SwWrtShell *pWrtShell = reinterpret_cast<SwWrtShell*>(const_cast<void*>(documentHandle));
-
- if (!pWrtShell)
- return;
-
- const OutputDevice *pOut = pWrtShell->GetWin();
- if (!pOut)
- pOut = pWrtShell->GetOut();
-
- const Point aDocPos( pOut->PixelToLogic( Point(x, y) ) );
-
- // Don't allow moving the start of the selection beyond the end
- // (point) of the selection.
-
- SwRect startCharRect;
- pWrtShell->GetCharRectAt(startCharRect, pWrtShell->GetCrsr()->GetPoint());
- const Point startCharPos = startCharRect.Center();
-
- if (startCharPos.Y() < aDocPos.Y() ||
- (startCharPos.Y() == aDocPos.Y() && startCharPos.X() - startCharRect.Width() <= aDocPos.X()))
- return;
-
- pWrtShell->ChgCurrPam( aDocPos );
-
- // Keep mark normally at the start and point at the end,
- // just exchange for the duration of moving the start.
- pWrtShell->GetCrsr()->Exchange();
- {
- SwMvContext aMvContext( pWrtShell );
- pWrtShell->SwCrsrShell::SetCrsr( aDocPos );
- }
- pWrtShell->GetCrsr()->Exchange();
-}
-
-void touch_lo_selection_end_move_impl(const void *documentHandle,
- int x,
- int y)
-{
- SwWrtShell *pWrtShell = reinterpret_cast<SwWrtShell*>(const_cast<void*>(documentHandle));
-
- if (!pWrtShell)
- return;
-
- const OutputDevice *pOut = pWrtShell->GetWin();
- if (!pOut)
- pOut = pWrtShell->GetOut();
-
- const Point aDocPos( pOut->PixelToLogic( Point(x, y) ) );
-
- // Don't allow moving the end of the selection beyond the start
- // (mark) of the selection.
-
- SwRect endCharRect;
- pWrtShell->GetCharRectAt(endCharRect, pWrtShell->GetCrsr()->GetMark());
- const Point endCharPos = endCharRect.Center();
-
- if (endCharPos.Y() > aDocPos.Y() ||
- (endCharPos.Y() == aDocPos.Y() && endCharPos.X() + endCharRect.Width() >= aDocPos.X()))
- return;
-
- pWrtShell->ChgCurrPam( aDocPos );
-
- {
- SwMvContext aMvContext( pWrtShell );
- pWrtShell->SwCrsrShell::SetCrsr( aDocPos );
- }
-}
-
-#endif
-
void SwEditWin::MoveCursor( SwWrtShell &rSh, const Point& rDocPos,
const bool bOnlyText, bool bLockView )
{