editeng/source/items/paraitem.cxx | 13 ------------- filter/source/msfilter/rtfutil.cxx | 16 +++++----------- include/filter/msfilter/rtfutil.hxx | 4 ---- 3 files changed, 5 insertions(+), 28 deletions(-)
New commits: commit 7fb279341f0e3167834aa78f84e794023f95e78a Author: Noel Grandin <[email protected]> AuthorDate: Mon Jan 26 11:01:33 2026 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Mon Jan 26 13:40:49 2026 +0100 enum SvxSpecialLineSpace is dead since commit ff055c9e1eb52a3f39938439fe5dcffa2ef455b5 Author: Mike Kaganski <[email protected]> Date: Mon Jun 9 07:33:36 2025 +0200 SvxLineSpacingItem does not need to be an SfxEnumItemInterface Change-Id: I11b50fc19f0bdae3cd41f4d84a10696c43a2fb20 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198129 Reviewed-by: Noel Grandin <[email protected]> Tested-by: Jenkins diff --git a/editeng/source/items/paraitem.cxx b/editeng/source/items/paraitem.cxx index 9f0759add854..7aebb56824f0 100644 --- a/editeng/source/items/paraitem.cxx +++ b/editeng/source/items/paraitem.cxx @@ -64,19 +64,6 @@ SfxPoolItem* SvxFormatSplitItem::CreateDefault() { return new SvxFormatSplitIte SfxPoolItem* SvxPageModelItem::CreateDefault() { return new SvxPageModelItem(TypedWhichId<SvxPageModelItem>(0));} SfxPoolItem* SvxParaVertAlignItem::CreateDefault() { return new SvxParaVertAlignItem(Align::Automatic, TypedWhichId<SvxParaVertAlignItem>(0));} -namespace { - -enum class SvxSpecialLineSpace -{ - User, - OneLine, - OnePointFiveLines, - TwoLines, - End -}; - -} - SvxLineSpacingItem::SvxLineSpacingItem( sal_uInt16 nHeight, const sal_uInt16 nId ) : SfxPoolItem(nId) { commit 7d6f84c6242a6c27a81ac99be3331258d031c6e9 Author: Noel Grandin <[email protected]> AuthorDate: Mon Jan 26 10:24:44 2026 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Mon Jan 26 13:40:39 2026 +0100 loplugin:constantparam OutChar always has pSuccess == nullptr And is also not used outside of filter anymore, so remove from header file. Change-Id: I9ea0f58941d301ec024e8c8d0ed8cf0ae354b950 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198123 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/filter/source/msfilter/rtfutil.cxx b/filter/source/msfilter/rtfutil.cxx index 1c8463c71aba..1e27047525d3 100644 --- a/filter/source/msfilter/rtfutil.cxx +++ b/filter/source/msfilter/rtfutil.cxx @@ -116,6 +116,8 @@ OString OutHex(sal_uInt32 nHex, sal_uInt8 nLen) return pStr; } +/// Handles correct unicode and legacy export of a single character. +// // Ideally, this function should work on (sal_uInt32) Unicode scalar values // instead of (sal_Unicode) UTF-16 code units. However, at least "Rich Text // Format (RTF) Specification Version 1.9.1" available at @@ -127,11 +129,8 @@ OString OutHex(sal_uInt32 nHex, sal_uInt8 nLen) // However the "Mathematics" section has an example that shows the code point // U+1D44E being encoded as UTF-16 surrogate pair "\u-10187?\u-9138?", so // sal_Unicode actually works fine here. -OString OutChar(sal_Unicode c, int* pUCMode, rtl_TextEncoding eDestEnc, bool* pSuccess, - bool bUnicode) +static OString OutChar(sal_Unicode c, int* pUCMode, rtl_TextEncoding eDestEnc, bool bUnicode) { - if (pSuccess) - *pSuccess = true; OStringBuffer aBuf; const char* pStr = nullptr; // 0x0b instead of , etc because of the replacements in SwWW8AttrIter::GetSnippet() @@ -169,12 +168,7 @@ OString OutChar(sal_Unicode c, int* pUCMode, rtl_TextEncoding eDestEnc, bool* pS { OUString sBuf(&c, 1); OString sConverted; - if (pSuccess) - *pSuccess &= sBuf.convertToString(&sConverted, eDestEnc, - RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR - | RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR); - else - sBuf.convertToString(&sConverted, eDestEnc, OUSTRING_TO_OSTRING_CVTFLAGS); + sBuf.convertToString(&sConverted, eDestEnc, OUSTRING_TO_OSTRING_CVTFLAGS); const sal_Int32 nLen = sConverted.getLength(); if (pUCMode && bUnicode) @@ -217,7 +211,7 @@ OString OutString(std::u16string_view rStr, rtl_TextEncoding eDestEnc, bool bUni OStringBuffer aBuf; int nUCMode = 1; for (size_t n = 0; n < rStr.size(); ++n) - aBuf.append(OutChar(rStr[n], &nUCMode, eDestEnc, nullptr, bUnicode)); + aBuf.append(OutChar(rStr[n], &nUCMode, eDestEnc, bUnicode)); if (nUCMode != 1) { aBuf.append( diff --git a/include/filter/msfilter/rtfutil.hxx b/include/filter/msfilter/rtfutil.hxx index b7ad803551c3..94004d9778d0 100644 --- a/include/filter/msfilter/rtfutil.hxx +++ b/include/filter/msfilter/rtfutil.hxx @@ -25,10 +25,6 @@ namespace msfilter::rtfutil /// Outputs a single character in hex form. MSFILTER_DLLPUBLIC OString OutHex(sal_uInt32 nHex, sal_uInt8 nLen); -/// Handles correct unicode and legacy export of a single character. -MSFILTER_DLLPUBLIC OString OutChar(sal_Unicode c, int* pUCMode, rtl_TextEncoding eDestEnc, - bool* pSuccess, bool bUnicode = true); - /** * Handles correct unicode and legacy export of a string. *
