fdo#46808, Convert frame::Desktop to new style service.

I had to drop XEventBroadcaster from the merged interface
because it introduced method name conflicts (addEventListener).

Shouldn't be an issue since it was scheduled to be dropped anyhow,
and the service implementation still implements it, so existing clients
will be fine.

I dropped the interface XPropertySet from the combined IDL because nobody
seems to be using it, and it's primary purpose appears to be to set weird
flags.

I dropped the optional interfaces
   XStatusIndicatorFactory
   XDispatchInformationProvider
from the combined IDL because the service does not implement them, and
nobody seems to be using them. I suspect they were mistakenly copied
from XFrame.

I also did not convert the Title, UserDefinedAttributes and LayoutManager
properties to attributes, again because no-one is using them.

Change-Id: I678a00006ed2cca2d6c37c4e39465811442c33af
This commit is contained in:
Noel Grandin
2012-12-14 12:58:00 +02:00
parent 6d818ed651
commit bb121c864c
203 changed files with 1173 additions and 1579 deletions

View File

@@ -20,7 +20,7 @@
#include "basmethnode.hxx"
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/frame/DispatchHelper.hpp>
#include <com/sun/star/frame/XDesktop.hpp>
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
#include <com/sun/star/script/browse/BrowseNodeTypes.hpp>
@@ -250,35 +250,26 @@ namespace basprov
if ( m_xContext.is() )
{
Reference< XMultiComponentFactory > xSMgr( m_xContext->getServiceManager() );
Reference< frame::XDesktop2 > xDesktop = frame::Desktop::create( m_xContext );
if ( xSMgr.is() )
Reference < frame::XDispatchProvider > xProv( xDesktop->getCurrentFrame(), UNO_QUERY );
if ( xProv.is() )
{
Reference< frame::XDesktop > xDesktop( xSMgr->createInstanceWithContext(
::rtl::OUString( "com.sun.star.frame.Desktop" ), m_xContext ), UNO_QUERY );
Reference< frame::XDispatchHelper > xHelper( frame::DispatchHelper::create( m_xContext ) );
if ( xDesktop.is() )
{
Reference < frame::XDispatchProvider > xProv( xDesktop->getCurrentFrame(), UNO_QUERY );
if ( xProv.is() )
{
Reference< frame::XDispatchHelper > xHelper( frame::DispatchHelper::create( m_xContext ) );
Sequence < PropertyValue > aArgs(7);
aArgs[0].Name = ::rtl::OUString("Document");
aArgs[0].Value <<= sDocURL;
aArgs[1].Name = ::rtl::OUString("LibName");
aArgs[1].Value <<= sLibName;
aArgs[2].Name = ::rtl::OUString("Name");
aArgs[2].Value <<= sModName;
aArgs[3].Name = ::rtl::OUString("Type");
aArgs[3].Value <<= ::rtl::OUString("Module");
aArgs[4].Name = ::rtl::OUString("Line");
aArgs[4].Value <<= static_cast< sal_uInt32 >( nLine1 );
xHelper->executeDispatch( xProv, ::rtl::OUString(".uno:BasicIDEAppear"), ::rtl::OUString(), 0, aArgs );
}
}
Sequence < PropertyValue > aArgs(7);
aArgs[0].Name = ::rtl::OUString("Document");
aArgs[0].Value <<= sDocURL;
aArgs[1].Name = ::rtl::OUString("LibName");
aArgs[1].Value <<= sLibName;
aArgs[2].Name = ::rtl::OUString("Name");
aArgs[2].Value <<= sModName;
aArgs[3].Name = ::rtl::OUString("Type");
aArgs[3].Value <<= ::rtl::OUString("Module");
aArgs[4].Name = ::rtl::OUString("Line");
aArgs[4].Value <<= static_cast< sal_uInt32 >( nLine1 );
xHelper->executeDispatch( xProv, ::rtl::OUString(".uno:BasicIDEAppear"), ::rtl::OUString(), 0, aArgs );
}
}
}