sw/inc/IDocumentSettingAccess.hxx             |    2 +-
 sw/qa/extras/odfexport/odfexport2.cxx         |   22 +++++++++++-----------
 sw/source/core/doc/DocumentSettingManager.cxx |   12 ++++++------
 sw/source/core/inc/DocumentSettingManager.hxx |    2 +-
 sw/source/core/text/porfld.cxx                |    2 +-
 sw/source/filter/ww8/ww8par.cxx               |    2 +-
 sw/source/uibase/uno/SwXDocumentSettings.cxx  |   12 ++++++------
 writerfilter/source/dmapper/DomainMapper.cxx  |    2 +-
 writerfilter/source/filter/WriterFilter.cxx   |    2 +-
 9 files changed, 29 insertions(+), 29 deletions(-)

New commits:
commit dbb8a9c01fd6693df32f0a9c023b7be2c623cf7a
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Sun Jan 28 20:30:03 2024 +0600
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Tue Jan 30 10:58:59 2024 +0100

    Related: tdf#159382 Naming is hard: make initial monster shorter
    
    Rename "NoSpaceAfterHangingFootnoteNumbering" and friends to
    "NoGapAfterNoteNumber". This is cleaner, no less descriprive.
    
    Change-Id: I87d3103e4ddfc05e5604eaa4fe707b1fd5711aae
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162654
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162660
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

diff --git a/sw/inc/IDocumentSettingAccess.hxx 
b/sw/inc/IDocumentSettingAccess.hxx
index c58facf04d3d..74b123dc462e 100644
--- a/sw/inc/IDocumentSettingAccess.hxx
+++ b/sw/inc/IDocumentSettingAccess.hxx
@@ -59,7 +59,7 @@ enum class DocumentSettingId
     TREAT_SINGLE_COLUMN_BREAK_AS_PAGE_BREAK,
     DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT,
     // tdf#159382: MS Word compatible handling of space between footnote 
number and text
-    NO_SPACE_AFTER_HANGING_FOOTNOTE_NUMBER,
+    NO_GAP_AFTER_NOTE_NUMBER,
 
     DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE,
     TABLE_ROW_KEEP,
diff --git a/sw/qa/extras/odfexport/odfexport2.cxx 
b/sw/qa/extras/odfexport/odfexport2.cxx
index acb9226eff1d..37e744e9c852 100644
--- a/sw/qa/extras/odfexport/odfexport2.cxx
+++ b/sw/qa/extras/odfexport/odfexport2.cxx
@@ -1150,17 +1150,17 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf150408_IsLegal)
 
 CPPUNIT_TEST_FIXTURE(Test, testTdf159382)
 {
-    // Testing NoSpaceAfterHangingFootnoteNumbering compat option
+    // Testing NoGapAfterNoteNumber compat option
 
     createSwDoc("footnote_spacing_hanging_para.docx");
-    // 1. Make sure that DOCX import sets NoSpaceAfterHangingFootnoteNumbering 
option, and creates
+    // 1. Make sure that DOCX import sets NoGapAfterNoteNumber option, and 
creates
     // correct layout
     {
         uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, 
uno::UNO_QUERY_THROW);
         uno::Reference<beans::XPropertySet> xSettings(
             xFactory->createInstance(u"com.sun.star.document.Settings"_ustr), 
uno::UNO_QUERY_THROW);
         CPPUNIT_ASSERT_EQUAL(uno::Any(true), xSettings->getPropertyValue(
-                                                 
u"NoSpaceAfterHangingFootnoteNumbering"_ustr));
+                                                 
u"NoGapAfterNoteNumber"_ustr));
 
         xmlDocUniquePtr pXmlDoc = parseLayoutDump();
         sal_Int32 width
@@ -1173,20 +1173,20 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf159382)
     }
 
     saveAndReload(mpFilter);
