diff options
-rw-r--r-- | include/unotools/compatibility.hxx | 1 | ||||
-rw-r--r-- | officecfg/registry/schema/org/openoffice/Office/Compatibility.xcs | 6 | ||||
-rw-r--r-- | sw/source/core/doc/DocumentSettingManager.cxx | 1 | ||||
-rw-r--r-- | sw/source/ui/config/optcomp.cxx | 19 | ||||
-rw-r--r-- | sw/uiconfig/swriter/ui/optcompatpage.ui | 1 | ||||
-rw-r--r-- | unotools/source/config/compatibility.cxx | 2 |
6 files changed, 27 insertions, 3 deletions
diff --git a/include/unotools/compatibility.hxx b/include/unotools/compatibility.hxx index 9c2acefcf1d7..11f7d0dcfc57 100644 --- a/include/unotools/compatibility.hxx +++ b/include/unotools/compatibility.hxx @@ -62,6 +62,7 @@ class SvtCompatibilityEntry SubtractFlysAnchoredAtFlys, EmptyDbFieldHidesPara, UseVariableWidthNBSP, + NoSpaceAfterHangingFootnoteNumbering, /// special entry: optcomp.cxx converts the other values to /// integers but not this one because it doesn't have its own diff --git a/officecfg/registry/schema/org/openoffice/Office/Compatibility.xcs b/officecfg/registry/schema/org/openoffice/Office/Compatibility.xcs index 0d79fb5340f5..118a4c30108e 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Compatibility.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Compatibility.xcs @@ -134,6 +134,12 @@ </info> <value>false</value> </prop> + <prop oor:name="NoSpaceAfterHangingFootnoteNumbering" oor:type="xs:boolean" oor:nillable="false"> + <info> + <desc>Do not add an extra space after number in footnotes with hanging first line</desc> + </info> + <value>false</value> + </prop> </group> </templates> <component> diff --git a/sw/source/core/doc/DocumentSettingManager.cxx b/sw/source/core/doc/DocumentSettingManager.cxx index 5563b2f80b06..224618cb9cc0 100644 --- a/sw/source/core/doc/DocumentSettingManager.cxx +++ b/sw/source/core/doc/DocumentSettingManager.cxx @@ -138,6 +138,7 @@ sw::DocumentSettingManager::DocumentSettingManager(SwDoc &rDoc) = aOptions.GetDefault(SvtCompatibilityEntry::Index::EmptyDbFieldHidesPara); mbUseVariableWidthNBSP = aOptions.GetDefault(SvtCompatibilityEntry::Index::UseVariableWidthNBSP); + mbNoSpaceAfterHangingFootnoteNumbering = aOptions.GetDefault( SvtCompatibilityEntry::Index::NoSpaceAfterHangingFootnoteNumbering ); } else { diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx index 1393b2864d95..9d1c01190d80 100644 --- a/sw/source/ui/config/optcomp.cxx +++ b/sw/source/ui/config/optcomp.cxx @@ -103,7 +103,8 @@ static sal_uInt32 convertBools2Ulong_Impl bool _bMsWordCompTrailingBlanks, bool bSubtractFlysAnchoredAtFlys, bool bEmptyDbFieldHidesPara, - bool bUseVariableWidthNBSP + bool bUseVariableWidthNBSP, + bool bNoSpaceAfterHangingFootnoteNumbering ) { sal_uInt32 nRet = 0; @@ -156,6 +157,9 @@ static sal_uInt32 convertBools2Ulong_Impl nSetBit = nSetBit << 1; if (bUseVariableWidthNBSP) nRet |= nSetBit; + nSetBit = nSetBit << 1; + if (bNoSpaceAfterHangingFootnoteNumbering) + nRet |= nSetBit; return nRet; } @@ -225,7 +229,9 @@ void SwCompatibilityOptPage::InitControls( const SfxItemSet& rSet ) rEntry.getValue<bool>( SvtCompatibilityEntry::Index::MsWordTrailingBlanks ), rEntry.getValue<bool>( SvtCompatibilityEntry::Index::SubtractFlysAnchoredAtFlys ), rEntry.getValue<bool>( SvtCompatibilityEntry::Index::EmptyDbFieldHidesPara ), - rEntry.getValue<bool>( SvtCompatibilityEntry::Index::UseVariableWidthNBSP ) ); + rEntry.getValue<bool>( SvtCompatibilityEntry::Index::UseVariableWidthNBSP ), + rEntry.getValue<bool>( SvtCompatibilityEntry::Index::NoSpaceAfterHangingFootnoteNumbering ) + ); m_xFormattingLB->append(OUString::number(nOptions), sNewEntry); } } @@ -334,7 +340,9 @@ sal_uInt32 SwCompatibilityOptPage::GetDocumentOptions() const rIDocumentSettingAccess.get( DocumentSettingId::MS_WORD_COMP_TRAILING_BLANKS ), rIDocumentSettingAccess.get( DocumentSettingId::SUBTRACT_FLYS ), rIDocumentSettingAccess.get( DocumentSettingId::EMPTY_DB_FIELD_HIDES_PARA ), - rIDocumentSettingAccess.get( DocumentSettingId::USE_VARIABLE_WIDTH_NBSP ) ); + rIDocumentSettingAccess.get( DocumentSettingId::USE_VARIABLE_WIDTH_NBSP ), + rIDocumentSettingAccess.get(DocumentSettingId::NO_SPACE_AFTER_HANGING_FOOTNOTE_NUMBER) + ); } return nRet; } @@ -453,6 +461,11 @@ bool SwCompatibilityOptPage::FillItemSet( SfxItemSet* ) .set(DocumentSettingId::USE_VARIABLE_WIDTH_NBSP, bChecked); break; + case SvtCompatibilityEntry::Index::NoSpaceAfterHangingFootnoteNumbering: + m_pWrtShell->GetDoc()->getIDocumentSettingAccess().set( + DocumentSettingId::NO_SPACE_AFTER_HANGING_FOOTNOTE_NUMBER, bChecked); + break; + default: break; } diff --git a/sw/uiconfig/swriter/ui/optcompatpage.ui b/sw/uiconfig/swriter/ui/optcompatpage.ui index 0aeb907e6ef3..506840803724 100644 --- a/sw/uiconfig/swriter/ui/optcompatpage.ui +++ b/sw/uiconfig/swriter/ui/optcompatpage.ui @@ -115,6 +115,7 @@ <item translatable="yes" context="optcompatpage|format">Tolerate white lines that may appear in PDF page backgrounds</item> <item translatable="yes" context="optcompatpage|format">Hide paragraphs of database fields (e.g., mail merge) with an empty value</item> <item translatable="yes" context="optcompatpage|format">Render non-breaking spaces (NBSP) as standard-space-width (off for fixed size)</item> + <item translatable="yes" context="optcompatpage|format">Do not add an extra space after number in footnotes with hanging first line</item> <item translatable="yes" context="optcompatpage|format"><User settings></item> </items> </object> diff --git a/unotools/source/config/compatibility.cxx b/unotools/source/config/compatibility.cxx index a5c8aec15845..a1f7054e891a 100644 --- a/unotools/source/config/compatibility.cxx +++ b/unotools/source/config/compatibility.cxx @@ -65,6 +65,7 @@ SvtCompatibilityEntry::SvtCompatibilityEntry() setValue<bool>( Index::EmptyDbFieldHidesPara, true ); setValue<bool>( Index::AddTableLineSpacing, false ); setValue<bool>( Index::UseVariableWidthNBSP, false ); + setValue<bool>(Index::NoSpaceAfterHangingFootnoteNumbering, false); } OUString SvtCompatibilityEntry::getName( const Index rIdx ) @@ -91,6 +92,7 @@ OUString SvtCompatibilityEntry::getName( const Index rIdx ) "SubtractFlysAnchoredAtFlys", "EmptyDbFieldHidesPara", "UseVariableWidthNBSP", + "NoSpaceAfterHangingFootnoteNumbering", "AddTableLineSpacing" // Must be the last one }; |