From 11bc42b1f7465068945d8e217e35fb7eff094b4d Mon Sep 17 00:00:00 2001 From: "Ocke.Janssen" Date: Mon, 15 Nov 2010 12:38:17 +0100 Subject: dba34b: #i115579# check for children --- dbaccess/source/ui/querydesign/QueryDesignView.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dbaccess/source/ui/querydesign') diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index 0eb7c09f29e9..67385fd02d67 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -1957,7 +1957,7 @@ namespace pJoinType = pNode->getChild(2); } - if (SQL_ISRULE(pJoinType,join_type) && SQL_ISTOKEN(pJoinType->getChild(0),INNER)) + if (SQL_ISRULE(pJoinType,join_type) && (!pJoinType->count() || SQL_ISTOKEN(pJoinType->getChild(0),INNER))) { eJoinType = INNER_JOIN; } -- cgit From 784ea715b333655894b2702d721fd119f81bd394 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 17 Nov 2010 09:11:03 +0100 Subject: undoapi: carry the SfxUndoManager around as &, not as * --- dbaccess/source/ui/querydesign/QueryDesignView.cxx | 4 ++-- dbaccess/source/ui/querydesign/QueryTableView.cxx | 6 +++--- dbaccess/source/ui/querydesign/QueryViewSwitch.cxx | 2 +- dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx | 8 ++++---- dbaccess/source/ui/querydesign/querycontroller.cxx | 8 ++++---- 5 files changed, 14 insertions(+), 14 deletions(-) (limited to 'dbaccess/source/ui/querydesign') 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(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(getDesignView()->getController()).getUndoMgr()->LeaveListAction(); + static_cast(getDesignView()->getController()).GetUndoManager().LeaveListAction(); bListAction = sal_False; } else @@ -1282,7 +1282,7 @@ sal_Bool OSelectionBrowseBox::SaveModified() } if ( bListAction && !m_bInUndoMode ) - static_cast(getDesignView()->getController()).getUndoMgr()->LeaveListAction(); + static_cast(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(getDesignView()->getController()).getUndoMgr()->EnterListAction(String(),String()); + static_cast(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(); } // ----------------------------------------------------------------------------- -- cgit From 5cf47c0008eb4126cfc41c59fbeeb4d73c8e22b1 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 25 Nov 2010 14:28:03 +0100 Subject: undoapi: split OSingleDocumentController into DBSubComponentController (which the report design's controller will be derived from) and the still-so-named OSingleDocumentController. Module reportdesign does not compile with this change, this is yet to come. --- dbaccess/source/ui/querydesign/QueryDesignView.cxx | 4 ++-- dbaccess/source/ui/querydesign/QueryViewSwitch.cxx | 2 +- dbaccess/source/ui/querydesign/querycontroller.cxx | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'dbaccess/source/ui/querydesign') diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index b8598f26f825..28238ea27e03 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.GetUndoManager().Clear(); + rController.ClearUndoManager(); _pSelectionBrw->Invalidate(); return eErrorCode; } @@ -3234,7 +3234,7 @@ void OQueryDesignView::initByFieldDescriptions( const Sequence< PropertyValue >& InsertField( pField, sal_True, sal_False ); } - rController.GetUndoManager().Clear(); + rController.ClearUndoManager(); m_pSelectionBox->Invalidate(); } diff --git a/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx b/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx index d60621f7b414..5943485a7bb5 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().GetUndoManager().Clear(); + m_pDesignView->getController().ClearUndoManager(); m_pDesignView->getController().InvalidateAll(); return i_bSuccess; diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx index c39191ac8cc9..2659580a91b4 100644 --- a/dbaccess/source/ui/querydesign/querycontroller.cxx +++ b/dbaccess/source/ui/querydesign/querycontroller.cxx @@ -1037,7 +1037,7 @@ void OQueryController::impl_initialize() } } - GetUndoManager().Clear(); + ClearUndoManager(); if ( ( m_bGraphicalDesign ) && ( ( !m_sName.getLength() && !editingCommand() ) @@ -1789,7 +1789,7 @@ void OQueryController::reset() { impl_reset(); getContainer()->reset( NULL ); - GetUndoManager().Clear(); + ClearUndoManager(); } // ----------------------------------------------------------------------------- -- cgit