Kaydet (Commit) 198f3ec1 authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Noel Grandin

loplugin:unusedmethods

Change-Id: I0fb06079ff8a9d0b2f5a2929f31846f91391f5c4
Reviewed-on: https://gerrit.libreoffice.org/22229Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
üst 6cc5d37d
......@@ -260,10 +260,10 @@ def natural_sort_key(s, _nsre=re.compile('([0-9]+)')):
tmp1list = sorted(tmp1set, key=lambda v: natural_sort_key(v[1]))
# print out the results
#for t in tmp1list:
# print t[1]
# print " ", t[0]
#sys.exit(0)
with open("unused.methods", "wt") as f:
for t in tmp1list:
f.write(t[1] + "\n")
f.write(" " + t[0] + "\n")
# -------------------------------------------
# Do the "unused return types" part
......@@ -304,9 +304,10 @@ for d in definitionSet:
# sort results by name and line number
tmp2list = sorted(tmp2set, key=lambda v: natural_sort_key(v[1]))
#for t in tmp2list:
# print t[1]
# print " ", t[0]
with open("unused.returns", "wt") as f:
for t in tmp2list:
f.write(t[1])
f.write(" " + t[0] + "\n")
# -------------------------------------------
......@@ -328,11 +329,10 @@ for d in publicDefinitionSet:
# sort results by name and line number
tmp3list = sorted(tmp3set, key=lambda v: natural_sort_key(v[1]))
for t in tmp3list:
print t[1]
print " ", t[0]
with open("unused.public", "wt") as f:
for t in tmp3list:
f.write(t[1] + "\n")
f.write(" " + t[0] + "\n")
# add an empty line at the end to make it easier for the unusedmethodsremove plugin to mmap() the output file
print
......@@ -80,7 +80,6 @@ public:
bool operator < ( const SvGlobalName & rObj ) const;
SvGlobalName& operator += ( sal_uInt32 );
SvGlobalName& operator ++ () { return operator += ( 1 ); }
bool operator == ( const SvGlobalName & rObj ) const;
bool operator != ( const SvGlobalName & rObj ) const
......
......@@ -45,7 +45,6 @@ public:
bool initOptions (std::vector< std::string > & rArgs);
bool badOption (char const * reason, char const * option) const;
std::string const & getProgramName() const { return m_program; }
bool printUsage() const;
protected:
......
......@@ -16,8 +16,6 @@ public:
sal_Int32 InsertCategory( const OUString& rStr, sal_Int32 nPos = LISTBOX_APPEND );
void SetDoubleClickLink( const Link<CategoryListBox&,void>& rDoubleClickHdl ) { maDoubleClickHdl = rDoubleClickHdl; }
DECL_LINK_TYPED(implDoubleClickHdl, ListBox&, void);
private:
......
......@@ -275,30 +275,6 @@ void CustomAnimationPane::dispose()
PanelLayout::dispose();
}
PathKind CustomAnimationPane::getCreatePathKind() const
{
PathKind eKind = PathKind::NONE;
if( mpLBAnimation->GetSelectEntryCount() == 1 )
{
const sal_Int32 nPos = mpLBAnimation->GetSelectEntryPos();
if( nPos == mnCurvePathPos )
{
eKind = PathKind::CURVE;
}
else if( nPos == mnPolygonPathPos )
{
eKind = PathKind::POLYGON;
}
else if( nPos == mnFreeformPathPos )
{
eKind = PathKind::FREEFORM;
}
}
return eKind;
}
void CustomAnimationPane::addUndo()
{
::svl::IUndoManager* pManager = mrBase.GetDocShell()->GetUndoManager();
......@@ -1768,33 +1744,6 @@ bool getTextSelection( const Any& rSelection, Reference< XShape >& xShape, std::
return false;
}
void CustomAnimationPane::animationChange()
{
if( maListSelection.size() == 1 )
{
CustomAnimationPresetPtr* pPreset = static_cast< CustomAnimationPresetPtr* >(mpLBAnimation->GetSelectEntryData());
const double fDuration = (*pPreset)->getDuration();
CustomAnimationPresetPtr pDescriptor(*pPreset);
MainSequenceRebuildGuard aGuard( mpMainSequence );
// get selected effect
EffectSequence::iterator aIter( maListSelection.begin() );
const EffectSequence::iterator aEnd( maListSelection.end() );
while( aIter != aEnd )
{
CustomAnimationEffectPtr pEffect = (*aIter++);
EffectSequenceHelper* pEffectSequence = pEffect->getEffectSequence();
if( !pEffectSequence )
pEffectSequence = mpMainSequence.get();
pEffectSequence->replace( pEffect, pDescriptor, fDuration );
}
onPreview(true);
}
}
void CustomAnimationPane::onChange()
{
bool bHasText = true;
......@@ -1926,38 +1875,6 @@ void CustomAnimationPane::onChange()
SlideShow::Stop( mrBase );
}
void CustomAnimationPane::createPath( PathKind eKind, std::vector< Any >& rTargets, double fDuration)
{
sal_uInt16 nSID = 0;
switch( eKind )
{
case PathKind::CURVE: nSID = SID_DRAW_BEZIER_NOFILL; break;
case PathKind::POLYGON: nSID = SID_DRAW_POLYGON_NOFILL; break;
case PathKind::FREEFORM: nSID = SID_DRAW_FREELINE_NOFILL; break;
default: break;
}
if( nSID )
{
DrawViewShell* pViewShell = dynamic_cast< DrawViewShell* >(
FrameworkHelper::Instance(mrBase)->GetViewShell(FrameworkHelper::msCenterPaneURL).get());
if( pViewShell )
{
DrawView* pView = pViewShell->GetDrawView();
if( pView )
pView->UnmarkAllObj();
std::vector< Any > aTargets( 1, Any( fDuration ) );
aTargets.insert( aTargets.end(), rTargets.begin(), rTargets.end() );
Sequence< Any > aTargetSequence( comphelper::containerToSequence( aTargets ) );
const SfxUnoAnyItem aItem( SID_ADD_MOTION_PATH, Any( aTargetSequence ) );
pViewShell->GetViewFrame()->GetDispatcher()->Execute( nSID, SfxCallMode::ASYNCHRON, &aItem, 0 );
}
}
}
void CustomAnimationPane::onRemove()
{
if( !maListSelection.empty() )
......
......@@ -71,7 +71,6 @@ public:
void onSelectionChanged();
void onChangeCurrentPage();
void onChange();
void animationChange();
void onRemove();
void onChangeStart();
void onChangeStart( sal_Int16 nNodeType );
......@@ -82,7 +81,6 @@ public:
void preview( const css::uno::Reference< css::animations::XAnimationNode >& xAnimationNode );
void remove( CustomAnimationEffectPtr& pEffect );
PathKind getCreatePathKind() const;
// Control
virtual void StateChanged( StateChangedType nStateChange ) override;
virtual void KeyInput( const KeyEvent& rKEvt ) override;
......@@ -111,8 +109,6 @@ private:
void moveSelection( bool bUp );
void onPreview( bool bForcePreview );
void createPath( PathKind eKind, std::vector< css::uno::Any >& rTargets, double fDuration );
STLPropertySet* createSelectionSet();
void changeSelection( STLPropertySet* pResultSet, STLPropertySet* pOldSet );
......
......@@ -165,10 +165,6 @@ public:
OutputDevice* getShowWindow(); // a.k.a. FuSlideShow::GetShowWindow()
int getAnimationMode(); // a.k.a. FuSlideShow::GetAnimationMode()
sal_Int32 getCurrentPageNumber(); // a.k.a. FuSlideShow::GetCurrentPage()
sal_Int32 getFirstPageNumber();
sal_Int32 getLastPageNumber();
bool isEndless();
bool isDrawingPossible();
// events
void resize( const Size &rSize );
......@@ -178,8 +174,6 @@ public:
bool keyInput(const KeyEvent& rKEvt);
void receiveRequest(SfxRequest& rReq);
bool dependsOn( ViewShellBase* pViewShellBase );
static sal_Int32 GetDisplay();
......
......@@ -1020,26 +1020,6 @@ void SlideShow::pause( bool bPause )
}
}
sal_Int32 SlideShow::getFirstPageNumber()
{
return mxController.is() ? mxController->getFirstSlideNumber() : 0;
}
sal_Int32 SlideShow::getLastPageNumber()
{
return mxController.is() ? mxController->getLastSlideNumber() : 0;
}
bool SlideShow::isEndless()
{
return mxController.is() && mxController->isEndless();
}
bool SlideShow::isDrawingPossible()
{
return mxController.is() && mxController->getUsePen();
}
bool SlideShow::swipe(const CommandSwipeData& rSwipeData)
{
return mxController.is() && mxController->swipe(rSwipeData);
......
......@@ -283,9 +283,6 @@ private:
DECL_LINK_TYPED( deactivateHdl, Timer *, void );
DECL_LINK_TYPED( EventListenerHdl, VclSimpleEvent&, void );
// helper
void receiveRequest(SfxRequest& rReq);
/** called only by the slideshow view when the first paint event occurs.
This actually starts the slideshow. */
void onFirstPaint();
......
......@@ -50,7 +50,6 @@ public:
void SetColor( PIXBYTE r, PIXBYTE g, PIXBYTE b ) const;
void SetAlpha( PIXBYTE a ) const;
void operator++(int);
};
// template specializations for truecolor pixel formats
......
......@@ -127,9 +127,6 @@ public:
virtual void Resize() override;
virtual void RequestHelp( const HelpEvent& rHEvt ) override;
void SetFocusId(const VclPtr<vcl::Window>& xId) { xSaveFocusId = xId; }
VclPtr<vcl::Window> GetFocusId() const { return xSaveFocusId; }
void SetMenu(MenuBar* pMenu);
void SetHeight(long nHeight);
void KillActivePopup();
......
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