[Libreoffice-commits] core.git: 2 commits - svx/source sw/qa sw/source
Noel (via logerrit)
logerrit at kemper.freedesktop.org
Mon Feb 15 07:39:20 UTC 2021
svx/source/accessibility/AccessibleTextHelper.cxx | 4 -
svx/source/accessibility/GraphCtlAccessibleContext.cxx | 2
svx/source/accessibility/charmapacc.cxx | 2
svx/source/accessibility/svxpixelctlaccessiblecontext.cxx | 2
svx/source/accessibility/svxrectctaccessiblecontext.cxx | 2
svx/source/dialog/charmap.cxx | 2
svx/source/dialog/dlgctrl.cxx | 4 -
svx/source/dialog/frmsel.cxx | 4 -
svx/source/dialog/graphctl.cxx | 2
svx/source/dialog/weldeditview.cxx | 2
svx/source/form/fmcontrollayout.cxx | 6 -
svx/source/form/fmdocumentclassification.cxx | 2
svx/source/form/fmobj.cxx | 2
svx/source/form/fmscriptingenv.cxx | 4 -
svx/source/form/fmshimp.cxx | 4 -
svx/source/form/fmsrcimp.cxx | 6 -
svx/source/form/fmundo.cxx | 15 ++--
svx/source/form/fmview.cxx | 4 -
svx/source/form/fmvwimp.cxx | 2
svx/source/form/formcontroller.cxx | 6 -
svx/source/form/navigatortree.cxx | 4 -
svx/source/form/navigatortreemodel.cxx | 14 ++--
svx/source/form/tabwin.cxx | 2
svx/source/gallery2/galbrws2.cxx | 2
svx/source/items/drawitem.cxx | 2
svx/source/sdr/primitive2d/sdrdecompositiontools.cxx | 10 +--
svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx | 2
svx/source/svdraw/svdoole2.cxx | 20 ++----
svx/source/table/accessibletableshape.cxx | 9 +-
svx/source/table/cell.cxx | 3
svx/source/table/cellrange.cxx | 2
svx/source/table/propertyset.cxx | 2
svx/source/table/svdotable.cxx | 8 +-
svx/source/table/tablecolumns.cxx | 2
svx/source/table/tablemodel.cxx | 6 -
svx/source/tbxctrls/colrctrl.cxx | 2
svx/source/xml/xmlgrhlp.cxx | 6 -
svx/source/xml/xmlxtimp.cxx | 12 +--
sw/qa/core/frmedt/frmedt.cxx | 2
sw/qa/extras/uiwriter/uiwriter.cxx | 2
sw/qa/extras/uiwriter/uiwriter2.cxx | 2
sw/qa/extras/uiwriter/uiwriter3.cxx | 44 +++++++-------
sw/qa/extras/unowriter/unowriter.cxx | 2
sw/qa/uibase/dochdl/dochdl.cxx | 2
sw/qa/unit/swmodeltestbase.cxx | 2
sw/source/core/access/acccontext.cxx | 2
sw/source/core/access/accmap.cxx | 6 -
sw/source/core/fields/docufld.cxx | 2
sw/source/core/ole/ndole.cxx | 6 -
sw/source/core/unocore/unofield.cxx | 2
sw/source/core/unocore/unotbl.cxx | 6 -
sw/source/filter/ww8/docxattributeoutput.cxx | 6 -
sw/source/filter/xml/XMLRedlineImportHelper.cxx | 2
sw/source/filter/xml/xmlexp.cxx | 4 -
sw/source/filter/xml/xmlfmt.cxx | 4 -
sw/source/filter/xml/xmlimp.cxx | 5 -
sw/source/filter/xml/xmlitem.cxx | 2
sw/source/filter/xml/xmltbli.cxx | 2
sw/source/ui/dbui/dbtablepreviewdialog.cxx | 2
sw/source/ui/vba/vbadocument.cxx | 2
sw/source/uibase/app/docshdrw.cxx | 2
sw/source/uibase/dbui/dbmgr.cxx | 8 +-
sw/source/uibase/docvw/srcedtw.cxx | 4 -
63 files changed, 151 insertions(+), 157 deletions(-)
New commits:
commit 948c29710a0bb168ec07e3aca510fa6860f2da52
Author: Noel <noel.grandin at collabora.co.uk>
AuthorDate: Fri Feb 12 15:36:24 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Feb 15 08:38:42 2021 +0100
loplugin:referencecasting in svx
Change-Id: I072ba9da976cefd61f4a916e70b0601439e8a123
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110818
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/svx/source/accessibility/AccessibleTextHelper.cxx b/svx/source/accessibility/AccessibleTextHelper.cxx
index f11ce49b3beb..f8ff9013e929 100644
--- a/svx/source/accessibility/AccessibleTextHelper.cxx
+++ b/svx/source/accessibility/AccessibleTextHelper.cxx
@@ -855,7 +855,7 @@ namespace accessibility
auto aHardRef( rPara.first.get() );
if( aHardRef.is() )
- mrImpl.FireEvent(AccessibleEventId::CHILD, uno::Any(), uno::makeAny<css::uno::Reference<css::accessibility::XAccessible>>(aHardRef.get()) );
+ mrImpl.FireEvent(AccessibleEventId::CHILD, uno::Any(), uno::makeAny<css::uno::Reference<css::accessibility::XAccessible>>(aHardRef) );
}
private:
@@ -1084,7 +1084,7 @@ namespace accessibility
// #i61812# remember para to be removed for later notification
// AFTER the new state is applied (that after the para got removed)
- ::uno::Reference< XAccessible > xPara(begin->first.get().get());
+ ::uno::Reference< XAccessible > xPara(begin->first.get());
// release everything from the remove position until the end
maParaManager.Release(aFunctor.GetParaIndex(), nCurrParas);
diff --git a/svx/source/accessibility/GraphCtlAccessibleContext.cxx b/svx/source/accessibility/GraphCtlAccessibleContext.cxx
index 5eb01420269f..5553b4ae8fa3 100644
--- a/svx/source/accessibility/GraphCtlAccessibleContext.cxx
+++ b/svx/source/accessibility/GraphCtlAccessibleContext.cxx
@@ -673,7 +673,7 @@ void SAL_CALL SvxGraphCtrlAccessibleContext::disposing()
{
for (const auto& rEntry : mxShapes)
{
- rtl::Reference<XAccessible> pAcc(rEntry.second.get());
+ rtl::Reference<XAccessible> pAcc(rEntry.second);
Reference< XComponent > xComp( pAcc.get(), UNO_QUERY );
if( xComp.is() )
xComp->dispose();
diff --git a/svx/source/accessibility/charmapacc.cxx b/svx/source/accessibility/charmapacc.cxx
index c2863a997b60..2325a4cede21 100644
--- a/svx/source/accessibility/charmapacc.cxx
+++ b/svx/source/accessibility/charmapacc.cxx
@@ -63,7 +63,7 @@ uno::Reference< css::accessibility::XAccessible > SvxShowCharSetItem::GetAccessi
m_xItem = new SvxShowCharSetItemAcc( this );
}
- return m_xItem.get();
+ return m_xItem;
}
SvxShowCharSetAcc::SvxShowCharSetAcc(SvxShowCharSet* pParent)
diff --git a/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx b/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx
index aedb8d297bac..813efa3a5a30 100644
--- a/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx
+++ b/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx
@@ -381,7 +381,7 @@ uno::Reference< XAccessible > SAL_CALL SvxPixelCtlAccessibleChild::getAccessible
uno::Reference< XAccessible > SAL_CALL SvxPixelCtlAccessibleChild::getAccessibleParent()
{
- return mxParent.get();
+ return mxParent;
}
sal_Int16 SAL_CALL SvxPixelCtlAccessibleChild::getAccessibleRole()
diff --git a/svx/source/accessibility/svxrectctaccessiblecontext.cxx b/svx/source/accessibility/svxrectctaccessiblecontext.cxx
index d400ea955b0c..0e1c8150063e 100644
--- a/svx/source/accessibility/svxrectctaccessiblecontext.cxx
+++ b/svx/source/accessibility/svxrectctaccessiblecontext.cxx
@@ -141,7 +141,7 @@ Reference< XAccessible > SAL_CALL SvxRectCtlAccessibleContext::getAccessibleChil
{
checkChildIndex( nIndex );
- Reference< XAccessible > xChild(mvChildren[ nIndex ].get());
+ Reference< XAccessible > xChild(mvChildren[ nIndex ]);
if( !xChild.is() )
{
::SolarMutexGuard aSolarGuard;
diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx
index a8328fc137b5..a96e404353d1 100644
--- a/svx/source/dialog/charmap.cxx
+++ b/svx/source/dialog/charmap.cxx
@@ -811,7 +811,7 @@ css::uno::Reference< XAccessible > SvxShowCharSet::CreateAccessible()
{
OSL_ENSURE(!m_xAccessible.is(),"Accessible already created!");
m_xAccessible = new svx::SvxShowCharSetAcc(this);
- return m_xAccessible.get();
+ return m_xAccessible;
}
svx::SvxShowCharSetItem* SvxShowCharSet::ImplGetItem( int _nPos )
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index bd562618d09b..bf5ca03e7747 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -553,7 +553,7 @@ tools::Rectangle SvxRectCtl::CalculateFocusRectangle( RectPoint eRectPoint ) con
Reference< XAccessible > SvxRectCtl::CreateAccessible()
{
pAccContext = new SvxRectCtlAccessibleContext(this);
- return pAccContext.get();
+ return pAccContext;
}
RectPoint SvxRectCtl::GetApproxRPFromPixPt( const css::awt::Point& r ) const
@@ -574,7 +574,7 @@ css::uno::Reference< css::accessibility::XAccessible > SvxPixelCtl::CreateAccess
{
if (!m_xAccess.is())
m_xAccess = new SvxPixelCtlAccessible(this);
- return m_xAccess.get();
+ return m_xAccess;
}
tools::Long SvxPixelCtl::PointToIndex(const Point &aPt) const
diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx
index 09a72b3b9918..696a05d39964 100644
--- a/svx/source/dialog/frmsel.cxx
+++ b/svx/source/dialog/frmsel.cxx
@@ -1027,7 +1027,7 @@ Reference< XAccessible > FrameSelector::CreateAccessible()
{
if( !mxAccess.is() )
mxAccess = new a11y::AccFrameSelector(*this);
- return mxAccess.get();
+ return mxAccess;
}
rtl::Reference< a11y::AccFrameSelectorChild > FrameSelector::GetChildAccessible( FrameBorderType eBorder )
@@ -1046,7 +1046,7 @@ rtl::Reference< a11y::AccFrameSelectorChild > FrameSelector::GetChildAccessible(
Reference< XAccessible > FrameSelector::GetChildAccessible( sal_Int32 nIndex )
{
- return GetChildAccessible( GetEnabledBorderType( nIndex ) ).get();
+ return GetChildAccessible( GetEnabledBorderType( nIndex ) );
}
Reference< XAccessible > FrameSelector::GetChildAccessible( const Point& rPos )
diff --git a/svx/source/dialog/graphctl.cxx b/svx/source/dialog/graphctl.cxx
index 05a02788d246..4f1ad5049deb 100644
--- a/svx/source/dialog/graphctl.cxx
+++ b/svx/source/dialog/graphctl.cxx
@@ -835,7 +835,7 @@ css::uno::Reference< css::accessibility::XAccessible > GraphCtrl::CreateAccessib
if (pView && pModel)
mpAccContext = new SvxGraphCtrlAccessibleContext(*this);
}
- return mpAccContext.get();
+ return mpAccContext;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/dialog/weldeditview.cxx b/svx/source/dialog/weldeditview.cxx
index 376b4cfba9e2..59a4898e2be5 100644
--- a/svx/source/dialog/weldeditview.cxx
+++ b/svx/source/dialog/weldeditview.cxx
@@ -761,7 +761,7 @@ css::uno::Reference<css::accessibility::XAccessible> WeldEditView::CreateAccessi
{
if (!m_xAccessible.is())
m_xAccessible.set(new WeldEditAccessible(this));
- return css::uno::Reference<css::accessibility::XAccessible>(m_xAccessible.get());
+ return m_xAccessible;
}
WeldEditView::~WeldEditView()
diff --git a/svx/source/form/fmcontrollayout.cxx b/svx/source/form/fmcontrollayout.cxx
index 154ffa0bce2f..5acd501a4fda 100644
--- a/svx/source/form/fmcontrollayout.cxx
+++ b/svx/source/form/fmcontrollayout.cxx
@@ -203,12 +203,12 @@ namespace svxform
Reference< XPropertySet > ControlLayouter::getDefaultDocumentTextStyle( const Reference< XPropertySet >& _rxModel )
{
// the style family collection
- Reference< XStyleFamiliesSupplier > xSuppStyleFamilies( getTypedModelNode< XStyleFamiliesSupplier >( _rxModel.get() ), UNO_SET_THROW );
+ Reference< XStyleFamiliesSupplier > xSuppStyleFamilies( getTypedModelNode< XStyleFamiliesSupplier >( _rxModel ), UNO_SET_THROW );
Reference< XNameAccess > xStyleFamilies( xSuppStyleFamilies->getStyleFamilies(), UNO_SET_THROW );
// the names of the family, and the style - depends on the document type we live in
OUString sFamilyName, sStyleName;
- if ( !lcl_getDocumentDefaultStyleAndFamily( xSuppStyleFamilies.get(), sFamilyName, sStyleName ) )
+ if ( !lcl_getDocumentDefaultStyleAndFamily( xSuppStyleFamilies, sFamilyName, sStyleName ) )
throw RuntimeException("unknown document type!");
// the concrete style
@@ -233,7 +233,7 @@ namespace svxform
// the document type
if ( _eDocType == eUnknownDocumentType )
- _eDocType = DocumentClassification::classifyHostDocument( _rxControlModel.get() );
+ _eDocType = DocumentClassification::classifyHostDocument( _rxControlModel );
// let's see what the configuration says about the visual effect
OConfigurationNode aConfig = getLayoutSettings( _eDocType );
diff --git a/svx/source/form/fmdocumentclassification.cxx b/svx/source/form/fmdocumentclassification.cxx
index 43e485d3cd9a..3b2f97c9150e 100644
--- a/svx/source/form/fmdocumentclassification.cxx
+++ b/svx/source/form/fmdocumentclassification.cxx
@@ -150,7 +150,7 @@ namespace svxform
try
{
- Reference< XModel > xDocument( getDocument( _rxFormComponent.get() ) );
+ Reference< XModel > xDocument( getDocument( _rxFormComponent ) );
if ( !xDocument.is() )
return eUnknownDocumentType;
eType = classifyDocument( xDocument );
diff --git a/svx/source/form/fmobj.cxx b/svx/source/form/fmobj.cxx
index 620599a25f0d..bd2d6186914a 100644
--- a/svx/source/form/fmobj.cxx
+++ b/svx/source/form/fmobj.cxx
@@ -186,7 +186,7 @@ void FmFormObj::impl_isolateControlModel_nothrow()
Reference< XIndexContainer> xParent( xControlModel->getParent(), UNO_QUERY );
if ( xParent.is() )
{
- sal_Int32 nPos = getElementPos( xParent.get(), xControlModel );
+ sal_Int32 nPos = getElementPos( xParent, xControlModel );
xParent->removeByIndex( nPos );
}
}
diff --git a/svx/source/form/fmscriptingenv.cxx b/svx/source/form/fmscriptingenv.cxx
index c1376df08f38..73ad3f83eceb 100644
--- a/svx/source/form/fmscriptingenv.cxx
+++ b/svx/source/form/fmscriptingenv.cxx
@@ -770,9 +770,9 @@ namespace svxform
try
{
if ( _bRegister )
- _rxManager->addScriptListener( m_pScriptListener.get() );
+ _rxManager->addScriptListener( m_pScriptListener );
else
- _rxManager->removeScriptListener( m_pScriptListener.get() );
+ _rxManager->removeScriptListener( m_pScriptListener );
}
catch( const RuntimeException& ) { throw; }
catch( const Exception& )
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index 96f10415d48b..e0986c8ef0b0 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -1852,7 +1852,7 @@ void FmXFormShell::setActiveController_Lock(const Reference<runtime::XFormContro
}
else if ( bResult && bIsNew )
{
- Reference< XResultSet > xCursor( m_aActiveControllerFeatures->getCursor().get() );
+ Reference< XResultSet > xCursor( m_aActiveControllerFeatures->getCursor() );
if ( xCursor.is() )
{
DO_SAFE( xCursor->last(); );
@@ -3738,7 +3738,7 @@ namespace
try
{
Reference< XConnection > xConn;
- if ( isEmbeddedInDatabase( _rxLoadable.get(), xConn ) )
+ if ( isEmbeddedInDatabase( _rxLoadable, xConn ) )
return true;
// is there already an active connection
diff --git a/svx/source/form/fmsrcimp.cxx b/svx/source/form/fmsrcimp.cxx
index b868e5069cb4..60613663eda5 100644
--- a/svx/source/form/fmsrcimp.cxx
+++ b/svx/source/form/fmsrcimp.cxx
@@ -135,7 +135,7 @@ void FmRecordCountListener::propertyChange(const css::beans::PropertyChangeEven
// FmSearchEngine - local classes
SimpleTextWrapper::SimpleTextWrapper(const Reference< css::awt::XTextComponent > & _xText)
- :ControlTextWrapper(_xText.get())
+ :ControlTextWrapper(_xText)
,m_xText(_xText)
{
DBG_ASSERT(m_xText.is(), "FmSearchEngine::SimpleTextWrapper::SimpleTextWrapper : invalid argument !");
@@ -149,7 +149,7 @@ OUString SimpleTextWrapper::getCurrentText() const
ListBoxWrapper::ListBoxWrapper(const Reference< css::awt::XListBox > & _xBox)
- :ControlTextWrapper(_xBox.get())
+ :ControlTextWrapper(_xBox)
,m_xBox(_xBox)
{
DBG_ASSERT(m_xBox.is(), "FmSearchEngine::ListBoxWrapper::ListBoxWrapper : invalid argument !");
@@ -163,7 +163,7 @@ OUString ListBoxWrapper::getCurrentText() const
CheckBoxWrapper::CheckBoxWrapper(const Reference< css::awt::XCheckBox > & _xBox)
- :ControlTextWrapper(_xBox.get())
+ :ControlTextWrapper(_xBox)
,m_xBox(_xBox)
{
DBG_ASSERT(m_xBox.is(), "FmSearchEngine::CheckBoxWrapper::CheckBoxWrapper : invalid argument !");
diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx
index 2cd568898a6c..6838066736b1 100644
--- a/svx/source/form/fmundo.cxx
+++ b/svx/source/form/fmundo.cxx
@@ -210,7 +210,7 @@ void FmXUndoEnvironment::dispose()
FmFormPage* pPage = dynamic_cast<FmFormPage*>( rModel.GetPage(i) );
if ( pPage )
{
- Reference< css::form::XForms > xForms = pPage->GetForms( false ).get();
+ Reference< css::form::XForms > xForms = pPage->GetForms( false );
if ( xForms.is() )
RemoveElement( xForms );
}
@@ -222,7 +222,7 @@ void FmXUndoEnvironment::dispose()
FmFormPage* pPage = dynamic_cast<FmFormPage*>( rModel.GetMasterPage(i) );
if ( pPage )
{
- Reference< css::form::XForms > xForms = pPage->GetForms( false ).get();
+ Reference< css::form::XForms > xForms = pPage->GetForms( false );
if ( xForms.is() )
RemoveElement( xForms );
}
@@ -261,7 +261,7 @@ void FmXUndoEnvironment::ModeChanged()
FmFormPage* pPage = dynamic_cast<FmFormPage*>( rModel.GetPage(i) );
if ( pPage )
{
- Reference< css::form::XForms > xForms = pPage->GetForms( false ).get();
+ Reference< css::form::XForms > xForms = pPage->GetForms( false );
if ( xForms.is() )
TogglePropertyListening( xForms );
}
@@ -273,7 +273,7 @@ void FmXUndoEnvironment::ModeChanged()
FmFormPage* pPage = dynamic_cast<FmFormPage*>( rModel.GetMasterPage(i) );
if ( pPage )
{
- Reference< css::form::XForms > xForms = pPage->GetForms( false ).get();
+ Reference< css::form::XForms > xForms = pPage->GetForms( false );
if ( xForms.is() )
TogglePropertyListening( xForms );
}
@@ -485,9 +485,8 @@ void FmXUndoEnvironment::Removed(FmFormObj* pObj)
if (!xForm.is())
return;
- Reference< XIndexAccess > xIndexAccess(xForm.get());
// determine which position the child was at
- const sal_Int32 nPos = getElementPos(xIndexAccess, xContent);
+ const sal_Int32 nPos = getElementPos(xForm, xContent);
if (nPos < 0)
return;
@@ -1094,7 +1093,7 @@ void FmUndoContainerAction::implReInsert( )
}
m_xContainer->insertByIndex( m_nIndex, aVal );
- OSL_ENSURE( getElementPos( m_xContainer.get(), m_xElement ) == m_nIndex, "FmUndoContainerAction::implReInsert: insertion did not work!" );
+ OSL_ENSURE( getElementPos( m_xContainer, m_xElement ) == m_nIndex, "FmUndoContainerAction::implReInsert: insertion did not work!" );
// register the events
Reference< XEventAttacherManager > xManager( m_xContainer, UNO_QUERY );
@@ -1116,7 +1115,7 @@ void FmUndoContainerAction::implReRemove( )
{
// the indexes in the container changed. Okay, so go the long way and
// manually determine the index
- m_nIndex = getElementPos( m_xContainer.get(), m_xElement );
+ m_nIndex = getElementPos( m_xContainer, m_xElement );
if ( m_nIndex != -1 )
xElement = m_xElement;
}
diff --git a/svx/source/form/fmview.cxx b/svx/source/form/fmview.cxx
index 34e3f228cbb4..b8a0ed479719 100644
--- a/svx/source/form/fmview.cxx
+++ b/svx/source/form/fmview.cxx
@@ -141,7 +141,7 @@ void FmFormView::MarkListHasChanged()
pImpl->m_pMarkedGrid = nullptr;
if ( pImpl->m_xWindow.is() )
{
- pImpl->m_xWindow->removeFocusListener(pImpl.get());
+ pImpl->m_xWindow->removeFocusListener(pImpl);
pImpl->m_xWindow = nullptr;
}
SetMoveOutside(false);
@@ -472,7 +472,7 @@ bool FmFormView::KeyInput(const KeyEvent& rKEvt, vcl::Window* pWin)
pImpl->m_pMarkedGrid = pObj;
pImpl->m_xWindow = xWindow;
// add as listener to get notified when ESC will be pressed inside the grid
- pImpl->m_xWindow->addFocusListener(pImpl.get());
+ pImpl->m_xWindow->addFocusListener(pImpl);
SetMoveOutside(true);
//OLMRefreshAllIAOManagers();
xWindow->setFocus();
diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx
index f197548cad70..4bc1c96fb13c 100644
--- a/svx/source/form/fmvwimp.cxx
+++ b/svx/source/form/fmvwimp.cxx
@@ -356,7 +356,7 @@ void FormViewPageWindowAdapter::updateTabOrder( const Reference< XForm >& _rxFor
try
{
- Reference< XTabController > xTabCtrl( getController( _rxForm ).get() );
+ Reference< XTabController > xTabCtrl( getController( _rxForm ) );
if ( xTabCtrl.is() )
{ // if there already is a TabController for this form, then delegate the "updateTabOrder" request
xTabCtrl->activateTabOrder();
diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx
index c05b272b94e8..5e2d36c61fb2 100644
--- a/svx/source/form/formcontroller.cxx
+++ b/svx/source/form/formcontroller.cxx
@@ -1259,7 +1259,7 @@ void SAL_CALL FormController::propertyChange(const PropertyChangeEvent& evt)
{
m_aControlBorderManager.enableDynamicBorderColor();
if ( m_xActiveControl.is() )
- m_aControlBorderManager.focusGained( m_xActiveControl.get() );
+ m_aControlBorderManager.focusGained( m_xActiveControl );
}
else
{
@@ -1863,7 +1863,7 @@ void FormController::setModel(const Reference< XTabControllerModel > & Model)
)
{
bool bEnableDynamicControlBorder = lcl_shouldUseDynamicControlBorder(
- xModelProps.get(), xModelProps->getPropertyValue( FM_PROP_DYNAMIC_CONTROL_BORDER ) );
+ xModelProps, xModelProps->getPropertyValue( FM_PROP_DYNAMIC_CONTROL_BORDER ) );
if ( bEnableDynamicControlBorder )
m_aControlBorderManager.enableDynamicBorderColor();
else
@@ -4110,7 +4110,7 @@ Reference< XDispatchProviderInterceptor > FormController::createInterceptor(con
rtl::Reference<DispatchInterceptionMultiplexer> pInterceptor(new DispatchInterceptionMultiplexer( _xInterception, this ));
m_aControlDispatchInterceptors.push_back( pInterceptor );
- return pInterceptor.get();
+ return pInterceptor;
}
diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx
index bc9302f41cd5..5cde1645f4cf 100644
--- a/svx/source/form/navigatortree.cxx
+++ b/svx/source/form/navigatortree.cxx
@@ -1510,7 +1510,7 @@ namespace svxform
{
const std::unique_ptr<weld::TreeIter>& rIter = *it;
FmFormData* pFormData = reinterpret_cast<FmFormData*>(m_xTreeView->get_id(*rIter).toInt64());
- aSelection.insert( pFormData->GetPropertySet().get() );
+ aSelection.insert( pFormData->GetPropertySet() );
++it;
}
}
@@ -1523,7 +1523,7 @@ namespace svxform
{
const std::unique_ptr<weld::TreeIter>& rIter = *it;
FmEntryData* pEntryData = reinterpret_cast<FmEntryData*>(m_xTreeView->get_id(*rIter).toInt64());
- aSelection.insert( pEntryData->GetPropertySet().get() );
+ aSelection.insert( pEntryData->GetPropertySet() );
++it;
}
}
diff --git a/svx/source/form/navigatortreemodel.cxx b/svx/source/form/navigatortreemodel.cxx
index 5b2a1ce3fd79..c8d5326cae1d 100644
--- a/svx/source/form/navigatortreemodel.cxx
+++ b/svx/source/form/navigatortreemodel.cxx
@@ -227,7 +227,7 @@ namespace svxform
{
Reference< css::form::XForms > xForms( GetForms());
if(xForms.is())
- xForms->removeContainerListener(m_pPropChangeList.get());
+ xForms->removeContainerListener(m_pPropChangeList);
// delete RootList
@@ -320,7 +320,7 @@ namespace svxform
// register as PropertyChangeListener
Reference< XPropertySet > xSet(xElement, UNO_QUERY);
if( xSet.is() )
- xSet->addPropertyChangeListener( FM_PROP_NAME, m_pPropChangeList.get() );
+ xSet->addPropertyChangeListener( FM_PROP_NAME, m_pPropChangeList );
// Remove data from model
@@ -328,7 +328,7 @@ namespace svxform
{
Reference< XContainer > xContainer(xElement, UNO_QUERY);
if (xContainer.is())
- xContainer->addContainerListener(m_pPropChangeList.get());
+ xContainer->addContainerListener(m_pPropChangeList);
}
if (pFolder)
@@ -389,7 +389,7 @@ namespace svxform
{
Reference< XIndexContainer > xContainer(xElement->getParent(), UNO_QUERY);
// remove from Container
- sal_Int32 nContainerIndex = getElementPos(xContainer.get(), xElement);
+ sal_Int32 nContainerIndex = getElementPos(xContainer, xElement);
// UndoAction
if (nContainerIndex >= 0)
{
@@ -461,7 +461,7 @@ namespace svxform
// unregister as PropertyChangeListener
Reference< XPropertySet > xSet( pFormData->GetPropertySet() );
if ( xSet.is() )
- xSet->removePropertyChangeListener( FM_PROP_NAME, m_pPropChangeList.get() );
+ xSet->removePropertyChangeListener( FM_PROP_NAME, m_pPropChangeList );
}
@@ -476,7 +476,7 @@ namespace svxform
// unregister as PropertyChangeListener
Reference< XPropertySet > xSet( pControlData->GetPropertySet() );
if (xSet.is())
- xSet->removePropertyChangeListener( FM_PROP_NAME, m_pPropChangeList.get());
+ xSet->removePropertyChangeListener( FM_PROP_NAME, m_pPropChangeList);
}
@@ -804,7 +804,7 @@ namespace svxform
if (!xForms.is())
return;
- xForms->addContainerListener(m_pPropChangeList.get());
+ xForms->addContainerListener(m_pPropChangeList);
FillBranch(nullptr);
diff --git a/svx/source/form/tabwin.cxx b/svx/source/form/tabwin.cxx
index c237410bdd1f..811fc8ea01a8 100644
--- a/svx/source/form/tabwin.cxx
+++ b/svx/source/form/tabwin.cxx
@@ -122,7 +122,7 @@ FmFieldWin::FmFieldWin(SfxBindings* _pBindings, SfxChildWindow* _pMgr, weld::Win
m_xHelper.set(new OColumnTransferable(
ColumnTransferFormatFlags::FIELD_DESCRIPTOR | ColumnTransferFormatFlags::CONTROL_EXCHANGE | ColumnTransferFormatFlags::COLUMN_DESCRIPTOR
));
- rtl::Reference<TransferDataContainer> xHelper(m_xHelper.get());
+ rtl::Reference<TransferDataContainer> xHelper(m_xHelper);
m_xListBox->enable_drag_source(xHelper, DND_ACTION_COPY);
m_xListBox->connect_drag_begin(LINK(this, FmFieldWin, DragBeginHdl));
diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx
index 53a80f81bc16..ff100ee2ef95 100644
--- a/svx/source/gallery2/galbrws2.cxx
+++ b/svx/source/gallery2/galbrws2.cxx
@@ -608,7 +608,7 @@ void GalleryBrowser2::SelectTheme( std::u16string_view rThemeName )
mpCurTheme = mpGallery->AcquireTheme( rThemeName, *this );
m_xHelper.set(new GalleryTransferable(mpCurTheme, 0, true));
- rtl::Reference<TransferDataContainer> xHelper(m_xHelper.get());
+ rtl::Reference<TransferDataContainer> xHelper(m_xHelper);
mxListView->enable_drag_source(xHelper, DND_ACTION_COPY | DND_ACTION_LINK);
mxIconView->SetDragDataTransferrable(xHelper, DND_ACTION_COPY | DND_ACTION_LINK);
mxPreview->SetDragDataTransferrable(xHelper, DND_ACTION_COPY | DND_ACTION_LINK);
diff --git a/svx/source/items/drawitem.cxx b/svx/source/items/drawitem.cxx
index da37496955b8..69482d56ff2d 100644
--- a/svx/source/items/drawitem.cxx
+++ b/svx/source/items/drawitem.cxx
@@ -76,7 +76,7 @@ SvxColorListItem* SvxColorListItem::Clone( SfxItemPool * ) const
#define QUERY_PUT_IMPL(svtype, xtype) \
bool svtype::QueryValue( css::uno::Any& rVal, sal_uInt8 ) const \
{ \
- rVal <<= uno::Reference< uno::XWeak >( p##xtype.get() ); \
+ rVal <<= uno::Reference< uno::XWeak >( p##xtype ); \
return true; \
} \
\
diff --git a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
index ad8814a974f0..e1bd4d2a026a 100644
--- a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
+++ b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
@@ -374,7 +374,7 @@ namespace drawinglayer::primitive2d
if(0.0 != aAnimationList.getDuration())
{
// create content sequence
- const Primitive2DReference xRefA(pNew.get());
+ const Primitive2DReference xRefA(pNew);
const Primitive2DContainer aContent { xRefA };
// create and add animated switch primitive
@@ -383,7 +383,7 @@ namespace drawinglayer::primitive2d
else
{
// add to decomposition
- return Primitive2DReference(pNew.get());
+ return Primitive2DReference(pNew);
}
}
@@ -482,7 +482,7 @@ namespace drawinglayer::primitive2d
else
{
// add to decomposition
- return Primitive2DReference(pNew.get());
+ return Primitive2DReference(pNew);
}
}
}
@@ -492,7 +492,7 @@ namespace drawinglayer::primitive2d
// #i97628#
// encapsulate with TextHierarchyEditPrimitive2D to allow renderers
// to suppress actively edited content if needed
- const Primitive2DReference xRefA(pNew.get());
+ const Primitive2DReference xRefA(pNew);
const Primitive2DContainer aContent { xRefA };
// create and add TextHierarchyEditPrimitive2D primitive
@@ -501,7 +501,7 @@ namespace drawinglayer::primitive2d
else
{
// add to decomposition
- return pNew.get();
+ return pNew;
}
}
diff --git a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx
index aa9ca030fe41..894b9a941ceb 100644
--- a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx
@@ -418,7 +418,7 @@ namespace drawinglayer::primitive2d
xBlockText.clear();
// add to local primitives
- aRetval.push_back(pNewBlockText.get());
+ aRetval.push_back(pNewBlockText);
}
// add shadow
diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx
index 78bb0c1ce250..3e11292b40f1 100644
--- a/svx/source/svdraw/svdoole2.cxx
+++ b/svx/source/svdraw/svdoole2.cxx
@@ -1036,8 +1036,8 @@ void SdrOle2Obj::Connect_Impl()
if ( !mpImpl->mxLightClient.is() )
mpImpl->mxLightClient = new SdrLightEmbeddedClient_Impl( this );
- mpImpl->mxObjRef->addStateChangeListener( mpImpl->mxLightClient.get() );
- mpImpl->mxObjRef->addEventListener( uno::Reference< document::XEventListener >( mpImpl->mxLightClient.get() ) );
+ mpImpl->mxObjRef->addStateChangeListener( mpImpl->mxLightClient );
+ mpImpl->mxObjRef->addEventListener( mpImpl->mxLightClient );
if ( mpImpl->mxObjRef->getCurrentState() != embed::EmbedStates::LOADED )
GetSdrGlobalData().GetOLEObjCache().InsertObj(this);
@@ -1079,8 +1079,7 @@ void SdrOle2Obj::AddListeners_Impl()
uno::Reference< util::XModifyBroadcaster > xBC( getXModel(), uno::UNO_QUERY );
if (xBC.is())
{
- uno::Reference<util::XModifyListener> xListener(mpImpl->mxModifyListener.get());
- xBC->addModifyListener( xListener );
+ xBC->addModifyListener( mpImpl->mxModifyListener );
}
}
@@ -1112,8 +1111,7 @@ void SdrOle2Obj::RemoveListeners_Impl()
uno::Reference< util::XModifyBroadcaster > xBC( getXModel(), uno::UNO_QUERY );
if (xBC.is() && mpImpl->mxModifyListener.is())
{
- uno::Reference<util::XModifyListener> xListener(mpImpl->mxModifyListener.get());
- xBC->removeModifyListener( xListener );
+ xBC->removeModifyListener( mpImpl->mxModifyListener );
}
}
}
@@ -1186,8 +1184,8 @@ void SdrOle2Obj::Disconnect_Impl()
if ( mpImpl->mxObjRef.is() && mpImpl->mxLightClient.is() )
{
- mpImpl->mxObjRef->removeStateChangeListener ( mpImpl->mxLightClient.get() );
- mpImpl->mxObjRef->removeEventListener( uno::Reference< document::XEventListener >( mpImpl->mxLightClient.get() ) );
+ mpImpl->mxObjRef->removeStateChangeListener ( mpImpl->mxLightClient );
+ mpImpl->mxObjRef->removeEventListener( mpImpl->mxLightClient );
mpImpl->mxObjRef->setClientSite( nullptr );
GetSdrGlobalData().GetOLEObjCache().RemoveObj(this);
@@ -1442,7 +1440,7 @@ void SdrOle2Obj::ImpSetVisAreaSize()
mpImpl->mxObjRef.GetObject()));
const bool bHasOwnClient(
mpImpl->mxLightClient.is() &&
- mpImpl->mxObjRef->getClientSite() == uno::Reference< embed::XEmbeddedClient >( mpImpl->mxLightClient.get() ) );
+ mpImpl->mxObjRef->getClientSite() == uno::Reference< embed::XEmbeddedClient >( mpImpl->mxLightClient ) );
if ( pClient || bHasOwnClient )
{
@@ -1886,7 +1884,7 @@ bool SdrOle2Obj::AddOwnLightClient()
{
// The Own Light Client must be registered in object only using this method!
if ( !SfxInPlaceClient::GetClient( dynamic_cast<SfxObjectShell*>(getSdrModelFromSdrObject().GetPersist()), mpImpl->mxObjRef.GetObject() )
- && !( mpImpl->mxLightClient.is() && mpImpl->mxObjRef->getClientSite() == uno::Reference< embed::XEmbeddedClient >( mpImpl->mxLightClient.get() ) ) )
+ && !( mpImpl->mxLightClient.is() && mpImpl->mxObjRef->getClientSite() == uno::Reference< embed::XEmbeddedClient >( mpImpl->mxLightClient ) ) )
{
Connect();
@@ -1899,7 +1897,7 @@ bool SdrOle2Obj::AddOwnLightClient()
{
mpImpl->mxLightClient->SetSizeScale( aScaleWidth, aScaleHeight );
try {
- mpImpl->mxObjRef->setClientSite( mpImpl->mxLightClient.get() );
+ mpImpl->mxObjRef->setClientSite( mpImpl->mxLightClient );
return true;
} catch( uno::Exception& )
{}
diff --git a/svx/source/table/accessibletableshape.cxx b/svx/source/table/accessibletableshape.cxx
index 3b65874b7a73..248fbcdc534b 100644
--- a/svx/source/table/accessibletableshape.cxx
+++ b/svx/source/table/accessibletableshape.cxx
@@ -143,7 +143,7 @@ rtl::Reference< AccessibleCell > AccessibleTableShapeImpl::getAccessibleCell (co
if( iter != maChildMap.end() )
{
- rtl::Reference< AccessibleCell > xChild( (*iter).second.get() );
+ rtl::Reference< AccessibleCell > xChild( (*iter).second );
return xChild;
}
return rtl::Reference< AccessibleCell >();
@@ -164,7 +164,7 @@ rtl::Reference< AccessibleCell > AccessibleTableShapeImpl::getAccessibleCell (sa
xAccessibleCell->Init();
maChildMap[xCell] = xAccessibleCell;
- xChild = rtl::Reference< AccessibleCell >( xAccessibleCell.get() );
+ xChild = xAccessibleCell;
}
return xChild;
}
@@ -180,7 +180,7 @@ Reference< XAccessible > AccessibleTableShapeImpl::getAccessibleChild(sal_Int32
if( iter != maChildMap.end() )
{
- Reference< XAccessible > xChild( (*iter).second.get() );
+ Reference< XAccessible > xChild( (*iter).second );
return xChild;
}
else
@@ -192,8 +192,7 @@ Reference< XAccessible > AccessibleTableShapeImpl::getAccessibleChild(sal_Int32
xAccessibleCell->Init();
maChildMap[xCell] = xAccessibleCell;
- Reference< XAccessible > xChild( xAccessibleCell.get() );
- return xChild;
+ return xAccessibleCell;
}
}
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx
index cc4e292ce60a..3bc253b48b71 100644
--- a/svx/source/table/cell.cxx
+++ b/svx/source/table/cell.cxx
@@ -389,8 +389,7 @@ rtl::Reference< Cell > Cell::create( SdrTableObj& rTableObj )
rtl::Reference< Cell > xCell( new Cell( rTableObj ) );
if( xCell->mxTable.is() )
{
- Reference< XEventListener > xListener( xCell.get() );
- xCell->mxTable->addEventListener( xListener );
+ xCell->mxTable->addEventListener( xCell );
}
return xCell;
}
diff --git a/svx/source/table/cellrange.cxx b/svx/source/table/cellrange.cxx
index c0a7eee72261..f9941fd242da 100644
--- a/svx/source/table/cellrange.cxx
+++ b/svx/source/table/cellrange.cxx
@@ -72,7 +72,7 @@ sal_Int32 CellRange::getBottom()
Reference< XTable > CellRange::getTable()
{
- return mxTable.get();
+ return mxTable;
}
diff --git a/svx/source/table/propertyset.cxx b/svx/source/table/propertyset.cxx
index 300c877bf67e..0dc90358c229 100644
--- a/svx/source/table/propertyset.cxx
+++ b/svx/source/table/propertyset.cxx
@@ -105,7 +105,7 @@ FastPropertySet::~FastPropertySet()
Reference< XPropertySetInfo > SAL_CALL FastPropertySet::getPropertySetInfo( )
{
- return Reference< XPropertySetInfo >( mxInfo.get() );
+ return mxInfo;
}
diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx
index 2d70a85264d6..f3d4ae4d5728 100644
--- a/svx/source/table/svdotable.cxx
+++ b/svx/source/table/svdotable.cxx
@@ -931,7 +931,7 @@ SdrTableObj::~SdrTableObj()
Reference< XTable > SdrTableObj::getTable() const
{
- return Reference< XTable >( mpImpl->mxTable.get() );
+ return mpImpl->mxTable;
}
@@ -1026,7 +1026,7 @@ CellPos SdrTableObj::getPreviousCell( const CellPos& rPos, bool bEdgeTravel ) co
if( xCell.is() && xCell->isMerged() )
{
sal_Int32 nTemp = 0;
- findMergeOrigin( mpImpl->mxTable.get(), aPos.mnCol, aPos.mnRow, aPos.mnCol, nTemp );
+ findMergeOrigin( mpImpl->mxTable, aPos.mnCol, aPos.mnRow, aPos.mnCol, nTemp );
}
if( aPos.mnCol > 0 )
@@ -1270,7 +1270,7 @@ TableHitKind SdrTableObj::CheckTableHit( const Point& rPos, sal_Int32& rnX, sal_
CellRef xCell( mpImpl->getCell( CellPos( rnX, rnY ) ) );
if( xCell.is() && xCell->isMerged() )
- findMergeOrigin( mpImpl->mxTable.get(), rnX, rnY, rnX, rnY );
+ findMergeOrigin( mpImpl->mxTable, rnX, rnY, rnX, rnY );
if( xCell.is() )
{
@@ -1611,7 +1611,7 @@ void SdrTableObj::setActiveCell( const CellPos& rPos )
if( mpImpl->mxActiveCell.is() && mpImpl->mxActiveCell->isMerged() )
{
CellPos aOrigin;
- findMergeOrigin( mpImpl->mxTable.get(), rPos.mnCol, rPos.mnRow, aOrigin.mnCol, aOrigin.mnRow );
+ findMergeOrigin( mpImpl->mxTable, rPos.mnCol, rPos.mnRow, aOrigin.mnCol, aOrigin.mnRow );
mpImpl->mxActiveCell.set( dynamic_cast< Cell* >( mpImpl->mxTable->getCellByPosition( aOrigin.mnCol, aOrigin.mnRow ).get() ) );
mpImpl->maEditPos = aOrigin;
}
diff --git a/svx/source/table/tablecolumns.cxx b/svx/source/table/tablecolumns.cxx
index a9a37e5ef426..c202f3a52cea 100644
--- a/svx/source/table/tablecolumns.cxx
+++ b/svx/source/table/tablecolumns.cxx
@@ -93,7 +93,7 @@ Any SAL_CALL TableColumns::getByIndex( sal_Int32 Index )
if( ( Index < 0 ) || ( Index >= mxTableModel->getColumnCount() ) )
throw IndexOutOfBoundsException();
- return Any( Reference< XCellRange >( mxTableModel->getColumn( Index ).get() ) );
+ return Any( Reference< XCellRange >( mxTableModel->getColumn( Index ) ) );
}
diff --git a/svx/source/table/tablemodel.cxx b/svx/source/table/tablemodel.cxx
index d7d04191163c..6efcbd1280dc 100644
--- a/svx/source/table/tablemodel.cxx
+++ b/svx/source/table/tablemodel.cxx
@@ -373,7 +373,7 @@ Reference< XTableColumns > SAL_CALL TableModel::getColumns()
if( !mxTableColumns.is() )
mxTableColumns.set( new TableColumns( this ) );
- return mxTableColumns.get();
+ return mxTableColumns;
}
@@ -383,7 +383,7 @@ Reference< XTableRows > SAL_CALL TableModel::getRows()
if( !mxTableRows.is() )
mxTableRows.set( new TableRows( this ) );
- return mxTableRows.get();
+ return mxTableRows;
}
@@ -396,7 +396,7 @@ Reference< XCell > SAL_CALL TableModel::getCellByPosition( sal_Int32 nColumn, sa
CellRef xCell( getCell( nColumn, nRow ) );
if( xCell.is() )
- return xCell.get();
+ return xCell;
throw IndexOutOfBoundsException();
}
diff --git a/svx/source/tbxctrls/colrctrl.cxx b/svx/source/tbxctrls/colrctrl.cxx
index ae4153954130..68d7a36c59c7 100644
--- a/svx/source/tbxctrls/colrctrl.cxx
+++ b/svx/source/tbxctrls/colrctrl.cxx
@@ -93,7 +93,7 @@ void SvxColorValueSet_docking::SetDrawingArea(weld::DrawingArea* pDrawingArea)
SetStyle(GetStyle() | WB_ITEMBORDER);
m_xHelper.set(new SvxColorValueSetData);
- rtl::Reference<TransferDataContainer> xHelper(m_xHelper.get());
+ rtl::Reference<TransferDataContainer> xHelper(m_xHelper);
SetDragDataTransferrable(xHelper, DND_ACTION_COPY);
}
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index 42e8eb4a12e0..3573a21349cf 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -1005,9 +1005,9 @@ void SAL_CALL SvXMLGraphicImportExportHelper::initialize(
aArguments[0] >>= xStorage;
rtl::Reference<SvXMLGraphicHelper> pHelper( SvXMLGraphicHelper::Create( xStorage, m_eGraphicHelperMode ));
- m_xGraphicObjectResolver.set( pHelper.get() );
- m_xGraphicStorageHandler.set( pHelper.get() );
- m_xBinaryStreamResolver.set( pHelper.get() );
+ m_xGraphicObjectResolver = pHelper;
+ m_xGraphicStorageHandler = pHelper;
+ m_xBinaryStreamResolver = pHelper;
}
// ____ XGraphicObjectResolver ____
diff --git a/svx/source/xml/xmlxtimp.cxx b/svx/source/xml/xmlxtimp.cxx
index 9474a88860eb..c7160d414e40 100644
--- a/svx/source/xml/xmlxtimp.cxx
+++ b/svx/source/xml/xmlxtimp.cxx
@@ -151,22 +151,22 @@ css::uno::Reference< css::xml::sax::XFastContextHandler >
switch( meContext )
{
case SvxXMLTableImportContextEnum::Color:
- importColor( xFastList.get(), aAny, aName );
+ importColor( xFastList, aAny, aName );
break;
case SvxXMLTableImportContextEnum::Marker:
- importMarker( xFastList.get(), aAny, aName );
+ importMarker( xFastList, aAny, aName );
break;
case SvxXMLTableImportContextEnum::Dash:
- importDash( xFastList.get(), aAny, aName );
+ importDash( xFastList, aAny, aName );
break;
case SvxXMLTableImportContextEnum::Hatch:
- importHatch( xFastList.get(), aAny, aName );
+ importHatch( xFastList, aAny, aName );
break;
case SvxXMLTableImportContextEnum::Gradient:
- importGradient( xFastList.get(), aAny, aName );
+ importGradient( xFastList, aAny, aName );
break;
case SvxXMLTableImportContextEnum::Bitmap:
- importBitmap( xFastList.get(), aAny, aName );
+ importBitmap( xFastList, aAny, aName );
break;
}
commit 881d8470eb9ede52690dbd75c02f72c6ee422261
Author: Noel <noel.grandin at collabora.co.uk>
AuthorDate: Fri Feb 12 15:34:27 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Feb 15 08:37:59 2021 +0100
loplugin:referencecasting in sw
Change-Id: Ie923fc8baaa26938378407f6e5f3c50b2cea7cca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110815
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sw/qa/core/frmedt/frmedt.cxx b/sw/qa/core/frmedt/frmedt.cxx
index 097db6402ae1..174fb70486f2 100644
--- a/sw/qa/core/frmedt/frmedt.cxx
+++ b/sw/qa/core/frmedt/frmedt.cxx
@@ -125,7 +125,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreFrmedtTest, testPasteFlyInTextBox)
rtl::Reference<SwTransferable> pTransfer = new SwTransferable(*pWrtShell);
pTransfer->Cut();
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(0), pDoc->GetSpzFrameFormats()->GetFormatCount());
- TransferableDataHelper aHelper(pTransfer.get());
+ TransferableDataHelper aHelper(pTransfer);
// When pasting that to an empty document.
SwTransferable::Paste(*pWrtShell, aHelper);
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index 2147f581522f..e63329f03bd8 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -1396,7 +1396,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTdf134250)
xTransfer->Copy();
// .uno:Paste without touching shared clipboard
- TransferableDataHelper aHelper(xTransfer.get());
+ TransferableDataHelper aHelper(xTransfer);
SwTransferable::Paste(*pWrtShell, aHelper);
Scheduler::ProcessEventsToIdle();
diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx b/sw/qa/extras/uiwriter/uiwriter2.cxx
index f426d0fd1eb5..0bc22e23aca4 100644
--- a/sw/qa/extras/uiwriter/uiwriter2.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter2.cxx
@@ -207,7 +207,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf101534)
// Make sure that direct formatting is preserved during paste.
pWrtShell->EndPara(/*bSelect=*/false);
- TransferableDataHelper aHelper(pTransfer.get());
+ TransferableDataHelper aHelper(pTransfer);
SwTransferable::Paste(*pWrtShell, aHelper);
aSet.ClearItem();
pWrtShell->GetCurAttr(aSet);
diff --git a/sw/qa/extras/uiwriter/uiwriter3.cxx b/sw/qa/extras/uiwriter/uiwriter3.cxx
index a24cdb3329f5..e4ccc62e6f17 100644
--- a/sw/qa/extras/uiwriter/uiwriter3.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter3.cxx
@@ -68,7 +68,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf129382)
CPPUNIT_ASSERT_EQUAL(3, getShapes());
CPPUNIT_ASSERT_EQUAL(1, getPages());
- TransferableDataHelper aHelper(xTransfer.get());
+ TransferableDataHelper aHelper(xTransfer);
SwTransferable::Paste(*pWrtShell, aHelper);
CPPUNIT_ASSERT_EQUAL(8, getShapes());
@@ -101,7 +101,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf134227)
CPPUNIT_ASSERT_EQUAL(0, getShapes());
- TransferableDataHelper aHelper(xTransfer.get());
+ TransferableDataHelper aHelper(xTransfer);
SwTransferable::Paste(*pWrtShell, aHelper);
CPPUNIT_ASSERT_EQUAL(4, getShapes());
@@ -132,7 +132,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf135412)
CPPUNIT_ASSERT_EQUAL(0, getShapes());
- TransferableDataHelper aHelper(xTransfer.get());
+ TransferableDataHelper aHelper(xTransfer);
SwTransferable::Paste(*pWrtShell, aHelper);
CPPUNIT_ASSERT_EQUAL(4, getShapes());
@@ -195,7 +195,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf132911)
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndexAccess->getCount());
CPPUNIT_ASSERT_EQUAL(0, getShapes());
- TransferableDataHelper aHelper(xTransfer.get());
+ TransferableDataHelper aHelper(xTransfer);
SwTransferable::Paste(*pWrtShell, aHelper);
Scheduler::ProcessEventsToIdle();
@@ -504,7 +504,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf126626)
CPPUNIT_ASSERT_EQUAL(2, getShapes());
- TransferableDataHelper aHelper(xTransfer.get());
+ TransferableDataHelper aHelper(xTransfer);
SwTransferable::Paste(*pWrtShell, aHelper);
CPPUNIT_ASSERT_EQUAL(2, getShapes());
@@ -564,7 +564,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf132187)
dispatchCommand(mxComponent, ".uno:GoToEndOfDoc", {});
- TransferableDataHelper aHelper(xTransfer.get());
+ TransferableDataHelper aHelper(xTransfer);
for (sal_Int32 i = 0; i < 10; ++i)
{
SwTransferable::Paste(*pWrtShell, aHelper);
@@ -608,7 +608,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf135733)
pWrtShell->SttPg(/*bSelect=*/false);
- TransferableDataHelper aHelper(xTransfer.get());
+ TransferableDataHelper aHelper(xTransfer);
SwTransferable::Paste(*pWrtShell, aHelper);
CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xIndexAccess->getCount());
@@ -646,7 +646,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf128739)
CPPUNIT_ASSERT_EQUAL(OUString(""), getParagraph(1)->getString());
- TransferableDataHelper aHelper(xTransfer.get());
+ TransferableDataHelper aHelper(xTransfer);
SwTransferable::Paste(*pWrtShell, aHelper);
CPPUNIT_ASSERT_EQUAL(OUString("Fehler: Verweis nicht gefunden"), getParagraph(1)->getString());
@@ -672,7 +672,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf124722)
CPPUNIT_ASSERT_EQUAL(22, getPages());
- TransferableDataHelper aHelper(xTransfer.get());
+ TransferableDataHelper aHelper(xTransfer);
SwTransferable::Paste(*pWrtShell, aHelper);
CPPUNIT_ASSERT_EQUAL(43, getPages());
@@ -873,7 +873,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf126504)
dispatchCommand(mxComponent, ".uno:GoToEndOfPage", {});
Scheduler::ProcessEventsToIdle();
- TransferableDataHelper aHelper(xTransfer.get());
+ TransferableDataHelper aHelper(xTransfer);
SwTransferable::Paste(*pWrtShell, aHelper);
Scheduler::ProcessEventsToIdle();
@@ -923,7 +923,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf133982)
xTransfer->Cut();
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndexAccess->getCount());
- TransferableDataHelper aHelper(xTransfer.get());
+ TransferableDataHelper aHelper(xTransfer);
SwTransferable::Paste(*pWrtShell, aHelper);
CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xIndexAccess->getCount());
}
@@ -949,7 +949,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf134253)
SwWrtShell* pWrtShell = pTextDoc->GetDocShell()->GetWrtShell();
rtl::Reference<SwTransferable> xTransfer = new SwTransferable(*pWrtShell);
xTransfer->Copy();
- TransferableDataHelper aHelper(xTransfer.get());
+ TransferableDataHelper aHelper(xTransfer);
SwTransferable::Paste(*pWrtShell, aHelper);
//Without the fix in place, it would have crashed here
@@ -1135,7 +1135,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf108124)
rtl::Reference<SwTransferable> xTransfer = new SwTransferable(*pWrtShell);
xTransfer->Copy();
- TransferableDataHelper aHelper(xTransfer.get());
+ TransferableDataHelper aHelper(xTransfer);
SwTransferable::Paste(*pWrtShell, aHelper);
CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xIndexAccess->getCount());
@@ -1193,7 +1193,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf107975)
//Position the mouse cursor (caret) after "ABC" below the blue image
dispatchCommand(mxComponent, ".uno:GoRight", {});
{
- TransferableDataHelper aHelper(xTransfer.get());
+ TransferableDataHelper aHelper(xTransfer);
SwTransferable::Paste(*pWrtShell, aHelper);
}
@@ -1230,7 +1230,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf107975)
//Position the mouse cursor (caret) after "ABC" below the blue image
dispatchCommand(mxComponent, ".uno:GoRight", {});
{
- TransferableDataHelper aHelper(xTransfer.get());
+ TransferableDataHelper aHelper(xTransfer);
SwTransferable::Paste(*pWrtShell, aHelper);
}
@@ -1376,7 +1376,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf130685)
CPPUNIT_ASSERT_EQUAL(1, getPages());
- TransferableDataHelper aHelper(xTransfer.get());
+ TransferableDataHelper aHelper(xTransfer);
SwTransferable::Paste(*pWrtShell, aHelper);
SwTransferable::Paste(*pWrtShell, aHelper);
@@ -1460,7 +1460,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf134931)
dispatchCommand(mxComponent, ".uno:GoDown", {});
- TransferableDataHelper aHelper(xTransfer.get());
+ TransferableDataHelper aHelper(xTransfer);
for (sal_Int32 i = 0; i < 10; ++i)
{
SwTransferable::Paste(*pWrtShell, aHelper);
@@ -1501,7 +1501,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf130680)
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndexAccess->getCount());
- TransferableDataHelper aHelper(xTransfer.get());
+ TransferableDataHelper aHelper(xTransfer);
SwTransferable::Paste(*pWrtShell, aHelper);
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
xClpDoc.clear();
@@ -1539,7 +1539,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf131684)
dispatchCommand(mxComponent, ".uno:Undo", {});
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
- TransferableDataHelper aHelper(xTransfer.get());
+ TransferableDataHelper aHelper(xTransfer);
SwTransferable::Paste(*pWrtShell, aHelper);
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
@@ -1599,7 +1599,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf132744)
CPPUNIT_ASSERT_EQUAL(0, getShapes());
- TransferableDataHelper aHelper(xTransfer.get());
+ TransferableDataHelper aHelper(xTransfer);
SwTransferable::Paste(*pWrtShell, aHelper);
Scheduler::ProcessEventsToIdle();
@@ -1840,7 +1840,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf134626)
rtl::Reference<SwTransferable> xTransfer = new SwTransferable(*pWrtShell);
xTransfer->Copy();
Scheduler::ProcessEventsToIdle();
- TransferableDataHelper aHelper(xTransfer.get());
+ TransferableDataHelper aHelper(xTransfer);
mxComponent->dispose();
@@ -2259,7 +2259,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf133490)
CPPUNIT_ASSERT_EQUAL(0, getShapes());
- TransferableDataHelper aHelper(xTransfer.get());
+ TransferableDataHelper aHelper(xTransfer);
SwTransferable::Paste(*pWrtShell, aHelper);
Scheduler::ProcessEventsToIdle();
diff --git a/sw/qa/extras/unowriter/unowriter.cxx b/sw/qa/extras/unowriter/unowriter.cxx
index cfe3dbb13702..8e45a006f19a 100644
--- a/sw/qa/extras/unowriter/unowriter.cxx
+++ b/sw/qa/extras/unowriter/unowriter.cxx
@@ -865,7 +865,7 @@ CPPUNIT_TEST_FIXTURE(SwUnoWriter, testPasteListener)
pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/true, 2, /*bBasicCall=*/false);
rtl::Reference<SwTransferable> pTransfer = new SwTransferable(*pWrtShell);
pTransfer->Cut();
- TransferableDataHelper aHelper(pTransfer.get());
+ TransferableDataHelper aHelper(pTransfer);
SwTransferable::Paste(*pWrtShell, aHelper);
// Without working listener registration in place, this test would have
// failed with 'Expected: DE; Actual:', i.e. the paste listener was not
diff --git a/sw/qa/uibase/dochdl/dochdl.cxx b/sw/qa/uibase/dochdl/dochdl.cxx
index 88ad5f7545d0..cd555acc7a7b 100644
--- a/sw/qa/uibase/dochdl/dochdl.cxx
+++ b/sw/qa/uibase/dochdl/dochdl.cxx
@@ -33,7 +33,7 @@ CPPUNIT_TEST_FIXTURE(SwUibaseDochdlTest, testSelectPasteFormat)
// Decide what format to use when doing a Writer->Writer paste and both RTF and ODF is an
// available format.
- TransferableDataHelper aHelper(pTransfer.get());
+ TransferableDataHelper aHelper(pTransfer);
sal_uInt8 nAction = EXCHG_OUT_ACTION_INSERT_STRING;
SotClipboardFormatId nFormat = SotClipboardFormatId::RICHTEXT;
SwTransferable::SelectPasteFormat(aHelper, nAction, nFormat);
diff --git a/sw/qa/unit/swmodeltestbase.cxx b/sw/qa/unit/swmodeltestbase.cxx
index 3a1c6b89e9d6..389809346d37 100644
--- a/sw/qa/unit/swmodeltestbase.cxx
+++ b/sw/qa/unit/swmodeltestbase.cxx
@@ -474,7 +474,7 @@ void SwModelTestBase::setTestInteractionHandler(const char* pPassword,
rFilterOptions.emplace_back();
xInteractionHandler
= rtl::Reference<TestInteractionHandler>(new TestInteractionHandler(sPassword));
- uno::Reference<task::XInteractionHandler2> const xInteraction(xInteractionHandler.get());
+ uno::Reference<task::XInteractionHandler2> const xInteraction(xInteractionHandler);
rFilterOptions[0].Name = "InteractionHandler";
rFilterOptions[0].Value <<= xInteraction;
}
diff --git a/sw/source/core/access/acccontext.cxx b/sw/source/core/access/acccontext.cxx
index e36b89a890b0..225b21424a85 100644
--- a/sw/source/core/access/acccontext.cxx
+++ b/sw/source/core/access/acccontext.cxx
@@ -1023,7 +1023,7 @@ void SwAccessibleContext::DisposeShape( const SdrObject *pObj,
AccessibleEventObject aEvent;
aEvent.EventId = AccessibleEventId::CHILD;
- uno::Reference< XAccessible > xAcc( xAccImpl.get() );
+ uno::Reference< XAccessible > xAcc( xAccImpl );
aEvent.OldValue <<= xAcc;
FireAccessibleEvent( aEvent );
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index 38cf49e532c0..ae1e6e29b06c 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -2714,7 +2714,7 @@ void SwAccessibleMap::InvalidateCursorPosition( const SwFrame *pFrame )
{
AccessibleEventObject aEvent;
aEvent.EventId = AccessibleEventId::CHILD;
- aEvent.NewValue <<= uno::Reference< XAccessible>(xParentAccImpl.get());
+ aEvent.NewValue <<= uno::Reference< XAccessible>(xParentAccImpl);
xParentAccImplRoot->FireAccessibleEvent( aEvent );
}
}
@@ -2807,7 +2807,7 @@ void SwAccessibleMap::SetCursorContext(
const ::rtl::Reference < SwAccessibleContext >& rCursorContext )
{
osl::MutexGuard aGuard( maMutex );
- uno::Reference < XAccessible > xAcc( rCursorContext.get() );
+ uno::Reference < XAccessible > xAcc( rCursorContext );
mxCursorContext = xAcc;
}
@@ -3175,7 +3175,7 @@ bool SwAccessibleMap::ReplaceChild (
rShapeTypeHandler.CreateAccessibleObject (
aShapeInfo, mpShapeMap->GetInfo() ));
- uno::Reference < XAccessible > xAcc( pReplacement.get() );
+ uno::Reference < XAccessible > xAcc( pReplacement );
if( xAcc.is() )
{
pReplacement->Init();
diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx
index a5472dd27776..9297cebb11be 100644
--- a/sw/source/core/fields/docufld.cxx
+++ b/sw/source/core/fields/docufld.cxx
@@ -1865,7 +1865,7 @@ bool SwPostItField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
else
m_xTextObject->SetString( m_sText );
- uno::Reference < text::XText > xText( m_xTextObject.get() );
+ uno::Reference < text::XText > xText( m_xTextObject );
rAny <<= xText;
break;
}
diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx
index 3fb56edbd3ad..b098b089c1d2 100644
--- a/sw/source/core/ole/ndole.cxx
+++ b/sw/source/core/ole/ndole.cxx
@@ -782,7 +782,7 @@ SwOLEObj::SwOLEObj( const svt::EmbeddedObjectRef& xObj ) :
if ( xObj.is() )
{
m_xListener = new SwOLEListener_Impl( this );
- xObj->addStateChangeListener( m_xListener.get() );
+ xObj->addStateChangeListener( m_xListener );
}
}
@@ -809,7 +809,7 @@ SwOLEObj::~SwOLEObj() COVERITY_NOEXCEPT_FALSE
if( m_xListener )
{
if ( m_xOLERef.is() )
- m_xOLERef->removeStateChangeListener( m_xListener.get() );
+ m_xOLERef->removeStateChangeListener( m_xListener );
m_xListener->dispose();
m_xListener.clear();
}
@@ -948,7 +948,7 @@ uno::Reference < embed::XEmbeddedObject > const & SwOLEObj::GetOleRef()
m_xOLERef.Assign( xObj, m_xOLERef.GetViewAspect() );
m_xOLERef.AssignToContainer( &p->GetEmbeddedObjectContainer(), m_aName );
m_xListener = new SwOLEListener_Impl( this );
- xObj->addStateChangeListener( m_xListener.get() );
+ xObj->addStateChangeListener( m_xListener );
}
const_cast<SwOLENode*>(m_pOLENode)->CheckFileLink_Impl(); // for this notification nonconst access is required
diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx
index e4e0ea629d15..5de1c6bdf11f 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -2428,7 +2428,7 @@ uno::Any SAL_CALL SwXTextField::getPropertyValue(const OUString& rPropertyName)
= new SwTextAPIObject( std::make_unique<SwTextAPIEditSource>(m_pImpl->m_pDoc) );
}
- uno::Reference<text::XText> xText(m_pImpl->m_xTextObject.get());
+ uno::Reference<text::XText> xText(m_pImpl->m_xTextObject);
aRet <<= xText;
break;
}
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index 60c65acabac0..6392d16cd786 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -2248,7 +2248,7 @@ uno::Reference<table::XCellRange> GetRangeByName(
UnoActionRemoveContext aRemoveContext(rCursor);
rCursor.MakeBoxSels();
// pUnoCursor will be provided and will not be deleted
- return SwXCellRange::CreateXCellRange(pUnoCursor, *pFormat, rDesc).get();
+ return SwXCellRange::CreateXCellRange(pUnoCursor, *pFormat, rDesc);
}
} // namespace
@@ -3108,7 +3108,7 @@ void SwXTextTable::Impl::Notify(const SfxHint& rHint)
}
else
{
- lcl_SendChartEvent(xThis.get(), m_Listeners);
+ lcl_SendChartEvent(xThis, m_Listeners);
}
}
}
@@ -3851,7 +3851,7 @@ void SwXCellRange::Impl::Notify( const SfxHint& rHint )
if (xThis.is())
{ // fdo#72695: if UNO object is already dead, don't revive it with event
if(m_pFrameFormat)
- lcl_SendChartEvent(xThis.get(), m_ChartListeners);
+ lcl_SendChartEvent(xThis, m_ChartListeners);
else
m_ChartListeners.disposeAndClear(lang::EventObject(xThis));
}
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index ddc26f1a3be4..c915b01b0e6a 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -1122,7 +1122,7 @@ void DocxAttributeOutput::WriteCollectedParagraphProperties()
{
if ( m_rExport.SdrExporter().getFlyAttrList().is() )
{
- rtl::Reference<FastAttributeList> xAttrList( m_rExport.SdrExporter().getFlyAttrList().get() );
+ rtl::Reference<FastAttributeList> xAttrList( m_rExport.SdrExporter().getFlyAttrList() );
m_rExport.SdrExporter().getFlyAttrList().clear();
m_pSerializer->singleElementNS( XML_w, XML_framePr, xAttrList );
@@ -2635,7 +2635,7 @@ void lclProcessRecursiveGrabBag(sal_Int32 aElementId, const css::uno::Sequence<c
pAttributes->add(*aSubElementId, aValue.getStr());
}
- pSerializer->startElement(aElementId, pAttributes.get());
+ pSerializer->startElement(aElementId, pAttributes);
for (const auto& rElement : rElements)
{
@@ -2665,7 +2665,7 @@ void DocxAttributeOutput::WriteCollectedRunProperties()
if ( m_pColorAttrList.is() )
{
- rtl::Reference<FastAttributeList> xAttrList( m_pColorAttrList.get() );
+ rtl::Reference<FastAttributeList> xAttrList( m_pColorAttrList );
m_pSerializer->singleElementNS( XML_w, XML_color, xAttrList );
}
diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.cxx b/sw/source/filter/xml/XMLRedlineImportHelper.cxx
index 34cf4ac4b6d0..d368b812a199 100644
--- a/sw/source/filter/xml/XMLRedlineImportHelper.cxx
+++ b/sw/source/filter/xml/XMLRedlineImportHelper.cxx
@@ -477,7 +477,7 @@ Reference<XTextCursor> XMLRedlineImportHelper::CreateRedlineTextSection(
// create (UNO-) cursor
SwPosition aPos(*pRedlineNode);
SwXTextCursor *const pXCursor =
- new SwXTextCursor(*pDoc, pXText.get(), CursorType::Redline, aPos);
+ new SwXTextCursor(*pDoc, pXText, CursorType::Redline, aPos);
pXCursor->GetCursor().Move(fnMoveForward, GoInNode);
// cast to avoid ambiguity
xReturn = static_cast<text::XWordCursor*>(pXCursor);
diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx
index 99e95e9a5381..2c646dc0268e 100644
--- a/sw/source/filter/xml/xmlexp.cxx
+++ b/sw/source/filter/xml/xmlexp.cxx
@@ -232,7 +232,7 @@ ErrCode SwXMLExport::exportDoc( enum XMLTokenEnum eClass )
if (!GetGraphicStorageHandler().is())
{
xGraphicStorageHandler = SvXMLGraphicHelper::Create(SvXMLGraphicHelperMode::Write, GetImageFilterName());
- SetGraphicStorageHandler(xGraphicStorageHandler.get());
+ SetGraphicStorageHandler(xGraphicStorageHandler);
}
rtl::Reference<SvXMLEmbeddedObjectHelper> xEmbeddedResolver;
@@ -244,7 +244,7 @@ ErrCode SwXMLExport::exportDoc( enum XMLTokenEnum eClass )
xEmbeddedResolver = SvXMLEmbeddedObjectHelper::Create(
*pPersist,
SvXMLEmbeddedObjectHelperMode::Write );
- SetEmbeddedResolver( Reference<XEmbeddedObjectResolver>( xEmbeddedResolver.get() ) );
+ SetEmbeddedResolver( xEmbeddedResolver );
}
}
diff --git a/sw/source/filter/xml/xmlfmt.cxx b/sw/source/filter/xml/xmlfmt.cxx
index 5a409a429525..b1d5c7f8a019 100644
--- a/sw/source/filter/xml/xmlfmt.cxx
+++ b/sw/source/filter/xml/xmlfmt.cxx
@@ -363,7 +363,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > SwXMLTextStyleContext_
pConditions = std::make_unique<SwXMLConditions_Impl>();
pConditions->push_back( xCond );
}
- return xCond.get();
+ return xCond;
}
return XMLTextStyleContext::createFastChildContext( nElement, xAttrList );
@@ -596,7 +596,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > SwXMLItemSetStyleConte
pTextStyle = new SwXMLTextStyleContext_Impl( GetSwImport(), XmlStyleFamily::TEXT_PARAGRAPH, rStyles );
rtl::Reference<sax_fastparser::FastAttributeList> xTmpAttrList = new sax_fastparser::FastAttributeList(nullptr);
xTmpAttrList->add(XML_ELEMENT(STYLE, XML_NAME), GetName().toUtf8() );
- pTextStyle->startFastElement( nElement, xTmpAttrList.get() );
+ pTextStyle->startFastElement( nElement, xTmpAttrList );
rStyles.AddStyle( *pTextStyle );
}
return pTextStyle->createFastChildContext( nElement, xAttrList );
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index 584a8e5d9176..226b08f22384 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -610,7 +610,7 @@ void SwXMLImport::startDocument()
if (!GetGraphicStorageHandler().is())
{
m_xGraphicStorageHandler = SvXMLGraphicHelper::Create(SvXMLGraphicHelperMode::Read);
- SetGraphicStorageHandler(m_xGraphicStorageHandler.get());
+ SetGraphicStorageHandler(m_xGraphicStorageHandler);
}
if( !GetEmbeddedResolver().is() )
@@ -621,8 +621,7 @@ void SwXMLImport::startDocument()
m_xEmbeddedResolver = SvXMLEmbeddedObjectHelper::Create(
*pPersist,
SvXMLEmbeddedObjectHelperMode::Read );
- Reference< document::XEmbeddedObjectResolver > xEmbeddedResolver( m_xEmbeddedResolver.get() );
- SetEmbeddedResolver( xEmbeddedResolver );
+ SetEmbeddedResolver( m_xEmbeddedResolver );
}
}
}
diff --git a/sw/source/filter/xml/xmlitem.cxx b/sw/source/filter/xml/xmlitem.cxx
index 899c0b6bb1ad..e97eb5f6922d 100644
--- a/sw/source/filter/xml/xmlitem.cxx
+++ b/sw/source/filter/xml/xmlitem.cxx
@@ -60,7 +60,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > SwXMLItemSetContext::c
if( pEntry && 0 != (pEntry->nMemberId & MID_SW_FLAG_ELEMENT_ITEM_IMPORT) )
{
- return createFastChildContext( nElement, xAttrList, *pEntry ).get();
+ return createFastChildContext( nElement, xAttrList, *pEntry );
}
else
XMLOFF_WARN_UNKNOWN_ELEMENT("sw", nElement);
diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index 5a40c3c8d281..bded70ce03dd 100644
--- a/sw/source/filter/xml/xmltbli.cxx
+++ b/sw/source/filter/xml/xmltbli.cxx
@@ -1291,7 +1291,7 @@ css::uno::Reference<css::xml::sax::XFastContextHandler> SwXMLTableContext::creat
if( IsValid() )
{
m_xDDESource.set(new SwXMLDDETableContext_Impl( GetSwImport() ));
- return m_xDDESource.get();
+ return m_xDDESource;
}
break;
}
diff --git a/sw/source/ui/dbui/dbtablepreviewdialog.cxx b/sw/source/ui/dbui/dbtablepreviewdialog.cxx
index 3bbfa989f7f7..d716aefbb689 100644
--- a/sw/source/ui/dbui/dbtablepreviewdialog.cxx
+++ b/sw/source/ui/dbui/dbtablepreviewdialog.cxx
@@ -91,7 +91,7 @@ SwDBTablePreviewDialog::SwDBTablePreviewDialog(weld::Window* pParent, uno::Seque
if (xFrame.is())
{
m_xFrameListener.set(new DBTablePreviewFrame(xFrame));
- xFrame->addEventListener(m_xFrameListener.get());
+ xFrame->addEventListener(m_xFrameListener);
util::URL aURL;
aURL.Complete = ".component:DB/DataSourceBrowser";
diff --git a/sw/source/ui/vba/vbadocument.cxx b/sw/source/ui/vba/vbadocument.cxx
index 4e305cc100e5..c7340095b44a 100644
--- a/sw/source/ui/vba/vbadocument.cxx
+++ b/sw/source/ui/vba/vbadocument.cxx
@@ -410,7 +410,7 @@ void SAL_CALL SwVbaDocument::setConsecutiveHyphensLimit( ::sal_Int32 _consecutiv
uno::Reference< ooo::vba::word::XMailMerge > SAL_CALL SwVbaDocument::getMailMerge()
{
- return uno::Reference< ooo::vba::word::XMailMerge >(SwVbaMailMerge::get(mxParent, mxContext).get());
+ return SwVbaMailMerge::get(mxParent, mxContext);
}
void SAL_CALL SwVbaDocument::Protect( ::sal_Int32 /*Type*/, const uno::Any& /*NOReset*/, const uno::Any& /*Password*/, const uno::Any& /*UseIRM*/, const uno::Any& /*EnforceStyleLock*/ )
diff --git a/sw/source/uibase/app/docshdrw.cxx b/sw/source/uibase/app/docshdrw.cxx
index e9a8b2e3160d..f767191fbd10 100644
--- a/sw/source/uibase/app/docshdrw.cxx
+++ b/sw/source/uibase/app/docshdrw.cxx
@@ -70,7 +70,7 @@ void InitDrawModelAndDocShell(SwDocShell* pSwDocShell, SwDrawModel* pSwDrawDocum
// docshell and then to the drawdocument
xColorList = XColorList::GetStdColorList();
pSwDocShell->PutItem(SvxColorListItem(xColorList, SID_COLOR_TABLE));
- pSwDrawDocument->SetPropertyList(xColorList.get());
+ pSwDrawDocument->SetPropertyList(xColorList);
}
}
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index fb6706b0ba82..b7805d8b5707 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -487,7 +487,7 @@ bool SwDBManager::Merge( const SwMergeDescriptor& rMergeDesc )
{
uno::Reference<lang::XComponent> xComponent(m_DataSourceParams.back()->xConnection, uno::UNO_QUERY);
if(xComponent.is())
- xComponent->addEventListener(m_pImpl->m_xDisposeListener.get());
+ xComponent->addEventListener(m_pImpl->m_xDisposeListener);
}
catch(const uno::Exception&)
{
@@ -2342,7 +2342,7 @@ uno::Reference< sdbc::XConnection> const & SwDBManager::RegisterConnection(OUStr
{
uno::Reference<lang::XComponent> xComponent(pFound->xConnection, uno::UNO_QUERY);
if(xComponent.is())
- xComponent->addEventListener(m_pImpl->m_xDisposeListener.get());
+ xComponent->addEventListener(m_pImpl->m_xDisposeListener);
}
catch(const uno::Exception&)
{
@@ -2456,7 +2456,7 @@ SwDSParam* SwDBManager::FindDSData(const SwDBData& rData, bool bCreate)
{
uno::Reference<lang::XComponent> xComponent(pFound->xConnection, uno::UNO_QUERY);
if(xComponent.is())
- xComponent->addEventListener(m_pImpl->m_xDisposeListener.get());
+ xComponent->addEventListener(m_pImpl->m_xDisposeListener);
}
catch(const uno::Exception&)
{
@@ -2494,7 +2494,7 @@ SwDSParam* SwDBManager::FindDSConnection(const OUString& rDataSource, bool bCre
{
uno::Reference<lang::XComponent> xComponent(pFound->xConnection, uno::UNO_QUERY);
if(xComponent.is())
- xComponent->addEventListener(m_pImpl->m_xDisposeListener.get());
+ xComponent->addEventListener(m_pImpl->m_xDisposeListener);
}
catch(const uno::Exception&)
{
diff --git a/sw/source/uibase/docvw/srcedtw.cxx b/sw/source/uibase/docvw/srcedtw.cxx
index 33f7a33435d1..042dcc727eaa 100644
--- a/sw/source/uibase/docvw/srcedtw.cxx
+++ b/sw/source/uibase/docvw/srcedtw.cxx
@@ -263,7 +263,7 @@ SwSrcEditWindow::SwSrcEditWindow( vcl::Window* pParent, SwSrcView* pParentView )
css::uno::Sequence< OUString > s(2);
s[0] = "FontHeight";
s[1] = "FontName";
- n->addPropertiesChangeListener(s, m_xListener.get());
+ n->addPropertiesChangeListener(s, m_xListener);
}
SwSrcEditWindow::~SwSrcEditWindow()
@@ -279,7 +279,7 @@ void SwSrcEditWindow::dispose()
n = m_xNotifier;
}
if (n.is()) {
- n->removePropertiesChangeListener(m_xListener.get());
+ n->removePropertiesChangeListener(m_xListener);
}
m_aSyntaxIdle.Stop();
if ( m_pOutWin )
More information about the Libreoffice-commits
mailing list