summaryrefslogtreecommitdiff
path: root/sdext
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-11-04 16:00:12 +0200
committerNoel Grandin <noel@peralex.com>2015-11-05 07:41:29 +0200
commit06302bb3d1969c4b8a204b6fdc9b15d052861134 (patch)
treed02f5bb63b3497b42fe25465706f4a8113c84d1b /sdext
parent1d67ca08da4b206a52e34723551ac331808f7b29 (diff)
use uno::Reference::set method instead of assignment
Change-Id: I03a8cc8405e1e7ddf75fabd2ba7d85edddf5b30c
Diffstat (limited to 'sdext')
-rw-r--r--sdext/source/minimizer/configurationaccess.cxx4
-rw-r--r--sdext/source/minimizer/impoptimizer.cxx4
-rw-r--r--sdext/source/minimizer/unodialog.cxx20
-rw-r--r--sdext/source/pdfimport/filterdet.cxx5
-rw-r--r--sdext/source/pdfimport/pdfiadaptor.cxx6
-rw-r--r--sdext/source/presenter/PresenterAccessibility.cxx9
-rw-r--r--sdext/source/presenter/PresenterBitmapContainer.cxx2
-rw-r--r--sdext/source/presenter/PresenterButton.cxx4
-rw-r--r--sdext/source/presenter/PresenterController.cxx12
-rw-r--r--sdext/source/presenter/PresenterHelpView.cxx2
-rw-r--r--sdext/source/presenter/PresenterPane.cxx2
-rw-r--r--sdext/source/presenter/PresenterPaneBorderManager.cxx4
-rw-r--r--sdext/source/presenter/PresenterPaneBorderPainter.cxx2
-rw-r--r--sdext/source/presenter/PresenterPaneContainer.cxx2
-rw-r--r--sdext/source/presenter/PresenterPaneFactory.cxx8
-rw-r--r--sdext/source/presenter/PresenterScreen.cxx2
-rw-r--r--sdext/source/presenter/PresenterScrollBar.cxx2
-rw-r--r--sdext/source/presenter/PresenterSlidePreview.cxx2
-rw-r--r--sdext/source/presenter/PresenterSlideShowView.cxx6
-rw-r--r--sdext/source/presenter/PresenterSlideSorter.cxx9
-rw-r--r--sdext/source/presenter/PresenterSpritePane.cxx2
-rw-r--r--sdext/source/presenter/PresenterTextView.cxx2
-rw-r--r--sdext/source/presenter/PresenterTheme.cxx2
-rw-r--r--sdext/source/presenter/PresenterTimer.cxx4
-rw-r--r--sdext/source/presenter/PresenterToolBar.cxx8
-rw-r--r--sdext/source/presenter/PresenterUIPainter.cxx12
-rw-r--r--sdext/source/presenter/PresenterViewFactory.cxx8
-rw-r--r--sdext/source/presenter/PresenterWindowManager.cxx5
28 files changed, 70 insertions, 80 deletions
diff --git a/sdext/source/minimizer/configurationaccess.cxx b/sdext/source/minimizer/configurationaccess.cxx
index 942fc2b1c7b6..6193056f93eb 100644
--- a/sdext/source/minimizer/configurationaccess.cxx
+++ b/sdext/source/minimizer/configurationaccess.cxx
@@ -216,7 +216,7 @@ void ConfigurationAccess::LoadConfiguration()
OptimizerSettings& rCurrent( maSettings.front() );
rCurrent.LoadSettingsFromConfiguration( xSet );
}
- xSet = Reference< container::XNameAccess >( GetConfigurationNode( xRoot, "Settings/Templates" ), UNO_QUERY );
+ xSet.set( GetConfigurationNode( xRoot, "Settings/Templates" ), UNO_QUERY );
if ( xSet.is() )
{
const Sequence< OUString > aElements( xSet->getElementNames() );
@@ -261,7 +261,7 @@ void ConfigurationAccess::SaveConfiguration()
rCurrent.SaveSettingsToConfiguration( xSet );
// updating template elements
- xSet = Reference< container::XNameReplace >( GetConfigurationNode( xRoot, "Settings/Templates" ), UNO_QUERY_THROW );
+ xSet.set( GetConfigurationNode( xRoot, "Settings/Templates" ), UNO_QUERY_THROW );
Reference< container::XNameContainer > xNameContainer( xSet, UNO_QUERY_THROW );
const Sequence< OUString > aElements( xSet->getElementNames() );
diff --git a/sdext/source/minimizer/impoptimizer.cxx b/sdext/source/minimizer/impoptimizer.cxx
index db7a788ab037..44af41ce2889 100644
--- a/sdext/source/minimizer/impoptimizer.cxx
+++ b/sdext/source/minimizer/impoptimizer.cxx
@@ -402,7 +402,7 @@ void CompressGraphics( ImpOptimizer& rOptimizer, const Reference< XComponentCont
{
Reference< XBitmap > xFillBitmap;
if ( aGraphicIter->maUser[ 0 ].mxPropertySet->getPropertyValue( "FillBitmap" ) >>= xFillBitmap )
- xGraphic = Reference< XGraphic >( xFillBitmap, UNO_QUERY_THROW );
+ xGraphic.set( xFillBitmap, UNO_QUERY_THROW );
}
else if ( aGraphicIter->maUser[ 0 ].mxShape.is() )
{
@@ -686,7 +686,7 @@ bool ImpOptimizer::Optimize( const Sequence< PropertyValue >& rArguments )
Sequence< PropertyValue > aLoadProps( 1 );
aLoadProps[ 0 ].Name = "Hidden";
aLoadProps[ 0 ].Value <<= true;
- mxModel = Reference< XModel >( xComponentLoader->loadComponentFromURL(
+ mxModel.set( xComponentLoader->loadComponentFromURL(
maSaveAsURL, "_self", 0, aLoadProps ), UNO_QUERY );
}
}
diff --git a/sdext/source/minimizer/unodialog.cxx b/sdext/source/minimizer/unodialog.cxx
index b2bd9792b007..3ea8b3dd07be 100644
--- a/sdext/source/minimizer/unodialog.cxx
+++ b/sdext/source/minimizer/unodialog.cxx
@@ -62,7 +62,7 @@ UnoDialog::UnoDialog( const Reference< XComponentContext > &rxContext, Reference
Reference< XFrame > xFrame( mxController->getFrame() );
Reference< XWindow > xContainerWindow( xFrame->getContainerWindow() );
- mxWindowPeer = Reference< XWindowPeer >( xContainerWindow, UNO_QUERY_THROW );
+ mxWindowPeer.set( xContainerWindow, UNO_QUERY_THROW );
createWindowPeer( mxWindowPeer );
}
@@ -97,7 +97,7 @@ Reference< XWindowPeer > UnoDialog::createWindowPeer( Reference< XWindowPeer > x
Reference< XToolkit > xToolkit( Toolkit::create( mxContext ), UNO_QUERY_THROW );
if ( !xParentPeer.is() )
xParentPeer = xToolkit->getDesktopWindow();
- mxReschedule = Reference< XReschedule >( xToolkit, UNO_QUERY );
+ mxReschedule.set( xToolkit, UNO_QUERY );
mxDialog->createPeer( xToolkit, xParentPeer );
// xWindowPeer = xControl.getPeer();
return mxDialog->getPeer();
@@ -149,7 +149,7 @@ Reference< XButton > UnoDialog::insertButton( const OUString& rName, Reference<
rName, rPropertyNames, rPropertyValues ) );
Reference< XPropertySet > xPropertySet( xButtonModel, UNO_QUERY_THROW );
xPropertySet->setPropertyValue("Name", Any( rName ) );
- xButton = Reference< XButton >( mxDialog->getControl( rName ), UNO_QUERY_THROW );
+ xButton.set( mxDialog->getControl( rName ), UNO_QUERY_THROW );
if ( xActionListener.is() )
{
@@ -174,7 +174,7 @@ Reference< XFixedText > UnoDialog::insertFixedText( const OUString& rName, const
Reference< XPropertySet > xPropertySet( insertControlModel( OUString( "com.sun.star.awt.UnoControlFixedTextModel" ),
rName, rPropertyNames, rPropertyValues ), UNO_QUERY_THROW );
xPropertySet->setPropertyValue("Name", Any( rName ) );
- xFixedText = Reference< XFixedText >( mxDialog->getControl( rName ), UNO_QUERY_THROW );
+ xFixedText.set( mxDialog->getControl( rName ), UNO_QUERY_THROW );
}
catch ( Exception& )
{
@@ -192,7 +192,7 @@ Reference< XCheckBox > UnoDialog::insertCheckBox( const OUString& rName, const S
Reference< XPropertySet > xPropertySet( insertControlModel( OUString( "com.sun.star.awt.UnoControlCheckBoxModel" ),
rName, rPropertyNames, rPropertyValues ), UNO_QUERY_THROW );
xPropertySet->setPropertyValue("Name", Any( rName ) );
- xCheckBox = Reference< XCheckBox >( mxDialog->getControl( rName ), UNO_QUERY_THROW );
+ xCheckBox.set( mxDialog->getControl( rName ), UNO_QUERY_THROW );
}
catch ( Exception& )
{
@@ -210,7 +210,7 @@ Reference< XControl > UnoDialog::insertFormattedField( const OUString& rName, co
Reference< XPropertySet > xPropertySet( insertControlModel( OUString( "com.sun.star.awt.UnoControlFormattedFieldModel" ),
rName, rPropertyNames, rPropertyValues ), UNO_QUERY_THROW );
xPropertySet->setPropertyValue("Name", Any( rName ) );
- xControl = Reference< XControl >( mxDialog->getControl( rName ), UNO_QUERY_THROW );
+ xControl.set( mxDialog->getControl( rName ), UNO_QUERY_THROW );
}
catch ( Exception& )
{
@@ -228,7 +228,7 @@ Reference< XComboBox > UnoDialog::insertComboBox( const OUString& rName, const S
Reference< XPropertySet > xPropertySet( insertControlModel( OUString( "com.sun.star.awt.UnoControlComboBoxModel" ),
rName, rPropertyNames, rPropertyValues ), UNO_QUERY_THROW );
xPropertySet->setPropertyValue("Name", Any( rName ) );
- xControl = Reference< XComboBox >( mxDialog->getControl( rName ), UNO_QUERY_THROW );
+ xControl.set( mxDialog->getControl( rName ), UNO_QUERY_THROW );
}
catch ( Exception& )
{
@@ -246,7 +246,7 @@ Reference< XRadioButton > UnoDialog::insertRadioButton( const OUString& rName, c
Reference< XPropertySet > xPropertySet( insertControlModel( OUString( "com.sun.star.awt.UnoControlRadioButtonModel" ),
rName, rPropertyNames, rPropertyValues ), UNO_QUERY_THROW );
xPropertySet->setPropertyValue("Name", Any( rName ) );
- xControl = Reference< XRadioButton >( mxDialog->getControl( rName ), UNO_QUERY_THROW );
+ xControl.set( mxDialog->getControl( rName ), UNO_QUERY_THROW );
}
catch ( Exception& )
{
@@ -264,7 +264,7 @@ Reference< XListBox > UnoDialog::insertListBox( const OUString& rName, const Seq
Reference< XPropertySet > xPropertySet( insertControlModel( OUString( "com.sun.star.awt.UnoControlListBoxModel" ),
rName, rPropertyNames, rPropertyValues ), UNO_QUERY_THROW );
xPropertySet->setPropertyValue("Name", Any( rName ) );
- xControl = Reference< XListBox >( mxDialog->getControl( rName ), UNO_QUERY_THROW );
+ xControl.set( mxDialog->getControl( rName ), UNO_QUERY_THROW );
}
catch ( Exception& )
{
@@ -282,7 +282,7 @@ Reference< XControl > UnoDialog::insertImage( const OUString& rName, const Seque
Reference< XPropertySet > xPropertySet( insertControlModel( OUString( "com.sun.star.awt.UnoControlImageControlModel" ),
rName, rPropertyNames, rPropertyValues ), UNO_QUERY_THROW );
xPropertySet->setPropertyValue("Name", Any( rName ) );
- xControl = Reference< XControl >( mxDialog->getControl( rName ), UNO_QUERY_THROW );
+ xControl.set( mxDialog->getControl( rName ), UNO_QUERY_THROW );
}
catch ( Exception& )
{
diff --git a/sdext/source/pdfimport/filterdet.cxx b/sdext/source/pdfimport/filterdet.cxx
index c57d9300aabd..683b4a0260de 100644
--- a/sdext/source/pdfimport/filterdet.cxx
+++ b/sdext/source/pdfimport/filterdet.cxx
@@ -77,10 +77,9 @@ FileEmitContext::FileEmitContext( const OUString& rOr
m_xSeek(),
m_xOut()
{
- m_xContextStream = uno::Reference< io::XStream >(
- io::TempFile::create(xContext), uno::UNO_QUERY_THROW );
+ m_xContextStream.set( io::TempFile::create(xContext), uno::UNO_QUERY_THROW );
m_xOut = m_xContextStream->getOutputStream();
- m_xSeek = uno::Reference<io::XSeekable>(m_xOut, uno::UNO_QUERY_THROW );
+ m_xSeek.set(m_xOut, uno::UNO_QUERY_THROW );
oslFileError aErr = osl_File_E_None;
if( (aErr=osl_openFile( rOrigFile.pData,
diff --git a/sdext/source/pdfimport/pdfiadaptor.cxx b/sdext/source/pdfimport/pdfiadaptor.cxx
index bbcfad5e1fd2..2b845e159141 100644
--- a/sdext/source/pdfimport/pdfiadaptor.cxx
+++ b/sdext/source/pdfimport/pdfiadaptor.cxx
@@ -146,7 +146,7 @@ sal_Bool SAL_CALL PDFIHybridAdaptor::filter( const uno::Sequence< beans::Propert
SAL_INFO("sdext.pdfimport", "try to instantiate subfilter" );
uno::Reference< document::XFilter > xSubFilter;
try {
- xSubFilter = uno::Reference<document::XFilter>(
+ xSubFilter.set(
m_xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
"com.sun.star.document.OwnSubFilter",
aArgs,
@@ -195,7 +195,7 @@ void SAL_CALL PDFIHybridAdaptor::cancel() throw(std::exception)
void SAL_CALL PDFIHybridAdaptor::setTargetDocument( const uno::Reference< lang::XComponent >& xDocument ) throw( lang::IllegalArgumentException, std::exception )
{
SAL_INFO("sdext.pdfimport", "PDFIAdaptor::setTargetDocument" );
- m_xModel = uno::Reference< frame::XModel >( xDocument, uno::UNO_QUERY );
+ m_xModel.set( xDocument, uno::UNO_QUERY );
if( xDocument.is() && ! m_xModel.is() )
throw lang::IllegalArgumentException();
}
@@ -328,7 +328,7 @@ sal_Bool SAL_CALL PDFIRawAdaptor::importer( const uno::Sequence< beans::Property
void SAL_CALL PDFIRawAdaptor::setTargetDocument( const uno::Reference< lang::XComponent >& xDocument ) throw( lang::IllegalArgumentException, std::exception )
{
SAL_INFO("sdext.pdfimport", "PDFIAdaptor::setTargetDocument" );
- m_xModel = uno::Reference< frame::XModel >( xDocument, uno::UNO_QUERY );
+ m_xModel.set( xDocument, uno::UNO_QUERY );
if( xDocument.is() && ! m_xModel.is() )
throw lang::IllegalArgumentException();
}
diff --git a/sdext/source/presenter/PresenterAccessibility.cxx b/sdext/source/presenter/PresenterAccessibility.cxx
index f62389dc8c77..d57cef18bcb7 100644
--- a/sdext/source/presenter/PresenterAccessibility.cxx
+++ b/sdext/source/presenter/PresenterAccessibility.cxx
@@ -736,7 +736,7 @@ Reference<XAccessibleContext> SAL_CALL PresenterAccessible::getAccessibleContext
Reference<XPane> xMainPane (mxMainPane, UNO_QUERY);
if (xMainPane.is())
{
- mxMainWindow = Reference<awt::XWindow>(xMainPane->getWindow(), UNO_QUERY);
+ mxMainWindow.set(xMainPane->getWindow(), UNO_QUERY);
mxMainWindow->addFocusListener(this);
}
mpAccessibleConsole = AccessibleConsole::Create(
@@ -785,7 +785,7 @@ void SAL_CALL PresenterAccessible::initialize (const css::uno::Sequence<css::uno
{
if (rArguments.getLength() >= 1)
{
- mxAccessibleParent = Reference<XAccessible>(rArguments[0], UNO_QUERY);
+ mxAccessibleParent.set(rArguments[0], UNO_QUERY);
if (mpAccessibleConsole.is())
mpAccessibleConsole->SetAccessibleParent(mxAccessibleParent);
}
@@ -834,7 +834,7 @@ void PresenterAccessible::AccessibleObject::SetWindow (
}
mxContentWindow = xContentWindow;
- mxBorderWindow = Reference<awt::XWindow2>(rxBorderWindow, UNO_QUERY);
+ mxBorderWindow.set(rxBorderWindow, UNO_QUERY);
if (mxContentWindow.is())
{
@@ -1335,8 +1335,7 @@ awt::Point PresenterAccessible::AccessibleObject::GetAbsoluteParentLocation()
{
Reference<XAccessibleComponent> xParentComponent;
if (mxParentAccessible.is())
- xParentComponent = Reference<XAccessibleComponent>(
- mxParentAccessible->getAccessibleContext(), UNO_QUERY);
+ xParentComponent.set( mxParentAccessible->getAccessibleContext(), UNO_QUERY);
if (xParentComponent.is())
return xParentComponent->getLocationOnScreen();
else
diff --git a/sdext/source/presenter/PresenterBitmapContainer.cxx b/sdext/source/presenter/PresenterBitmapContainer.cxx
index eb921325be6d..b89c32a4a9ef 100644
--- a/sdext/source/presenter/PresenterBitmapContainer.cxx
+++ b/sdext/source/presenter/PresenterBitmapContainer.cxx
@@ -88,7 +88,7 @@ void PresenterBitmapContainer::Initialize (
rxComponentContext->getServiceManager(), UNO_QUERY);
if ( ! xFactory.is())
return;
- mxPresenterHelper = Reference<drawing::XPresenterHelper>(
+ mxPresenterHelper.set(
xFactory->createInstanceWithContext(
"com.sun.star.drawing.PresenterHelper",
rxComponentContext),
diff --git a/sdext/source/presenter/PresenterButton.cxx b/sdext/source/presenter/PresenterButton.cxx
index e96b6c065c2f..e2fbc0cfba04 100644
--- a/sdext/source/presenter/PresenterButton.cxx
+++ b/sdext/source/presenter/PresenterButton.cxx
@@ -113,7 +113,7 @@ PresenterButton::PresenterButton (
if ( ! xFactory.is())
throw RuntimeException();
- mxPresenterHelper = Reference<drawing::XPresenterHelper>(
+ mxPresenterHelper.set(
xFactory->createInstanceWithContext(
"com.sun.star.comp.Draw.PresenterHelper",
rxComponentContext),
@@ -469,7 +469,7 @@ void PresenterButton::SetupButtonBitmaps()
pRightBitmap);
mxMouseOverBitmap = mxCanvas->getDevice()->createCompatibleAlphaBitmap(maButtonSize);
- xCanvas = Reference<rendering::XCanvas>(mxMouseOverBitmap, UNO_QUERY);
+ xCanvas.set(mxMouseOverBitmap, UNO_QUERY);
if (mpMouseOverFont.get()!=NULL && !mpMouseOverFont->mxFont.is() && mxCanvas.is())
mpMouseOverFont->PrepareFont(mxCanvas);
if (xCanvas.is())
diff --git a/sdext/source/presenter/PresenterController.cxx b/sdext/source/presenter/PresenterController.cxx
index 253ea098c4b2..2f12511d0632 100644
--- a/sdext/source/presenter/PresenterController.cxx
+++ b/sdext/source/presenter/PresenterController.cxx
@@ -160,7 +160,7 @@ PresenterController::PresenterController (
rxContext->getServiceManager(), UNO_QUERY);
if ( ! xFactory.is())
return;
- mxPresenterHelper = Reference<drawing::XPresenterHelper>(
+ mxPresenterHelper.set(
xFactory->createInstanceWithContext(
"com.sun.star.drawing.PresenterHelper",
rxContext),
@@ -186,7 +186,7 @@ PresenterController::PresenterController (
// Create a URLTransformer.
if (xFactory.is())
{
- mxUrlTransformer = Reference<util::XURLTransformer>(util::URLTransformer::create(mxComponentContext));
+ mxUrlTransformer.set(util::URLTransformer::create(mxComponentContext));
}
}
@@ -294,8 +294,7 @@ void PresenterController::GetSlides (const sal_Int32 nOffset)
if (nSlideIndex < xIndexAccess->getCount())
{
mnCurrentSlideIndex = nSlideIndex;
- mxCurrentSlide = Reference<drawing::XDrawPage>(
- xIndexAccess->getByIndex(nSlideIndex), UNO_QUERY);
+ mxCurrentSlide.set( xIndexAccess->getByIndex(nSlideIndex), UNO_QUERY);
}
}
}
@@ -313,8 +312,7 @@ void PresenterController::GetSlides (const sal_Int32 nOffset)
if (xIndexAccess.is())
{
if (nNextSlideIndex < xIndexAccess->getCount())
- mxNextSlide = Reference<drawing::XDrawPage>(
- xIndexAccess->getByIndex(nNextSlideIndex), UNO_QUERY);
+ mxNextSlide.set( xIndexAccess->getByIndex(nNextSlideIndex), UNO_QUERY);
}
}
}
@@ -1140,7 +1138,7 @@ void PresenterController::InitializeMainPane (const Reference<XPane>& rxPane)
mpPaintManager.reset(new PresenterPaintManager(mxMainWindow, mxPresenterHelper, mpPaneContainer));
- mxCanvas = Reference<rendering::XSpriteCanvas>(rxPane->getCanvas(), UNO_QUERY);
+ mxCanvas.set(rxPane->getCanvas(), UNO_QUERY);
if (mxSlideShowController.is())
mxSlideShowController->activate();
diff --git a/sdext/source/presenter/PresenterHelpView.cxx b/sdext/source/presenter/PresenterHelpView.cxx
index 240f46fc9745..6ab3a74aec75 100644
--- a/sdext/source/presenter/PresenterHelpView.cxx
+++ b/sdext/source/presenter/PresenterHelpView.cxx
@@ -141,7 +141,7 @@ PresenterHelpView::PresenterHelpView (
Reference<XControllerManager> xCM (rxController, UNO_QUERY_THROW);
Reference<XConfigurationController> xCC (
xCM->getConfigurationController(), UNO_QUERY_THROW);
- mxPane = Reference<XPane>(xCC->getResource(rxViewId->getAnchor()), UNO_QUERY_THROW);
+ mxPane.set(xCC->getResource(rxViewId->getAnchor()), UNO_QUERY_THROW);
mxWindow = mxPane->getWindow();
ProvideCanvas();
diff --git a/sdext/source/presenter/PresenterPane.cxx b/sdext/source/presenter/PresenterPane.cxx
index 85b1a2ec9eaa..79f53a97e1df 100644
--- a/sdext/source/presenter/PresenterPane.cxx
+++ b/sdext/source/presenter/PresenterPane.cxx
@@ -42,7 +42,7 @@ PresenterPane::PresenterPane (
{
Reference<lang::XMultiComponentFactory> xFactory (
mxComponentContext->getServiceManager(), UNO_QUERY_THROW);
- mxPresenterHelper = Reference<drawing::XPresenterHelper>(
+ mxPresenterHelper.set(
xFactory->createInstanceWithContext(
"com.sun.star.comp.Draw.PresenterHelper",
mxComponentContext),
diff --git a/sdext/source/presenter/PresenterPaneBorderManager.cxx b/sdext/source/presenter/PresenterPaneBorderManager.cxx
index e29be336aa26..414971758c29 100644
--- a/sdext/source/presenter/PresenterPaneBorderManager.cxx
+++ b/sdext/source/presenter/PresenterPaneBorderManager.cxx
@@ -82,7 +82,7 @@ PresenterPaneBorderManager::PresenterPaneBorderManager (
{
mxPointer = awt::Pointer::create(rxContext);
- mxPresenterHelper = Reference<drawing::XPresenterHelper>(
+ mxPresenterHelper.set(
xFactory->createInstanceWithContext(
"com.sun.star.comp.Draw.PresenterHelper",
rxContext),
@@ -216,7 +216,7 @@ void SAL_CALL PresenterPaneBorderManager::initialize (const Sequence<Any>& rArgu
{
try
{
- mxParentWindow = Reference<awt::XWindow>(rArguments[0], UNO_QUERY_THROW);
+ mxParentWindow.set(rArguments[0], UNO_QUERY_THROW);
// Get the outer and inner windows from the argument list and
// build a window list of it.
diff --git a/sdext/source/presenter/PresenterPaneBorderPainter.cxx b/sdext/source/presenter/PresenterPaneBorderPainter.cxx
index 866dcfbe631c..0fe6cf85db31 100644
--- a/sdext/source/presenter/PresenterPaneBorderPainter.cxx
+++ b/sdext/source/presenter/PresenterPaneBorderPainter.cxx
@@ -407,7 +407,7 @@ PresenterPaneBorderPainter::Renderer::Renderer (
Reference<lang::XMultiComponentFactory> xFactory (rxContext->getServiceManager());
if (xFactory.is())
{
- mxPresenterHelper = Reference<drawing::XPresenterHelper>(
+ mxPresenterHelper.set(
xFactory->createInstanceWithContext(
"com.sun.star.comp.Draw.PresenterHelper",
rxContext),
diff --git a/sdext/source/presenter/PresenterPaneContainer.cxx b/sdext/source/presenter/PresenterPaneContainer.cxx
index 2f5de98f753d..8fea3377ec8f 100644
--- a/sdext/source/presenter/PresenterPaneContainer.cxx
+++ b/sdext/source/presenter/PresenterPaneContainer.cxx
@@ -39,7 +39,7 @@ PresenterPaneContainer::PresenterPaneContainer (
Reference<lang::XMultiComponentFactory> xFactory (rxContext->getServiceManager());
if (xFactory.is())
{
- mxPresenterHelper = Reference<drawing::XPresenterHelper>(
+ mxPresenterHelper.set(
xFactory->createInstanceWithContext(
"com.sun.star.comp.Draw.PresenterHelper",
rxContext),
diff --git a/sdext/source/presenter/PresenterPaneFactory.cxx b/sdext/source/presenter/PresenterPaneFactory.cxx
index c0d928b66739..a74ac61cb9ff 100644
--- a/sdext/source/presenter/PresenterPaneFactory.cxx
+++ b/sdext/source/presenter/PresenterPaneFactory.cxx
@@ -87,7 +87,7 @@ void PresenterPaneFactory::Register (const Reference<frame::XController>& rxCont
{
// Get the configuration controller.
Reference<XControllerManager> xCM (rxController, UNO_QUERY_THROW);
- xCC = Reference<XConfigurationController>(xCM->getConfigurationController());
+ xCC.set(xCM->getConfigurationController());
mxConfigurationControllerWeak = xCC;
if ( ! xCC.is())
{
@@ -270,13 +270,11 @@ Reference<XResource> PresenterPaneFactory::CreatePane (
::rtl::Reference<PresenterPaneBase> xPane;
if (bIsSpritePane)
{
- xPane = ::rtl::Reference<PresenterPaneBase>(
- new PresenterSpritePane(xContext, mpPresenterController));
+ xPane.set( new PresenterSpritePane(xContext, mpPresenterController));
}
else
{
- xPane = ::rtl::Reference<PresenterPaneBase>(
- new PresenterPane(xContext, mpPresenterController));
+ xPane.set( new PresenterPane(xContext, mpPresenterController));
}
// Supply arguments.
diff --git a/sdext/source/presenter/PresenterScreen.cxx b/sdext/source/presenter/PresenterScreen.cxx
index d6dee3b92eac..bbf7ad0e1782 100644
--- a/sdext/source/presenter/PresenterScreen.cxx
+++ b/sdext/source/presenter/PresenterScreen.cxx
@@ -610,7 +610,7 @@ void PresenterScreen::ShutdownPresenterScreen()
if (mpPresenterController.get() != NULL)
{
mpPresenterController->dispose();
- mpPresenterController = rtl::Reference<PresenterController>();
+ mpPresenterController.clear();
}
mpPaneContainer = new PresenterPaneContainer(Reference<XComponentContext>(mxContextWeak));
}
diff --git a/sdext/source/presenter/PresenterScrollBar.cxx b/sdext/source/presenter/PresenterScrollBar.cxx
index 49177324829c..20d33d7fc1fc 100644
--- a/sdext/source/presenter/PresenterScrollBar.cxx
+++ b/sdext/source/presenter/PresenterScrollBar.cxx
@@ -107,7 +107,7 @@ PresenterScrollBar::PresenterScrollBar (
if ( ! xFactory.is())
throw RuntimeException();
- mxPresenterHelper = Reference<drawing::XPresenterHelper>(
+ mxPresenterHelper.set(
xFactory->createInstanceWithContext(
"com.sun.star.comp.Draw.PresenterHelper",
rxComponentContext),
diff --git a/sdext/source/presenter/PresenterSlidePreview.cxx b/sdext/source/presenter/PresenterSlidePreview.cxx
index 4a610d3075aa..b31f27d07b34 100644
--- a/sdext/source/presenter/PresenterSlidePreview.cxx
+++ b/sdext/source/presenter/PresenterSlidePreview.cxx
@@ -92,7 +92,7 @@ PresenterSlidePreview::PresenterSlidePreview (
Reference<lang::XMultiComponentFactory> xFactory (rxContext->getServiceManager(), UNO_QUERY);
if (xFactory.is())
- mxPreviewRenderer = Reference<drawing::XSlideRenderer>(
+ mxPreviewRenderer.set(
xFactory->createInstanceWithContext(
"com.sun.star.drawing.SlideRenderer",
rxContext),
diff --git a/sdext/source/presenter/PresenterSlideShowView.cxx b/sdext/source/presenter/PresenterSlideShowView.cxx
index aaab9bcba700..8572bbe4b190 100644
--- a/sdext/source/presenter/PresenterSlideShowView.cxx
+++ b/sdext/source/presenter/PresenterSlideShowView.cxx
@@ -93,8 +93,7 @@ PresenterSlideShowView::PresenterSlideShowView (
void PresenterSlideShowView::LateInit()
{
- mxSlideShow = Reference<presentation::XSlideShow> (
- mxSlideShowController->getSlideShow(), UNO_QUERY_THROW);
+ mxSlideShow.set( mxSlideShowController->getSlideShow(), UNO_QUERY_THROW);
Reference<lang::XComponent> xSlideShowComponent (mxSlideShow, UNO_QUERY);
if (xSlideShowComponent.is())
xSlideShowComponent->addEventListener(static_cast<awt::XWindowListener*>(this));
@@ -847,8 +846,7 @@ Reference<awt::XWindow> PresenterSlideShowView::CreateViewWindow (
awt::WindowAttribute::SIZEABLE
| awt::WindowAttribute::MOVEABLE
| awt::WindowAttribute::NODECORATION);
- xViewWindow = Reference<awt::XWindow>(
- xToolkit->createWindow(aWindowDescriptor),UNO_QUERY_THROW);
+ xViewWindow.set( xToolkit->createWindow(aWindowDescriptor),UNO_QUERY_THROW);
// Make the background transparent. The slide show paints its own background.
Reference<awt::XWindowPeer> xPeer (xViewWindow, UNO_QUERY_THROW);
diff --git a/sdext/source/presenter/PresenterSlideSorter.cxx b/sdext/source/presenter/PresenterSlideSorter.cxx
index 59032ad2b178..b419922f7f95 100644
--- a/sdext/source/presenter/PresenterSlideSorter.cxx
+++ b/sdext/source/presenter/PresenterSlideSorter.cxx
@@ -287,7 +287,7 @@ PresenterSlideSorter::PresenterSlideSorter (
Reference<lang::XMultiComponentFactory> xFactory (
mxComponentContext->getServiceManager(), UNO_QUERY_THROW);
- mxPane = Reference<XPane>(xCC->getResource(rxViewId->getAnchor()), UNO_QUERY_THROW);
+ mxPane.set(xCC->getResource(rxViewId->getAnchor()), UNO_QUERY_THROW);
mxWindow = mxPane->getWindow();
// Add window listener.
@@ -301,7 +301,7 @@ PresenterSlideSorter::PresenterSlideSorter (
mnCurrentSlideIndex = mxSlideShowController->getCurrentSlideIndex();
// Create the scroll bar.
- mpVerticalScrollBar = ::rtl::Reference<PresenterScrollBar>(
+ mpVerticalScrollBar.set(
new PresenterVerticalScrollBar(
rxContext,
mxWindow,
@@ -328,7 +328,7 @@ PresenterSlideSorter::PresenterSlideSorter (
mpLayout.reset(new Layout(mpVerticalScrollBar));
// Create the preview cache.
- mxPreviewCache = Reference<drawing::XSlidePreviewCache>(
+ mxPreviewCache.set(
xFactory->createInstanceWithContext(
"com.sun.star.drawing.PresenterPreviewCache",
mxComponentContext),
@@ -910,8 +910,7 @@ void PresenterSlideSorter::PaintPreview (
mxComponentContext,
rxCanvas);
Reference<container::XIndexAccess> xIndexAccess(mxSlideShowController, UNO_QUERY);
- Reference<drawing::XDrawPage> xPage = Reference<drawing::XDrawPage>(
- xIndexAccess->getByIndex(nSlideIndex), UNO_QUERY);
+ Reference<drawing::XDrawPage> xPage( xIndexAccess->getByIndex(nSlideIndex), UNO_QUERY);
bool bTransition = PresenterController::HasTransition(xPage);
bool bCustomAnimation = PresenterController::HasCustomAnimation(xPage);
diff --git a/sdext/source/presenter/PresenterSpritePane.cxx b/sdext/source/presenter/PresenterSpritePane.cxx
index ec6104421f2a..22e78cd5633a 100644
--- a/sdext/source/presenter/PresenterSpritePane.cxx
+++ b/sdext/source/presenter/PresenterSpritePane.cxx
@@ -40,7 +40,7 @@ PresenterSpritePane::PresenterSpritePane (const Reference<XComponentContext>& rx
{
Reference<lang::XMultiComponentFactory> xFactory (
mxComponentContext->getServiceManager(), UNO_QUERY_THROW);
- mxPresenterHelper = Reference<drawing::XPresenterHelper>(
+ mxPresenterHelper.set(
xFactory->createInstanceWithContext(
"com.sun.star.comp.Draw.PresenterHelper",
mxComponentContext),
diff --git a/sdext/source/presenter/PresenterTextView.cxx b/sdext/source/presenter/PresenterTextView.cxx
index 8c426aa86ce5..d6a9ef070ad9 100644
--- a/sdext/source/presenter/PresenterTextView.cxx
+++ b/sdext/source/presenter/PresenterTextView.cxx
@@ -93,7 +93,7 @@ PresenterTextView::PresenterTextView (
// Create the script type detector that is used to split paragraphs into
// portions of the same text direction.
- mxScriptTypeDetector = Reference<i18n::XScriptTypeDetector>(
+ mxScriptTypeDetector.set(
xFactory->createInstanceWithContext(
"com.sun.star.i18n.ScriptTypeDetector",
rxContext),
diff --git a/sdext/source/presenter/PresenterTheme.cxx b/sdext/source/presenter/PresenterTheme.cxx
index a7a68d7ce116..3504c6a5f995 100644
--- a/sdext/source/presenter/PresenterTheme.cxx
+++ b/sdext/source/presenter/PresenterTheme.cxx
@@ -705,7 +705,7 @@ ReadContext::ReadContext (
Reference<lang::XMultiComponentFactory> xFactory (rxContext->getServiceManager());
if (xFactory.is())
{
- mxPresenterHelper = Reference<drawing::XPresenterHelper>(
+ mxPresenterHelper.set(
xFactory->createInstanceWithContext(
"com.sun.star.comp.Draw.PresenterHelper",
rxContext),
diff --git a/sdext/source/presenter/PresenterTimer.cxx b/sdext/source/presenter/PresenterTimer.cxx
index 7fded7c12cf7..27339f70eb90 100644
--- a/sdext/source/presenter/PresenterTimer.cxx
+++ b/sdext/source/presenter/PresenterTimer.cxx
@@ -368,7 +368,7 @@ TimerTask::TimerTask (
}
if ( ! pTimer.is())
{
- pTimer = ::rtl::Reference<PresenterClockTimer>(new PresenterClockTimer(rxContext));
+ pTimer.set(new PresenterClockTimer(rxContext));
mpInstance = pTimer;
}
return pTimer;
@@ -385,7 +385,7 @@ PresenterClockTimer::PresenterClockTimer (const Reference<XComponentContext>& rx
Reference<lang::XMultiComponentFactory> xFactory (
rxContext->getServiceManager(), UNO_QUERY);
if (xFactory.is())
- mxRequestCallback = Reference<awt::XRequestCallback>(
+ mxRequestCallback.set(
xFactory->createInstanceWithContext(
"com.sun.star.awt.AsyncCallback",
rxContext),
diff --git a/sdext/source/presenter/PresenterToolBar.cxx b/sdext/source/presenter/PresenterToolBar.cxx
index 1a5969aaef30..1597d0006bfe 100644
--- a/sdext/source/presenter/PresenterToolBar.cxx
+++ b/sdext/source/presenter/PresenterToolBar.cxx
@@ -695,11 +695,11 @@ void PresenterToolBar::ProcessEntry (
else if ( sType == "PresentationTimeLabel" )
pElement = PresentationTimeLabel::Create(this);
else if ( sType == "VerticalSeparator" )
- pElement = ::rtl::Reference<Element>(new VerticalSeparator(this));
+ pElement.set(new VerticalSeparator(this));
else if ( sType == "HorizontalSeparator" )
- pElement = ::rtl::Reference<Element>(new HorizontalSeparator(this));
+ pElement.set(new HorizontalSeparator(this));
else if ( sType == "Label" )
- pElement = ::rtl::Reference<Element>(new Label(this));
+ pElement.set(new Label(this));
else if ( sType == "ChangeOrientation" )
{
mpCurrentContainerPart.reset(new ElementContainerPart());
@@ -1086,7 +1086,7 @@ PresenterToolBarView::PresenterToolBarView (
{
Reference<XControllerManager> xCM (rxController, UNO_QUERY_THROW);
Reference<XConfigurationController> xCC(xCM->getConfigurationController(),UNO_QUERY_THROW);
- mxPane = Reference<XPane>(xCC->getResource(rxViewId->getAnchor()), UNO_QUERY_THROW);
+ mxPane.set(xCC->getResource(rxViewId->getAnchor()), UNO_QUERY_THROW);
mxWindow = mxPane->getWindow();
mxCanvas = mxPane->getCanvas();
diff --git a/sdext/source/presenter/PresenterUIPainter.cxx b/sdext/source/presenter/PresenterUIPainter.cxx
index 4731f745877e..fe338a4b6b72 100644
--- a/sdext/source/presenter/PresenterUIPainter.cxx
+++ b/sdext/source/presenter/PresenterUIPainter.cxx
@@ -74,7 +74,7 @@ void PresenterUIPainter::PaintHorizontalBitmapComposite (
rBoundingBox.Y,
::std::min(aLeftBitmapSize.Width, rBoundingBox.Width),
rBoundingBox.Height);
- aViewState.Clip = Reference<rendering::XPolyPolygon2D>(
+ aViewState.Clip.set(
PresenterGeometryHelper::CreatePolygon(
PresenterGeometryHelper::Intersection(rRepaintBox, aLeftBoundingBox),
rxCanvas->getDevice()));
@@ -92,7 +92,7 @@ void PresenterUIPainter::PaintHorizontalBitmapComposite (
rBoundingBox.Y,
::std::min(aRightBitmapSize.Width, rBoundingBox.Width),
rBoundingBox.Height);
- aViewState.Clip = Reference<rendering::XPolyPolygon2D>(
+ aViewState.Clip.set(
PresenterGeometryHelper::CreatePolygon(
PresenterGeometryHelper::Intersection(rRepaintBox, aRightBoundingBox),
rxCanvas->getDevice()));
@@ -113,7 +113,7 @@ void PresenterUIPainter::PaintHorizontalBitmapComposite (
rBoundingBox.Height);
if (aCenterBoundingBox.Width > 0)
{
- aViewState.Clip = Reference<rendering::XPolyPolygon2D>(
+ aViewState.Clip.set(
PresenterGeometryHelper::CreatePolygon(
PresenterGeometryHelper::Intersection(rRepaintBox, aCenterBoundingBox),
rxCanvas->getDevice()));
@@ -176,7 +176,7 @@ void PresenterUIPainter::PaintVerticalBitmapComposite (
rBoundingBox.Y,
rBoundingBox.Width,
::std::min(aTopBitmapSize.Height, rBoundingBox.Height));
- aViewState.Clip = Reference<rendering::XPolyPolygon2D>(
+ aViewState.Clip.set(
PresenterGeometryHelper::CreatePolygon(
PresenterGeometryHelper::Intersection(rRepaintBox, aTopBoundingBox),
rxCanvas->getDevice()));
@@ -195,7 +195,7 @@ void PresenterUIPainter::PaintVerticalBitmapComposite (
rBoundingBox.Y + rBoundingBox.Height - nBBoxHeight,
rBoundingBox.Width,
nBBoxHeight);
- aViewState.Clip = Reference<rendering::XPolyPolygon2D>(
+ aViewState.Clip.set(
PresenterGeometryHelper::CreatePolygon(
PresenterGeometryHelper::Intersection(rRepaintBox, aBottomBoundingBox),
rxCanvas->getDevice()));
@@ -216,7 +216,7 @@ void PresenterUIPainter::PaintVerticalBitmapComposite (
rBoundingBox.Height - aTopBitmapSize.Height - aBottomBitmapSize.Height);
if (aCenterBoundingBox.Height > 0)
{
- aViewState.Clip = Reference<rendering::XPolyPolygon2D>(
+ aViewState.Clip.set(
PresenterGeometryHelper::CreatePolygon(
PresenterGeometryHelper::Intersection(rRepaintBox, aCenterBoundingBox),
rxCanvas->getDevice()));
diff --git a/sdext/source/presenter/PresenterViewFactory.cxx b/sdext/source/presenter/PresenterViewFactory.cxx
index 073fae421f13..f40e3a04b243 100644
--- a/sdext/source/presenter/PresenterViewFactory.cxx
+++ b/sdext/source/presenter/PresenterViewFactory.cxx
@@ -104,7 +104,7 @@ public:
{
if (nNextSlideIndex < nCount)
{
- xSlide = Reference<drawing::XDrawPage>(
+ xSlide.set(
xSlideShowController->getSlideByIndex(nNextSlideIndex),
UNO_QUERY);
}
@@ -391,7 +391,7 @@ Reference<XView> PresenterViewFactory::CreateSlideShowView(
Reference<frame::XController>(mxControllerWeak),
mpPresenterController));
pShowView->LateInit();
- xView = Reference<XView>(pShowView.get());
+ xView.set(pShowView.get());
}
catch (RuntimeException&)
{
@@ -414,7 +414,7 @@ Reference<XView> PresenterViewFactory::CreateSlidePreviewView(
try
{
- xView = Reference<XView>(
+ xView.set(
static_cast<XWeak*>(new NextSlidePreview(
mxComponentContext,
rxViewId,
@@ -454,7 +454,7 @@ Reference<XView> PresenterViewFactory::CreateNotesView(
try
{
- xView = Reference<XView>(static_cast<XWeak*>(
+ xView.set(static_cast<XWeak*>(
new PresenterNotesView(
mxComponentContext,
rxViewId,
diff --git a/sdext/source/presenter/PresenterWindowManager.cxx b/sdext/source/presenter/PresenterWindowManager.cxx
index 9d62d9673c23..863afcf18e47 100644
--- a/sdext/source/presenter/PresenterWindowManager.cxx
+++ b/sdext/source/presenter/PresenterWindowManager.cxx
@@ -1079,8 +1079,7 @@ void PresenterWindowManager::ProvideBackgroundBitmap()
}
else
{
- mxScaledBackgroundBitmap
- = Reference<rendering::XBitmap>(xBitmap, UNO_QUERY);
+ mxScaledBackgroundBitmap.set(xBitmap, UNO_QUERY);
}
}
}
@@ -1166,7 +1165,7 @@ void PresenterWindowManager::UpdateWindowList()
mxComponentContext,
mpPresenterController));
pManager->initialize(aArguments);
- mxPaneBorderManager = Reference<XInterface>(static_cast<XWeak*>(pManager.get()));
+ mxPaneBorderManager.set(static_cast<XWeak*>(pManager.get()));
}
}
catch (RuntimeException&)