-    // 2. Make sure that exported document has 
NoSpaceAfterHangingFootnoteNumbering option set,
+    // 2. Make sure that exported document has NoGapAfterNoteNumber option set,
     // and has correct layout
     {
         xmlDocUniquePtr pXmlDoc = parseExport("settings.xml");
         assertXPathContent(
             pXmlDoc,
-            
"//config:config-item[@config:name='NoSpaceAfterHangingFootnoteNumbering']"_ostr,
+            "//config:config-item[@config:name='NoGapAfterNoteNumber']"_ostr,
             "true");
 
         uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, 
uno::UNO_QUERY_THROW);
         uno::Reference<beans::XPropertySet> xSettings(
             xFactory->createInstance(u"com.sun.star.document.Settings"_ustr), 
uno::UNO_QUERY_THROW);
         CPPUNIT_ASSERT_EQUAL(uno::Any(true), xSettings->getPropertyValue(
-                                                 
u"NoSpaceAfterHangingFootnoteNumbering"_ustr));
+                                                 
u"NoGapAfterNoteNumber"_ustr));
 
         pXmlDoc = parseLayoutDump();
         sal_Int32 width = getXPath(
@@ -1197,14 +1197,14 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf159382)
     }
 
     createSwDoc("footnote_spacing_hanging_para.doc");
-    // 3. Make sure that DOC import sets NoSpaceAfterHangingFootnoteNumbering 
option, and creates
+    // 3. Make sure that DOC import sets NoGapAfterNoteNumber option, and 
creates
     // correct layout
     {
         uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, 
uno::UNO_QUERY_THROW);
         uno::Reference<beans::XPropertySet> xSettings(
             xFactory->createInstance(u"com.sun.star.document.Settings"_ustr), 
uno::UNO_QUERY_THROW);
         CPPUNIT_ASSERT_EQUAL(uno::Any(true), xSettings->getPropertyValue(
-                                                 
u"NoSpaceAfterHangingFootnoteNumbering"_ustr));
+                                                 
u"NoGapAfterNoteNumber"_ustr));
 
         xmlDocUniquePtr pXmlDoc = parseLayoutDump();
         sal_Int32 width
@@ -1217,14 +1217,14 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf159382)
     }
 
     createSwDoc("footnote_spacing_hanging_para.rtf");
-    // 4. Make sure that RTF import sets NoSpaceAfterHangingFootnoteNumbering 
option, and creates
+    // 4. Make sure that RTF import sets NoGapAfterNoteNumber option, and 
creates
     // correct layout
     {
         uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, 
uno::UNO_QUERY_THROW);
         uno::Reference<beans::XPropertySet> xSettings(
             xFactory->createInstance(u"com.sun.star.document.Settings"_ustr), 
uno::UNO_QUERY_THROW);
         CPPUNIT_ASSERT_EQUAL(uno::Any(true), xSettings->getPropertyValue(
-                                                 
u"NoSpaceAfterHangingFootnoteNumbering"_ustr));
+                                                 
u"NoGapAfterNoteNumber"_ustr));
 
         xmlDocUniquePtr pXmlDoc = parseLayoutDump();
         sal_Int32 width
@@ -1243,7 +1243,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf159382)
         uno::Reference<beans::XPropertySet> xSettings(
             xFactory->createInstance(u"com.sun.star.document.Settings"_ustr), 
uno::UNO_QUERY_THROW);
         CPPUNIT_ASSERT_EQUAL(uno::Any(false), xSettings->getPropertyValue(
-                                                  
u"NoSpaceAfterHangingFootnoteNumbering"_ustr));
+                                                  
u"NoGapAfterNoteNumber"_ustr));
     }
 }
 
diff --git a/sw/source/core/doc/DocumentSettingManager.cxx 
b/sw/source/core/doc/DocumentSettingManager.cxx
index 14208855697a..baa0f293266b 100644
--- a/sw/source/core/doc/DocumentSettingManager.cxx
+++ b/sw/source/core/doc/DocumentSettingManager.cxx
@@ -192,7 +192,7 @@ bool sw::DocumentSettingManager::get(/*[in]*/ 
DocumentSettingId id) const
         case DocumentSettingId::CONSIDER_WRAP_ON_OBJECT_POSITION: return 
mbConsiderWrapOnObjPos;
         case DocumentSettingId::DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK: return 
mbDoNotJustifyLinesWithManualBreak;
         case DocumentSettingId::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING: return 
