chart2/qa/extras/charttest.hxx | 13 ------------- include/svx/TableStylesParser.hxx | 1 - include/svx/dialog/TableAutoFmtDlg.hxx | 3 --- include/svx/dialog/TableAutoFmtPreview.hxx | 2 -- include/svx/dialog/TableStylesDlg.hxx | 1 - include/svx/strings.hrc | 2 -- include/vcl/fontcharmap.hxx | 4 +--- include/vcl/toolkit/svtabbx.hxx | 1 - svx/source/dialog/TableAutoFmtDlg.cxx | 2 -- sw/source/filter/md/mdnum.cxx | 9 --------- sw/source/filter/md/mdnum.hxx | 6 ------ sw/source/filter/md/mdtab.cxx | 15 +++------------ sw/source/filter/md/swmd.hxx | 1 - sw/source/uibase/fldui/fldmgr.cxx | 1 - sw/source/uibase/inc/fldmgr.hxx | 1 - vcl/inc/fontsubset.hxx | 1 - vcl/inc/impfontcharmap.hxx | 4 +--- vcl/source/font/PhysicalFontFace.cxx | 5 +---- vcl/source/font/fontcharmap.cxx | 11 ++++------- 19 files changed, 10 insertions(+), 73 deletions(-)
New commits: commit 687029ee23494071b9f06bace777c09077c3b5ab Author: Noel Grandin <[email protected]> AuthorDate: Tue Feb 24 12:59:04 2026 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Tue Feb 24 18:01:04 2026 +0100 loplugin:unusedmethods Change-Id: I4e19bd4ac164c185be5d612ad2e6cf18dfab1ad5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200166 Reviewed-by: Noel Grandin <[email protected]> Tested-by: Jenkins diff --git a/chart2/qa/extras/charttest.hxx b/chart2/qa/extras/charttest.hxx index 556fe641e14b..f458eb3da658 100644 --- a/chart2/qa/extras/charttest.hxx +++ b/chart2/qa/extras/charttest.hxx @@ -109,8 +109,6 @@ public: getShapeByName(const uno::Reference<drawing::XShapes>& rShapes, const OUString& rName, const std::function<bool(const uno::Reference<drawing::XShape>&)>& pCondition = nullptr); - Reference<chart2::XChartStyle> - getStyleFromDoc(Reference<chart2::XChartDocument> const& xChartDoc); }; Reference< lang::XComponent > ChartTest::getChartCompFromSheet( sal_Int32 nSheet, sal_Int32 nChart ) @@ -509,15 +507,4 @@ ChartTest::getShapeByName(const uno::Reference<drawing::XShapes>& rShapes, const return uno::Reference<drawing::XShape>(); } -Reference<chart2::XChartStyle> - getStyleFromDoc(Reference<chart2::XChartDocument> const& xChartDoc) -{ - CPPUNIT_ASSERT( xChartDoc.is() ); - - Reference <chart2::XChartStyle > xStyle = xChartDoc->getStyles(); - CPPUNIT_ASSERT( xStyle.is() ); - - return xStyle; -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/svx/dialog/TableAutoFmtDlg.hxx b/include/svx/dialog/TableAutoFmtDlg.hxx index dd03041b9b30..0fe058aa5e27 100644 --- a/include/svx/dialog/TableAutoFmtDlg.hxx +++ b/include/svx/dialog/TableAutoFmtDlg.hxx @@ -64,7 +64,6 @@ private: DECL_LINK(RemoveHdl, weld::Button&, void); DECL_LINK(RenameHdl, weld::Button&, void); DECL_LINK(SelFormatHdl, weld::TreeView&, void); - DECL_LINK(DblClkHdl, weld::TreeView&, bool); OUString GenerateUniqueStyleName(); diff --git a/include/svx/dialog/TableAutoFmtPreview.hxx b/include/svx/dialog/TableAutoFmtPreview.hxx index 9b6cc5fb0d92..3d84ea85950b 100644 --- a/include/svx/dialog/TableAutoFmtPreview.hxx +++ b/include/svx/dialog/TableAutoFmtPreview.hxx @@ -63,8 +63,6 @@ private: void PaintCells(vcl::RenderContext& rRenderContext); sal_uInt8 GetFormatIndex(size_t nCol, size_t nRow); - const SvxBoxItem& GetBoxItem(size_t nCol, size_t nRow) const; - const SvxLineItem& GetDiagItem(size_t nCol, size_t nRow, bool bTLBR) const; void DrawString(vcl::RenderContext& rRenderContext, size_t nCol, size_t nRow); void DrawBackground(vcl::RenderContext& rRenderContext); diff --git a/include/svx/dialog/TableStylesDlg.hxx b/include/svx/dialog/TableStylesDlg.hxx index c5faebd7376d..84318842c031 100644 --- a/include/svx/dialog/TableStylesDlg.hxx +++ b/include/svx/dialog/TableStylesDlg.hxx @@ -111,7 +111,6 @@ public: SvxTableStylesDlg(weld::Window* pWindow, bool bNewStyle, SvxAutoFormat& pFormat, SvxAutoFormatData& pData, bool bRTL); virtual ~SvxTableStylesDlg() override; - SvxAutoFormatData& GetFormat() { return mpData; }; }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/vcl/fontcharmap.hxx b/include/vcl/fontcharmap.hxx index c9482a8f2e36..2cd57cd38d3b 100644 --- a/include/vcl/fontcharmap.hxx +++ b/include/vcl/fontcharmap.hxx @@ -42,7 +42,7 @@ public: /** A new FontCharMap is created based on passed arguments. */ - SAL_DLLPRIVATE FontCharMap(bool bMicrosoftSymbolMap, std::vector<sal_UCS4> aRangeCodes); + SAL_DLLPRIVATE FontCharMap(std::vector<sal_UCS4> aRangeCodes); SAL_DLLPRIVATE virtual ~FontCharMap() override; @@ -136,8 +136,6 @@ public: */ sal_UCS4 GetCharFromIndex( int nCharIndex ) const; - SAL_DLLPRIVATE bool isMicrosoftSymbolMap() const; - private: ImplFontCharMapRef mpImplFontCharMap; diff --git a/include/vcl/toolkit/svtabbx.hxx b/include/vcl/toolkit/svtabbx.hxx index 819d8ab75c89..45e6bec4c000 100644 --- a/include/vcl/toolkit/svtabbx.hxx +++ b/include/vcl/toolkit/svtabbx.hxx @@ -86,7 +86,6 @@ public: void SetTabEditable( sal_uInt16 nTab, bool bEditable ); void SetRole(SvTabListBoxRole e) { m_eRole = e; } - SvTabListBoxRole GetRole() const { return m_eRole; } virtual void DumpAsPropertyTree(tools::JsonWriter& rJsonWriter) override; }; diff --git a/sw/source/filter/md/mdnum.cxx b/sw/source/filter/md/mdnum.cxx index 751ddbfccda8..14fa0412da5f 100644 --- a/sw/source/filter/md/mdnum.cxx +++ b/sw/source/filter/md/mdnum.cxx @@ -40,13 +40,4 @@ void SwMdNumRuleInfo::Set(const SwTextNode& rTextNd) } } -bool SwMdNumRuleInfo::IsRestart(const SwMdNumRuleInfo& rPrev) const -{ - assert(rPrev.GetNumRule() == GetNumRule()); - - if (rPrev.GetDepth() < GetDepth()) - return false; - return m_bRestart; -} - /* 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 dda2b6c4b6bb..1dc4f9989f86 100644 --- a/sw/source/filter/md/mdnum.hxx +++ b/sw/source/filter/md/mdnum.hxx @@ -58,7 +58,6 @@ public: inline void Set(const SwMdNumRuleInfo& rInf); void Set(const SwTextNode& rTextNd); - explicit SwMdNumRuleInfo(const SwTextNode& rTextNd) { Set(rTextNd); } inline SwMdNumRuleInfo& operator=(const SwMdNumRuleInfo& rInf); inline void Clear(); @@ -67,7 +66,6 @@ public: SwNumRule* GetNumRule() { return m_pNumRule; } const SwNumRule* GetNumRule() const { return m_pNumRule; } - void SetDepth(sal_uInt16 nDepth) { m_nDeep = nDepth; } sal_uInt16 GetDepth() const { return m_nDeep; } void IncDepth() { ++m_nDeep; } void DecDepth() @@ -77,10 +75,6 @@ public: } inline sal_uInt8 GetLevel() const; - bool IsRestart(const SwMdNumRuleInfo& rPrev) const; - - bool IsNumbered() const { return m_bNumbered; } - inline void SetNodeStartValue(sal_uInt8 nLvl, sal_uInt16 nVal = USHRT_MAX); sal_uInt16 GetNodeStartValue(sal_uInt8 nLvl) const { return m_aNumStarts[nLvl]; } }; diff --git a/sw/source/filter/md/swmd.hxx b/sw/source/filter/md/swmd.hxx index 411b668601f6..31c754a1be29 100644 --- a/sw/source/filter/md/swmd.hxx +++ b/sw/source/filter/md/swmd.hxx @@ -157,7 +157,6 @@ public: SwMarkdownParser(SwDoc& rD, SwPaM& rCursor, SvStream& rIn, OUString aBaseURL, bool bReadNewDoc); SwMdNumRuleInfo& GetNumInfo() const { return *m_pNumRuleInfo; } - bool IsNewDoc() const { return m_bNewDoc; } ErrCode CallParser(); ~SwMarkdownParser(); diff --git a/vcl/inc/impfontcharmap.hxx b/vcl/inc/impfontcharmap.hxx index b2352c48a12f..01d9f0b939a7 100644 --- a/vcl/inc/impfontcharmap.hxx +++ b/vcl/inc/impfontcharmap.hxx @@ -29,8 +29,7 @@ typedef tools::SvRef<ImplFontCharMap> ImplFontCharMapRef; class ImplFontCharMap final : public SvRefBase { public: - explicit ImplFontCharMap(bool bMicrosoftSymbolMap, - std::vector<sal_uInt32> aRangeCodes); + explicit ImplFontCharMap(std::vector<sal_uInt32> aRangeCodes); virtual ~ImplFontCharMap() override; private: @@ -45,7 +44,6 @@ private: private: std::vector<sal_uInt32> maRangeCodes; // pairs of StartCode/(EndCode+1) int mnCharCount; // covered codepoints - const bool m_bMicrosoftSymbolMap; }; bool VCL_DLLPUBLIC HasMicrosoftSymbolCmap(const unsigned char* pRawData, int nRawLength); diff --git a/vcl/source/font/PhysicalFontFace.cxx b/vcl/source/font/PhysicalFontFace.cxx index aa51ceab7e41..2402d5b23e06 100644 --- a/vcl/source/font/PhysicalFontFace.cxx +++ b/vcl/source/font/PhysicalFontFace.cxx @@ -256,7 +256,6 @@ FontCharMapRef PhysicalFontFace::GetFontCharMap() const // Check if this font is using symbol cmap subtable, most likely redundant // since HarfBuzz handles mapping symbol fonts for us. RawFontData aData(GetRawFontData(HB_TAG('c', 'm', 'a', 'p'))); - bool bSymbol = HasMicrosoftSymbolCmap(aData.data(), aData.size()); hb_face_t* pHbFace = GetHbFace(); hb_set_t* pUnicodes = hb_set_create(); @@ -273,7 +272,7 @@ FontCharMapRef PhysicalFontFace::GetFontCharMap() const aRangeCodes.push_back(nLast + 1); } - mxCharMap = new FontCharMap(bSymbol, std::move(aRangeCodes)); + mxCharMap = new FontCharMap(std::move(aRangeCodes)); } hb_set_destroy(pUnicodes); diff --git a/vcl/source/font/fontcharmap.cxx b/vcl/source/font/fontcharmap.cxx index 1a149bcc7d9e..a5294365aed3 100644 --- a/vcl/source/font/fontcharmap.cxx +++ b/vcl/source/font/fontcharmap.cxx @@ -31,10 +31,9 @@ ImplFontCharMap::~ImplFontCharMap() { } -ImplFontCharMap::ImplFontCharMap(bool bMicrosoftSymbolMap, std::vector<sal_uInt32> aRangeCodes) +ImplFontCharMap::ImplFontCharMap(std::vector<sal_uInt32> aRangeCodes) : maRangeCodes(std::move(aRangeCodes)) , mnCharCount( 0 ) -, m_bMicrosoftSymbolMap(bMicrosoftSymbolMap) { for (size_t i = 0; i < maRangeCodes.size(); i += 2) { @@ -47,7 +46,7 @@ ImplFontCharMap::ImplFontCharMap(bool bMicrosoftSymbolMap, std::vector<sal_uInt3 ImplFontCharMapRef const & ImplFontCharMap::getDefaultMap(bool bMicrosoftSymbolMap) { const auto& rRanges = bMicrosoftSymbolMap ? aDefaultSymbolRanges : aDefaultUnicodeRanges; - g_pDefaultImplFontCharMap = ImplFontCharMapRef(new ImplFontCharMap(bMicrosoftSymbolMap, rRanges)); + g_pDefaultImplFontCharMap = ImplFontCharMapRef(new ImplFontCharMap(rRanges)); return g_pDefaultImplFontCharMap; } @@ -95,8 +94,8 @@ FontCharMap::FontCharMap( ImplFontCharMapRef pIFCMap ) { } -FontCharMap::FontCharMap(bool bMicrosoftSymbolMap, std::vector<sal_uInt32> aRangeCodes) - : mpImplFontCharMap(new ImplFontCharMap(bMicrosoftSymbolMap, std::move(aRangeCodes))) +FontCharMap::FontCharMap(std::vector<sal_uInt32> aRangeCodes) + : mpImplFontCharMap(new ImplFontCharMap(std::move(aRangeCodes))) { } @@ -116,8 +115,6 @@ bool FontCharMap::IsDefaultMap() const return mpImplFontCharMap->isDefaultMap(); } -bool FontCharMap::isMicrosoftSymbolMap() const { return mpImplFontCharMap->m_bMicrosoftSymbolMap; } - int FontCharMap::GetCharCount() const { return mpImplFontCharMap->mnCharCount; commit 069cddc0a936f06226d17bd8b9616da86ff798d9 Author: Noel Grandin <[email protected]> AuthorDate: Tue Feb 24 12:41:29 2026 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Tue Feb 24 18:00:52 2026 +0100 loplugin:unusedfields Change-Id: Ifec23e3502d42553c5bd37c74f82887d7786d0fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200165 Reviewed-by: Noel Grandin <[email protected]> Tested-by: Jenkins diff --git a/include/svx/TableStylesParser.hxx b/include/svx/TableStylesParser.hxx index bc97f9cac3cd..cf01fd446c49 100644 --- a/include/svx/TableStylesParser.hxx +++ b/include/svx/TableStylesParser.hxx @@ -127,7 +127,6 @@ class SVX_DLLPUBLIC SvxTableStylesExport : public SvXMLExport { private: SvxAutoFormat& mpAutoFormat; - std::map<OUString, std::unique_ptr<SvxAutoFormatDataField>> maCellStyles; void exportTableTemplate(const SvxAutoFormatData& rData); void exportCellStyle(const SvxAutoFormatDataField& rField, OUString& rStyleName, diff --git a/include/svx/dialog/TableAutoFmtDlg.hxx b/include/svx/dialog/TableAutoFmtDlg.hxx index c611d39a8629..dd03041b9b30 100644 --- a/include/svx/dialog/TableAutoFmtDlg.hxx +++ b/include/svx/dialog/TableAutoFmtDlg.hxx @@ -28,9 +28,7 @@ class SVX_DLLPUBLIC SvxTableAutoFmtDlg : public weld::GenericDialogController { private: // Resource strings - OUString maStrTitle; OUString maStrLabel; - OUString maStrClose; OUString maStrDelMsg; OUString maStrDelTitle; OUString maStrRename; diff --git a/include/svx/strings.hrc b/include/svx/strings.hrc index d9e8f2dc5d71..19377dbae397 100644 --- a/include/svx/strings.hrc +++ b/include/svx/strings.hrc @@ -1884,12 +1884,10 @@ #define RID_SVXSTR_HEADER NC_("RID_SVXSTR_HEADER", "Header") // strings related to table autoformat styles dialog -#define RID_SVXSTR_ADD_AUTOFORMAT_TITLE NC_("RID_SVXSTR_ADD_AUTOFORMAT_TITLE", "Add AutoFormat" ) #define RID_SVXSTR_RENAME_AUTOFORMAT_TITLE NC_("RID_SVXSTR_RENAME_AUTOFORMAT_TITLE", "Rename AutoFormat" ) #define RID_SVXSTR_ADD_AUTOFORMAT_LABEL NC_("RID_SVXSTR_ADD_AUTOFORMAT_LABEL", "Name" ) #define RID_SVXSTR_DEL_AUTOFORMAT_TITLE NC_("RID_SVXSTR_DEL_AUTOFORMAT_TITLE", "Delete AutoFormat" ) #define RID_SVXSTR_DEL_AUTOFORMAT_MSG NC_("RID_SVXSTR_DEL_AUTOFORMAT_MSG", "Do you want to delete the following AutoFormat?" ) -#define RID_SVXSTR_BTN_AUTOFORMAT_CLOSE NC_("RID_SVXSTR_BTN_AUTOFORMAT_CLOSE", "~Close" ) #define RID_SVXSTR_JAN NC_("RID_SVXSTR_JAN", "Jan" ) #define RID_SVXSTR_FEB NC_("RID_SVXSTR_FEB", "Feb" ) #define RID_SVXSTR_MAR NC_("RID_SVXSTR_MAR", "Mar" ) diff --git a/svx/source/dialog/TableAutoFmtDlg.cxx b/svx/source/dialog/TableAutoFmtDlg.cxx index 9f8037f05d23..6865fa2a1391 100644 --- a/svx/source/dialog/TableAutoFmtDlg.cxx +++ b/svx/source/dialog/TableAutoFmtDlg.cxx @@ -61,9 +61,7 @@ SvxTableAutoFmtDlg::SvxTableAutoFmtDlg(SvxAutoFormat& rFormat, const OUString& s weld::Window* pParent, bool bWriter, bool bRTL) : weld::GenericDialogController(pParent, u"svx/ui/tableautofmtdlg.ui"_ustr, u"AutoFormatTableDialog"_ustr) - , maStrTitle(SvxResId(RID_SVXSTR_ADD_AUTOFORMAT_TITLE)) , maStrLabel(SvxResId(RID_SVXSTR_ADD_AUTOFORMAT_LABEL)) - , maStrClose(SvxResId(RID_SVXSTR_BTN_AUTOFORMAT_CLOSE)) , maStrDelMsg(SvxResId(RID_SVXSTR_DEL_AUTOFORMAT_MSG)) , maStrDelTitle(SvxResId(RID_SVXSTR_DEL_AUTOFORMAT_TITLE)) , maStrRename(SvxResId(RID_SVXSTR_RENAME_AUTOFORMAT_TITLE)) diff --git a/sw/source/filter/md/mdtab.cxx b/sw/source/filter/md/mdtab.cxx index ffdd37ceb976..007b98d51c0c 100644 --- a/sw/source/filter/md/mdtab.cxx +++ b/sw/source/filter/md/mdtab.cxx @@ -27,8 +27,6 @@ class MDTable { const SwTable* m_pTable; SwMarkdownParser* m_pParser; - sal_Int32 m_nRow; - sal_Int32 m_nCol; sal_Int32 m_nCurRow; sal_Int32 m_nCurCol; @@ -36,8 +34,6 @@ public: MDTable(SwMarkdownParser* pParser) : m_pTable(nullptr) , m_pParser(pParser) - , m_nRow(-1) - , m_nCol(-1) , m_nCurRow(-1) , m_nCurCol(-1) { @@ -50,17 +46,12 @@ public: sal_Int32 GetCurRow() { return m_nCurRow; } sal_Int32 GetCurCol() { return m_nCurCol; } - void SetTable(const SwTable* pTable, sal_Int32 nRow, sal_Int32 nCol); + void SetTable(const SwTable* pTable); inline void IncCurRow(); inline void IncCurCol(); }; -void MDTable::SetTable(const SwTable* pTable, sal_Int32 nRow, sal_Int32 nCol) -{ - m_pTable = pTable; - m_nRow = nRow; - m_nCol = nCol; -} +void MDTable::SetTable(const SwTable* pTable) { m_pTable = pTable; } void SwMarkdownParser::StartTable(sal_Int32 nRow, sal_Int32 nCol) { @@ -74,7 +65,7 @@ void SwMarkdownParser::StartTable(sal_Int32 nRow, sal_Int32 nCol) const SwTable* pTable = m_xDoc->InsertTable(SwInsertTableOptions(SwInsertTableFlags::All, 1), *m_pPam->GetPoint(), nRow, nCol, text::HoriOrientation::FULL); - m_xTable->SetTable(pTable, nRow, nCol); + m_xTable->SetTable(pTable); } void SwMarkdownParser::EndTable() diff --git a/sw/source/uibase/fldui/fldmgr.cxx b/sw/source/uibase/fldui/fldmgr.cxx index 16088bb4e8ff..bab2bec913ce 100644 --- a/sw/source/uibase/fldui/fldmgr.cxx +++ b/sw/source/uibase/fldui/fldmgr.cxx @@ -1247,7 +1247,6 @@ bool SwFieldMgr::InsertField( if( !(nSubType & SwDBFieldSubType::OwnFormat) ) // determine database format { Reference< XDataSource> xSource; - rData.m_aDBDataSource >>= xSource; Reference<XConnection> xConnection; rData.m_aDBConnection >>= xConnection; Reference<XPropertySet> xColumn; diff --git a/sw/source/uibase/inc/fldmgr.hxx b/sw/source/uibase/inc/fldmgr.hxx index eb19102da017..8d84066d5ddf 100644 --- a/sw/source/uibase/inc/fldmgr.hxx +++ b/sw/source/uibase/inc/fldmgr.hxx @@ -73,7 +73,6 @@ struct SwInsertField_Data SwWrtShell* m_pSh; sal_Unicode m_cSeparator; bool m_bIsAutomaticLanguage; - css::uno::Any m_aDBDataSource; css::uno::Any m_aDBConnection; css::uno::Any m_aDBColumn; weld::Widget* m_pParent; // parent widget used for SwWrtShell::StartInputFieldDlg() diff --git a/vcl/inc/fontsubset.hxx b/vcl/inc/fontsubset.hxx index c09327433c66..830bad314e29 100644 --- a/vcl/inc/fontsubset.hxx +++ b/vcl/inc/fontsubset.hxx @@ -50,7 +50,6 @@ public: // TODO: make subsetter results private and provide accessor methods ins int m_nCapHeight = 0; tools::Rectangle m_aFontBBox; FontType m_nFontType = FontType::NO_FONT; ///< font-type of subset result - bool m_bFilled = false; }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/font/PhysicalFontFace.cxx b/vcl/source/font/PhysicalFontFace.cxx index 40b5efa2848c..aa51ceab7e41 100644 --- a/vcl/source/font/PhysicalFontFace.cxx +++ b/vcl/source/font/PhysicalFontFace.cxx @@ -531,8 +531,6 @@ bool PhysicalFontFace::CreateFontSubset(std::vector<sal_uInt8>& rOutBuffer, Point(XUnits(nUPEM, xMax), XUnits(nUPEM, yMax))); } - rInfo.m_bFilled = true; - hb_blob_t* pSubsetBlob = nullptr; comphelper::ScopeGuard aBuilderBlobGuard([&]() { hb_blob_destroy(pSubsetBlob); });
