diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-01 16:13:41 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-02 14:24:52 +0200 |
commit | 6008cfd6cd661e5fe0b73a43e908d6cac5ffc2d1 (patch) | |
tree | f065616a6d3741fec0ee140df2f1a7fd4bad5580 /filter | |
parent | f53470d1e6ab1d29019919c8e37a55f1481d80d3 (diff) |
loplugin:returnconstant in filter
Change-Id: I0ebbd835ddc50e984920950e1559faf163c2c30f
Reviewed-on: https://gerrit.libreoffice.org/58429
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/config/cache/typedetection.cxx | 4 | ||||
-rw-r--r-- | filter/source/config/cache/typedetection.hxx | 2 | ||||
-rw-r--r-- | filter/source/msfilter/eschesdo.cxx | 10 | ||||
-rw-r--r-- | filter/source/msfilter/eschesdo.hxx | 2 | ||||
-rw-r--r-- | filter/source/msfilter/msdffimp.cxx | 6 | ||||
-rw-r--r-- | filter/source/msfilter/mstoolbar.cxx | 3 | ||||
-rw-r--r-- | filter/source/pdf/pdfexport.cxx | 9 | ||||
-rw-r--r-- | filter/source/pdf/pdfexport.hxx | 2 | ||||
-rw-r--r-- | filter/source/t602/t602filter.cxx | 6 | ||||
-rw-r--r-- | filter/source/t602/t602filter.hxx | 2 |
10 files changed, 19 insertions, 27 deletions
diff --git a/filter/source/config/cache/typedetection.cxx b/filter/source/config/cache/typedetection.cxx index c170b74533d8..d4ef42281efd 100644 --- a/filter/source/config/cache/typedetection.cxx +++ b/filter/source/config/cache/typedetection.cxx @@ -724,7 +724,7 @@ bool TypeDetection::impl_getPreselectionForType( return false; } -bool TypeDetection::impl_getPreselectionForDocumentService( +void TypeDetection::impl_getPreselectionForDocumentService( const OUString& sPreSelDocumentService, const util::URL& aParsedURL, FlatDetection& rFlatTypes) { // get all filters, which match to this doc service @@ -765,8 +765,6 @@ bool TypeDetection::impl_getPreselectionForDocumentService( impl_getPreselectionForType(aType, aParsedURL, rFlatTypes, true); } - - return true; } OUString TypeDetection::impl_getTypeFromFilter(const OUString& rFilterName) diff --git a/filter/source/config/cache/typedetection.hxx b/filter/source/config/cache/typedetection.hxx index 17d5c1a1f47a..bbe95a76400e 100644 --- a/filter/source/config/cache/typedetection.hxx +++ b/filter/source/config/cache/typedetection.hxx @@ -75,7 +75,7 @@ private: bool impl_getPreselectionForType( const OUString& sPreSelType, const css::util::URL& aParsedURL, FlatDetection& rFlatTypes, bool bDocService); - bool impl_getPreselectionForDocumentService( + void impl_getPreselectionForDocumentService( const OUString& sPreSelDocumentService, const css::util::URL& aParsedURL, FlatDetection& rFlatTypes); OUString impl_getTypeFromFilter(const OUString& rFilterName); diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx index 94aaad804005..a994c47543cc 100644 --- a/filter/source/msfilter/eschesdo.cxx +++ b/filter/source/msfilter/eschesdo.cxx @@ -818,11 +818,9 @@ sal_uInt32 ImplEESdrWriter::ImplEnterAdditionalTextGroup( const Reference< XShap } -bool ImplEESdrWriter::ImplInitPageValues() +void ImplEESdrWriter::ImplInitPageValues() { mbIsTitlePossible = true; // With more than one title PowerPoint will fail. - - return true; } void ImplEESdrWriter::ImplWritePage( @@ -873,8 +871,7 @@ bool ImplEESdrWriter::ImplInitPage( const SdrPage& rPage ) mXShapes.set( mXDrawPage, UNO_QUERY ); if ( !mXShapes.is() ) return false; - if ( !ImplInitPageValues() ) // ImplEESdrWriter - return false; + ImplInitPageValues(); mpSdrPage = &rPage; mpSolverContainer.reset( new EscherSolverContainer ); @@ -897,8 +894,7 @@ bool ImplEESdrWriter::ImplInitUnoShapes( const Reference< XShapes >& rxShapes ) mXDrawPage.clear(); mXShapes = rxShapes; - if( !ImplInitPageValues() ) // ImplEESdrWriter - return false; + ImplInitPageValues(); mpSolverContainer.reset( new EscherSolverContainer ); return true; diff --git a/filter/source/msfilter/eschesdo.hxx b/filter/source/msfilter/eschesdo.hxx index 3cdb9ef430f8..537e78aa5761 100644 --- a/filter/source/msfilter/eschesdo.hxx +++ b/filter/source/msfilter/eschesdo.hxx @@ -117,7 +117,7 @@ class ImplEESdrWriter const SdrPage* mpSdrPage; std::unique_ptr<EscherSolverContainer> mpSolverContainer; - bool ImplInitPageValues(); + void ImplInitPageValues(); void ImplWritePage( EscherSolverContainer& rSolver ); sal_uInt32 ImplWriteShape( ImplEESdrObject& rObj, EscherSolverContainer& rSolver, diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 09a80f4a2cb6..fc59e6356a09 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -6607,7 +6607,7 @@ bool SvxMSDffManager::ReadCommonRecordHeader(SvStream& rSt, return true; } -bool SvxMSDffManager::ProcessClientAnchor(SvStream& rStData, sal_uInt32 nDatLen, +void SvxMSDffManager::ProcessClientAnchor(SvStream& rStData, sal_uInt32 nDatLen, std::unique_ptr<char[]>& rpBuff, sal_uInt32& rBuffLen ) { if( nDatLen ) @@ -6616,10 +6616,9 @@ bool SvxMSDffManager::ProcessClientAnchor(SvStream& rStData, sal_uInt32 nDatLen, rpBuff.reset( new char[rBuffLen] ); rBuffLen = rStData.ReadBytes(rpBuff.get(), rBuffLen); } - return true; } -bool SvxMSDffManager::ProcessClientData(SvStream& rStData, sal_uInt32 nDatLen, +void SvxMSDffManager::ProcessClientData(SvStream& rStData, sal_uInt32 nDatLen, std::unique_ptr<char[]>& rpBuff, sal_uInt32& rBuffLen ) { if( nDatLen ) @@ -6628,7 +6627,6 @@ bool SvxMSDffManager::ProcessClientData(SvStream& rStData, sal_uInt32 nDatLen, rpBuff.reset( new char[rBuffLen] ); rBuffLen = rStData.ReadBytes(rpBuff.get(), rBuffLen); } - return true; } diff --git a/filter/source/msfilter/mstoolbar.cxx b/filter/source/msfilter/mstoolbar.cxx index 5761d896a571..62147ae598eb 100644 --- a/filter/source/msfilter/mstoolbar.cxx +++ b/filter/source/msfilter/mstoolbar.cxx @@ -266,7 +266,7 @@ TBCMenuSpecific* TBCData::getMenuSpecific() TBCMenuSpecific* pMenu = dynamic_cast< TBCMenuSpecific* >( controlSpecificInfo.get() ); return pMenu; } -bool TBCData::ImportToolBarControl( CustomToolBarImportHelper& helper, std::vector< css::beans::PropertyValue >& props, bool& bBeginGroup, bool bIsMenuBar ) +void TBCData::ImportToolBarControl( CustomToolBarImportHelper& helper, std::vector< css::beans::PropertyValue >& props, bool& bBeginGroup, bool bIsMenuBar ) { sal_uInt16 nStyle = 0; bBeginGroup = rHeader.isBeginGroup(); @@ -359,7 +359,6 @@ bool TBCData::ImportToolBarControl( CustomToolBarImportHelper& helper, std::vect } aProp.Value <<= nStyle; props.push_back( aProp ); - return true; // just ignore } #ifdef DEBUG_FILTER_MSTOOLBAR diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx index 6f91cdc53b3c..33bcdde3f2f0 100644 --- a/filter/source/pdf/pdfexport.cxx +++ b/filter/source/pdf/pdfexport.cxx @@ -225,7 +225,10 @@ bool PDFExport::ExportSelection( vcl::PDFWriter& rPDFWriter, if( aMtf.GetActionSize() && ( !mbSkipEmptyPages || aPageSize.Width || aPageSize.Height ) ) - bRet = ImplExportPage(rPDFWriter, rPDFExtOutDevData, aMtf) || bRet; + { + ImplExportPage(rPDFWriter, rPDFExtOutDevData, aMtf); + bRet = true; + } pOut->Pop(); @@ -1002,7 +1005,7 @@ void PDFExport::showErrors( const std::set< vcl::PDFWriter::ErrorCode >& rErrors } -bool PDFExport::ImplExportPage( vcl::PDFWriter& rWriter, vcl::PDFExtOutDevData& rPDFExtOutDevData, const GDIMetaFile& rMtf ) +void PDFExport::ImplExportPage( vcl::PDFWriter& rWriter, vcl::PDFExtOutDevData& rPDFExtOutDevData, const GDIMetaFile& rMtf ) { //Rectangle(Point, Size) creates a rectangle off by 1, use Rectangle(long, long, long, long) instead basegfx::B2DPolygon aSize(tools::Polygon(tools::Rectangle(0, 0, rMtf.GetPrefSize().Width(), rMtf.GetPrefSize().Height())).getB2DPolygon()); @@ -1039,8 +1042,6 @@ bool PDFExport::ImplExportPage( vcl::PDFWriter& rWriter, vcl::PDFExtOutDevData& if (!msWatermark.isEmpty()) ImplWriteWatermark( rWriter, Size(aRangePDF.getWidth(), aRangePDF.getHeight()) ); - - return true; } diff --git a/filter/source/pdf/pdfexport.hxx b/filter/source/pdf/pdfexport.hxx index 4a371433263a..01befed55986 100644 --- a/filter/source/pdf/pdfexport.hxx +++ b/filter/source/pdf/pdfexport.hxx @@ -94,7 +94,7 @@ private: sal_Int32 mnDefaultLinkAction; bool mbConvertOOoTargetToPDFTarget; bool mbExportBmkToDest; - bool ImplExportPage( vcl::PDFWriter& rWriter, vcl::PDFExtOutDevData& rPDFExtOutDevData, + void ImplExportPage( vcl::PDFWriter& rWriter, vcl::PDFExtOutDevData& rPDFExtOutDevData, const GDIMetaFile& rMtf ); bool mbSignPDF; diff --git a/filter/source/t602/t602filter.cxx b/filter/source/t602/t602filter.cxx index 9418323359b9..5eb7a4058ee7 100644 --- a/filter/source/t602/t602filter.cxx +++ b/filter/source/t602/t602filter.cxx @@ -438,11 +438,10 @@ bool T602ImportFilter::importImpl( const Sequence< css::beans::PropertyValue >& return true; } -bool T602ImportFilter::test() +void T602ImportFilter::test() { Reset602(); Read602(); - return true; } void T602ImportFilter::Reset602() @@ -1159,7 +1158,8 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool TestImport602(SvStream &rStream) css::uno::Reference<io::XInputStream> xStream(new utl::OSeekableInputStreamWrapper(rStream)); rtl::Reference<T602ImportFilter::T602ImportFilter> aImport( new T602ImportFilter::T602ImportFilter(xStream)); - return aImport->test(); + aImport->test(); + return true; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/filter/source/t602/t602filter.hxx b/filter/source/t602/t602filter.hxx index 22abefa78838..5eeebdab0707 100644 --- a/filter/source/t602/t602filter.hxx +++ b/filter/source/t602/t602filter.hxx @@ -247,7 +247,7 @@ private: virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override; virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override; - bool test(); + void test(); }; /// @throws css::uno::RuntimeException |