mbIgnoreFirstLineIndentInNumbering;
-        case DocumentSettingId::NO_SPACE_AFTER_HANGING_FOOTNOTE_NUMBER: return 
mbNoSpaceAfterHangingFootnoteNumbering;
+        case DocumentSettingId::NO_GAP_AFTER_NOTE_NUMBER: return 
mbNoGapAfterNoteNumber;
         case DocumentSettingId::TABLE_ROW_KEEP: return mbTableRowKeep;
         case DocumentSettingId::IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION: 
return mbIgnoreTabsAndBlanksForLineCalculation;
         case DocumentSettingId::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE: return 
mbDoNotCaptureDrawObjsOnPage;
@@ -338,8 +338,8 @@ void sw::DocumentSettingManager::set(/*[in]*/ 
DocumentSettingId id, /*[in]*/ boo
         case DocumentSettingId::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING:
             mbIgnoreFirstLineIndentInNumbering = value;
             break;
-        case DocumentSettingId::NO_SPACE_AFTER_HANGING_FOOTNOTE_NUMBER:
-            mbNoSpaceAfterHangingFootnoteNumbering = value;
+        case DocumentSettingId::NO_GAP_AFTER_NOTE_NUMBER:
+            mbNoGapAfterNoteNumber = value;
             break;
 
         case DocumentSettingId::TABLE_ROW_KEEP:
@@ -701,7 +701,7 @@ void 
sw::DocumentSettingManager::ReplaceCompatibilityOptions(const DocumentSetti
     mbStylesNoDefault = rSource.mbStylesNoDefault;
     mbOldNumbering = rSource.mbOldNumbering;
     mbIgnoreFirstLineIndentInNumbering = 
rSource.mbIgnoreFirstLineIndentInNumbering;
-    mbNoSpaceAfterHangingFootnoteNumbering = 
rSource.mbNoSpaceAfterHangingFootnoteNumbering;
+    mbNoGapAfterNoteNumber = rSource.mbNoGapAfterNoteNumber;
     mbDoNotJustifyLinesWithManualBreak = 
rSource.mbDoNotJustifyLinesWithManualBreak;
     mbDoNotResetParaAttrsForNumFont = rSource.mbDoNotResetParaAttrsForNumFont;
     mbTableRowKeep = rSource.mbTableRowKeep;
@@ -885,10 +885,10 @@ void 
sw::DocumentSettingManager::dumpAsXml(xmlTextWriterPtr pWriter) const
         
BAD_CAST(OString::boolean(mbIgnoreFirstLineIndentInNumbering).getStr()));
     (void)xmlTextWriterEndElement(pWriter);
 
-    (void)xmlTextWriterStartElement(pWriter, 
BAD_CAST("mbNoSpaceAfterHangingFootnoteNumbering"));
+    (void)xmlTextWriterStartElement(pWriter, 
BAD_CAST("mbNoGapAfterNoteNumber"));
     (void)xmlTextWriterWriteAttribute(
         pWriter, BAD_CAST("value"),
-        
BAD_CAST(OString::boolean(mbNoSpaceAfterHangingFootnoteNumbering).getStr()));
+        BAD_CAST(OString::boolean(mbNoGapAfterNoteNumber).getStr()));
     (void)xmlTextWriterEndElement(pWriter);
 
     (void)xmlTextWriterStartElement(pWriter, 
BAD_CAST("mbDoNotJustifyLinesWithManualBreak"));
diff --git a/sw/source/core/inc/DocumentSettingManager.hxx 
b/sw/source/core/inc/DocumentSettingManager.hxx
index 38bd64818dd1..3e5be92c643c 100644
--- a/sw/source/core/inc/DocumentSettingManager.hxx
+++ b/sw/source/core/inc/DocumentSettingManager.hxx
@@ -132,7 +132,7 @@ class DocumentSettingManager final :
     // non-ui-compatibility flags:
     bool mbOldNumbering                             : 1;
     bool mbIgnoreFirstLineIndentInNumbering         : 1;   // #i47448#
-    bool mbNoSpaceAfterHangingFootnoteNumbering     : 1 = false; // tdf#159382
+    bool mbNoGapAfterNoteNumber     : 1 = false; // tdf#159382
     bool mbDoNotJustifyLinesWithManualBreak         : 1;   // #i49277#
     bool mbDoNotResetParaAttrsForNumFont            : 1;   // #i53199#
     bool mbTableRowKeep                             : 1;
diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index 4718fcfbc169..d2ae4be00d1b 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -607,7 +607,7 @@ bool SwNumberPortion::Format( SwTextFormatInfo &rInf )
                  !IsFootnoteNumPortion()) ||
                  // tdf#159382
                 (IsFootnoteNumPortion() &&
-                 
rInf.GetTextFrame()->GetDoc().getIDocumentSettingAccess().get(DocumentSettingId::NO_SPACE_AFTER_HANGING_FOOTNOTE_NUMBER)))
+                 
rInf.GetTextFrame()->GetDoc().getIDocumentSettingAccess().get(DocumentSettingId::NO_GAP_AFTER_NOTE_NUMBER)))
             {
                 nDiff = rInf.Left()
                     + rInf.GetTextFrame()->GetTextNodeForParaProps()->
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index d638f71834de..c36097898495 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -1912,7 +1912,7 @@ void SwWW8ImplReader::ImportDop()
     m_rDoc.getIDocumentSettingAccess().set(DocumentSettingId::ADD_EXT_LEADING, 
!m_xWDop->fNoLeading);
     m_rDoc.getIDocumentSettingAccess().set(DocumentSettingId::OLD_NUMBERING, 
false);
     
m_rDoc.getIDocumentSettingAccess().set(DocumentSettingId::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING,
 false); // #i47448#
-    
m_rDoc.getIDocumentSettingAccess().set(DocumentSettingId::NO_SPACE_AFTER_HANGING_FOOTNOTE_NUMBER,
 true); // tdf#159382
+    
m_rDoc.getIDocumentSettingAccess().set(DocumentSettingId::NO_GAP_AFTER_NOTE_NUMBER,
 true); // tdf#159382
     
m_rDoc.getIDocumentSettingAccess().set(DocumentSettingId::DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK,
 !m_xWDop->fExpShRtn); // #i49277#, #i56856#
     
m_rDoc.getIDocumentSettingAccess().set(DocumentSettingId::DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT,
 false);  // #i53199#
     
m_rDoc.getIDocumentSettingAccess().set(DocumentSettingId::OLD_LINE_SPACING, 
false);
diff --git a/sw/source/uibase/uno/SwXDocumentSettings.cxx 
b/sw/source/uibase/uno/SwXDocumentSettings.cxx
index 2f9c480f3982..66f3eef7db32 100644
--- a/sw/source/uibase/uno/SwXDocumentSettings.cxx
+++ b/sw/source/uibase/uno/SwXDocumentSettings.cxx
@@ -101,7 +101,7 @@ enum SwDocumentSettingsPropertyHandles
     HANDLE_CHANGES_PASSWORD,
     HANDLE_CONSIDER_WRAP_ON_OBJPOS,
     HANDLE_IGNORE_FIRST_LINE_INDENT_IN_NUMBERING,
-    HANDLE_NO_SPACE_AFTER_HANGING_FOOTNOTE_NUMBER,
+    HANDLE_NO_GAP_AFTER_NOTE_NUMBER,
     HANDLE_DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK,
     HANDLE_DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT,
     HANDLE_TABLE_ROW_KEEP,
@@ -206,7 +206,7 @@ static rtl::Reference<MasterPropertySetInfo> 
lcl_createSettingsInfo()
         { OUString("RedlineProtectionKey"),       HANDLE_CHANGES_PASSWORD,     
           cppu::UnoType< cppu::UnoSequenceType<sal_Int8> >::get(),           
0},
         { OUString("ConsiderTextWrapOnObjPos"),   
HANDLE_CONSIDER_WRAP_ON_OBJPOS,         cppu::UnoType<bool>::get(),           
0},
         { OUString("IgnoreFirstLineIndentInNumbering"),   
HANDLE_IGNORE_FIRST_LINE_INDENT_IN_NUMBERING,         
cppu::UnoType<bool>::get(),           0},
-        { u"NoSpaceAfterHangingFootnoteNumbering"_ustr,   
HANDLE_NO_SPACE_AFTER_HANGING_FOOTNOTE_NUMBER, cppu::UnoType<bool>::get(),      
     0},
+        { u"NoGapAfterNoteNumber"_ustr,   HANDLE_NO_GAP_AFTER_NOTE_NUMBER, 
cppu::UnoType<bool>::get(),           0},
         { OUString("DoNotJustifyLinesWithManualBreak"),   
HANDLE_DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK,         
cppu::UnoType<bool>::get(),           0},
         { OUString("DoNotResetParaAttrsForNumFont"),   
HANDLE_DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT,         
cppu::UnoType<bool>::get(),           0},
         { OUString("TableRowKeep"),               HANDLE_TABLE_ROW_KEEP,       
  cppu::UnoType<bool>::get(),           0},
@@ -701,10 +701,10 @@ void SwXDocumentSettings::_setSingleValue( const 
comphelper::PropertyInfo & rInf
             
mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING,
 bTmp);
         }
         break;
-        case HANDLE_NO_SPACE_AFTER_HANGING_FOOTNOTE_NUMBER:
+        case HANDLE_NO_GAP_AFTER_NOTE_NUMBER:
         {
             bool bTmp = *o3tl::doAccess<bool>(rValue);
-            
mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::NO_SPACE_AFTER_HANGING_FOOTNOTE_NUMBER,
 bTmp);
+            
mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::NO_GAP_AFTER_NOTE_NUMBER,
 bTmp);
         }
         break;
         case HANDLE_DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK:
@@ -1387,9 +1387,9 @@ void SwXDocumentSettings::_getSingleValue( const 
comphelper::PropertyInfo & rInf
             rValue <<= 
mpDoc->getIDocumentSettingAccess().get(DocumentSettingId::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING);
         }
         break;
-        case HANDLE_NO_SPACE_AFTER_HANGING_FOOTNOTE_NUMBER:
+        case HANDLE_NO_GAP_AFTER_NOTE_NUMBER:
         {
-            rValue <<= 
mpDoc->getIDocumentSettingAccess().get(DocumentSettingId::NO_SPACE_AFTER_HANGING_FOOTNOTE_NUMBER);
+            rValue <<= 
mpDoc->getIDocumentSettingAccess().get(DocumentSettingId::NO_GAP_AFTER_NOTE_NUMBER);
         }
         break;
         case HANDLE_DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK:
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx 
b/writerfilter/source/dmapper/DomainMapper.cxx
index 4b36a6086826..34e3c04e35a8 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -138,7 +138,7 @@ DomainMapper::DomainMapper( const uno::Reference< 
uno::XComponentContext >& xCon
         m_pImpl->SetDocumentSettingsProperty("FrameAutowidthWithMorePara", 
uno::Any(true));
         m_pImpl->SetDocumentSettingsProperty("FootnoteInColumnToPageEnd", 
uno::Any(true));
         
m_pImpl->SetDocumentSettingsProperty("TabAtLeftIndentForParagraphsInList", 
uno::Any(true));
-        
m_pImpl->SetDocumentSettingsProperty(u"NoSpaceAfterHangingFootnoteNumbering"_ustr,
+        m_pImpl->SetDocumentSettingsProperty(u"NoGapAfterNoteNumber"_ustr,
                                              uno::Any(true));
 
         // Enable only for new documents, since pasting from clipboard can 
influence existing doc
diff --git a/writerfilter/source/filter/WriterFilter.cxx 
b/writerfilter/source/filter/WriterFilter.cxx
index 10ea7da5a16f..e7d32c4843e6 100644
--- a/writerfilter/source/filter/WriterFilter.cxx
+++ b/writerfilter/source/filter/WriterFilter.cxx
@@ -304,7 +304,7 @@ void WriterFilter::setTargetDocument(const 
uno::Reference<lang::XComponent>& xDo
 
     xSettings->setPropertyValue("UseOldNumbering", uno::Any(false));
     xSettings->setPropertyValue("IgnoreFirstLineIndentInNumbering", 
uno::Any(false));
-    xSettings->setPropertyValue(u"NoSpaceAfterHangingFootnoteNumbering"_ustr, 
uno::Any(true));
+    xSettings->setPropertyValue(u"NoGapAfterNoteNumber"_ustr, uno::Any(true));
     xSettings->setPropertyValue("DoNotResetParaAttrsForNumFont", 
uno::Any(false));
     xSettings->setPropertyValue("UseFormerLineSpacing", uno::Any(false));
     xSettings->setPropertyValue("AddParaSpacingToTableCells", uno::Any(true));

Reply via email to