Kaydet (Commit) 6008cfd6 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:returnconstant in filter

Change-Id: I0ebbd835ddc50e984920950e1559faf163c2c30f
Reviewed-on: https://gerrit.libreoffice.org/58429
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst f53470d1
......@@ -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)
......
......@@ -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);
......
......@@ -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;
......
......@@ -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,
......
......@@ -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;
}
......
......@@ -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
......
......@@ -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;
}
......
......@@ -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;
......
......@@ -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: */
......@@ -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
......
......@@ -493,14 +493,14 @@ protected:
OUString const& rBaseURL);
// the following methods need to be overridden for Excel imports
static bool ProcessClientAnchor( SvStream& rStData,
static void ProcessClientAnchor( SvStream& rStData,
sal_uInt32 nDatLen,
std::unique_ptr<char[]>& rpBuff,
sal_uInt32& rBuffLen );
virtual void ProcessClientAnchor2( SvStream& rStData,
DffRecordHeader& rHd,
void* pData, DffObjData& );
static bool ProcessClientData( SvStream& rStData,
static void ProcessClientData( SvStream& rStData,
sal_uInt32 nDatLen,
std::unique_ptr<char[]>& rpBuff,
sal_uInt32& rBuffLen );
......
......@@ -290,7 +290,7 @@ public:
#ifdef DEBUG_FILTER_MSTOOLBAR
virtual void Print( FILE* ) override;
#endif
bool ImportToolBarControl( CustomToolBarImportHelper&, std::vector< css::beans::PropertyValue >&, bool& bBeginGroup, bool bIsMenuBar );
void ImportToolBarControl( CustomToolBarImportHelper&, std::vector< css::beans::PropertyValue >&, bool& bBeginGroup, bool bIsMenuBar );
TBCGeneralInfo& getGeneralInfo() { return controlGeneralInfo; }
TBCMenuSpecific* getMenuSpecific();
};
......
......@@ -264,8 +264,7 @@ bool ScTBC::ImportToolBarControl( ScCTBWrapper& rWrapper, const css::uno::Refere
{
std::vector< css::beans::PropertyValue > props;
bool bBeginGroup = false;
if ( ! tbcd->ImportToolBarControl( helper, props, bBeginGroup, bIsMenuToolbar ) )
return false;
tbcd->ImportToolBarControl( helper, props, bBeginGroup, bIsMenuToolbar );
TBCMenuSpecific* pMenu = tbcd->getMenuSpecific();
if ( pMenu )
{
......
......@@ -564,8 +564,7 @@ SwTBC::ImportToolBarControl( SwCTBWrapper& rWrapper, const css::uno::Reference<
}
}
bool bBeginGroup = false;
if ( ! tbcd->ImportToolBarControl( helper, props, bBeginGroup, bIsMenuBar ) )
return false;
tbcd->ImportToolBarControl( helper, props, bBeginGroup, bIsMenuBar );
TBCMenuSpecific* pMenu = tbcd->getMenuSpecific();
if ( pMenu )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment