Kaydet (Commit) e037e155 authored tarafından Kurt Zenker's avatar Kurt Zenker

INTEGRATION: CWS dba30d (1.28.30); FILE MERGED

2008/06/10 13:56:39 fs 1.28.30.5: #i10000#
2008/06/10 11:04:41 fs 1.28.30.4: +describeCurrentSelectionForType
2008/06/09 13:45:17 fs 1.28.30.3: names
2008/06/01 21:02:32 fs 1.28.30.2: #i80943# more preparations for context menu interception, including some re-factoring
2008/05/29 11:32:27 fs 1.28.30.1: during #i80943#: refactoring: IController now passed around as reference, not as pointer
üst a40b30d2
......@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: AppDetailView.cxx,v $
* $Revision: 1.28 $
* $Revision: 1.29 $
*
* This file is part of OpenOffice.org.
*
......@@ -45,9 +45,6 @@
#ifndef DBAUI_APPVIEW_HXX
#include "AppView.hxx"
#endif
#ifndef DBAUI_IAPPELEMENTNOTIFICATION_HXX
#include "IAppElementNotification.hxx"
#endif
#ifndef _COM_SUN_STAR_UI_XUICONFIGURATIONMANAGER_HPP_
#include <com/sun/star/ui/XUIConfigurationManager.hpp>
#endif
......@@ -104,6 +101,7 @@
#endif
#include <algorithm>
#include "dbtreelistbox.hxx"
#include "IApplicationController.hxx"
using namespace ::dbaui;
using namespace ::com::sun::star::uno;
......@@ -114,6 +112,9 @@ using namespace ::com::sun::star::ucb;
using namespace ::com::sun::star::graphic;
using namespace ::com::sun::star::ui;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::beans;
using ::com::sun::star::util::URL;
using ::com::sun::star::sdb::application::NamedDatabaseObject;
#define SPACEBETWEENENTRIES 4
......@@ -363,7 +364,9 @@ void OCreationList::updateHelpText()
void OCreationList::onSelected( SvLBoxEntry* _pEntry ) const
{
DBG_ASSERT( _pEntry, "OCreationList::onSelected: invalid entry!" );
m_rTaskWindow.getDetailView()->onCreationClick( reinterpret_cast< TaskEntry* >( _pEntry->GetUserData() )->sUNOCommand );
URL aCommand;
aCommand.Complete = reinterpret_cast< TaskEntry* >( _pEntry->GetUserData() )->sUNOCommand;
m_rTaskWindow.getDetailView()->getBorderWin().getView()->getAppController().executeChecked( aCommand, Sequence< PropertyValue >() );
}
// -----------------------------------------------------------------------------
void OCreationList::KeyInput( const KeyEvent& rKEvt )
......@@ -609,7 +612,7 @@ OApplicationDetailView::OApplicationDetailView(OAppBorderWindow& _rParent,Previe
OTasksWindow* pTasks = new OTasksWindow(&m_aTasks,this);
pTasks->Show();
pTasks->Disable(m_rBorderWin.getView()->getCommandController()->isDataSourceReadOnly());
pTasks->Disable(m_rBorderWin.getView()->getCommandController().isDataSourceReadOnly());
m_aTasks.setChildWindow(pTasks);
m_aTasks.SetUniqueId(UID_APP_TASKS_VIEW);
m_aTasks.Show();
......@@ -727,7 +730,7 @@ void OApplicationDetailView::impl_createPage( ElementType _eType, const Referenc
OSL_ENSURE( !rData.aTasks.empty(), "OApplicationDetailView::impl_createPage: no tasks at all!?" );
bool bEnabled = rData.aTasks.empty()
? false
: getBorderWin().getView()->getCommandController()->isCommandEnabled( rData.aTasks[0].sUNOCommand );
: getBorderWin().getView()->getCommandController().isCommandEnabled( rData.aTasks[0].sUNOCommand );
getTasksWindow().Enable( bEnabled );
m_aContainer.setTitle( rData.nTitleId );
......@@ -745,7 +748,7 @@ void OApplicationDetailView::impl_createPage( ElementType _eType, const Referenc
const TaskPaneData& OApplicationDetailView::impl_getTaskPaneData( ElementType _eType )
{
if ( m_aTaskPaneData.empty() )
m_aTaskPaneData.resize( E_ELEMENT_TYPE_COUNT );
m_aTaskPaneData.resize( ELEMENT_COUNT );
OSL_ENSURE( ( _eType >= 0 ) && ( _eType < E_ELEMENT_TYPE_COUNT ), "OApplicationDetailView::impl_getTaskPaneData: illegal element type!" );
TaskPaneData& rData = m_aTaskPaneData[ _eType ];
......@@ -802,7 +805,7 @@ void OApplicationDetailView::impl_fillTaskPaneData( ElementType _eType, TaskPane
)
{
if ( pTask->bHideWhenDisabled
&& !getBorderWin().getView()->getCommandController()->isCommandEnabled( pTask->sUNOCommand )
&& !getBorderWin().getView()->getCommandController().isCommandEnabled( pTask->sUNOCommand )
)
pTask = rList.erase( pTask );
else
......@@ -891,6 +894,7 @@ sal_Int32 OApplicationDetailView::getElementCount()
DBG_CHKTHIS(OApplicationDetailView,NULL);
return m_pControlHelper->getElementCount();
}
// -----------------------------------------------------------------------------
void OApplicationDetailView::getSelectionElementNames( ::std::vector< ::rtl::OUString>& _rNames ) const
{
......@@ -898,6 +902,18 @@ void OApplicationDetailView::getSelectionElementNames( ::std::vector< ::rtl::OUS
m_pControlHelper->getSelectionElementNames( _rNames );
}
// -----------------------------------------------------------------------------
void OApplicationDetailView::describeCurrentSelectionForControl( const Control& _rControl, Sequence< NamedDatabaseObject >& _out_rSelectedObjects )
{
DBG_CHKTHIS(OApplicationDetailView,NULL);
m_pControlHelper->describeCurrentSelectionForControl( _rControl, _out_rSelectedObjects );
}
// -----------------------------------------------------------------------------
void OApplicationDetailView::describeCurrentSelectionForType( const ElementType _eType, Sequence< NamedDatabaseObject >& _out_rSelectedObjects )
{
DBG_CHKTHIS(OApplicationDetailView,NULL);
m_pControlHelper->describeCurrentSelectionForType( _eType, _out_rSelectedObjects );
}
// -----------------------------------------------------------------------------
void OApplicationDetailView::selectElements(const Sequence< ::rtl::OUString>& _aNames)
{
DBG_CHKTHIS(OApplicationDetailView,NULL);
......@@ -929,12 +945,6 @@ void OApplicationDetailView::paste()
m_pControlHelper->paste();
}
// -----------------------------------------------------------------------------
void OApplicationDetailView::onCreationClick( const ::rtl::OUString& _sCommand)
{
DBG_CHKTHIS(OApplicationDetailView,NULL);
getBorderWin().getView()->getElementNotification()->onCreationClick(_sCommand);
}
// -----------------------------------------------------------------------------
SvLBoxEntry* OApplicationDetailView::elementAdded(ElementType _eType,const ::rtl::OUString& _rName, const Any& _rObject )
{
DBG_CHKTHIS(OApplicationDetailView,NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment