summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sd/source/core/CustomAnimationEffect.cxx2
-rw-r--r--sd/source/core/CustomAnimationPreset.cxx6
-rw-r--r--sd/source/core/sdpage_animations.cxx4
-rw-r--r--sd/source/core/stlfamily.cxx2
-rw-r--r--sd/source/filter/eppt/eppt.cxx2
-rw-r--r--sd/source/filter/eppt/epptso.cxx10
-rw-r--r--sd/source/filter/eppt/pptx-epptbase.cxx18
-rw-r--r--sd/source/filter/eppt/pptx-epptooxml.cxx4
-rw-r--r--sd/source/filter/eppt/pptx-text.cxx12
-rw-r--r--sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx3
-rw-r--r--sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx5
-rw-r--r--sd/source/ui/accessibility/AccessiblePageShape.cxx5
-rw-r--r--sd/source/ui/animations/CustomAnimationList.cxx4
-rw-r--r--sd/source/ui/animations/CustomAnimationPane.cxx4
-rw-r--r--sd/source/ui/animations/SlideTransitionPane.cxx4
-rw-r--r--sd/source/ui/annotations/annotationmanager.cxx4
-rw-r--r--sd/source/ui/dlg/TemplateScanner.cxx12
-rw-r--r--sd/source/ui/dlg/filedlg.cxx2
-rw-r--r--sd/source/ui/framework/configuration/ResourceId.cxx2
-rw-r--r--sd/source/ui/framework/factories/BasicToolBarFactory.cxx2
-rw-r--r--sd/source/ui/framework/factories/BasicViewFactory.cxx3
-rw-r--r--sd/source/ui/framework/factories/Pane.cxx2
-rw-r--r--sd/source/ui/framework/factories/ViewShellWrapper.cxx2
-rw-r--r--sd/source/ui/framework/module/CenterViewFocusModule.cxx3
-rw-r--r--sd/source/ui/framework/module/ModuleController.cxx4
-rw-r--r--sd/source/ui/framework/module/SlideSorterModule.cxx2
-rw-r--r--sd/source/ui/framework/module/ViewTabBarModule.cxx3
-rw-r--r--sd/source/ui/presenter/PresenterCanvas.cxx4
-rw-r--r--sd/source/ui/remotecontrol/Communicator.cxx6
-rw-r--r--sd/source/ui/remotecontrol/Listener.cxx2
-rw-r--r--sd/source/ui/remotecontrol/Receiver.cxx9
-rw-r--r--sd/source/ui/sidebar/MasterPageContainer.cxx2
-rw-r--r--sd/source/ui/sidebar/MasterPagesSelector.cxx2
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.cxx4
-rw-r--r--sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx4
-rw-r--r--sd/source/ui/slidesorter/model/SlideSorterModel.cxx6
-rw-r--r--sd/source/ui/slidesorter/shell/SlideSorterService.cxx4
-rw-r--r--sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx4
-rw-r--r--sd/source/ui/table/TableDesignPane.cxx8
-rw-r--r--sd/source/ui/unoidl/DrawController.cxx4
-rw-r--r--sd/source/ui/unoidl/SdUnoDrawView.cxx2
-rw-r--r--sd/source/ui/unoidl/SdUnoOutlineView.cxx2
-rw-r--r--sd/source/ui/unoidl/unolayer.cxx2
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx8
-rw-r--r--sd/source/ui/unoidl/unopage.cxx8
-rw-r--r--sd/source/ui/view/ViewTabBar.cxx12
-rw-r--r--sd/source/ui/view/drviews3.cxx5
-rw-r--r--sd/source/ui/view/drviewsa.cxx10
-rw-r--r--sd/source/ui/view/outlnvsh.cxx4
49 files changed, 103 insertions, 135 deletions
diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx
index 32a00d3c29d2..650ecc51851e 100644
--- a/sd/source/core/CustomAnimationEffect.cxx
+++ b/sd/source/core/CustomAnimationEffect.cxx
@@ -544,7 +544,7 @@ bool CustomAnimationEffect::checkForText()
ParagraphTarget aParaTarget;
maTarget >>= aParaTarget;
- xText = Reference< XText >::query( aParaTarget.Shape );
+ xText.set( aParaTarget.Shape, UNO_QUERY );
// get paragraph
if( xText.is() )
diff --git a/sd/source/core/CustomAnimationPreset.cxx b/sd/source/core/CustomAnimationPreset.cxx
index 740f8b335f53..f4da98ca9c69 100644
--- a/sd/source/core/CustomAnimationPreset.cxx
+++ b/sd/source/core/CustomAnimationPreset.cxx
@@ -71,9 +71,9 @@ static Reference< XNameAccess > getNodeAccess( const Reference< XMultiServiceFac
aPropValue.Value <<= rNodePath;
aArgs[0] <<= aPropValue;
- xConfigAccess = Reference< XNameAccess >::query(
- xConfigProvider->createInstanceWithArguments( "com.sun.star.configuration.ConfigurationAccess" ,
- aArgs ));
+ xConfigAccess.set(
+ xConfigProvider->createInstanceWithArguments( "com.sun.star.configuration.ConfigurationAccess", aArgs ),
+ UNO_QUERY);
}
catch (const Exception&)
{
diff --git a/sd/source/core/sdpage_animations.cxx b/sd/source/core/sdpage_animations.cxx
index ef1b621953a4..9bfd8e4a7867 100644
--- a/sd/source/core/sdpage_animations.cxx
+++ b/sd/source/core/sdpage_animations.cxx
@@ -104,7 +104,7 @@ void SdPage::onParagraphInserted( ::Outliner* pOutliner, Paragraph* pPara, SdrOb
if( mxAnimationNode.is() )
{
ParagraphTarget aTarget;
- aTarget.Shape = Reference< XShape >( pObj->getUnoShape(), UNO_QUERY );
+ aTarget.Shape.set( pObj->getUnoShape(), UNO_QUERY );
/* FIXME: Paragraph should be sal_Int32, though more than 64k
* paragrapsh at a shape are unlikely.. */
aTarget.Paragraph = (sal_Int16)pOutliner->GetAbsPos( pPara );
@@ -119,7 +119,7 @@ void SdPage::onParagraphRemoving( ::Outliner* pOutliner, Paragraph* pPara, SdrOb
if( mxAnimationNode.is() )
{
ParagraphTarget aTarget;
- aTarget.Shape = Reference< XShape >( pObj->getUnoShape(), UNO_QUERY );
+ aTarget.Shape.set( pObj->getUnoShape(), UNO_QUERY );
/* FIXME: Paragraph should be sal_Int32, though more than 64k
* paragrapsh at a shape are unlikely.. */
aTarget.Paragraph = (sal_Int16)pOutliner->GetAbsPos( pPara );
diff --git a/sd/source/core/stlfamily.cxx b/sd/source/core/stlfamily.cxx
index fa239534f71d..3cd85d5d0bf5 100644
--- a/sd/source/core/stlfamily.cxx
+++ b/sd/source/core/stlfamily.cxx
@@ -82,7 +82,7 @@ PresStyleMap& SdStyleFamilyImpl::getStyleSheets()
SdStyleSheet* pSdStyle = static_cast< SdStyleSheet* >( pStyle );
if (pSdStyle->GetName().startsWith(aLayoutName))
{
- maStyleSheets[ pSdStyle->GetApiName() ] = rtl::Reference< SdStyleSheet >( pSdStyle );
+ maStyleSheets[ pSdStyle->GetApiName() ].set( pSdStyle );
}
}
}
diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx
index 3679ca1f67bd..d4d133ef5096 100644
--- a/sd/source/filter/eppt/eppt.cxx
+++ b/sd/source/filter/eppt/eppt.cxx
@@ -761,7 +761,7 @@ bool PPTWriter::ImplCreateDocument()
css::uno::Reference< css::presentation::XPresentation > aXPresentation( aXPresSupplier->getPresentation() );
if ( aXPresentation.is() )
{
- mXPropSet = css::uno::Reference< css::beans::XPropertySet >( aXPresentation, css::uno::UNO_QUERY );
+ mXPropSet.set( aXPresentation, css::uno::UNO_QUERY );
if ( mXPropSet.is() )
{
OUString aCustomShow;
diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index e88ad25c098c..47a40d49d2b0 100644
--- a/sd/source/filter/eppt/epptso.cxx
+++ b/sd/source/filter/eppt/epptso.cxx
@@ -979,9 +979,7 @@ bool PPTWriter::ImplGetText()
{
mnTextSize = 0;
mbFontIndependentLineSpacing = false;
- mXText = css::uno::Reference<
- css::text::XSimpleText >
- ( mXShape, css::uno::UNO_QUERY );
+ mXText.set( mXShape, css::uno::UNO_QUERY );
if ( mXText.is() )
{
@@ -2716,7 +2714,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
}
else
{
- mXText = css::uno::Reference< css::text::XSimpleText >( mXShape, css::uno::UNO_QUERY );
+ mXText.set( mXShape, css::uno::UNO_QUERY );
if ( mXText.is() )
mnTextSize = mXText->getString().getLength();
@@ -3673,8 +3671,8 @@ void PPTWriter::ImplCreateTable( uno::Reference< drawing::XShape >& rXShape, Esc
sal_Int32 nBottom = GetCellBottom( nRow, maRect,aRows,xCell );
mbFontIndependentLineSpacing = false;
- mXPropSet = uno::Reference< beans::XPropertySet >( xCell, uno::UNO_QUERY_THROW );
- mXText = uno::Reference< text::XSimpleText >( xCell, uno::UNO_QUERY_THROW );
+ mXPropSet.set( xCell, uno::UNO_QUERY_THROW );
+ mXText.set( xCell, uno::UNO_QUERY_THROW );
mnTextSize = mXText->getString().getLength();
css::uno::Any aAny;
diff --git a/sd/source/filter/eppt/pptx-epptbase.cxx b/sd/source/filter/eppt/pptx-epptbase.cxx
index aecd1d39e6c0..e565fb9bc4ba 100644
--- a/sd/source/filter/eppt/pptx-epptbase.cxx
+++ b/sd/source/filter/eppt/pptx-epptbase.cxx
@@ -258,11 +258,11 @@ bool PPTWriterBase::InitSOIface()
{
while( true )
{
- mXDrawPagesSupplier = Reference< XDrawPagesSupplier >( mXModel, UNO_QUERY );
+ mXDrawPagesSupplier.set( mXModel, UNO_QUERY );
if ( !mXDrawPagesSupplier.is() )
break;
- mXMasterPagesSupplier = Reference< XMasterPagesSupplier >( mXModel, UNO_QUERY );
+ mXMasterPagesSupplier.set( mXModel, UNO_QUERY );
if ( !mXMasterPagesSupplier.is() )
break;
mXDrawPages = mXMasterPagesSupplier->getMasterPages();
@@ -323,14 +323,14 @@ bool PPTWriterBase::GetPageByIndex( sal_uInt32 nIndex, PageType ePageType )
if ( !mXDrawPage.is() )
break;
}
- mXPagePropSet = Reference< XPropertySet >( mXDrawPage, UNO_QUERY );
+ mXPagePropSet.set( mXDrawPage, UNO_QUERY );
if ( !mXPagePropSet.is() )
break;
if (GetPropertyValue( aAny, mXPagePropSet, OUString("IsBackgroundDark") ) )
aAny >>= mbIsBackgroundDark;
- mXShapes = Reference< XShapes >( mXDrawPage, UNO_QUERY );
+ mXShapes.set( mXDrawPage, UNO_QUERY );
if ( !mXShapes.is() )
break;
@@ -349,8 +349,7 @@ bool PPTWriterBase::GetPageByIndex( sal_uInt32 nIndex, PageType ePageType )
if ( aXMasterDrawPage.is() )
{
Reference< XPropertySet > aXMasterPagePropSet;
- aXMasterPagePropSet = Reference< XPropertySet >
- ( aXMasterDrawPage, UNO_QUERY );
+ aXMasterPagePropSet.set( aXMasterDrawPage, UNO_QUERY );
if ( aXMasterPagePropSet.is() )
{
bool bBackground = GetPropertyValue( aAny, aXMasterPagePropSet, OUString( "Background" ) );
@@ -544,8 +543,7 @@ bool PPTWriterBase::GetStyleSheets()
maStyleSheetList.push_back( new PPTExStyleSheet( nDefaultTab, dynamic_cast<PPTExBulletProvider*>(this) ) );
SetCurrentStyleSheet( nPageNum );
if ( GetPageByIndex( nPageNum, MASTER ) )
- aXNamed = Reference< XNamed >
- ( mXDrawPage, UNO_QUERY );
+ aXNamed.set( mXDrawPage, UNO_QUERY );
if ( aXStyleFamiliesSupplier.is() )
aXNameAccess = aXStyleFamiliesSupplier->getStyleFamilies();
@@ -669,11 +667,11 @@ bool PPTWriterBase::CreateMainNotes()
if ( !mXDrawPage.is() )
return false;
- mXPropSet = css::uno::Reference< css::beans::XPropertySet >( mXDrawPage, css::uno::UNO_QUERY );
+ mXPropSet.set( mXDrawPage, css::uno::UNO_QUERY );
if ( !mXPropSet.is() )
return false;
- mXShapes = css::uno::Reference< css::drawing::XShapes >( mXDrawPage, css::uno::UNO_QUERY );
+ mXShapes.set( mXDrawPage, css::uno::UNO_QUERY );
if ( !mXShapes.is() )
return false;
diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx
index 9fa5a976b9b4..7f02f836856a 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -1653,8 +1653,8 @@ void PowerPointExport::ImplWritePPTXLayout( sal_Int32 nOffset, sal_uInt32 nMaste
xPropSet->setPropertyValue( "Layout", makeAny( short( aLayoutInfo[ nOffset ].nType ) ) );
DBG(dump_pset( xPropSet ));
- mXPagePropSet = Reference< XPropertySet >( xSlide, UNO_QUERY );
- mXShapes = Reference< XShapes >( xSlide, UNO_QUERY );
+ mXPagePropSet.set( xSlide, UNO_QUERY );
+ mXShapes.set( xSlide, UNO_QUERY );
if( mLayoutInfo[ nOffset ].mnFileIdArray.size() < mnMasterPages ) {
mLayoutInfo[ nOffset ].mnFileIdArray.resize( mnMasterPages );
diff --git a/sd/source/filter/eppt/pptx-text.cxx b/sd/source/filter/eppt/pptx-text.cxx
index c39423766724..0a7f9add0cbd 100644
--- a/sd/source/filter/eppt/pptx-text.cxx
+++ b/sd/source/filter/eppt/pptx-text.cxx
@@ -99,12 +99,8 @@ PortionObj::PortionObj(css::uno::Reference< css::text::XTextRange > & rXTextRang
mpFieldEntry = NULL;
sal_uInt32 nFieldType = 0;
- mXPropSet = css::uno::Reference<
- css::beans::XPropertySet >
- ( rXTextRange, css::uno::UNO_QUERY );
- mXPropState = css::uno::Reference<
- css::beans::XPropertyState >
- ( rXTextRange, css::uno::UNO_QUERY );
+ mXPropSet.set( rXTextRange, css::uno::UNO_QUERY );
+ mXPropState.set( rXTextRange, css::uno::UNO_QUERY );
bool bPropSetsValid = ( mXPropSet.is() && mXPropState.is() );
if ( bPropSetsValid )
@@ -709,9 +705,9 @@ ParagraphObj::ParagraphObj(css::uno::Reference< css::text::XTextContent > & rXTe
nBulletFlags = 0;
nParaFlags = 0;
- mXPropSet = css::uno::Reference< css::beans::XPropertySet >( rXTextContent, css::uno::UNO_QUERY );
+ mXPropSet.set( rXTextContent, css::uno::UNO_QUERY );
- mXPropState = css::uno::Reference< css::beans::XPropertyState >( rXTextContent, css::uno::UNO_QUERY );
+ mXPropState.set( rXTextContent, css::uno::UNO_QUERY );
if ( mXPropSet.is() && mXPropState.is() )
{
diff --git a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
index 4b4e81536122..986bc4c19401 100644
--- a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
+++ b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
@@ -113,8 +113,7 @@ void AccessibleDocumentViewBase::Init()
uno::Reference<drawing::XShapes> xShapeList;
uno::Reference<drawing::XDrawView> xView (mxController, uno::UNO_QUERY);
if (xView.is())
- xShapeList = uno::Reference<drawing::XShapes> (
- xView->getCurrentPage(), uno::UNO_QUERY);
+ xShapeList.set( xView->getCurrentPage(), uno::UNO_QUERY);
// Register this object as dispose event listener at the model.
if (mxModel.is())
diff --git a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
index 3d00ab529778..cecf847271aa 100644
--- a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
+++ b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
@@ -107,8 +107,7 @@ void AccessibleDrawDocumentView::Init()
uno::Reference<drawing::XShapes> xShapeList;
uno::Reference<drawing::XDrawView> xView (mxController, uno::UNO_QUERY);
if (xView.is())
- xShapeList = uno::Reference<drawing::XShapes> (
- xView->getCurrentPage(), uno::UNO_QUERY);
+ xShapeList.set( xView->getCurrentPage(), uno::UNO_QUERY);
// Create the children manager.
mpChildrenManager = new ChildrenManager(this, xShapeList, maShapeTreeInfo, *this);
@@ -151,7 +150,7 @@ rtl::Reference<AccessiblePageShape> AccessibleDrawDocumentView::CreateDrawPageSh
uno::Reference<lang::XMultiServiceFactory> xFactory (mxModel, uno::UNO_QUERY);
uno::Reference<drawing::XShape> xRectangle;
if (xFactory.is())
- xRectangle = uno::Reference<drawing::XShape>(xFactory->createInstance ("com.sun.star.drawing.RectangleShape"),
+ xRectangle.set(xFactory->createInstance ("com.sun.star.drawing.RectangleShape"),
uno::UNO_QUERY);
// Set the shape's size and position.
diff --git a/sd/source/ui/accessibility/AccessiblePageShape.cxx b/sd/source/ui/accessibility/AccessiblePageShape.cxx
index fbb3d958a522..e5b74bfbcc55 100644
--- a/sd/source/ui/accessibility/AccessiblePageShape.cxx
+++ b/sd/source/ui/accessibility/AccessiblePageShape.cxx
@@ -193,10 +193,9 @@ sal_Int32 SAL_CALL AccessiblePageShape::getBackground()
Reference<drawing::XMasterPageTarget> xTarget (mxPage, uno::UNO_QUERY);
if (xTarget.is())
{
- xSet = Reference<beans::XPropertySet> (xTarget->getMasterPage(),
- uno::UNO_QUERY);
+ xSet.set(xTarget->getMasterPage(), uno::UNO_QUERY);
aBGSet = xSet->getPropertyValue ("Background");
- xBGSet = Reference<beans::XPropertySet> (aBGSet, uno::UNO_QUERY);
+ xBGSet.set(aBGSet, uno::UNO_QUERY);
}
}
// Fetch the fill color. Has to be extended to cope with
diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx
index a423945ba3e6..4df0848f3f8a 100644
--- a/sd/source/ui/animations/CustomAnimationList.cxx
+++ b/sd/source/ui/animations/CustomAnimationList.cxx
@@ -110,10 +110,10 @@ static sal_Int32 getShapeIndex( const Reference< XShape >& xShape )
while( xChild.is() && !xPage.is() )
{
Reference< XInterface > x( xChild->getParent() );
- xChild = Reference< XChild >::query( x );
+ xChild.set( x, UNO_QUERY );
Reference< XDrawPage > xTestPage( x, UNO_QUERY );
if( xTestPage.is() )
- xPage = Reference< XShapes >::query( x );
+ xPage.set( x, UNO_QUERY );
}
sal_Int32 nIndex = 1;
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx
index 54495818874c..c6c144577a82 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -203,7 +203,7 @@ CustomAnimationPane::CustomAnimationPane( Window* pParent, ViewShellBase& rBase,
// get current controller and initialize listeners
try
{
- mxView = Reference< XDrawView >::query(mrBase.GetController());
+ mxView.set(mrBase.GetController(), UNO_QUERY);
addListener();
}
catch( Exception& )
@@ -325,7 +325,7 @@ IMPL_LINK_TYPED(CustomAnimationPane,EventMultiplexerListener,
{
if( mrBase.GetMainViewShell()->GetShellType() == ViewShell::ST_IMPRESS )
{
- mxView = Reference<XDrawView>::query(mrBase.GetDrawController());
+ mxView.set(mrBase.GetDrawController(), UNO_QUERY);
onSelectionChanged();
onChangeCurrentPage();
break;
diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx
index b3c845c0d027..e7022c07755f 100644
--- a/sd/source/ui/animations/SlideTransitionPane.cxx
+++ b/sd/source/ui/animations/SlideTransitionPane.cxx
@@ -937,7 +937,7 @@ IMPL_LINK_TYPED(SlideTransitionPane,EventMultiplexerListener,
break;
case tools::EventMultiplexerEvent::EID_MAIN_VIEW_REMOVED:
- mxView = Reference<drawing::XDrawView>();
+ mxView.clear();
onSelectionChanged();
onChangeCurrentPage();
break;
@@ -956,7 +956,7 @@ IMPL_LINK_TYPED(SlideTransitionPane,EventMultiplexerListener,
// passed with the event.
if (mrBase.GetMainViewShell() != 0)
{
- mxView = Reference<drawing::XDrawView>::query(mrBase.GetController());
+ mxView.set(mrBase.GetController(), css::uno::UNO_QUERY);
onSelectionChanged();
onChangeCurrentPage();
}
diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx
index a860daec3032..0c08e33328d6 100644
--- a/sd/source/ui/annotations/annotationmanager.cxx
+++ b/sd/source/ui/annotations/annotationmanager.cxx
@@ -185,7 +185,7 @@ void AnnotationManagerImpl::init()
try
{
addListener();
- mxView = Reference< XDrawView >::query(mrBase.GetController());
+ mxView.set(mrBase.GetController(), UNO_QUERY);
}
catch( Exception& )
{
@@ -893,7 +893,7 @@ IMPL_LINK_TYPED(AnnotationManagerImpl,EventMultiplexerListener,
break;
case tools::EventMultiplexerEvent::EID_MAIN_VIEW_ADDED:
- mxView = Reference<XDrawView>::query( mrBase.GetController() );
+ mxView.set( mrBase.GetController(), UNO_QUERY );
onSelectionChanged();
break;
}
diff --git a/sd/source/ui/dlg/TemplateScanner.cxx b/sd/source/ui/dlg/TemplateScanner.cxx
index 9cd2261f9cdb..284815774b9e 100644
--- a/sd/source/ui/dlg/TemplateScanner.cxx
+++ b/sd/source/ui/dlg/TemplateScanner.cxx
@@ -211,7 +211,7 @@ TemplateScanner::State TemplateScanner::InitializeEntryScanning()
if (maFolderContent.isFolder())
{
- mxEntryEnvironment = Reference<css::ucb::XCommandEnvironment>();
+ mxEntryEnvironment.clear();
// We are interested only in three properties: the entry's name,
// its URL, and its content type.
@@ -222,8 +222,7 @@ TemplateScanner::State TemplateScanner::InitializeEntryScanning()
// Create a cursor to iterate over the templates in this folders.
::ucbhelper::ResultSetInclude eInclude = ::ucbhelper::INCLUDE_DOCUMENTS_ONLY;
- mxEntryResultSet = Reference<css::sdbc::XResultSet>(
- maFolderContent.createCursor(aProps, eInclude));
+ mxEntryResultSet.set( maFolderContent.createCursor(aProps, eInclude));
}
else
eNextState = ERROR;
@@ -294,12 +293,12 @@ TemplateScanner::State TemplateScanner::InitializeFolderScanning()
{
State eNextState (ERROR);
- mxFolderResultSet = Reference<sdbc::XResultSet>();
+ mxFolderResultSet.clear();
try
{
// Create content for template folders.
- mxFolderEnvironment = Reference<css::ucb::XCommandEnvironment>();
+ mxFolderEnvironment.clear();
::ucbhelper::Content aTemplateDir (mxTemplateRoot, mxFolderEnvironment, comphelper::getProcessComponentContext());
// Define the list of properties we are interested in.
@@ -309,8 +308,7 @@ TemplateScanner::State TemplateScanner::InitializeFolderScanning()
// Create an cursor to iterate over the template folders.
::ucbhelper::ResultSetInclude eInclude = ::ucbhelper::INCLUDE_FOLDERS_ONLY;
- mxFolderResultSet = Reference<sdbc::XResultSet>(
- aTemplateDir.createCursor(aProps, eInclude));
+ mxFolderResultSet.set( aTemplateDir.createCursor(aProps, eInclude));
if (mxFolderResultSet.is())
eNextState = GATHER_FOLDER_LIST;
}
diff --git a/sd/source/ui/dlg/filedlg.cxx b/sd/source/ui/dlg/filedlg.cxx
index 91de86569f36..0dd9182da6d4 100644
--- a/sd/source/ui/dlg/filedlg.cxx
+++ b/sd/source/ui/dlg/filedlg.cxx
@@ -225,7 +225,7 @@ SdFileDialog_Imp::SdFileDialog_Imp( const short nDialogType,
css::uno::Reference < css::ui::dialogs::XFilePicker2 > xFileDlg = GetFilePicker();
// get the control access
- mxControlAccess = css::uno::Reference< css::ui::dialogs::XFilePickerControlAccess > ( xFileDlg, css::uno::UNO_QUERY );
+ mxControlAccess.set( xFileDlg, css::uno::UNO_QUERY );
if( mxControlAccess.is() )
{
diff --git a/sd/source/ui/framework/configuration/ResourceId.cxx b/sd/source/ui/framework/configuration/ResourceId.cxx
index 38536b848fdc..71461c57d6d1 100644
--- a/sd/source/ui/framework/configuration/ResourceId.cxx
+++ b/sd/source/ui/framework/configuration/ResourceId.cxx
@@ -500,7 +500,7 @@ void ResourceId::ParseResourceURL()
{
// Create the URL transformer.
Reference<uno::XComponentContext> xContext(::comphelper::getProcessComponentContext());
- xURLTransformer = Reference<util::XURLTransformer>(util::URLTransformer::create(xContext));
+ xURLTransformer.set(util::URLTransformer::create(xContext));
mxURLTransformerWeak = xURLTransformer;
SdGlobalResourceContainer::Instance().AddResource(
Reference<XInterface>(xURLTransformer,UNO_QUERY));
diff --git a/sd/source/ui/framework/factories/BasicToolBarFactory.cxx b/sd/source/ui/framework/factories/BasicToolBarFactory.cxx
index 1ca070918096..1004ae6a01bf 100644
--- a/sd/source/ui/framework/factories/BasicToolBarFactory.cxx
+++ b/sd/source/ui/framework/factories/BasicToolBarFactory.cxx
@@ -78,7 +78,7 @@ void SAL_CALL BasicToolBarFactory::initialize (const Sequence<Any>& aArguments)
try
{
// Get the XController from the first argument.
- mxController = Reference<frame::XController>(aArguments[0], UNO_QUERY_THROW);
+ mxController.set(aArguments[0], UNO_QUERY_THROW);
// Tunnel through the controller to obtain a ViewShellBase.
Reference<lang::XUnoTunnel> xTunnel (mxController, UNO_QUERY_THROW);
diff --git a/sd/source/ui/framework/factories/BasicViewFactory.cxx b/sd/source/ui/framework/factories/BasicViewFactory.cxx
index 3f6b1defdec5..a0cfc145f67f 100644
--- a/sd/source/ui/framework/factories/BasicViewFactory.cxx
+++ b/sd/source/ui/framework/factories/BasicViewFactory.cxx
@@ -141,8 +141,7 @@ Reference<XResource> SAL_CALL BasicViewFactory::createResource (
// Get the pane for the anchor URL.
Reference<XPane> xPane;
if (mxConfigurationController.is())
- xPane = Reference<XPane>(mxConfigurationController->getResource(rxViewId->getAnchor()),
- UNO_QUERY);
+ xPane.set(mxConfigurationController->getResource(rxViewId->getAnchor()), UNO_QUERY);
// For main views use the frame view of the last main view.
::sd::FrameView* pFrameView = NULL;
diff --git a/sd/source/ui/framework/factories/Pane.cxx b/sd/source/ui/framework/factories/Pane.cxx
index 3d02f3411df8..8d369d9e1073 100644
--- a/sd/source/ui/framework/factories/Pane.cxx
+++ b/sd/source/ui/framework/factories/Pane.cxx
@@ -180,7 +180,7 @@ Reference<rendering::XCanvas> Pane::CreateCanvas()
::cppcanvas::SpriteCanvasSharedPtr pCanvas (
cppcanvas::VCLFactory::createSpriteCanvas(*mpWindow));
if (pCanvas.get() != NULL)
- xCanvas = Reference<rendering::XCanvas>(pCanvas->getUNOSpriteCanvas(), UNO_QUERY);
+ xCanvas.set(pCanvas->getUNOSpriteCanvas(), UNO_QUERY);
}
return xCanvas;
diff --git a/sd/source/ui/framework/factories/ViewShellWrapper.cxx b/sd/source/ui/framework/factories/ViewShellWrapper.cxx
index 888de15bcc67..41bdda7a8de7 100644
--- a/sd/source/ui/framework/factories/ViewShellWrapper.cxx
+++ b/sd/source/ui/framework/factories/ViewShellWrapper.cxx
@@ -216,7 +216,7 @@ sal_Bool SAL_CALL ViewShellWrapper::relocateToAnchor (
bResult = true;
// Attach to the window of the new pane.
- xWindow = Reference<awt::XWindow>(xPane->getWindow(), UNO_QUERY);
+ xWindow.set(xPane->getWindow(), UNO_QUERY);
if (xWindow.is())
{
xWindow->addWindowListener(this);
diff --git a/sd/source/ui/framework/module/CenterViewFocusModule.cxx b/sd/source/ui/framework/module/CenterViewFocusModule.cxx
index 986f6fb87888..eb4ae58f630b 100644
--- a/sd/source/ui/framework/module/CenterViewFocusModule.cxx
+++ b/sd/source/ui/framework/module/CenterViewFocusModule.cxx
@@ -133,8 +133,7 @@ void CenterViewFocusModule::HandleNewView (
AnchorBindingMode_DIRECT));
Reference<XView> xView;
if (xViewIds.getLength() > 0)
- xView = Reference<XView>(
- mxConfigurationController->getResource(xViewIds[0]),UNO_QUERY);
+ xView.set( mxConfigurationController->getResource(xViewIds[0]),UNO_QUERY);
Reference<lang::XUnoTunnel> xTunnel (xView, UNO_QUERY);
if (xTunnel.is() && mpBase!=NULL)
{
diff --git a/sd/source/ui/framework/module/ModuleController.cxx b/sd/source/ui/framework/module/ModuleController.cxx
index 8d355a6f7ad1..fa63b77b128e 100644
--- a/sd/source/ui/framework/module/ModuleController.cxx
+++ b/sd/source/ui/framework/module/ModuleController.cxx
@@ -211,7 +211,7 @@ void SAL_CALL ModuleController::requestResource (const OUString& rsResourceURL)
LoadedFactoryContainer::const_iterator iLoadedFactory (
mpLoadedFactories->find(iFactory->second));
if (iLoadedFactory != mpLoadedFactories->end())
- xFactory = Reference<XInterface>(iLoadedFactory->second, UNO_QUERY);
+ xFactory.set(iLoadedFactory->second, UNO_QUERY);
if ( ! xFactory.is())
{
// Create a new instance of the factory.
@@ -251,7 +251,7 @@ void SAL_CALL ModuleController::initialize (const Sequence<Any>& aArguments)
try
{
// Get the XController from the first argument.
- mxController = Reference<frame::XController>(aArguments[0], UNO_QUERY_THROW);
+ mxController.set(aArguments[0], UNO_QUERY_THROW);
InstantiateStartupServices();
}
diff --git a/sd/source/ui/framework/module/SlideSorterModule.cxx b/sd/source/ui/framework/module/SlideSorterModule.cxx
index 32dc1e79dba5..93a2420d22a4 100644
--- a/sd/source/ui/framework/module/SlideSorterModule.cxx
+++ b/sd/source/ui/framework/module/SlideSorterModule.cxx
@@ -125,7 +125,7 @@ void SlideSorterModule::UpdateViewTabBar (const Reference<XTabBar>& rxTabBar)
Reference<XConfigurationController> xCC (
mxControllerManager->getConfigurationController());
if (xCC.is())
- xBar = Reference<XTabBar>(xCC->getResource(mxViewTabBarId), UNO_QUERY);
+ xBar.set(xCC->getResource(mxViewTabBarId), UNO_QUERY);
}
if (xBar.is())
diff --git a/sd/source/ui/framework/module/ViewTabBarModule.cxx b/sd/source/ui/framework/module/ViewTabBarModule.cxx
index ccf08fbabe47..ca564db51c4f 100644
--- a/sd/source/ui/framework/module/ViewTabBarModule.cxx
+++ b/sd/source/ui/framework/module/ViewTabBarModule.cxx
@@ -143,8 +143,7 @@ void ViewTabBarModule::UpdateViewTabBar (const Reference<XTabBar>& rxTabBar)
{
Reference<XTabBar> xBar (rxTabBar);
if ( ! xBar.is())
- xBar = Reference<XTabBar>(
- mxConfigurationController->getResource(mxViewTabBarId), UNO_QUERY);
+ xBar.set( mxConfigurationController->getResource(mxViewTabBarId), UNO_QUERY);
if (xBar.is())
{
diff --git a/sd/source/ui/presenter/PresenterCanvas.cxx b/sd/source/ui/presenter/PresenterCanvas.cxx
index 35afe646a52f..2339fd0f735a 100644
--- a/sd/source/ui/presenter/PresenterCanvas.cxx
+++ b/sd/source/ui/presenter/PresenterCanvas.cxx
@@ -851,7 +851,7 @@ Reference<rendering::XPolyPolygon2D> PresenterCanvas::UpdateSpriteClip (
xDevice->createCompatibleLinePolyPolygon(aPoints));
if (xLinePolygon.is())
xLinePolygon->setClosed(0, sal_True);
- xPolygon = Reference<rendering::XPolyPolygon2D>(xLinePolygon, UNO_QUERY);
+ xPolygon.set(xLinePolygon, UNO_QUERY);
}
return xPolygon;
@@ -894,7 +894,7 @@ void SAL_CALL PresenterCustomSprite::disposing()
mxSprite = NULL;
if (xComponent.is())
xComponent->dispose();
- mpCanvas = rtl::Reference<PresenterCanvas>();
+ mpCanvas.clear();
}
//----- XSprite ---------------------------------------------------------------
diff --git a/sd/source/ui/remotecontrol/Communicator.cxx b/sd/source/ui/remotecontrol/Communicator.cxx
index bf399cae8ceb..33f05f228246 100644
--- a/sd/source/ui/remotecontrol/Communicator.cxx
+++ b/sd/source/ui/remotecontrol/Communicator.cxx
@@ -67,10 +67,10 @@ void Communicator::execute()
uno::Reference<presentation::XPresentationSupplier> xPS;
if( xFrame.is() )
- xPS = uno::Reference<presentation::XPresentationSupplier>( xFrame->getController()->getModel(), uno::UNO_QUERY );
+ xPS.set( xFrame->getController()->getModel(), uno::UNO_QUERY );
uno::Reference<presentation::XPresentation2> xPresentation;
if( xPS.is() )
- xPresentation = uno::Reference<presentation::XPresentation2>( xPS->getPresentation(), uno::UNO_QUERY );
+ xPresentation.set( xPS->getPresentation(), uno::UNO_QUERY );
if ( xPresentation.is() && xPresentation->isRunning() )
{
presentationStarted( xPresentation->getController() );
@@ -142,7 +142,7 @@ void Communicator::presentationStarted( const css::uno::Reference<
{
if ( pTransmitter )
{
- mListener = rtl::Reference<Listener>( new Listener( this, pTransmitter ) );
+ mListener.set( new Listener( this, pTransmitter ) );
mListener->init( rController );
}
}
diff --git a/sd/source/ui/remotecontrol/Listener.cxx b/sd/source/ui/remotecontrol/Listener.cxx
index afa7cded78d7..72b3c95b8d3b 100644
--- a/sd/source/ui/remotecontrol/Listener.cxx
+++ b/sd/source/ui/remotecontrol/Listener.cxx
@@ -37,7 +37,7 @@ void Listener::init( const css::uno::Reference< css::presentation::XSlideShowCon
{
if ( aController.is() )
{
- mController = css::uno::Reference< css::presentation::XSlideShowController >( aController );
+ mController.set( aController );
aController->addSlideShowListener( this );
sal_Int32 aSlides = aController->getSlideCount();
diff --git a/sd/source/ui/remotecontrol/Receiver.cxx b/sd/source/ui/remotecontrol/Receiver.cxx
index 892d72b98653..d540f09d6608 100644
--- a/sd/source/ui/remotecontrol/Receiver.cxx
+++ b/sd/source/ui/remotecontrol/Receiver.cxx
@@ -75,13 +75,10 @@ void Receiver::executeCommand( const std::vector<OString> &aCommand )
uno::Reference< frame::XDesktop2 > xFramesSupplier = frame::Desktop::create( ::comphelper::getProcessComponentContext() );
uno::Reference< frame::XFrame > xFrame ( xFramesSupplier->getActiveFrame(), uno::UNO_QUERY_THROW );
uno::Reference<presentation::XPresentationSupplier> xPS ( xFrame->getController()->getModel(), uno::UNO_QUERY_THROW);
- xPresentation = uno::Reference<presentation::XPresentation2>(
- xPS->getPresentation(), uno::UNO_QUERY_THROW);
+ xPresentation.set( xPS->getPresentation(), uno::UNO_QUERY_THROW);
// Throws an exception if now slideshow running
- xSlideShowController = uno::Reference<presentation::XSlideShowController>(
- xPresentation->getController(), uno::UNO_QUERY_THROW );
- xSlideShow = uno::Reference<presentation::XSlideShow>(
- xSlideShowController->getSlideShow(), uno::UNO_QUERY_THROW );
+ xSlideShowController.set( xPresentation->getController(), uno::UNO_QUERY_THROW );
+ xSlideShow.set( xSlideShowController->getSlideShow(), uno::UNO_QUERY_THROW );
}
catch (uno::RuntimeException &)
{
diff --git a/sd/source/ui/sidebar/MasterPageContainer.cxx b/sd/source/ui/sidebar/MasterPageContainer.cxx
index 897d95ae882a..71121d38352e 100644
--- a/sd/source/ui/sidebar/MasterPageContainer.cxx
+++ b/sd/source/ui/sidebar/MasterPageContainer.cxx
@@ -842,7 +842,7 @@ Reference<frame::XModel> MasterPageContainer::Implementation::GetModel()
// Create a new model.
OUString sModelServiceName ( "com.sun.star.presentation.PresentationDocument");
- mxModel = uno::Reference<frame::XModel>(
+ mxModel.set(
::comphelper::getProcessServiceFactory()->createInstance(
sModelServiceName),
uno::UNO_QUERY);
diff --git a/sd/source/ui/sidebar/MasterPagesSelector.cxx b/sd/source/ui/sidebar/MasterPagesSelector.cxx
index b1aa583401e1..0f24434b8fc7 100644
--- a/sd/source/ui/sidebar/MasterPagesSelector.cxx
+++ b/sd/source/ui/sidebar/MasterPagesSelector.cxx
@@ -306,7 +306,7 @@ void MasterPagesSelector::ExecuteCommand (const sal_Int32 nCommandId)
SdPage* pMasterPage = GetSelectedMasterPage();
assert(pMasterPage); //rhbz#902884
if (pMasterPage)
- xSelectedMaster = uno::Reference<drawing::XDrawPage>(pMasterPage->getUnoPage(), uno::UNO_QUERY);
+ xSelectedMaster.set(pMasterPage->getUnoPage(), uno::UNO_QUERY);
SfxViewFrame* pViewFrame = mrBase.GetViewFrame();
if (pViewFrame != NULL && xSelectedMaster.is())
{
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index 60b7206cb9d3..0c5e1aef2c6b 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -303,7 +303,7 @@ bool AnimationSlideController::getSlideAPI( sal_Int32 nSlideNumber, Reference< X
{
if( isValidSlideNumber( nSlideNumber ) ) try
{
- xSlide = Reference< XDrawPage >( mxSlides->getByIndex(nSlideNumber), UNO_QUERY_THROW );
+ xSlide.set( mxSlides->getByIndex(nSlideNumber), UNO_QUERY_THROW );
if( meMode == PREVIEW )
{
@@ -1091,7 +1091,7 @@ bool SlideshowImpl::startShowImpl( const Sequence< beans::PropertyValue >& aProp
{
try
{
- mxShow = Reference< XSlideShow >( createSlideShow(), UNO_QUERY_THROW );
+ mxShow.set( createSlideShow(), UNO_QUERY_THROW );
mxView = new SlideShowView(
*mpShowWindow,
diff --git a/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx b/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx
index 39ad6efd7962..7a786964c464 100644
--- a/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx
@@ -107,9 +107,7 @@ CacheConfiguration::CacheConfiguration()
return;
// Get the node for the slide sorter preview cache.
- mxCacheNode = Reference<container::XNameAccess>(
- xHierarchy->getByHierarchicalName(sPathToNode),
- UNO_QUERY);
+ mxCacheNode.set( xHierarchy->getByHierarchicalName(sPathToNode), UNO_QUERY);
}
catch (RuntimeException &)
{
diff --git a/sd/source/ui/slidesorter/model/SlideSorterModel.cxx b/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
index 94b1aa8272da..ed77f94f407c 100644
--- a/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
+++ b/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
@@ -446,8 +446,7 @@ void SlideSorterModel::UpdatePageList()
xController->getModel(), UNO_QUERY);
if (xSupplier.is())
{
- xPages = Reference<container::XIndexAccess>(
- xSupplier->getMasterPages(), UNO_QUERY);
+ xPages.set( xSupplier->getMasterPages(), UNO_QUERY);
}
}
break;
@@ -458,8 +457,7 @@ void SlideSorterModel::UpdatePageList()
xController->getModel(), UNO_QUERY);
if (xSupplier.is())
{
- xPages = Reference<container::XIndexAccess>(
- xSupplier->getDrawPages(), UNO_QUERY);
+ xPages.set( xSupplier->getDrawPages(), UNO_QUERY);
}
}
break;
diff --git a/sd/source/ui/slidesorter/shell/SlideSorterService.cxx b/sd/source/ui/slidesorter/shell/SlideSorterService.cxx
index 18137ae6ecf0..e79f8edb8530 100644
--- a/sd/source/ui/slidesorter/shell/SlideSorterService.cxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorterService.cxx
@@ -88,7 +88,7 @@ void SAL_CALL SlideSorterService::initialize (const Sequence<Any>& rArguments)
{
try
{
- mxViewId = Reference<XResourceId>(rArguments[0], UNO_QUERY_THROW);
+ mxViewId.set(rArguments[0], UNO_QUERY_THROW);
// Get the XController.
Reference<frame::XController> xController (rArguments[1], UNO_QUERY_THROW);
@@ -102,7 +102,7 @@ void SAL_CALL SlideSorterService::initialize (const Sequence<Any>& rArguments)
pBase = pController->GetViewShellBase();
// Get the parent window.
- mxParentWindow = Reference<awt::XWindow>(rArguments[2], UNO_QUERY_THROW);
+ mxParentWindow.set(rArguments[2], UNO_QUERY_THROW);
vcl::Window* pParentWindow = VCLUnoHelper::GetWindow(mxParentWindow);
mxParentWindow->addWindowListener(this);
diff --git a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
index 140680136356..188f19b10f40 100644
--- a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
@@ -236,9 +236,7 @@ Reference<drawing::XDrawSubController> SlideSorterViewShell::CreateSubController
if (IsMainViewShell())
{
// Create uno controller for the main view shell.
- xSubController = Reference<drawing::XDrawSubController>(
- new SdUnoSlideView (
- *mpSlideSorter));
+ xSubController.set( new SdUnoSlideView( *mpSlideSorter));
}
return xSubController;
diff --git a/sd/source/ui/table/TableDesignPane.cxx b/sd/source/ui/table/TableDesignPane.cxx
index c29e590c2ca4..c03408ef3d34 100644
--- a/sd/source/ui/table/TableDesignPane.cxx
+++ b/sd/source/ui/table/TableDesignPane.cxx
@@ -122,14 +122,14 @@ TableDesignWidget::TableDesignWidget( VclBuilderContainer* pParent, ViewShellBas
// get current controller and initialize listeners
try
{
- mxView = Reference< XDrawView >::query(mrBase.GetController());
+ mxView.set(mrBase.GetController(), UNO_QUERY);
addListener();
Reference< XController > xController( mrBase.GetController(), UNO_QUERY_THROW );
Reference< XStyleFamiliesSupplier > xFamiliesSupp( xController->getModel(), UNO_QUERY_THROW );
Reference< XNameAccess > xFamilies( xFamiliesSupp->getStyleFamilies() );
const OUString sFamilyName( "table" );
- mxTableFamily = Reference< XIndexAccess >( xFamilies->getByName( sFamilyName ), UNO_QUERY_THROW );
+ mxTableFamily.set( xFamilies->getByName( sFamilyName ), UNO_QUERY_THROW );
}
catch (const Exception&)
{
@@ -289,7 +289,7 @@ void TableDesignWidget::onSelectionChanged()
Reference< XShapeDescriptor > xDesc( aSel, UNO_QUERY );
if( xDesc.is() && ( xDesc->getShapeType() == "com.sun.star.drawing.TableShape" || xDesc->getShapeType() == "com.sun.star.presentation.TableShape" ) )
{
- xNewSelection = Reference< XPropertySet >::query( xDesc );
+ xNewSelection.set( xDesc, UNO_QUERY );
}
}
}
@@ -459,7 +459,7 @@ IMPL_LINK_TYPED(TableDesignWidget,EventMultiplexerListener,
break;
case tools::EventMultiplexerEvent::EID_MAIN_VIEW_ADDED:
- mxView = Reference<XDrawView>::query( mrBase.GetController() );
+ mxView.set( mrBase.GetController(), UNO_QUERY );
onSelectionChanged();
break;
}
diff --git a/sd/source/ui/unoidl/DrawController.cxx b/sd/source/ui/unoidl/DrawController.cxx
index c2f6cedf0526..39a49921c3c9 100644
--- a/sd/source/ui/unoidl/DrawController.cxx
+++ b/sd/source/ui/unoidl/DrawController.cxx
@@ -339,7 +339,7 @@ Reference< drawing::XDrawPage > SAL_CALL DrawController::getCurrentPage()
// When there is not yet a sub controller (during initialization) then fall back
// to the current page in mpCurrentPage.
if ( ! xPage.is() && mpCurrentPage.is())
- xPage = Reference<drawing::XDrawPage>(mpCurrentPage->getUnoPage(), UNO_QUERY);
+ xPage.set(mpCurrentPage->getUnoPage(), UNO_QUERY);
return xPage;
}
@@ -849,7 +849,7 @@ void DrawController::DisposeFrameworkControllers()
if (xComponent.is())
xComponent->dispose();
- xComponent = Reference<XComponent>(mxConfigurationController, UNO_QUERY);
+ xComponent.set(mxConfigurationController, UNO_QUERY);
if (xComponent.is())
xComponent->dispose();
}
diff --git a/sd/source/ui/unoidl/SdUnoDrawView.cxx b/sd/source/ui/unoidl/SdUnoDrawView.cxx
index 0228b5e6e803..1caf0eccdec7 100644
--- a/sd/source/ui/unoidl/SdUnoDrawView.cxx
+++ b/sd/source/ui/unoidl/SdUnoDrawView.cxx
@@ -451,7 +451,7 @@ Reference< drawing::XDrawPage > SAL_CALL SdUnoDrawView::getCurrentPage()
SdrPage* pPage = pPV ? pPV->GetPage() : NULL;
if(pPage)
- xPage = Reference< drawing::XDrawPage >::query( pPage->getUnoPage() );
+ xPage.set( pPage->getUnoPage(), UNO_QUERY );
return xPage;
}
diff --git a/sd/source/ui/unoidl/SdUnoOutlineView.cxx b/sd/source/ui/unoidl/SdUnoOutlineView.cxx
index 6068012cca77..da661fa39983 100644
--- a/sd/source/ui/unoidl/SdUnoOutlineView.cxx
+++ b/sd/source/ui/unoidl/SdUnoOutlineView.cxx
@@ -101,7 +101,7 @@ Reference< drawing::XDrawPage > SAL_CALL SdUnoOutlineView::getCurrentPage()
SdPage* pPage = mrOutlineViewShell.getCurrentPage();
if (pPage != NULL)
- xPage = Reference<drawing::XDrawPage>::query(pPage->getUnoPage());
+ xPage.set(pPage->getUnoPage(), UNO_QUERY);
return xPage;
}
diff --git a/sd/source/ui/unoidl/unolayer.cxx b/sd/source/ui/unoidl/unolayer.cxx
index e887c8f4a6cd..53b40c70be85 100644
--- a/sd/source/ui/unoidl/unolayer.cxx
+++ b/sd/source/ui/unoidl/unolayer.cxx
@@ -764,7 +764,7 @@ uno::Reference<drawing::XLayer> SdLayerManager::GetLayer (SdrLayer* pLayer)
// Search existing xLayer for the given pLayer.
if (mpLayers->findRef (xRef, static_cast<void*>(pLayer), compare_layers))
- xLayer = uno::Reference<drawing::XLayer> (xRef, uno::UNO_QUERY);
+ xLayer.set(xRef, uno::UNO_QUERY);
// Create the xLayer if necessary.
if ( ! xLayer.is())
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 94a655f40f40..e426351e9558 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -332,7 +332,7 @@ const css::uno::Sequence< sal_Int8 > & SdXImpressDocument::getUnoTunnelId() thro
SdXImpressDocument* SdXImpressDocument::getImplementation( const uno::Reference< uno::XInterface >& xInt )
{
- css::uno::Reference< css::lang::XUnoTunnel > xUT( xInt, css::uno::UNO_QUERY );
+ css::uno::Reference< css::lang::XUnoTunnel > xUT( xInt, uno::UNO_QUERY );
if( xUT.is() )
return reinterpret_cast<SdXImpressDocument*>(sal::static_int_cast<sal_IntPtr>(xUT->getSomething( SdXImpressDocument::getUnoTunnelId() )));
else
@@ -623,7 +623,7 @@ uno::Reference < container::XIndexAccess > SAL_CALL SdXImpressDocument::getViewD
if( !rList.empty() )
{
- xRet = uno::Reference< container::XIndexAccess >(document::IndexedPropertyValues::create( ::comphelper::getProcessComponentContext() ), uno::UNO_QUERY);
+ xRet.set(document::IndexedPropertyValues::create( ::comphelper::getProcessComponentContext() ), uno::UNO_QUERY);
uno::Reference < container::XIndexContainer > xCont( xRet, uno::UNO_QUERY );
DBG_ASSERT( xCont.is(), "SdXImpressDocument::getViewData() failed for OLE object" );
@@ -810,7 +810,7 @@ uno::Reference< drawing::XDrawPage > SAL_CALL SdXImpressDocument::getHandoutMast
initializeDocument();
SdPage* pPage = mpDoc->GetMasterSdPage( 0, PK_HANDOUT );
if( pPage )
- xPage = uno::Reference< drawing::XDrawPage >::query( pPage->getUnoPage() );
+ xPage.set( pPage->getUnoPage(), uno::UNO_QUERY );
}
return xPage;
}
@@ -3095,7 +3095,7 @@ uno::Reference< drawing::XDrawPage > SAL_CALL SdMasterPagesAccess::insertNewByIn
pMPage->EnsureMasterPageDefaultBackground();
}
- xDrawPage = uno::Reference< drawing::XDrawPage >::query( pMPage->getUnoPage() );
+ xDrawPage.set( pMPage->getUnoPage(), uno::UNO_QUERY );
// create and insert new notes masterpage
SdPage* pMNotesPage = mpModel->mpDoc->AllocSdPage(true);
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index ac6b7a1935c5..5010430b412a 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -1598,7 +1598,7 @@ Reference< drawing::XShape > SAL_CALL SdGenericDrawPage::combine( const Referenc
{
SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
if( pObj )
- xShape = Reference< drawing::XShape >::query( pObj->getUnoShape() );
+ xShape.set( pObj->getUnoShape(), UNO_QUERY );
}
mpView->HideSdrPage();
@@ -1649,7 +1649,7 @@ Reference< drawing::XShape > SAL_CALL SdGenericDrawPage::bind( const Reference<
{
SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
if( pObj )
- xShape = Reference< drawing::XShape >::query( pObj->getUnoShape() );
+ xShape.set( pObj->getUnoShape(), UNO_QUERY );
}
mpView->HideSdrPage();
@@ -2364,7 +2364,7 @@ Reference< drawing::XDrawPage > SAL_CALL SdDrawPage::getMasterPage( )
if(SvxFmDrawPage::mpPage->TRG_HasMasterPage())
{
SdrPage& rMasterPage = SvxFmDrawPage::mpPage->TRG_GetMasterPage();
- xPage = uno::Reference< drawing::XDrawPage >( rMasterPage.getUnoPage(), uno::UNO_QUERY );
+ xPage.set( rMasterPage.getUnoPage(), uno::UNO_QUERY );
}
return xPage;
@@ -2638,7 +2638,7 @@ SdNavigationOrderAccess::SdNavigationOrderAccess( SdrPage* pPage )
SdrObject* pObj = pPage->GetObj( nIndex );
sal_uInt32 nNavPos = pObj->GetNavigationPosition();
DBG_ASSERT( !maShapes[nNavPos].is(), "sd::SdNavigationOrderAccess::SdNavigationOrderAccess(), duplicate navigation positions from core!" );
- maShapes[nNavPos] = Reference< XShape >( pObj->getUnoShape(), UNO_QUERY );
+ maShapes[nNavPos].set( pObj->getUnoShape(), UNO_QUERY );
}
}
}
diff --git a/sd/source/ui/view/ViewTabBar.cxx b/sd/source/ui/view/ViewTabBar.cxx
index 8e3b344de97a..a7b3372558e3 100644
--- a/sd/source/ui/view/ViewTabBar.cxx
+++ b/sd/source/ui/view/ViewTabBar.cxx
@@ -210,7 +210,7 @@ vcl::Window* ViewTabBar::GetAnchorWindow(
Reference<XConfigurationController> xCC (
xControllerManager->getConfigurationController());
if (xCC.is())
- xPane = Reference<XPane>(xCC->getResource(rxViewTabBarId->getAnchor()), UNO_QUERY);
+ xPane.set(xCC->getResource(rxViewTabBarId->getAnchor()), UNO_QUERY);
}
catch (const RuntimeException&)
{
@@ -351,11 +351,11 @@ bool ViewTabBar::ActivatePage()
Reference<XView> xView;
try
{
- xView = Reference<XView>(xConfigurationController->getResource(
- ResourceId::create(
- ::comphelper::getProcessComponentContext(),
- FrameworkHelper::msCenterPaneURL)),
- UNO_QUERY);
+ xView.set(xConfigurationController->getResource(
+ ResourceId::create(
+ ::comphelper::getProcessComponentContext(),
+ FrameworkHelper::msCenterPaneURL)),
+ UNO_QUERY);
}
catch (const DeploymentException&)
{
diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx
index 3446b8a57b2d..c9f3aa4d7d73 100644
--- a/sd/source/ui/view/drviews3.cxx
+++ b/sd/source/ui/view/drviews3.cxx
@@ -396,9 +396,8 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq)
Reference<XController> xController( xFrame->getController(), UNO_SET_THROW );
// Restore the configuration.
- xControllerManager = Reference<XControllerManager>( xController, UNO_QUERY_THROW);
- xConfigurationController = Reference<XConfigurationController>(
- xControllerManager->getConfigurationController());
+ xControllerManager.set( xController, UNO_QUERY_THROW );
+ xConfigurationController.set( xControllerManager->getConfigurationController() );
if ( ! xConfigurationController.is())
throw RuntimeException();
xConfigurationController->restoreConfiguration(xConfiguration);
diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx
index 0c8d9430538c..444e8bd5bb52 100644
--- a/sd/source/ui/view/drviewsa.cxx
+++ b/sd/source/ui/view/drviewsa.cxx
@@ -337,9 +337,8 @@ void DrawViewShell::Construct(DrawDocShell* pDocSh, PageKind eInitialPageKind)
{
mxScannerManager = scanner::ScannerManager::create( xContext );
- mxScannerListener = uno::Reference< lang::XEventListener >(
- static_cast< ::cppu::OWeakObject* >( new ScannerEventListener( this ) ),
- uno::UNO_QUERY );
+ mxScannerListener.set( static_cast< ::cppu::OWeakObject* >( new ScannerEventListener( this ) ),
+ uno::UNO_QUERY );
}
catch (Exception& exception)
{
@@ -377,10 +376,7 @@ css::uno::Reference<css::drawing::XDrawSubController> DrawViewShell::CreateSubCo
if (IsMainViewShell())
{
// Create uno sub controller for the main view shell.
- xSubController = css::uno::Reference<css::drawing::XDrawSubController>(
- new SdUnoDrawView (
- *this,
- *GetView()));
+ xSubController.set( new SdUnoDrawView( *this, *GetView()));
}
return xSubController;
diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx
index 88d743db6671..fa085c06dd94 100644
--- a/sd/source/ui/view/outlnvsh.cxx
+++ b/sd/source/ui/view/outlnvsh.cxx
@@ -175,9 +175,7 @@ Reference<drawing::XDrawSubController> OutlineViewShell::CreateSubController()
if (IsMainViewShell())
{
// Create uno sub controller for the main view shell.
- xSubController = Reference<drawing::XDrawSubController>(
- new SdUnoOutlineView (
- *this));
+ xSubController.set( new SdUnoOutlineView(*this) );
}
return xSubController;