Kaydet (Commit) 741599f3 authored tarafından Miklos Vajna's avatar Miklos Vajna

SdrMarkView tiled rendering: partially disable SdrTableObj graphic selection

If one or more cells are selected in an Impress table, then the shape
already provides its own text selection, don't overwrite it with the
generic graphic selection in this case.

Change-Id: I4f84a220df6cd9d225ed67d6f70ba2df6eff38af
üst 986c685e
......@@ -92,7 +92,7 @@ public:
SVX_DLLPRIVATE virtual bool GetMarkedObjModel( SdrPage* pNewPage ) SAL_OVERRIDE;
SVX_DLLPRIVATE virtual bool PasteObjModel( const SdrModel& rModel ) SAL_OVERRIDE;
SVX_DLLPRIVATE bool hasSelectedCells() const { return mbCellSelectionMode || mpView->IsTextEdit(); }
SVX_DLLPRIVATE virtual bool hasSelectedCells() const SAL_OVERRIDE { return mbCellSelectionMode || mpView->IsTextEdit(); }
void getSelectedCells( CellPos& rFirstPos, CellPos& rLastPos );
void setSelectedCells( const CellPos& rFirstPos, const CellPos& rLastPos );
......
......@@ -68,6 +68,8 @@ public:
if bNoParagraphFormats is true, no paragraph attributes are changed.
*/
virtual bool ApplyFormatPaintBrush( SfxItemSet& rFormatSet, bool bNoCharacterFormats, bool bNoParagraphFormats );
/// This is a table object, and one or more of its cells are selected.
virtual bool hasSelectedCells() const;
};
}
......
......@@ -100,6 +100,11 @@ bool SelectionController::ApplyFormatPaintBrush( SfxItemSet& /*rFormatSet*/, boo
return false;
}
bool SelectionController::hasSelectedCells() const
{
return false;
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -703,6 +703,17 @@ void SdrMarkView::SetMarkHandles()
{
return;
}
if (bTiledRendering && pMarkedObj->GetObjIdentifier() == OBJ_TABLE)
{
rtl::Reference<sdr::SelectionController> xController = static_cast<SdrView*>(this)->getSelectionController();
if (xController.is() && xController->hasSelectedCells())
{
// The table shape has selected cells, which provide text selection already -> no graphic selection.
GetModel()->libreOfficeKitCallback(LOK_CALLBACK_GRAPHIC_SELECTION, "EMPTY");
return;
}
}
}
Rectangle aRect(GetMarkedObjRect());
......
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