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>
This commit is contained in:
committed by
Stephan Bergmann
parent
c5c24f2035
commit
398d641664
@@ -1011,9 +1011,9 @@ bool BasicManager::ImplLoadBasic( SvStream& rStrm, StarBASICRef& rOldBasic ) con
|
||||
bool bLoaded = false;
|
||||
if( xNew.Is() )
|
||||
{
|
||||
if( nullptr != dynamic_cast<const StarBASIC*>( &xNew ) )
|
||||
if( nullptr != dynamic_cast<const StarBASIC*>( xNew.get() ) )
|
||||
{
|
||||
StarBASIC* pNew = static_cast<StarBASIC*>(xNew.get());
|
||||
StarBASIC* pNew = static_cast<StarBASIC*>( xNew.get() );
|
||||
// Use the Parent of the old BASICs
|
||||
if( rOldBasic.Is() )
|
||||
{
|
||||
|
||||
@@ -431,7 +431,7 @@ void RTL_Impl_CreateUnoDialog( StarBASIC* pBasic, SbxArray& rPar, bool bWrite )
|
||||
|
||||
// Get dialog
|
||||
SbxBaseRef pObj = rPar.Get( 1 )->GetObject();
|
||||
if( !(pObj.Is() && nullptr != dynamic_cast<const SbUnoObject*>( &pObj )) )
|
||||
if( !(pObj.Is() && nullptr != dynamic_cast<const SbUnoObject*>( pObj.get() )) )
|
||||
{
|
||||
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
|
||||
return;
|
||||
|
||||
@@ -868,7 +868,7 @@ Type getUnoTypeForSbxValue( const SbxValue* pVal )
|
||||
return aRetType;
|
||||
}
|
||||
|
||||
if( nullptr != dynamic_cast<const SbxDimArray*>( &xObj) )
|
||||
if( nullptr != dynamic_cast<const SbxDimArray*>( xObj.get() ) )
|
||||
{
|
||||
SbxBase* pObj = xObj.get();
|
||||
SbxDimArray* pArray = static_cast<SbxDimArray*>(pObj);
|
||||
@@ -962,12 +962,12 @@ Type getUnoTypeForSbxValue( const SbxValue* pVal )
|
||||
}
|
||||
}
|
||||
// No array, but ...
|
||||
else if( nullptr != dynamic_cast<const SbUnoObject*>( &xObj) )
|
||||
else if( nullptr != dynamic_cast<const SbUnoObject*>( xObj.get() ) )
|
||||
{
|
||||
aRetType = static_cast<SbUnoObject*>(xObj.get())->getUnoAny().getValueType();
|
||||
}
|
||||
// SbUnoAnyObject?
|
||||
else if( nullptr != dynamic_cast<const SbUnoAnyObject*>( &xObj) )
|
||||
else if( nullptr != dynamic_cast<const SbUnoAnyObject*>( xObj.get() ) )
|
||||
{
|
||||
aRetType = static_cast<SbUnoAnyObject*>(xObj.get())->getValue().getValueType();
|
||||
}
|
||||
@@ -990,9 +990,9 @@ Any sbxToUnoValueImpl( const SbxValue* pVar, bool bBlockConversionToSmallestType
|
||||
SbxBaseRef xObj = pVar->GetObject();
|
||||
if( xObj.Is() )
|
||||
{
|
||||
if( nullptr != dynamic_cast<const SbUnoAnyObject*>( &xObj) )
|
||||
if( nullptr != dynamic_cast<const SbUnoAnyObject*>( xObj.get() ) )
|
||||
return static_cast<SbUnoAnyObject*>(xObj.get())->getValue();
|
||||
if( nullptr != dynamic_cast<const SbClassModuleObject*>( &xObj) )
|
||||
if( nullptr != dynamic_cast<const SbClassModuleObject*>( xObj.get() ) )
|
||||
{
|
||||
Any aRetAny;
|
||||
SbClassModuleObject* pClassModuleObj = static_cast<SbClassModuleObject*>(xObj.get());
|
||||
@@ -1000,7 +1000,7 @@ Any sbxToUnoValueImpl( const SbxValue* pVar, bool bBlockConversionToSmallestType
|
||||
if( pClassModule->createCOMWrapperForIface( aRetAny, pClassModuleObj ) )
|
||||
return aRetAny;
|
||||
}
|
||||
if( nullptr == dynamic_cast<const SbUnoObject*>( &xObj) )
|
||||
if( nullptr == dynamic_cast<const SbUnoObject*>( xObj.get() ) )
|
||||
{
|
||||
// Create NativeObjectWrapper to identify object in case of callbacks
|
||||
SbxObject* pObj = dynamic_cast<SbxObject*>( pVar->GetObject() );
|
||||
@@ -1189,7 +1189,7 @@ Any sbxToUnoValue( const SbxValue* pVar, const Type& rType, Property* pUnoProper
|
||||
if( eBaseType == SbxOBJECT )
|
||||
{
|
||||
SbxBaseRef xObj = pVar->GetObject();
|
||||
if( xObj.Is() && nullptr != dynamic_cast<const SbUnoAnyObject*>( &xObj) )
|
||||
if( xObj.Is() && nullptr != dynamic_cast<const SbUnoAnyObject*>( xObj.get() ) )
|
||||
{
|
||||
return static_cast<SbUnoAnyObject*>(xObj.get())->getValue();
|
||||
}
|
||||
@@ -1244,11 +1244,11 @@ Any sbxToUnoValue( const SbxValue* pVar, const Type& rType, Property* pUnoProper
|
||||
}
|
||||
|
||||
SbxBaseRef pObj = pVar->GetObject();
|
||||
if( pObj.Is() && nullptr != dynamic_cast<const SbUnoObject*>( &pObj) )
|
||||
if( pObj.Is() && nullptr != dynamic_cast<const SbUnoObject*>( pObj.get() ) )
|
||||
{
|
||||
aRetVal = static_cast<SbUnoObject*>(pObj.get())->getUnoAny();
|
||||
}
|
||||
else if( pObj.Is() && nullptr != dynamic_cast<const SbUnoStructRefObject*>( &pObj) )
|
||||
else if( pObj.Is() && nullptr != dynamic_cast<const SbUnoStructRefObject*>( pObj.get() ) )
|
||||
{
|
||||
aRetVal = static_cast<SbUnoStructRefObject*>(pObj.get())->getUnoAny();
|
||||
}
|
||||
@@ -1270,7 +1270,7 @@ Any sbxToUnoValue( const SbxValue* pVar, const Type& rType, Property* pUnoProper
|
||||
Reference< XIdlClass > xIdlClass;
|
||||
|
||||
SbxBaseRef pObj = pVar->GetObject();
|
||||
if( pObj.Is() && nullptr != dynamic_cast<const SbUnoObject*>( &pObj) )
|
||||
if( pObj.Is() && nullptr != dynamic_cast<const SbUnoObject*>( pObj.get() ) )
|
||||
{
|
||||
Any aUnoAny = static_cast<SbUnoObject*>( pObj.get() )->getUnoAny();
|
||||
aUnoAny >>= xIdlClass;
|
||||
@@ -1306,7 +1306,7 @@ Any sbxToUnoValue( const SbxValue* pVar, const Type& rType, Property* pUnoProper
|
||||
case TypeClass_SEQUENCE:
|
||||
{
|
||||
SbxBaseRef xObj = pVar->GetObject();
|
||||
if( xObj.Is() && nullptr != dynamic_cast<const SbxDimArray*>( &xObj) )
|
||||
if( xObj.Is() && nullptr != dynamic_cast<const SbxDimArray*>( xObj.get() ) )
|
||||
{
|
||||
SbxBase* pObj = xObj.get();
|
||||
SbxDimArray* pArray = static_cast<SbxDimArray*>(pObj);
|
||||
@@ -3084,7 +3084,7 @@ void RTL_Impl_HasInterfaces( StarBASIC* pBasic, SbxArray& rPar, bool bWrite )
|
||||
|
||||
// get the Uno-Object
|
||||
SbxBaseRef pObj = rPar.Get( 1 )->GetObject();
|
||||
if( !(pObj.Is() && nullptr != dynamic_cast<const SbUnoObject*>( &pObj)) )
|
||||
if( !(pObj.Is() && nullptr != dynamic_cast<const SbUnoObject*>( pObj.get() )) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -3148,7 +3148,7 @@ void RTL_Impl_IsUnoStruct( StarBASIC* pBasic, SbxArray& rPar, bool bWrite )
|
||||
return;
|
||||
}
|
||||
SbxBaseRef pObj = rPar.Get( 1 )->GetObject();
|
||||
if( !(pObj.Is() && nullptr != dynamic_cast<const SbUnoObject*>( &pObj)) )
|
||||
if( !(pObj.Is() && nullptr != dynamic_cast<const SbUnoObject*>( pObj.get() )) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -3183,7 +3183,7 @@ void RTL_Impl_EqualUnoObjects( StarBASIC* pBasic, SbxArray& rPar, bool bWrite )
|
||||
return;
|
||||
}
|
||||
SbxBaseRef pObj1 = xParam1->GetObject();
|
||||
if( !(pObj1.Is() && nullptr != dynamic_cast<const SbUnoObject*>( &pObj1 )) )
|
||||
if( !(pObj1.Is() && nullptr != dynamic_cast<const SbUnoObject*>( pObj1.get() )) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -3202,7 +3202,7 @@ void RTL_Impl_EqualUnoObjects( StarBASIC* pBasic, SbxArray& rPar, bool bWrite )
|
||||
return;
|
||||
}
|
||||
SbxBaseRef pObj2 = xParam2->GetObject();
|
||||
if( !(pObj2.Is() && nullptr != dynamic_cast<const SbUnoObject*>( &pObj2 )) )
|
||||
if( !(pObj2.Is() && nullptr != dynamic_cast<const SbUnoObject*>( pObj2.get() )) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -4192,7 +4192,7 @@ void RTL_Impl_CreateUnoValue( StarBASIC* pBasic, SbxArray& rPar, bool bWrite )
|
||||
Reference< XIdlClass > xIdlClass;
|
||||
|
||||
SbxBaseRef pObj = pVal->GetObject();
|
||||
if( pObj.Is() && nullptr != dynamic_cast<const SbUnoObject*>( &pObj) )
|
||||
if( pObj.Is() && nullptr != dynamic_cast<const SbUnoObject*>( pObj.get() ) )
|
||||
{
|
||||
Any aUnoAny = static_cast<SbUnoObject*>(pObj.get())->getUnoAny();
|
||||
aUnoAny >>= xIdlClass;
|
||||
@@ -4286,7 +4286,7 @@ ModuleInvocationProxy::ModuleInvocationProxy( const OUString& aPrefix, SbxObject
|
||||
, m_xScopeObj( xScopeObj )
|
||||
, m_aListeners( m_aMutex )
|
||||
{
|
||||
m_bProxyIsClassModuleObject = xScopeObj.Is() && nullptr != dynamic_cast<const SbClassModuleObject*>( &xScopeObj );
|
||||
m_bProxyIsClassModuleObject = xScopeObj.Is() && nullptr != dynamic_cast<const SbClassModuleObject*>( xScopeObj.get() );
|
||||
}
|
||||
|
||||
Reference< XIntrospectionAccess > SAL_CALL ModuleInvocationProxy::getIntrospection() throw(std::exception)
|
||||
|
||||
@@ -1596,11 +1596,11 @@ inline bool checkUnoStructCopy( bool bVBA, SbxVariableRef& refVal, SbxVariableRe
|
||||
return false;
|
||||
}
|
||||
// #115826: Exclude ProcedureProperties to avoid call to Property Get procedure
|
||||
else if( nullptr != dynamic_cast<const SbProcedureProperty*>( &refVar) )
|
||||
else if( nullptr != dynamic_cast<const SbProcedureProperty*>( refVar.get() ) )
|
||||
return false;
|
||||
|
||||
SbxObjectRef xValObj = static_cast<SbxObject*>(refVal->GetObject());
|
||||
if( !xValObj.Is() || nullptr != dynamic_cast<const SbUnoAnyObject*>( &xValObj) )
|
||||
if( !xValObj.Is() || nullptr != dynamic_cast<const SbUnoAnyObject*>( xValObj.get() ) )
|
||||
return false;
|
||||
|
||||
SbUnoObject* pUnoVal = dynamic_cast<SbUnoObject*>( xValObj.get() );
|
||||
@@ -1911,7 +1911,7 @@ void SbiRuntime::StepSET_Impl( SbxVariableRef& refVal, SbxVariableRef& refVar, b
|
||||
}
|
||||
if ( bDimAsNew )
|
||||
{
|
||||
if( nullptr == dynamic_cast<const SbxObject*>( &refVar) )
|
||||
if( nullptr == dynamic_cast<const SbxObject*>( refVar.get() ) )
|
||||
{
|
||||
SbxBase* pValObjBase = refVal->GetObject();
|
||||
if( pValObjBase == nullptr )
|
||||
@@ -2398,9 +2398,9 @@ void SbiRuntime::StepARGV()
|
||||
SbxVariableRef pVal = PopVar();
|
||||
|
||||
// Before fix of #94916:
|
||||
if( nullptr != dynamic_cast<const SbxMethod*>( &pVal)
|
||||
|| nullptr != dynamic_cast<const SbUnoProperty*>( &pVal)
|
||||
|| nullptr != dynamic_cast<const SbProcedureProperty*>( &pVal) )
|
||||
if( nullptr != dynamic_cast<const SbxMethod*>( pVal.get() )
|
||||
|| nullptr != dynamic_cast<const SbUnoProperty*>( pVal.get() )
|
||||
|| nullptr != dynamic_cast<const SbProcedureProperty*>( pVal.get() ) )
|
||||
{
|
||||
// evaluate methods and properties!
|
||||
SbxVariable* pRes = new SbxVariable( *pVal );
|
||||
@@ -2807,7 +2807,10 @@ void SbiRuntime::StepARGN( sal_uInt32 nOp1 )
|
||||
{
|
||||
OUString aAlias( pImg->GetString( static_cast<short>( nOp1 ) ) );
|
||||
SbxVariableRef pVal = PopVar();
|
||||
if( bVBAEnabled && ( nullptr != dynamic_cast<const SbxMethod*>( &pVal) || nullptr != dynamic_cast<const SbUnoProperty*>( &pVal) || nullptr != dynamic_cast<const SbProcedureProperty*>( &pVal) ) )
|
||||
if( bVBAEnabled &&
|
||||
( nullptr != dynamic_cast<const SbxMethod*>( pVal.get())
|
||||
|| nullptr != dynamic_cast<const SbUnoProperty*>( pVal.get())
|
||||
|| nullptr != dynamic_cast<const SbProcedureProperty*>( pVal.get()) ) )
|
||||
{
|
||||
// named variables ( that are Any especially properties ) can be empty at this point and need a broadcast
|
||||
if ( pVal->GetType() == SbxEMPTY )
|
||||
@@ -3186,7 +3189,7 @@ bool SbiRuntime::checkClass_Impl( const SbxVariableRef& refVal,
|
||||
SbxDataType t = refVal->GetType();
|
||||
SbxVariable* pVal = refVal.get();
|
||||
// we don't know the type of uno properties that are (maybevoid)
|
||||
if ( t == SbxEMPTY && nullptr != dynamic_cast<const SbUnoProperty*>( &refVal) )
|
||||
if ( t == SbxEMPTY && nullptr != dynamic_cast<const SbUnoProperty*>( refVal.get() ) )
|
||||
{
|
||||
SbUnoProperty* pProp = static_cast<SbUnoProperty*>(pVal);
|
||||
t = pProp->getRealType();
|
||||
@@ -3675,7 +3678,7 @@ void SbiRuntime::SetupArgs( SbxVariable* p, sal_uInt32 nOp1 )
|
||||
{
|
||||
// Check for default method with named parameters
|
||||
SbxBaseRef xObj = p->GetObject();
|
||||
if (SbUnoObject* pUnoObj = dynamic_cast<SbUnoObject*>(&xObj))
|
||||
if (SbUnoObject* pUnoObj = dynamic_cast<SbUnoObject*>( xObj.get() ))
|
||||
{
|
||||
Any aAny = pUnoObj->getUnoAny();
|
||||
|
||||
|
||||
@@ -293,7 +293,7 @@ void SbxArray::Remove( SbxVariable* pVar )
|
||||
{
|
||||
for( size_t i = 0; i < mVarEntries.size(); i++ )
|
||||
{
|
||||
if (&mVarEntries[i].mpVar == pVar)
|
||||
if (mVarEntries[i].mpVar.get() == pVar)
|
||||
{
|
||||
Remove( i ); break;
|
||||
}
|
||||
@@ -359,7 +359,7 @@ SbxVariable* SbxArray::FindUserData( sal_uInt32 nData )
|
||||
|
||||
if (rEntry.mpVar->IsVisible() && rEntry.mpVar->GetUserData() == nData)
|
||||
{
|
||||
p = &rEntry.mpVar;
|
||||
p = rEntry.mpVar.get();
|
||||
p->ResetFlag( SbxFlagBits::ExtFound );
|
||||
break; // JSM 1995-10-06
|
||||
}
|
||||
@@ -417,7 +417,7 @@ SbxVariable* SbxArray::Find( const OUString& rName, SbxClassType t )
|
||||
&& (t == SbxClassType::DontCare || rEntry.mpVar->GetClass() == t)
|
||||
&& (rEntry.mpVar->GetName().equalsIgnoreAsciiCase(rName)))
|
||||
{
|
||||
p = &rEntry.mpVar;
|
||||
p = rEntry.mpVar.get();
|
||||
p->ResetFlag(SbxFlagBits::ExtFound);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -438,7 +438,7 @@ IMPL_LINK_NOARG( SvBaseLinksDlg, BreakLinkClickHdl, Button*, void )
|
||||
|
||||
// if somebody has forgotten to deregister himself
|
||||
if( xLink.Is() )
|
||||
pLinkMgr->Remove( &xLink );
|
||||
pLinkMgr->Remove( xLink.get() );
|
||||
|
||||
if( bNewLnkMgr )
|
||||
{
|
||||
@@ -477,7 +477,7 @@ IMPL_LINK_NOARG( SvBaseLinksDlg, BreakLinkClickHdl, Button*, void )
|
||||
xLink->Closed();
|
||||
|
||||
// if somebody has forgotten to deregister himself
|
||||
pLinkMgr->Remove( &xLink );
|
||||
pLinkMgr->Remove( xLink.get() );
|
||||
bModified = true;
|
||||
}
|
||||
// then remove all selected entries
|
||||
|
||||
@@ -141,7 +141,7 @@ namespace dbaui
|
||||
ODatabaseImportExport* pExport = static_cast<ODatabaseImportExport*>(pUserObject);
|
||||
if ( pExport && rxOStm.Is() )
|
||||
{
|
||||
pExport->setStream(&rxOStm);
|
||||
pExport->setStream(rxOStm.get());
|
||||
return pExport->Write();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,8 +92,6 @@ public:
|
||||
|
||||
T * get() const { return pObj; }
|
||||
|
||||
T * operator &() const { return pObj; }
|
||||
|
||||
T * operator ->() const { assert(pObj != nullptr); return pObj; }
|
||||
|
||||
T & operator *() const { assert(pObj != nullptr); return *pObj; }
|
||||
|
||||
+2
-2
@@ -687,8 +687,8 @@ public:
|
||||
|
||||
SCTAB GetMaxTableNumber() { return static_cast<SCTAB>(maTabs.size()) - 1; }
|
||||
|
||||
ScRangePairList* GetColNameRanges() { return &xColNameRanges; }
|
||||
ScRangePairList* GetRowNameRanges() { return &xRowNameRanges; }
|
||||
ScRangePairList* GetColNameRanges() { return xColNameRanges.get(); }
|
||||
ScRangePairList* GetRowNameRanges() { return xRowNameRanges.get(); }
|
||||
ScRangePairListRef& GetColNameRangesRef() { return xColNameRanges; }
|
||||
ScRangePairListRef& GetRowNameRangesRef() { return xRowNameRanges; }
|
||||
|
||||
|
||||
@@ -3164,7 +3164,7 @@ void ScExternalRefManager::transformUnsavedRefToSavedRef( SfxObjectShell* pShell
|
||||
DocShellMap::iterator itr = maUnsavedDocShells.begin();
|
||||
while( itr != maUnsavedDocShells.end() )
|
||||
{
|
||||
if (&(itr->second.maShell) == pShell)
|
||||
if ( itr->second.maShell.get() == pShell )
|
||||
{
|
||||
// found that the shell is marked as unsaved
|
||||
OUString aFileURL = pShell->GetMedium()->GetURLObject().GetMainURL(INetURLObject::DECODE_TO_IURI);
|
||||
|
||||
@@ -126,7 +126,7 @@ void ScDrawView::BeginDrag( vcl::Window* pWindow, const Point& rStartPos )
|
||||
ScDrawTransferObj* pTransferObj = new ScDrawTransferObj( pModel, pDocSh, aObjDesc );
|
||||
uno::Reference<datatransfer::XTransferable> xTransferable( pTransferObj );
|
||||
|
||||
pTransferObj->SetDrawPersist( &aDragShellRef ); // keep persist for ole objects alive
|
||||
pTransferObj->SetDrawPersist( aDragShellRef.get() ); // keep persist for ole objects alive
|
||||
pTransferObj->SetDragSource( this ); // copies selection
|
||||
|
||||
SC_MOD()->SetDragObject( nullptr, pTransferObj ); // for internal D&D
|
||||
|
||||
@@ -579,7 +579,7 @@ bool SdTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDo
|
||||
}
|
||||
|
||||
maDocShellRef->SetVisArea( maVisArea );
|
||||
bOK = SetObject( &maDocShellRef, SDTRANSFER_OBJECTTYPE_DRAWOLE, rFlavor );
|
||||
bOK = SetObject( maDocShellRef.get(), SDTRANSFER_OBJECTTYPE_DRAWOLE, rFlavor );
|
||||
|
||||
mpSdDrawDocumentIntern->SetSwapGraphicsMode( nOldSwapMode );
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ void InsertionIndicatorOverlay::Create (const SdTransferable* pTransferable)
|
||||
nSelectionCount = pTransferable->GetPageBookmarks().size();
|
||||
else
|
||||
{
|
||||
DrawDocShell* pDataDocShell = dynamic_cast<DrawDocShell*>(&pTransferable->GetDocShell());
|
||||
DrawDocShell* pDataDocShell = dynamic_cast<DrawDocShell*>(pTransferable->GetDocShell().get());
|
||||
if (pDataDocShell != nullptr)
|
||||
{
|
||||
SdDrawDocument* pDataDocument = pDataDocShell->GetDoc();
|
||||
|
||||
@@ -373,7 +373,7 @@ void SvLinkSource::RemoveAllDataAdvise( SvBaseLink * pLink )
|
||||
{
|
||||
SvLinkSource_EntryIter_Impl aIter( pImpl->aArr );
|
||||
for( SvLinkSource_Entry_Impl* p = aIter.Curr(); p; p = aIter.Next() )
|
||||
if( p->bIsDataSink && &p->xSink == pLink )
|
||||
if( p->bIsDataSink && p->xSink.get() == pLink )
|
||||
{
|
||||
pImpl->aArr.DeleteAndDestroy( p );
|
||||
}
|
||||
@@ -390,7 +390,7 @@ void SvLinkSource::RemoveConnectAdvise( SvBaseLink * pLink )
|
||||
{
|
||||
SvLinkSource_EntryIter_Impl aIter( pImpl->aArr );
|
||||
for( SvLinkSource_Entry_Impl* p = aIter.Curr(); p; p = aIter.Next() )
|
||||
if( !p->bIsDataSink && &p->xSink == pLink )
|
||||
if( !p->bIsDataSink && p->xSink.get() == pLink )
|
||||
{
|
||||
pImpl->aArr.DeleteAndDestroy( p );
|
||||
}
|
||||
|
||||
@@ -1586,7 +1586,7 @@ SvKeyValueIterator* SfxObjectShell::GetHeaderAttributes()
|
||||
DBG_ASSERT( pMedium, "No Medium" );
|
||||
pImpl->xHeaderAttributes = new SfxHeaderAttributes_Impl( this );
|
||||
}
|
||||
return static_cast<SvKeyValueIterator*>( &pImpl->xHeaderAttributes );
|
||||
return static_cast<SvKeyValueIterator*>( pImpl->xHeaderAttributes.get() );
|
||||
}
|
||||
|
||||
void SfxObjectShell::ClearHeaderAttributesForSourceViewHack()
|
||||
|
||||
@@ -34,7 +34,7 @@ bool GetMathTypeVersion( SotStorage* pStor, sal_uInt8 &nVersion )
|
||||
StreamMode::STD_READ);
|
||||
if ( (!xSrc.Is()) || (SVSTREAM_OK != xSrc->GetError()))
|
||||
return bSuccess;
|
||||
SotStorageStream *pS = &xSrc;
|
||||
SotStorageStream *pS = xSrc.get();
|
||||
pS->SetEndian( SvStreamEndian::LITTLE );
|
||||
|
||||
EQNOLEFILEHDR aHdr;
|
||||
|
||||
@@ -560,7 +560,7 @@ bool MathType::Parse(SotStorage *pStor)
|
||||
StreamMode::STD_READ);
|
||||
if ( (!xSrc.Is()) || (SVSTREAM_OK != xSrc->GetError()))
|
||||
return false;
|
||||
pS = &xSrc;
|
||||
pS = xSrc.get();
|
||||
pS->SetEndian( SvStreamEndian::LITTLE );
|
||||
|
||||
EQNOLEFILEHDR aHdr;
|
||||
@@ -1921,7 +1921,7 @@ bool MathType::ConvertFromStarMath( SfxMedium& rMedium )
|
||||
if ( (!xSrc.Is()) || (SVSTREAM_OK != xSrc->GetError()))
|
||||
return false;
|
||||
|
||||
pS = &xSrc;
|
||||
pS = xSrc.get();
|
||||
pS->SetEndian( SvStreamEndian::LITTLE );
|
||||
|
||||
pS->SeekRel(EQNOLEFILEHDR_SIZE); //Skip 28byte Header and fill it in later
|
||||
|
||||
@@ -2915,7 +2915,7 @@ CellController* DbGridControl::GetController(long /*nRow*/, sal_uInt16 nColumnId
|
||||
|
||||
CellController* pReturn = nullptr;
|
||||
if (IsFilterMode())
|
||||
pReturn = &pColumn->GetController();
|
||||
pReturn = pColumn->GetController().get();
|
||||
else
|
||||
{
|
||||
if (::comphelper::hasProperty(FM_PROP_ENABLED, pColumn->getModel()))
|
||||
@@ -2929,7 +2929,7 @@ CellController* DbGridControl::GetController(long /*nRow*/, sal_uInt16 nColumnId
|
||||
|
||||
if ((bInsert && !pColumn->IsAutoValue()) || bUpdate)
|
||||
{
|
||||
pReturn = &pColumn->GetController();
|
||||
pReturn = pColumn->GetController().get();
|
||||
}
|
||||
}
|
||||
return pReturn;
|
||||
@@ -3042,7 +3042,7 @@ void DbGridControl::Undo()
|
||||
EndCursorAction();
|
||||
|
||||
m_xDataRow->SetState(m_pDataCursor, false);
|
||||
if (&m_xPaintRow == &m_xCurrentRow)
|
||||
if (m_xPaintRow == m_xCurrentRow)
|
||||
m_xPaintRow = m_xCurrentRow = m_xDataRow;
|
||||
else
|
||||
m_xCurrentRow = m_xDataRow;
|
||||
@@ -3087,7 +3087,7 @@ void DbGridControl::resetCurrentRow()
|
||||
|
||||
// update the rows
|
||||
m_xDataRow->SetState(m_pDataCursor, false);
|
||||
if (&m_xPaintRow == &m_xCurrentRow)
|
||||
if (m_xPaintRow == m_xCurrentRow)
|
||||
m_xPaintRow = m_xCurrentRow = m_xDataRow;
|
||||
else
|
||||
m_xCurrentRow = m_xDataRow;
|
||||
|
||||
@@ -514,7 +514,7 @@ bool GalleryTransferable::GetData( const datatransfer::DataFlavor& rFlavor, cons
|
||||
|
||||
if( ( SotClipboardFormatId::DRAWING == nFormat ) && ( SgaObjKind::SvDraw == meObjectKind ) )
|
||||
{
|
||||
bRet = ( mxModelStream.Is() && SetObject( &mxModelStream, SotClipboardFormatId::NONE, rFlavor ) );
|
||||
bRet = ( mxModelStream.Is() && SetObject( mxModelStream.get(), SotClipboardFormatId::NONE, rFlavor ) );
|
||||
}
|
||||
else if( ( SotClipboardFormatId::SVIM == nFormat ) && mpImageMap )
|
||||
{
|
||||
|
||||
+2
-2
@@ -213,8 +213,8 @@ public:
|
||||
|
||||
// Data server methods.
|
||||
void SetRefObject( SwServerObject* pObj );
|
||||
const SwServerObject* GetObject() const { return & m_RefObj; }
|
||||
SwServerObject* GetObject() { return & m_RefObj; }
|
||||
const SwServerObject* GetObject() const { return m_RefObj.get(); }
|
||||
SwServerObject* GetObject() { return m_RefObj.get(); }
|
||||
bool IsServer() const { return m_RefObj.Is(); }
|
||||
|
||||
// Methods for linked ranges.
|
||||
|
||||
+2
-2
@@ -308,8 +308,8 @@ public:
|
||||
|
||||
// Data server methods.
|
||||
void SetRefObject( SwServerObject* );
|
||||
const SwServerObject* GetObject() const { return &m_xRefObj; }
|
||||
SwServerObject* GetObject() { return &m_xRefObj; }
|
||||
const SwServerObject* GetObject() const { return m_xRefObj.get(); }
|
||||
SwServerObject* GetObject() { return m_xRefObj.get(); }
|
||||
|
||||
// Fill data for chart.
|
||||
void UpdateCharts() const;
|
||||
|
||||
@@ -262,7 +262,7 @@ namespace sw { namespace mark
|
||||
{
|
||||
if(m_aRefObj->HasDataLinks())
|
||||
{
|
||||
::sfx2::SvLinkSource* p = &m_aRefObj;
|
||||
::sfx2::SvLinkSource* p = m_aRefObj.get();
|
||||
p->SendDataChanged();
|
||||
}
|
||||
m_aRefObj->SetNoServer();
|
||||
|
||||
@@ -309,7 +309,7 @@ SwDataChanged::~SwDataChanged()
|
||||
// Any one else interested in the Object?
|
||||
if( refObj->HasDataLinks() && dynamic_cast<const SwServerObject*>( refObj.get() ) != nullptr)
|
||||
{
|
||||
SwServerObject& rObj = *static_cast<SwServerObject*>(&refObj);
|
||||
SwServerObject& rObj = *static_cast<SwServerObject*>( refObj.get() );
|
||||
if( pPos )
|
||||
rObj.SendDataChanged( *pPos );
|
||||
else
|
||||
|
||||
@@ -248,7 +248,7 @@ SwSection::~SwSection()
|
||||
|
||||
if (m_RefObj.Is())
|
||||
{
|
||||
pDoc->getIDocumentLinksAdministration().GetLinkManager().RemoveServer( &m_RefObj );
|
||||
pDoc->getIDocumentLinksAdministration().GetLinkManager().RemoveServer( m_RefObj.get() );
|
||||
}
|
||||
|
||||
// If the Section is the last Client in the Format we can delete it
|
||||
@@ -1275,7 +1275,7 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd )
|
||||
sFilter, 0, pDoc->GetDocShell() );
|
||||
if( nRet )
|
||||
{
|
||||
SwDoc* pSrcDoc = static_cast<SwDocShell*>(&xDocSh)->GetDoc();
|
||||
SwDoc* pSrcDoc = static_cast<SwDocShell*>( xDocSh.get() )->GetDoc();
|
||||
eOldRedlineFlags = pSrcDoc->getIDocumentRedlineAccess().GetRedlineFlags();
|
||||
pSrcDoc->getIDocumentRedlineAccess().SetRedlineFlags( RedlineFlags::ShowInsert );
|
||||
}
|
||||
@@ -1298,7 +1298,7 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd )
|
||||
static_cast<const SfxStringItem*>(pItem)->GetValue() );
|
||||
}
|
||||
|
||||
SwDoc* pSrcDoc = static_cast<SwDocShell*>(&xDocSh)->GetDoc();
|
||||
SwDoc* pSrcDoc = static_cast<SwDocShell*>( xDocSh.get() )->GetDoc();
|
||||
|
||||
if( !sRange.isEmpty() )
|
||||
{
|
||||
@@ -1388,8 +1388,8 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd )
|
||||
{
|
||||
if( 2 == nRet )
|
||||
xDocSh->DoClose();
|
||||
else if( static_cast<SwDocShell*>(&xDocSh)->GetDoc() )
|
||||
static_cast<SwDocShell*>(&xDocSh)->GetDoc()->getIDocumentRedlineAccess().SetRedlineFlags(
|
||||
else if( static_cast<SwDocShell*>( xDocSh.get() )->GetDoc() )
|
||||
static_cast<SwDocShell*>( xDocSh.get() )->GetDoc()->getIDocumentRedlineAccess().SetRedlineFlags(
|
||||
eOldRedlineFlags );
|
||||
}
|
||||
}
|
||||
@@ -1513,7 +1513,7 @@ void SwSection::CreateLink( LinkCreateType eCreateType )
|
||||
}
|
||||
|
||||
SwIntrnlSectRefLink *const pLnk =
|
||||
static_cast<SwIntrnlSectRefLink*>(& m_RefLink);
|
||||
static_cast<SwIntrnlSectRefLink*>( m_RefLink.get() );
|
||||
|
||||
const OUString sCmd(SwSectionData::CollapseWhiteSpaces(m_Data.GetLinkFileName()));
|
||||
pLnk->SetUpdateMode( nUpdateType );
|
||||
|
||||
@@ -131,7 +131,7 @@ SwGrfNode::SwGrfNode( const SwNodeIndex & rWhere,
|
||||
FStatHelper::IsDocument( aUrl.GetMainURL( INetURLObject::NO_DECODE ) ))
|
||||
{
|
||||
// file exists, so create connection without an update
|
||||
static_cast<SwBaseLink*>(&refLink)->Connect();
|
||||
static_cast<SwBaseLink*>( refLink.get() )->Connect();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -172,7 +172,7 @@ bool SwGrfNode::ReRead(
|
||||
if( nNewType != refLink->GetObjType() )
|
||||
{
|
||||
refLink->Disconnect();
|
||||
static_cast<SwBaseLink*>(&refLink)->SetObjType( nNewType );
|
||||
static_cast<SwBaseLink*>( refLink.get() )->SetObjType( nNewType );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -214,7 +214,7 @@ bool SwGrfNode::ReRead(
|
||||
else if ( bNewGrf )
|
||||
{
|
||||
//TODO refLink->setInputStream(getInputStream());
|
||||
static_cast<SwBaseLink*>(&refLink)->SwapIn();
|
||||
static_cast<SwBaseLink*>( refLink.get() )->SwapIn();
|
||||
}
|
||||
}
|
||||
onGraphicChanged();
|
||||
@@ -249,7 +249,7 @@ bool SwGrfNode::ReRead(
|
||||
onGraphicChanged();
|
||||
bReadGrf = true;
|
||||
// create connection without update, as we have the graphic
|
||||
static_cast<SwBaseLink*>(&refLink)->Connect();
|
||||
static_cast<SwBaseLink*>( refLink.get() )->Connect();
|
||||
}
|
||||
else if( pGrfObj )
|
||||
{
|
||||
@@ -258,7 +258,7 @@ bool SwGrfNode::ReRead(
|
||||
onGraphicChanged();
|
||||
bReadGrf = true;
|
||||
// create connection without update, as we have the graphic
|
||||
static_cast<SwBaseLink*>(&refLink)->Connect();
|
||||
static_cast<SwBaseLink*>( refLink.get() )->Connect();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -268,7 +268,7 @@ bool SwGrfNode::ReRead(
|
||||
onGraphicChanged();
|
||||
if ( bNewGrf )
|
||||
{
|
||||
static_cast<SwBaseLink*>(&refLink)->SwapIn();
|
||||
static_cast<SwBaseLink*>( refLink.get() )->SwapIn();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,13 +139,10 @@ namespace sw {
|
||||
public:
|
||||
DdeBookmark(const SwPaM& rPaM);
|
||||
|
||||
const SwServerObject* GetRefObject() const
|
||||
{ return &m_aRefObj; }
|
||||
SwServerObject* GetRefObject()
|
||||
{ return &m_aRefObj; }
|
||||
const SwServerObject* GetRefObject() const { return m_aRefObj.get(); }
|
||||
SwServerObject* GetRefObject() { return m_aRefObj.get(); }
|
||||
|
||||
bool IsServer() const
|
||||
{ return m_aRefObj.Is(); }
|
||||
bool IsServer() const { return m_aRefObj.Is(); }
|
||||
|
||||
void SetRefObject( SwServerObject* pObj );
|
||||
|
||||
|
||||
@@ -244,7 +244,7 @@ SwTable::~SwTable()
|
||||
{
|
||||
SwDoc* pDoc = GetFrameFormat()->GetDoc();
|
||||
if( !pDoc->IsInDtor() ) // then remove from the list
|
||||
pDoc->getIDocumentLinksAdministration().GetLinkManager().RemoveServer( &m_xRefObj );
|
||||
pDoc->getIDocumentLinksAdministration().GetLinkManager().RemoveServer( m_xRefObj.get() );
|
||||
|
||||
m_xRefObj->Closed();
|
||||
}
|
||||
|
||||
@@ -3230,9 +3230,9 @@ void WW8Export::ExportDocument_Impl()
|
||||
xTableStrm->SetEndian( SvStreamEndian::LITTLE );
|
||||
xDataStrm->SetEndian( SvStreamEndian::LITTLE );
|
||||
|
||||
GetWriter().SetStream( & *xWwStrm );
|
||||
pTableStrm = &xTableStrm;
|
||||
pDataStrm = &xDataStrm;
|
||||
GetWriter().SetStream( xWwStrm.get() );
|
||||
pTableStrm = xTableStrm.get();
|
||||
pDataStrm = xDataStrm.get();
|
||||
|
||||
Strm().SetEndian( SvStreamEndian::LITTLE );
|
||||
|
||||
@@ -3311,9 +3311,9 @@ void WW8Export::ExportDocument_Impl()
|
||||
if ( bEncrypt )
|
||||
{
|
||||
SvStream *pStrmTemp, *pTableStrmTemp, *pDataStrmTemp;
|
||||
pStrmTemp = &xWwStrm;
|
||||
pTableStrmTemp = &xTableStrm;
|
||||
pDataStrmTemp = &xDataStrm;
|
||||
pStrmTemp = xWwStrm.get();
|
||||
pTableStrmTemp = xTableStrm.get();
|
||||
pDataStrmTemp = xDataStrm.get();
|
||||
|
||||
if ( pDataStrmTemp && pDataStrmTemp != pStrmTemp)
|
||||
EncryptRC4(aCtx, *pDataStrm, *pDataStrmTemp);
|
||||
|
||||
@@ -222,7 +222,7 @@ bool WW8Glossary::Load( SwTextBlocks &rBlocks, bool bSaveRelFile )
|
||||
aPamo.GetPoint()->nContent.Assign(aIdx.GetNode().GetContentNode(),
|
||||
0);
|
||||
std::unique_ptr<SwWW8ImplReader> xRdr(new SwWW8ImplReader(
|
||||
pGlossary->m_nVersion, xStg.get(), &rStrm, *pD, rBlocks.GetBaseURL(),
|
||||
pGlossary->m_nVersion, xStg.get(), rStrm.get(), *pD, rBlocks.GetBaseURL(),
|
||||
true, false, *aPamo.GetPoint()));
|
||||
xRdr->LoadDoc(this);
|
||||
bRet = MakeEntries(pD, rBlocks, bSaveRelFile, aStrings, aData);
|
||||
|
||||
@@ -5440,7 +5440,7 @@ sal_uLong SwWW8ImplReader::SetSubStreams(tools::SvRef<SotStorageStream> &rTableS
|
||||
m_pWwFib->m_fWhichTableStm ? SL::a1Table : SL::a0Table),
|
||||
StreamMode::STD_READ);
|
||||
|
||||
m_pTableStream = &rTableStream;
|
||||
m_pTableStream = rTableStream.get();
|
||||
m_pTableStream->SetEndian( SvStreamEndian::LITTLE );
|
||||
|
||||
rDataStream = m_pStg->OpenSotStream(OUString(SL::aData),
|
||||
@@ -5448,7 +5448,7 @@ sal_uLong SwWW8ImplReader::SetSubStreams(tools::SvRef<SotStorageStream> &rTableS
|
||||
|
||||
if (rDataStream.Is() && SVSTREAM_OK == rDataStream->GetError())
|
||||
{
|
||||
m_pDataStream = &rDataStream;
|
||||
m_pDataStream = rDataStream.get();
|
||||
m_pDataStream->SetEndian(SvStreamEndian::LITTLE);
|
||||
}
|
||||
else
|
||||
@@ -6218,7 +6218,7 @@ sal_uLong WW8Reader::Read(SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, co
|
||||
if( pStg.Is() )
|
||||
{
|
||||
nRet = OpenMainStream( refStrm, nOldBuffSize );
|
||||
pIn = &refStrm;
|
||||
pIn = refStrm.get();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user