loplugin:unusedfields make some fields private

this is one of the secondary analyses this plugin performs

Change-Id: I022b9eda994acbd25714025b666194266e896640
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143215
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2022-11-24 13:51:10 +01:00
parent da5377c88a
commit 3de6d4d3c7
14 changed files with 81 additions and 99 deletions
+3 -4
View File
@@ -88,6 +88,9 @@ private:
bool bSynchron : 1;
bool bWasLastEditOK : 1;
bool m_bIsConnect : 1;
bool m_bIsReadOnly;
css::uno::Reference<css::io::XInputStream>
m_xInputStreamToLoadFrom;
DECL_DLLPRIVATE_LINK( EndEditHdl, const OUString&, void );
@@ -99,10 +102,6 @@ protected:
// Set LinkSourceName without action
void SetName( const OUString & rLn );
bool m_bIsReadOnly;
css::uno::Reference<css::io::XInputStream>
m_xInputStreamToLoadFrom;
SvBaseLink();
SvBaseLink( SfxLinkUpdateMode nLinkType, SotClipboardFormatId nContentType );
virtual ~SvBaseLink() override;
+2
View File
@@ -798,8 +798,10 @@ public:
struct ModifyBlocker_Impl
{
private:
SfxObjectShell* pPersist;
bool bWasEnabled;
public:
ModifyBlocker_Impl( SfxObjectShell* pPersistP ) : pPersist( pPersistP )
{
bWasEnabled = pPersistP->IsEnableSetModified();
+2 -1
View File
@@ -72,9 +72,10 @@ struct AutoFormatSwBlob
/// Struct with version numbers of the Items
struct ScAfVersions : public AutoFormatVersions
{
public:
private:
AutoFormatSwBlob swVersions;
public:
ScAfVersions();
void Load( SvStream& rStream, sal_uInt16 nVer );
-2
View File
@@ -104,8 +104,6 @@ class ScChangeActionLinkEntry
ScChangeActionLinkEntry( const ScChangeActionLinkEntry& ) = delete;
ScChangeActionLinkEntry& operator=( const ScChangeActionLinkEntry& ) = delete;
protected:
ScChangeActionLinkEntry* pNext;
ScChangeActionLinkEntry** ppPrev;
ScChangeAction* pAction;
+1 -1
View File
@@ -319,7 +319,7 @@ public:
/** Returns the cached Calc error code, if this value has Error type, else 0. */
FormulaError GetScError() const;
protected:
private:
typedef ::std::unique_ptr< const ScTokenArray > ScTokenArrayPtr;
OUString maStr; /// Cached value is a string.
+14 -15
View File
@@ -39,7 +39,20 @@ public:
const SfxItemSet& rArgSet );
bool DoFillItemSet ( sal_uInt16 nGroupNo,
SfxItemSet& rArgSet );
protected:
private:
void Init ();
void FillListBoxes ();
static ScSubTotalFunc LbPosToFunc ( sal_uInt16 nPos );
static sal_uInt16 FuncToLbPos ( ScSubTotalFunc eFunc );
sal_uInt16 GetFieldSelPos ( SCCOL nField );
// Handler ------------------------
DECL_LINK( SelectListBoxHdl, weld::ComboBox&, void );
DECL_LINK( SelectTreeListBoxHdl, weld::TreeView&, void );
DECL_LINK(CheckHdl, const weld::TreeView::iter_col&, void);
DECL_LINK(CheckBoxHdl, weld::Toggleable&, void);
void SelectHdl(const weld::Widget*);
const OUString aStrNone;
const OUString aStrColumn;
@@ -55,20 +68,6 @@ protected:
std::unique_ptr<weld::TreeView> mxLbColumns;
std::unique_ptr<weld::TreeView> mxLbFunctions;
std::unique_ptr<weld::CheckButton> mxLbSelectAllColumns;
private:
void Init ();
void FillListBoxes ();
static ScSubTotalFunc LbPosToFunc ( sal_uInt16 nPos );
static sal_uInt16 FuncToLbPos ( ScSubTotalFunc eFunc );
sal_uInt16 GetFieldSelPos ( SCCOL nField );
// Handler ------------------------
DECL_LINK( SelectListBoxHdl, weld::ComboBox&, void );
DECL_LINK( SelectTreeListBoxHdl, weld::TreeView&, void );
DECL_LINK(CheckHdl, const weld::TreeView::iter_col&, void);
DECL_LINK(CheckBoxHdl, weld::Toggleable&, void);
void SelectHdl(const weld::Widget*);
};
class ScTpSubTotalGroup1 final : public ScTpSubTotalGroup
-2
View File
@@ -45,8 +45,6 @@ struct GroupEntry
class GroupTable
{
protected:
sal_uInt32 mnIndex;
sal_uInt32 mnGroupsClosed;
std::vector<GroupEntry> mvGroupEntry;
+3 -5
View File
@@ -203,7 +203,9 @@ public:
std::vector<Color> GetThemeColors() override;
protected:
private:
static void setEditMode(DrawViewShell* pDrawViewShell, bool isMasterPage);
void Construct(bool bClipboard);
SdDrawDocument* mpDoc;
std::unique_ptr<SfxUndoManager> mpUndoManager;
@@ -218,11 +220,7 @@ protected:
bool mbSdDataObj;
bool mbInDestruction;
bool mbOwnPrinter;
bool mbOwnDocument; // if true, we own mpDoc and will delete it in our d'tor
void Construct(bool bClipboard);
private:
static void setEditMode(DrawViewShell* pDrawViewShell, bool isMasterPage);
};
#ifndef SV_DECL_DRAW_DOC_SHELL_DEFINED
+51 -61
View File
@@ -376,24 +376,6 @@ public:
//move this method to ViewShell.
//void NotifyAccUpdate();
protected:
std::unique_ptr<DrawView> mpDrawView;
SdPage* mpActualPage;
::tools::Rectangle maMarkRect;
Point maMousePos;
VclPtr<TabControl> maTabControl;
EditMode meEditMode;
PageKind mePageKind;
// tdf#137445 at context menu popup time set if the EditHyperlink entry
// should be disabled and use that state if queried about it if
// EditHyperlink is dispatched from the menu. So ignoring where the mouse
// currently happens to be when the menu was dismissed.
std::optional<bool> moAtContextMenu_DisableEditHyperlink;
bool mbZoomOnPage;
bool mbIsRulerDrag;
sal_uLong mnLockCount;
bool mbReadOnly;
static bool mbPipette;
DECL_DLLPRIVATE_LINK( ClipboardChanged, TransferableDataHelper*, void );
DECL_DLLPRIVATE_LINK( TabSplitHdl, TabBar *, void );
DECL_DLLPRIVATE_LINK( NameObjectHdl, AbstractSvxObjectNameDialog&, bool );
@@ -414,37 +396,6 @@ protected:
void GetMenuStateSel(SfxItemSet& rSet);
private:
/** Prevents grabbing focus while loading - see tdf#83773 that introduced
the grabbing, and tdf#150773 that needs grabbing disabled on loading
*/
bool mbFirstTimeActivation = true;
/** This flag controls whether the layer mode is active, i.e. the layer
dialog is visible.
*/
bool mbIsLayerModeActive;
/** This item contains the clipboard formats of the current clipboard
content that are supported both by that content and by the
DrawViewShell.
*/
::std::unique_ptr<SvxClipboardFormatItem> mpCurrentClipboardFormats;
/** On some occasions it is necessary to make SwitchPage calls
asynchronously.
*/
tools::AsynchronousCall maAsynchronousSwitchPageCall;
/** This flag is used to prevent nested calls to SwitchPage().
*/
bool mbIsInSwitchPage;
RotateTransliteration m_aRotateCase;
/** Listen for selection changes and broadcast context changes for the sidebar.
*/
::rtl::Reference<svx::sidebar::SelectionChangeHandler> mpSelectionChangeHandler;
void Construct (DrawDocShell* pDocSh, PageKind ePageKind);
/** Depending on the given request create a new page or duplicate an
@@ -459,13 +410,6 @@ private:
void DuplicateSelectedSlides (SfxRequest& rRequest);
css::uno::Reference< css::scanner::XScannerManager2 > mxScannerManager;
css::uno::Reference< css::lang::XEventListener > mxScannerListener;
rtl::Reference<TransferableClipboardListener> mxClipEvtLstnr;
bool mbPastePossible;
bool mbMouseButtonDown;
bool mbMouseSelecting;
virtual void Notify (SfxBroadcaster& rBC, const SfxHint& rHint) override;
/** Stop a running slide show.
@@ -491,11 +435,6 @@ private:
using ViewShell::Notify;
::std::unique_ptr< AnnotationManager > mpAnnotationManager;
::std::unique_ptr< ViewOverlayManager > mpViewOverlayManager;
std::vector<std::unique_ptr<SdrExternalToolEdit>> m_ExternalEdits;
virtual void ConfigurationChanged( utl::ConfigurationBroadcaster* pCb, ConfigurationHints ) override;
void ConfigureAppBackgroundColor( svtools::ColorConfig* pColorConfig = nullptr );
@@ -506,6 +445,57 @@ private:
/// later Invalidated to reset it back to its natural value
void EnableEditHyperlink();
private:
std::unique_ptr<DrawView> mpDrawView;
SdPage* mpActualPage;
::tools::Rectangle maMarkRect;
Point maMousePos;
VclPtr<TabControl> maTabControl;
EditMode meEditMode;
PageKind mePageKind;
// tdf#137445 at context menu popup time set if the EditHyperlink entry
// should be disabled and use that state if queried about it if
// EditHyperlink is dispatched from the menu. So ignoring where the mouse
// currently happens to be when the menu was dismissed.
std::optional<bool> moAtContextMenu_DisableEditHyperlink;
bool mbZoomOnPage;
bool mbIsRulerDrag;
sal_uLong mnLockCount;
bool mbReadOnly;
static bool mbPipette;
/** Prevents grabbing focus while loading - see tdf#83773 that introduced
the grabbing, and tdf#150773 that needs grabbing disabled on loading
*/
bool mbFirstTimeActivation = true;
/** This flag controls whether the layer mode is active, i.e. the layer
dialog is visible.
*/
bool mbIsLayerModeActive;
/** This item contains the clipboard formats of the current clipboard
content that are supported both by that content and by the
DrawViewShell.
*/
::std::unique_ptr<SvxClipboardFormatItem> mpCurrentClipboardFormats;
/** On some occasions it is necessary to make SwitchPage calls
asynchronously.
*/
tools::AsynchronousCall maAsynchronousSwitchPageCall;
/** This flag is used to prevent nested calls to SwitchPage().
*/
bool mbIsInSwitchPage;
RotateTransliteration m_aRotateCase;
/** Listen for selection changes and broadcast context changes for the sidebar.
*/
::rtl::Reference<svx::sidebar::SelectionChangeHandler> mpSelectionChangeHandler;
css::uno::Reference< css::scanner::XScannerManager2 > mxScannerManager;
css::uno::Reference< css::lang::XEventListener > mxScannerListener;
rtl::Reference<TransferableClipboardListener> mxClipEvtLstnr;
bool mbPastePossible;
bool mbMouseButtonDown;
bool mbMouseSelecting;
::std::unique_ptr< AnnotationManager > mpAnnotationManager;
::std::unique_ptr< ViewOverlayManager > mpViewOverlayManager;
std::vector<std::unique_ptr<SdrExternalToolEdit>> m_ExternalEdits;
// The colour of the area behind the slide (used to be called "Wiese")
Color mnAppBackgroundColor;
};
+2 -2
View File
@@ -32,6 +32,8 @@ class View;
*/
class ViewClipboard
{
::sd::View& mrView;
public:
ViewClipboard(::sd::View& rView);
virtual ~ViewClipboard();
@@ -42,8 +44,6 @@ public:
void HandlePageDrop(const SdTransferable& rTransferable);
protected:
::sd::View& mrView;
/** Return the first master page of the given transferable. When the
bookmark list of the transferable contains at least one non-master
page then NULL is returned.
+1 -2
View File
@@ -56,14 +56,13 @@ private:
SdrModel* mpSdrModel;
bool mbIsImpressDocument;
sal_Int16 mnTempPageNumber; // for printing handouts
const SvxItemPropertySet* mpPropSet;
void UpdateModel();
protected:
friend class SdXImpressDocument;
const SvxItemPropertySet* mpPropSet;
/// @throws css::lang::IllegalArgumentException
virtual void setBackground( const css::uno::Any& rValue );
/// @throws std::exception
+1 -1
View File
@@ -39,9 +39,9 @@ class SdUnoSearchReplaceDescriptor;
/** this class implements a search or replace operation on a given page or a given sdrobj */
class SdUnoSearchReplaceShape : public css::util::XReplaceable
{
protected:
css::drawing::XDrawPage* mpPage;
protected:
css::uno::Reference< css::text::XTextRange > Search( const css::uno::Reference< css::text::XTextRange >& xText, SdUnoSearchReplaceDescriptor* pDescr );
bool Search( const OUString& rText, sal_Int32& nStartPos, sal_Int32& nEndPos, SdUnoSearchReplaceDescriptor* pDescr ) noexcept;
static ESelection GetSelection( const css::uno::Reference< css::text::XTextRange >& xTextRange ) noexcept;
-2
View File
@@ -755,8 +755,6 @@ public:
*/
class SmTextNode : public SmVisibleNode
{
protected:
OUString maText;
sal_uInt16 mnFontDesc;
/** Index within text where the selection starts
+1 -1
View File
@@ -68,7 +68,7 @@ class FrameStatusListener : public css::frame::XStatusListener,
// XFrameActionListener
virtual void SAL_CALL frameAction( const css::frame::FrameActionEvent& Action ) override;
protected:
private:
struct Listener
{
Listener( css::util::URL _aURL, css::uno::Reference< css::frame::XDispatch > _xDispatch ) :