diff options
author | Jacek Fraczek <fraczek.jacek@gmail.com> | 2016-10-12 20:04:41 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-10-18 09:27:56 +0000 |
commit | 398d641664baa6eaeb34789f0aebfd21e73edef3 (patch) | |
tree | f3185bdf569f8c9454e832cc8d7f08ce75f033a2 /sw/source/uibase | |
parent | c5c24f2035ef5941e83f7f0b15cb000f806983cd (diff) |
tdf#89307: Removed T* SvRef::opeartor &()
Usage has been replaced with SvRef::get() or removed where applicable.
Change-Id: I49f108910b668466134c40940b53fc3ab2acd816
Reviewed-on: https://gerrit.libreoffice.org/29780
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sw/source/uibase')
-rw-r--r-- | sw/source/uibase/dochdl/swdtflvr.cxx | 8 | ||||
-rw-r--r-- | sw/source/uibase/docvw/edtwin.cxx | 28 | ||||
-rw-r--r-- | sw/source/uibase/uiview/view2.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/uno/unoatxt.cxx | 10 |
4 files changed, 25 insertions, 25 deletions
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index 3f7c245404aa..36e01d17d640 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -242,7 +242,7 @@ SwTransferable::~SwTransferable() // the DDELink still needs the WrtShell! if( m_xDdeLink.Is() ) { - static_cast<SwTrnsfrDdeLink*>(&m_xDdeLink)->Disconnect( true ); + static_cast<SwTrnsfrDdeLink*>( m_xDdeLink.get() )->Disconnect( true ); m_xDdeLink.Clear(); } @@ -522,7 +522,7 @@ bool SwTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDo { case SotClipboardFormatId::LINK: if( m_xDdeLink.Is() ) - bOK = SetObject( &m_xDdeLink, SWTRANSFER_OBJECTTYPE_DDE, rFlavor ); + bOK = SetObject( m_xDdeLink.get(), SWTRANSFER_OBJECTTYPE_DDE, rFlavor ); break; case SotClipboardFormatId::OBJECTDESCRIPTOR: @@ -1659,7 +1659,7 @@ bool SwTransferable::PasteFileContent( TransferableDataHelper& rData, } else { - pStream = &xStrm; + pStream = xStrm.get(); if( SotClipboardFormatId::RTF == nFormat ) pRead = SwReaderWriter::GetRtfReader(); else if( !pRead ) @@ -3733,7 +3733,7 @@ bool SwTrnsfrDdeLink::WriteData( SvStream& rStrm ) // the mark is still a DdeBookmark // we replace it with a Bookmark, so it will get saved etc. ::sw::mark::IMark* const pMark = ppMark->get(); - ::sfx2::SvLinkSource* p = &refObj; + ::sfx2::SvLinkSource* p = refObj.get(); SwServerObject& rServerObject = dynamic_cast<SwServerObject&>(*p); // collecting state of old mark diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index d4a3514f30dc..8cdd2b8155ad 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -1516,17 +1516,17 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) SbxArrayRef xArgs = new SbxArray; SbxVariableRef xVar = new SbxVariable; xVar->PutString( pFlyFormat->GetName() ); - xArgs->Put( &xVar, 1 ); + xArgs->Put( xVar.get(), 1 ); xVar = new SbxVariable; if( SW_EVENT_FRM_KEYINPUT_ALPHA == nEvent ) xVar->PutChar( aCh ); else xVar->PutUShort( rKeyCode.GetModifier() | rKeyCode.GetCode() ); - xArgs->Put( &xVar, 2 ); + xArgs->Put( xVar.get(), 2 ); OUString sRet; - rSh.ExecMacro( *pMacro, &sRet, &xArgs ); + rSh.ExecMacro( *pMacro, &sRet, xArgs.get() ); if( !sRet.isEmpty() && sRet.toInt32()!=0 ) return ; } @@ -4086,27 +4086,27 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) SbxArrayRef xArgs = new SbxArray; SbxVariableRef xVar = new SbxVariable; xVar->PutString( pFlyFormat->GetName() ); - xArgs->Put( &xVar, ++nPos ); + xArgs->Put( xVar.get(), ++nPos ); if( SW_EVENT_FRM_RESIZE == nEvent ) { xVar = new SbxVariable; xVar->PutUShort( static_cast< sal_uInt16 >(g_eSdrMoveHdl) ); - xArgs->Put( &xVar, ++nPos ); + xArgs->Put( xVar.get(), ++nPos ); } xVar = new SbxVariable; xVar->PutLong( aDocPt.X() - aSttPt.X() ); - xArgs->Put( &xVar, ++nPos ); + xArgs->Put( xVar.get(), ++nPos ); xVar = new SbxVariable; xVar->PutLong( aDocPt.Y() - aSttPt.Y() ); - xArgs->Put( &xVar, ++nPos ); + xArgs->Put( xVar.get(), ++nPos ); OUString sRet; ReleaseMouse(); - rSh.ExecMacro( *pMacro, &sRet, &xArgs ); + rSh.ExecMacro( *pMacro, &sRet, xArgs.get() ); CaptureMouse(); @@ -4549,29 +4549,29 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) SbxArrayRef xArgs = new SbxArray; SbxVariableRef xVar = new SbxVariable; xVar->PutString( pFlyFormat->GetName() ); - xArgs->Put( &xVar, ++nPos ); + xArgs->Put( xVar.get(), ++nPos ); if( SW_EVENT_FRM_RESIZE == nEvent ) { xVar = new SbxVariable; xVar->PutUShort( static_cast< sal_uInt16 >(eOldSdrMoveHdl) ); - xArgs->Put( &xVar, ++nPos ); + xArgs->Put( xVar.get(), ++nPos ); } xVar = new SbxVariable; xVar->PutLong( aDocPt.X() - aSttPt.X() ); - xArgs->Put( &xVar, ++nPos ); + xArgs->Put( xVar.get(), ++nPos ); xVar = new SbxVariable; xVar->PutLong( aDocPt.Y() - aSttPt.Y() ); - xArgs->Put( &xVar, ++nPos ); + xArgs->Put( xVar.get(), ++nPos ); xVar = new SbxVariable; xVar->PutUShort( 1 ); - xArgs->Put( &xVar, ++nPos ); + xArgs->Put( xVar.get(), ++nPos ); ReleaseMouse(); - rSh.ExecMacro( *pMacro, nullptr, &xArgs ); + rSh.ExecMacro( *pMacro, nullptr, xArgs.get() ); CaptureMouse(); } diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index bc1a23105f11..428b12ee708c 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -2266,9 +2266,9 @@ long SwView::InsertMedium( sal_uInt16 nSlotId, SfxMedium* pMedium, sal_Int16 nVe m_pWrtShell->EnterStdMode(); // delete selections if( bCompare ) - nFound = m_pWrtShell->CompareDoc( *static_cast<SwDocShell*>(&xDocSh)->GetDoc() ); + nFound = m_pWrtShell->CompareDoc( *static_cast<SwDocShell*>( xDocSh.get() )->GetDoc() ); else - nFound = m_pWrtShell->MergeDoc( *static_cast<SwDocShell*>(&xDocSh)->GetDoc() ); + nFound = m_pWrtShell->MergeDoc( *static_cast<SwDocShell*>( xDocSh.get() )->GetDoc() ); m_pWrtShell->EndAllAction(); diff --git a/sw/source/uibase/uno/unoatxt.cxx b/sw/source/uibase/uno/unoatxt.cxx index e61116d03218..47a09f94c807 100644 --- a/sw/source/uibase/uno/unoatxt.cxx +++ b/sw/source/uibase/uno/unoatxt.cxx @@ -751,7 +751,7 @@ void SwXAutoTextEntry::implFlushDocument( bool _bCloseDoc ) if ( _bCloseDoc ) { // stop listening at the document - EndListening( *&xDocSh ); + EndListening( *xDocSh ); xDocSh->DoClose(); xDocSh.Clear(); @@ -761,7 +761,7 @@ void SwXAutoTextEntry::implFlushDocument( bool _bCloseDoc ) void SwXAutoTextEntry::Notify( SfxBroadcaster& _rBC, const SfxHint& _rHint ) { - if ( &_rBC == &xDocSh ) + if ( &_rBC == xDocSh.get() ) { // it's our document if (const SfxEventHint* pEventHint = dynamic_cast<const SfxEventHint*>(&_rHint)) { @@ -769,7 +769,7 @@ void SwXAutoTextEntry::Notify( SfxBroadcaster& _rBC, const SfxHint& _rHint ) { implFlushDocument(); xBodyText = nullptr; - EndListening( *&xDocSh ); + EndListening( *xDocSh ); xDocSh.Clear(); } } @@ -780,7 +780,7 @@ void SwXAutoTextEntry::Notify( SfxBroadcaster& _rBC, const SfxHint& _rHint ) // our document is dying (possibly because we're shuting down, and the document was notified // earlier than we are?) // stop listening at the docu - EndListening( *&xDocSh ); + EndListening( *xDocSh ); // and release our reference xDocSh.Clear(); } @@ -796,7 +796,7 @@ void SwXAutoTextEntry::GetBodyText () OSL_ENSURE( xDocSh.Is(), "SwXAutoTextEntry::GetBodyText: unexpected: no doc returned by EditGroupDoc!" ); // start listening at the document - StartListening( *&xDocSh ); + StartListening( *xDocSh ); pBodyText = new SwXBodyText ( xDocSh->GetDoc() ); xBodyText.set( *pBodyText, uno::UNO_QUERY); |