include/sfx2/tabdlg.hxx | 2 -- include/svx/hlnkitem.hxx | 10 ---------- sfx2/source/dialog/mgetempl.cxx | 36 ------------------------------------ sfx2/source/dialog/mgetempl.hxx | 5 ----- sfx2/source/dialog/tabdlg.cxx | 28 ---------------------------- svx/source/items/hlnkitem.cxx | 18 ------------------ sw/source/filter/md/mdnum.cxx | 18 ------------------ sw/source/filter/md/mdnum.hxx | 1 - sw/source/filter/md/wrtmd.hxx | 3 --- 9 files changed, 121 deletions(-)
New commits: commit 2f39a9a981adf3f0efe84a0ea437db440d3678b1 Author: Noel Grandin <[email protected]> AuthorDate: Mon Mar 2 13:11:39 2026 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Mon Mar 2 21:22:54 2026 +0100 loplugin:unusedmethods Change-Id: Ia2c693f799b5a136787759a10373b5650934f63c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200810 Reviewed-by: Noel Grandin <[email protected]> Tested-by: Jenkins diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx index 7afe6e914451..b032a3512274 100644 --- a/include/sfx2/tabdlg.hxx +++ b/include/sfx2/tabdlg.hxx @@ -166,8 +166,6 @@ public: void ShowPage(const OUString& rName); // SetCurPageId + call Activate on it OUString GetCurPageId() const; SfxTabPage* GetCurTabPage() const { return GetTabPage(GetCurPageId()); } - void ResetTabPage(std::u16string_view rPageId); - void ResetAllTabPages(); void InvalidateItem(sal_uInt16 nWhich); OUString GetTabPageNameForWhich(sal_uInt16 nWhich) const; void BuildWhichToTabMap(); diff --git a/include/svx/hlnkitem.hxx b/include/svx/hlnkitem.hxx index 6859d1a04902..8dac1de40f92 100644 --- a/include/svx/hlnkitem.hxx +++ b/include/svx/hlnkitem.hxx @@ -69,13 +69,6 @@ public: SfxPoolItem(_nWhich ) { eType = HLINK_DEFAULT; nMacroEvents=HyperDialogEvent::NONE; }; SvxHyperlinkItem( const SvxHyperlinkItem& rHyperlinkItem ); - SvxHyperlinkItem( TypedWhichId<SvxHyperlinkItem> nWhich, OUString aName, OUString aURL, - OUString aTarget, OUString aIntName, - SvxLinkInsertMode eTyp, - HyperDialogEvent nEvents, - SvxMacroTableDtor const *pMacroTbl, - bool showName = true, bool showText = true, - OUString aReplacementText = OUString()); virtual bool operator==( const SfxPoolItem& ) const override; virtual SvxHyperlinkItem* Clone( SfxItemPool *pPool = nullptr ) const override; @@ -94,10 +87,8 @@ public: const OUString& GetTargetFrame() const { return sTarget; } void SetTargetFrame(const OUString& rTarget) { sTarget = rTarget; } - bool GetShowName() const { return m_showName; } void SetShowName(const bool show) { m_showName = show; } - bool GetShowText() const { return m_showText; } void SetShowText(const bool show) { m_showText = show; } SvxLinkInsertMode GetInsertMode() const { return eType; } @@ -112,7 +103,6 @@ public: HyperDialogEvent GetMacroEvents() const { return nMacroEvents; } const OUString& GetReplacementText() const { return sReplacementText; } - void SetReplacementText(const OUString& rReplacementText) { sReplacementText = rReplacementText; } }; diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx index 264981fac84e..8e089ec767fd 100644 --- a/sfx2/source/dialog/mgetempl.cxx +++ b/sfx2/source/dialog/mgetempl.cxx @@ -144,42 +144,6 @@ void PropertyCategoryRow::AddChip(SfxManageStyleSheetPage* pPage, sal_uInt16 nWh m_aChipRows.back()->nTotalChars += nChipChars; } -void PropertyCategoryRow::RemoveChip(sal_uInt16 nWhich) -{ - struct ChipData - { - sal_uInt16 nWhich; - OUString sText; - }; - std::vector<ChipData> aData; - - SfxManageStyleSheetPage* pPage = nullptr; - for (const auto& pChip : m_aChips) - { - if (pChip->GetWhich() == nWhich) - continue; - if (!pPage) - pPage = pChip->GetPage(); - aData.push_back({pChip->GetWhich(), pChip->GetText()}); - } - - // Hide rows before destroying - for (auto& pRow : m_aChipRows) - { - if (pRow->xBox) - pRow->xBox->set_visible(false); - } - - m_aChips.clear(); - m_aChipRows.clear(); - - if (pPage) - { - for (const auto& d : aData) - AddChip(pPage, d.nWhich, d.sText); - } -} - /* SfxManageStyleSheetPage Constructor * * initializes the list box with the templates diff --git a/sfx2/source/dialog/mgetempl.hxx b/sfx2/source/dialog/mgetempl.hxx index f5eaa8fa5253..0add350073ea 100644 --- a/sfx2/source/dialog/mgetempl.hxx +++ b/sfx2/source/dialog/mgetempl.hxx @@ -94,12 +94,7 @@ public: PropertyCategoryRow(weld::Box* pParentBox, std::u16string_view rLabel); ~PropertyCategoryRow(); void AddChip(SfxManageStyleSheetPage* pPage, sal_uInt16 nWhich, const OUString& rText); - void RemoveChip(sal_uInt16 nWhich); - bool IsEmpty() const { return m_aChips.empty(); } void Show() { if (m_xContainer) m_xContainer->set_visible(true); } - void Hide() { if (m_xContainer) m_xContainer->set_visible(false); } - OUString GetLabel() const { return m_xLabel->get_label(); } - int GetChipRowCount() const { return static_cast<int>(m_aChipRows.size()); } }; class SfxManageStyleSheetPage final : public SfxTabPage diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index c17018d48987..a1309761d351 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -1114,34 +1114,6 @@ OUString SfxTabDialogController::GetCurPageId() const return m_xTabCtrl->get_current_page_ident(); } -void SfxTabDialogController::ResetTabPage(std::u16string_view rPageId) -{ - SfxTabPage* pPage = GetTabPage(rPageId); - if (pPage) - { - const SfxItemSet* pSet = m_xExampleSet ? m_xExampleSet.get() : m_pSet.get(); - if (pSet) - { - pPage->Reset(pSet); - } - } -} - -void SfxTabDialogController::ResetAllTabPages() -{ - const SfxItemSet* pSet = m_xExampleSet ? m_xExampleSet.get() : m_pSet.get(); - if (!pSet) - return; - - for (auto const& elem : m_pImpl->aData) - { - if (elem->xTabPage) - { - elem->xTabPage->Reset(pSet); - } - } -} - void SfxTabDialogController::InvalidateItem(sal_uInt16 nWhich) { m_aInvalidatedWhichIds.insert(nWhich); diff --git a/svx/source/items/hlnkitem.cxx b/svx/source/items/hlnkitem.cxx index 267a83743632..cf85f41009bd 100644 --- a/svx/source/items/hlnkitem.cxx +++ b/svx/source/items/hlnkitem.cxx @@ -42,24 +42,6 @@ SvxHyperlinkItem::SvxHyperlinkItem( const SvxHyperlinkItem& rHyperlinkItem ) }; -SvxHyperlinkItem::SvxHyperlinkItem( TypedWhichId<SvxHyperlinkItem> _nWhich, OUString aName, OUString aURL, - OUString aTarget, OUString aIntName, SvxLinkInsertMode eTyp, - HyperDialogEvent nEvents, SvxMacroTableDtor const *pMacroTbl, bool showName, bool showText, OUString aReplacementText): - SfxPoolItem (_nWhich ), - sName (std::move(aName)), - sURL (std::move(aURL)), - sTarget (std::move(aTarget)), - eType (eTyp), - sReplacementText (std::move(aReplacementText)), - m_showName (showName), - m_showText (showText), - sIntName (std::move(aIntName)), - nMacroEvents (nEvents) -{ - if (pMacroTbl) - pMacroTable.reset( new SvxMacroTableDtor ( *pMacroTbl ) ); -} - SvxHyperlinkItem* SvxHyperlinkItem::Clone( SfxItemPool* ) const { return new SvxHyperlinkItem( *this ); diff --git a/sw/source/filter/md/mdnum.cxx b/sw/source/filter/md/mdnum.cxx index 14fa0412da5f..050192d236b0 100644 --- a/sw/source/filter/md/mdnum.cxx +++ b/sw/source/filter/md/mdnum.cxx @@ -22,22 +22,4 @@ #include "mdnum.hxx" -void SwMdNumRuleInfo::Set(const SwTextNode& rTextNd) -{ - const SwNumRule* pTextNdNumRule(rTextNd.GetNumRule()); - if (pTextNdNumRule && pTextNdNumRule != rTextNd.GetDoc().GetOutlineNumRule()) - { - m_pNumRule = const_cast<SwNumRule*>(pTextNdNumRule); - m_nDeep = o3tl::narrowing<sal_uInt16>(m_pNumRule ? rTextNd.GetActualListLevel() + 1 : 0); - m_bNumbered = rTextNd.IsCountedInList(); - m_bRestart = rTextNd.IsListRestart() && !rTextNd.HasAttrListRestartValue(); - } - else - { - m_pNumRule = nullptr; - m_nDeep = 0; - m_bNumbered = m_bRestart = false; - } -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/sw/source/filter/md/mdnum.hxx b/sw/source/filter/md/mdnum.hxx index 1dc4f9989f86..27f08172f30a 100644 --- a/sw/source/filter/md/mdnum.hxx +++ b/sw/source/filter/md/mdnum.hxx @@ -56,7 +56,6 @@ public: } inline void Set(const SwMdNumRuleInfo& rInf); - void Set(const SwTextNode& rTextNd); inline SwMdNumRuleInfo& operator=(const SwMdNumRuleInfo& rInf); diff --git a/sw/source/filter/md/wrtmd.hxx b/sw/source/filter/md/wrtmd.hxx index fbc984e191f8..51254f63c488 100644 --- a/sw/source/filter/md/wrtmd.hxx +++ b/sw/source/filter/md/wrtmd.hxx @@ -66,8 +66,6 @@ class SwMDWriter : public Writer public: SW_DLLPUBLIC explicit SwMDWriter(const OUString& rBaseURL); - bool isInTable() const { return m_bOutTable; } - SwNodeOffset StartNodeIndex() const { return m_nStartNodeIndex; } void SetListLevelPrefixSize(int nListLevel, int nPrefixSize); const std::map<int, int>& GetListLevelPrefixSizes() const { return m_aListLevelPrefixSizes; } std::stack<SwMDTableInfo>& GetTableInfos() { return m_aTableInfos; } @@ -83,7 +81,6 @@ private: void Out_SwDoc(SwPaM* pPam); void CollectFlys(); - bool m_bOutTable = false; SwNodeOffset m_nStartNodeIndex{ 0 }; /// List level -> prefix size map, e.g. "1. " size is 3. std::map<int, int> m_aListLevelPrefixSizes;
