Tag: cws_src680_oj14 User: oj Date: 2007-05-21 10:03:19+0000 Modified: dba/reportdesign/source/ui/report/DesignView.cxx dba/reportdesign/source/ui/report/ReportSection.cxx dba/reportdesign/source/ui/report/ReportWindow.cxx dba/reportdesign/source/ui/report/ScrollHelper.cxx dba/reportdesign/source/ui/report/ViewsWindow.cxx
Log: #i77120# notify as system window File Changes: Directory: /dba/reportdesign/source/ui/report/ ============================================== File [changed]: DesignView.cxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/report/DesignView.cxx?r1=1.1.2.3&r2=1.1.2.4 Delta lines: +27 -6 -------------------- --- DesignView.cxx 2007-05-11 12:05:17+0000 1.1.2.3 +++ DesignView.cxx 2007-05-21 10:03:16+0000 1.1.2.4 @@ -4,9 +4,9 @@ * * $RCSfile: DesignView.cxx,v $ * - * $Revision: 1.1.2.3 $ + * $Revision: 1.1.2.4 $ * - * last change: $Author: oj $ $Date: 2007/05/11 12:05:17 $ + * last change: $Author: oj $ $Date: 2007/05/21 10:03:16 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -52,6 +52,7 @@ #ifndef _REPORT_RPTUIDEF_HXX #include "RptDef.hxx" #endif +#include "UITools.hxx" #include "RptObject.hxx" #ifndef _REPORT_PROPBRW_HXX #include "propbrw.hxx" @@ -146,15 +147,21 @@ { DBG_DTOR( rpt_ODesignView,NULL); m_aMarkTimer.Stop(); + if ( m_pPropWin ) { + notifySystemWindow(this,m_pPropWin,::comphelper::mem_fun(&TaskPaneList::RemoveWindow)); ::std::auto_ptr<Window> aTemp2(m_pPropWin); m_pPropWin = NULL; } + if ( m_pAddField ) { + notifySystemWindow(this,m_pAddField,::comphelper::mem_fun(&TaskPaneList::RemoveWindow)); ::std::auto_ptr<Window> aTemp2(m_pAddField); m_pAddField = NULL; } + if ( m_pReportExplorer ) { + notifySystemWindow(this,m_pReportExplorer,::comphelper::mem_fun(&TaskPaneList::RemoveWindow)); ::std::auto_ptr<Window> aTemp2(m_pReportExplorer); m_pReportExplorer = NULL; } @@ -196,11 +203,11 @@ //if ( nRet != 1L ) { const KeyEvent* pKeyEvent = rNEvt.GetKeyEvent(); - const KeyCode& rCode = pKeyEvent->GetKeyCode(); - if ( handleKeyCode(rCode) ) + if ( handleKeyEvent(*pKeyEvent) ) nRet = 1L; else if ( nRet == 1L && m_pAccel.get() && m_pController ) { + const KeyCode& rCode = pKeyEvent->GetKeyCode(); util::URL aUrl; aUrl.Complete = m_pAccel->findCommand(svt::AcceleratorExecute::st_VCLKey2AWTKey(rCode)); if ( aUrl.Complete.getLength() && !m_pController->isCommandEnabled(aUrl) ) @@ -419,6 +426,15 @@ void ODesignView::GetFocus() { Window::GetFocus(); + if ( m_pScrollWindow ) + { + ::boost::shared_ptr<OReportSection> pSection = m_pScrollWindow->getMarkedSection(); + if ( !pSection ) + setMarked(getController()->getReportDefinition()->getDetail(),sal_True); + pSection = m_pScrollWindow->getMarkedSection(); + if ( pSection ) + pSection->GrabFocus(); + } } // ----------------------------------------------------------------------------- void ODesignView::ImplInitSettings() @@ -473,7 +489,10 @@ void ODesignView::togglePropertyBrowser(sal_Bool _bToogleOn) { if ( !m_pPropWin && _bToogleOn ) + { m_pPropWin = new PropBrw(getController()->getORB(),m_pTaskPane,this); + notifySystemWindow(this,m_pPropWin,::comphelper::mem_fun(&TaskPaneList::AddWindow)); + } if ( m_pPropWin && _bToogleOn != m_pPropWin->IsVisible() ) { if ( !m_pCurrentView && !m_xReportComponent.is() ) @@ -514,6 +533,7 @@ OReportController* pReportController = getController(); m_pReportExplorer = new ONavigator(this,pReportController); m_pReportExplorer->AddEventListener(LINK(pReportController,OReportController,EventLstHdl)); + notifySystemWindow(this,m_pReportExplorer,::comphelper::mem_fun(&TaskPaneList::AddWindow)); } else m_pReportExplorer->Show(!m_pReportExplorer->IsVisible()); @@ -546,6 +566,7 @@ m_pAddField = new OAddFieldWindow(pReportController,this); m_pAddField->Update(xReport); m_pAddField->AddEventListener(LINK(pReportController,OReportController,EventLstHdl)); + notifySystemWindow(this,m_pAddField,::comphelper::mem_fun(&TaskPaneList::AddWindow)); } else m_pAddField->Show(!m_pAddField->IsVisible()); @@ -622,11 +643,11 @@ return m_pScrollWindow->getMaxMarkerWidth(_bWithEnd); } //------------------------------------------------------------------------------ -sal_Bool ODesignView::handleKeyCode(const KeyCode& _rCode) +sal_Bool ODesignView::handleKeyEvent(const KeyEvent& _rEvent) { if ( (m_pPropWin && m_pPropWin->HasChildPathFocus()) ) return sal_False; - return m_pScrollWindow && m_pScrollWindow->handleKeyCode(_rCode); + return m_pScrollWindow && m_pScrollWindow->handleKeyEvent(_rEvent); } //------------------------------------------------------------------------ void ODesignView::setMarked(OSectionView* _pSectionView,sal_Bool _bMark) File [changed]: ReportSection.cxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/report/ReportSection.cxx?r1=1.1.2.3&r2=1.1.2.4 Delta lines: +4 -4 ------------------- --- ReportSection.cxx 2007-05-16 18:13:05+0000 1.1.2.3 +++ ReportSection.cxx 2007-05-21 10:03:16+0000 1.1.2.4 @@ -4,9 +4,9 @@ * * $RCSfile: ReportSection.cxx,v $ * - * $Revision: 1.1.2.3 $ + * $Revision: 1.1.2.4 $ * - * last change: $Author: oj $ $Date: 2007/05/16 18:13:05 $ + * last change: $Author: oj $ $Date: 2007/05/21 10:03:16 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -542,9 +542,9 @@ } } //------------------------------------------------------------------------------ -sal_Bool OReportSection::handleKeyCode(const KeyCode& _rCode) +sal_Bool OReportSection::handleKeyEvent(const KeyEvent& _rEvent) { - return m_pFunc.get() ? m_pFunc->handleKeyCode(_rCode) : sal_False; + return m_pFunc.get() ? m_pFunc->handleKeyEvent(_rEvent) : sal_False; } // ----------------------------------------------------------------------------- void OReportSection::createDefault(const ::rtl::OUString& _sType) File [changed]: ReportWindow.cxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/report/ReportWindow.cxx?r1=1.1.2.2&r2=1.1.2.3 Delta lines: +4 -4 ------------------- --- ReportWindow.cxx 2007-05-16 18:07:56+0000 1.1.2.2 +++ ReportWindow.cxx 2007-05-21 10:03:17+0000 1.1.2.3 @@ -4,9 +4,9 @@ * * $RCSfile: ReportWindow.cxx,v $ * - * $Revision: 1.1.2.2 $ + * $Revision: 1.1.2.3 $ * - * last change: $Author: oj $ $Date: 2007/05/16 18:07:56 $ + * last change: $Author: oj $ $Date: 2007/05/21 10:03:17 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -448,9 +448,9 @@ m_pView->UpdatePropertyBrowserDelayed(pReportSection->getView()); } //------------------------------------------------------------------------------ -sal_Bool OReportWindow::handleKeyCode(const KeyCode& _rCode) +sal_Bool OReportWindow::handleKeyEvent(const KeyEvent& _rEvent) { - return m_pViews ? m_pViews->handleKeyCode(_rCode) : sal_False; + return m_pViews ? m_pViews->handleKeyEvent(_rEvent) : sal_False; } //------------------------------------------------------------------------ void OReportWindow::setMarked(OSectionView* _pSectionView,sal_Bool _bMark) File [changed]: ScrollHelper.cxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/report/ScrollHelper.cxx?r1=1.1.2.1&r2=1.1.2.2 Delta lines: +4 -4 ------------------- --- ScrollHelper.cxx 2007-05-09 13:51:18+0000 1.1.2.1 +++ ScrollHelper.cxx 2007-05-21 10:03:17+0000 1.1.2.2 @@ -4,9 +4,9 @@ * * $RCSfile: ScrollHelper.cxx,v $ * - * $Revision: 1.1.2.1 $ + * $Revision: 1.1.2.2 $ * - * last change: $Author: oj $ $Date: 2007/05/09 13:51:18 $ + * last change: $Author: oj $ $Date: 2007/05/21 10:03:17 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -457,9 +457,9 @@ m_pChild->showRuler(_bShow); } //------------------------------------------------------------------------------ -sal_Bool OScrollWindowHelper::handleKeyCode(const KeyCode& _rCode) +sal_Bool OScrollWindowHelper::handleKeyEvent(const KeyEvent& _rEvent) { - return m_pChild ? m_pChild->handleKeyCode(_rCode) : sal_False; + return m_pChild ? m_pChild->handleKeyEvent(_rEvent) : sal_False; } //------------------------------------------------------------------------ void OScrollWindowHelper::setMarked(OSectionView* _pSectionView,sal_Bool _bMark) File [changed]: ViewsWindow.cxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/report/ViewsWindow.cxx?r1=1.1.2.2&r2=1.1.2.3 Delta lines: +6 -5 ------------------- --- ViewsWindow.cxx 2007-05-16 17:45:50+0000 1.1.2.2 +++ ViewsWindow.cxx 2007-05-21 10:03:17+0000 1.1.2.3 @@ -4,9 +4,9 @@ * * $RCSfile: ViewsWindow.cxx,v $ * - * $Revision: 1.1.2.2 $ + * $Revision: 1.1.2.3 $ * - * last change: $Author: oj $ $Date: 2007/05/16 17:45:50 $ + * last change: $Author: oj $ $Date: 2007/05/21 10:03:17 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -729,16 +729,17 @@ } } //------------------------------------------------------------------------------ -sal_Bool OViewsWindow::handleKeyCode(const KeyCode& _rCode) +sal_Bool OViewsWindow::handleKeyEvent(const KeyEvent& _rEvent) { sal_Bool bRet = sal_False; TSectionsMap::iterator aIter = m_aSections.begin(); TSectionsMap::iterator aEnd = m_aSections.end(); for (;aIter != aEnd ; ++aIter) { - if ( (*aIter).first.first->getView()->AreObjectsMarked() ) + //if ( (*aIter).first.first->getView()->AreObjectsMarked() ) + if ( (*aIter).second.first->isMarked() ) { - bRet = (*aIter).first.first->handleKeyCode(_rCode); + bRet = (*aIter).first.first->handleKeyEvent(_rEvent); } } return bRet; --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
