the drag functions return values are ignored
Change-Id: Ife694a0d04d80808f227bd8ea7d8545d732d77c2 Reviewed-on: https://gerrit.libreoffice.org/54323 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -338,7 +338,7 @@ public:
|
||||
void SetObjRect( const SwRect& rRect );
|
||||
|
||||
long BeginDrag( const Point *pPt, bool bProp );
|
||||
long Drag ( const Point *pPt, bool bProp );
|
||||
void Drag ( const Point *pPt, bool bProp );
|
||||
void EndDrag ();
|
||||
void BreakDrag();
|
||||
|
||||
|
@@ -717,7 +717,7 @@ long SwFEShell::BeginDrag( const Point* pPt, bool bIsShift)
|
||||
return 0;
|
||||
}
|
||||
|
||||
long SwFEShell::Drag( const Point *pPt, bool )
|
||||
void SwFEShell::Drag( const Point *pPt, bool )
|
||||
{
|
||||
OSL_ENSURE( Imp()->HasDrawView(), "Drag without DrawView?" );
|
||||
if ( Imp()->GetDrawView()->IsDragObj() )
|
||||
@@ -726,9 +726,7 @@ long SwFEShell::Drag( const Point *pPt, bool )
|
||||
Imp()->GetDrawView()->MovDragObj( *pPt );
|
||||
Imp()->GetDrawView()->ShowDragAnchor();
|
||||
::FrameNotify( this );
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void SwFEShell::EndDrag()
|
||||
|
@@ -99,11 +99,12 @@ private:
|
||||
using SwCursorShell::GotoMark;
|
||||
|
||||
typedef long (SwWrtShell::*SELECTFUNC)(const Point *, bool bProp );
|
||||
typedef void (SwWrtShell::*SELECTFUNC2)(const Point *, bool bProp );
|
||||
|
||||
SELECTFUNC m_fnDrag;
|
||||
SELECTFUNC m_fnSetCursor;
|
||||
SELECTFUNC m_fnEndDrag;
|
||||
SELECTFUNC m_fnKillSel;
|
||||
SELECTFUNC2 m_fnDrag;
|
||||
SELECTFUNC m_fnSetCursor;
|
||||
SELECTFUNC2 m_fnEndDrag;
|
||||
SELECTFUNC m_fnKillSel;
|
||||
|
||||
public:
|
||||
|
||||
@@ -574,17 +575,17 @@ private:
|
||||
|
||||
SAL_DLLPRIVATE long SetCursorKillSel(const Point *, bool bProp );
|
||||
|
||||
SAL_DLLPRIVATE long BeginDrag(const Point *, bool bProp );
|
||||
SAL_DLLPRIVATE long DefaultDrag(const Point *, bool bProp );
|
||||
SAL_DLLPRIVATE long DefaultEndDrag(const Point *, bool bProp );
|
||||
SAL_DLLPRIVATE void BeginDrag(const Point *, bool bProp );
|
||||
SAL_DLLPRIVATE void DefaultDrag(const Point *, bool bProp );
|
||||
SAL_DLLPRIVATE void DefaultEndDrag(const Point *, bool bProp );
|
||||
|
||||
SAL_DLLPRIVATE long ExtSelWrd(const Point *, bool bProp );
|
||||
SAL_DLLPRIVATE long ExtSelLn(const Point *, bool bProp );
|
||||
SAL_DLLPRIVATE void ExtSelWrd(const Point *, bool bProp );
|
||||
SAL_DLLPRIVATE void ExtSelLn(const Point *, bool bProp );
|
||||
|
||||
SAL_DLLPRIVATE long BeginFrameDrag(const Point *, bool bProp );
|
||||
SAL_DLLPRIVATE void BeginFrameDrag(const Point *, bool bProp );
|
||||
|
||||
// after SSize/Move of a frame update; Point is destination.
|
||||
SAL_DLLPRIVATE long UpdateLayoutFrame(const Point *, bool bProp );
|
||||
SAL_DLLPRIVATE void UpdateLayoutFrame(const Point *, bool bProp );
|
||||
|
||||
SAL_DLLPRIVATE void SttLeaveSelect();
|
||||
SAL_DLLPRIVATE void AddLeaveSelect();
|
||||
@@ -629,7 +630,7 @@ inline bool SwWrtShell::IsInClickToEdit() const { return m_bIsInClickToEdit; }
|
||||
inline bool SwWrtShell::Is_FnDragEQBeginDrag() const
|
||||
{
|
||||
#ifdef __GNUC__
|
||||
SELECTFUNC fnTmp = &SwWrtShell::BeginDrag;
|
||||
SELECTFUNC2 fnTmp = &SwWrtShell::BeginDrag;
|
||||
return m_fnDrag == fnTmp;
|
||||
#else
|
||||
return m_fnDrag == &SwWrtShell::BeginDrag;
|
||||
|
@@ -414,11 +414,11 @@ void SwWrtShell::EndSelect()
|
||||
pWrdCnt->UpdateCounts();
|
||||
}
|
||||
|
||||
long SwWrtShell::ExtSelWrd(const Point *pPt, bool )
|
||||
void SwWrtShell::ExtSelWrd(const Point *pPt, bool )
|
||||
{
|
||||
SwMvContext aMvContext(this);
|
||||
if( IsTableMode() )
|
||||
return 1;
|
||||
return;
|
||||
|
||||
// Bug 66823: actual crsr has in additional mode no selection?
|
||||
// Then destroy the actual an go to prev, this will be expand
|
||||
@@ -434,7 +434,7 @@ long SwWrtShell::ExtSelWrd(const Point *pPt, bool )
|
||||
}
|
||||
|
||||
// check the direction of the selection with the new point
|
||||
bool bRet = false, bMoveCursor = true, bToTop = false;
|
||||
bool bMoveCursor = true, bToTop = false;
|
||||
SwCursorShell::SelectWord( &m_aStart ); // select the startword
|
||||
SwCursorShell::Push(); // save the cursor
|
||||
SwCursorShell::SetCursor( *pPt ); // and check the direction
|
||||
@@ -461,7 +461,6 @@ long SwWrtShell::ExtSelWrd(const Point *pPt, bool )
|
||||
if( bToTop )
|
||||
SwapPam();
|
||||
Combine();
|
||||
bRet = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -470,17 +469,14 @@ long SwWrtShell::ExtSelWrd(const Point *pPt, bool )
|
||||
SwapPam();
|
||||
}
|
||||
}
|
||||
else
|
||||
bRet = true;
|
||||
return bRet ? 1 : 0;
|
||||
}
|
||||
|
||||
long SwWrtShell::ExtSelLn(const Point *pPt, bool )
|
||||
void SwWrtShell::ExtSelLn(const Point *pPt, bool )
|
||||
{
|
||||
SwMvContext aMvContext(this);
|
||||
SwCursorShell::SetCursor(*pPt);
|
||||
if( IsTableMode() )
|
||||
return 1;
|
||||
return;
|
||||
|
||||
// Bug 66823: actual crsr has in additional mode no selection?
|
||||
// Then destroy the actual an go to prev, this will be expand
|
||||
@@ -513,7 +509,10 @@ long SwWrtShell::ExtSelLn(const Point *pPt, bool )
|
||||
}
|
||||
SwapPam();
|
||||
|
||||
return (bToTop ? SwCursorShell::GoStartSentence() : SwCursorShell::GoEndSentence()) ? 1 : 0;
|
||||
if (bToTop)
|
||||
SwCursorShell::GoStartSentence();
|
||||
else
|
||||
SwCursorShell::GoEndSentence();
|
||||
}
|
||||
|
||||
// Back into the standard mode: no mode, no selections.
|
||||
@@ -657,7 +656,7 @@ void SwWrtShell::SetRedlineFlagsAndCheckInsMode( RedlineFlags eMode )
|
||||
|
||||
// Edit frame
|
||||
|
||||
long SwWrtShell::BeginFrameDrag(const Point *pPt, bool bIsShift)
|
||||
void SwWrtShell::BeginFrameDrag(const Point *pPt, bool bIsShift)
|
||||
{
|
||||
m_fnDrag = &SwFEShell::Drag;
|
||||
if(bStartDrag)
|
||||
@@ -667,7 +666,6 @@ long SwWrtShell::BeginFrameDrag(const Point *pPt, bool bIsShift)
|
||||
}
|
||||
else
|
||||
SwFEShell::BeginDrag( pPt, bIsShift );
|
||||
return 1;
|
||||
}
|
||||
|
||||
void SwWrtShell::EnterSelFrameMode(const Point *pPos)
|
||||
@@ -717,12 +715,11 @@ IMPL_LINK( SwWrtShell, ExecFlyMac, const SwFlyFrameFormat*, pFlyFormat, void )
|
||||
}
|
||||
}
|
||||
|
||||
long SwWrtShell::UpdateLayoutFrame(const Point *, bool )
|
||||
void SwWrtShell::UpdateLayoutFrame(const Point *, bool )
|
||||
{
|
||||
// still a dummy
|
||||
SwFEShell::EndDrag();
|
||||
m_fnDrag = &SwWrtShell::BeginFrameDrag;
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Handler for toggling the modes. Returns back the old mode.
|
||||
@@ -749,7 +746,7 @@ bool SwWrtShell::ToggleExtMode()
|
||||
|
||||
// Dragging in standard mode (Selecting of content)
|
||||
|
||||
long SwWrtShell::BeginDrag(const Point * /*pPt*/, bool )
|
||||
void SwWrtShell::BeginDrag(const Point * /*pPt*/, bool )
|
||||
{
|
||||
if(m_bSelWrd)
|
||||
{
|
||||
@@ -771,19 +768,15 @@ long SwWrtShell::BeginDrag(const Point * /*pPt*/, bool )
|
||||
m_fnDrag = &SwWrtShell::DefaultDrag;
|
||||
SttSelect();
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
long SwWrtShell::DefaultDrag(const Point *, bool )
|
||||
void SwWrtShell::DefaultDrag(const Point *, bool )
|
||||
{
|
||||
if( IsSelTableCells() )
|
||||
m_aSelTableLink.Call(*this);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
long SwWrtShell::DefaultEndDrag(const Point * /*pPt*/, bool )
|
||||
void SwWrtShell::DefaultEndDrag(const Point * /*pPt*/, bool )
|
||||
{
|
||||
m_fnDrag = &SwWrtShell::BeginDrag;
|
||||
if( IsExtSel() )
|
||||
@@ -792,7 +785,6 @@ long SwWrtShell::DefaultEndDrag(const Point * /*pPt*/, bool )
|
||||
if( IsSelTableCells() )
|
||||
m_aSelTableLink.Call(*this);
|
||||
EndSelect();
|
||||
return 1;
|
||||
}
|
||||
|
||||
// #i32329# Enhanced table selection
|
||||
|
Reference in New Issue
Block a user