Kaydet (Commit) 4d9532d7 authored tarafından Jan Holesovsky's avatar Jan Holesovsky Kaydeden (comit) Miklos Vajna

sc tiled editing: Don't show the cell selection when editing text in shape.

Change-Id: I1ddaa02e64a912c880faec9f907e9526432f6bcd
üst 08773172
...@@ -5764,6 +5764,22 @@ static void updateLibreOfficeKitSelection(ScViewData* pViewData, ScDrawLayer* pD ...@@ -5764,6 +5764,22 @@ static void updateLibreOfficeKitSelection(ScViewData* pViewData, ScDrawLayer* pD
void ScGridWindow::UpdateCursorOverlay() void ScGridWindow::UpdateCursorOverlay()
{ {
ScDocument* pDoc = pViewData->GetDocument();
bool bIsTiledRendering = pDoc->GetDrawLayer()->isTiledRendering();
// in the tiled rendering case, exit early if we are not supposed to draw
// the cell cursor:
// - there is a selection (either cell selection, or graphic object)
// - the user is typing inside a shape or so
if (bIsTiledRendering &&
(pViewData->GetMarkData().IsMarked() || pViewData->GetMarkData().IsMultiMarked() ||
pViewData->GetViewShell()->GetScDrawView()->IsMarking() ||
pViewData->GetViewShell()->GetScDrawView()->IsTextEdit() ||
pViewData->HasEditView(eWhich)))
{
return;
}
MapMode aDrawMode = GetDrawMapMode(); MapMode aDrawMode = GetDrawMapMode();
MapMode aOldMode = GetMapMode(); MapMode aOldMode = GetMapMode();
if ( aOldMode != aDrawMode ) if ( aOldMode != aDrawMode )
...@@ -5782,7 +5798,6 @@ void ScGridWindow::UpdateCursorOverlay() ...@@ -5782,7 +5798,6 @@ void ScGridWindow::UpdateCursorOverlay()
SCCOL nX = pViewData->GetCurX(); SCCOL nX = pViewData->GetCurX();
SCROW nY = pViewData->GetCurY(); SCROW nY = pViewData->GetCurY();
ScDocument* pDoc = pViewData->GetDocument();
const ScPatternAttr* pPattern = pDoc->GetPattern(nX,nY,nTab); const ScPatternAttr* pPattern = pDoc->GetPattern(nX,nY,nTab);
if (!maVisibleRange.isInside(nX, nY)) if (!maVisibleRange.isInside(nX, nY))
...@@ -5840,7 +5855,6 @@ void ScGridWindow::UpdateCursorOverlay() ...@@ -5840,7 +5855,6 @@ void ScGridWindow::UpdateCursorOverlay()
} }
// in the tiled rendering case, don't limit to the screen size // in the tiled rendering case, don't limit to the screen size
bool bIsTiledRendering = pDoc->GetDrawLayer()->isTiledRendering();
if (bMaybeVisible || bIsTiledRendering) if (bMaybeVisible || bIsTiledRendering)
{ {
long nSizeXPix; long nSizeXPix;
...@@ -5925,15 +5939,8 @@ void ScGridWindow::UpdateCursorOverlay() ...@@ -5925,15 +5939,8 @@ void ScGridWindow::UpdateCursorOverlay()
mpOOCursors.reset(new sdr::overlay::OverlayObjectList); mpOOCursors.reset(new sdr::overlay::OverlayObjectList);
mpOOCursors->append(*pOverlay); mpOOCursors->append(*pOverlay);
// notify the LibreOfficeKit too, but only if there's no // notify the LibreOfficeKit too
// selection yet (either cell selection, or graphic object), updateLibreOfficeKitSelection(pViewData, pDoc->GetDrawLayer(), aPixelRects);
// to avoid setting the LOK selection twice
// (once for the cell only, and then for the selection)
if (!pViewData->GetMarkData().IsMarked() && !pViewData->GetMarkData().IsMultiMarked() &&
!pViewData->GetViewShell()->GetScDrawView()->IsMarking())
{
updateLibreOfficeKitSelection(pViewData, pDoc->GetDrawLayer(), aPixelRects);
}
} }
} }
......
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