chart2/source/view/main/ChartView.cxx | 8 ++++++++ compilerplugins/clang/badstatics.cxx | 1 + desktop/unx/source/splashx.c | 6 ++---- desktop/unx/source/splashx.h | 4 ++++ sc/source/core/tool/formulalogger.cxx | 18 +++++++++--------- ucb/source/ucp/webdav/SerfGetReqProcImpl.hxx | 2 +- vcl/headless/headlessinst.cxx | 20 +++++++------------- 7 files changed, 32 insertions(+), 27 deletions(-)
New commits: commit ae9b5144539e0d6cb376af385e122b05c823200a Author: Tor Lillqvist <[email protected]> Date: Mon Dec 12 14:35:46 2016 +0200 Revert "loplugin:refcounting" Bah, the reverted change actually of course breaks the compilation, I had missed that accidentally. More intrusive chnages are needed to change css::uno::Reference to rtl::Reference, also in parameters to constructors and other calls here. This reverts commit 073f8cdbb77d62a6838c78ff63fca73896b86c79. Change-Id: I2d0f9db9cef8dfbfe7d8a409eb09375c45b9e49f diff --git a/ucb/source/ucp/webdav/SerfGetReqProcImpl.hxx b/ucb/source/ucp/webdav/SerfGetReqProcImpl.hxx index 3271fb9..f463f42 100644 --- a/ucb/source/ucp/webdav/SerfGetReqProcImpl.hxx +++ b/ucb/source/ucp/webdav/SerfGetReqProcImpl.hxx @@ -71,7 +71,7 @@ protected: void handleEndOfResponseData( serf_bucket_t * inSerfResponseBucket ) override; private: - rtl::Reference< SerfInputStream > xInputStream; + css::uno::Reference< SerfInputStream > xInputStream; css::uno::Reference< css::io::XOutputStream > xOutputStream; const std::vector< OUString > * mpHeaderNames; DAVResource* mpResource; commit 78f3faa116dc4e67b4dfd12b89810e5ab9803dc3 Author: Tor Lillqvist <[email protected]> Date: Mon Dec 12 12:17:21 2016 +0200 loplugin:stringconstant Change-Id: I5bf8adf86da9d2e9c53341cdbc94aba05557abfc diff --git a/sc/source/core/tool/formulalogger.cxx b/sc/source/core/tool/formulalogger.cxx index 93143e0..a386feb 100644 --- a/sc/source/core/tool/formulalogger.cxx +++ b/sc/source/core/tool/formulalogger.cxx @@ -144,19 +144,19 @@ void FormulaLogger::GroupScope::addRefMessage( aRefRange.aEnd.IncRow(nLen-1); OUString aRangeStr = aRefRange.Format(getRefFlags(rCellPos, rRefPos), &mpImpl->mrDoc); aBuf.append(aRangeStr); - aBuf.appendAscii(": "); + aBuf.append(": "); if (rArray.mpNumericArray) { if (rArray.mpStringArray) { // mixture of numeric and string cells. - aBuf.appendAscii("numeric and string"); + aBuf.append("numeric and string"); } else { // numeric cells only. - aBuf.appendAscii("numeric only"); + aBuf.append("numeric only"); } } else @@ -164,12 +164,12 @@ void FormulaLogger::GroupScope::addRefMessage( if (rArray.mpStringArray) { // string cells only. - aBuf.appendAscii("string only"); + aBuf.append("string only"); } else { // empty cells. - aBuf.appendAscii("empty"); + aBuf.append("empty"); } } @@ -195,18 +195,18 @@ void FormulaLogger::GroupScope::addRefMessage( OUStringBuffer aBuf; OUString aPosStr = rRefPos.Format(getRefFlags(rCellPos, rRefPos), &mpImpl->mrDoc); aBuf.append(aPosStr); - aBuf.appendAscii(": "); + aBuf.append(": "); switch (rToken.GetType()) { case formula::svDouble: - aBuf.appendAscii("numeric value"); + aBuf.append("numeric value"); break; case formula::svString: - aBuf.appendAscii("string value"); + aBuf.append("string value"); break; default: - aBuf.appendAscii("unknown value"); + aBuf.append("unknown value"); } mpImpl->maMessages.push_back(aBuf.makeStringAndClear()); commit 2da2cfcb19870181907cb46e08984a26485f6ffc Author: Tor Lillqvist <[email protected]> Date: Mon Dec 12 12:13:27 2016 +0200 Whitelist aLogger, in FormulaLogger& FormulaLogger::get() To avoid this: sc/source/core/tool/formulalogger.cxx:55:26: error: bad static variable causes crash on shutdown [loplugin:badstatics] static FormulaLogger aLogger; ~~~~~~~~~~~~~~~~~~~~~^~~~~~~ sc/inc/formulalogger.hxx:42:31: note: ... due to this member of 'FormulaLogger' [loplugin:badstatics] const ScFormulaCellGroup* mpLastGroup = nullptr; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ sc/inc/formulacell.hxx:66:20: note: ... due to this member of 'ScFormulaCellGroup' [loplugin:badstatics] ScFormulaCell *mpTopCell; ~~~~~~~~~~~~~~~^~~~~~~~~ sc/inc/formulacell.hxx:114:21: note: ... due to this member of 'ScFormulaCell' [loplugin:badstatics] ScDocument* pDocument; ~~~~~~~~~~~~~~~~^~~~~~~~~ sc/inc/document.hxx:312:27: note: ... due to this member of 'ScDocument' [loplugin:badstatics] VclPtr<SfxPrinter> pPrinter; ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~ Change-Id: I533e45f655ca928a801188aa48ee818d89a962ac diff --git a/compilerplugins/clang/badstatics.cxx b/compilerplugins/clang/badstatics.cxx index 7ac7820..463a3a3 100644 --- a/compilerplugins/clang/badstatics.cxx +++ b/compilerplugins/clang/badstatics.cxx @@ -197,6 +197,7 @@ public: // ScAddInAsync* keys if that set is not empty at exit || name == "g_aWindowList" //vcl/unx/gtk/a11y/atkutil.cxx, asserted empty at exit + || name == "aLogger" // FormulaLogger& FormulaLogger::get() in sc/source/core/tool/formulalogger.cxx || (loplugin::DeclCheck(pVarDecl).Var("aAllListeners") .Class("ScAddInListener").GlobalNamespace()) // not owning ) // these variables appear unproblematic commit 345800501c2af7c48460cc0437543822c09da1c0 Author: Tor Lillqvist <[email protected]> Date: Mon Dec 12 10:14:11 2016 +0200 loplugin:staticmethods Change-Id: Ia470ed848c5c27de1b0ae3fa89a59f6cb2ae38fe diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index f645333..45c819b0 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -2684,6 +2684,8 @@ void ChartView::render() pShapeFactory->postRender(pWindow); } } +#else + (void) this; #endif } commit 45566e7cc9ed6085907d9048f9dfe9623fb9ee76 Author: Tor Lillqvist <[email protected]> Date: Mon Dec 12 10:01:20 2016 +0200 loplugin:unreffun and loplugin:externandnotdefined Change-Id: I69f11aa5dd81834aa916a66437d8c091cdf245f3 diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index 5dc8dda..f645333 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -1072,7 +1072,9 @@ public: virtual void scroll(long nDelta) override; virtual void contextDestroyed() override; +#if HAVE_FEATURE_OPENGL const OpenGLWindow* getOpenGLWindow() const; +#endif void updateOpenGLWindow(); private: ChartView* mpView; @@ -1120,11 +1122,15 @@ void GL2DRenderer::contextDestroyed() mbContextDestroyed = true; } +#if HAVE_FEATURE_OPENGL + const OpenGLWindow* GL2DRenderer::getOpenGLWindow() const { return mpWindow; } +#endif + void GL2DRenderer::updateOpenGLWindow() { if(mbContextDestroyed) commit 3d17a4088283e28076d6794a429ed4a766fafa1f Author: Tor Lillqvist <[email protected]> Date: Mon Dec 12 09:00:49 2016 +0200 loplugin:override Change-Id: I7ef42d66a0ffbbd8f2754bd4aba0e77659c9ae83 diff --git a/vcl/headless/headlessinst.cxx b/vcl/headless/headlessinst.cxx index 5c02af9..b5d9a66 100644 --- a/vcl/headless/headlessinst.cxx +++ b/vcl/headless/headlessinst.cxx @@ -15,7 +15,7 @@ class HeadlessSalInstance : public SvpSalInstance public: explicit HeadlessSalInstance( SalYieldMutex *pMutex ); - virtual SalSystem* CreateSalSystem(); + virtual SalSystem* CreateSalSystem() override; }; HeadlessSalInstance::HeadlessSalInstance( SalYieldMutex *pMutex ) : @@ -29,7 +29,7 @@ public: virtual int ShowNativeDialog( const OUString& rTitle, const OUString& rMessage, const std::list< OUString >& rButtons, - int nDefButton ) + int nDefButton ) override { (void)rButtons; (void)nDefButton; ::fprintf(stdout, "LibreOffice - dialog '%s': '%s'", @@ -48,8 +48,8 @@ class HeadlessSalData : public SalGenericData { public: explicit HeadlessSalData( SalInstance *pInstance ) : SalGenericData( SAL_DATA_HEADLESS, pInstance ) {} - virtual void ErrorTrapPush() {} - virtual bool ErrorTrapPop( bool ) { return false; } + virtual void ErrorTrapPush() override {} + virtual bool ErrorTrapPop( bool ) override { return false; } }; // All the interesting stuff is slaved from the AndroidSalInstance commit 22166c75eea39d0ead98fa44b59ebd065e55a8a1 Author: Tor Lillqvist <[email protected]> Date: Mon Dec 12 08:58:52 2016 +0200 loplugin:nullptr Change-Id: I6ab405e7e9a0c8ac3a323fd2484e334c500280ae diff --git a/vcl/headless/headlessinst.cxx b/vcl/headless/headlessinst.cxx index f1b28da..5c02af9 100644 --- a/vcl/headless/headlessinst.cxx +++ b/vcl/headless/headlessinst.cxx @@ -79,9 +79,9 @@ const OUString& SalGetDesktopEnvironment() } SalData::SalData() : - m_pInstance( 0 ), - m_pPlugin( 0 ), - m_pPIManager(0 ) + m_pInstance( nullptr ), + m_pPlugin( nullptr ), + m_pPIManager( nullptr ) { } commit 00d3aaa2dca52eaa716a361d95ed67536040063e Author: Tor Lillqvist <[email protected]> Date: Mon Dec 12 08:55:15 2016 +0200 loplugin:unnecessaryoverride Change-Id: I45d7e14cef0058c4bfca4a3466e31d64e29bdfae diff --git a/vcl/headless/headlessinst.cxx b/vcl/headless/headlessinst.cxx index a1c1da3..f1b28da 100644 --- a/vcl/headless/headlessinst.cxx +++ b/vcl/headless/headlessinst.cxx @@ -14,7 +14,6 @@ class HeadlessSalInstance : public SvpSalInstance { public: explicit HeadlessSalInstance( SalYieldMutex *pMutex ); - virtual ~HeadlessSalInstance(); virtual SalSystem* CreateSalSystem(); }; @@ -24,14 +23,9 @@ HeadlessSalInstance::HeadlessSalInstance( SalYieldMutex *pMutex ) : { } -HeadlessSalInstance::~HeadlessSalInstance() -{ -} - class HeadlessSalSystem : public SvpSalSystem { public: HeadlessSalSystem() : SvpSalSystem() {} - virtual ~HeadlessSalSystem() {} virtual int ShowNativeDialog( const OUString& rTitle, const OUString& rMessage, const std::list< OUString >& rButtons, commit dfc643a5f75948c6afe63a2b8379138a1db17bff Author: Tor Lillqvist <[email protected]> Date: Mon Dec 12 02:23:11 2016 +0200 loplugin:unreffun Change-Id: If538d5d5347f58e18869cab2b687af26a39a89eb diff --git a/desktop/unx/source/splashx.c b/desktop/unx/source/splashx.c index d10ee89..d227ff5 100644 --- a/desktop/unx/source/splashx.c +++ b/desktop/unx/source/splashx.c @@ -7,6 +7,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "splashx.h" + #ifdef ENABLE_QUICKSTART_LIBPNG #include <X11/Xlib.h> @@ -32,8 +34,6 @@ #include <rtl/bootstrap.h> #include <rtl/ustrbuf.h> -#include "splashx.h" - typedef struct { unsigned char b, g, r; } color_t; @@ -723,8 +723,6 @@ struct splash* splash_create(rtl_uString* pAppPath, int argc, char** argv) #else /* not ENABLE_QUICKSTART_LIBPNG */ -#include <rtl/ustrbuf.h> - struct splash { }; diff --git a/desktop/unx/source/splashx.h b/desktop/unx/source/splashx.h index 4b5fff1..a74be00 100644 --- a/desktop/unx/source/splashx.h +++ b/desktop/unx/source/splashx.h @@ -10,10 +10,14 @@ #define INCLUDED_DESKTOP_UNX_SOURCE_SPLASHX_H +#include <rtl/ustring.h> + #ifdef __cplusplus extern "C" { #endif +struct splash; + struct splash* splash_create(rtl_uString* pAppPath, int argc, char** argv); void splash_destroy(struct splash* splash); _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
