Skip to content

Commit

Permalink
loplugin:unusedmethods in chart2..svx
Browse files Browse the repository at this point in the history
Change-Id: Ifb6045885049733415895f58cdd911256f48323c
Reviewed-on: https://gerrit.libreoffice.org/29187
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
  • Loading branch information
Noel Grandin authored and Noel Grandin committed Sep 22, 2016
1 parent c4cd079 commit 7419057
Show file tree
Hide file tree
Showing 54 changed files with 13 additions and 490 deletions.
1 change: 0 additions & 1 deletion chart2/source/controller/inc/ChartController.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,6 @@ private:

virtual ~TheModel() override;

void SetOwnership( bool bGetsOwnership );
void addListener( ChartController* pController );
void removeListener( ChartController* pController );
void tryTermination();
Expand Down
5 changes: 0 additions & 5 deletions chart2/source/controller/main/ChartController.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,6 @@ ChartController::TheModel::~TheModel()
{
}

void ChartController::TheModel::SetOwnership( bool bGetsOwnership )
{
m_bOwnership = bGetsOwnership;
}

void ChartController::TheModel::addListener( ChartController* pController )
{
if(m_xCloseable.is())
Expand Down
7 changes: 7 additions & 0 deletions compilerplugins/clang/unusedmethods.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@ def sort_set_by_natural_key(s):
# used by Windows build
if any(x in d[1] for x in ["DdeTopic::", "DdeData::", "DdeService::", "DdeTransaction::", "DdeConnection::", "DdeLink::", "DdeItem::", "DdeGetPutItem::"]):
continue
if method == "class tools::SvRef<class FontCharMap> FontCharMap::GetDefaultMap(_Bool)":
continue
# too much template magic here for my plugin
if ( ("cairocanvas::" in d[1])
or ("canvas::" in d[1])
Expand Down Expand Up @@ -268,9 +270,14 @@ def sort_set_by_natural_key(s):
continue
if "::operator" in d[1]:
continue

location = definitionToSourceLocationMap[d];
# whacky template stuff
if location.startswith("sc/source/ui/vba/vbaformat.hxx"): continue
# not sure how this stuff is called
if location.startswith("include/test"): continue
# leave the debug/dump alone
if location.startswith("include/oox/dump"): continue

unusedSet.add(d) # used by the "unused return types" analysis
tmp1set.add((method, location))
Expand Down
13 changes: 0 additions & 13 deletions cui/source/dialogs/dlgname.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -202,19 +202,6 @@ IMPL_LINK_NOARG_TYPED(SvxMessDialog, Button2Hdl, Button*, void)

/*************************************************************************/

void SvxMessDialog::DisableButton( SvxMessDialogButton nBtnId )
{
switch( nBtnId )
{
case SvxMessDialogButton::N1:
pBtn1->Disable();
break;
case SvxMessDialogButton::N2:
pBtn2->Disable();
break;
}
}

void SvxMessDialog::SetButtonText( SvxMessDialogButton nBtnId, const OUString& rNewTxt )
{
switch ( nBtnId )
Expand Down
17 changes: 0 additions & 17 deletions cui/source/inc/cuitabarea.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -103,25 +103,14 @@ public:
void SetNewColorList( XColorListRef const & pColorList )
{ mpNewColorList = pColorList; }
const XColorListRef& GetNewColorList() const { return mpNewColorList; }
const XColorListRef& GetColorList() const { return mpColorList; }

void SetNewGradientList( XGradientListRef const & pGrdLst)
{ mpNewGradientList = pGrdLst; }
const XGradientListRef& GetNewGradientList() const
{ return mpNewGradientList; }

void SetNewHatchingList( XHatchListRef const & pHtchLst)
{ mpNewHatchingList = pHtchLst; }
const XHatchListRef& GetNewHatchingList() const
{ return mpNewHatchingList; }

void SetNewBitmapList( XBitmapListRef const & pBmpLst)
{ mpNewBitmapList = pBmpLst; }
const XBitmapListRef& GetNewBitmapList() const { return mpNewBitmapList; }

void SetNewPatternList( XPatternListRef const & pPtrnLst )
{ mpNewPatternList = pPtrnLst; }
const XPatternListRef& GetNewPatternList() const { return mpNewPatternList; }
};

/************************************************************************/
Expand Down Expand Up @@ -810,7 +799,6 @@ public:
void SetPropertyList( XPropertyListType t, const XPropertyListRef &xRef );

void SetColorList( const XColorListRef& pColList );
const XColorListRef& GetColorList() { return pColorList; }

void SetPageType( PageType* pInType ) { pPageType = pInType; }
void SetDlgType( sal_uInt16 nInType ) { nDlgType = nInType; }
Expand All @@ -821,10 +809,6 @@ public:

virtual void FillUserData() override;

bool IsModified()
{
return bool(*pnColorListState & ChangeType::MODIFIED);
}
void SetModified(bool bIsModified)
{
if (bIsModified)
Expand All @@ -836,7 +820,6 @@ public:
{
*pnColorListState |= nState;
}
void Update(bool bLoaded);
};

#endif // INCLUDED_CUI_SOURCE_INC_CUITABAREA_HXX
Expand Down
1 change: 0 additions & 1 deletion cui/source/inc/cuitabline.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ public:

void SetNewColorList( XColorListRef const & pColTab ) { mpNewColorList = pColTab; }
const XColorListRef& GetNewColorList() const { return mpNewColorList; }
const XColorListRef& GetColorList() const { return pColorList; }
};

/*************************************************************************/
Expand Down
1 change: 0 additions & 1 deletion cui/source/inc/dlgname.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ public:
SvxMessDialog( vcl::Window* pWindow, const OUString& rText, const OUString& rDesc, Image* pImg = nullptr );
virtual ~SvxMessDialog() override;
virtual void dispose() override;
void DisableButton( SvxMessDialogButton nBtnId);

void SetButtonText( SvxMessDialogButton nBtnId, const OUString& rNewTxt );
};
Expand Down
2 changes: 0 additions & 2 deletions include/basic/sbxvar.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,6 @@ public:
const SbxValues& GetValues_Impl() const { return aData; }
bool Put( const SbxValues& );

