Kaydet (Commit) 190a4ee5 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Revert "it makes no sense to use the second column as well, fdo#81499"

This reverts commit 14277af5.

There is a reason why we do this, to allow misspelled word outside the
cell area to be right-clickable.
üst 1e03324c
...@@ -273,7 +273,7 @@ class ScGridWindow : public Window, public DropTargetHelper, public DragSourceHe ...@@ -273,7 +273,7 @@ class ScGridWindow : public Window, public DropTargetHelper, public DragSourceHe
bool GetEditUrl( const Point& rPos, bool GetEditUrl( const Point& rPos,
OUString* pName=0, OUString* pUrl=0, OUString* pTarget=0 ); OUString* pName=0, OUString* pUrl=0, OUString* pTarget=0 );
bool IsSpellErrorAtPos( const Point& rPos, SCCOL nCol1, SCROW nRow ); bool IsSpellErrorAtPos( const Point& rPos, SCCOL nCol1, SCCOL nCol2, SCROW nRow );
bool HitRangeFinder( const Point& rMouse, RfCorner& rCorner, sal_uInt16* pIndex = NULL, bool HitRangeFinder( const Point& rMouse, RfCorner& rCorner, sal_uInt16* pIndex = NULL,
SCsCOL* pAddX = NULL, SCsROW* pAddY = NULL ); SCsCOL* pAddX = NULL, SCsROW* pAddY = NULL );
......
...@@ -3010,7 +3010,7 @@ void ScGridWindow::Command( const CommandEvent& rCEvt ) ...@@ -3010,7 +3010,7 @@ void ScGridWindow::Command( const CommandEvent& rCEvt )
if (bSpellError) if (bSpellError)
{ {
// Check and see if a misspelled word is under the mouse pointer. // Check and see if a misspelled word is under the mouse pointer.
bSpellError = IsSpellErrorAtPos(aPosPixel, nColSpellError, nCellY); bSpellError = IsSpellErrorAtPos(aPosPixel, nColSpellError, nCellX, nCellY);
} }
} }
...@@ -5334,7 +5334,7 @@ bool ScGridWindow::GetEditUrl( const Point& rPos, ...@@ -5334,7 +5334,7 @@ bool ScGridWindow::GetEditUrl( const Point& rPos,
return false; return false;
} }
bool ScGridWindow::IsSpellErrorAtPos( const Point& rPos, SCCOL nCol1, SCROW nRow ) bool ScGridWindow::IsSpellErrorAtPos( const Point& rPos, SCCOL nCol1, SCCOL nCol2, SCROW nRow )
{ {
if (!mpSpellCheckCxt) if (!mpSpellCheckCxt)
return false; return false;
...@@ -5359,6 +5359,10 @@ bool ScGridWindow::IsSpellErrorAtPos( const Point& rPos, SCCOL nCol1, SCROW nRow ...@@ -5359,6 +5359,10 @@ bool ScGridWindow::IsSpellErrorAtPos( const Point& rPos, SCCOL nCol1, SCROW nRow
if (rPos.Y() < aEditRect.Top()) if (rPos.Y() < aEditRect.Top())
return false; return false;
Rectangle aEditRect2 = pViewData->GetEditArea(eWhich, nCol2, nRow, this, pPattern, false);
long nWidth = aEditRect2.Right() - aEditRect.Left();
aEditRect.setWidth(nWidth);
MapMode aEditMode = pViewData->GetLogicMode(eWhich); MapMode aEditMode = pViewData->GetLogicMode(eWhich);
Rectangle aLogicEdit = PixelToLogic(aEditRect, aEditMode); Rectangle aLogicEdit = PixelToLogic(aEditRect, aEditMode);
Point aLogicClick = PixelToLogic(rPos, aEditMode); Point aLogicClick = PixelToLogic(rPos, aEditMode);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment