clang-tidy performance-unnecessary-value-param in filter

Change-Id: I6818f6c9593bfe7105cc194fcf6f69131046e4f3
This commit is contained in:
Noel Grandin 2016-04-12 11:25:03 +02:00
parent dbd1f4b75a
commit 6a8873c874
21 changed files with 38 additions and 38 deletions

View File

@ -129,7 +129,7 @@ const sal_uInt16 cBackgroundObjectsDepth = 3;
const sal_uInt16 cPageObjectsDepth = 4;
const sal_uInt16 cWaitButtonDepth = 10;
bool FlashExporter::exportAll( Reference< XComponent > xDoc, Reference< XOutputStream > &xOutputStream, Reference< XStatusIndicator> &xStatusIndicator )
bool FlashExporter::exportAll( const Reference< XComponent >& xDoc, Reference< XOutputStream > &xOutputStream, Reference< XStatusIndicator> &xStatusIndicator )
{
Reference< XServiceInfo > xDocServInfo( xDoc, UNO_QUERY );
if( xDocServInfo.is() )
@ -272,7 +272,7 @@ bool FlashExporter::exportAll( Reference< XComponent > xDoc, Reference< XOutputS
}
bool FlashExporter::exportSlides( Reference< XDrawPage > xDrawPage, Reference< XOutputStream > &xOutputStream, sal_uInt16 /* nPage */ )
bool FlashExporter::exportSlides( const Reference< XDrawPage >& xDrawPage, Reference< XOutputStream > &xOutputStream, sal_uInt16 /* nPage */ )
{
Reference< XPropertySet > xPropSet( xDrawPage, UNO_QUERY );
if( !xDrawPage.is() || !xPropSet.is() )
@ -308,7 +308,7 @@ bool FlashExporter::exportSlides( Reference< XDrawPage > xDrawPage, Reference< X
return true;
}
sal_uInt16 FlashExporter::exportBackgrounds( Reference< XDrawPage > xDrawPage, Reference< XOutputStream > &xOutputStream, sal_uInt16 nPage, bool bExportObjects )
sal_uInt16 FlashExporter::exportBackgrounds( const Reference< XDrawPage >& xDrawPage, Reference< XOutputStream > &xOutputStream, sal_uInt16 nPage, bool bExportObjects )
{
Reference< XPropertySet > xPropSet( xDrawPage, UNO_QUERY );
if( !xDrawPage.is() || !xPropSet.is() )

View File

@ -128,9 +128,9 @@ public:
void Flush();
bool exportAll( css::uno::Reference< css::lang::XComponent > xDoc, css::uno::Reference< css::io::XOutputStream > &xOutputStream, css::uno::Reference< css::task::XStatusIndicator> &xStatusIndicator );
bool exportSlides( css::uno::Reference< css::drawing::XDrawPage > xDrawPage, css::uno::Reference< css::io::XOutputStream > &xOutputStream, sal_uInt16 nPage);
sal_uInt16 exportBackgrounds( css::uno::Reference< css::drawing::XDrawPage > xDrawPage, css::uno::Reference< css::io::XOutputStream > &xOutputStream, sal_uInt16 nPage, bool bExportObjects );
bool exportAll( const css::uno::Reference< css::lang::XComponent >& xDoc, css::uno::Reference< css::io::XOutputStream > &xOutputStream, css::uno::Reference< css::task::XStatusIndicator> &xStatusIndicator );
bool exportSlides( const css::uno::Reference< css::drawing::XDrawPage >& xDrawPage, css::uno::Reference< css::io::XOutputStream > &xOutputStream, sal_uInt16 nPage);
sal_uInt16 exportBackgrounds( const css::uno::Reference< css::drawing::XDrawPage >& xDrawPage, css::uno::Reference< css::io::XOutputStream > &xOutputStream, sal_uInt16 nPage, bool bExportObjects );
sal_uInt16 exportBackgrounds( css::uno::Reference< css::drawing::XDrawPage > xDrawPage, sal_uInt16 nPage, bool bExportObjects );
ChecksumCache gMasterCache;

View File

@ -186,7 +186,7 @@ FlashExportFilter::FlashExportFilter(const Reference< XComponentContext > &rxCon
{
}
OUString exportBackground(FlashExporter &aFlashExporter, Reference< XDrawPage > xDrawPage, const OUString& sPath, sal_uInt32 nPage, const char* suffix)
OUString exportBackground(FlashExporter &aFlashExporter, const Reference< XDrawPage >& xDrawPage, const OUString& sPath, sal_uInt32 nPage, const char* suffix)
{
OUString filename = STR("slide") + VAL(nPage+1) + STR(suffix) + STR(".swf");
OUString fullpath = sPath + STR("/") + filename;

View File

@ -1124,7 +1124,7 @@ void EscherPropertyContainer::CreateLineProperties(
}
}
static Size lcl_SizeToEmu(Size aPrefSize, MapMode aPrefMapMode)
static Size lcl_SizeToEmu(Size aPrefSize, const MapMode& aPrefMapMode)
{
Size aRetSize;
if (aPrefMapMode == MAP_PIXEL)

View File

@ -3691,7 +3691,7 @@ OUString SvxMSDffManager::MSDFFReadZString(SvStream& rIn,
return comphelper::string::stripEnd(sBuf, 0);
}
static Size lcl_GetPrefSize(const Graphic& rGraf, MapMode aWanted)
static Size lcl_GetPrefSize(const Graphic& rGraf, const MapMode& aWanted)
{
MapMode aPrefMapMode(rGraf.GetPrefMapMode());
if (aPrefMapMode == aWanted)

View File

@ -7343,7 +7343,7 @@ void GetLinePositions( const SdrObject* pObj, const std::set< sal_Int32 >& rRows
}
}
void CreateTableRows( Reference< XTableRows > xTableRows, const std::set< sal_Int32 >& rRows, sal_Int32 nTableBottom )
void CreateTableRows( const Reference< XTableRows >& xTableRows, const std::set< sal_Int32 >& rRows, sal_Int32 nTableBottom )
{
if ( rRows.size() > 1 )
xTableRows->insertByIndex( 0, rRows.size() - 1 );
@ -7367,7 +7367,7 @@ void CreateTableRows( Reference< XTableRows > xTableRows, const std::set< sal_In
}
}
void CreateTableColumns( Reference< XTableColumns > xTableColumns, const std::set< sal_Int32 >& rColumns, sal_Int32 nTableRight )
void CreateTableColumns( const Reference< XTableColumns >& xTableColumns, const std::set< sal_Int32 >& rColumns, sal_Int32 nTableRight )
{
if ( rColumns.size() > 1 )
xTableColumns->insertByIndex( 0, rColumns.size() - 1 );

View File

@ -179,7 +179,7 @@ static OString convertString( const OUString& aInput )
return aRet;
}
static void createSlideFile( Reference< XComponent > xDoc, PlacewareZipFile& rZipFile, const OUString& rURL, vector< PageEntry* >& rPageEntries ) throw( css::uno::Exception, std::exception )
static void createSlideFile( const Reference< XComponent >& xDoc, PlacewareZipFile& rZipFile, const OUString& rURL, vector< PageEntry* >& rPageEntries ) throw( css::uno::Exception, std::exception )
{
OString aInfo;
@ -282,8 +282,8 @@ static void createSlideFile( Reference< XComponent > xDoc, PlacewareZipFile& rZi
//#define PLACEWARE_DEBUG 1
bool PlaceWareExporter::doExport( Reference< XComponent > xDoc, Reference < XOutputStream > xOutputStream,
const OUString& rURL, Reference < XInterface > /* xHandler */, Reference < XStatusIndicator >& xStatusIndicator )
bool PlaceWareExporter::doExport( const Reference< XComponent >& xDoc, Reference < XOutputStream > xOutputStream,
const OUString& rURL, const Reference < XInterface >& /* xHandler */, Reference < XStatusIndicator >& xStatusIndicator )
{
bool bRet = false;

View File

@ -35,10 +35,10 @@ public:
explicit PlaceWareExporter( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
~PlaceWareExporter();
bool doExport( css::uno::Reference< css::lang::XComponent > xDoc,
bool doExport( const css::uno::Reference< css::lang::XComponent >& xDoc,
css::uno::Reference < css::io::XOutputStream > xOutputStream,
const OUString& rURL,
css::uno::Reference < css::uno::XInterface > xHandler,
const css::uno::Reference < css::uno::XInterface >& xHandler,
css::uno::Reference < css::task::XStatusIndicator >& rxStatusIndicator );
private:

View File

@ -118,7 +118,7 @@ public:
{
pSVGExport->AddAttribute( XML_NAMESPACE_NONE, "class", getClassName() );
}
void insertMasterPage( Reference< XDrawPage> xMasterPage )
void insertMasterPage( const Reference< XDrawPage>& xMasterPage )
{
mMasterPageSet.insert( xMasterPage );
}
@ -907,7 +907,7 @@ template< typename TextFieldType >
OUString implGenerateFieldId( std::vector< TextField* > & aFieldSet,
const TextFieldType & aField,
const OUString & sOOOElemField,
Reference< XDrawPage > xMasterPage )
const Reference< XDrawPage >& xMasterPage )
{
bool bFound = false;
sal_Int32 i;

View File

@ -304,7 +304,7 @@ void SAL_CALL SVGFilter::setTargetDocument( const Reference< XComponent >& xDoc
mxDstDoc = xDoc;
}
bool SVGFilter::isStreamGZip(uno::Reference<io::XInputStream> xInput)
bool SVGFilter::isStreamGZip(const uno::Reference<io::XInputStream>& xInput)
{
uno::Reference<io::XSeekable> xSeek(xInput, uno::UNO_QUERY);
if(xSeek.is())
@ -321,7 +321,7 @@ bool SVGFilter::isStreamGZip(uno::Reference<io::XInputStream> xInput)
return false;
}
bool SVGFilter::isStreamSvg(uno::Reference<io::XInputStream> xInput)
bool SVGFilter::isStreamSvg(const uno::Reference<io::XInputStream>& xInput)
{
uno::Reference<io::XSeekable> xSeek(xInput, uno::UNO_QUERY);
if(xSeek.is())

View File

@ -289,8 +289,8 @@ private:
const Reference< XPropertySetInfo > & rxPropSetInfo );
DECL_LINK_TYPED( CalcFieldHdl, EditFieldInfo*, void );
static bool isStreamGZip(css::uno::Reference<css::io::XInputStream> xInput);
static bool isStreamSvg(css::uno::Reference<css::io::XInputStream> xInput);
static bool isStreamGZip(const css::uno::Reference<css::io::XInputStream>& xInput);
static bool isStreamSvg(const css::uno::Reference<css::io::XInputStream>& xInput);
protected:

View File

@ -72,7 +72,7 @@ static OUString createRelativeURL( const OUString& rFilterName, const OUString&
}
}
void TypeDetectionExporter::doExport( Reference< XOutputStream > xOS, const XMLFilterVector& rFilters )
void TypeDetectionExporter::doExport( const Reference< XOutputStream >& xOS, const XMLFilterVector& rFilters )
{
try
{
@ -218,7 +218,7 @@ void TypeDetectionExporter::doExport( Reference< XOutputStream > xOS, const XML
}
}
void TypeDetectionExporter::addProperty( Reference< XWriter > xHandler, const OUString& rName, const OUString& rValue )
void TypeDetectionExporter::addProperty( const Reference< XWriter >& xHandler, const OUString& rName, const OUString& rValue )
{
try
{
@ -248,7 +248,7 @@ void TypeDetectionExporter::addProperty( Reference< XWriter > xHandler, const OU
}
}
void TypeDetectionExporter::addLocaleProperty( Reference< XWriter > xHandler, const OUString& rName, const OUString& rValue )
void TypeDetectionExporter::addLocaleProperty( const Reference< XWriter >& xHandler, const OUString& rName, const OUString& rValue )
{
try
{

View File

@ -30,11 +30,11 @@ class TypeDetectionExporter
public:
explicit TypeDetectionExporter( css::uno::Reference< css::uno::XComponentContext >& mxContext );
void doExport(css::uno::Reference < css::io::XOutputStream > xOS, const XMLFilterVector& rFilters );
void doExport(const css::uno::Reference < css::io::XOutputStream >& xOS, const XMLFilterVector& rFilters );
private:
static void addProperty( css::uno::Reference< css::xml::sax::XWriter > xWriter, const OUString& rName, const OUString& rValue );
static void addLocaleProperty( css::uno::Reference< css::xml::sax::XWriter > xWriter, const OUString& rName, const OUString& rValue );
static void addProperty( const css::uno::Reference< css::xml::sax::XWriter >& xWriter, const OUString& rName, const OUString& rValue );
static void addLocaleProperty( const css::uno::Reference< css::xml::sax::XWriter >& xWriter, const OUString& rName, const OUString& rValue );
css::uno::Reference< css::uno::XComponentContext > mxContext;
};

View File

@ -47,7 +47,7 @@ TypeDetectionImporter::~TypeDetectionImporter()
{
}
void TypeDetectionImporter::doImport( const Reference< XComponentContext >& rxContext, Reference< XInputStream > xIS, XMLFilterVector& rFilters )
void TypeDetectionImporter::doImport( const Reference< XComponentContext >& rxContext, const Reference< XInputStream >& xIS, XMLFilterVector& rFilters )
{
try
{

View File

@ -64,7 +64,7 @@ public:
TypeDetectionImporter();
virtual ~TypeDetectionImporter();
static void doImport( const css::uno::Reference< css::uno::XComponentContext >& rxContext, css::uno::Reference < css::io::XInputStream > xOS, XMLFilterVector& rFilters );
static void doImport( const css::uno::Reference< css::uno::XComponentContext >& rxContext, const css::uno::Reference < css::io::XInputStream >& xOS, XMLFilterVector& rFilters );
virtual void SAL_CALL startDocument( )
throw(css::xml::sax::SAXException, css::uno::RuntimeException, std::exception) override;

View File

@ -32,7 +32,7 @@
extern OUString string_encode( const OUString & rText );
extern OUString string_decode( const OUString & rText );
bool copyStreams( css::uno::Reference< css::io::XInputStream > xIS, css::uno::Reference< css::io::XOutputStream > xOS );
bool copyStreams( const css::uno::Reference< css::io::XInputStream >& xIS, const css::uno::Reference< css::io::XOutputStream >& xOS );
bool createDirectory( OUString& rURL );

View File

@ -303,7 +303,7 @@ void XMLFilterJarHelper::openPackage( const OUString& rPackageURL, XMLFilterVect
}
}
bool XMLFilterJarHelper::copyFiles( Reference< XHierarchicalNameAccess > xIfc, filter_info_impl* pFilter )
bool XMLFilterJarHelper::copyFiles( const Reference< XHierarchicalNameAccess >& xIfc, filter_info_impl* pFilter )
{
bool bOk = copyFile( xIfc, pFilter->maExportXSLT, sXSLTPath );
@ -316,7 +316,7 @@ bool XMLFilterJarHelper::copyFiles( Reference< XHierarchicalNameAccess > xIfc, f
return bOk;
}
bool XMLFilterJarHelper::copyFile( Reference< XHierarchicalNameAccess > xIfc, OUString& rURL, const OUString& rTargetURL )
bool XMLFilterJarHelper::copyFile( const Reference< XHierarchicalNameAccess >& xIfc, OUString& rURL, const OUString& rTargetURL )
{
if( !rURL.matchIgnoreAsciiCase( sVndSunStarPackage ) )
return true;

View File

@ -40,8 +40,8 @@ public:
private:
void addFile( css::uno::Reference< css::uno::XInterface > xRootFolder, css::uno::Reference< css::lang::XSingleServiceFactory > xFactory, const OUString& rSourceFile ) throw( css::uno::Exception, std::exception );
bool copyFile( css::uno::Reference< css::container::XHierarchicalNameAccess > xIfc, OUString& rURL, const OUString& rTargetURL );
bool copyFiles( css::uno::Reference< css::container::XHierarchicalNameAccess > xIfc, filter_info_impl* pFilter );
bool copyFile( const css::uno::Reference< css::container::XHierarchicalNameAccess >& xIfc, OUString& rURL, const OUString& rTargetURL );
bool copyFiles( const css::uno::Reference< css::container::XHierarchicalNameAccess >& xIfc, filter_info_impl* pFilter );
css::uno::Reference< css::uno::XComponentContext > mxContext;

View File

@ -1617,7 +1617,7 @@ OUString string_decode( const OUString & rText )
return Uri::decode( rText, rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8 );
}
bool copyStreams( Reference< XInputStream > xIS, Reference< XOutputStream > xOS )
bool copyStreams( const Reference< XInputStream >& xIS, const Reference< XOutputStream >& xOS )
{
try
{

View File

@ -441,7 +441,7 @@ void XMLFilterTestDialog::onExportCurrentDocument()
doExport( getFrontMostDocument( m_pFilterInfo->maDocumentService ) );
}
void XMLFilterTestDialog::doExport( Reference< XComponent > xComp )
void XMLFilterTestDialog::doExport( const Reference< XComponent >& xComp )
{
try
{

View File

@ -55,7 +55,7 @@ private:
css::uno::Reference< css::lang::XComponent > getFrontMostDocument( const OUString& rServiceName );
void import( const OUString& rURL );
static void displayXMLFile( const OUString& rURL );
void doExport( css::uno::Reference< css::lang::XComponent > xComp );
void doExport( const css::uno::Reference< css::lang::XComponent >& xComp );
private:
css::uno::Reference< css::uno::XComponentContext > mxContext;