Kaydet (Commit) 76ce1630 authored tarafından Caolán McNamara's avatar Caolán McNamara

refactor to create a HasMarked, no logic change

Change-Id: I667a8582a740f5fbbcdbcd82907e40e82f6165a1
üst f4d2337e
......@@ -51,6 +51,7 @@ public:
SVX_DLLPRIVATE virtual bool onMouseButtonUp(const MouseEvent& rMEvt, vcl::Window* pWin) SAL_OVERRIDE;
SVX_DLLPRIVATE virtual bool onMouseMove(const MouseEvent& rMEvt, vcl::Window* pWin) SAL_OVERRIDE;
SVX_DLLPRIVATE virtual bool HasMarked() SAL_OVERRIDE;
SVX_DLLPRIVATE virtual bool DeleteMarked() SAL_OVERRIDE;
SVX_DLLPRIVATE virtual void onSelectionHasChanged() SAL_OVERRIDE;
......
......@@ -50,6 +50,7 @@ public:
virtual void GetState( SfxItemSet& rSet );
virtual void Execute( SfxRequest& rReq );
virtual bool HasMarked();
virtual bool DeleteMarked();
virtual bool GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) const;
......
......@@ -55,6 +55,11 @@ void SelectionController::Execute( SfxRequest& /*rReq*/ )
{
}
bool SelectionController::HasMarked()
{
return false;
}
bool SelectionController::DeleteMarked()
{
return false;
......
......@@ -1325,12 +1325,16 @@ void SvxTableController::DistributeRows()
}
}
bool SvxTableController::HasMarked()
{
return mbCellSelectionMode && mxTable.is();
}
bool SvxTableController::DeleteMarked()
{
if( mbCellSelectionMode )
{
if( mxTable.is() )
{
if (!HasMarked())
return false;
const bool bUndo = mpModel && mpModel->IsUndoEnabled();
if (bUndo)
mpModel->BegUndo(ImpGetResStr(STR_TABLE_DELETE_CELL_CONTENTS));
......@@ -1356,10 +1360,6 @@ bool SvxTableController::DeleteMarked()
UpdateTableShape();
return true;
}
}
return false;
}
bool SvxTableController::GetStyleSheet( SfxStyleSheet*& rpStyleSheet ) const
......
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