diff options
Diffstat (limited to 'sc/source/filter/qpro/qpro.cxx')
-rw-r--r-- | sc/source/filter/qpro/qpro.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sc/source/filter/qpro/qpro.cxx b/sc/source/filter/qpro/qpro.cxx index f6cc4712f457..97b2081cdde1 100644 --- a/sc/source/filter/qpro/qpro.cxx +++ b/sc/source/filter/qpro/qpro.cxx @@ -162,7 +162,7 @@ FltError ScQProReader::import( ScDocument *pDoc ) if( !recordsLeft() ) return eERR_OPEN; - ScQProStyle *pStyleElement = new ScQProStyle; + std::unique_ptr<ScQProStyle> pStyleElement( new ScQProStyle ); while( nextRecord() && eRet == eERR_OK) { @@ -184,7 +184,7 @@ FltError ScQProReader::import( ScDocument *pDoc ) else pDoc->InsertTab( nTab, aName ); } - eRet = readSheet( nTab, pDoc, pStyleElement ); + eRet = readSheet( nTab, pDoc, pStyleElement.get() ); nTab++; } break; @@ -220,7 +220,6 @@ FltError ScQProReader::import( ScDocument *pDoc ) } } pDoc->CalcAfterLoad(); - delete pStyleElement; return eRet; } |