loplugin:useuniqueptr in XclObj
Change-Id: I2995dfe5fb39ae2e7f3c37992cb3e2147381784e Reviewed-on: https://gerrit.libreoffice.org/57753 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
parent
8c63897b83
commit
82a2a8f29e
@ -88,6 +88,10 @@ public:
|
||||
// SwHTMLParser::m_pPendStack
|
||||
if (fn == SRCDIR "/sw/source/filter/html/htmlcss1.cxx")
|
||||
return;
|
||||
// Visual Studio 2017 has trouble with these
|
||||
if (fn == SRCDIR "/comphelper/source/property/MasterPropertySet.cxx"
|
||||
|| fn == SRCDIR "/comphelper/source/property/MasterPropertySetInfo.cxx")
|
||||
return;
|
||||
|
||||
|
||||
TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
|
||||
|
@ -743,7 +743,7 @@ XclExpTbxControlObj::XclExpTbxControlObj( XclExpObjectManager& rRoot, Reference<
|
||||
/* Be sure to construct the MSODRAWING record containing the
|
||||
ClientTextbox atom after the base OBJ's MSODRAWING record data is
|
||||
completed. */
|
||||
pClientTextbox = new XclExpMsoDrawing( mrEscherEx );
|
||||
pClientTextbox.reset( new XclExpMsoDrawing( mrEscherEx ) );
|
||||
mrEscherEx.AddAtom( 0, ESCHER_ClientTextbox ); // TXO record
|
||||
mrEscherEx.UpdateDffFragmentEnd();
|
||||
|
||||
@ -756,7 +756,7 @@ XclExpTbxControlObj::XclExpTbxControlObj( XclExpObjectManager& rRoot, Reference<
|
||||
nXclFont = GetFontBuffer().Insert( aFontData, EXC_COLOR_CTRLTEXT );
|
||||
}
|
||||
|
||||
pTxo = new XclTxo( aString, nXclFont );
|
||||
pTxo.reset( new XclTxo( aString, nXclFont ) );
|
||||
pTxo->SetHorAlign( (mnObjType == EXC_OBJTYPE_BUTTON) ? EXC_OBJ_HOR_CENTER : EXC_OBJ_HOR_LEFT );
|
||||
pTxo->SetVerAlign( EXC_OBJ_VER_CENTER );
|
||||
}
|
||||
|
@ -87,8 +87,8 @@ class XclObj : public XclExpRecord
|
||||
protected:
|
||||
XclEscherEx& mrEscherEx;
|
||||
XclExpMsoDrawing* pMsodrawing;
|
||||
XclExpMsoDrawing* pClientTextbox;
|
||||
XclTxo* pTxo;
|
||||
std::unique_ptr<XclExpMsoDrawing> pClientTextbox;
|
||||
std::unique_ptr<XclTxo> pTxo;
|
||||
sal_uInt16 mnObjType;
|
||||
sal_uInt16 nObjId;
|
||||
sal_uInt16 nGrbit;
|
||||
|
@ -338,8 +338,6 @@ void XclExpObjList::ResetCounters()
|
||||
XclObj::XclObj( XclExpObjectManager& rObjMgr, sal_uInt16 nObjType, bool bOwnEscher ) :
|
||||
XclExpRecord( EXC_ID_OBJ, 26 ),
|
||||
mrEscherEx( rObjMgr.GetEscherEx() ),
|
||||
pClientTextbox( nullptr ),
|
||||
pTxo( nullptr ),
|
||||
mnObjType( nObjType ),
|
||||
nObjId(0),
|
||||
nGrbit( 0x6011 ), // AutoLine, AutoFill, Printable, Locked
|
||||
@ -358,8 +356,8 @@ XclObj::~XclObj()
|
||||
{
|
||||
if ( !bFirstOnSheet )
|
||||
delete pMsodrawing;
|
||||
delete pClientTextbox;
|
||||
delete pTxo;
|
||||
pClientTextbox.reset();
|
||||
pTxo.reset();
|
||||
}
|
||||
|
||||
void XclObj::ImplWriteAnchor( const SdrObject* pSdrObj, const tools::Rectangle* pChildAnchor )
|
||||
@ -410,10 +408,10 @@ void XclObj::SetText( const XclExpRoot& rRoot, const SdrTextObj& rObj )
|
||||
if ( !pClientTextbox )
|
||||
{
|
||||
mrEscherEx.UpdateDffFragmentEnd();
|
||||
pClientTextbox = new XclExpMsoDrawing( mrEscherEx );
|
||||
pClientTextbox.reset( new XclExpMsoDrawing( mrEscherEx ) );
|
||||
mrEscherEx.AddAtom( 0, ESCHER_ClientTextbox ); // TXO record
|
||||
mrEscherEx.UpdateDffFragmentEnd();
|
||||
pTxo = new XclTxo( rRoot, rObj );
|
||||
pTxo.reset( new XclTxo( rRoot, rObj ) );
|
||||
}
|
||||
}
|
||||
|
||||
@ -514,7 +512,7 @@ XclObjComment::XclObjComment( XclExpObjectManager& rObjMgr, const tools::Rectang
|
||||
{
|
||||
ProcessEscherObj( rObjMgr.GetRoot(), rRect, pCaption, bVisible);
|
||||
// TXO
|
||||
pTxo = new XclTxo( rObjMgr.GetRoot(), rEditObj, pCaption );
|
||||
pTxo .reset(new XclTxo( rObjMgr.GetRoot(), rEditObj, pCaption ));
|
||||
}
|
||||
|
||||
static void lcl_FillProps( EscherPropertyContainer& rPropOpt, SdrObject* pCaption, bool bVisible )
|
||||
@ -584,7 +582,7 @@ void XclObjComment::ProcessEscherObj( const XclExpRoot& rRoot, const tools::Rect
|
||||
|
||||
//! Be sure to construct the MSODRAWING ClientTextbox record _after_ the
|
||||
//! base OBJ's MSODRAWING record Escher data is completed.
|
||||
pClientTextbox = new XclExpMsoDrawing( mrEscherEx );
|
||||
pClientTextbox.reset( new XclExpMsoDrawing( mrEscherEx ) );
|
||||
mrEscherEx.AddAtom( 0, ESCHER_ClientTextbox ); // TXO record
|
||||
mrEscherEx.UpdateDffFragmentEnd();
|
||||
mrEscherEx.CloseContainer(); // ESCHER_SpContainer
|
||||
|
Loading…
x
Reference in New Issue
Block a user