sw/inc/unoprnms.hxx                |    1 -
 sw/source/core/unocore/unosett.cxx |    3 +--
 2 files changed, 1 insertion(+), 3 deletions(-)

New commits:
commit 1a57418e2837e7fd07b0619804feed06e1acfe41
Author:     Justin Luth <jl...@mail.com>
AuthorDate: Sat May 21 18:27:45 2022 +0200
Commit:     Justin Luth <jl...@mail.com>
CommitDate: Wed Jun 15 01:44:17 2022 +0200

    remove unused sw UNO_NAME_CHARACTER_FORMAT_NONE
    
    CharacterFormatNone seems to be orphaned code.
    Was this ever written out to file? If not, then it should
    be removable because I don't see anywhere that it can
    be set.
    
    I found this while working on tdf#75297.
    
    Change-Id: I3212ab7dcda3c46adfe638ee1ae412a3ede8762c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134889
    Tested-by: Jenkins
    Reviewed-by: Justin Luth <jl...@mail.com>
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx
index c3a7d97b32e8..7fcf2850f873 100644
--- a/sw/inc/unoprnms.hxx
+++ b/sw/inc/unoprnms.hxx
@@ -340,7 +340,6 @@
 #define UNO_NAME_WIDTH "Width"
 #define UNO_NAME_CHAR_WORD_MODE "CharWordMode"
 #define UNO_NAME_GRAPHIC_CROP "GraphicCrop"
-#define UNO_NAME_CHARACTER_FORMAT_NONE "CharacterFormatNone"
 #define UNO_NAME_DOCUMENT_INDEX_MARK "DocumentIndexMark"
 #define UNO_NAME_DOCUMENT_INDEX "DocumentIndex"
 #define UNO_NAME_IS_GLOBAL_DOCUMENT_SECTION "IsGlobalDocumentSection"
diff --git a/sw/source/core/unocore/unosett.cxx 
b/sw/source/core/unocore/unosett.cxx
index c68a4fac048f..648110971c33 100644
--- a/sw/source/core/unocore/unosett.cxx
+++ b/sw/source/core/unocore/unosett.cxx
@@ -1134,7 +1134,6 @@ void SwXNumberingRules::replaceByIndex(sal_Int32 nIndex, 
const uno::Any& rElemen
         {
             SwNumFormat aFormat(aNumRule.Get( i ));
             if (!m_sNewCharStyleNames[i].isEmpty() &&
-                m_sNewCharStyleNames[i] != UNO_NAME_CHARACTER_FORMAT_NONE &&
                 (!aFormat.GetCharFormat() || 
aFormat.GetCharFormat()->GetName()!= m_sNewCharStyleNames[i]))
             {
                 SwCharFormat* pCharFormat = nullptr;
@@ -1574,7 +1573,7 @@ void SwXNumberingRules::SetPropertiesToNumFormat(
             OUString sCharFormatName;
             SwStyleNameMapper::FillUIName( uTmp, sCharFormatName, 
SwGetPoolIdFromName::ChrFmt );
             SwDoc *const pLocalDoc = pDocShell ? pDocShell->GetDoc() : pDoc;
-            if (sCharFormatName.isEmpty() || sCharFormatName == 
UNO_NAME_CHARACTER_FORMAT_NONE)
+            if (sCharFormatName.isEmpty())
             {
                 rCharStyleName = aInvalidStyle;
                 aFormat.SetCharFormat(nullptr);

Reply via email to