sw/inc/IDocumentSettingAccess.hxx | 2 +- sw/qa/extras/odfexport/odfexport2.cxx | 22 +++++++++++----------- sw/source/core/doc/DocumentSettingManager.cxx | 14 +++++++------- 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, 30 insertions(+), 30 deletions(-)
New commits: commit bea32875c97f047a310680fec8f2858217fec989 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Sun Jan 28 20:18:45 2024 +0600 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Mon Jan 29 14:06:25 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/+/162659 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/sw/inc/IDocumentSettingAccess.hxx b/sw/inc/IDocumentSettingAccess.hxx index 3304888693d0..7c4ee01f9054 100644 --- a/sw/inc/IDocumentSettingAccess.hxx +++ b/sw/inc/IDocumentSettingAccess.hxx @@ -60,7 +60,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 c3838535e5c5..34678ae5d95b 100644 --- a/sw/qa/extras/odfexport/odfexport2.cxx +++ b/sw/qa/extras/odfexport/odfexport2.cxx @@ -867,17 +867,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("com.sun.star.document.Settings"), uno::UNO_QUERY_THROW); CPPUNIT_ASSERT_EQUAL(uno::Any(true), xSettings->getPropertyValue( - "NoSpaceAfterHangingFootnoteNumbering")); + "NoGapAfterNoteNumber")); xmlDocUniquePtr pXmlDoc = parseLayoutDump(); sal_Int32 width @@ -890,20 +890,20 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf159382) } saveAndReload(OUString::createFromAscii(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']", + "//config:config-item[@config:name='NoGapAfterNoteNumber']", "true"); uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY_THROW); uno::Reference<beans::XPropertySet> xSettings( xFactory->createInstance("com.sun.star.document.Settings"), uno::UNO_QUERY_THROW); CPPUNIT_ASSERT_EQUAL(uno::Any(true), xSettings->getPropertyValue( - "NoSpaceAfterHangingFootnoteNumbering")); + "NoGapAfterNoteNumber")); pXmlDoc = parseLayoutDump(); sal_Int32 width = getXPath( @@ -914,14 +914,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("com.sun.star.document.Settings"), uno::UNO_QUERY_THROW); CPPUNIT_ASSERT_EQUAL(uno::Any(true), xSettings->getPropertyValue( - "NoSpaceAfterHangingFootnoteNumbering")); + "NoGapAfterNoteNumber")); xmlDocUniquePtr pXmlDoc = parseLayoutDump(); sal_Int32 width @@ -934,14 +934,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("com.sun.star.document.Settings"), uno::UNO_QUERY_THROW); CPPUNIT_ASSERT_EQUAL(uno::Any(true), xSettings->getPropertyValue( - "NoSpaceAfterHangingFootnoteNumbering")); + "NoGapAfterNoteNumber")); xmlDocUniquePtr pXmlDoc = parseLayoutDump(); sal_Int32 width @@ -960,7 +960,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf159382) uno::Reference<beans::XPropertySet> xSettings( xFactory->createInstance("com.sun.star.document.Settings"), uno::UNO_QUERY_THROW); CPPUNIT_ASSERT_EQUAL(uno::Any(false), xSettings->getPropertyValue( - "NoSpaceAfterHangingFootnoteNumbering")); + "NoGapAfterNoteNumber")); } } diff --git a/sw/source/core/doc/DocumentSettingManager.cxx b/sw/source/core/doc/DocumentSettingManager.cxx index f9982ca6dc2c..16e463ab8fec 100644 --- a/sw/source/core/doc/DocumentSettingManager.cxx +++ b/sw/source/core/doc/DocumentSettingManager.cxx @@ -71,7 +71,7 @@ sw::DocumentSettingManager::DocumentSettingManager(SwDoc &rDoc) mEmbedSystemFonts(false), mbOldNumbering(false), mbIgnoreFirstLineIndentInNumbering(false), - mbNoSpaceAfterHangingFootnoteNumbering(false), + mbNoGapAfterNoteNumber(false), mbDoNotResetParaAttrsForNumFont(false), mbTableRowKeep(false), mbIgnoreTabsAndBlanksForLineCalculation(false), @@ -190,7 +190,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; @@ -334,8 +334,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: @@ -693,7 +693,7 @@ void sw::DocumentSettingManager::ReplaceCompatibilityOptions(const DocumentSetti mbFloattableNomargins = rSource.mbFloattableNomargins; mbOldNumbering = rSource.mbOldNumbering; mbIgnoreFirstLineIndentInNumbering = rSource.mbIgnoreFirstLineIndentInNumbering; - mbNoSpaceAfterHangingFootnoteNumbering = rSource.mbNoSpaceAfterHangingFootnoteNumbering; + mbNoGapAfterNoteNumber = rSource.mbNoGapAfterNoteNumber; mbDoNotJustifyLinesWithManualBreak = rSource.mbDoNotJustifyLinesWithManualBreak; mbDoNotResetParaAttrsForNumFont = rSource.mbDoNotResetParaAttrsForNumFont; mbTableRowKeep = rSource.mbTableRowKeep; @@ -881,10 +881,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 9e3852d60d61..ebd9d3dfacb7 100644 --- a/sw/source/core/inc/DocumentSettingManager.hxx +++ b/sw/source/core/inc/DocumentSettingManager.hxx @@ -133,7 +133,7 @@ class DocumentSettingManager final : // non-ui-compatibility flags: bool mbOldNumbering : 1; bool mbIgnoreFirstLineIndentInNumbering : 1; // #i47448# - bool mbNoSpaceAfterHangingFootnoteNumbering : 1; // tdf#159382 + bool mbNoGapAfterNoteNumber : 1; // 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 a811b800e25c..a57e9eac172a 100644 --- a/sw/source/core/text/porfld.cxx +++ b/sw/source/core/text/porfld.cxx @@ -582,7 +582,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 2469e06caa6e..60ded5c609ea 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -1863,7 +1863,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 d4be1b088a54..05072a5c62e9 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, @@ -205,7 +205,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}, - { OUString("NoSpaceAfterHangingFootnoteNumbering"), HANDLE_NO_SPACE_AFTER_HANGING_FOOTNOTE_NUMBER, cppu::UnoType<bool>::get(), 0}, + { OUString("NoGapAfterNoteNumber"), 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}, @@ -699,10 +699,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: @@ -1373,9 +1373,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 12e96bb12c3f..f75e765ba07c 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -137,7 +137,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("NoSpaceAfterHangingFootnoteNumbering", + m_pImpl->SetDocumentSettingsProperty("NoGapAfterNoteNumber", 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 b52ce020df60..6093b29cdda9 100644 --- a/writerfilter/source/filter/WriterFilter.cxx +++ b/writerfilter/source/filter/WriterFilter.cxx @@ -306,7 +306,7 @@ void WriterFilter::setTargetDocument(const uno::Reference<lang::XComponent>& xDo xSettings->setPropertyValue("UseOldNumbering", uno::Any(false)); xSettings->setPropertyValue("IgnoreFirstLineIndentInNumbering", uno::Any(false)); - xSettings->setPropertyValue("NoSpaceAfterHangingFootnoteNumbering", uno::Any(true)); + xSettings->setPropertyValue("NoGapAfterNoteNumber", uno::Any(true)); xSettings->setPropertyValue("DoNotResetParaAttrsForNumFont", uno::Any(false)); xSettings->setPropertyValue("UseFormerLineSpacing", uno::Any(false)); xSettings->setPropertyValue("AddParaSpacingToTableCells", uno::Any(true));