summaryrefslogtreecommitdiff
path: root/sw/source/uibase
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase')
-rw-r--r--sw/source/uibase/app/docsh.cxx2
-rw-r--r--sw/source/uibase/app/docsh2.cxx5
-rw-r--r--sw/source/uibase/app/docshini.cxx17
-rw-r--r--sw/source/uibase/app/docst.cxx4
-rw-r--r--sw/source/uibase/app/docstyle.cxx2
-rw-r--r--sw/source/uibase/app/swdll.cxx2
-rw-r--r--sw/source/uibase/dialog/regionsw.cxx2
-rw-r--r--sw/source/uibase/docvw/SidebarTxtControlAcc.cxx4
-rw-r--r--sw/source/uibase/misc/glosdoc.cxx2
-rw-r--r--sw/source/uibase/shells/txtcrsr.cxx2
-rw-r--r--sw/source/uibase/wrtsh/navmgr.cxx4
-rw-r--r--sw/source/uibase/wrtsh/wrtsh1.cxx2
12 files changed, 25 insertions, 23 deletions
diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx
index d1410e668abd..1ccc19651629 100644
--- a/sw/source/uibase/app/docsh.cxx
+++ b/sw/source/uibase/app/docsh.cxx
@@ -1353,7 +1353,7 @@ OUString SwDocShell::GetEventName( sal_Int32 nIndex )
const ::sfx2::IXmlIdRegistry* SwDocShell::GetXmlIdRegistry() const
{
- return m_xDoc.get() ? &m_xDoc->GetXmlIdRegistry() : nullptr;
+ return m_xDoc ? &m_xDoc->GetXmlIdRegistry() : nullptr;
}
bool SwDocShell::IsChangeRecording() const
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index a2df020257fd..283406ea6ed0 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -202,7 +202,8 @@ void SwDocShell::ToggleLayoutMode(SwView* pView)
// update text fields on document properties changes
void SwDocShell::DoFlushDocInfo()
{
- if (!m_xDoc.get()) return;
+ if (!m_xDoc)
+ return;
bool bUnlockView(true);
if (m_pWrtShell)
@@ -246,7 +247,7 @@ static void lcl_processCompatibleSfxHint( const uno::Reference< script::vba::XVB
// Notification on DocInfo changes
void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
- if (!m_xDoc.get())
+ if (!m_xDoc)
{
return ;
}
diff --git a/sw/source/uibase/app/docshini.cxx b/sw/source/uibase/app/docshini.cxx
index be850b70611c..76a2acdba069 100644
--- a/sw/source/uibase/app/docshini.cxx
+++ b/sw/source/uibase/app/docshini.cxx
@@ -377,7 +377,7 @@ SwDocShell::SwDocShell( SwDoc *const pD, SfxObjectCreateMode const eMode )
SwDocShell::~SwDocShell()
{
// disable chart related objects now because in ~SwDoc it may be to late for this
- if (m_xDoc.get())
+ if (m_xDoc)
{
m_xDoc->getIDocumentChartDataProviderAccess().GetChartControllerHelper().Disconnect();
SwChartDataProvider *pPCD = m_xDoc->getIDocumentChartDataProviderAccess().GetChartDataProvider();
@@ -411,7 +411,7 @@ void SwDocShell::Init_Impl()
void SwDocShell::AddLink()
{
- if (!m_xDoc.get())
+ if (!m_xDoc)
{
SwDocFac aFactory;
m_xDoc = aFactory.GetDoc();
@@ -433,8 +433,8 @@ void SwDocShell::UpdateFontList()
if (!m_IsInUpdateFontList)
{
m_IsInUpdateFontList = true;
- OSL_ENSURE(m_xDoc.get(), "No Doc no FontList");
- if (m_xDoc.get())
+ OSL_ENSURE(m_xDoc, "No Doc no FontList");
+ if (m_xDoc)
{
m_pFontList.reset( new FontList( m_xDoc->getIDocumentDeviceAccess().getReferenceDevice(true) ) );
PutItem( SvxFontListItem( m_pFontList.get(), SID_ATTR_CHAR_FONTLIST ) );
@@ -448,7 +448,7 @@ void SwDocShell::RemoveLink()
// disconnect Uno-Object
uno::Reference< text::XTextDocument > xDoc(GetBaseModel(), uno::UNO_QUERY);
static_cast<SwXTextDocument*>(xDoc.get())->Invalidate();
- if (m_xDoc.get())
+ if (m_xDoc)
{
if (m_xBasePool.is())
{
@@ -484,7 +484,7 @@ bool SwDocShell::Load( SfxMedium& rMedium )
rEmbeddedObjectContainer.setUserAllowsLinkUpdate(false);
SAL_INFO( "sw.ui", "after SfxInPlaceObject::Load" );
- if (m_xDoc.get()) // for last version!!
+ if (m_xDoc) // for last version!!
RemoveLink(); // release the existing
AddLink(); // set Link and update Data!!
@@ -570,7 +570,8 @@ bool SwDocShell::Load( SfxMedium& rMedium )
}
UpdateFontList();
- InitDrawModelAndDocShell(this, m_xDoc.get() ? m_xDoc->getIDocumentDrawModelAccess().GetDrawModel() : nullptr);
+ InitDrawModelAndDocShell(this, m_xDoc ? m_xDoc->getIDocumentDrawModelAccess().GetDrawModel()
+ : nullptr);
SetError(nErr);
bRet = !nErr.IsError();
@@ -591,7 +592,7 @@ bool SwDocShell::Load( SfxMedium& rMedium )
bool SwDocShell::LoadFrom( SfxMedium& rMedium )
{
bool bRet = false;
- if (m_xDoc.get())
+ if (m_xDoc)
RemoveLink();
AddLink(); // set Link and update Data!!
diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx
index ba4b554f935d..47f65f43f774 100644
--- a/sw/source/uibase/app/docst.cxx
+++ b/sw/source/uibase/app/docst.cxx
@@ -630,7 +630,7 @@ IMPL_LINK_NOARG(ApplyStyle, ApplyHdl, LinkParamNone*, void)
pView->InvalidateRulerPos();
if( m_bNew )
- m_xBasePool->Broadcast( SfxStyleSheetHint( SfxHintId::StyleSheetCreated, *m_xTmp.get() ) );
+ m_xBasePool->Broadcast(SfxStyleSheetHint(SfxHintId::StyleSheetCreated, *m_xTmp));
pDoc->getIDocumentState().SetModified();
if( !m_bModified )
@@ -884,7 +884,7 @@ void SwDocShell::Edit(
m_pView->InvalidateRulerPos();
if( bNew )
- m_xBasePool->Broadcast( SfxStyleSheetHint( SfxHintId::StyleSheetCreated, *xTmp.get() ) );
+ m_xBasePool->Broadcast(SfxStyleSheetHint(SfxHintId::StyleSheetCreated, *xTmp));
m_xDoc->getIDocumentState().SetModified();
if( !bModified ) // Bug 57028
diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx
index fc4fec6896a8..7bd4c97ac1cf 100644
--- a/sw/source/uibase/app/docstyle.cxx
+++ b/sw/source/uibase/app/docstyle.cxx
@@ -2415,7 +2415,7 @@ SfxStyleSheetBase& SwDocStyleSheetPool::Make( const OUString& rName,
mxStyleSheet->SetPhysical(true);
mxStyleSheet->Create();
- return *mxStyleSheet.get();
+ return *mxStyleSheet;
}
SfxStyleSheetBase* SwDocStyleSheetPool::Create( const SfxStyleSheetBase& /*rOrg*/)
diff --git a/sw/source/uibase/app/swdll.cxx b/sw/source/uibase/app/swdll.cxx
index 33adb20335ab..59e95d141295 100644
--- a/sw/source/uibase/app/swdll.cxx
+++ b/sw/source/uibase/app/swdll.cxx
@@ -168,7 +168,7 @@ SwDLL::~SwDLL() COVERITY_NOEXCEPT_FALSE
sw::Filters & SwDLL::getFilters()
{
assert(filters_);
- return *filters_.get();
+ return *filters_;
}
#ifndef DISABLE_DYNLOADING
diff --git a/sw/source/uibase/dialog/regionsw.cxx b/sw/source/uibase/dialog/regionsw.cxx
index e0f25330ddd4..516f50074e07 100644
--- a/sw/source/uibase/dialog/regionsw.cxx
+++ b/sw/source/uibase/dialog/regionsw.cxx
@@ -173,7 +173,7 @@ IMPL_LINK( SwWrtShell, InsertRegionDialog, void*, p, void )
{
SwSectionData* pSect = static_cast<SwSectionData*>(p);
std::unique_ptr<SwSectionData> xSectionData(pSect);
- if (!xSectionData.get())
+ if (!xSectionData)
return;
SfxItemSet aSet(
diff --git a/sw/source/uibase/docvw/SidebarTxtControlAcc.cxx b/sw/source/uibase/docvw/SidebarTxtControlAcc.cxx
index f6fc2e693271..40bee0951c16 100644
--- a/sw/source/uibase/docvw/SidebarTxtControlAcc.cxx
+++ b/sw/source/uibase/docvw/SidebarTxtControlAcc.cxx
@@ -117,9 +117,9 @@ IMPL_LINK(SidebarTextEditSource, NotifyHdl, EENotify&, rNotify, void)
{
std::unique_ptr< SfxHint > aHint( SvxEditSourceHelper::EENotification2Hint( &rNotify ) );
- if( aHint.get() )
+ if (aHint)
{
- Broadcast( *aHint.get() );
+ Broadcast(*aHint);
}
}
diff --git a/sw/source/uibase/misc/glosdoc.cxx b/sw/source/uibase/misc/glosdoc.cxx
index 5adc7629a37c..30365661e9be 100644
--- a/sw/source/uibase/misc/glosdoc.cxx
+++ b/sw/source/uibase/misc/glosdoc.cxx
@@ -611,7 +611,7 @@ Reference< text::XAutoTextEntry > SwGlossaries::GetAutoTextEntry(
bool bCreate = ( rCompleteGroupName == GetDefName() );
std::unique_ptr< SwTextBlocks > pGlosGroup( GetGroupDoc( rCompleteGroupName, bCreate ) );
- if ( !pGlosGroup.get() || pGlosGroup->GetError() )
+ if (!pGlosGroup || pGlosGroup->GetError())
throw lang::WrappedTargetException();
sal_uInt16 nIdx = pGlosGroup->GetIndex( rEntryName );
diff --git a/sw/source/uibase/shells/txtcrsr.cxx b/sw/source/uibase/shells/txtcrsr.cxx
index 3ecf385bd9f3..93df8a6694a2 100644
--- a/sw/source/uibase/shells/txtcrsr.cxx
+++ b/sw/source/uibase/shells/txtcrsr.cxx
@@ -330,7 +330,7 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq)
std::unique_ptr< svx::ISdrObjectFilter > pFilter( FmFormShell::CreateFocusableControlFilter(
*pDrawView, *pWindow ) );
- if ( !pFilter.get() )
+ if (!pFilter)
break;
const SdrObject* pNearestControl = rSh.GetBestObject( true, GotoObjFlags::DrawControl, false, pFilter.get() );
diff --git a/sw/source/uibase/wrtsh/navmgr.cxx b/sw/source/uibase/wrtsh/navmgr.cxx
index 39c718e6f726..e2adc872ebbe 100644
--- a/sw/source/uibase/wrtsh/navmgr.cxx
+++ b/sw/source/uibase/wrtsh/navmgr.cxx
@@ -51,7 +51,7 @@ SwNavigationMgr::~SwNavigationMgr()
SolarMutexGuard g;
for (auto & it : m_entries)
{
- EndListening(it.get()->m_aNotifier);
+ EndListening(it->m_aNotifier);
}
m_entries.clear();
}
@@ -64,7 +64,7 @@ void SwNavigationMgr::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
{
for (auto it = m_entries.begin(); it != m_entries.end(); ++it)
{
- if (!it->get() || & rBC == & it->get()->m_aNotifier)
+ if (!*it || &rBC == &it->get()->m_aNotifier)
{
EndListening(rBC);
m_entries.erase(it);
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index f97a0daf62ad..8d5bc9902f84 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -1729,7 +1729,7 @@ OUString SwWrtShell::GetSelDescr() const
}
break;
default:
- if (mxDoc.get())
+ if (mxDoc)
aResult = GetCursorDescr();
}