diff options
author | Ocke Janssen [oj] <Ocke.Janssen@oracle.com> | 2011-02-03 12:19:25 +0100 |
---|---|---|
committer | Ocke Janssen [oj] <Ocke.Janssen@oracle.com> | 2011-02-03 12:19:25 +0100 |
commit | 68c3462b2638fd9c4b6bca818213be797a2cf1f5 (patch) | |
tree | eacdd3a3a5f094a989558b5a13a0d0134409510f /dbaccess/source/ui/tabledesign | |
parent | 1152aa393130d0b8b10c771e859c0fc4d79f71c0 (diff) | |
parent | b98b964dc2735ca4c42a3905ef5eddcddba411c1 (diff) |
merge from master
Diffstat (limited to 'dbaccess/source/ui/tabledesign')
-rw-r--r-- | dbaccess/source/ui/tabledesign/TEditControl.cxx | 26 | ||||
-rw-r--r-- | dbaccess/source/ui/tabledesign/TEditControl.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/tabledesign/TableController.cxx | 11 |
3 files changed, 17 insertions, 22 deletions
diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx index 7cbff13154ed..15a26f212d01 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.cxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx @@ -263,9 +263,9 @@ OTableEditorCtrl::OTableEditorCtrl(Window* pWindow) } //------------------------------------------------------------------------------ -SfxUndoManager* OTableEditorCtrl::GetUndoManager() const +SfxUndoManager& OTableEditorCtrl::GetUndoManager() const { - return GetView()->getController().getUndoMgr(); + return GetView()->getController().GetUndoManager(); } //------------------------------------------------------------------------------ @@ -388,7 +388,7 @@ OTableEditorCtrl::~OTableEditorCtrl() DBG_DTOR(OTableEditorCtrl,NULL); ////////////////////////////////////////////////////////////////////// // Undo-Manager zuruecksetzen - GetUndoManager()->Clear(); + GetUndoManager().Clear(); ////////////////////////////////////////////////////////////////////// // Moegliche Events aus Queue entfernen @@ -677,7 +677,7 @@ sal_Bool OTableEditorCtrl::SaveData(long nRow, sal_uInt16 nColId) // Wenn FieldDescr existiert, wurde Feld geloescht und alter Inhalt wird wiederhergestellt if (pActFieldDescr) { - GetUndoManager()->AddUndoAction(new OTableEditorTypeSelUndoAct(this, nRow, FIELD_TYPE, pActFieldDescr->getTypeInfo())); + GetUndoManager().AddUndoAction(new OTableEditorTypeSelUndoAct(this, nRow, FIELD_TYPE, pActFieldDescr->getTypeInfo())); SwitchType(TOTypeInfoSP()); pActFieldDescr = pActRow->GetActFieldDescr(); } @@ -852,7 +852,7 @@ void OTableEditorCtrl::CellModified( long nRow, sal_uInt16 nColId ) default: sActionDescription = String( ModuleRes( STR_CHANGE_COLUMN_ATTRIBUTE ) ); break; } - GetUndoManager()->EnterListAction( sActionDescription, String() ); + GetUndoManager().EnterListAction( sActionDescription, String() ); if (!pActFieldDescr) { const OTypeInfoMap* pTypeInfoMap = GetView()->getController().getTypeInfo(); @@ -869,20 +869,20 @@ void OTableEditorCtrl::CellModified( long nRow, sal_uInt16 nColId ) nInvalidateTypeEvent = Application::PostUserEvent( LINK(this, OTableEditorCtrl, InvalidateFieldType) ); pActFieldDescr = pActRow->GetActFieldDescr(); pDescrWin->DisplayData( pActFieldDescr ); - GetUndoManager()->AddUndoAction( new OTableEditorTypeSelUndoAct(this, nRow, nColId+1, TOTypeInfoSP()) ); + GetUndoManager().AddUndoAction( new OTableEditorTypeSelUndoAct(this, nRow, nColId+1, TOTypeInfoSP()) ); } if( nColId != FIELD_TYPE ) - GetUndoManager()->AddUndoAction( new OTableDesignCellUndoAct(this, nRow, nColId) ); + GetUndoManager().AddUndoAction( new OTableDesignCellUndoAct(this, nRow, nColId) ); else { - GetUndoManager()->AddUndoAction(new OTableEditorTypeSelUndoAct(this, GetCurRow(), nColId, GetFieldDescr(GetCurRow())->getTypeInfo())); + GetUndoManager().AddUndoAction(new OTableEditorTypeSelUndoAct(this, GetCurRow(), nColId, GetFieldDescr(GetCurRow())->getTypeInfo())); resetType(); } SaveData(nRow,nColId); // SaveData could create a undo action as well - GetUndoManager()->LeaveListAction(); + GetUndoManager().LeaveListAction(); RowModified(nRow); CellControllerRef xController(Controller()); if(xController.Is()) @@ -1045,7 +1045,7 @@ void OTableEditorCtrl::InsertRows( long nRow ) ////////////////////////////////////////////////////////////////////// // Undo-Action erzeugen - GetUndoManager()->AddUndoAction( new OTableEditorInsUndoAct(this, nRow,vInsertedUndoRedoRows) ); + GetUndoManager().AddUndoAction( new OTableEditorInsUndoAct(this, nRow,vInsertedUndoRedoRows) ); GetView()->getController().setModified( sal_True ); InvalidateFeatures(); } @@ -1057,7 +1057,7 @@ void OTableEditorCtrl::DeleteRows() OSL_ENSURE(GetView()->getController().isDropAllowed(),"Call of DeleteRows not valid here. Please check isDropAllowed!"); ////////////////////////////////////////////////////////////////////// // Undo-Action erzeugen - GetUndoManager()->AddUndoAction( new OTableEditorDelUndoAct(this) ); + GetUndoManager().AddUndoAction( new OTableEditorDelUndoAct(this) ); ////////////////////////////////////////////////////////////////////// @@ -1105,7 +1105,7 @@ void OTableEditorCtrl::InsertNewRows( long nRow ) long nInsertRows = GetSelectRowCount(); if( !nInsertRows ) nInsertRows = 1; - GetUndoManager()->AddUndoAction( new OTableEditorInsNewUndoAct(this, nRow, nInsertRows) ); + GetUndoManager().AddUndoAction( new OTableEditorInsNewUndoAct(this, nRow, nInsertRows) ); ////////////////////////////////////////////////////////////////////// // Zahl der selektierten Zeilen werden neu eingefuegt for( long i=nRow; i<(nRow+nInsertRows); i++ ) @@ -1883,7 +1883,7 @@ void OTableEditorCtrl::SetPrimaryKey( sal_Bool bSet ) } } - GetUndoManager()->AddUndoAction( new OPrimKeyUndoAct(this, aDeletedPrimKeys, aInsertedPrimKeys) ); + GetUndoManager().AddUndoAction( new OPrimKeyUndoAct(this, aDeletedPrimKeys, aInsertedPrimKeys) ); ////////////////////////////////////////////////////////////////////// // Handle-Spalte invalidieren diff --git a/dbaccess/source/ui/tabledesign/TEditControl.hxx b/dbaccess/source/ui/tabledesign/TEditControl.hxx index 2a7a36f3a051..edf941cf1f39 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.hxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.hxx @@ -148,7 +148,7 @@ namespace dbaui virtual ~OTableEditorCtrl(); virtual BOOL CursorMoving(long nNewRow, USHORT nNewCol); virtual void UpdateAll(); - SfxUndoManager* GetUndoManager() const; + SfxUndoManager& GetUndoManager() const; void SetDescrWin( OTableFieldDescWin* pWin ){ pDescrWin = pWin; if (pDescrWin && pActRow) pDescrWin->DisplayData(pActRow->GetActFieldDescr()); } BOOL SaveCurRow(); diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx index a848eb8de18c..fa8d1809b595 100644 --- a/dbaccess/source/ui/tabledesign/TableController.cxx +++ b/dbaccess/source/ui/tabledesign/TableController.cxx @@ -568,7 +568,7 @@ void OTableController::impl_initialize() { loadData(); // fill the column information form the table getView()->initialize(); // show the windows and fill with our informations - getUndoMgr()->Clear(); // clear all undo redo things + ClearUndoManager(); setModified(sal_False); // and we are not modified yet } catch( const Exception& ) @@ -666,11 +666,6 @@ void OTableController::describeSupportedFeatures() implDescribeSupportedFeature( ".uno:EditDoc", ID_BROWSER_EDITDOC, CommandGroup::EDIT ); } // ----------------------------------------------------------------------------- -SfxUndoManager* OTableController::getUndoMgr() -{ - return &m_aUndoManager; -} -// ----------------------------------------------------------------------------- void OTableController::impl_onModifyChanged() { OSingleDocumentController::impl_onModifyChanged(); @@ -1521,7 +1516,7 @@ void OTableController::reSyncRows() } static_cast<OTableDesignView*>(getView())->reSync(); // show the windows and fill with our informations - getUndoMgr()->Clear(); // clear all undo redo things + ClearUndoManager(); setModified(sal_False); // and we are not modified yet } // ----------------------------------------------------------------------------- @@ -1577,7 +1572,7 @@ void OTableController::reload() { loadData(); // fill the column information form the table static_cast<OTableDesignView*>(getView())->reSync(); // show the windows and fill with our informations - getUndoMgr()->Clear(); // clear all undo redo things + ClearUndoManager(); setModified(sal_False); // and we are not modified yet static_cast<OTableDesignView*>(getView())->Invalidate(); } |