filter/source/flash/swfwriter.cxx | 5 +++-- filter/source/flash/swfwriter.hxx | 5 +---- filter/source/flash/swfwriter1.cxx | 2 +- sc/source/ui/docshell/olinefun.cxx | 4 +--- sc/source/ui/inc/olinefun.hxx | 2 +- sc/source/ui/view/dbfunc3.cxx | 4 ++-- 6 files changed, 9 insertions(+), 13 deletions(-)
New commits: commit 899fbd617b32771bc8c14effc52a7153465adf5d Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Tue Aug 14 17:11:26 2018 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Thu Aug 16 11:51:20 2018 +0200 loplugin:returnconstant in ScOutlineDocFunc Change-Id: I036a860bd861f0fa1136d242a5e042c5c56d4226 Reviewed-on: https://gerrit.libreoffice.org/59125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sc/source/ui/docshell/olinefun.cxx b/sc/source/ui/docshell/olinefun.cxx index 90df8eb475ba..4060625466fa 100644 --- a/sc/source/ui/docshell/olinefun.cxx +++ b/sc/source/ui/docshell/olinefun.cxx @@ -637,7 +637,7 @@ bool ScOutlineDocFunc::HideMarkedOutlines( const ScRange& rRange, bool bRecord ) return bDone; } -bool ScOutlineDocFunc::ShowOutline( SCTAB nTab, bool bColumns, sal_uInt16 nLevel, sal_uInt16 nEntry, +void ScOutlineDocFunc::ShowOutline( SCTAB nTab, bool bColumns, sal_uInt16 nLevel, sal_uInt16 nEntry, bool bRecord, bool bPaint ) { ScDocument& rDoc = rDocShell.GetDocument(); @@ -723,8 +723,6 @@ bool ScOutlineDocFunc::ShowOutline( SCTAB nTab, bool bColumns, sal_uInt16 nLevel rDocShell.SetDocumentModified(); lcl_InvalidateOutliner( rDocShell.GetViewBindings() ); - - return true; //! always ??? } bool ScOutlineDocFunc::HideOutline( SCTAB nTab, bool bColumns, sal_uInt16 nLevel, sal_uInt16 nEntry, diff --git a/sc/source/ui/inc/olinefun.hxx b/sc/source/ui/inc/olinefun.hxx index 6129cb49801d..89e34eca32c4 100644 --- a/sc/source/ui/inc/olinefun.hxx +++ b/sc/source/ui/inc/olinefun.hxx @@ -44,7 +44,7 @@ public: bool ShowMarkedOutlines( const ScRange& rRange, bool bRecord ); bool HideMarkedOutlines( const ScRange& rRange, bool bRecord ); - bool ShowOutline( SCTAB nTab, bool bColumns, sal_uInt16 nLevel, sal_uInt16 nEntry, + void ShowOutline( SCTAB nTab, bool bColumns, sal_uInt16 nLevel, sal_uInt16 nEntry, bool bRecord, bool bPaint ); bool HideOutline( SCTAB nTab, bool bColumns, sal_uInt16 nLevel, sal_uInt16 nEntry, bool bRecord, bool bPaint ); diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx index 008d57eb9f49..f5b1e6b9d670 100644 --- a/sc/source/ui/view/dbfunc3.cxx +++ b/sc/source/ui/view/dbfunc3.cxx @@ -253,9 +253,9 @@ void ScDBFunc::ShowOutline( bool bColumns, sal_uInt16 nLevel, sal_uInt16 nEntry, ScDocShell* pDocSh = GetViewData().GetDocShell(); ScOutlineDocFunc aFunc(*pDocSh); - bool bOk = aFunc.ShowOutline( nTab, bColumns, nLevel, nEntry, bRecord, bPaint ); + aFunc.ShowOutline( nTab, bColumns, nLevel, nEntry, bRecord, bPaint ); - if ( bOk && bPaint ) + if ( bPaint ) UpdateScrollBars(bColumns ? COLUMN_HEADER : ROW_HEADER); } commit fbba9324c7df5f459dfe10795021ad3bf77da423 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Tue Aug 14 10:06:13 2018 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Thu Aug 16 11:51:10 2018 +0200 loplugin:useuniqueptr in swf::Writer Change-Id: Id10d9b120cf81b1576da48840f84353537466d17 Reviewed-on: https://gerrit.libreoffice.org/59027 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/filter/source/flash/swfwriter.cxx b/filter/source/flash/swfwriter.cxx index b2e22b9685c0..04b47a640e25 100644 --- a/filter/source/flash/swfwriter.cxx +++ b/filter/source/flash/swfwriter.cxx @@ -128,11 +128,12 @@ void ImplCopySvStreamToXOutputStream( SvStream& rIn, Reference< XOutputStream > void Writer::storeTo( Reference< XOutputStream > const &xOutStream ) { - for (auto const& font : maFonts) + for (auto & font : maFonts) { font->write( *mpFontsStream ); - delete font; + font.reset(); } + maFonts.clear(); // Endtag mpMovieStream->WriteUInt16( 0 ); diff --git a/filter/source/flash/swfwriter.hxx b/filter/source/flash/swfwriter.hxx index da781c2cf4da..68c349934ba5 100644 --- a/filter/source/flash/swfwriter.hxx +++ b/filter/source/flash/swfwriter.hxx @@ -156,9 +156,6 @@ private: std::vector< sal_uInt16 > maGlyphOffsets; }; -typedef std::vector<FlashFont*> FontMap; - - /** this class helps creating flash tags */ class Tag : public SvMemoryStream { @@ -363,7 +360,7 @@ private: private: css::uno::Reference< css::i18n::XBreakIterator > mxBreakIterator; - FontMap maFonts; + std::vector<std::unique_ptr<FlashFont>> maFonts; sal_Int32 mnDocWidth; sal_Int32 mnDocHeight; diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx index 882a4794401d..067f238bd31c 100644 --- a/filter/source/flash/swfwriter1.cxx +++ b/filter/source/flash/swfwriter1.cxx @@ -376,7 +376,7 @@ FlashFont& Writer::Impl_getFont( const vcl::Font& rFont ) } FlashFont* pFont = new FlashFont( rFont, createID() ); - maFonts.push_back( pFont ); + maFonts.emplace_back( pFont ); return *pFont; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits