summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/svx/sdr/table/tablecontroller.hxx1
-rw-r--r--include/svx/selectioncontroller.hxx2
-rw-r--r--svx/source/svdraw/selectioncontroller.cxx4
-rw-r--r--svx/source/svdraw/svdview.cxx29
-rw-r--r--svx/source/table/tablecontroller.cxx8
5 files changed, 43 insertions, 1 deletions
diff --git a/include/svx/sdr/table/tablecontroller.hxx b/include/svx/sdr/table/tablecontroller.hxx
index 7e438015e907..5edb3666dcbf 100644
--- a/include/svx/sdr/table/tablecontroller.hxx
+++ b/include/svx/sdr/table/tablecontroller.hxx
@@ -57,6 +57,7 @@ public:
SVX_DLLPRIVATE virtual bool DeleteMarked() override;
SVX_DLLPRIVATE virtual void onSelectionHasChanged() override;
+ SVX_DLLPRIVATE virtual void onSelectAll() override;
SVX_DLLPRIVATE virtual void GetState( SfxItemSet& rSet ) override;
SVX_DLLPRIVATE virtual void Execute( SfxRequest& rReq ) override;
diff --git a/include/svx/selectioncontroller.hxx b/include/svx/selectioncontroller.hxx
index 79c19f60dc61..bc4fbbf5098c 100644
--- a/include/svx/selectioncontroller.hxx
+++ b/include/svx/selectioncontroller.hxx
@@ -50,6 +50,8 @@ public:
virtual void onSelectionHasChanged();
+ virtual void onSelectAll();
+
virtual void GetState( SfxItemSet& rSet );
virtual void Execute( SfxRequest& rReq );
diff --git a/svx/source/svdraw/selectioncontroller.cxx b/svx/source/svdraw/selectioncontroller.cxx
index 28dda4ed27a2..5f6f51312f4e 100644
--- a/svx/source/svdraw/selectioncontroller.cxx
+++ b/svx/source/svdraw/selectioncontroller.cxx
@@ -47,6 +47,10 @@ void SelectionController::onSelectionHasChanged()
{
}
+void SelectionController::onSelectAll()
+{
+}
+
void SelectionController::GetState( SfxItemSet& /*rSet*/ )
{
}
diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx
index 36fd070e1205..bb677b7707e6 100644
--- a/svx/source/svdraw/svdview.cxx
+++ b/svx/source/svdraw/svdview.cxx
@@ -35,6 +35,7 @@
#include <svdibrow.hxx>
#endif
+#include <svx/sdr/table/tablecontroller.hxx>
#include <svx/svdoutl.hxx>
#include <svx/svdview.hxx>
#include <editeng/editview.hxx>
@@ -1354,7 +1355,33 @@ void SdrView::MarkAll()
#endif
} else if (IsGluePointEditMode()) MarkAllGluePoints();
else if (HasMarkablePoints()) MarkAllPoints();
- else MarkAllObj();
+ else {
+ // check for table
+ bool bMarkAll = true;
+ const SdrMarkList& rMarkList = GetMarkedObjectList();
+ if (rMarkList.GetMarkCount() == 1)
+ {
+ const SdrObject* pObj(rMarkList.GetMark(0)->GetMarkedSdrObj());
+ SdrView* pView(dynamic_cast<SdrView*>(this));
+ if (pObj && pView && (pObj->GetObjInventor() == SdrInventor::Default)
+ && (pObj->GetObjIdentifier() == OBJ_TABLE))
+ {
+ mxSelectionController.clear();
+ mxSelectionController = sdr::table::CreateTableController(
+ *pView, static_cast<const sdr::table::SdrTableObj&>(*pObj),
+ mxLastSelectionController);
+
+ if (mxSelectionController.is())
+ {
+ mxLastSelectionController.clear();
+ mxSelectionController->onSelectAll();
+ bMarkAll = false;
+ }
+ }
+ }
+ if ( bMarkAll )
+ MarkAllObj();
+ }
}
void SdrView::UnmarkAll()
diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx
index 21d7809b3d03..464d8290e572 100644
--- a/svx/source/table/tablecontroller.cxx
+++ b/svx/source/table/tablecontroller.cxx
@@ -413,6 +413,14 @@ void SvxTableController::onSelectionHasChanged()
destroySelectionOverlay();
}
}
+void SvxTableController::onSelectAll()
+{
+ sdr::table::SdrTableObj* pTableObj = mxTableObj.get();
+ if ( pTableObj && !pTableObj->IsTextEditActive())
+ {
+ selectAll();
+ }
+}
void SvxTableController::GetState( SfxItemSet& rSet )