use uno::Reference::set method instead of assignment
Change-Id: I58410209f32f988f258a588364e0b037c2790211
This commit is contained in:
@@ -179,7 +179,7 @@ void SAL_CALL BaseContainerControl::dispose() throw( RuntimeException, std::exce
|
||||
// remove listeners
|
||||
EventObject aObject;
|
||||
|
||||
aObject.Source = Reference< XComponent > ( static_cast<XControlContainer*>(this), UNO_QUERY );
|
||||
aObject.Source.set( static_cast<XControlContainer*>(this), UNO_QUERY );
|
||||
m_aListeners.disposeAndClear( aObject );
|
||||
|
||||
// remove controls
|
||||
|
||||
@@ -282,10 +282,10 @@ void SAL_CALL BaseControl::createPeer( const Reference< XToolkit >& xToo
|
||||
if ( !xLocalToolkit.is() )
|
||||
{
|
||||
// but first create well known toolkit, if it not exist
|
||||
xLocalToolkit = Reference< XToolkit > ( Toolkit::create(m_xComponentContext), UNO_QUERY_THROW );
|
||||
xLocalToolkit.set( Toolkit::create(m_xComponentContext), UNO_QUERY_THROW );
|
||||
}
|
||||
m_xPeer = xLocalToolkit->createWindow( *pDescriptor );
|
||||
m_xPeerWindow = Reference< XWindow >( m_xPeer, UNO_QUERY );
|
||||
m_xPeerWindow.set( m_xPeer, UNO_QUERY );
|
||||
|
||||
// don't forget to release the memory!
|
||||
delete pDescriptor;
|
||||
@@ -788,7 +788,7 @@ OMRCListenerMultiplexerHelper* BaseControl::impl_getMultiplexer()
|
||||
if ( m_pMultiplexer == NULL )
|
||||
{
|
||||
m_pMultiplexer = new OMRCListenerMultiplexerHelper( static_cast<XWindow*>(this), m_xPeerWindow );
|
||||
m_xMultiplexer = Reference< XInterface >( static_cast<OWeakObject*>(m_pMultiplexer), UNO_QUERY );
|
||||
m_xMultiplexer.set( static_cast<OWeakObject*>(m_pMultiplexer), UNO_QUERY );
|
||||
}
|
||||
|
||||
return m_pMultiplexer;
|
||||
|
||||
@@ -112,7 +112,7 @@ Reference< XConnectionPoint > SAL_CALL OConnectionPointContainerHelper::queryCon
|
||||
MutexGuard aGuard( m_aSharedMutex );
|
||||
// If this container contains elements, build a connectionpoint-instance.
|
||||
OConnectionPointHelper* pNewConnectionPoint = new OConnectionPointHelper( m_aSharedMutex, this, aType );
|
||||
xConnectionPoint = Reference< XConnectionPoint >( static_cast<OWeakObject*>(pNewConnectionPoint), UNO_QUERY );
|
||||
xConnectionPoint.set( static_cast<OWeakObject*>(pNewConnectionPoint), UNO_QUERY );
|
||||
}
|
||||
|
||||
return xConnectionPoint;
|
||||
|
||||
@@ -191,7 +191,7 @@ Sequence< Reference< XInterface > > SAL_CALL OConnectionPointHelper::getConnecti
|
||||
throw RuntimeException();
|
||||
}
|
||||
// Set default return value, if method failed.
|
||||
Sequence< Reference< XInterface > > seqReturnConnections = Sequence< Reference< XInterface > >();
|
||||
Sequence< Reference< XInterface > > seqReturnConnections;
|
||||
// Get reference to private member of OConnectionPointHelperContainer!
|
||||
OMultiTypeInterfaceContainerHelper& aSharedContainer = m_pContainerImplementation->impl_getMultiTypeContainer();
|
||||
// Get pointer to specialized container which hold all interfaces of searched type.
|
||||
|
||||
@@ -478,7 +478,7 @@ void FrameControl::impl_deleteFrame()
|
||||
// do not dispose the frame in this guarded section (deadlock?)
|
||||
MutexGuard aGuard( m_aMutex );
|
||||
xOldFrame = m_xFrame;
|
||||
m_xFrame = Reference< XFrame2 > ();
|
||||
m_xFrame.clear();
|
||||
}
|
||||
|
||||
// notify the listeners
|
||||
|
||||
@@ -52,11 +52,11 @@ ProgressMonitor::ProgressMonitor( const css::uno::Reference< XComponentContext >
|
||||
|
||||
// Create instances for fixedtext, button and progress ...
|
||||
|
||||
m_xTopic_Top = css::uno::Reference< XFixedText > ( rxContext->getServiceManager()->createInstanceWithContext( FIXEDTEXT_SERVICENAME, rxContext ), UNO_QUERY );
|
||||
m_xText_Top = css::uno::Reference< XFixedText > ( rxContext->getServiceManager()->createInstanceWithContext( FIXEDTEXT_SERVICENAME, rxContext ), UNO_QUERY );
|
||||
m_xTopic_Bottom = css::uno::Reference< XFixedText > ( rxContext->getServiceManager()->createInstanceWithContext( FIXEDTEXT_SERVICENAME, rxContext ), UNO_QUERY );
|
||||
m_xText_Bottom = css::uno::Reference< XFixedText > ( rxContext->getServiceManager()->createInstanceWithContext( FIXEDTEXT_SERVICENAME, rxContext ), UNO_QUERY );
|
||||
m_xButton = css::uno::Reference< XButton > ( rxContext->getServiceManager()->createInstanceWithContext( BUTTON_SERVICENAME, rxContext ), UNO_QUERY );
|
||||
m_xTopic_Top.set ( rxContext->getServiceManager()->createInstanceWithContext( FIXEDTEXT_SERVICENAME, rxContext ), UNO_QUERY );
|
||||
m_xText_Top.set ( rxContext->getServiceManager()->createInstanceWithContext( FIXEDTEXT_SERVICENAME, rxContext ), UNO_QUERY );
|
||||
m_xTopic_Bottom.set( rxContext->getServiceManager()->createInstanceWithContext( FIXEDTEXT_SERVICENAME, rxContext ), UNO_QUERY );
|
||||
m_xText_Bottom.set ( rxContext->getServiceManager()->createInstanceWithContext( FIXEDTEXT_SERVICENAME, rxContext ), UNO_QUERY );
|
||||
m_xButton.set ( rxContext->getServiceManager()->createInstanceWithContext( BUTTON_SERVICENAME, rxContext ), UNO_QUERY );
|
||||
m_xProgressBar = VclPtr<ProgressBar>::Create(rxContext);
|
||||
|
||||
// ... cast controls to Reference< XControl > (for "setModel"!) ...
|
||||
|
||||
@@ -45,7 +45,7 @@ StatusIndicator::StatusIndicator( const css::uno::Reference< XComponentContext >
|
||||
++m_refCount;
|
||||
|
||||
// Create instances for fixedtext and progress ...
|
||||
m_xText = css::uno::Reference< XFixedText > ( rxContext->getServiceManager()->createInstanceWithContext( FIXEDTEXT_SERVICENAME, rxContext ), UNO_QUERY );
|
||||
m_xText.set( rxContext->getServiceManager()->createInstanceWithContext( FIXEDTEXT_SERVICENAME, rxContext ), UNO_QUERY );
|
||||
m_xProgressBar = VclPtr<ProgressBar>::Create(rxContext);
|
||||
// ... cast controls to css::uno::Reference< XControl > and set model ...
|
||||
// ( ProgressBar has no model !!! )
|
||||
|
||||
@@ -251,7 +251,7 @@ namespace accessibility
|
||||
|
||||
ListBoxAccessibleBase::disposing();
|
||||
}
|
||||
m_aParent = WeakReference< XAccessible >();
|
||||
m_aParent.clear();
|
||||
}
|
||||
|
||||
// XServiceInfo
|
||||
|
||||
@@ -160,7 +160,7 @@ SoundHandler::~SoundHandler()
|
||||
css::frame::DispatchResultEvent aEvent;
|
||||
aEvent.State = css::frame::DispatchResultState::FAILURE;
|
||||
m_xListener->dispatchFinished(aEvent);
|
||||
m_xListener = css::uno::Reference< css::frame::XDispatchResultListener >();
|
||||
m_xListener.clear();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -220,7 +220,7 @@ void SAL_CALL SoundHandler::dispatchWithNotification(const css::util::URL&
|
||||
m_xPlayer.set( avmedia::MediaWindow::createPlayer( aURL.Complete, aDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_REFERRER(), OUString()) ), css::uno::UNO_QUERY_THROW );
|
||||
// OK- we can start async playing ...
|
||||
// Count this request and initialize self-holder against dying by uno ref count ...
|
||||
m_xSelfHold = css::uno::Reference< css::uno::XInterface >(static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY);
|
||||
m_xSelfHold.set(static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY);
|
||||
m_xPlayer->start();
|
||||
m_aUpdateIdle.SetPriority( SchedulerPriority::LOWER );
|
||||
m_aUpdateIdle.Start();
|
||||
@@ -314,7 +314,7 @@ IMPL_LINK_NOARG_TYPED(SoundHandler, implts_PlayerNotify, Idle *, void)
|
||||
// We use m_xSelfHold to let us die ... but we must live till real finishing of this method too!!!
|
||||
// So we SHOULD use another "self-holder" temp. to provide that ...
|
||||
css::uno::Reference< css::uno::XInterface > xOperationHold = m_xSelfHold;
|
||||
m_xSelfHold = css::uno::Reference< css::uno::XInterface >();
|
||||
m_xSelfHold.clear();
|
||||
|
||||
// notify might existing listener
|
||||
// And forget this listener!
|
||||
@@ -327,7 +327,7 @@ IMPL_LINK_NOARG_TYPED(SoundHandler, implts_PlayerNotify, Idle *, void)
|
||||
else
|
||||
aEvent.State = css::frame::DispatchResultState::FAILURE;
|
||||
m_xListener->dispatchFinished(aEvent);
|
||||
m_xListener = css::uno::Reference< css::frame::XDispatchResultListener >();
|
||||
m_xListener.clear();
|
||||
}
|
||||
|
||||
// } SAFE
|
||||
|
||||
@@ -66,7 +66,7 @@ uno::Reference< media::XPlayer > SAL_CALL Manager::createPlayer( const OUString&
|
||||
DBG( "avmediagst: Manager::createPlayer" );
|
||||
|
||||
if( !pPlayer->create( aURL.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS ) ) )
|
||||
xRet = uno::Reference< media::XPlayer >();
|
||||
xRet.clear();
|
||||
|
||||
return xRet;
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL avmediagst_component_getFactory(
|
||||
if( rtl_str_compare( pImplName, IMPL_NAME ) == 0 )
|
||||
{
|
||||
const OUString aServiceName( SERVICE_NAME );
|
||||
xFactory = uno::Reference< lang::XSingleServiceFactory >( ::cppu::createSingleFactory(
|
||||
xFactory.set( ::cppu::createSingleFactory(
|
||||
static_cast< lang::XMultiServiceFactory* >( pServiceManager ),
|
||||
IMPL_NAME, create_MediaPlayer, uno::Sequence< OUString >( &aServiceName, 1 ) ) );
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL avmediaMacAVF_component_getFactor
|
||||
{
|
||||
const ::rtl::OUString aServiceName( AVMEDIA_MACAVF_MANAGER_SERVICENAME );
|
||||
|
||||
xFactory = uno::Reference< lang::XSingleServiceFactory >( ::cppu::createSingleFactory(
|
||||
xFactory.set( ::cppu::createSingleFactory(
|
||||
static_cast< lang::XMultiServiceFactory* >( pServiceManager ),
|
||||
AVMEDIA_MACAVF_MANAGER_IMPLEMENTATIONNAME,
|
||||
create_MediaPlayer, uno::Sequence< ::rtl::OUString >( &aServiceName, 1 ) ) );
|
||||
|
||||
@@ -53,7 +53,7 @@ uno::Reference< media::XPlayer > SAL_CALL Manager::createPlayer( const ::rtl::OU
|
||||
OSL_TRACE( "avmediamacavf: Manager::createPlayer" );
|
||||
|
||||
if( !pPlayer->create( aURL.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS ) ) )
|
||||
xRet = uno::Reference< media::XPlayer >();
|
||||
xRet.clear();
|
||||
|
||||
return xRet;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL avmediaogl_component_getFactory(
|
||||
{
|
||||
const OUString aServiceName( "com.sun.star.media.Manager_OpenGL" );
|
||||
|
||||
xFactory = uno::Reference< lang::XSingleServiceFactory >( ::cppu::createSingleFactory(
|
||||
xFactory.set( ::cppu::createSingleFactory(
|
||||
static_cast< lang::XMultiServiceFactory* >( pServiceManager ),
|
||||
OUString("com.sun.star.comp.avmedia.Manager_OpenGL" ),
|
||||
create_MediaPlayer, uno::Sequence< OUString >( &aServiceName, 1 ) ) );
|
||||
|
||||
@@ -53,7 +53,7 @@ uno::Reference< media::XPlayer > SAL_CALL Manager::createPlayer( const ::rtl::OU
|
||||
SAL_INFO( "avmedia.quicktime", "Manager::createPlayer" );
|
||||
|
||||
if( !pPlayer->create( aURL.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS ) ) )
|
||||
xRet = uno::Reference< media::XPlayer >();
|
||||
xRet.clear();
|
||||
|
||||
return xRet;
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL avmediaQuickTime_component_getFac
|
||||
{
|
||||
const ::rtl::OUString aServiceName( ::rtl::OUString(AVMEDIA_QUICKTIME_MANAGER_SERVICENAME ) );
|
||||
|
||||
xFactory = uno::Reference< lang::XSingleServiceFactory >( ::cppu::createSingleFactory(
|
||||
xFactory.set( ::cppu::createSingleFactory(
|
||||
static_cast< lang::XMultiServiceFactory* >( pServiceManager ),
|
||||
::rtl::OUString(AVMEDIA_QUICKTIME_MANAGER_IMPLEMENTATIONNAME ),
|
||||
create_MediaPlayer, uno::Sequence< OUString >( &aServiceName, 1 ) ) );
|
||||
|
||||
@@ -243,7 +243,7 @@ uno::Reference< media::XPlayer > MediaWindowImpl::createPlayer(
|
||||
xContext->getServiceManager()->createInstanceWithContext(rManagerServName, xContext),
|
||||
uno::UNO_QUERY );
|
||||
if( xManager.is() )
|
||||
xPlayer = uno::Reference< media::XPlayer >( xManager->createPlayer( rURL ), uno::UNO_QUERY );
|
||||
xPlayer.set( xManager->createPlayer( rURL ), uno::UNO_QUERY );
|
||||
else
|
||||
SAL_WARN( "avmedia", "failed to create media player service " << rManagerServName );
|
||||
} catch ( const uno::Exception &e )
|
||||
|
||||
@@ -101,7 +101,7 @@ uno::Reference< media::XPlayer > SAL_CALL Manager::createPlayer( const rtl::OUSt
|
||||
VLCPlayer* pPlayer( new VLCPlayer( mURL,
|
||||
*mInstance,
|
||||
mEventHandler /*, mxMgr */ ) );
|
||||
mPlayer = uno::Reference< media::XPlayer >( pPlayer );
|
||||
mPlayer.set( pPlayer );
|
||||
|
||||
return mPlayer;
|
||||
}
|
||||
|
||||
@@ -245,7 +245,7 @@ uno::Reference< css::media::XFrameGrabber > SAL_CALL VLCPlayer::createFrameGrabb
|
||||
if ( !mrFrameGrabber.is() )
|
||||
{
|
||||
VLCFrameGrabber *frameGrabber = new VLCFrameGrabber( mEventHandler, mUrl );
|
||||
mrFrameGrabber = uno::Reference< css::media::XFrameGrabber >( frameGrabber );
|
||||
mrFrameGrabber.set( frameGrabber );
|
||||
}
|
||||
|
||||
return mrFrameGrabber;
|
||||
|
||||
@@ -56,7 +56,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL avmediavlc_component_getFactory(
|
||||
if( rtl_str_compare( pImplName, IMPL_NAME ) == 0 )
|
||||
{
|
||||
const OUString aServiceName( SERVICE_NAME );
|
||||
xFactory = uno::Reference< lang::XSingleServiceFactory >( ::cppu::createSingleFactory(
|
||||
xFactory.set( ::cppu::createSingleFactory(
|
||||
static_cast< lang::XMultiServiceFactory* >( pServiceManager ),
|
||||
IMPL_NAME, create_MediaPlayer, uno::Sequence< OUString >( &aServiceName, 1 ) ) );
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ uno::Reference< media::XPlayer > SAL_CALL Manager::createPlayer( const OUString&
|
||||
const INetURLObject aURL( rURL );
|
||||
|
||||
if( !pPlayer->create( aURL.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS ) ) )
|
||||
xRet = uno::Reference< media::XPlayer >();
|
||||
xRet.clear();
|
||||
|
||||
return xRet;
|
||||
}
|
||||
|
||||
@@ -437,7 +437,7 @@ uno::Reference< ::media::XPlayerWindow > SAL_CALL Player::createPlayerWindow( co
|
||||
xRet = pWindow;
|
||||
|
||||
if( !pWindow->create( aArguments ) )
|
||||
xRet = uno::Reference< ::media::XPlayerWindow >();
|
||||
xRet.clear();
|
||||
}
|
||||
|
||||
return xRet;
|
||||
|
||||
@@ -40,7 +40,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL avmediawin_component_getFactory(
|
||||
{
|
||||
const OUString aServiceName( "com.sun.star.media.Manager_DirectX" );
|
||||
|
||||
xFactory = uno::Reference< lang::XSingleServiceFactory >( ::cppu::createSingleFactory(
|
||||
xFactory.set( ::cppu::createSingleFactory(
|
||||
reinterpret_cast< lang::XMultiServiceFactory* >( pServiceManager ),
|
||||
OUString("com.sun.star.comp.avmedia.Manager_DirectX" ),
|
||||
create_MediaPlayer, uno::Sequence< OUString >( &aServiceName, 1 ) ) );
|
||||
|
||||
@@ -58,7 +58,7 @@ AccessibleDialogControlShape::AccessibleDialogControlShape (DialogWindow* pDialo
|
||||
m_pExternalLock = static_cast< VCLExternalSolarLock* >( getExternalLock() );
|
||||
|
||||
if ( m_pDlgEdObj )
|
||||
m_xControlModel = Reference< XPropertySet >( m_pDlgEdObj->GetUnoControlModel(), UNO_QUERY );
|
||||
m_xControlModel.set( m_pDlgEdObj->GetUnoControlModel(), UNO_QUERY );
|
||||
|
||||
if ( m_xControlModel.is() )
|
||||
m_xControlModel->addPropertyChangeListener( OUString(), static_cast< beans::XPropertyChangeListener* >( this ) );
|
||||
|
||||
@@ -805,15 +805,13 @@ void LibPage::InsertLib()
|
||||
OUString aModURL( aModURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
|
||||
if ( xSFA->exists( aModURL ) )
|
||||
{
|
||||
xModLibContImport = Reference< script::XLibraryContainer2 >(
|
||||
script::DocumentScriptLibraryContainer::createWithURL(xContext, aModURL), UNO_QUERY );
|
||||
xModLibContImport.set( script::DocumentScriptLibraryContainer::createWithURL(xContext, aModURL), UNO_QUERY );
|
||||
}
|
||||
|
||||
OUString aDlgURL( aDlgURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
|
||||
if ( xSFA->exists( aDlgURL ) )
|
||||
{
|
||||
xDlgLibContImport = Reference< script::XLibraryContainer2 >(
|
||||
script::DocumentDialogLibraryContainer::createWithURL(xContext, aDlgURL), UNO_QUERY );
|
||||
xDlgLibContImport.set( script::DocumentDialogLibraryContainer::createWithURL(xContext, aDlgURL), UNO_QUERY );
|
||||
}
|
||||
|
||||
if ( xModLibContImport.is() || xDlgLibContImport.is() )
|
||||
@@ -973,7 +971,7 @@ void LibPage::InsertLib()
|
||||
OUString aModStorageURL( aModStorageURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
|
||||
|
||||
// create library link
|
||||
xModLib = Reference< container::XNameContainer >( xModLibContainer->createLibraryLink( aLibName, aModStorageURL, true ), UNO_QUERY);
|
||||
xModLib.set( xModLibContainer->createLibraryLink( aLibName, aModStorageURL, true ), UNO_QUERY);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1042,7 +1040,7 @@ void LibPage::InsertLib()
|
||||
OUString aDlgStorageURL( aDlgStorageURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
|
||||
|
||||
// create library link
|
||||
xDlgLib = Reference< container::XNameContainer >( xDlgLibContainer->createLibraryLink( aLibName, aDlgStorageURL, true ), UNO_QUERY);
|
||||
xDlgLib.set( xDlgLibContainer->createLibraryLink( aLibName, aDlgStorageURL, true ), UNO_QUERY);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -286,7 +286,7 @@ void Shell::CopyDialogResources(
|
||||
|
||||
// create dialog model
|
||||
Reference< XComponentContext > xContext = comphelper::getProcessComponentContext();
|
||||
Reference< container::XNameContainer > xDialogModel = Reference< container::XNameContainer >( xContext->getServiceManager()->createInstanceWithContext
|
||||
Reference< container::XNameContainer > xDialogModel( xContext->getServiceManager()->createInstanceWithContext
|
||||
( "com.sun.star.awt.UnoControlDialogModel", xContext ), UNO_QUERY );
|
||||
Reference< io::XInputStream > xInput( io_xISP->createInputStream() );
|
||||
::xmlscript::importDialogModel( xInput, xDialogModel, xContext, rSourceDoc.isDocument() ? rSourceDoc.getDocument() : Reference< frame::XModel >() );
|
||||
|
||||
@@ -1522,7 +1522,7 @@ void DlgEdForm::UpdateGroups()
|
||||
sal_uInt32 nSize = aChildList.size();
|
||||
Sequence< Reference< awt::XControl > > aSeqControls( nSize );
|
||||
for ( sal_uInt32 i = 0; i < nSize; ++i )
|
||||
aSeqControls.getArray()[i] = Reference< awt::XControl >( aChildList[i]->GetControl(), UNO_QUERY );
|
||||
aSeqControls.getArray()[i].set( aChildList[i]->GetControl(), UNO_QUERY );
|
||||
|
||||
sal_Int32 nGroupCount = xTabModel->getGroupCount();
|
||||
for ( sal_Int32 nGroup = 0; nGroup < nGroupCount; ++nGroup )
|
||||
@@ -1550,7 +1550,7 @@ void DlgEdForm::UpdateGroups()
|
||||
if ( xCtrlModel.get() == pModels[nModel].get() )
|
||||
{
|
||||
// get the control peer and insert into the list of peers
|
||||
aSeqPeers.getArray()[ nModel ] = Reference< awt::XWindow >( xCtrl->getPeer(), UNO_QUERY );
|
||||
aSeqPeers.getArray()[ nModel ].set( xCtrl->getPeer(), UNO_QUERY );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,9 +131,7 @@ void PropBrw::ImplReCreateController()
|
||||
// create a property browser controller
|
||||
Reference< XMultiComponentFactory > xFactory( xInspectorContext->getServiceManager(), UNO_QUERY_THROW );
|
||||
static const char s_sControllerServiceName[] = "com.sun.star.awt.PropertyBrowserController";
|
||||
m_xBrowserController = Reference< XPropertySet >(
|
||||
xFactory->createInstanceWithContext( s_sControllerServiceName, xInspectorContext ), UNO_QUERY
|
||||
);
|
||||
m_xBrowserController.set( xFactory->createInstanceWithContext( s_sControllerServiceName, xInspectorContext ), UNO_QUERY );
|
||||
if ( !m_xBrowserController.is() )
|
||||
{
|
||||
ShowServiceNotAvailableError( GetParent(), s_sControllerServiceName, true );
|
||||
|
||||
@@ -91,10 +91,8 @@ void VBATest::testMiscOLEStuff()
|
||||
if( xContext.is() )
|
||||
{
|
||||
uno::Reference<lang::XMultiComponentFactory> xSMgr = xContext->getServiceManager();
|
||||
xOLEFactory = uno::Reference<lang::XMultiServiceFactory>(
|
||||
xSMgr->createInstanceWithContext(
|
||||
"com.sun.star.bridge.OleObjectFactory",
|
||||
xContext ), uno::UNO_QUERY );
|
||||
xOLEFactory.set( xSMgr->createInstanceWithContext( "com.sun.star.bridge.OleObjectFactory", xContext ),
|
||||
uno::UNO_QUERY );
|
||||
}
|
||||
bool bOk = false;
|
||||
if( xOLEFactory.is() )
|
||||
|
||||
@@ -216,7 +216,7 @@ void RTL_Impl_CreatePropertySet( StarBASIC* pBasic, SbxArray& rPar, bool bWrite
|
||||
cppu::UnoType<Sequence<PropertyValue>>::get() );
|
||||
Sequence<PropertyValue> const *pArg =
|
||||
static_cast<Sequence<PropertyValue> const *>(aArgAsAny.getValue());
|
||||
Reference< XPropertyAccess > xPropAcc = Reference< XPropertyAccess >::query( xInterface );
|
||||
Reference< XPropertyAccess > xPropAcc( xInterface, UNO_QUERY );
|
||||
xPropAcc->setPropertyValues( *pArg );
|
||||
|
||||
// Build a SbUnoObject and return it
|
||||
|
||||
@@ -248,12 +248,11 @@ SbUnoObject* createOLEObject_Impl( const OUString& aType )
|
||||
{
|
||||
bNeedsInit = false;
|
||||
|
||||
Reference< XComponentContext > xContext(
|
||||
comphelper::getProcessComponentContext() );
|
||||
Reference< XComponentContext > xContext( comphelper::getProcessComponentContext() );
|
||||
if( xContext.is() )
|
||||
{
|
||||
Reference<XMultiComponentFactory> xSMgr = xContext->getServiceManager();
|
||||
xOLEFactory = Reference<XMultiServiceFactory>(
|
||||
xOLEFactory.set(
|
||||
xSMgr->createInstanceWithContext(
|
||||
OUString( "com.sun.star.bridge.OleObjectFactory"),
|
||||
xContext ), UNO_QUERY );
|
||||
@@ -2347,15 +2346,15 @@ SbUnoObject::SbUnoObject( const OUString& aName_, const Any& aUnoObj_ )
|
||||
|
||||
Reference< XTypeProvider > xTypeProvider;
|
||||
// Did the object have an invocation itself?
|
||||
mxInvocation = Reference< XInvocation >( x, UNO_QUERY );
|
||||
mxInvocation.set( x, UNO_QUERY );
|
||||
|
||||
xTypeProvider = Reference< XTypeProvider >( x, UNO_QUERY );
|
||||
xTypeProvider.set( x, UNO_QUERY );
|
||||
|
||||
if( mxInvocation.is() )
|
||||
{
|
||||
|
||||
// get the ExactName
|
||||
mxExactNameInvocation = Reference< XExactName >::query( mxInvocation );
|
||||
mxExactNameInvocation.set( mxInvocation, UNO_QUERY );
|
||||
|
||||
// The remainder refers only to the introspection
|
||||
if( !xTypeProvider.is() )
|
||||
@@ -2462,10 +2461,10 @@ void SbUnoObject::doIntrospection()
|
||||
}
|
||||
|
||||
// get MaterialHolder from access
|
||||
mxMaterialHolder = Reference< XMaterialHolder >::query( mxUnoAccess );
|
||||
mxMaterialHolder.set( mxUnoAccess, UNO_QUERY );
|
||||
|
||||
// get ExactName from access
|
||||
mxExactName = Reference< XExactName >::query( mxUnoAccess );
|
||||
mxExactName.set( mxUnoAccess, UNO_QUERY );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -2779,7 +2779,7 @@ void SAL_CALL SfxLibraryContainer::disposing()
|
||||
EventObject aEvent( xModel.get() );
|
||||
maVBAScriptListeners.disposing( aEvent );
|
||||
stopAllComponentListening();
|
||||
mxOwnerDocument = WeakReference< XModel >();
|
||||
mxOwnerDocument.clear();
|
||||
}
|
||||
|
||||
// Methods XLibraryContainerPassword
|
||||
|
||||
@@ -79,7 +79,7 @@ sal_Int32 Client::run(css::uno::Sequence< OUString > const &)
|
||||
}
|
||||
css::uno::Reference< test::javauno::nativethreadpool::XRelay > relay;
|
||||
try {
|
||||
relay = css::uno::Reference< test::javauno::nativethreadpool::XRelay >(
|
||||
relay.set(
|
||||
factory->createInstanceWithContext(
|
||||
OUString( "test.javauno.nativethreadpool.Relay" ),
|
||||
context),
|
||||
@@ -99,8 +99,7 @@ sal_Int32 Client::run(css::uno::Sequence< OUString > const &)
|
||||
}
|
||||
css::uno::Reference< test::javauno::nativethreadpool::XSource > source;
|
||||
try {
|
||||
source
|
||||
= css::uno::Reference< test::javauno::nativethreadpool::XSource >(
|
||||
source.set(
|
||||
css::bridge::UnoUrlResolver::create(context)->resolve(
|
||||
OUString( "uno:socket,host=localhost,port=3830;urp;test" )),
|
||||
css::uno::UNO_QUERY_THROW);
|
||||
|
||||
@@ -69,8 +69,7 @@ sal_Int32 Server::get() throw (css::uno::RuntimeException) {
|
||||
css::uno::Reference< test::javauno::nativethreadpool::XSource > source;
|
||||
try {
|
||||
// Use "127.0.0.1" instead of "localhost", see #i32281#:
|
||||
source
|
||||
= css::uno::Reference< test::javauno::nativethreadpool::XSource >(
|
||||
source.set(
|
||||
css::bridge::UnoUrlResolver::create(context)->resolve(
|
||||
OUString( "uno:socket,host=127.0.0.1,port=3831;urp;test" )),
|
||||
css::uno::UNO_QUERY_THROW);
|
||||
|
||||
@@ -203,7 +203,7 @@ int main( int argc, char *argv[] )
|
||||
// Reference < XComponent > rComp( rBridge , UNO_QUERY );
|
||||
// rComp->dispose();
|
||||
|
||||
rInitialObject = Reference < XInterface > ();
|
||||
rInitialObject.clear();
|
||||
printf( "Waiting...\n" );
|
||||
TimeValue value={bReverse ?1000 :2,0};
|
||||
osl_waitThread( &value );
|
||||
|
||||
@@ -591,7 +591,7 @@ void testAllTypes( const Reference < XCallMe > & rRCallMe )
|
||||
types.Float = (float)123.239;
|
||||
types.Double = 1279.12490012;
|
||||
types.String = OUString("abcdefghijklmnopqrstuvwxyz");
|
||||
types.Interface = Reference< XInterface >( rRCallMe , UNO_QUERY);
|
||||
types.Interface.set( rRCallMe , UNO_QUERY);
|
||||
types.Any <<= types.Double;
|
||||
|
||||
TestTypes retTypes = rRCallMe->transport( types );
|
||||
|
||||
@@ -197,7 +197,7 @@ int main( int argc, char *argv[] )
|
||||
rComp->dispose();
|
||||
|
||||
|
||||
rComp = Reference < XComponent > ( rSMgr , UNO_QUERY );
|
||||
rComp.set( rSMgr , UNO_QUERY );
|
||||
rComp->dispose();
|
||||
}
|
||||
return 0;
|
||||
|
||||
@@ -1336,7 +1336,7 @@ namespace cairocanvas
|
||||
bool bHasAlpha )
|
||||
{
|
||||
SurfaceSharedPtr pSurface=pInputSurface;
|
||||
uno::Reference< rendering::XCachedPrimitive > rv = uno::Reference< rendering::XCachedPrimitive >(NULL);
|
||||
uno::Reference< rendering::XCachedPrimitive > rv(NULL);
|
||||
geometry::IntegerSize2D aBitmapSize = rSize;
|
||||
|
||||
if( mpCairo )
|
||||
@@ -1381,7 +1381,7 @@ namespace cairocanvas
|
||||
aMatrix.xx = aMatrix.yy = 1;
|
||||
cairo_set_matrix( mpCairo.get(), &aMatrix );
|
||||
|
||||
rv = uno::Reference< rendering::XCachedPrimitive >(
|
||||
rv.set(
|
||||
new CachedBitmap( pSurface, viewState, renderState,
|
||||
// cast away const, need to
|
||||
// change refcount (as this is
|
||||
@@ -1467,7 +1467,7 @@ namespace cairocanvas
|
||||
free( data );
|
||||
}
|
||||
else
|
||||
rv = uno::Reference< rendering::XCachedPrimitive >(NULL);
|
||||
rv.set(NULL);
|
||||
|
||||
#ifdef CAIRO_CANVAS_PERF_TRACE
|
||||
mxDevice->stopPerfTrace( &aTimer, "drawBitmap" );
|
||||
@@ -1500,7 +1500,7 @@ namespace cairocanvas
|
||||
free( data );
|
||||
}
|
||||
else
|
||||
rv = uno::Reference< rendering::XCachedPrimitive >(NULL);
|
||||
rv.set(NULL);
|
||||
|
||||
#ifdef CAIRO_CANVAS_PERF_TRACE
|
||||
mxDevice->stopPerfTrace( &aTimer, "drawBitmap" );
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace canvas
|
||||
{
|
||||
// setup identity transform
|
||||
setIdentityAffineMatrix2D( renderState.AffineTransform );
|
||||
renderState.Clip = uno::Reference< rendering::XPolyPolygon2D >();
|
||||
renderState.Clip.clear();
|
||||
renderState.DeviceColor = uno::Sequence< double >();
|
||||
renderState.CompositeOperation = rendering::CompositeOperation::OVER;
|
||||
|
||||
@@ -88,7 +88,7 @@ namespace canvas
|
||||
{
|
||||
// setup identity transform
|
||||
setIdentityAffineMatrix2D( viewState.AffineTransform );
|
||||
viewState.Clip = uno::Reference< rendering::XPolyPolygon2D >();
|
||||
viewState.Clip.clear();
|
||||
|
||||
return viewState;
|
||||
}
|
||||
|
||||
@@ -657,8 +657,7 @@ void DemoApp::Main()
|
||||
try
|
||||
{
|
||||
uno::Reference< uno::XComponentContext > xCtx = ::cppu::defaultBootstrap_InitialComponentContext();
|
||||
xFactory = uno::Reference< lang::XMultiServiceFactory >( xCtx->getServiceManager(),
|
||||
uno::UNO_QUERY );
|
||||
xFactory.set( xCtx->getServiceManager(), uno::UNO_QUERY );
|
||||
if( xFactory.is() )
|
||||
::comphelper::setProcessServiceFactory( xFactory );
|
||||
}
|
||||
|
||||
@@ -175,8 +175,7 @@ Reference< awt::XFont > SAL_CALL AccessibleChartElement::getFont()
|
||||
|
||||
Reference< awt::XFont > xFont;
|
||||
// using assignment for broken gcc 3.3
|
||||
Reference< awt::XDevice > xDevice = Reference< awt::XDevice >(
|
||||
Reference< awt::XWindow >( GetInfo().m_xWindow ), uno::UNO_QUERY );
|
||||
Reference< awt::XDevice > xDevice( Reference< awt::XWindow >( GetInfo().m_xWindow ), uno::UNO_QUERY );
|
||||
|
||||
if( xDevice.is())
|
||||
{
|
||||
|
||||
@@ -350,7 +350,7 @@ void SAL_CALL AccessibleChartView::selectionChanged( const lang::EventObject& /*
|
||||
Reference< view::XSelectionSupplier > xSelectionSupplier;
|
||||
{
|
||||
MutexGuard aGuard( GetMutex());
|
||||
xSelectionSupplier = Reference< view::XSelectionSupplier >(m_xSelectionSupplier);
|
||||
xSelectionSupplier.set(m_xSelectionSupplier);
|
||||
}
|
||||
|
||||
if( xSelectionSupplier.is() )
|
||||
|
||||
@@ -80,7 +80,7 @@ void Chart2ModelContact::setModel( const ::com::sun::star::uno::Reference<
|
||||
|
||||
void Chart2ModelContact::clear()
|
||||
{
|
||||
m_xChartModel = uno::WeakReference< frame::XModel >(0);
|
||||
m_xChartModel.clear();
|
||||
m_xChartView.clear();
|
||||
mpModel = NULL;
|
||||
}
|
||||
@@ -108,7 +108,7 @@ uno::Reference< lang::XUnoTunnel > Chart2ModelContact::getChartView() const
|
||||
Reference<frame::XModel> xModel(m_xChartModel);
|
||||
uno::Reference< lang::XMultiServiceFactory > xFact( xModel, uno::UNO_QUERY );
|
||||
if( xFact.is() )
|
||||
m_xChartView = Reference< lang::XUnoTunnel >( xFact->createInstance( CHART_VIEW_SERVICE_NAME ), uno::UNO_QUERY );
|
||||
m_xChartView.set( xFact->createInstance( CHART_VIEW_SERVICE_NAME ), uno::UNO_QUERY );
|
||||
}
|
||||
return m_xChartView;
|
||||
}
|
||||
|
||||
@@ -634,11 +634,11 @@ void ChartDataWrapper::initDataAccess()
|
||||
if( !xChartDoc.is() )
|
||||
return;
|
||||
if( xChartDoc->hasInternalDataProvider() )
|
||||
m_xDataAccess = Reference< XAnyDescriptionAccess >( xChartDoc->getDataProvider(), uno::UNO_QUERY_THROW );
|
||||
m_xDataAccess.set( xChartDoc->getDataProvider(), uno::UNO_QUERY_THROW );
|
||||
else
|
||||
{
|
||||
//create a separate "internal data provider" that is not connected to the model
|
||||
m_xDataAccess = Reference< XAnyDescriptionAccess >( ChartModelHelper::createInternalDataProvider(
|
||||
m_xDataAccess.set( ChartModelHelper::createInternalDataProvider(
|
||||
xChartDoc, false /*bConnectToModel*/ ), uno::UNO_QUERY_THROW );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1088,7 +1088,7 @@ Reference< drawing::XShapes > ChartDocumentWrapper::getAdditionalShapes() const
|
||||
if( !aShapeVector.empty() )
|
||||
{
|
||||
// create a shape collection
|
||||
xFoundShapes = uno::Reference< drawing::XShapes >( drawing::ShapeCollection::create(
|
||||
xFoundShapes.set( drawing::ShapeCollection::create(
|
||||
comphelper::getProcessComponentContext()), uno::UNO_QUERY );
|
||||
|
||||
OSL_ENSURE( xFoundShapes.is(), "Couldn't create a shape collection!" );
|
||||
|
||||
@@ -933,7 +933,7 @@ Reference< drawing::XShape > SAL_CALL DiagramWrapper::getZAxisTitle()
|
||||
Reference< drawing::XShape > xRet;
|
||||
Reference< XAxis > xAxis( getAxis(2) );
|
||||
if( xAxis.is() )
|
||||
xRet = Reference< drawing::XShape >( xAxis->getAxisTitle(), uno::UNO_QUERY );
|
||||
xRet.set( xAxis->getAxisTitle(), uno::UNO_QUERY );
|
||||
return xRet;
|
||||
}
|
||||
|
||||
@@ -981,7 +981,7 @@ Reference< drawing::XShape > SAL_CALL DiagramWrapper::getXAxisTitle()
|
||||
Reference< drawing::XShape > xRet;
|
||||
Reference< XAxis > xAxis( getAxis(0) );
|
||||
if( xAxis.is() )
|
||||
xRet = Reference< drawing::XShape >( xAxis->getAxisTitle(), uno::UNO_QUERY );
|
||||
xRet.set( xAxis->getAxisTitle(), uno::UNO_QUERY );
|
||||
return xRet;
|
||||
}
|
||||
|
||||
@@ -1029,7 +1029,7 @@ Reference< drawing::XShape > SAL_CALL DiagramWrapper::getYAxisTitle()
|
||||
Reference< drawing::XShape > xRet;
|
||||
Reference< XAxis > xAxis( getAxis(1) );
|
||||
if( xAxis.is() )
|
||||
xRet = Reference< drawing::XShape >( xAxis->getAxisTitle(), uno::UNO_QUERY );
|
||||
xRet.set( xAxis->getAxisTitle(), uno::UNO_QUERY );
|
||||
return xRet;
|
||||
}
|
||||
|
||||
@@ -1068,7 +1068,7 @@ Reference< drawing::XShape > SAL_CALL DiagramWrapper::getSecondXAxisTitle()
|
||||
Reference< drawing::XShape > xRet;
|
||||
Reference< XAxis > xAxis( getSecondaryAxis(0) );
|
||||
if( xAxis.is() )
|
||||
xRet = Reference< drawing::XShape >( xAxis->getAxisTitle(), uno::UNO_QUERY );
|
||||
xRet.set( xAxis->getAxisTitle(), uno::UNO_QUERY );
|
||||
return xRet;
|
||||
}
|
||||
|
||||
@@ -1078,7 +1078,7 @@ Reference< drawing::XShape > SAL_CALL DiagramWrapper::getSecondYAxisTitle()
|
||||
Reference< drawing::XShape > xRet;
|
||||
Reference< XAxis > xAxis( getSecondaryAxis(1) );
|
||||
if( xAxis.is() )
|
||||
xRet = Reference< drawing::XShape >( xAxis->getAxisTitle(), uno::UNO_QUERY );
|
||||
xRet.set( xAxis->getAxisTitle(), uno::UNO_QUERY );
|
||||
return xRet;
|
||||
}
|
||||
|
||||
|
||||
@@ -188,7 +188,7 @@ void SAL_CALL MinMaxLineWrapper::setPropertyValue( const OUString& rPropertyName
|
||||
Sequence< Reference< chart2::XDataSeries > > aSeriesSeq( xSeriesContainer->getDataSeries() );
|
||||
if(aSeriesSeq.getLength())
|
||||
{
|
||||
xPropSet = Reference< beans::XPropertySet >(aSeriesSeq[0],uno::UNO_QUERY);
|
||||
xPropSet.set(aSeriesSeq[0],uno::UNO_QUERY);
|
||||
if(xPropSet.is())
|
||||
{
|
||||
if( rPropertyName == "LineColor" )
|
||||
@@ -227,7 +227,7 @@ uno::Any SAL_CALL MinMaxLineWrapper::getPropertyValue( const OUString& rProperty
|
||||
Sequence< Reference< chart2::XDataSeries > > aSeriesSeq( xSeriesContainer->getDataSeries() );
|
||||
if(aSeriesSeq.getLength())
|
||||
{
|
||||
xPropSet = Reference< beans::XPropertySet >(aSeriesSeq[0],uno::UNO_QUERY);
|
||||
xPropSet.set(aSeriesSeq[0],uno::UNO_QUERY);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -487,7 +487,7 @@ void SAL_CALL ChartController::attachFrame(
|
||||
SolarMutexGuard aSolarGuard;
|
||||
m_pChartWindow = VclPtr<ChartWindow>::Create(this,pParent,pParent?pParent->GetStyle():0);
|
||||
m_pChartWindow->SetBackground();//no Background
|
||||
m_xViewWindow = uno::Reference< awt::XWindow >( m_pChartWindow->GetComponentInterface(), uno::UNO_QUERY );
|
||||
m_xViewWindow.set( m_pChartWindow->GetComponentInterface(), uno::UNO_QUERY );
|
||||
m_pChartWindow->Show();
|
||||
m_apDropTargetHelper.reset(
|
||||
new ChartDropTargetHelper( m_pChartWindow->GetDropTarget(),
|
||||
@@ -841,7 +841,7 @@ void SAL_CALL ChartController::dispose()
|
||||
uno::Reference< view::XSelectionChangeListener > xSelectionChangeListener;
|
||||
uno::Reference< chart2::data::XDataReceiver > xDataReceiver( getModel(), uno::UNO_QUERY );
|
||||
if( xDataReceiver.is() )
|
||||
xSelectionChangeListener = uno::Reference< view::XSelectionChangeListener >( xDataReceiver->getRangeHighlighter(), uno::UNO_QUERY );
|
||||
xSelectionChangeListener.set( xDataReceiver->getRangeHighlighter(), uno::UNO_QUERY );
|
||||
if( xSelectionChangeListener.is() )
|
||||
{
|
||||
uno::Reference< frame::XController > xController( this );
|
||||
|
||||
@@ -512,7 +512,7 @@ void ChartController::executeDispatch_Copy()
|
||||
}
|
||||
if ( pSelectedObj )
|
||||
{
|
||||
xTransferable = Reference< datatransfer::XTransferable >( new ChartTransferable(
|
||||
xTransferable.set( new ChartTransferable(
|
||||
&m_pDrawModelWrapper->getSdrModel(), pSelectedObj, aSelOID.isAdditionalShape() ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ sal_Bool SAL_CALL ChartFrameLoader::load( const uno::Sequence< beans::PropertyVa
|
||||
uno::Reference< frame::XController > xController = NULL;
|
||||
uno::Reference< awt::XWindow > xComponentWindow = NULL;
|
||||
{
|
||||
xController = uno::Reference< frame::XController >(
|
||||
xController.set(
|
||||
m_xCC->getServiceManager()->createInstanceWithContext(
|
||||
CHART_CONTROLLER_SERVICE_IMPLEMENTATION_NAME,m_xCC )
|
||||
, uno::UNO_QUERY );
|
||||
|
||||
@@ -138,7 +138,7 @@ bool PositionAndSizeHelper::moveObject( const OUString& rObjectCID
|
||||
ObjectType eObjectType( ObjectIdentifier::getObjectType( rObjectCID ) );
|
||||
if(OBJECTTYPE_DIAGRAM==eObjectType || OBJECTTYPE_DIAGRAM_WALL==eObjectType || OBJECTTYPE_DIAGRAM_FLOOR==eObjectType)
|
||||
{
|
||||
xObjectProp = uno::Reference< beans::XPropertySet >( ObjectIdentifier::getDiagramForCID( rObjectCID, xChartModel ), uno::UNO_QUERY );
|
||||
xObjectProp.set( ObjectIdentifier::getDiagramForCID( rObjectCID, xChartModel ), uno::UNO_QUERY );
|
||||
if(!xObjectProp.is())
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1056,7 +1056,7 @@ void lcl_switchToDateCategories( const Reference< XChartDocument >& xChartDoc, c
|
||||
sal_Int32 nNumberFormat = -1;
|
||||
xAxisProps->getPropertyValue(CHART_UNONAME_NUMFMT) >>= nNumberFormat;
|
||||
|
||||
Reference< util::XNumberFormats > xNumberFormats = Reference< util::XNumberFormats >( xNumberFormatsSupplier->getNumberFormats() );
|
||||
Reference< util::XNumberFormats > xNumberFormats( xNumberFormatsSupplier->getNumberFormats() );
|
||||
if( xNumberFormats.is() )
|
||||
{
|
||||
Reference< beans::XPropertySet > xKeyProps;
|
||||
|
||||
@@ -174,8 +174,7 @@ void ExplicitCategoriesProvider::convertCategoryAnysToText( uno::Sequence< OUStr
|
||||
if(!nCount)
|
||||
return;
|
||||
rOutTexts.realloc(nCount);
|
||||
Reference< util::XNumberFormats > xNumberFormats;
|
||||
xNumberFormats = Reference< util::XNumberFormats >( rModel.getNumberFormats() );
|
||||
Reference< util::XNumberFormats > xNumberFormats( rModel.getNumberFormats() );
|
||||
|
||||
sal_Int32 nAxisNumberFormat = 0;
|
||||
Reference< XCoordinateSystem > xCooSysModel( ChartModelHelper::getFirstCoordinateSystem( rModel ) );
|
||||
@@ -421,8 +420,7 @@ bool lcl_fillDateCategories( const uno::Reference< data::XDataSequence >& xDataS
|
||||
uno::Sequence< uno::Any > aValues = xDataSequence->getData();
|
||||
sal_Int32 nCount = aValues.getLength();
|
||||
rDateCategories.reserve(nCount);
|
||||
Reference< util::XNumberFormats > xNumberFormats;
|
||||
xNumberFormats = Reference< util::XNumberFormats >( rModel.getNumberFormats() );
|
||||
Reference< util::XNumberFormats > xNumberFormats( rModel.getNumberFormats() );
|
||||
|
||||
bool bOwnData = false;
|
||||
bool bOwnDataAnddAxisHasAnyFormat = false;
|
||||
|
||||
@@ -161,15 +161,13 @@ struct lcl_internalizeSeries : public ::std::unary_function< Reference< chart2::
|
||||
comphelper::copyProperties(
|
||||
Reference< beans::XPropertySet >( xLabel, uno::UNO_QUERY ),
|
||||
Reference< beans::XPropertySet >( xNewLabel, uno::UNO_QUERY ));
|
||||
aNewSeriesData[i] = Reference< chart2::data::XLabeledDataSequence >(
|
||||
new LabeledDataSequence( xNewValues, xNewLabel ));
|
||||
aNewSeriesData[i].set( new LabeledDataSequence( xNewValues, xNewLabel ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if( m_bConnectToModel )
|
||||
aNewSeriesData[i] = Reference< chart2::data::XLabeledDataSequence >(
|
||||
new LabeledDataSequence( xNewValues ));
|
||||
aNewSeriesData[i].set( new LabeledDataSequence( xNewValues ) );
|
||||
}
|
||||
}
|
||||
if( m_bConnectToModel )
|
||||
|
||||
@@ -336,7 +336,7 @@ void CloseableLifeTimeManager::impl_doClose()
|
||||
uno::Reference< util::XCloseable > xCloseable=NULL;
|
||||
try
|
||||
{
|
||||
xCloseable = uno::Reference< util::XCloseable >(m_pCloseable);;
|
||||
xCloseable.set(m_pCloseable);
|
||||
if(xCloseable.is())
|
||||
{
|
||||
//--call notifyClosing on all registered close listeners
|
||||
|
||||
@@ -1330,7 +1330,7 @@ Reference< beans::XPropertySet > ObjectIdentifier::getObjectPropertySet(
|
||||
Reference< XDataSeries > xSeries( ObjectIdentifier::getDataSeriesForCID(
|
||||
rObjectCID, xChartModel ) );
|
||||
if( xSeries.is() )
|
||||
xObjectProperties = Reference< beans::XPropertySet >( xSeries, uno::UNO_QUERY );
|
||||
xObjectProperties.set( xSeries, uno::UNO_QUERY );
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -1368,7 +1368,7 @@ Reference< beans::XPropertySet > ObjectIdentifier::getObjectPropertySet(
|
||||
errorBar = "ErrorBarZ";
|
||||
|
||||
xSeriesProp->getPropertyValue( errorBar ) >>= xErrorBarProp;
|
||||
xObjectProperties = Reference< beans::XPropertySet >( xErrorBarProp, uno::UNO_QUERY );
|
||||
xObjectProperties.set( xErrorBarProp, uno::UNO_QUERY );
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -875,7 +875,7 @@ void GL3DBarChart::spawnRenderThread(RenderThread *pThread)
|
||||
|
||||
Size aSize = mpWindow->GetSizePixel();
|
||||
mpWindow->getContext().setWinSize(aSize);
|
||||
mpRenderThread = rtl::Reference<RenderThread>(pThread);
|
||||
mpRenderThread.set(pThread);
|
||||
mpWindow->getContext().resetCurrent();
|
||||
mpRenderThread->launch();
|
||||
}
|
||||
|
||||
@@ -363,7 +363,7 @@ void PieChart::createTextLabelShape(
|
||||
///the current label in order to simplify later label position rearrangement;
|
||||
uno::Reference< container::XChild > xChild( aPieLabelInfo.xTextShape, uno::UNO_QUERY );
|
||||
if( xChild.is() )
|
||||
aPieLabelInfo.xLabelGroupShape = uno::Reference<drawing::XShape>( xChild->getParent(), uno::UNO_QUERY );
|
||||
aPieLabelInfo.xLabelGroupShape.set( xChild->getParent(), uno::UNO_QUERY );
|
||||
aPieLabelInfo.fValue = nVal;
|
||||
aPieLabelInfo.bMovementAllowed = bMovementAllowed;
|
||||
aPieLabelInfo.bMoved= false;
|
||||
|
||||
@@ -2417,7 +2417,7 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries(
|
||||
// set CID to symbol for selection
|
||||
if( xShape.is() )
|
||||
{
|
||||
aEntry.aSymbol = uno::Reference< drawing::XShape >( xSymbolGroup, uno::UNO_QUERY );
|
||||
aEntry.aSymbol.set( xSymbolGroup, uno::UNO_QUERY );
|
||||
|
||||
OUString aChildParticle( ObjectIdentifier::createChildParticleWithIndex( OBJECTTYPE_DATA_POINT, nIdx ) );
|
||||
aChildParticle = ObjectIdentifier::addChildParticle( aChildParticle, ObjectIdentifier::createChildParticleWithIndex( OBJECTTYPE_LEGEND_ENTRY, 0 ) );
|
||||
@@ -2446,7 +2446,7 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries(
|
||||
// set CID to symbol for selection
|
||||
if( xShape.is())
|
||||
{
|
||||
aEntry.aSymbol = uno::Reference< drawing::XShape >( xSymbolGroup, uno::UNO_QUERY );
|
||||
aEntry.aSymbol.set( xSymbolGroup, uno::UNO_QUERY );
|
||||
|
||||
OUString aChildParticle( ObjectIdentifier::createChildParticleWithIndex( OBJECTTYPE_LEGEND_ENTRY, 0 ) );
|
||||
OUString aCID = ObjectIdentifier::createClassifiedIdentifierForParticles( rSeries.getSeriesParticle(), aChildParticle );
|
||||
@@ -2491,7 +2491,7 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries(
|
||||
// set CID to symbol for selection
|
||||
if( xShape.is())
|
||||
{
|
||||
aEntry.aSymbol = uno::Reference< drawing::XShape >( xSymbolGroup, uno::UNO_QUERY );
|
||||
aEntry.aSymbol.set( xSymbolGroup, uno::UNO_QUERY );
|
||||
|
||||
bool bAverageLine = RegressionCurveHelper::isMeanValueLine( aCurves[i] );
|
||||
ObjectType eObjectType = bAverageLine ? OBJECTTYPE_DATA_AVERAGE_LINE : OBJECTTYPE_DATA_CURVE;
|
||||
|
||||
@@ -154,14 +154,14 @@ void VDiagram::createShapes_2d()
|
||||
|
||||
//create group shape
|
||||
uno::Reference< drawing::XShapes > xOuterGroup_Shapes = m_pShapeFactory->createGroup2D(m_xTarget);
|
||||
m_xOuterGroupShape = uno::Reference<drawing::XShape>( xOuterGroup_Shapes, uno::UNO_QUERY );
|
||||
m_xOuterGroupShape.set( xOuterGroup_Shapes, uno::UNO_QUERY );
|
||||
|
||||
uno::Reference< drawing::XShapes > xGroupForWall( m_pShapeFactory->createGroup2D(xOuterGroup_Shapes,"PlotAreaExcludingAxes") );
|
||||
|
||||
//create independent group shape as container for datapoints and such things
|
||||
{
|
||||
uno::Reference< drawing::XShapes > xShapes = m_pShapeFactory->createGroup2D(xOuterGroup_Shapes,"testonly;CooContainer=XXX_CID");
|
||||
m_xCoordinateRegionShape = uno::Reference<drawing::XShape>( xShapes, uno::UNO_QUERY );
|
||||
m_xCoordinateRegionShape.set( xShapes, uno::UNO_QUERY );
|
||||
}
|
||||
|
||||
bool bAddFloorAndWall = DiagramHelper::isSupportingFloorAndWall( m_xDiagram );
|
||||
@@ -473,8 +473,7 @@ void VDiagram::createShapes_3d()
|
||||
return;
|
||||
|
||||
//create shape
|
||||
m_xOuterGroupShape = uno::Reference< drawing::XShape >(
|
||||
m_pShapeFactory->createGroup3D( m_xTarget, "PlotAreaExcludingAxes" ), uno::UNO_QUERY);
|
||||
m_xOuterGroupShape.set( m_pShapeFactory->createGroup3D( m_xTarget, "PlotAreaExcludingAxes" ), uno::UNO_QUERY);
|
||||
|
||||
uno::Reference< drawing::XShapes > xOuterGroup_Shapes =
|
||||
uno::Reference<drawing::XShapes>( m_xOuterGroupShape, uno::UNO_QUERY );
|
||||
@@ -482,7 +481,7 @@ void VDiagram::createShapes_3d()
|
||||
//create additional group to manipulate the aspect ratio of the whole diagram:
|
||||
xOuterGroup_Shapes = m_pShapeFactory->createGroup3D( xOuterGroup_Shapes, OUString() );
|
||||
|
||||
m_xAspectRatio3D = uno::Reference< beans::XPropertySet >( xOuterGroup_Shapes, uno::UNO_QUERY );
|
||||
m_xAspectRatio3D.set( xOuterGroup_Shapes, uno::UNO_QUERY );
|
||||
|
||||
bool bAddFloorAndWall = DiagramHelper::isSupportingFloorAndWall( m_xDiagram );
|
||||
|
||||
@@ -492,7 +491,7 @@ void VDiagram::createShapes_3d()
|
||||
{
|
||||
uno::Reference< beans::XPropertySet > xWallProp( NULL );
|
||||
if( m_xDiagram.is() )
|
||||
xWallProp=uno::Reference< beans::XPropertySet >( m_xDiagram->getWall());
|
||||
xWallProp.set( m_xDiagram->getWall() );
|
||||
|
||||
OUString aWallCID( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM_WALL, OUString() ) );//@todo read CID from model
|
||||
if( !bAddFloorAndWall )
|
||||
@@ -615,7 +614,7 @@ void VDiagram::createShapes_3d()
|
||||
{
|
||||
uno::Reference< beans::XPropertySet > xFloorProp( NULL );
|
||||
if( m_xDiagram.is() )
|
||||
xFloorProp=uno::Reference< beans::XPropertySet >( m_xDiagram->getFloor());
|
||||
xFloorProp.set( m_xDiagram->getFloor() );
|
||||
|
||||
Stripe aStripe( drawing::Position3D(0,0,0)
|
||||
, drawing::Direction3D(0,0,FIXED_SIZE_FOR_3D_CHART_VOLUME)
|
||||
@@ -643,7 +642,7 @@ void VDiagram::createShapes_3d()
|
||||
//create an additional scene for the smaller inner coordinate region:
|
||||
{
|
||||
uno::Reference< drawing::XShapes > xShapes = m_pShapeFactory->createGroup3D( xOuterGroup_Shapes,"testonly;CooContainer=XXX_CID" );
|
||||
m_xCoordinateRegionShape = uno::Reference< drawing::XShape >( xShapes, uno::UNO_QUERY );
|
||||
m_xCoordinateRegionShape.set( xShapes, uno::UNO_QUERY );
|
||||
|
||||
uno::Reference< beans::XPropertySet > xShapeProp( m_xCoordinateRegionShape, uno::UNO_QUERY );
|
||||
OSL_ENSURE(xShapeProp.is(), "created shape offers no XPropertySet");
|
||||
|
||||
@@ -130,7 +130,7 @@ uno::Reference< drawing::XShapes > AbstractShapeFactory::getChartRootShape(
|
||||
{
|
||||
if( AbstractShapeFactory::getShapeName( xShape ) == "com.sun.star.chart2.shapes" )
|
||||
{
|
||||
xRet = uno::Reference< drawing::XShapes >( xShape, uno::UNO_QUERY );
|
||||
xRet.set( xShape, uno::UNO_QUERY );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1970,7 +1970,7 @@ awt::Rectangle ChartView::getRectangleOfObject( const OUString& rObjectCID, bool
|
||||
aShapeName = "PlotAreaIncludingAxes";
|
||||
SdrObject* pShape = DrawModelWrapper::getNamedSdrObject( aShapeName, pRootList );
|
||||
if( pShape )
|
||||
xShape = uno::Reference< drawing::XShape >( pShape->getUnoShape(), uno::UNO_QUERY);
|
||||
xShape.set( pShape->getUnoShape(), uno::UNO_QUERY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ uno::Reference< drawing::XShapes > ShapeFactory::getOrCreateChartRootShape(
|
||||
setShapeName(xShape, "com.sun.star.chart2.shapes");
|
||||
xShape->setSize(awt::Size(0,0));
|
||||
|
||||
xRet = uno::Reference<drawing::XShapes>(xShape, uno::UNO_QUERY);
|
||||
xRet.set(xShape, uno::UNO_QUERY);
|
||||
return xRet;
|
||||
}
|
||||
|
||||
|
||||
@@ -263,7 +263,7 @@ void SAL_CALL SampleAddIn::refresh() throw( uno::RuntimeException )
|
||||
// create line first time
|
||||
if( ! mxMyRedLine.is())
|
||||
{
|
||||
mxMyRedLine = uno::Reference< drawing::XShape >(
|
||||
mxMyRedLine.set(
|
||||
xFactory->createInstance( "com.sun.star.drawing.LineShape" ),
|
||||
uno::UNO_QUERY );
|
||||
xPage->add( mxMyRedLine );
|
||||
@@ -287,7 +287,7 @@ void SAL_CALL SampleAddIn::refresh() throw( uno::RuntimeException )
|
||||
// create text object first time
|
||||
if( ! mxMyText.is())
|
||||
{
|
||||
mxMyText = uno::Reference< drawing::XShape >(
|
||||
mxMyText.set(
|
||||
xFactory->createInstance( "com.sun.star.drawing.TextShape" ),
|
||||
uno::UNO_QUERY );
|
||||
xPage->add( mxMyText );
|
||||
|
||||
Reference in New Issue
Block a user