Kaydet (Commit) 40fc2c1a authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:expandablemethodds in sfx2..starmath

Change-Id: Ia4c411f5a9a68c2f344188ce6b6bc1815c89f993
Reviewed-on: https://gerrit.libreoffice.org/30055Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
Tested-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst e7324c57
...@@ -170,8 +170,6 @@ public: ...@@ -170,8 +170,6 @@ public:
inline explicit SfxOleObjectBase() : mnErrCode( ERRCODE_NONE ) {} inline explicit SfxOleObjectBase() : mnErrCode( ERRCODE_NONE ) {}
virtual ~SfxOleObjectBase(); 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. */ /** Returns the current error code. */
inline ErrCode GetError() const { return mnErrCode; } inline ErrCode GetError() const { return mnErrCode; }
...@@ -183,7 +181,7 @@ public: ...@@ -183,7 +181,7 @@ public:
protected: protected:
/** Sets the passed error code. Will be returned by Load() and Save() functions. /** 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. */ 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. */ /** Loads the passed object from the stream. Sets returned error code as own error. */
void LoadObject( SvStream& rStrm, SfxOleObjectBase& rObj ); void LoadObject( SvStream& rStrm, SfxOleObjectBase& rObj );
/** Saves the passed object to the stream. Sets returned error code as own error. */ /** Saves the passed object to the stream. Sets returned error code as own error. */
......
...@@ -30,11 +30,6 @@ using namespace com::sun::star; ...@@ -30,11 +30,6 @@ using namespace com::sun::star;
namespace slideshow { namespace slideshow {
namespace internal { namespace internal {
void AnimationSetNode::implScheduleDeactivationEvent()
{
scheduleDeactivationEvent();
}
AnimationActivitySharedPtr AnimationSetNode::createActivity() const AnimationActivitySharedPtr AnimationSetNode::createActivity() const
{ {
ActivitiesFactory::CommonParameters aParms( fillCommonParameters() ); ActivitiesFactory::CommonParameters aParms( fillCommonParameters() );
...@@ -61,8 +56,8 @@ AnimationActivitySharedPtr AnimationSetNode::createActivity() const ...@@ -61,8 +56,8 @@ AnimationActivitySharedPtr AnimationSetNode::createActivity() const
ENSURE_OR_THROW( ENSURE_OR_THROW(
pSelf, "cannot cast getSelf() to my type!" ); pSelf, "cannot cast getSelf() to my type!" );
aParms.mpEndEvent = makeEvent( aParms.mpEndEvent = makeEvent(
[pSelf] () { pSelf->implScheduleDeactivationEvent(); }, [pSelf] () { pSelf->scheduleDeactivationEvent(); },
"AnimationSetNode::implScheduleDeactivationEvent"); "AnimationSetNode::scheduleDeactivationEvent");
} }
switch (AnimationFactory::classifyAttributeName( attrName )) { switch (AnimationFactory::classifyAttributeName( attrName )) {
......
...@@ -39,7 +39,6 @@ public: ...@@ -39,7 +39,6 @@ public:
private: private:
virtual AnimationActivitySharedPtr createActivity() const override; virtual AnimationActivitySharedPtr createActivity() const override;
void implScheduleDeactivationEvent();
}; };
} // namespace internal } // namespace internal
......
...@@ -156,10 +156,6 @@ private: ...@@ -156,10 +156,6 @@ private:
void updateShapeAttributes( double fTime, void updateShapeAttributes( double fTime,
basegfx::B2DRectangle const& parentBounds ); 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. // scroll horizontal? if sal_False, scroll is vertical.
bool ScrollHorizontal() const { bool ScrollHorizontal() const {
return (drawing::TextAnimationDirection_LEFT == meDirection || return (drawing::TextAnimationDirection_LEFT == meDirection ||
...@@ -418,7 +414,7 @@ void ActivityImpl::ImpForceScrollTextAnimNodes() ...@@ -418,7 +414,7 @@ void ActivityImpl::ImpForceScrollTextAnimNodes()
fOneRelative = 1.0; fOneRelative = 1.0;
} }
if(IsVisibleWhenStarted()) if(mbVisibleWhenStarted)
{ {
double fRelativeStartValue, fRelativeEndValue,fRelativeDistance; double fRelativeStartValue, fRelativeEndValue,fRelativeDistance;
...@@ -496,7 +492,7 @@ void ActivityImpl::ImpForceScrollTextAnimNodes() ...@@ -496,7 +492,7 @@ void ActivityImpl::ImpForceScrollTextAnimNodes()
} }
} }
if(IsVisibleWhenStopped()) if(mbVisibleWhenStopped)
{ {
double fRelativeStartValue, fRelativeEndValue, fRelativeDistance; double fRelativeStartValue, fRelativeEndValue, fRelativeDistance;
......
...@@ -838,7 +838,7 @@ namespace slideshow ...@@ -838,7 +838,7 @@ namespace slideshow
ENSURE_OR_RETURN_FALSE( mpViewLayer->getCanvas(), "ViewShape::update(): Invalid layer canvas" ); ENSURE_OR_RETURN_FALSE( mpViewLayer->getCanvas(), "ViewShape::update(): Invalid layer canvas" );
// Shall we render to a sprite, or to a plain canvas? // Shall we render to a sprite, or to a plain canvas?
if( isBackgroundDetached() ) if( mbAnimationMode )
return renderSprite( mpViewLayer, return renderSprite( mpViewLayer,
rMtf, rMtf,
rArgs.maOrigBounds, rArgs.maOrigBounds,
......
...@@ -95,13 +95,6 @@ namespace slideshow ...@@ -95,13 +95,6 @@ namespace slideshow
*/ */
void leaveAnimationMode(); 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 // render methods
......
...@@ -92,9 +92,6 @@ class SmParser ...@@ -92,9 +92,6 @@ class SmParser
void Error(SmParseError Error); void Error(SmParseError Error);
void ClearUsedSymbols() { m_aUsedSymbols.clear(); }
void AddToUsedSymbols( const OUString &rSymbolName ) { m_aUsedSymbols.insert( rSymbolName ); }
public: public:
SmParser(); SmParser();
......
...@@ -114,7 +114,6 @@ protected: ...@@ -114,7 +114,6 @@ protected:
void Init(const OutputDevice &rDev, const SmFormat *pFormat, void Init(const OutputDevice &rDev, const SmFormat *pFormat,
const OUString &rText, sal_uInt16 nBorderWidth); const OUString &rText, sal_uInt16 nBorderWidth);
void ClearBaseline() { bHasBaseline = false; };
inline void CopyMBL(const SmRect& rRect); inline void CopyMBL(const SmRect& rRect);
void CopyAlignInfo(const SmRect& rRect); void CopyAlignInfo(const SmRect& rRect);
......
...@@ -80,11 +80,6 @@ private: ...@@ -80,11 +80,6 @@ private:
sal_uInt16 nZoom; sal_uInt16 nZoom;
protected: protected:
void SetFormulaDrawPos(const Point &rPos)
{
aFormulaDrawPos = rPos;
}
virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle&) override; virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle&) override;
virtual void KeyInput(const KeyEvent& rKEvt) override; virtual void KeyInput(const KeyEvent& rKEvt) override;
virtual void Command(const CommandEvent& rCEvt) override; virtual void Command(const CommandEvent& rCEvt) override;
......
...@@ -2255,7 +2255,7 @@ void SmParser::DoSpecial() ...@@ -2255,7 +2255,7 @@ void SmParser::DoSpecial()
// add symbol name to list of used symbols // add symbol name to list of used symbols
const OUString aSymbolName(m_aCurToken.aText.copy(1)); const OUString aSymbolName(m_aCurToken.aText.copy(1));
if (!aSymbolName.isEmpty()) if (!aSymbolName.isEmpty())
AddToUsedSymbols( aSymbolName ); m_aUsedSymbols.insert( aSymbolName );
m_aNodeStack.push_front(o3tl::make_unique<SmSpecialNode>(m_aCurToken)); m_aNodeStack.push_front(o3tl::make_unique<SmSpecialNode>(m_aCurToken));
NextToken(); NextToken();
...@@ -2301,7 +2301,7 @@ SmParser::SmParser() ...@@ -2301,7 +2301,7 @@ SmParser::SmParser()
SmTableNode *SmParser::Parse(const OUString &rBuffer) SmTableNode *SmParser::Parse(const OUString &rBuffer)
{ {
ClearUsedSymbols(); m_aUsedSymbols.clear();
m_aBufferString = convertLineEnd(rBuffer, LINEEND_LF); m_aBufferString = convertLineEnd(rBuffer, LINEEND_LF);
m_nBufferIndex = 0; m_nBufferIndex = 0;
......
...@@ -462,7 +462,7 @@ SmRect & SmRect::ExtendBy(const SmRect &rRect, RectCopyMBL eCopyMode) ...@@ -462,7 +462,7 @@ SmRect & SmRect::ExtendBy(const SmRect &rRect, RectCopyMBL eCopyMode)
CopyMBL(rRect); CopyMBL(rRect);
break; break;
case RectCopyMBL::None: case RectCopyMBL::None:
ClearBaseline(); bHasBaseline = false;
nAlignM = (nAlignT + nAlignB) / 2; nAlignM = (nAlignT + nAlignB) / 2;
break; break;
case RectCopyMBL::Xor: case RectCopyMBL::Xor:
......
...@@ -379,7 +379,7 @@ void SmGraphicWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& ...@@ -379,7 +379,7 @@ void SmGraphicWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&
rDoc.DrawFormula(rRenderContext, aPoint, true); //! modifies aPoint to be the topleft rDoc.DrawFormula(rRenderContext, aPoint, true); //! modifies aPoint to be the topleft
//! corner of the formula //! corner of the formula
SetFormulaDrawPos(aPoint); aFormulaDrawPos = aPoint;
if (IsInlineEditEnabled()) if (IsInlineEditEnabled())
{ {
//Draw cursor if any... //Draw cursor if any...
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment