summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-10-19 10:24:57 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-10-20 06:12:24 +0000
commit40fc2c1a0d2ebdf47131651045107c9d5abb850d (patch)
tree66a2d4c7220dfd47b09984892a8a08a7e5ab5fea
parente7324c5705eaa38a2c9aa0636f01a73f033ba4d6 (diff)
loplugin:expandablemethodds in sfx2..starmath
Change-Id: Ia4c411f5a9a68c2f344188ce6b6bc1815c89f993 Reviewed-on: https://gerrit.libreoffice.org/30055 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--sfx2/source/doc/oleprops.hxx4
-rw-r--r--slideshow/source/engine/animationnodes/animationsetnode.cxx9
-rw-r--r--slideshow/source/engine/animationnodes/animationsetnode.hxx1
-rw-r--r--slideshow/source/engine/shapes/drawinglayeranimation.cxx8
-rw-r--r--slideshow/source/engine/shapes/viewshape.cxx2
-rw-r--r--slideshow/source/engine/shapes/viewshape.hxx7
-rw-r--r--starmath/inc/parse.hxx3
-rw-r--r--starmath/inc/rect.hxx1
-rw-r--r--starmath/inc/view.hxx5
-rw-r--r--starmath/source/parse.cxx4
-rw-r--r--starmath/source/rect.cxx2
-rw-r--r--starmath/source/view.cxx2
12 files changed, 10 insertions, 38 deletions
diff --git a/sfx2/source/doc/oleprops.hxx b/sfx2/source/doc/oleprops.hxx
index a4190a20ea47..dfadd52b4290 100644
--- a/sfx2/source/doc/oleprops.hxx
+++ b/sfx2/source/doc/oleprops.hxx
@@ -170,8 +170,6 @@ public:
inline explicit SfxOleObjectBase() : mnErrCode( ERRCODE_NONE ) {}
virtual ~SfxOleObjectBase();
- /** Returns true, if an error code (other than ERRCODE_NONE) is set. */
- inline bool HasError() const { return mnErrCode != ERRCODE_NONE; }
/** Returns the current error code. */
inline ErrCode GetError() const { return mnErrCode; }
@@ -183,7 +181,7 @@ public:
protected:
/** Sets the passed error code. Will be returned by Load() and Save() functions.
Always the first error code is stored. Multiple calls have no effect. */
- inline void SetError( ErrCode nErrCode ) { if( !HasError() ) mnErrCode = nErrCode; }
+ inline void SetError( ErrCode nErrCode ) { if( mnErrCode == ERRCODE_NONE ) mnErrCode = nErrCode; }
/** Loads the passed object from the stream. Sets returned error code as own error. */
void LoadObject( SvStream& rStrm, SfxOleObjectBase& rObj );
/** Saves the passed object to the stream. Sets returned error code as own error. */
diff --git a/slideshow/source/engine/animationnodes/animationsetnode.cxx b/slideshow/source/engine/animationnodes/animationsetnode.cxx
index 0e19b7fb8778..3770790c193e 100644
--- a/slideshow/source/engine/animationnodes/animationsetnode.cxx
+++ b/slideshow/source/engine/animationnodes/animationsetnode.cxx
@@ -30,11 +30,6 @@ using namespace com::sun::star;
namespace slideshow {
namespace internal {
-void AnimationSetNode::implScheduleDeactivationEvent()
-{
- scheduleDeactivationEvent();
-}
-
AnimationActivitySharedPtr AnimationSetNode::createActivity() const
{
ActivitiesFactory::CommonParameters aParms( fillCommonParameters() );
@@ -61,8 +56,8 @@ AnimationActivitySharedPtr AnimationSetNode::createActivity() const
ENSURE_OR_THROW(
pSelf, "cannot cast getSelf() to my type!" );
aParms.mpEndEvent = makeEvent(
- [pSelf] () { pSelf->implScheduleDeactivationEvent(); },
- "AnimationSetNode::implScheduleDeactivationEvent");
+ [pSelf] () { pSelf->scheduleDeactivationEvent(); },
+ "AnimationSetNode::scheduleDeactivationEvent");
}
switch (AnimationFactory::classifyAttributeName( attrName )) {
diff --git a/slideshow/source/engine/animationnodes/animationsetnode.hxx b/slideshow/source/engine/animationnodes/animationsetnode.hxx
index ee63b42d9132..9c39377470b1 100644
--- a/slideshow/source/engine/animationnodes/animationsetnode.hxx
+++ b/slideshow/source/engine/animationnodes/animationsetnode.hxx
@@ -39,7 +39,6 @@ public:
private:
virtual AnimationActivitySharedPtr createActivity() const override;
- void implScheduleDeactivationEvent();
};
} // namespace internal
diff --git a/slideshow/source/engine/shapes/drawinglayeranimation.cxx b/slideshow/source/engine/shapes/drawinglayeranimation.cxx
index 41e30972212b..63d1787474cb 100644
--- a/slideshow/source/engine/shapes/drawinglayeranimation.cxx
+++ b/slideshow/source/engine/shapes/drawinglayeranimation.cxx
@@ -156,10 +156,6 @@ private:
void updateShapeAttributes( double fTime,
basegfx::B2DRectangle const& parentBounds );
- // Access to VisibleWhenSTarted flags
- bool IsVisibleWhenStarted() const { return mbVisibleWhenStarted; }
- bool IsVisibleWhenStopped() const { return mbVisibleWhenStopped; }
-
// scroll horizontal? if sal_False, scroll is vertical.
bool ScrollHorizontal() const {
return (drawing::TextAnimationDirection_LEFT == meDirection ||
@@ -418,7 +414,7 @@ void ActivityImpl::ImpForceScrollTextAnimNodes()
fOneRelative = 1.0;
}
- if(IsVisibleWhenStarted())
+ if(mbVisibleWhenStarted)
{
double fRelativeStartValue, fRelativeEndValue,fRelativeDistance;
@@ -496,7 +492,7 @@ void ActivityImpl::ImpForceScrollTextAnimNodes()
}
}
- if(IsVisibleWhenStopped())
+ if(mbVisibleWhenStopped)
{
double fRelativeStartValue, fRelativeEndValue, fRelativeDistance;
diff --git a/slideshow/source/engine/shapes/viewshape.cxx b/slideshow/source/engine/shapes/viewshape.cxx
index 2acc75f0b835..7ea7bcc5e98a 100644
--- a/slideshow/source/engine/shapes/viewshape.cxx
+++ b/slideshow/source/engine/shapes/viewshape.cxx
@@ -838,7 +838,7 @@ namespace slideshow
ENSURE_OR_RETURN_FALSE( mpViewLayer->getCanvas(), "ViewShape::update(): Invalid layer canvas" );
// Shall we render to a sprite, or to a plain canvas?
- if( isBackgroundDetached() )
+ if( mbAnimationMode )
return renderSprite( mpViewLayer,
rMtf,
rArgs.maOrigBounds,
diff --git a/slideshow/source/engine/shapes/viewshape.hxx b/slideshow/source/engine/shapes/viewshape.hxx
index 9f6d46c89fe0..4eb2f7c1e7c5 100644
--- a/slideshow/source/engine/shapes/viewshape.hxx
+++ b/slideshow/source/engine/shapes/viewshape.hxx
@@ -95,13 +95,6 @@ namespace slideshow
*/
void leaveAnimationMode();
- /** Query whether the ViewShape is currently animated
-
- This method checks whether the ViewShape is currently in
- animation mode.
- */
- bool isBackgroundDetached() const { return mbAnimationMode; }
-
// render methods
diff --git a/starmath/inc/parse.hxx b/starmath/inc/parse.hxx
index 7d679310cc6c..d22a426519fe 100644
--- a/starmath/inc/parse.hxx
+++ b/starmath/inc/parse.hxx
@@ -92,9 +92,6 @@ class SmParser
void Error(SmParseError Error);
- void ClearUsedSymbols() { m_aUsedSymbols.clear(); }
- void AddToUsedSymbols( const OUString &rSymbolName ) { m_aUsedSymbols.insert( rSymbolName ); }
-
public:
SmParser();
diff --git a/starmath/inc/rect.hxx b/starmath/inc/rect.hxx
index 1c8f3e3b5ead..c28e1d257539 100644
--- a/starmath/inc/rect.hxx
+++ b/starmath/inc/rect.hxx
@@ -114,7 +114,6 @@ protected:
void Init(const OutputDevice &rDev, const SmFormat *pFormat,
const OUString &rText, sal_uInt16 nBorderWidth);
- void ClearBaseline() { bHasBaseline = false; };
inline void CopyMBL(const SmRect& rRect);
void CopyAlignInfo(const SmRect& rRect);
diff --git a/starmath/inc/view.hxx b/starmath/inc/view.hxx
index d17919eddc38..e6bf3238bec5 100644
--- a/starmath/inc/view.hxx
+++ b/starmath/inc/view.hxx
@@ -80,11 +80,6 @@ private:
sal_uInt16 nZoom;
protected:
- void SetFormulaDrawPos(const Point &rPos)
- {
- aFormulaDrawPos = rPos;
- }
-
virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle&) override;
virtual void KeyInput(const KeyEvent& rKEvt) override;
virtual void Command(const CommandEvent& rCEvt) override;
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index 56023adb10cf..f33a942f0ee5 100644
--- a/starmath/source/parse.cxx
+++ b/starmath/source/parse.cxx
@@ -2255,7 +2255,7 @@ void SmParser::DoSpecial()
// add symbol name to list of used symbols
const OUString aSymbolName(m_aCurToken.aText.copy(1));
if (!aSymbolName.isEmpty())
- AddToUsedSymbols( aSymbolName );
+ m_aUsedSymbols.insert( aSymbolName );
m_aNodeStack.push_front(o3tl::make_unique<SmSpecialNode>(m_aCurToken));
NextToken();
@@ -2301,7 +2301,7 @@ SmParser::SmParser()
SmTableNode *SmParser::Parse(const OUString &rBuffer)
{
- ClearUsedSymbols();
+ m_aUsedSymbols.clear();
m_aBufferString = convertLineEnd(rBuffer, LINEEND_LF);
m_nBufferIndex = 0;
diff --git a/starmath/source/rect.cxx b/starmath/source/rect.cxx
index 550cd242b2cd..63798c6b917f 100644
--- a/starmath/source/rect.cxx
+++ b/starmath/source/rect.cxx
@@ -462,7 +462,7 @@ SmRect & SmRect::ExtendBy(const SmRect &rRect, RectCopyMBL eCopyMode)
CopyMBL(rRect);
break;
case RectCopyMBL::None:
- ClearBaseline();
+ bHasBaseline = false;
nAlignM = (nAlignT + nAlignB) / 2;
break;
case RectCopyMBL::Xor:
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 3bd645a314bf..47f15e602c94 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -379,7 +379,7 @@ void SmGraphicWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&
rDoc.DrawFormula(rRenderContext, aPoint, true); //! modifies aPoint to be the topleft
//! corner of the formula
- SetFormulaDrawPos(aPoint);
+ aFormulaDrawPos = aPoint;
if (IsInlineEditEnabled())
{
//Draw cursor if any...