diff options
Diffstat (limited to 'dbaccess/source/ui/tabledesign/TableUndo.cxx')
-rw-r--r-- | dbaccess/source/ui/tabledesign/TableUndo.cxx | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/dbaccess/source/ui/tabledesign/TableUndo.cxx b/dbaccess/source/ui/tabledesign/TableUndo.cxx index 0edd32436918..7829a09d6959 100644 --- a/dbaccess/source/ui/tabledesign/TableUndo.cxx +++ b/dbaccess/source/ui/tabledesign/TableUndo.cxx @@ -25,12 +25,13 @@ #include <TableDesignView.hxx> #include <FieldDescriptions.hxx> #include <svx/svxids.hrc> +#include <utility> using namespace dbaui; using namespace ::svt; -OTableDesignUndoAct::OTableDesignUndoAct(OTableRowView* pOwner, const char* pCommentID) +OTableDesignUndoAct::OTableDesignUndoAct(OTableRowView* pOwner, TranslateId pCommentID) : OCommentUndoAction(pCommentID) , m_pTabDgnCtrl(pOwner) { @@ -65,7 +66,7 @@ void OTableDesignUndoAct::Redo() } } -OTableDesignCellUndoAct::OTableDesignCellUndoAct( OTableRowView* pOwner, tools::Long nRowID, sal_uInt16 nColumn ) : +OTableDesignCellUndoAct::OTableDesignCellUndoAct( OTableRowView* pOwner, sal_Int32 nRowID, sal_uInt16 nColumn ) : OTableDesignUndoAct( pOwner ,STR_TABED_UNDO_CELLMODIFIED) ,m_nCol( nColumn ) ,m_nRow( nRowID ) @@ -106,7 +107,7 @@ void OTableDesignCellUndoAct::Redo() OTableDesignUndoAct::Redo(); } -OTableEditorUndoAct::OTableEditorUndoAct(OTableEditorCtrl* pOwner, const char* pCommentID) +OTableEditorUndoAct::OTableEditorUndoAct(OTableEditorCtrl* pOwner, TranslateId pCommentID) : OTableDesignUndoAct(pOwner, pCommentID) , pTabEdCtrl(pOwner) { @@ -116,11 +117,11 @@ OTableEditorUndoAct::~OTableEditorUndoAct() { } -OTableEditorTypeSelUndoAct::OTableEditorTypeSelUndoAct( OTableEditorCtrl* pOwner, tools::Long nRowID, sal_uInt16 nColumn, const TOTypeInfoSP& _pOldType ) +OTableEditorTypeSelUndoAct::OTableEditorTypeSelUndoAct( OTableEditorCtrl* pOwner, sal_Int32 nRowID, sal_uInt16 nColumn, TOTypeInfoSP _pOldType ) :OTableEditorUndoAct( pOwner ,STR_TABED_UNDO_TYPE_CHANGED) ,m_nCol( nColumn ) ,m_nRow( nRowID ) - ,m_pOldType( _pOldType ) + ,m_pOldType(std::move( _pOldType )) { } @@ -178,7 +179,7 @@ OTableEditorDelUndoAct::~OTableEditorDelUndoAct() void OTableEditorDelUndoAct::Undo() { // Insert the deleted line - sal_uLong nPos; + sal_Int32 nPos; std::shared_ptr<OTableRow> pNewOrigRow; std::vector< std::shared_ptr<OTableRow> >* pOriginalRows = pTabEdCtrl->GetRowList(); @@ -213,9 +214,9 @@ void OTableEditorDelUndoAct::Redo() OTableEditorInsUndoAct::OTableEditorInsUndoAct( OTableEditorCtrl* pOwner, tools::Long nInsertPosition , - const std::vector< std::shared_ptr<OTableRow> >& _vInsertedRows) + std::vector< std::shared_ptr<OTableRow> >&& _vInsertedRows) :OTableEditorUndoAct( pOwner,STR_TABED_UNDO_ROWINSERTED ) - ,m_vInsertedRows(_vInsertedRows) + ,m_vInsertedRows(std::move(_vInsertedRows)) ,m_nInsPos( nInsertPosition ) { } @@ -240,7 +241,7 @@ void OTableEditorInsUndoAct::Undo() void OTableEditorInsUndoAct::Redo() { // insert lines again - tools::Long nInsertRow = m_nInsPos; + sal_Int32 nInsertRow = m_nInsPos; std::shared_ptr<OTableRow> pRow; std::vector< std::shared_ptr<OTableRow> >* pRowList = pTabEdCtrl->GetRowList(); for (auto const& insertedRow : m_vInsertedRows) @@ -256,7 +257,7 @@ void OTableEditorInsUndoAct::Redo() OTableEditorUndoAct::Redo(); } -OTableEditorInsNewUndoAct::OTableEditorInsNewUndoAct( OTableEditorCtrl* pOwner, tools::Long nInsertPosition, tools::Long nInsertedRows ) : +OTableEditorInsNewUndoAct::OTableEditorInsNewUndoAct( OTableEditorCtrl* pOwner, sal_Int32 nInsertPosition, sal_Int32 nInsertedRows ) : OTableEditorUndoAct( pOwner ,STR_TABED_UNDO_NEWROWINSERTED) ,m_nInsPos( nInsertPosition ) ,m_nInsRows( nInsertedRows ) |