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:
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. */
......
......@@ -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 )) {
......
......@@ -39,7 +39,6 @@ public:
private:
virtual AnimationActivitySharedPtr createActivity() const override;
void implScheduleDeactivationEvent();
};
} // namespace internal
......
......@@ -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;
......
......@@ -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,
......
......@@ -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
......
......@@ -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();
......
......@@ -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);
......
......@@ -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;
......
......@@ -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;
......
......@@ -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:
......
......@@ -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...
......
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