summaryrefslogtreecommitdiffstats
path: root/svx/source/table/tablecontroller.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/table/tablecontroller.cxx')
-rw-r--r--svx/source/table/tablecontroller.cxx54
1 files changed, 27 insertions, 27 deletions
diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx
index 59dec64df181..f683569df3df 100644
--- a/svx/source/table/tablecontroller.cxx
+++ b/svx/source/table/tablecontroller.cxx
@@ -174,10 +174,10 @@ SvxTableController::SvxTableController( SdrObjEditView* pView, const SdrObject*
if( mxTableObj.is() )
{
- static_cast< const SdrTableObj* >( pObj )->getActiveCellPos( maCursorFirstPos );
+ mxTableObj->getActiveCellPos( maCursorFirstPos );
maCursorLastPos = maCursorFirstPos;
- Reference< XTable > xTable( static_cast< const SdrTableObj* >( pObj )->getTable() );
+ Reference< XTable > xTable( mxTableObj->getTable() );
if( xTable.is() )
{
mxModifyListener = new SvxTableControllerModifyListener( this );
@@ -198,7 +198,7 @@ SvxTableController::~SvxTableController()
if( mxModifyListener.is() && mxTableObj.get() )
{
- Reference< XTable > xTable( static_cast< SdrTableObj* >( mxTableObj.get() )->getTable() );
+ Reference< XTable > xTable( mxTableObj->getTable() );
if( xTable.is() )
{
xTable->removeModifyListener( mxModifyListener );
@@ -273,7 +273,7 @@ bool SvxTableController::onMouseButtonDown(const MouseEvent& rMEvt, vcl::Window*
if( !rMEvt.IsRight() && mpView->PickAnything(rMEvt,SdrMouseEventKind::BUTTONDOWN, aVEvt) == SdrHitKind::Handle )
return false;
- TableHitKind eHit = static_cast< SdrTableObj* >(mxTableObj.get())->CheckTableHit(pixelToLogic(rMEvt.GetPosPixel(), pWindow), maMouseDownPos.mnCol, maMouseDownPos.mnRow);
+ TableHitKind eHit = mxTableObj->CheckTableHit(pixelToLogic(rMEvt.GetPosPixel(), pWindow), maMouseDownPos.mnCol, maMouseDownPos.mnRow);
mbLeftButtonDown = (rMEvt.GetClicks() == 1) && rMEvt.IsLeft();
@@ -299,7 +299,7 @@ bool SvxTableController::onMouseButtonDown(const MouseEvent& rMEvt, vcl::Window*
}
else
{
- sdr::table::SdrTableObj* pTableObj = dynamic_cast< sdr::table::SdrTableObj* >( mxTableObj.get() );
+ sdr::table::SdrTableObj* pTableObj = mxTableObj.get();
if( !pWindow || !pTableObj || eHit == TableHitKind::NONE)
{
@@ -350,7 +350,7 @@ bool SvxTableController::onMouseMove(const MouseEvent& rMEvt, vcl::Window* pWind
if( !checkTableObject() )
return false;
- SdrTableObj* pTableObj = dynamic_cast< SdrTableObj* >( mxTableObj.get() );
+ SdrTableObj* pTableObj = mxTableObj.get();
CellPos aPos;
if (mbLeftButtonDown && pTableObj && pTableObj->CheckTableHit(pixelToLogic(rMEvt.GetPosPixel(), pWindow), aPos.mnCol, aPos.mnRow ) != TableHitKind::NONE)
{
@@ -380,7 +380,7 @@ void SvxTableController::onSelectionHasChanged()
{
bool bSelected = false;
- SdrTableObj* pTableObj = dynamic_cast< SdrTableObj* >( mxTableObj.get() );
+ SdrTableObj* pTableObj = mxTableObj.get();
if( pTableObj && pTableObj->IsTextEditActive() )
{
pTableObj->getActiveCellPos( maCursorFirstPos );
@@ -512,7 +512,7 @@ void SvxTableController::GetState( SfxItemSet& rSet )
void SvxTableController::onInsert( sal_uInt16 nSId, const SfxItemSet* pArgs )
{
- sdr::table::SdrTableObj* pTableObj = dynamic_cast< sdr::table::SdrTableObj* >( mxTableObj.get() );
+ sdr::table::SdrTableObj* pTableObj = mxTableObj.get();
if( !pTableObj )
return;
@@ -788,7 +788,7 @@ void SvxTableController::onInsert( sal_uInt16 nSId, const SfxItemSet* pArgs )
void SvxTableController::onDelete( sal_uInt16 nSId )
{
- sdr::table::SdrTableObj* pTableObj = dynamic_cast< sdr::table::SdrTableObj* >( mxTableObj.get() );
+ sdr::table::SdrTableObj* pTableObj = mxTableObj.get();
if( !pTableObj )
return;
@@ -893,7 +893,7 @@ namespace
void SvxTableController::onFormatTable( SfxRequest const & rReq )
{
- sdr::table::SdrTableObj* pTableObj = dynamic_cast< sdr::table::SdrTableObj* >( mxTableObj.get() );
+ sdr::table::SdrTableObj* pTableObj = mxTableObj.get();
if( !pTableObj )
return;
@@ -1033,7 +1033,7 @@ void SvxTableController::Execute( SfxRequest& rReq )
void SvxTableController::SetTableStyle( const SfxItemSet* pArgs )
{
- SdrTableObj* pTableObj = dynamic_cast< sdr::table::SdrTableObj* >( mxTableObj.get() );
+ SdrTableObj* pTableObj = mxTableObj.get();
SdrModel* pModel = pTableObj ? pTableObj->GetModel() : nullptr;
if( !pTableObj || !pModel || !pArgs || (SfxItemState::SET != pArgs->GetItemState(SID_TABLE_STYLE, false)) )
@@ -1116,7 +1116,7 @@ void SvxTableController::SetTableStyle( const SfxItemSet* pArgs )
void SvxTableController::SetTableStyleSettings( const SfxItemSet* pArgs )
{
- SdrTableObj* pTableObj = dynamic_cast< sdr::table::SdrTableObj* >( mxTableObj.get() );
+ SdrTableObj* pTableObj = mxTableObj.get();
SdrModel* pModel = pTableObj ? pTableObj->GetModel() : nullptr;
if( !pTableObj || !pModel )
@@ -1163,7 +1163,7 @@ void SvxTableController::SetTableStyleSettings( const SfxItemSet* pArgs )
void SvxTableController::SetVertical( sal_uInt16 nSId )
{
- SdrTableObj* pTableObj = dynamic_cast< sdr::table::SdrTableObj* >( mxTableObj.get() );
+ SdrTableObj* pTableObj = mxTableObj.get();
if( !mxTable.is() || !pTableObj )
return;
@@ -1222,7 +1222,7 @@ void SvxTableController::MergeMarkedCells()
{
CellPos aStart, aEnd;
getSelectedCells( aStart, aEnd );
- SdrTableObj* pTableObj = dynamic_cast< sdr::table::SdrTableObj* >( mxTableObj.get() );
+ SdrTableObj* pTableObj = mxTableObj.get();
if( pTableObj )
{
if( pTableObj->IsTextEditActive() )
@@ -1256,7 +1256,7 @@ void SvxTableController::SplitMarkedCells()
const sal_Int32 nColCount = mxTable->getColumnCount();
- SdrTableObj* pTableObj = dynamic_cast< SdrTableObj* >( mxTableObj.get() );
+ SdrTableObj* pTableObj = mxTableObj.get();
if( pTableObj )
{
if( pTableObj->IsTextEditActive() )
@@ -1293,7 +1293,7 @@ void SvxTableController::SplitMarkedCells()
void SvxTableController::DistributeColumns()
{
- SdrTableObj* pTableObj = dynamic_cast< SdrTableObj* >( mxTableObj.get() );
+ SdrTableObj* pTableObj = mxTableObj.get();
if( pTableObj )
{
const bool bUndo = mpModel && mpModel->IsUndoEnabled();
@@ -1314,7 +1314,7 @@ void SvxTableController::DistributeColumns()
void SvxTableController::DistributeRows()
{
- SdrTableObj* pTableObj = dynamic_cast< SdrTableObj* >( mxTableObj.get() );
+ SdrTableObj* pTableObj = mxTableObj.get();
if( pTableObj )
{
const bool bUndo = mpModel && mpModel->IsUndoEnabled();
@@ -1456,7 +1456,7 @@ SvxTableController::TblAction SvxTableController::getKeyboardAction(const KeyEve
TblAction nAction = TblAction::HandledByView;
- sdr::table::SdrTableObj* pTableObj = dynamic_cast< sdr::table::SdrTableObj* >( mxTableObj.get() );
+ sdr::table::SdrTableObj* pTableObj = mxTableObj.get();
if( !pTableObj )
return nAction;
@@ -1637,7 +1637,7 @@ SvxTableController::TblAction SvxTableController::getKeyboardAction(const KeyEve
bool SvxTableController::executeAction(TblAction nAction, bool bSelect, vcl::Window* pWindow)
{
- sdr::table::SdrTableObj* pTableObj = dynamic_cast< sdr::table::SdrTableObj* >( mxTableObj.get() );
+ sdr::table::SdrTableObj* pTableObj = mxTableObj.get();
if( !pTableObj )
return false;
@@ -1746,14 +1746,14 @@ bool SvxTableController::executeAction(TblAction nAction, bool bSelect, vcl::Win
void SvxTableController::gotoCell(const CellPos& rPos, bool bSelect, vcl::Window* pWindow, TblAction nAction /*= TblAction::NONE */)
{
- if( mxTableObj.is() && static_cast<SdrTableObj*>(mxTableObj.get())->IsTextEditActive() )
+ if( mxTableObj.is() && mxTableObj->IsTextEditActive() )
mpView->SdrEndTextEdit(true);
if( bSelect )
{
maCursorLastPos = rPos;
if( mxTableObj.is() )
- static_cast< SdrTableObj* >( mxTableObj.get() )->setActiveCell( rPos );
+ mxTableObj->setActiveCell( rPos );
if( !mbCellSelectionMode )
{
@@ -1857,7 +1857,7 @@ void SvxTableController::EditCell(const CellPos& rPos, vcl::Window* pWindow, Tbl
{
SdrPageView* pPV = mpView->GetSdrPageView();
- sdr::table::SdrTableObj* pTableObj = dynamic_cast< sdr::table::SdrTableObj* >( mxTableObj.get() );
+ sdr::table::SdrTableObj* pTableObj = mxTableObj.get();
if( pTableObj && pTableObj->GetPage() == pPV->GetPage() )
{
bool bEmptyOutliner = false;
@@ -2123,7 +2123,7 @@ void SvxTableController::updateSelectionOverlay()
destroySelectionOverlay();
if( mbCellSelectionMode )
{
- sdr::table::SdrTableObj* pTableObj = dynamic_cast< sdr::table::SdrTableObj* >( mxTableObj.get() );
+ sdr::table::SdrTableObj* pTableObj = mxTableObj.get();
if( pTableObj )
{
sdr::overlay::OverlayObjectCell::RangeVector aRanges;
@@ -2595,7 +2595,7 @@ bool SvxTableController::GetMarkedObjModel( SdrPage* pNewPage )
{
if( mxTableObj.is() && mbCellSelectionMode && pNewPage ) try
{
- sdr::table::SdrTableObj& rTableObj = *static_cast< sdr::table::SdrTableObj* >( mxTableObj.get() );
+ sdr::table::SdrTableObj& rTableObj = *mxTableObj.get();
CellPos aStart, aEnd;
getSelectedCells( aStart, aEnd );
@@ -3084,7 +3084,7 @@ bool SvxTableController::isColumnSelected( sal_Int32 nColumn )
bool SvxTableController::isRowHeader()
{
- SdrTableObj* pTableObj = dynamic_cast< sdr::table::SdrTableObj* >( mxTableObj.get() );
+ SdrTableObj* pTableObj = mxTableObj.get();
SdrModel* pModel = pTableObj ? pTableObj->GetModel() : nullptr;
if( !pTableObj || !pModel )
@@ -3097,7 +3097,7 @@ bool SvxTableController::isRowHeader()
bool SvxTableController::isColumnHeader()
{
- SdrTableObj* pTableObj = dynamic_cast< sdr::table::SdrTableObj* >( mxTableObj.get() );
+ SdrTableObj* pTableObj = mxTableObj.get();
SdrModel* pModel = pTableObj ? pTableObj->GetModel() : nullptr;
if( !pTableObj || !pModel )
@@ -3113,7 +3113,7 @@ bool SvxTableController::setCursorLogicPosition(const Point& rPosition, bool bPo
if (mxTableObj->GetObjIdentifier() != OBJ_TABLE)
return false;
- SdrTableObj* pTableObj = static_cast<SdrTableObj*>(mxTableObj.get());
+ SdrTableObj* pTableObj = mxTableObj.get();
CellPos aCellPos;
if (pTableObj->CheckTableHit(rPosition, aCellPos.mnCol, aCellPos.mnRow) != TableHitKind::NONE)
{