SbxValues * data() { return &aData; }

sal_Unicode GetChar() const;
sal_Int16 GetInteger() const;
sal_Int32 GetLong() const;
Expand Down
4 changes: 0 additions & 4 deletions include/desktop/crashreport.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@ public:

static void storeExceptionHandler(google_breakpad::ExceptionHandler* pExceptionHandler);

// when we create the ExceptionHandler we have no access to the user
// profile yet, so update when we have access
static void updateMinidumpLocation();

private:

static osl::Mutex maMutex;
Expand Down
2 changes: 0 additions & 2 deletions include/sfx2/dialoghelper.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ Size SFX2_DLLPUBLIC getParagraphPreviewOptimalSize(const vcl::Window *pReference

Size SFX2_DLLPUBLIC getDrawPreviewOptimalSize(const vcl::Window *pReference);

Size SFX2_DLLPUBLIC getDrawListBoxOptimalSize(const vcl::Window *pReference);

Size SFX2_DLLPUBLIC getPreviewStripSize(const vcl::Window *pReference);

Size SFX2_DLLPUBLIC getPreviewOptionsSize(const vcl::Window *pReference);
Expand Down
17 changes: 0 additions & 17 deletions include/sfx2/frame.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,6 @@ public:
static SfxFrame* GetFirst();
static SfxFrame* GetNext( SfxFrame& );

static const SfxPoolItem*
OpenDocumentSynchron( SfxItemSet& aSet, const css::uno::Reference< css::frame::XFrame >& i_rTargetFrame );

SfxObjectShell* GetCurrentDocument() const;
SfxViewFrame* GetCurrentViewFrame() const;
SfxFrame& GetTopFrame() const;
Expand Down Expand Up @@ -190,20 +187,6 @@ private:

typedef SvCompatWeakRef<SfxFrame> SfxFrameWeakRef;

class SfxFrameIterator
{
const SfxFrame* pFrame;
bool bRecursive;

SfxFrame* NextSibling_Impl( SfxFrame& rPrev );

public:
SfxFrameIterator( const SfxFrame& rFrame, bool bRecursive=true );
SfxFrame* FirstFrame();
SfxFrame* NextFrame( SfxFrame& rPrev );
};


class SFX2_DLLPUBLIC SfxFrameItem: public SfxPoolItem
{
SfxFrame* pFrame;
Expand Down
1 change: 0 additions & 1 deletion include/sfx2/objsh.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,6 @@ public:
static sal_uInt32 HandleFilter( SfxMedium* pMedium, SfxObjectShell* pDoc );

virtual bool PrepareClose(bool bUI = true);
bool IsInformationLost();
virtual HiddenInformation GetHiddenInformationState( HiddenInformation nStates );
sal_Int16 QueryHiddenInformation( HiddenWarningFact eFact, vcl::Window* pParent );
bool IsSecurityOptOpenReadOnly() const;
Expand Down
4 changes: 0 additions & 4 deletions include/sfx2/sidebar/ControllerItem.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,6 @@ public:
*/
void RequestUpdate();

/** Return the icon for the command.
*/
Image GetIcon() const;

/** Do not call. Used by local class only. Should be a member of
a local and hidden interface.
*/
Expand Down
3 changes: 0 additions & 3 deletions include/sfx2/templatedlg.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,6 @@ protected:

void createDefaultTemplateMenu ();

// Exchange view between local/online view.
void switchMainView (bool bDisplayLocal);

/**
*
* Move templates stored in the filesystem to another folder.
Expand Down
4 changes: 0 additions & 4 deletions include/sfx2/templatelocalview.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,6 @@ public:

bool moveTemplates (const std::set<const ThumbnailViewItem*,selection_cmp_fn> &rItems, const sal_uInt16 nTargetItem);

bool copyFrom (const sal_uInt16 nRegionItemId, const BitmapEx &rThumbnail, const OUString &rPath);

bool copyFrom(TemplateContainerItem *pItem, const OUString &rPath);

bool exportTo (const sal_uInt16 nItemId, const sal_uInt16 nRegionItemId, const OUString &rName);
Expand All @@ -147,8 +145,6 @@ public:

sal_uInt16 getCurRegionId () const { return mnCurRegionId;}

const OUString& getCurRegionName () const { return maCurRegionName;}

void setOpenRegionHdl(const Link<void*,void> &rLink);

void setCreateContextMenuHdl(const Link<ThumbnailViewItem*,void> &rLink);
Expand Down
4 changes: 0 additions & 4 deletions include/sfx2/viewsh.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -329,12 +329,8 @@ public:
void libreOfficeKitViewCallback(int nType, const char* pPayload) const override;
/// Set if we are doing tiled searching.
void setTiledSearching(bool bTiledSearching);
/// Are we doing tiled searching?
bool isTiledSearching() const;
/// Set if we are doing tiled painting.
void setTiledPainting(bool bTiledPainting);
/// Are we doing tiled painting?
bool isTiledPainting() const;
/// See lok::Document::getPart().
virtual int getPart() const;
virtual void dumpAsXml(struct _xmlTextWriter* pWriter) const;
Expand Down
1 change: 0 additions & 1 deletion include/svl/style.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ protected:
SfxStyleSheetBase( const SfxStyleSheetBase& );
virtual ~SfxStyleSheetBase() override;
virtual void Load( SvStream&, sal_uInt16 );
void Store( SvStream& );

public:

Expand Down
1 change: 0 additions & 1 deletion include/svtools/parrtf.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ protected:

void ReadUnknownData();
void ReadBitmapData();
void ReadOLEData();

virtual ~SvRTFParser() override;

Expand Down
3 changes: 0 additions & 3 deletions include/svtools/treelist.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,6 @@ public:
void InsertView( SvListView* );
void RemoveView( SvListView* );

SvListView* GetView( sal_uLong nPos ) const
{ return ( nPos < aViewList.size() ) ? aViewList[ nPos ] : nullptr; }

void Broadcast(
SvListAction nActionId,
SvTreeListEntry* pEntry1=nullptr,
Expand Down
3 changes: 0 additions & 3 deletions include/svx/SvxPresetListBox.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ class SVX_DLLPUBLIC SvxPresetListBox : public ValueSet
{
private:
sal_uInt32 nColCount;
sal_uInt32 nRowCount;
Size aIconSize;
Link<SvxPresetListBox*,void> maRenameHdl;
Link<SvxPresetListBox*,void> maDeleteHdl;
Expand All @@ -49,8 +48,6 @@ public:
sal_uInt32 getColumnCount() const { return nColCount; }
Size const & GetIconSize() const { return aIconSize; }

void setColumnCount( const sal_uInt32 nCount ) { nColCount = nCount; }
void setRowCount( const sal_uInt32 nRow ) { nRowCount = nRow; }
void SetRenameHdl( const Link<SvxPresetListBox*,void>& rLink )
{
maRenameHdl = rLink;
Expand Down
8 changes: 0 additions & 8 deletions include/svx/dlgctrl.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,6 @@ public:
explicit HatchingLB(vcl::Window* pParent, WinBits aWB);

void Fill( const XHatchListRef &pList );

void Append( const XHatchEntry& rEntry, const Bitmap& rBitmap );
void Modify( const XHatchEntry& rEntry, sal_Int32 nPos, const Bitmap& rBitmap );
};

/************************************************************************/
Expand All @@ -244,8 +241,6 @@ public:

void Fill( const XGradientListRef &pList );

void Append( const XGradientEntry& rEntry, const Bitmap& rBitmap );
void Modify( const XGradientEntry& rEntry, sal_Int32 nPos, const Bitmap& rBitmap );
void SelectEntryByList( const XGradientListRef &pList, const OUString& rStr,
const XGradient& rXGradient );
};
Expand All @@ -259,9 +254,6 @@ public:

void Fill(const XBitmapListRef &pList);

void Append(const Size& rSize, const XBitmapEntry& rEntry);
void Modify(const Size& rSize, const XBitmapEntry& rEntry, sal_Int32 nPos);

private:
BitmapEx maBitmapEx;

Expand Down
23 changes: 1 addition & 22 deletions include/svx/fmsrcimp.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,6 @@
#include <deque>
#include <vector>

/**
* class FmSearchThread
*/
class FmSearchEngine;
class SAL_WARN_UNUSED FmSearchThread : public ::osl::Thread
{
FmSearchEngine* m_pEngine;
Link<FmSearchThread*,void> m_aTerminationHdl;

virtual void SAL_CALL run() override;
virtual void SAL_CALL onTerminated() override;

public:
FmSearchThread(FmSearchEngine* pEngine) : m_pEngine(pEngine) { }
void setTerminationHandler(Link<FmSearchThread*,void> aHdl) { m_aTerminationHdl = aHdl; }
};

/**
* struct FmSearchProgress - the owner of SearchEngine receives this structure for status updates
* (at the end of the search)
Expand Down Expand Up @@ -360,14 +343,10 @@ private:
SVX_DLLPRIVATE bool MoveField(sal_Int32& nPos, FieldCollection::iterator& iter, const FieldCollection::iterator& iterBegin, const FieldCollection::iterator& iterEnd);
// moves the iterator with respect to the direction/overflow iterator/overflow cursor
SVX_DLLPRIVATE void BuildAndInsertFieldInfo(const css::uno::Reference< css::container::XIndexAccess >& xAllFields, sal_Int32 nField);
// builds a FieldInfo in relation to field number nField (in xAllFields) and adds it to m_arrUsedFields
// xAllFields needs to support the DatabaseRecord service
SVX_DLLPRIVATE OUString FormatField(const FieldInfo& rField);
// formats the field with the NumberFormatter

SVX_DLLPRIVATE bool HasPreviousLoc() { return m_aPreviousLocBookmark.hasValue(); }

DECL_LINK_TYPED(OnSearchTerminated, FmSearchThread*, void);
void OnSearchTerminated();
// is used by SearchThread, after the return from this handler the thread removes itself
DECL_LINK_TYPED(OnNewRecordCount, sal_Int32, void);
};
Expand Down
1 change: 0 additions & 1 deletion include/svx/pagenumberlistbox.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ public:
PageNumberListBox( vcl::Window* pParent );

void SetSelection( sal_uInt16 );
sal_uInt16 GetSelection() const;

Size GetOptimalSize() const override;
};
Expand Down
1 change: 0 additions & 1 deletion include/svx/svdmodel.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ public:
const SdrPage* GetPage() const { return mpPage;}
const SdrObject* GetObject() const { return mpObj;}
SdrHintKind GetKind() const { return meHint;}
const Rectangle& GetRectangle() const { return maRectangle;}
};


Expand Down
2 changes: 0 additions & 2 deletions include/svx/xtable.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,8 @@ public:
void SetDirty(bool bDirty) { mbListDirty = bDirty; }

bool IsEmbedInDocument() const { return mbEmbedInDocument; }
void SetEmbedInDocument(bool b) { mbEmbedInDocument = b; }

static OUString GetDefaultExt(XPropertyListType t);
static OUString GetDefaultExtFilter(XPropertyListType t);
OUString GetDefaultExt() const { return GetDefaultExt(meType); }

virtual css::uno::Reference< css::container::XNameContainer >
Expand Down
Loading

0 comments on commit 7419057

Please sign in to comment.