[Libreoffice-commits] core.git: 3 commits - framework/Library_fwe.mk framework/source helpcompiler/source include/framework include/helpcompiler include/oox oox/source sfx2/source
Noel Grandin
noel at peralex.com
Tue Jan 12 01:48:29 PST 2016
framework/Library_fwe.mk | 1
framework/source/classes/menumanager.cxx | 1
framework/source/fwe/classes/addonmenu.cxx | 1
framework/source/fwe/classes/bmkmenu.cxx | 1
framework/source/fwe/helper/imageproducer.cxx | 49 -----------------
framework/source/uielement/addonstoolbarmanager.cxx | 1
framework/source/uielement/macrosmenucontroller.cxx | 1
framework/source/uielement/menubarmanager.cxx | 1
framework/source/uielement/newmenucontroller.cxx | 1
framework/source/uielement/subtoolbarcontroller.cxx | 1
framework/source/uielement/toolbarmanager.cxx | 1
framework/source/uielement/toolbarmerger.cxx | 1
framework/source/uielement/toolbarsmenucontroller.cxx | 1
helpcompiler/source/HelpIndexer.cxx | 4 -
helpcompiler/source/HelpSearch.cxx | 4 -
include/framework/imageproducer.hxx | 50 ------------------
include/helpcompiler/HelpIndexer.hxx | 2
include/helpcompiler/HelpSearch.hxx | 2
include/oox/core/binarycodec.hxx | 10 ---
include/oox/crypto/AgileEngine.hxx | 8 +-
include/oox/crypto/CryptTools.hxx | 4 -
include/oox/crypto/CryptoEngine.hxx | 4 -
include/oox/crypto/Standard2007Engine.hxx | 4 -
include/oox/drawingml/shapepropertymap.hxx | 4 -
include/oox/export/chartexport.hxx | 2
include/oox/export/vmlexport.hxx | 2
include/oox/ole/axbinarywriter.hxx | 2
include/oox/ole/axcontrol.hxx | 4 -
include/oox/ole/vbacontrol.hxx | 2
include/oox/ppt/presentationfragmenthandler.hxx | 2
oox/source/core/binarycodec.cxx | 7 +-
oox/source/crypto/AgileEngine.cxx | 16 ++---
oox/source/crypto/CryptTools.cxx | 6 --
oox/source/crypto/Standard2007Engine.cxx | 11 +--
oox/source/export/chartexport.cxx | 4 -
oox/source/export/vmlexport.cxx | 4 -
oox/source/ole/axbinarywriter.cxx | 3 -
oox/source/ole/axcontrol.cxx | 7 --
oox/source/ole/vbacontrol.cxx | 3 -
oox/source/ppt/presentationfragmenthandler.cxx | 4 -
sfx2/source/appl/app.cxx | 2
41 files changed, 49 insertions(+), 189 deletions(-)
New commits:
commit 8dbfc413b1603c814cecf5306238c6144185671f
Author: Noel Grandin <noel at peralex.com>
Date: Tue Jan 12 11:43:37 2016 +0200
loplugin:unusedmethods unused return value in include/oox
Change-Id: I22acb6b94774c5944d8276827c53a419f0803f83
diff --git a/include/oox/core/binarycodec.hxx b/include/oox/core/binarycodec.hxx
index 1095e45..e9cf431 100644
--- a/include/oox/core/binarycodec.hxx
+++ b/include/oox/core/binarycodec.hxx
@@ -131,11 +131,8 @@ public:
@param nBytes
Size of the passed data blocks. pnDestData and pnSrcData must be of
this size.
-
- @return
- True = decoding was successful (no error occurred).
*/
- bool decode(
+ void decode(
sal_uInt8* pnDestData,
const sal_uInt8* pnSrcData,
sal_Int32 nBytes );
@@ -284,11 +281,8 @@ public:
@param nBytes
Number of bytes to be skipped (cipher "seeks" forward).
-
- @return
- True = skip was successful (no error occurred).
*/
- bool skip( sal_Int32 nBytes );
+ void skip( sal_Int32 nBytes );
private:
rtlCipher mhCipher;
diff --git a/include/oox/crypto/AgileEngine.hxx b/include/oox/crypto/AgileEngine.hxx
index dc9c36d..cf47947 100644
--- a/include/oox/crypto/AgileEngine.hxx
+++ b/include/oox/crypto/AgileEngine.hxx
@@ -42,9 +42,9 @@ class AgileEngine : public CryptoEngine
{
AgileEncryptionInfo mInfo;
- bool calculateHashFinal(const OUString& rPassword, std::vector<sal_uInt8>& aHashFinal);
+ void calculateHashFinal(const OUString& rPassword, std::vector<sal_uInt8>& aHashFinal);
- bool calculateBlock(
+ void calculateBlock(
const sal_uInt8* rBlock,
sal_uInt32 aBlockSize,
std::vector<sal_uInt8>& rHashFinal,
@@ -59,7 +59,7 @@ public:
AgileEncryptionInfo& getInfo() { return mInfo;}
- virtual bool writeEncryptionInfo(
+ virtual void writeEncryptionInfo(
const OUString& rPassword,
BinaryXOutputStream& rStream) override;
@@ -69,7 +69,7 @@ public:
BinaryXInputStream& aInputStream,
BinaryXOutputStream& aOutputStream) override;
- virtual bool encrypt(
+ virtual void encrypt(
BinaryXInputStream& aInputStream,
BinaryXOutputStream& aOutputStream) override;
};
diff --git a/include/oox/crypto/CryptTools.hxx b/include/oox/crypto/CryptTools.hxx
index 898c47d..d93fef6 100644
--- a/include/oox/crypto/CryptTools.hxx
+++ b/include/oox/crypto/CryptTools.hxx
@@ -144,8 +144,8 @@ public:
Digest(DigestType eType);
virtual ~Digest();
- bool update(std::vector<sal_uInt8>& input);
- bool finalize(std::vector<sal_uInt8>& digest);
+ void update(std::vector<sal_uInt8>& input);
+ void finalize(std::vector<sal_uInt8>& digest);
sal_uInt32 getLength();
diff --git a/include/oox/crypto/CryptoEngine.hxx b/include/oox/crypto/CryptoEngine.hxx
index ea07a3e..a6ad858 100644
--- a/include/oox/crypto/CryptoEngine.hxx
+++ b/include/oox/crypto/CryptoEngine.hxx
@@ -31,7 +31,7 @@ public:
virtual ~CryptoEngine()
{}
- virtual bool writeEncryptionInfo(
+ virtual void writeEncryptionInfo(
const OUString& rPassword,
BinaryXOutputStream& rStream) = 0;
@@ -41,7 +41,7 @@ public:
BinaryXInputStream& aInputStream,
BinaryXOutputStream& aOutputStream) = 0;
- virtual bool encrypt(
+ virtual void encrypt(
BinaryXInputStream& aInputStream,
BinaryXOutputStream& aOutputStream) = 0;
};
diff --git a/include/oox/crypto/Standard2007Engine.hxx b/include/oox/crypto/Standard2007Engine.hxx
index 5e5a6fc..a4d13fb0 100644
--- a/include/oox/crypto/Standard2007Engine.hxx
+++ b/include/oox/crypto/Standard2007Engine.hxx
@@ -94,7 +94,7 @@ public:
virtual bool generateEncryptionKey(const OUString& rPassword) override;
- virtual bool writeEncryptionInfo(
+ virtual void writeEncryptionInfo(
const OUString& rPassword,
BinaryXOutputStream& rStream) override;
@@ -102,7 +102,7 @@ public:
BinaryXInputStream& aInputStream,
BinaryXOutputStream& aOutputStream) override;
- virtual bool encrypt(
+ virtual void encrypt(
BinaryXInputStream& aInputStream,
BinaryXOutputStream& aOutputStream) override;
diff --git a/include/oox/drawingml/shapepropertymap.hxx b/include/oox/drawingml/shapepropertymap.hxx
index abe5505..3306a4c 100644
--- a/include/oox/drawingml/shapepropertymap.hxx
+++ b/include/oox/drawingml/shapepropertymap.hxx
@@ -134,8 +134,8 @@ private:
bool setFillBitmapNameFromUrl( sal_Int32 nPropId, const css::uno::Any& rValue );
// not implemented, to prevent implicit conversion from enum to int
- css::uno::Any& operator[]( ShapePropertyId ePropId );
- const css::uno::Any& operator[]( ShapePropertyId ePropId ) const;
+ css::uno::Any& operator[]( ShapePropertyId ePropId ) = delete;
+ const css::uno::Any& operator[]( ShapePropertyId ePropId ) const = delete;
private:
ModelObjectHelper& mrModelObjHelper;
diff --git a/include/oox/export/chartexport.hxx b/include/oox/export/chartexport.hxx
index 9f2b8f5..93842e4 100644
--- a/include/oox/export/chartexport.hxx
+++ b/include/oox/export/chartexport.hxx
@@ -210,7 +210,7 @@ public:
sal_Int32 GetChartID( );
css::uno::Reference< css::frame::XModel > getModel(){ return mxChartModel; }
- ChartExport& WriteChartObj( const css::uno::Reference< css::drawing::XShape >& xShape, sal_Int32 nChartCount );
+ void WriteChartObj( const css::uno::Reference< css::drawing::XShape >& xShape, sal_Int32 nChartCount );
void ExportContent();
void InitRangeSegmentationProperties(
diff --git a/include/oox/export/vmlexport.hxx b/include/oox/export/vmlexport.hxx
index 2a57963..7b4cb27 100644
--- a/include/oox/export/vmlexport.hxx
+++ b/include/oox/export/vmlexport.hxx
@@ -92,7 +92,7 @@ public:
/// Export the sdr object as VML.
///
/// Call this when you need to export the object as VML.
- sal_uInt32 AddSdrObject( const SdrObject& rObj, sal_Int16 eHOri = -1,
+ void AddSdrObject( const SdrObject& rObj, sal_Int16 eHOri = -1,
sal_Int16 eVOri = -1, sal_Int16 eHRel = -1,
sal_Int16 eVRel = -1, const Point* pNdTopLeft = nullptr, const bool bOOxmlExport = false );
virtual void AddSdrObjectVMLObject( const SdrObject& rObj) override;
diff --git a/include/oox/ole/axbinarywriter.hxx b/include/oox/ole/axbinarywriter.hxx
index a0a34ff..02fa348 100644
--- a/include/oox/ole/axbinarywriter.hxx
+++ b/include/oox/ole/axbinarywriter.hxx
@@ -97,7 +97,7 @@ public:
void skipProperty() { startNextProperty( true ); }
/** Final processing, write contents of all complex properties, writes record size */
- bool finalizeExport();
+ void finalizeExport();
private:
bool ensureValid( bool bCondition = true );
diff --git a/include/oox/ole/axcontrol.hxx b/include/oox/ole/axcontrol.hxx
index befbf22..a9c8eee 100644
--- a/include/oox/ole/axcontrol.hxx
+++ b/include/oox/ole/axcontrol.hxx
@@ -883,7 +883,7 @@ public:
explicit AxMultiPageModel();
virtual ApiControlType getControlType() const override;
- bool importPageAndMultiPageProperties( BinaryInputStream& rInStrm, sal_Int32 nPages );
+ void importPageAndMultiPageProperties( BinaryInputStream& rInStrm, sal_Int32 nPages );
virtual void convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const override;
std::vector<sal_uInt32> mnIDs;
sal_uInt32 mnActiveTab;
@@ -956,7 +956,7 @@ public:
const css::uno::Reference< css::awt::XControlModel >& rxCtrlModel,
const ControlConverter& rConv ) const;
- bool convertFromProperties(
+ void convertFromProperties(
const css::uno::Reference< css::awt::XControlModel >& rxCtrlModel,
const ControlConverter& rConv );
diff --git a/include/oox/ole/vbacontrol.hxx b/include/oox/ole/vbacontrol.hxx
index a17513c..7d4a4bb 100644
--- a/include/oox/ole/vbacontrol.hxx
+++ b/include/oox/ole/vbacontrol.hxx
@@ -149,7 +149,7 @@ private:
bool importSiteModel( BinaryInputStream& rInStrm );
/** Imports the site models of all embedded controls from the 'f' stream. */
- bool importEmbeddedSiteModels( BinaryInputStream& rInStrm );
+ void importEmbeddedSiteModels( BinaryInputStream& rInStrm );
/* Final processing of all embedded controls after import. */
void finalizeEmbeddedControls();
diff --git a/include/oox/ppt/presentationfragmenthandler.hxx b/include/oox/ppt/presentationfragmenthandler.hxx
index f745f2e..912c181 100644
--- a/include/oox/ppt/presentationfragmenthandler.hxx
+++ b/include/oox/ppt/presentationfragmenthandler.hxx
@@ -43,7 +43,7 @@ public:
virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs ) override;
protected:
- bool importSlide( const ::oox::core::FragmentHandlerRef& rSlideFragmentHandler,
+ void importSlide( const ::oox::core::FragmentHandlerRef& rSlideFragmentHandler,
const oox::ppt::SlidePersistPtr& rPersist );
private:
diff --git a/oox/source/core/binarycodec.cxx b/oox/source/core/binarycodec.cxx
index 3855bf5..360e92c 100644
--- a/oox/source/core/binarycodec.cxx
+++ b/oox/source/core/binarycodec.cxx
@@ -210,7 +210,7 @@ void BinaryCodec_XOR::startBlock()
mnOffset = 0;
}
-bool BinaryCodec_XOR::decode( sal_uInt8* pnDestData, const sal_uInt8* pnSrcData, sal_Int32 nBytes )
+void BinaryCodec_XOR::decode( sal_uInt8* pnDestData, const sal_uInt8* pnSrcData, sal_Int32 nBytes )
{
const sal_uInt8* pnCurrKey = mpnKey + mnOffset;
const sal_uInt8* pnKeyLast = mpnKey + 0x0F;
@@ -245,7 +245,7 @@ bool BinaryCodec_XOR::decode( sal_uInt8* pnDestData, const sal_uInt8* pnSrcData,
}
// update offset and leave
- return skip( nBytes );
+ skip( nBytes );
}
bool BinaryCodec_XOR::skip( sal_Int32 nBytes )
@@ -391,7 +391,7 @@ bool BinaryCodec_RCF::decode( sal_uInt8* pnDestData, const sal_uInt8* pnSrcData,
return eResult == rtl_Cipher_E_None;
}
-bool BinaryCodec_RCF::skip( sal_Int32 nBytes )
+void BinaryCodec_RCF::skip( sal_Int32 nBytes )
{
// decode dummy data in memory to update internal state of RC4 cipher
sal_uInt8 pnDummy[ 1024 ];
@@ -403,7 +403,6 @@ bool BinaryCodec_RCF::skip( sal_Int32 nBytes )
bResult = decode( pnDummy, pnDummy, nBlockLen );
nBytesLeft -= nBlockLen;
}
- return bResult;
}
} // namespace core
diff --git a/oox/source/crypto/AgileEngine.cxx b/oox/source/crypto/AgileEngine.cxx
index d207cf5..1378086 100644
--- a/oox/source/crypto/AgileEngine.cxx
+++ b/oox/source/crypto/AgileEngine.cxx
@@ -50,7 +50,7 @@ Crypto::CryptoType AgileEngine::cryptoType(const AgileEncryptionInfo& rInfo)
return Crypto::UNKNOWN;
}
-bool AgileEngine::calculateBlock(
+void AgileEngine::calculateBlock(
const sal_uInt8* rBlock,
sal_uInt32 aBlockSize,
vector<sal_uInt8>& rHashFinal,
@@ -75,11 +75,9 @@ bool AgileEngine::calculateBlock(
Decrypt aDecryptor(key, salt, cryptoType(mInfo));
aDecryptor.update(rOutput, rInput);
-
- return true;
}
-bool AgileEngine::calculateHashFinal(const OUString& rPassword, vector<sal_uInt8>& aHashFinal)
+void AgileEngine::calculateHashFinal(const OUString& rPassword, vector<sal_uInt8>& aHashFinal)
{
sal_Int32 saltSize = mInfo.saltSize;
vector<sal_uInt8> salt = mInfo.saltValue;
@@ -109,8 +107,6 @@ bool AgileEngine::calculateHashFinal(const OUString& rPassword, vector<sal_uInt8
}
std::copy(hash.begin(), hash.end(), aHashFinal.begin());
-
- return true;
}
bool AgileEngine::generateEncryptionKey(const OUString& rPassword)
@@ -192,18 +188,18 @@ bool AgileEngine::decrypt(
return true;
}
-bool AgileEngine::writeEncryptionInfo(
+void AgileEngine::writeEncryptionInfo(
const OUString& /*aPassword*/,
BinaryXOutputStream& /*rStream*/)
{
- return false; // Agile encrypting is not supported for now
+ // Agile encrypting is not supported for now
}
-bool AgileEngine::encrypt(
+void AgileEngine::encrypt(
BinaryXInputStream& /*aInputStream*/,
BinaryXOutputStream& /*aOutputStream*/)
{
- return false; // Agile encrypting is not supported for now
+ // Agile encrypting is not supported for now
}
} // namespace core
diff --git a/oox/source/crypto/CryptTools.cxx b/oox/source/crypto/CryptTools.cxx
index f21b0e1..1204877 100644
--- a/oox/source/crypto/CryptTools.cxx
+++ b/oox/source/crypto/CryptTools.cxx
@@ -284,7 +284,7 @@ sal_uInt32 Digest::getLength()
return 0;
}
-bool Digest::update(std::vector<sal_uInt8>& input)
+void Digest::update(std::vector<sal_uInt8>& input)
{
#if USE_TLS_OPENSSL
EVP_DigestUpdate(mpContext, &input[0], input.size());
@@ -292,10 +292,9 @@ bool Digest::update(std::vector<sal_uInt8>& input)
#if USE_TLS_NSS
HASH_Update(mpContext, &input[0], input.size());
#endif
- return true;
}
-bool Digest::finalize(std::vector<sal_uInt8>& digest)
+void Digest::finalize(std::vector<sal_uInt8>& digest)
{
digest.clear();
@@ -311,7 +310,6 @@ bool Digest::finalize(std::vector<sal_uInt8>& digest)
digest.resize(digestLength, 0);
HASH_End(mpContext, &digest[0], &digestWrittenLength, digestLength);
#endif
- return true;
}
bool Digest::sha1(vector<sal_uInt8>& output, vector<sal_uInt8>& input)
diff --git a/oox/source/crypto/Standard2007Engine.cxx b/oox/source/crypto/Standard2007Engine.cxx
index 299d251..0280a17 100644
--- a/oox/source/crypto/Standard2007Engine.cxx
+++ b/oox/source/crypto/Standard2007Engine.cxx
@@ -198,7 +198,7 @@ bool Standard2007Engine::decrypt(
return true;
}
-bool Standard2007Engine::writeEncryptionInfo(const OUString& password, BinaryXOutputStream& rStream)
+void Standard2007Engine::writeEncryptionInfo(const OUString& password, BinaryXOutputStream& rStream)
{
mInfo.header.flags = ENCRYPTINFO_AES | ENCRYPTINFO_CRYPTOAPI;
mInfo.header.algId = ENCRYPT_ALGO_AES128;
@@ -213,10 +213,10 @@ bool Standard2007Engine::writeEncryptionInfo(const OUString& password, BinaryXOu
mKey.resize(keyLength, 0);
if (!calculateEncryptionKey(password))
- return false;
+ return;
if (!generateVerifier())
- return false;
+ return;
rStream.WriteUInt32(VERSION_INFO_2007_FORMAT);
@@ -234,11 +234,9 @@ bool Standard2007Engine::writeEncryptionInfo(const OUString& password, BinaryXOu
sal_uInt32 encryptionVerifierSize = static_cast<sal_uInt32>(sizeof(EncryptionVerifierAES));
rStream.writeMemory(&mInfo.verifier, encryptionVerifierSize);
-
- return true;
}
-bool Standard2007Engine::encrypt(
+void Standard2007Engine::encrypt(
BinaryXInputStream& aInputStream,
BinaryXOutputStream& aOutputStream)
{
@@ -257,7 +255,6 @@ bool Standard2007Engine::encrypt(
outputLength = aEncryptor.update(outputBuffer, inputBuffer, inputLength);
aOutputStream.writeMemory( &outputBuffer[0], outputLength );
}
- return true;
}
} // namespace core
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index 2dbc864..d88e940 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -517,7 +517,7 @@ OUString ChartExport::parseFormula( const OUString& rRange )
return aResult;
}
-ChartExport& ChartExport::WriteChartObj( const Reference< XShape >& xShape, sal_Int32 nChartCount )
+void ChartExport::WriteChartObj( const Reference< XShape >& xShape, sal_Int32 nChartCount )
{
FSHelperPtr pFS = GetFS();
@@ -614,8 +614,6 @@ ChartExport& ChartExport::WriteChartObj( const Reference< XShape >& xShape, sal_
SetFS( pChart );
ExportContent();
-
- return *this;
}
void ChartExport::InitRangeSegmentationProperties( const Reference< chart2::XChartDocument > & xChartDoc )
diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx
index 9e94102..d62675b 100644
--- a/oox/source/export/vmlexport.cxx
+++ b/oox/source/export/vmlexport.cxx
@@ -1205,7 +1205,7 @@ void VMLExport::EndShape( sal_Int32 nShapeElement )
}
}
-sal_uInt32 VMLExport::AddSdrObject( const SdrObject& rObj, sal_Int16 eHOri, sal_Int16 eVOri, sal_Int16 eHRel, sal_Int16 eVRel, const Point* pNdTopLeft, const bool bOOxmlExport )
+void VMLExport::AddSdrObject( const SdrObject& rObj, sal_Int16 eHOri, sal_Int16 eVOri, sal_Int16 eHRel, sal_Int16 eVRel, const Point* pNdTopLeft, const bool bOOxmlExport )
{
m_pSdrObject = &rObj;
m_eHOri = eHOri;
@@ -1213,7 +1213,7 @@ sal_uInt32 VMLExport::AddSdrObject( const SdrObject& rObj, sal_Int16 eHOri, sal_
m_eHRel = eHRel;
m_eVRel = eVRel;
m_pNdTopLeft = pNdTopLeft;
- return EscherEx::AddSdrObject(rObj, bOOxmlExport);
+ EscherEx::AddSdrObject(rObj, bOOxmlExport);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ole/axbinarywriter.cxx b/oox/source/ole/axbinarywriter.cxx
index 05ab363..26247e5 100644
--- a/oox/source/ole/axbinarywriter.cxx
+++ b/oox/source/ole/axbinarywriter.cxx
@@ -154,7 +154,7 @@ void AxBinaryPropertyWriter::writeStringProperty( OUString& orValue, bool bCompr
startNextProperty();
}
-bool AxBinaryPropertyWriter::finalizeExport()
+void AxBinaryPropertyWriter::finalizeExport()
{
// write large properties
maOutStrm.align( 4 );
@@ -185,7 +185,6 @@ bool AxBinaryPropertyWriter::finalizeExport()
maOutStrm.WriteUInt32( mnPropFlags );
maOutStrm.seek( nPos );
- return true;
}
bool AxBinaryPropertyWriter::ensureValid( bool bCondition )
diff --git a/oox/source/ole/axcontrol.cxx b/oox/source/ole/axcontrol.cxx
index 18a700e..7ba5d357 100644
--- a/oox/source/ole/axcontrol.cxx
+++ b/oox/source/ole/axcontrol.cxx
@@ -2456,7 +2456,7 @@ ApiControlType AxMultiPageModel::getControlType() const
return API_CONTROL_MULTIPAGE;
}
-bool AxMultiPageModel::importPageAndMultiPageProperties( BinaryInputStream& rInStrm, sal_Int32 nPages )
+void AxMultiPageModel::importPageAndMultiPageProperties( BinaryInputStream& rInStrm, sal_Int32 nPages )
{
// PageProperties
for ( sal_Int32 nPage = 0; nPage < nPages; ++nPage )
@@ -2478,7 +2478,6 @@ bool AxMultiPageModel::importPageAndMultiPageProperties( BinaryInputStream& rInS
{
mnIDs.push_back( rInStrm.readInt32() );
}
- return true;
}
void AxMultiPageModel::convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const
@@ -2666,16 +2665,14 @@ bool EmbeddedControl::convertProperties( const Reference< XControlModel >& rxCtr
return false;
}
-bool EmbeddedControl::convertFromProperties( const Reference< XControlModel >& rxCtrlModel, const ControlConverter& rConv )
+void EmbeddedControl::convertFromProperties( const Reference< XControlModel >& rxCtrlModel, const ControlConverter& rConv )
{
if( mxModel.get() && rxCtrlModel.is() && !maName.isEmpty() )
{
PropertySet aPropSet( rxCtrlModel );
aPropSet.getProperty( maName, PROP_Name );
mxModel->convertFromProperties( aPropSet, rConv );
- return true;
}
- return false;
}
EmbeddedForm::EmbeddedForm( const Reference< XModel >& rxDocModel,
diff --git a/oox/source/ole/vbacontrol.cxx b/oox/source/ole/vbacontrol.cxx
index caeb020..8926acf 100644
--- a/oox/source/ole/vbacontrol.cxx
+++ b/oox/source/ole/vbacontrol.cxx
@@ -523,7 +523,7 @@ bool VbaFormControl::importSiteModel( BinaryInputStream& rInStrm )
return mxSiteModel->importBinaryModel( rInStrm );
}
-bool VbaFormControl::importEmbeddedSiteModels( BinaryInputStream& rInStrm )
+void VbaFormControl::importEmbeddedSiteModels( BinaryInputStream& rInStrm )
{
sal_uInt64 nAnchorPos = rInStrm.tell();
sal_uInt32 nSiteCount, nSiteDataSize;
@@ -568,7 +568,6 @@ bool VbaFormControl::importEmbeddedSiteModels( BinaryInputStream& rInStrm )
}
rInStrm.seek( nSiteEndPos );
- return bValid;
}
void VbaFormControl::finalizeEmbeddedControls()
diff --git a/oox/source/ppt/presentationfragmenthandler.cxx b/oox/source/ppt/presentationfragmenthandler.cxx
index 7f778cd..5ea3bd2 100644
--- a/oox/source/ppt/presentationfragmenthandler.cxx
+++ b/oox/source/ppt/presentationfragmenthandler.cxx
@@ -459,7 +459,7 @@ void PresentationFragmentHandler::finalizeImport()
return this;
}
-bool PresentationFragmentHandler::importSlide( const FragmentHandlerRef& rxSlideFragmentHandler,
+void PresentationFragmentHandler::importSlide( const FragmentHandlerRef& rxSlideFragmentHandler,
const SlidePersistPtr& rSlidePersistPtr )
{
Reference< drawing::XDrawPage > xSlide( rSlidePersistPtr->getPage() );
@@ -511,7 +511,7 @@ bool PresentationFragmentHandler::importSlide( const FragmentHandlerRef& rxSlide
}
}
rSlidePersistPtr->setPath( rxSlideFragmentHandler->getFragmentPath() );
- return getFilter().importFragment( rxSlideFragmentHandler );
+ getFilter().importFragment( rxSlideFragmentHandler );
}
} }
commit e5bb67f08d4e2095affc5229e638535376ee66b4
Author: Noel Grandin <noel at peralex.com>
Date: Tue Jan 12 11:13:59 2016 +0200
loplugin:unusedmethods unused return value in include/helpcompiler
Change-Id: Ieebbd896bf1ad66cd1950456ca1600f0dd8cda83
diff --git a/helpcompiler/source/HelpIndexer.cxx b/helpcompiler/source/HelpIndexer.cxx
index 63cf85a..e6a26fc 100644
--- a/helpcompiler/source/HelpIndexer.cxx
+++ b/helpcompiler/source/HelpIndexer.cxx
@@ -110,7 +110,7 @@ bool HelpIndexer::scanForFiles(OUString const & path) {
return true;
}
-bool HelpIndexer::helpDocument(OUString const & fileName, Document *doc) {
+void HelpIndexer::helpDocument(OUString const & fileName, Document *doc) {
// Add the help path as an indexed, untokenized field.
OUString path = "#HLP#" + d_module + "/" + fileName;
@@ -128,8 +128,6 @@ bool HelpIndexer::helpDocument(OUString const & fileName, Document *doc) {
// Add the content as a field.
OUString contentPath = d_contentDir + "/" + sEscapedFileName;
doc->add(*_CLNEW Field(_T("content"), helpFileReader(contentPath), Field::STORE_NO | Field::INDEX_TOKENIZED));
-
- return true;
}
lucene::util::Reader *HelpIndexer::helpFileReader(OUString const & path) {
diff --git a/helpcompiler/source/HelpSearch.cxx b/helpcompiler/source/HelpSearch.cxx
index 603b117..96f1219 100644
--- a/helpcompiler/source/HelpSearch.cxx
+++ b/helpcompiler/source/HelpSearch.cxx
@@ -20,7 +20,7 @@ HelpSearch::HelpSearch(OUString const &indexDir)
d_indexDir = OUStringToOString(ustrSystemPath, osl_getThreadTextEncoding());
}
-bool HelpSearch::query(OUString const &queryStr, bool captionOnly,
+void HelpSearch::query(OUString const &queryStr, bool captionOnly,
std::vector<OUString> &rDocuments, std::vector<float> &rScores) {
lucene::index::IndexReader *reader = lucene::index::IndexReader::open(d_indexDir.getStr());
@@ -51,8 +51,6 @@ bool HelpSearch::query(OUString const &queryStr, bool captionOnly,
reader->close();
_CLDELETE(reader);
-
- return true;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/helpcompiler/HelpIndexer.hxx b/include/helpcompiler/HelpIndexer.hxx
index 5a73358..65f7787 100644
--- a/include/helpcompiler/HelpIndexer.hxx
+++ b/include/helpcompiler/HelpIndexer.hxx
@@ -76,7 +76,7 @@ class L10N_DLLPUBLIC HelpIndexer {
/**
* Fill the Document with information on the given help file.
*/
- bool helpDocument(OUString const & fileName, lucene::document::Document *doc);
+ void helpDocument(OUString const & fileName, lucene::document::Document *doc);
/**
* Create a reader for the given file, and create an "empty" reader in case the file doesn't exist.
diff --git a/include/helpcompiler/HelpSearch.hxx b/include/helpcompiler/HelpSearch.hxx
index a1ce783..639bbb2 100644
--- a/include/helpcompiler/HelpSearch.hxx
+++ b/include/helpcompiler/HelpSearch.hxx
@@ -33,7 +33,7 @@ class L10N_DLLPUBLIC HelpSearch{
* @param rDocuments Vector to write the paths of the found documents.
* @param rScores Vector to write the scores to.
*/
- bool query(OUString const &queryStr, bool captionOnly,
+ void query(OUString const &queryStr, bool captionOnly,
std::vector<OUString> &rDocuments, std::vector<float> &rScores);
};
commit 5f3d9ba0cdd82ef1e8be9b80ae8054c24653e058
Author: Noel Grandin <noel at peralex.com>
Date: Tue Jan 12 10:49:01 2016 +0200
GetImageFromURL/SetImageProducer unused
looks like these have been abandoned recently in the toolbar manager
update
Change-Id: I5556833dfef0db5958a5779bdb32482c18a46a5f
diff --git a/framework/Library_fwe.mk b/framework/Library_fwe.mk
index ee08654..848e52c 100644
--- a/framework/Library_fwe.mk
+++ b/framework/Library_fwe.mk
@@ -67,7 +67,6 @@ $(eval $(call gb_Library_add_exception_objects,fwe,\
framework/source/fwe/dispatch/interaction \
framework/source/fwe/helper/actiontriggerhelper \
framework/source/fwe/helper/configimporter \
- framework/source/fwe/helper/imageproducer \
framework/source/fwe/helper/propertysetcontainer \
framework/source/fwe/helper/titlehelper \
framework/source/fwe/helper/documentundoguard \
diff --git a/framework/source/classes/menumanager.cxx b/framework/source/classes/menumanager.cxx
index 8f354c6..8140cdf 100644
--- a/framework/source/classes/menumanager.cxx
+++ b/framework/source/classes/menumanager.cxx
@@ -21,7 +21,6 @@
#include <framework/menuconfiguration.hxx>
#include <framework/bmkmenu.hxx>
#include <framework/addonmenu.hxx>
-#include <framework/imageproducer.hxx>
#include <framework/addonsoptions.hxx>
#include <classes/fwkresid.hxx>
#include <services.h>
diff --git a/framework/source/fwe/classes/addonmenu.cxx b/framework/source/fwe/classes/addonmenu.cxx
index c65da97..f69ae27 100644
--- a/framework/source/fwe/classes/addonmenu.cxx
+++ b/framework/source/fwe/classes/addonmenu.cxx
@@ -20,7 +20,6 @@
#include <framework/addonmenu.hxx>
#include <framework/addonsoptions.hxx>
#include <general.h>
-#include <framework/imageproducer.hxx>
#include <framework/menuconfiguration.hxx>
#include <services.h>
diff --git a/framework/source/fwe/classes/bmkmenu.cxx b/framework/source/fwe/classes/bmkmenu.cxx
index 07f91f7..4b316a7 100644
--- a/framework/source/fwe/classes/bmkmenu.cxx
+++ b/framework/source/fwe/classes/bmkmenu.cxx
@@ -21,7 +21,6 @@
#include <framework/bmkmenu.hxx>
#include <general.h>
-#include <framework/imageproducer.hxx>
#include <framework/menuconfiguration.hxx>
#include <com/sun/star/uno/Reference.h>
diff --git a/framework/source/fwe/helper/imageproducer.cxx b/framework/source/fwe/helper/imageproducer.cxx
deleted file mode 100644
index 3c70b22..0000000
--- a/framework/source/fwe/helper/imageproducer.cxx
+++ /dev/null
@@ -1,49 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <framework/imageproducer.hxx>
-
-namespace framework
-{
-
-static pfunc_getImage _pGetImageFunc = nullptr;
-
-pfunc_getImage SAL_CALL SetImageProducer( pfunc_getImage pNewGetImageFunc )
-{
- pfunc_getImage pOldFunc = _pGetImageFunc;
- _pGetImageFunc = pNewGetImageFunc;
-
- return pOldFunc;
-}
-
-Image SAL_CALL GetImageFromURL(
- const css::uno::Reference< css::frame::XFrame >& rFrame,
- const OUString& aURL,
- bool bBig
-)
-{
- if ( _pGetImageFunc )
- return _pGetImageFunc( rFrame, aURL, bBig );
- else
- return Image();
-}
-
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/source/uielement/addonstoolbarmanager.cxx b/framework/source/uielement/addonstoolbarmanager.cxx
index 80f6e80..afe1551 100644
--- a/framework/source/uielement/addonstoolbarmanager.cxx
+++ b/framework/source/uielement/addonstoolbarmanager.cxx
@@ -22,7 +22,6 @@
#include <uielement/generictoolbarcontroller.hxx>
#include "services.h"
-#include <framework/imageproducer.hxx>
#include <framework/sfxhelperfunctions.hxx>
#include <classes/fwkresid.hxx>
#include <classes/resource.hrc>
diff --git a/framework/source/uielement/macrosmenucontroller.cxx b/framework/source/uielement/macrosmenucontroller.cxx
index badcb95..d11478e 100644
--- a/framework/source/uielement/macrosmenucontroller.cxx
+++ b/framework/source/uielement/macrosmenucontroller.cxx
@@ -22,7 +22,6 @@
#include "services.h"
#include <classes/resource.hrc>
#include <classes/fwkresid.hxx>
-#include <framework/imageproducer.hxx>
#include <com/sun/star/awt/MenuItemStyle.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx
index 5af9371..39ffad0 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -21,7 +21,6 @@
#include <framework/menuconfiguration.hxx>
#include <framework/bmkmenu.hxx>
#include <framework/addonmenu.hxx>
-#include <framework/imageproducer.hxx>
#include <framework/addonsoptions.hxx>
#include <classes/fwkresid.hxx>
#include <classes/menumanager.hxx>
diff --git a/framework/source/uielement/newmenucontroller.cxx b/framework/source/uielement/newmenucontroller.cxx
index b9f64b6..352a531 100644
--- a/framework/source/uielement/newmenucontroller.cxx
+++ b/framework/source/uielement/newmenucontroller.cxx
@@ -23,7 +23,6 @@
#include <classes/resource.hrc>
#include <classes/fwkresid.hxx>
#include <framework/bmkmenu.hxx>
-#include <framework/imageproducer.hxx>
#include <framework/menuconfiguration.hxx>
#include <com/sun/star/awt/XDevice.hpp>
diff --git a/framework/source/uielement/subtoolbarcontroller.cxx b/framework/source/uielement/subtoolbarcontroller.cxx
index 13c1fcd..9eac17c 100644
--- a/framework/source/uielement/subtoolbarcontroller.cxx
+++ b/framework/source/uielement/subtoolbarcontroller.cxx
@@ -21,7 +21,6 @@
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/weakref.hxx>
-#include <framework/imageproducer.hxx>
#include <svtools/toolboxcontroller.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <tools/gen.hxx>
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index d20a81b..c83bc19 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -22,7 +22,6 @@
#include "services.h"
#include "general.h"
#include "properties.h"
-#include <framework/imageproducer.hxx>
#include <framework/sfxhelperfunctions.hxx>
#include <classes/fwkresid.hxx>
#include <classes/resource.hrc>
diff --git a/framework/source/uielement/toolbarmerger.cxx b/framework/source/uielement/toolbarmerger.cxx
index 4f97ee2..0a7fb02 100644
--- a/framework/source/uielement/toolbarmerger.cxx
+++ b/framework/source/uielement/toolbarmerger.cxx
@@ -19,7 +19,6 @@
#include <uielement/toolbarmerger.hxx>
#include <uielement/generictoolbarcontroller.hxx>
-#include <framework/imageproducer.hxx>
#include <svtools/miscopt.hxx>
#include <comphelper/processfactory.hxx>
diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx
index a963e9e..ec59424 100644
--- a/framework/source/uielement/toolbarsmenucontroller.cxx
+++ b/framework/source/uielement/toolbarsmenucontroller.cxx
@@ -24,7 +24,6 @@
#include "services.h"
#include <classes/resource.hrc>
#include <classes/fwkresid.hxx>
-#include <framework/imageproducer.hxx>
#include <framework/sfxhelperfunctions.hxx>
#include <uiconfiguration/windowstateproperties.hxx>
diff --git a/include/framework/imageproducer.hxx b/include/framework/imageproducer.hxx
deleted file mode 100644
index dd16543..0000000
--- a/include/framework/imageproducer.hxx
+++ /dev/null
@@ -1,50 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_FRAMEWORK_IMAGEPRODUCER_HXX
-#define INCLUDED_FRAMEWORK_IMAGEPRODUCER_HXX
-
-#include <sal/types.h>
-#include <com/sun/star/frame/XFrame.hpp>
-#include <vcl/image.hxx>
-#include <rtl/ustring.hxx>
-#include <framework/fwedllapi.h>
-
-namespace framework
-{
-
-typedef Image ( *pfunc_getImage)(
- const css::uno::Reference< css::frame::XFrame >& rFrame,
- const OUString& aURL,
- bool bBig
-);
-
-pfunc_getImage FWE_DLLPUBLIC SAL_CALL SetImageProducer( pfunc_getImage pGetImageFunc );
-
-Image FWE_DLLPUBLIC SAL_CALL GetImageFromURL(
- const css::uno::Reference< css::frame::XFrame >& rFrame,
- const OUString& aURL,
- bool bBig
-);
-
-}
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index f64a1e4..b97e9b2 100644
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -136,7 +136,6 @@ namespace
: public rtl::Static<osl::Mutex, theApplicationMutex> {};
}
-#include <framework/imageproducer.hxx>
#include <framework/sfxhelperfunctions.hxx>
#include <sfx2/imagemgr.hxx>
#include "fwkhelper.hxx"
@@ -161,7 +160,6 @@ SfxApplication* SfxApplication::GetOrCreate()
// a fault will be moved outside the SFX
g_pSfxApplication->Initialize_Impl();
- ::framework::SetImageProducer( GetImage );
::framework::SetRefreshToolbars( RefreshToolbars );
::framework::SetToolBoxControllerCreator( SfxToolBoxControllerFactory );
::framework::SetStatusBarControllerCreator( SfxStatusBarControllerFactory );
More information about the Libreoffice-commits
mailing list