[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - 4 commits - sw/qa sw/source
Julien Nabet
serval2412 at yahoo.fr
Fri Sep 4 03:33:28 PDT 2015
sw/qa/extras/odfexport/odfexport.cxx | 18 +++++++++---------
sw/source/core/view/viewsh.cxx | 2 +-
sw/source/filter/html/htmlplug.cxx | 6 ++++++
sw/source/uibase/inc/FrameControl.hxx | 2 +-
4 files changed, 17 insertions(+), 11 deletions(-)
New commits:
commit bbf9ea97c22380232e546dd89d645ce7db5924a9
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sat May 30 13:46:12 2015 +0200
WaE: suspicious cast from ´bool´ to ´sal_Bool´ [loplugin:salbool]
(cherry picked from commit 1f19bc5de3e0f4eb89c4ebc3b74319ccff138ada)
Change-Id: Ic463a57a0ef701c3d8dbcfb9b2254f6bbc266460
diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx
index dd19b0c..a39367a1 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -119,38 +119,38 @@ DECLARE_ODFEXPORT_TEST(testFramebackgrounds, "framebackgrounds.odt")
xTextFrame = getShape(8);
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_HATCH, getProperty<drawing::FillStyle>(xTextFrame, "FillStyle"));
CPPUNIT_ASSERT_EQUAL(OUString("Black 0 Degrees"), getProperty<OUString>(xTextFrame, "FillHatchName"));
- CPPUNIT_ASSERT_EQUAL(sal_Bool(false), getProperty<sal_Bool>(xTextFrame, "FillBackground"));
+ CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(xTextFrame, "FillBackground"));
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xTextFrame, "FillTransparence"));
//Frame 9
xTextFrame = getShape(9);
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_HATCH, getProperty<drawing::FillStyle>(xTextFrame, "FillStyle"));
CPPUNIT_ASSERT_EQUAL(OUString("Black 0 Degrees"), getProperty<OUString>(xTextFrame, "FillHatchName"));
- CPPUNIT_ASSERT_EQUAL(sal_Bool(true), getProperty<sal_Bool>(xTextFrame, "FillBackground"));
+ CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xTextFrame, "FillBackground"));
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xTextFrame, "FillTransparence"));
//Frame 10
xTextFrame = getShape(10);
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_HATCH, getProperty<drawing::FillStyle>(xTextFrame, "FillStyle"));
CPPUNIT_ASSERT_EQUAL(OUString("Black 0 Degrees"), getProperty<OUString>(xTextFrame, "FillHatchName"));
- CPPUNIT_ASSERT_EQUAL(sal_Bool(false), getProperty<sal_Bool>(xTextFrame, "FillBackground"));
+ CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(xTextFrame, "FillBackground"));
CPPUNIT_ASSERT_EQUAL(sal_Int32(45), getProperty<sal_Int32>(xTextFrame, "FillTransparence"));
//Frame 11
xTextFrame = getShape(11);
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_HATCH, getProperty<drawing::FillStyle>(xTextFrame, "FillStyle"));
CPPUNIT_ASSERT_EQUAL(OUString("Black 0 Degrees"), getProperty<OUString>(xTextFrame, "FillHatchName"));
- CPPUNIT_ASSERT_EQUAL(sal_Bool(true), getProperty<sal_Bool>(xTextFrame, "FillBackground"));
+ CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xTextFrame, "FillBackground"));
CPPUNIT_ASSERT_EQUAL(sal_Int32(45), getProperty<sal_Int32>(xTextFrame, "FillTransparence"));
//Frame 12
xTextFrame = getShape(12);
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_HATCH, getProperty<drawing::FillStyle>(xTextFrame, "FillStyle"));
CPPUNIT_ASSERT_EQUAL(OUString("Black 0 Degrees"), getProperty<OUString>(xTextFrame, "FillHatchName"));
- CPPUNIT_ASSERT_EQUAL(sal_Bool(false), getProperty<sal_Bool>(xTextFrame, "FillBackground"));
+ CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(xTextFrame, "FillBackground"));
aGradientxTextFrame = getProperty<awt::Gradient>(xTextFrame, "FillTransparenceGradient");
CPPUNIT_ASSERT_EQUAL(css::awt::GradientStyle_LINEAR, aGradientxTextFrame.Style);
//Frame 13
xTextFrame = getShape(13);
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_HATCH, getProperty<drawing::FillStyle>(xTextFrame, "FillStyle"));
CPPUNIT_ASSERT_EQUAL(OUString("Black 0 Degrees"), getProperty<OUString>(xTextFrame, "FillHatchName"));
- CPPUNIT_ASSERT_EQUAL(sal_Bool(true), getProperty<sal_Bool>(xTextFrame, "FillBackground"));
+ CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xTextFrame, "FillBackground"));
aGradientxTextFrame = getProperty<awt::Gradient>(xTextFrame, "FillTransparenceGradient");
CPPUNIT_ASSERT_EQUAL(css::awt::GradientStyle_LINEAR, aGradientxTextFrame.Style);
//Frame 14
@@ -162,7 +162,7 @@ DECLARE_ODFEXPORT_TEST(testFramebackgrounds, "framebackgrounds.odt")
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xTextFrame, "FillBitmapPositionOffsetY"));
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xTextFrame, "FillBitmapOffsetX"));
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xTextFrame, "FillBitmapOffsetY"));
- CPPUNIT_ASSERT_EQUAL(sal_Bool(true), getProperty<sal_Bool>(xTextFrame, "FillBitmapTile"));
+ CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xTextFrame, "FillBitmapTile"));
//Frame 15
xTextFrame = getShape(15);
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_BITMAP, getProperty<drawing::FillStyle>(xTextFrame, "FillStyle"));
@@ -172,7 +172,7 @@ DECLARE_ODFEXPORT_TEST(testFramebackgrounds, "framebackgrounds.odt")
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xTextFrame, "FillBitmapPositionOffsetY"));
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xTextFrame, "FillBitmapOffsetX"));
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xTextFrame, "FillBitmapOffsetY"));
- CPPUNIT_ASSERT_EQUAL(sal_Bool(true), getProperty<sal_Bool>(xTextFrame, "FillBitmapTile"));
+ CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xTextFrame, "FillBitmapTile"));
//Frame 16
xTextFrame = getShape(16);
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_BITMAP, getProperty<drawing::FillStyle>(xTextFrame, "FillStyle"));
@@ -181,7 +181,7 @@ DECLARE_ODFEXPORT_TEST(testFramebackgrounds, "framebackgrounds.odt")
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xTextFrame, "FillBitmapPositionOffsetY"));
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xTextFrame, "FillBitmapOffsetX"));
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xTextFrame, "FillBitmapOffsetY"));
- CPPUNIT_ASSERT_EQUAL(sal_Bool(true), getProperty<sal_Bool>(xTextFrame, "FillBitmapTile"));
+ CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xTextFrame, "FillBitmapTile"));
aGradientxTextFrame = getProperty<awt::Gradient>(xTextFrame, "FillTransparenceGradient");
CPPUNIT_ASSERT_EQUAL(css::awt::GradientStyle_LINEAR, aGradientxTextFrame.Style);
commit 7a583306acc7e4148aa4c9243f3ffe55d7025d20
Author: Tor Lillqvist <tml at collabora.com>
Date: Tue Sep 1 14:49:37 2015 +0300
WaE: loplugin:staticmethods in the non-Java case
Change-Id: Ibebe470d0d0c00bfcaf7b3cb90aa102e8101b7bc
(cherry picked from commit 00b0ce6756184acbdf1a459e4a602534d7e1f05d)
diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx
index b9e1425..5a743bf 100644
--- a/sw/source/filter/html/htmlplug.cxx
+++ b/sw/source/filter/html/htmlplug.cxx
@@ -655,6 +655,8 @@ void SwHTMLParser::EndObject()
delete pAppletImpl;
pAppletImpl = 0;
}
+#else
+ (void) this; // Silence loplugin:staticmethods
#endif
}
@@ -786,6 +788,8 @@ void SwHTMLParser::EndApplet()
delete pAppletImpl;
pAppletImpl = 0;
+#else
+ (void) this;
#endif
}
@@ -816,6 +820,8 @@ void SwHTMLParser::InsertParam()
return;
pAppletImpl->AppendParam( aName, aValue );
+#else
+ (void) this;
#endif
}
commit 01d25476b9ecf074a924affec8feed427c912488
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Jun 30 13:36:28 2015 +0200
loplugin:vclwidgets
Change-Id: Icebaba828316b0f304ad407dc88d7a45f1f62cba
(cherry picked from commit 8c92b5ae3d6e96f64754da603a36f42b7feaac5a)
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index cd04a88..d79458f 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -1674,7 +1674,7 @@ namespace
class RenderContextGuard
{
VclPtr<vcl::RenderContext>& m_pRef;
- vcl::RenderContext* m_pOriginalValue;
+ VclPtr<vcl::RenderContext> m_pOriginalValue;
SwViewShell* m_pShell;
public:
commit 5aee96edd0adeea07cbd370011dcee274e96f0c8
Author: Tor Lillqvist <tml at collabora.com>
Date: Fri Sep 4 12:48:42 2015 +0300
WaE: loplugin:vclwidgets
OutputDevice subclass with VclPtr field must call dispose() from its
destructor.
Change-Id: I775e1add8bba7ae03d503c7099f7492b0e006524
diff --git a/sw/source/uibase/inc/FrameControl.hxx b/sw/source/uibase/inc/FrameControl.hxx
index 5787b23..653c6e1 100644
--- a/sw/source/uibase/inc/FrameControl.hxx
+++ b/sw/source/uibase/inc/FrameControl.hxx
@@ -56,7 +56,7 @@ class SwFrameMenuButtonBase : public MenuButton, public ISwFrameControl
const SwFrm* m_pFrm;
protected:
- virtual ~SwFrameMenuButtonBase() {}
+ virtual ~SwFrameMenuButtonBase() { disposeOnce(); }
virtual void dispose() SAL_OVERRIDE;
public:
More information about the Libreoffice-commits
mailing list