diff options
Diffstat (limited to 'reportdesign/source/ui/dlg/Navigator.cxx')
-rw-r--r-- | reportdesign/source/ui/dlg/Navigator.cxx | 100 |
1 files changed, 50 insertions, 50 deletions
diff --git a/reportdesign/source/ui/dlg/Navigator.cxx b/reportdesign/source/ui/dlg/Navigator.cxx index 9e16f84ccd37..b551087dcc03 100644 --- a/reportdesign/source/ui/dlg/Navigator.cxx +++ b/reportdesign/source/ui/dlg/Navigator.cxx @@ -78,7 +78,7 @@ sal_uInt16 lcl_getImageId(const uno::Reference< report::XReportComponent>& _xEle nId = SID_DRAWTBX_CS_BASIC; return nId; } -// ----------------------------------------------------------------------------- + OUString lcl_getName(const uno::Reference< beans::XPropertySet>& _xElement) { OSL_ENSURE(_xElement.is(),"Found report element which is NULL!"); @@ -103,7 +103,7 @@ OUString lcl_getName(const uno::Reference< beans::XPropertySet>& _xElement) } return sName.makeStringAndClear(); } -// ----------------------------------------------------------------------------- + class NavigatorTree : public ::cppu::BaseMutex , public SvTreeListBox @@ -206,7 +206,7 @@ public: private: using SvTreeListBox::ExecuteDrop; }; -// ----------------------------------------------------------------------------- + NavigatorTree::NavigatorTree( Window* pParent,OReportController& _rController ) :SvTreeListBox( pParent, WB_TABSTOP| WB_HASBUTTONS|WB_HASLINES|WB_BORDER|WB_HSCROLL|WB_HASBUTTONSATROOT ) ,comphelper::OSelectionChangeListener(m_aMutex) @@ -244,7 +244,7 @@ NavigatorTree::NavigatorTree( Window* pParent,OReportController& _rController ) SetSelectHdl(LINK(this, NavigatorTree, OnEntrySelDesel)); SetDeselectHdl(LINK(this, NavigatorTree, OnEntrySelDesel)); } -// ----------------------------------------------------------------------------- + NavigatorTree::~NavigatorTree() { SvTreeListEntry* pCurrent = First(); @@ -256,7 +256,7 @@ NavigatorTree::~NavigatorTree() m_pReportListener->dispose(); m_pSelectionListener->dispose(); } -//------------------------------------------------------------------------------ + void NavigatorTree::Command( const CommandEvent& rEvt ) { sal_Bool bHandled = sal_False; @@ -340,7 +340,7 @@ void NavigatorTree::Command( const CommandEvent& rEvt ) if (!bHandled) SvTreeListBox::Command( rEvt ); } -// ----------------------------------------------------------------------------- + sal_Int8 NavigatorTree::AcceptDrop( const AcceptDropEvent& _rEvt ) { sal_Int8 nDropOption = DND_ACTION_NONE; @@ -393,12 +393,12 @@ sal_Int8 NavigatorTree::AcceptDrop( const AcceptDropEvent& _rEvt ) return nDropOption; } -// ------------------------------------------------------------------------- + sal_Int8 NavigatorTree::ExecuteDrop( const ExecuteDropEvent& /*_rEvt*/ ) { return DND_ACTION_NONE; } -// ------------------------------------------------------------------------- + void NavigatorTree::StartDrag( sal_Int8 /*_nAction*/, const Point& _rPosPixel ) { m_pDragedEntry = GetEntry(_rPosPixel); @@ -407,7 +407,7 @@ void NavigatorTree::StartDrag( sal_Int8 /*_nAction*/, const Point& _rPosPixel ) EndSelection(); } } -//------------------------------------------------------------------------ + IMPL_LINK_NOARG(NavigatorTree, OnDropActionTimer) { if (--m_nTimerCounter > 0) @@ -444,7 +444,7 @@ IMPL_LINK_NOARG(NavigatorTree, OnDropActionTimer) return 0L; } -// ----------------------------------------------------------------------------- + IMPL_LINK(NavigatorTree, OnEntrySelDesel, NavigatorTree*, /*pThis*/) { if ( !m_pSelectionListener->locked() ) @@ -460,7 +460,7 @@ IMPL_LINK(NavigatorTree, OnEntrySelDesel, NavigatorTree*, /*pThis*/) return 0L; } -// ----------------------------------------------------------------------------- + void NavigatorTree::_selectionChanged( const lang::EventObject& aEvent ) throw (uno::RuntimeException) { m_pSelectionListener->lock(); @@ -496,7 +496,7 @@ void NavigatorTree::_selectionChanged( const lang::EventObject& aEvent ) throw ( } m_pSelectionListener->unlock(); } -// ----------------------------------------------------------------------------- + SvTreeListEntry* NavigatorTree::insertEntry(const OUString& _sName,SvTreeListEntry* _pParent,sal_uInt16 _nImageId,sal_uLong _nPosition,UserData* _pData) { SvTreeListEntry* pEntry = NULL; @@ -509,7 +509,7 @@ SvTreeListEntry* NavigatorTree::insertEntry(const OUString& _sName,SvTreeListEnt pEntry = InsertEntry(_sName,_pParent,sal_False,_nPosition,_pData); return pEntry; } -// ----------------------------------------------------------------------------- + void NavigatorTree::traverseSection(const uno::Reference< report::XSection>& _xSection,SvTreeListEntry* _pParent,sal_uInt16 _nImageId,sal_uLong _nPosition) { SvTreeListEntry* pSection = insertEntry(_xSection->getName(),_pParent,_nImageId,_nPosition,new UserData(this,_xSection)); @@ -528,7 +528,7 @@ void NavigatorTree::traverseSection(const uno::Reference< report::XSection>& _xS } } } -// ----------------------------------------------------------------------------- + void NavigatorTree::traverseFunctions(const uno::Reference< report::XFunctions>& _xFunctions,SvTreeListEntry* _pParent) { SvTreeListEntry* pFunctions = insertEntry(OUString(ModuleRes(RID_STR_FUNCTIONS)), _pParent, SID_RPT_NEW_FUNCTION, LIST_APPEND, new UserData(this,_xFunctions)); @@ -539,7 +539,7 @@ void NavigatorTree::traverseFunctions(const uno::Reference< report::XFunctions>& insertEntry(xElement->getName(),pFunctions,SID_RPT_NEW_FUNCTION,LIST_APPEND,new UserData(this,xElement)); } } -// ----------------------------------------------------------------------------- + SvTreeListEntry* NavigatorTree::find(const uno::Reference< uno::XInterface >& _xContent) { SvTreeListEntry* pRet = NULL; @@ -560,50 +560,50 @@ SvTreeListEntry* NavigatorTree::find(const uno::Reference< uno::XInterface >& _x } return pRet; } -// ----------------------------------------------------------------------------- + // ITraverseReport -// ----------------------------------------------------------------------------- + void NavigatorTree::traverseReport(const uno::Reference< report::XReportDefinition>& _xReport) { insertEntry(_xReport->getName(),m_pMasterReport,SID_SELECT_REPORT,LIST_APPEND,new UserData(this,_xReport)); } -// ----------------------------------------------------------------------------- + void NavigatorTree::traverseReportFunctions(const uno::Reference< report::XFunctions>& _xFunctions) { SvTreeListEntry* pReport = find(_xFunctions->getParent()); traverseFunctions(_xFunctions,pReport); } -// ----------------------------------------------------------------------------- + void NavigatorTree::traverseReportHeader(const uno::Reference< report::XSection>& _xSection) { SvTreeListEntry* pReport = find(_xSection->getReportDefinition()); traverseSection(_xSection,pReport,SID_REPORTHEADERFOOTER); } -// ----------------------------------------------------------------------------- + void NavigatorTree::traverseReportFooter(const uno::Reference< report::XSection>& _xSection) { SvTreeListEntry* pReport = find(_xSection->getReportDefinition()); traverseSection(_xSection,pReport,SID_REPORTHEADERFOOTER); } -// ----------------------------------------------------------------------------- + void NavigatorTree::traversePageHeader(const uno::Reference< report::XSection>& _xSection) { SvTreeListEntry* pReport = find(_xSection->getReportDefinition()); traverseSection(_xSection,pReport,SID_PAGEHEADERFOOTER); } -// ----------------------------------------------------------------------------- + void NavigatorTree::traversePageFooter(const uno::Reference< report::XSection>& _xSection) { SvTreeListEntry* pReport = find(_xSection->getReportDefinition()); traverseSection(_xSection,pReport,SID_PAGEHEADERFOOTER); } -// ----------------------------------------------------------------------------- + void NavigatorTree::traverseGroups(const uno::Reference< report::XGroups>& _xGroups) { SvTreeListEntry* pReport = find(_xGroups->getReportDefinition()); insertEntry(OUString(ModuleRes(RID_STR_GROUPS)), pReport, SID_SORTINGANDGROUPING, LIST_APPEND, new UserData(this,_xGroups)); } -// ----------------------------------------------------------------------------- + void NavigatorTree::traverseGroup(const uno::Reference< report::XGroup>& _xGroup) { uno::Reference< report::XGroups> xGroups(_xGroup->getParent(),uno::UNO_QUERY); @@ -611,34 +611,34 @@ void NavigatorTree::traverseGroup(const uno::Reference< report::XGroup>& _xGroup OSL_ENSURE(pGroups,"No Groups inserted so far. Why!"); insertEntry(_xGroup->getExpression(),pGroups,SID_GROUP,rptui::getPositionInIndexAccess(xGroups.get(),_xGroup),new UserData(this,_xGroup)); } -// ----------------------------------------------------------------------------- + void NavigatorTree::traverseGroupFunctions(const uno::Reference< report::XFunctions>& _xFunctions) { SvTreeListEntry* pGroup = find(_xFunctions->getParent()); traverseFunctions(_xFunctions,pGroup); } -// ----------------------------------------------------------------------------- + void NavigatorTree::traverseGroupHeader(const uno::Reference< report::XSection>& _xSection) { SvTreeListEntry* pGroup = find(_xSection->getGroup()); OSL_ENSURE(pGroup,"No group found"); traverseSection(_xSection,pGroup,SID_GROUPHEADER,1); } -// ----------------------------------------------------------------------------- + void NavigatorTree::traverseGroupFooter(const uno::Reference< report::XSection>& _xSection) { SvTreeListEntry* pGroup = find(_xSection->getGroup()); OSL_ENSURE(pGroup,"No group found"); traverseSection(_xSection,pGroup,SID_GROUPFOOTER); } -// ----------------------------------------------------------------------------- + void NavigatorTree::traverseDetail(const uno::Reference< report::XSection>& _xSection) { uno::Reference< report::XReportDefinition> xReport = _xSection->getReportDefinition(); SvTreeListEntry* pParent = find(xReport); traverseSection(_xSection,pParent,SID_ICON_DETAIL); } -// ----------------------------------------------------------------------------- + void NavigatorTree::_propertyChanged(const beans::PropertyChangeEvent& _rEvent) throw( uno::RuntimeException) { uno::Reference< report::XReportDefinition> xReport(_rEvent.Source,uno::UNO_QUERY); @@ -668,7 +668,7 @@ void NavigatorTree::_propertyChanged(const beans::PropertyChangeEvent& _rEvent) } } } -// ----------------------------------------------------------------------------- + void NavigatorTree::_elementInserted( const container::ContainerEvent& _rEvent ) { SvTreeListEntry* pEntry = find(_rEvent.Source); @@ -698,7 +698,7 @@ void NavigatorTree::_elementInserted( const container::ContainerEvent& _rEvent ) if ( !IsExpanded(pEntry) ) Expand(pEntry); } -// ----------------------------------------------------------------------------- + void NavigatorTree::_elementRemoved( const container::ContainerEvent& _rEvent ) { uno::Reference<beans::XPropertySet> xProp(_rEvent.Element,uno::UNO_QUERY); @@ -712,7 +712,7 @@ void NavigatorTree::_elementRemoved( const container::ContainerEvent& _rEvent ) PaintEntry(pParent); } } -// ----------------------------------------------------------------------------- + void NavigatorTree::_elementReplaced( const container::ContainerEvent& _rEvent ) { uno::Reference<beans::XPropertySet> xProp(_rEvent.ReplacedElement,uno::UNO_QUERY); @@ -727,12 +727,12 @@ void NavigatorTree::_elementReplaced( const container::ContainerEvent& _rEvent ) SetEntryText(pEntry,sName); } } -// ----------------------------------------------------------------------------- + void NavigatorTree::_disposing(const lang::EventObject& _rSource)throw( uno::RuntimeException) { removeEntry(find(_rSource.Source)); } -// ----------------------------------------------------------------------------- + void NavigatorTree::removeEntry(SvTreeListEntry* _pEntry,bool _bRemove) { if ( _pEntry ) @@ -748,7 +748,7 @@ void NavigatorTree::removeEntry(SvTreeListEntry* _pEntry,bool _bRemove) GetModel()->Remove(_pEntry); } } -// ----------------------------------------------------------------------------- + NavigatorTree::UserData::UserData(NavigatorTree* _pTree,const uno::Reference<uno::XInterface>& _xContent) : OPropertyChangeListener(m_aMutex) , OContainerListener(m_aMutex) @@ -782,7 +782,7 @@ NavigatorTree::UserData::UserData(NavigatorTree* _pTree,const uno::Reference<uno m_pContainerListener = new ::comphelper::OContainerListenerAdapter(this,xContainer); } } -// ----------------------------------------------------------------------------- + NavigatorTree::UserData::~UserData() { if ( m_pContainerListener.is() ) @@ -790,7 +790,7 @@ NavigatorTree::UserData::~UserData() if ( m_pListener.is() ) m_pListener->dispose(); } -// ----------------------------------------------------------------------------- + // OPropertyChangeListener void NavigatorTree::UserData::_propertyChanged(const beans::PropertyChangeEvent& _rEvent) throw( uno::RuntimeException) { @@ -835,29 +835,29 @@ void NavigatorTree::UserData::_propertyChanged(const beans::PropertyChangeEvent& catch(const uno::Exception &) {} } -// ----------------------------------------------------------------------------- + void NavigatorTree::UserData::_elementInserted( const container::ContainerEvent& _rEvent ) throw(uno::RuntimeException) { m_pTree->_elementInserted( _rEvent ); } -// ----------------------------------------------------------------------------- + void NavigatorTree::UserData::_elementRemoved( const container::ContainerEvent& _rEvent ) throw(uno::RuntimeException) { m_pTree->_elementRemoved( _rEvent ); } -// ----------------------------------------------------------------------------- + void NavigatorTree::UserData::_elementReplaced( const container::ContainerEvent& _rEvent ) throw(uno::RuntimeException) { m_pTree->_elementReplaced( _rEvent ); } -// ----------------------------------------------------------------------------- + void NavigatorTree::UserData::_disposing(const lang::EventObject& _rSource) throw( uno::RuntimeException) { m_pTree->_disposing( _rSource ); } -// ----------------------------------------------------------------------------- + // class ONavigatorImpl -// ----------------------------------------------------------------------------- + class ONavigatorImpl { ONavigatorImpl(const ONavigatorImpl&); @@ -882,11 +882,11 @@ ONavigatorImpl::ONavigatorImpl(OReportController& _rController,ONavigator* _pPar lang::EventObject aEvent(m_rController); m_pNavigatorTree->_selectionChanged(aEvent); } -//------------------------------------------------------------------------ + ONavigatorImpl::~ONavigatorImpl() { } -// ----------------------------------------------------------------------------- + const long STD_WIN_SIZE_X = 210; const long STD_WIN_SIZE_Y = 280; const long LISTBOX_BORDER = 2; @@ -907,13 +907,13 @@ ONavigator::ONavigator( Window* _pParent Show(); } -// ----------------------------------------------------------------------------- -//------------------------------------------------------------------------ + + ONavigator::~ONavigator() { } -//------------------------------------------------------------------------------ + void ONavigator::Resize() { FloatingWindow::Resize(); @@ -930,8 +930,8 @@ void ONavigator::Resize() m_pImpl->m_pNavigatorTree->SetPosSizePixel( aLBPos, aLBSize ); } -// ----------------------------------------------------------------------------- -// ----------------------------------------------------------------------------- + + void ONavigator::GetFocus() { Window::GetFocus(); |