diff options
20 files changed, 56 insertions, 73 deletions
diff --git a/dbaccess/inc/singledoccontroller.hxx b/dbaccess/inc/singledoccontroller.hxx index 5bda31fb4608..fadca973d685 100644 --- a/dbaccess/inc/singledoccontroller.hxx +++ b/dbaccess/inc/singledoccontroller.hxx @@ -102,7 +102,7 @@ namespace dbaui void setEditable(sal_Bool _bEditable); // need for undo's and redo's - SfxUndoManager* getUndoMgr(); + SfxUndoManager& GetUndoManager(); /** addUndoActionAndInvalidate adds an undo action to the undoManager, additionally invalidates the UNDO and REDO slot diff --git a/dbaccess/source/ui/control/sqledit.cxx b/dbaccess/source/ui/control/sqledit.cxx index 89cdc855a0cd..69ed6bcd84f0 100644 --- a/dbaccess/source/ui/control/sqledit.cxx +++ b/dbaccess/source/ui/control/sqledit.cxx @@ -126,11 +126,11 @@ IMPL_LINK(OSqlEdit, OnUndoActionTimer, void*, EMPTYARG) if(aText != m_strOrigText) { OJoinController& rController = m_pView->getContainerWindow()->getDesignView()->getController(); - SfxUndoManager* pUndoMgr = rController.getUndoMgr(); + SfxUndoManager& rUndoMgr = rController.GetUndoManager(); OSqlEditUndoAct* pUndoAct = new OSqlEditUndoAct( this ); pUndoAct->SetOriginalText( m_strOrigText ); - pUndoMgr->AddUndoAction( pUndoAct ); + rUndoMgr.AddUndoAction( pUndoAct ); rController.InvalidateFeature(SID_UNDO); rController.InvalidateFeature(SID_REDO); diff --git a/dbaccess/source/ui/inc/TableController.hxx b/dbaccess/source/ui/inc/TableController.hxx index 3651c5632504..b64fba13bbea 100644 --- a/dbaccess/source/ui/inc/TableController.hxx +++ b/dbaccess/source/ui/inc/TableController.hxx @@ -129,9 +129,6 @@ namespace dbaui virtual void impl_onModifyChanged(); - // const ::connectivity::OSQLParseNode* getParseTree() const { return m_aSqlIterator.getParseTree();} - // need for undo's and redo's - SfxUndoManager* getUndoMgr(); inline ::std::vector< ::boost::shared_ptr<OTableRow> >* getRows() { return &m_vRowList; } /// returns the postion of the the first empty row diff --git a/dbaccess/source/ui/misc/singledoccontroller.cxx b/dbaccess/source/ui/misc/singledoccontroller.cxx index 87ddfa1f197b..48c83609d7af 100644 --- a/dbaccess/source/ui/misc/singledoccontroller.cxx +++ b/dbaccess/source/ui/misc/singledoccontroller.cxx @@ -530,9 +530,9 @@ namespace dbaui InvalidateFeature(_nId); } // ----------------------------------------------------------------------------- - SfxUndoManager* OSingleDocumentController::getUndoMgr() + SfxUndoManager& OSingleDocumentController::GetUndoManager() { - return &m_aUndoManager; + return m_aUndoManager; } // ----------------------------------------------------------------------------- void OSingleDocumentController::addUndoActionAndInvalidate(SfxUndoAction *_pAction) diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index 0eb7c09f29e9..b8598f26f825 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -2177,7 +2177,7 @@ namespace while ( false ); // Durch das Neuerzeugen wurden wieder Undo-Actions in den Manager gestellt - rController.getUndoMgr()->Clear(); + rController.GetUndoManager().Clear(); _pSelectionBrw->Invalidate(); return eErrorCode; } @@ -3234,7 +3234,7 @@ void OQueryDesignView::initByFieldDescriptions( const Sequence< PropertyValue >& InsertField( pField, sal_True, sal_False ); } - rController.getUndoMgr()->Clear(); + rController.GetUndoManager().Clear(); m_pSelectionBox->Invalidate(); } diff --git a/dbaccess/source/ui/querydesign/QueryTableView.cxx b/dbaccess/source/ui/querydesign/QueryTableView.cxx index c083392a9613..16052816f07a 100644 --- a/dbaccess/source/ui/querydesign/QueryTableView.cxx +++ b/dbaccess/source/ui/querydesign/QueryTableView.cxx @@ -847,8 +847,8 @@ void OQueryTableView::RemoveTabWin(OTableWindow* pTabWin) // mein Parent brauche ich, da es vom Loeschen erfahren soll OQueryDesignView* pParent = static_cast<OQueryDesignView*>(getDesignView()); - SfxUndoManager* pUndoMgr = m_pView->getController().getUndoMgr(); - pUndoMgr->EnterListAction( String( ModuleRes(STR_QUERY_UNDO_TABWINDELETE) ), String() ); + SfxUndoManager& rUndoMgr = m_pView->getController().GetUndoManager(); + rUndoMgr.EnterListAction( String( ModuleRes(STR_QUERY_UNDO_TABWINDELETE) ), String() ); // Undo-Action anlegen OQueryTabWinDelUndoAct* pUndoAction = new OQueryTabWinDelUndoAct(this); @@ -861,7 +861,7 @@ void OQueryTableView::RemoveTabWin(OTableWindow* pTabWin) pParent->TableDeleted( static_cast< OQueryTableWindowData*>(pTabWin->GetData().get())->GetAliasName() ); m_pView->getController().addUndoActionAndInvalidate( pUndoAction ); - pUndoMgr->LeaveListAction(); + rUndoMgr.LeaveListAction(); if (m_lnkTabWinsChangeHandler.IsSet()) { diff --git a/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx b/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx index ec3b22899225..d60621f7b414 100644 --- a/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx +++ b/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx @@ -299,7 +299,7 @@ bool OQueryViewSwitch::impl_postViewSwitch( const bool i_bGraphicalDesign, const if ( pContainer ) pContainer->Resize(); - m_pDesignView->getController().getUndoMgr()->Clear(); + m_pDesignView->getController().GetUndoManager().Clear(); m_pDesignView->getController().InvalidateAll(); return i_bSuccess; diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx index 66b6eec9465c..223c00cfbd2a 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx @@ -1021,7 +1021,7 @@ sal_Bool OSelectionBrowseBox::SaveModified() strOldCellContents = pEntry->GetField(); bListAction = sal_True; if ( !m_bInUndoMode ) - rController.getUndoMgr()->EnterListAction(String(),String()); + rController.GetUndoManager().EnterListAction(String(),String()); USHORT nPos = m_pFieldCell->GetEntryPos(aFieldName); String aAliasName = pEntry->GetAlias(); @@ -1050,7 +1050,7 @@ sal_Bool OSelectionBrowseBox::SaveModified() { sNewValue = aFieldName; if ( !m_bInUndoMode ) - static_cast<OQueryController&>(getDesignView()->getController()).getUndoMgr()->LeaveListAction(); + static_cast<OQueryController&>(getDesignView()->getController()).GetUndoManager().LeaveListAction(); bListAction = sal_False; } else @@ -1282,7 +1282,7 @@ sal_Bool OSelectionBrowseBox::SaveModified() } if ( bListAction && !m_bInUndoMode ) - static_cast<OQueryController&>(getDesignView()->getController()).getUndoMgr()->LeaveListAction(); + static_cast<OQueryController&>(getDesignView()->getController()).GetUndoManager().LeaveListAction(); return pEntry != NULL && !bError; } @@ -2644,7 +2644,7 @@ void OSelectionBrowseBox::appendUndoAction(const String& _rOldValue,const String if ( !_bListAction ) { _bListAction = sal_True; - static_cast<OQueryController&>(getDesignView()->getController()).getUndoMgr()->EnterListAction(String(),String()); + static_cast<OQueryController&>(getDesignView()->getController()).GetUndoManager().EnterListAction(String(),String()); } appendUndoAction(_rOldValue,_rNewValue,_nRow); } diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx index 06b6804fa9be..c39191ac8cc9 100644 --- a/dbaccess/source/ui/querydesign/querycontroller.cxx +++ b/dbaccess/source/ui/querydesign/querycontroller.cxx @@ -685,9 +685,9 @@ void OQueryController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >& break; case SID_BROWSER_CLEAR_QUERY: { - getUndoMgr()->EnterListAction( String( ModuleRes(STR_QUERY_UNDO_TABWINDELETE) ), String() ); + GetUndoManager().EnterListAction( String( ModuleRes(STR_QUERY_UNDO_TABWINDELETE) ), String() ); getContainer()->clear(); - getUndoMgr()->LeaveListAction(); + GetUndoManager().LeaveListAction(); setStatement_fireEvent( ::rtl::OUString() ); if(m_bGraphicalDesign) @@ -1037,7 +1037,7 @@ void OQueryController::impl_initialize() } } - getUndoMgr()->Clear(); + GetUndoManager().Clear(); if ( ( m_bGraphicalDesign ) && ( ( !m_sName.getLength() && !editingCommand() ) @@ -1789,7 +1789,7 @@ void OQueryController::reset() { impl_reset(); getContainer()->reset( NULL ); - getUndoMgr()->Clear(); + GetUndoManager().Clear(); } // ----------------------------------------------------------------------------- diff --git a/dbaccess/source/ui/relationdesign/RelationController.cxx b/dbaccess/source/ui/relationdesign/RelationController.cxx index 99fe03a7004d..642d22d1af8e 100644 --- a/dbaccess/source/ui/relationdesign/RelationController.cxx +++ b/dbaccess/source/ui/relationdesign/RelationController.cxx @@ -494,7 +494,7 @@ IMPL_LINK( ORelationController, OnThreadFinished, void*, /*NOTINTERESTEDIN*/ ) { getView()->initialize(); // show the windows and fill with our informations getView()->Invalidate(INVALIDATE_NOERASE); - getUndoMgr()->Clear(); // clear all undo redo things + GetUndoManager().Clear(); // clear all undo redo things setModified(sal_False); // and we are not modified yet if(m_vTableData.empty()) diff --git a/dbaccess/source/ui/relationdesign/RelationTableView.cxx b/dbaccess/source/ui/relationdesign/RelationTableView.cxx index 0c9d0cc1a456..505738ef5cf0 100644 --- a/dbaccess/source/ui/relationdesign/RelationTableView.cxx +++ b/dbaccess/source/ui/relationdesign/RelationTableView.cxx @@ -375,7 +375,7 @@ void ORelationTableView::RemoveTabWin( OTableWindow* pTabWin ) OSQLWarningBox aDlg( this, ModuleRes( STR_QUERY_REL_DELETE_WINDOW ), WB_YES_NO | WB_DEF_YES ); if ( m_bInRemove || aDlg.Execute() == RET_YES ) { - m_pView->getController().getUndoMgr()->Clear(); + m_pView->getController().GetUndoManager().Clear(); OJoinTableView::RemoveTabWin( pTabWin ); m_pView->getController().InvalidateFeature(SID_RELATION_ADD_RELATION); @@ -469,7 +469,7 @@ void ORelationTableView::_elementRemoved( const container::ContainerEvent& _rEve OTableWindow* pTableWindow = GetTabWindow(sName); if ( pTableWindow ) { - m_pView->getController().getUndoMgr()->Clear(); + m_pView->getController().GetUndoManager().Clear(); OJoinTableView::RemoveTabWin( pTableWindow ); m_pView->getController().InvalidateFeature(SID_RELATION_ADD_RELATION); diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx index 4d3cdb6652a9..693c7dbf585a 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 @@ -683,7 +683,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(); } @@ -858,7 +858,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(); @@ -875,20 +875,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()) @@ -1051,7 +1051,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(); } @@ -1063,7 +1063,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) ); ////////////////////////////////////////////////////////////////////// @@ -1111,7 +1111,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++ ) @@ -1889,7 +1889,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..1cc02fb45d8b 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 + GetUndoManager().Clear(); // clear all undo redo things 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 + GetUndoManager().Clear(); // clear all undo redo things 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 + GetUndoManager().Clear(); // clear all undo redo things setModified(sal_False); // and we are not modified yet static_cast<OTableDesignView*>(getView())->Invalidate(); } diff --git a/reportdesign/source/ui/dlg/CondFormat.cxx b/reportdesign/source/ui/dlg/CondFormat.cxx index d3617749d10b..b271a3324022 100644 --- a/reportdesign/source/ui/dlg/CondFormat.cxx +++ b/reportdesign/source/ui/dlg/CondFormat.cxx @@ -466,7 +466,7 @@ namespace rptui if ( nRet == RET_OK ) { String sUndoAction( ModuleRes( RID_STR_UNDO_CONDITIONAL_FORMATTING ) ); - UndoManagerListAction aListAction(*m_rController.getUndoMgr(),sUndoAction); + UndoManagerListAction aListAction(m_rController.GetUndoManager(),sUndoAction); try { sal_Int32 j(0), i(0);; diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx b/reportdesign/source/ui/dlg/GroupsSorting.cxx index d4ea5fa17a48..5a6b7bd1e22b 100644 --- a/reportdesign/source/ui/dlg/GroupsSorting.cxx +++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx @@ -317,7 +317,7 @@ void OFieldExpressionControl::moveGroups(const uno::Sequence<uno::Any>& _aGroups { sal_Int32 nRow = _nRow; String sUndoAction(ModuleRes(RID_STR_UNDO_MOVE_GROUP)); - UndoManagerListAction aListAction(*m_pParent->m_pController->getUndoMgr(),sUndoAction); + UndoManagerListAction aListAction(m_pParent->m_pController->GetUndoManager(),sUndoAction); uno::Reference< report::XGroups> xGroups = m_pParent->getGroups(); const uno::Any* pIter = _aGroups.getConstArray(); @@ -455,7 +455,7 @@ BOOL OFieldExpressionControl::SaveModified(bool _bAppendRow) { bAppend = sal_True; String sUndoAction(ModuleRes(RID_STR_UNDO_APPEND_GROUP)); - m_pParent->m_pController->getUndoMgr()->EnterListAction( sUndoAction, String() ); + m_pParent->m_pController->GetUndoManager().EnterListAction( sUndoAction, String() ); xGroup = m_pParent->getGroups()->createGroup(); xGroup->setHeaderOn(sal_True); @@ -499,7 +499,7 @@ BOOL OFieldExpressionControl::SaveModified(bool _bAppendRow) ::rptui::adjustSectionName(xGroup,nPos); if ( bAppend ) - m_pParent->m_pController->getUndoMgr()->LeaveListAction(); + m_pParent->m_pController->GetUndoManager().LeaveListAction(); } if ( Controller() ) @@ -824,7 +824,7 @@ void OFieldExpressionControl::DeleteRows() { bFirstTime = false; String sUndoAction(ModuleRes(RID_STR_UNDO_REMOVE_SELECTION)); - m_pParent->m_pController->getUndoMgr()->EnterListAction( sUndoAction, String() ); + m_pParent->m_pController->GetUndoManager().EnterListAction( sUndoAction, String() ); } sal_Int32 nGroupPos = m_aGroupPositions[nIndex]; @@ -844,7 +844,7 @@ void OFieldExpressionControl::DeleteRows() } // while( nIndex >= 0 ) if ( !bFirstTime ) - m_pParent->m_pController->getUndoMgr()->LeaveListAction(); + m_pParent->m_pController->GetUndoManager().LeaveListAction(); m_nDataPos = GetCurRow(); InvalidateStatusCell( nOldDataPos ); @@ -931,7 +931,7 @@ void OFieldExpressionControl::InsertRows( long nRow ) m_bIgnoreEvent = false; { String sUndoAction(ModuleRes(RID_STR_UNDO_APPEND_GROUP)); - UndoManagerListAction aListAction(*m_pParent->m_pController->getUndoMgr(),sUndoAction); + UndoManagerListAction aListAction(m_pParent->m_pController->GetUndoManager(),sUndoAction); uno::Reference<report::XGroups> xGroups = m_pParent->getGroups(); sal_Int32 nGroupPos = 0; diff --git a/reportdesign/source/ui/inc/ReportController.hxx b/reportdesign/source/ui/inc/ReportController.hxx index 6694c81c999b..9492afd04176 100644 --- a/reportdesign/source/ui/inc/ReportController.hxx +++ b/reportdesign/source/ui/inc/ReportController.hxx @@ -354,10 +354,6 @@ namespace rptui virtual void impl_onModifyChanged(); - // const ::connectivity::OSQLParseNode* getParseTree() const { return m_aSqlIterator.getParseTree();} - // need for undo's and redo's - SfxUndoManager* getUndoMgr(); - /** returns <TRUE/> when the command is enbaled @param _nCommand the command id @param _xControlFormat the report control format diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index 6d13804fe7fa..b1bd1a12e89a 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -372,7 +372,7 @@ void OReportController::disposing() pSectionWindow = getDesignView()->getMarkedSection(); if ( pSectionWindow ) pSectionWindow->getReportSection().deactivateOle(); - getUndoMgr()->Clear(); // clear all undo redo things + GetUndoManager().Clear(); // clear all undo redo things if ( m_aReportModel ) listen(false); m_pReportControllerObserver->Clear(); @@ -1703,7 +1703,7 @@ void OReportController::impl_initialize( ) { //m_sName = m_xReportDefinition->getName(); getView()->initialize(); // show the windows and fill with our informations - getUndoMgr()->Clear(); // clear all undo redo things + GetUndoManager().Clear(); // clear all undo redo things getSdrModel(); if ( !m_aReportModel ) throw Exception(); @@ -2121,11 +2121,6 @@ void OReportController::describeSupportedFeatures() implDescribeSupportedFeature( ".uno:ExpandSection", SID_EXPAND_SECTION); } // ----------------------------------------------------------------------------- -SfxUndoManager* OReportController::getUndoMgr() -{ - return &m_aUndoManager; -} -// ----------------------------------------------------------------------------- void OReportController::impl_onModifyChanged() { try @@ -3348,7 +3343,7 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs) } uno::Reference<report::XSection> xCurrentSection = getDesignView()->getCurrentSection(); - UndoManagerListAction aUndo( *getUndoMgr(), String( ModuleRes( RID_STR_UNDO_INSERT_CONTROL ) ) ); + UndoManagerListAction aUndo( GetUndoManager(), String( ModuleRes( RID_STR_UNDO_INSERT_CONTROL ) ) ); try { @@ -3819,7 +3814,7 @@ void OReportController::switchReportSection(const sal_Int16 _nId) if ( SID_REPORTHEADERFOOTER == _nId ) { const String sUndoAction(ModuleRes(bSwitchOn ? RID_STR_UNDO_ADD_REPORTHEADERFOOTER : RID_STR_UNDO_REMOVE_REPORTHEADERFOOTER)); - getUndoMgr()->EnterListAction( sUndoAction, String() ); + GetUndoManager().EnterListAction( sUndoAction, String() ); addUndoActionAndInvalidate(new OReportSectionUndo(*(m_aReportModel),SID_REPORTHEADER_WITHOUT_UNDO ,::std::mem_fun(&OReportHelper::getReportHeader) @@ -3851,7 +3846,7 @@ void OReportController::switchReportSection(const sal_Int16 _nId) } if ( SID_REPORTHEADERFOOTER == _nId ) - getUndoMgr()->LeaveListAction(); + GetUndoManager().LeaveListAction(); getView()->Resize(); } } @@ -3867,7 +3862,7 @@ void OReportController::switchPageSection(const sal_Int16 _nId) if ( SID_PAGEHEADERFOOTER == _nId ) { const String sUndoAction(ModuleRes(bSwitchOn ? RID_STR_UNDO_ADD_REPORTHEADERFOOTER : RID_STR_UNDO_REMOVE_REPORTHEADERFOOTER)); - getUndoMgr()->EnterListAction( sUndoAction, String() ); + GetUndoManager().EnterListAction( sUndoAction, String() ); addUndoActionAndInvalidate(new OReportSectionUndo(*m_aReportModel ,SID_PAGEHEADER_WITHOUT_UNDO @@ -3899,7 +3894,7 @@ void OReportController::switchPageSection(const sal_Int16 _nId) break; } if ( SID_PAGEHEADERFOOTER == _nId ) - getUndoMgr()->LeaveListAction(); + GetUndoManager().LeaveListAction(); getView()->Resize(); } } diff --git a/reportdesign/source/ui/report/SectionWindow.cxx b/reportdesign/source/ui/report/SectionWindow.cxx index 26ce8c13c2a6..ae9c8e0e0bb3 100644 --- a/reportdesign/source/ui/report/SectionWindow.cxx +++ b/reportdesign/source/ui/report/SectionWindow.cxx @@ -330,13 +330,13 @@ void OSectionWindow::zoom(const Fraction& _aZoom) IMPL_LINK( OSectionWindow, StartSplitHdl, Splitter*, ) { const String sEmpty(ModuleRes(RID_STR_UNDO_CHANGE_SIZE)); - getViewsWindow()->getView()->getReportView()->getController().getUndoMgr()->EnterListAction(sEmpty,String()); + getViewsWindow()->getView()->getReportView()->getController().GetUndoManager().EnterListAction(sEmpty,String()); return 0L; } //------------------------------------------------------------------------------ IMPL_LINK( OSectionWindow, EndSplitHdl, Splitter*, ) { - getViewsWindow()->getView()->getReportView()->getController().getUndoMgr()->LeaveListAction(); + getViewsWindow()->getView()->getReportView()->getController().GetUndoManager().LeaveListAction(); /*getViewsWindow()->Resize();*/ return 0L; } diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx index bcd50236aab3..21735676d078 100644 --- a/reportdesign/source/ui/report/ViewsWindow.cxx +++ b/reportdesign/source/ui/report/ViewsWindow.cxx @@ -1329,7 +1329,7 @@ void OViewsWindow::EndDragObj_removeInvisibleObjects() void OViewsWindow::EndDragObj(BOOL _bControlKeyPressed, const OSectionView* _pSection,const Point& _aPnt) { const String sUndoAction = String((ModuleRes(RID_STR_UNDO_CHANGEPOSITION))); - UndoManagerListAction aListAction(*getView()->getReportView()->getController().getUndoMgr(),sUndoAction); + UndoManagerListAction aListAction(getView()->getReportView()->getController().GetUndoManager(),sUndoAction); Point aNewPos = _aPnt; OSectionView* pInSection = getSectionRelativeToPosition(_pSection, aNewPos); |