include/unotools/compatibility.hxx                                |    1 
 officecfg/registry/schema/org/openoffice/Office/Compatibility.xcs |    6 
 sw/inc/IDocumentSettingAccess.hxx                                 |    2 
 sw/qa/extras/odfexport/data/footnote_spacing_hanging_para.doc     |binary
 sw/qa/extras/odfexport/data/footnote_spacing_hanging_para.docx    |binary
 sw/qa/extras/odfexport/data/footnote_spacing_hanging_para.rtf     |  209 
++++++++++
 sw/qa/extras/odfexport/odfexport2.cxx                             |   99 ++++
 sw/source/core/doc/DocumentSettingManager.cxx                     |   12 
 sw/source/core/inc/DocumentSettingManager.hxx                     |    1 
 sw/source/core/text/porfld.cxx                                    |    7 
 sw/source/filter/ww8/ww8par.cxx                                   |    1 
 sw/source/ui/config/optcomp.cxx                                   |   19 
 sw/source/uibase/uno/SwXDocumentSettings.cxx                      |   13 
 sw/uiconfig/swriter/ui/optcompatpage.ui                           |    1 
 unotools/source/config/compatibility.cxx                          |    2 
 writerfilter/source/dmapper/DomainMapper.cxx                      |    2 
 writerfilter/source/filter/WriterFilter.cxx                       |    1 
 17 files changed, 371 insertions(+), 5 deletions(-)

New commits:
commit 830a3894ac98179fb78d6f1fdb409a51faab0c95
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Sat Jan 27 00:51:57 2024 +0600
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Sat Jan 27 05:01:56 2024 +0100

    tdf#159382: add NoSpaceAfterHangingFootnoteNumbering compat option to dialog
    
    Change-Id: Ie1e7d5fb86474bf9145cc7dc3747a28bbf27472f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162635
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

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">&lt;User settings&gt;</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
     };
commit 2e41b639fc4056e4f944bb2272735d9daddfb521
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Fri Jan 26 19:03:05 2024 +0600
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Sat Jan 27 05:01:49 2024 +0100

    tdf#159382: introduce a Word compat flag for hanging footnote number spacing
    
    The new 'NoSpaceAfterHangingFootnoteNumbering' compatibility option is false
    for ODF documents by default. Word file format filters set it to true. Its
    purpose is to avoid extra spacing between the footnote number and its text,
    when the paragraph has hanging first line, as in MS Word.
    
    Change-Id: I42d9353865498137ab99e1d2c031f5b207cbc220
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162603
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/sw/inc/IDocumentSettingAccess.hxx 
b/sw/inc/IDocumentSettingAccess.hxx
index b8088440163d..c58facf04d3d 100644
--- a/sw/inc/IDocumentSettingAccess.hxx
+++ b/sw/inc/IDocumentSettingAccess.hxx
@@ -58,6 +58,8 @@ enum class DocumentSettingId
     DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK,
     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,
 
     DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE,
     TABLE_ROW_KEEP,
diff --git a/sw/qa/extras/odfexport/data/footnote_spacing_hanging_para.doc 
b/sw/qa/extras/odfexport/data/footnote_spacing_hanging_para.doc
new file mode 100644
index 000000000000..b381ba9b6169
Binary files /dev/null and 
b/sw/qa/extras/odfexport/data/footnote_spacing_hanging_para.doc differ
diff --git a/sw/qa/extras/odfexport/data/footnote_spacing_hanging_para.docx 
b/sw/qa/extras/odfexport/data/footnote_spacing_hanging_para.docx
new file mode 100644
index 000000000000..8e3958983bcb
Binary files /dev/null and 
b/sw/qa/extras/odfexport/data/footnote_spacing_hanging_para.docx differ
diff --git a/sw/qa/extras/odfexport/data/footnote_spacing_hanging_para.rtf 
b/sw/qa/extras/odfexport/data/footnote_spacing_hanging_para.rtf
new file mode 100644
index 000000000000..07bbc0eb43f9
--- /dev/null
+++ b/sw/qa/extras/odfexport/data/footnote_spacing_hanging_para.rtf
@@ -0,0 +1,209 @@
+{
tf1deflang1025nsinsicpg1252\uc1deff31507\deff0\stshfdbch31505\stshfloch31506\stshfhich31506\stshfbi31507\deflang1033\deflangfe2052
  hemelang1033    hemelangfe2052  hemelangcs1025{onttbl{0bidi roman
charset204prq2{\*\panose 02020603050405020304}Times New Roman;}
+{13bidi nilcharset134prq2{\*\panose 02010600030101010101}SimSun{\*alt 
\'cb\'ce\'cc\'e5};}{34bidi romancharset204prq2{\*\panose 
02040503050406030204}Cambria Math;}
+{44bidi swisscharset204prq2{\*\panose 020b0604020202020204}Liberation 
Sans;}{45bidi nilcharset134prq2{\*\panose 02010600030101010101}@SimSun;}
+{lomajor31500bidi romancharset204prq2{\*\panose 
02020603050405020304}Times New Roman;}{dbmajor31501bidi moderncharset134
prq1{\*\panose 02010600030101010101}SimHei{\*alt \'ba\'da\'cc\'e5};}
+{himajor31502bidi swisscharset204prq2{\*\panose 
020b0604020202020204}Liberation Sans;}{bimajor31503bidi romancharset204
prq2{\*\panose 02020603050405020304}Times New Roman;}
+{lominor31504bidi romancharset204prq2{\*\panose 
02020603050405020304}Times New Roman;}{dbminor31505bidi nilcharset134
prq2{\*\panose 02010600030101010101}SimSun{\*alt \'cb\'ce\'cc\'e5};}
+{himinor31506bidi swisscharset204prq2{\*\panose 
020b0604020202020204}Liberation Sans;}{biminor31507bidi romancharset204
prq2{\*\panose 02020603050405020304}Times New Roman;}{48bidi romancharset0
prq2 Times New Roman;}
+{46bidi romancharset238prq2 Times New Roman CE;}{49bidi roman
charset161prq2 Times New Roman Greek;}{50bidi romancharset162prq2 Times 
New Roman Tur;}{51bidi romancharset177prq2 Times New Roman (Hebrew);}
+{52bidi romancharset178prq2 Times New Roman (Arabic);}{53bidi roman
charset186prq2 Times New Roman Baltic;}{54bidi romancharset163prq2 Times 
New Roman (Vietnamese);}
+{178bidi nilcharset0prq2 SimSun Western{\*alt \'cb\'ce\'cc\'e5};}{388
bidi romancharset0prq2 Cambria Math;}{386bidi romancharset238prq2 
Cambria Math CE;}{389bidi romancharset161prq2 Cambria Math Greek;}
+{390bidi romancharset162prq2 Cambria Math Tur;}{393bidi roman
charset186prq2 Cambria Math Baltic;}{394bidi romancharset163prq2 Cambria 
Math (Vietnamese);}{488bidi swisscharset0prq2 Liberation Sans;}
+{486bidi swisscharset238prq2 Liberation Sans CE;}{489bidi swiss
charset161prq2 Liberation Sans Greek;}{490bidi swisscharset162prq2 
Liberation Sans Tur;}{491bidi swisscharset177prq2 Liberation Sans 
(Hebrew);}
+{493bidi swisscharset186prq2 Liberation Sans Baltic;}{494bidi swiss
charset163prq2 Liberation Sans (Vietnamese);}{498bidi nilcharset0prq2 
@SimSun Western;}{lomajor31510bidi romancharset0prq2 Times New Roman;}
+{lomajor31508bidi romancharset238prq2 Times New Roman CE;}{lomajor
31511bidi romancharset161prq2 Times New Roman Greek;}{lomajor31512bidi 
romancharset162prq2 Times New Roman Tur;}
+{lomajor31513bidi romancharset177prq2 Times New Roman (Hebrew);}{
lomajor31514bidi romancharset178prq2 Times New Roman (Arabic);}{lomajor
31515bidi romancharset186prq2 Times New Roman Baltic;}
+{lomajor31516bidi romancharset163prq2 Times New Roman (Vietnamese);}{
dbmajor31520bidi moderncharset0prq1 SimHei Western{\*alt 
\'ba\'da\'cc\'e5};}{himajor31530bidi swisscharset0prq2 Liberation Sans;}
+{himajor31528bidi swisscharset238prq2 Liberation Sans CE;}{himajor
31531bidi swisscharset161prq2 Liberation Sans Greek;}{himajor31532bidi 
swisscharset162prq2 Liberation Sans Tur;}
+{himajor31533bidi swisscharset177prq2 Liberation Sans (Hebrew);}{
himajor31535bidi swisscharset186prq2 Liberation Sans Baltic;}{himajor
31536bidi swisscharset163prq2 Liberation Sans (Vietnamese);}
+{bimajor31540bidi romancharset0prq2 Times New Roman;}{bimajor31538
bidi romancharset238prq2 Times New Roman CE;}{bimajor31541bidi roman
charset161prq2 Times New Roman Greek;}
+{bimajor31542bidi romancharset162prq2 Times New Roman Tur;}{bimajor
31543bidi romancharset177prq2 Times New Roman (Hebrew);}{bimajor31544
bidi romancharset178prq2 Times New Roman (Arabic);}
+{bimajor31545bidi romancharset186prq2 Times New Roman Baltic;}{bimajor
31546bidi romancharset163prq2 Times New Roman (Vietnamese);}{lominor31550
bidi romancharset0prq2 Times New Roman;}
+{lominor31548bidi romancharset238prq2 Times New Roman CE;}{lominor
31551bidi romancharset161prq2 Times New Roman Greek;}{lominor31552bidi 
romancharset162prq2 Times New Roman Tur;}
+{lominor31553bidi romancharset177prq2 Times New Roman (Hebrew);}{
lominor31554bidi romancharset178prq2 Times New Roman (Arabic);}{lominor
31555bidi romancharset186prq2 Times New Roman Baltic;}
+{lominor31556bidi romancharset163prq2 Times New Roman (Vietnamese);}{
dbminor31560bidi nilcharset0prq2 SimSun Western{\*alt 
\'cb\'ce\'cc\'e5};}{himinor31570bidi swisscharset0prq2 Liberation Sans;}
+{himinor31568bidi swisscharset238prq2 Liberation Sans CE;}{himinor
31571bidi swisscharset161prq2 Liberation Sans Greek;}{himinor31572bidi 
swisscharset162prq2 Liberation Sans Tur;}
+{himinor31573bidi swisscharset177prq2 Liberation Sans (Hebrew);}{
himinor31575bidi swisscharset186prq2 Liberation Sans Baltic;}{himinor
31576bidi swisscharset163prq2 Liberation Sans (Vietnamese);}
+{biminor31580bidi romancharset0prq2 Times New Roman;}{biminor31578
bidi romancharset238prq2 Times New Roman CE;}{biminor31581bidi roman
charset161prq2 Times New Roman Greek;}
+{biminor31582bidi romancharset162prq2 Times New Roman Tur;}{biminor
31583bidi romancharset177prq2 Times New Roman (Hebrew);}{biminor31584
bidi romancharset178prq2 Times New Roman (Arabic);}
+{biminor31585bidi romancharset186prq2 Times New Roman Baltic;}{biminor
31586bidi romancharset163prq2 Times New Roman (Vietnamese);}}{+
ed255\green0lue255;
ed255\green0lue0;
ed255\green255lue0;
ed255\green255lue255;
ed0\green0lue128;
ed0\green128lue128;
ed0\green128lue0;
ed128\green0lue128;
ed128\green0lue0;
ed128\green128lue0;
ed128\green128lue128;
+
ed192\green192lue192;
ed0\green0lue0;
ed0\green0lue0;}{\*\defchp s22\kerning2\lochf31506\hichf31506\dbchf31505 
}{\*\defpap \ql \li0
i0\sa160\sl259\slmult1\widctlpar\wrapdefaultspalphaspnumaautodjustright
in0\lin0\itap0 }
+
oqfpromote {\stylesheet{\ql \li0
i0\sa160\sl259\slmult1\widctlpar\wrapdefaultspalphaspnumaautodjustright
in0\lin0\itap0 
tlchcs1 f31507fs22lang1025 \ltrchcs0 
+s22\lang1033\langfe2052\kerning2\loch31506\hichf31506\dbchf31505+  s11     
srowd   rftsWidthB3     rpaddl108       rpaddr108       rpaddfl3        
rpaddft3        rpaddfb3        rpaddfr3        rcbpat1 rcfpat1 blind0  
blindtype3      svertalt        sbrdrt  sbrdrl  sbrdrb  sbrdrr  sbrdrdgl        
sbrdrdgr        sbrdrh  sbrdrv \ql \li0
i0\sa160\sl259\slmult1
+\widctlpar\wrapdefaultspalphaspnumaautodjustright
in0\lin0\itap0 
tlchcs1 f31507fs22lang1025 \ltrchcs0 
s22\lang1033\langfe2052\kerning2\loch31506\hichf31506\dbchf31505+\snext11 
\ssemihidden \sunhideused Normal Table;}{\s15\ql i-720\li720
i0\widctlpar\wrapdefaultspalphaspnumaautodjustright
in0\lin720\itap0 
tlchcs1 f31507fs20lang1025 \ltrchcs0 
+s20\lang1033\langfe2052\kerning2\loch
31506\hichf31506\dbchf31505+\sbasedon10 \slink15 \styrsid1062006 Footnote 
Text Char;}{\*+
sid7931512
sid8473573
sid16463040}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim1}{\info{uthor
 Mike Kaganski}{\operator Mike Kaganski}
+{+\paperw12240\paperh15840\margl1701\margr850\margt1134\margb1134\gutter0\ltrsect
 
+\widowctrltnbjenddoc rackmoves0      rackformatting1\donotembedsysfont1
elyonvml0\donotembedlingdata0\grfdocevents0
alidatexml1\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors1
oxlattoyen
+xpshrtn
oultrlspc\dntblnsbdb
ospaceforul
ormshade\horzdoc\dgmargin\dghspace180\dgvspace180\dghorigin1701\dgvorigin1134\dghshow1\dgvshow1
+\jexpandiewkind1iewscale100\pgbrdrhead\pgbrdrfoot\splytwnine
tnlytwnine\htmautsp
olnhtadjtbl\useltbalnlntblind\lytcalctblwd\lyttblrtgr\lnbrkrule
obrkwrptbl\snaptogridincellllowfieldendsel\wrppunct
+sianbrkrule
sidroot1062006
ewtblstyruls
ogrowautofit\usenormstyforlist
oindnmbrtselnbrelev
ocxsptable\indrlsweleven
oafcnsttblfelev\utinl\hwelev\spltpgpar
otcvasp
otbrkcnstfrctbl
otvatxbx\krnprsnet+{\*\wgrffmtfilter 2450}
ofeaturethrottle1\ilfomacatclnup0{\*tnsep \ltrpar \pard\plain \ltrpar\ql \li0
i0\widctlpar\wrapdefaultspalphaspnumaautodjustright
in0\lin0\itap0\pararsid1062006 
tlchcs1 f31507fs22lang1025 \ltrchcs0 
+s22\lang1033\langfe2052\kerning2\lochf31506\hichf31506\dbchf31505+\par 
}}{\*tnsepc \ltrpar \pard\plain \ltrpar\ql \li0
i0\widctlpar\wrapdefaultspalphaspnumaautodjustright
in0\lin0\itap0\pararsid1062006 
tlchcs1 f31507fs22lang1025 \ltrchcs0 
+s22\lang1033\langfe2052\kerning2\lochf31506\hichf31506\dbchf31505+\par 
}}{\*ftnsep \ltrpar \pard\plain \ltrpar\ql \li0
i0\widctlpar\wrapdefaultspalphaspnumaautodjustright
in0\lin0\itap0\pararsid1062006 
tlchcs1 f31507fs22lang1025 \ltrchcs0 
+s22\lang1033\langfe2052\kerning2\lochf31506\hichf31506\dbchf31505+\par 
}}{\*ftnsepc \ltrpar \pard\plain \ltrpar\ql \li0
i0\widctlpar\wrapdefaultspalphaspnumaautodjustright
in0\lin0\itap0\pararsid1062006 
tlchcs1 f31507fs22lang1025 \ltrchcs0 
+s22\lang1033\langfe2052\kerning2\lochf31506\hichf31506\dbchf31505+\par 
}}\ltrpar \sectd \ltrsect\linex0ndnhere\sectlinegrid360\sectdefaultcl\sftnbj 
{\*\pnseclvl1\pnucrm\pnqc\pnstart1\pnindent720\pnhang {\pntxta 
.}}{\*\pnseclvl2\pnucltr\pnqc\pnstart1\pnindent720\pnhang {\pntxta 
.}}{\*\pnseclvl3
+\pndec\pnqc\pnstart1\pnindent720\pnhang {\pntxta 
.}}{\*\pnseclvl4\pnlcltr\pnqc\pnstart1\pnindent720\pnhang {\pntxta 
)}}{\*\pnseclvl5\pndec\pnqc\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta 
)}}{\*\pnseclvl6\pnlcltr\pnqc\pnstart1\pnindent720\pnhang 
+{\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnqc\pnstart1\pnindent720\pnhang 
{\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnqc\pnstart1\pnindent720\pnhang 
{\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnqc\pnstart1\pnindent720\pnhang 
{\pntxtb (}{\pntxta )}}
+\pard\plain \ltrpar\ql \li0
i0\sa160\sl259\slmult1\widctlpar\wrapdefaultspalphaspnumaautodjustright
in0\lin0\itap0 
tlchcs1 f31507fs22lang1025 \ltrchcs0 
+s22\lang1033\langfe2052\kerning2\lochf31506\hichf31506\dbchf31505++
s20\lang1033\langfe2052\kerning2\lochf31506\hichf31506\dbchf31505+\hichf31506\dbchf31505\loch
31506  Footnote for lorem ipsum, some lengthy text to create two lines here 
and demonstrate the numbering portion spacing behavior with the hanging 
paragraph settings.}}}{
tlchcs1 f31507 \ltrchcs0 \insrsid920926 
+
+\par }{\*      hemedata 
504b030414000600080000002100e9de0fbfff0000001c020000130000005b436f6e74656e745f54797065735d2e786d6cac91cb4ec3301045f748fc83e52d4a
+9cb2400825e982c78ec7a27cc0c8992416c9d8b2a755fbf74cd25442a820166c2cd933f79e3be372bd1f07b5c3989ca74aaff2422b24eb1b475da5df374fd9ad
+5689811a183c61a50f98f4babebc2837878049899a52a57be670674cb23d8e90721f90a4d2fa3802cb35762680fd800ecd7551dc18eb899138e3c943d7e503b6
+b01d583deee5f99824e290b4ba3f364eac4a430883b3c092d4eca8f946c916422ecab927f52ea42b89a1cd59c254f919b0e85e6535d135a8de20f20b8c12c3b0
+0c895fcf6720192de6bf3b9e89ecdbd6596cbcdd8eb28e7c365ecc4ec1ff1460f53fe813d3cc7f5b7f020000ffff0300504b030414000600080000002100a5d6
+a7e7c0000000360100000b0000005f72656c732f2e72656c73848fcf6ac3300c87ef85bd83d17d51d2c31825762fa590432fa37d00e1287f68221bdb1bebdb4f
+c7060abb0884a4eff7a93dfeae8bf9e194e720169aaa06c3e2433fcb68e1763dbf7f82c985a4a725085b787086a37bdbb55fbc50d1a33ccd311ba548b6309512
+0f88d94fbc52ae4264d1c910d24a45db3462247fa791715fd71f989e19e0364cd3f51652d73760ae8fa8c9ffb3c330cc9e4fc17faf2ce545046e37944c69e462
+a1a82fe353bd90a865aad41ed0b5b8f9d6fd010000ffff0300504b0304140006000800000021006b799616830000008a0000001c0000007468656d652f746865
+6d652f7468656d654d616e616765722e786d6c0ccc4d0ac3201040e17da17790d93763bb284562b2cbaebbf600439c1a41c7a0d29fdbd7e5e38337cedf14d59b
+4b0d592c9c070d8a65cd2e88b7f07c2ca71ba8da481cc52c6ce1c715e6e97818c9b48d13df49c873517d23d59085adb5dd20d6b52bd521ef2cdd5eb9246a3d8b
+4757e8d3f729e245eb2b260a0238fd010000ffff0300504b030414000600080000002100978e38d49b040000c90f0000160000007468656d652f7468656d652f
+7468656d65312e786d6ccc57db6edb38107d5f60ff81d0bb62dd6505710a59b2b00f5d2cb0cea2cf8c2e961a4a32443a8951e4df77484a32e54b9b182dd0e445
+1a9f191ece0ccf50779f5e6b829ef38e566db3d0cc1b43437993b659d56c16da7f0f893ed71065b8c930699b7ca1ed73aa7dbafff38f3b7ccbcabcce11f837f4
+162fb492b1eded6c465330637ad36ef3067e2bdaaec60c5ebbcd2cebf00bc4adc9cc320c6f56e3aad150836b08fb4f5154698e1e7848ed7e08be22f0da30ca0d
+29e9d63c743ef110d8ecc9e408baa711e9d033260b0dd6c9da9787fc95698860cae0878566883f6d767f37c3b7bd1361177c15bf44fcf57ebd43f6648935bbcd
+e3b8a8e3b88e178ef10580b053dcca5f792b6f8c2700384d61a792cb34a66f454e8f5540f2f14cecd88f6d738257e2db279c4397ff4ff00224e33b27f8248920
+8b13bc0049bc7b827797c1329ec6172089f74ef0be11c68e3f892f4025a99aa713b4e17a7634ec7684142df9eb2c3c709dc4b7fae0071474c3d85d7c89a26dd8
+a55eabf1d7b64b00c08104b3aa416cbfcd0b9c42177fae1ef30e6c6d83d6b8a17c217c9b6305214d293d32018349e0ba6a7ed12a87c0b0e661a362dbf5c55d17
+15216bb627f9672a364e5b52650918b99f38f1f9780ab6253cf6399ee0361d163ea86bd9978a95eb126f2169a6c6836c681f7a43d1b6a5705885f96c6c8e27bb
+faef369387dd34f9c196a9a5981dec863bdaa1504ca23dffd0c0637821091b21340301eefb1112ca625312f61912fe60842a7c8f84d8d94f61119c6131e7e187
+52097185d28da9006a6355e03821cc4782eb800b38219a629267bc4e524f87ea8a62fecc4a5f4ae6a4030c98287d071c2a1d70ae17b7c777275bed1d959e9050
+da6d4a4264461c7a5ae22cefbb935bdf43e3a3b50e0e259dd0e3a9e873a1d0f0e7df63716dadb9881c69036954a5200d7a59689eed42cba478bbd00a104d78ac
+b7d03bb4d96808930ddc3c52d6c9037f8db26c3bca624c4b9970213a520dea8ae51d2255bdd0f8f6c73290466888e0665a2008bf2db90064e5772307459f1639
+2f8a3c656ad9150bcfb47c0585975a71f657e17e3d987bb63b28f7bacc5ed023d975ff626831d7377902b38a321835329b590597c151c80efd7734987ad9556f
+63a287a41d936d89fb89a28ab9840b111de988b73107ca5bbf6748a892927e103e6ef88055933a99a6e3d4901c2e4edd1f3bf1cc29a27998991355e153f3bc8a
+4d5618c6c0512eaf1bf20aab21c5302ed5092fa5fb58728341eb8eee09e39480848ff91be7dd87068242edb0d8841a677c2ac35cb37beb74760c1bfc01b5f70c
+0945f5bd21ec51dec619717639305e35f9c1efb86bc1540cf74a9169f1d5a87ed8b58f5f413c62b842ef08a3a294f0d9d661b88aacc59d44ca061c9157d61f0d
+7842bbae5a68df0c377422cb8d7463eeae74c7760c7dee86b61ebaae6dae5cd38897d61b0c1656d6a62bbf58135c5764df7fb70afbc9b76b5da55d4bdb82dda4
+6d3d6bc5b7e94c1017dfaea675f9db1555203adf3c2b09ec60e9e9811d26ba132fe77a10794b3df6223f4ee2c89d07c99b869e05d809edc8f15673dd33a34877
+3c83d39f07baef5856e8f8e17ce5846ffd3506762ee5a3cf05a457f0baff1f0000ffff0300504b0304140006000800000021000dd1909fb60000001b01000027
+0000007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73848f4d0ac2301484f78277086f6fd3ba109126dd88d0
+add40384e4350d363f2451eced0dae2c082e8761be9969bb979dc9136332de3168aa1a083ae995719ac16db8ec8e4052164e89d93b64b060828e6f37ed156791
+4b284d262452282e3198720e274a939cd08a54f980ae38a38f56e422a3a641c8bbd048f7757da0f19b017cc524bd62107bd5001996509affb3fd381a89672f1f
+165dfe514173d9850528a2c6cce0239baa4c04ca5bbabac4df000000ffff0300504b01022d0014000600080000002100e9de0fbfff0000001c02000013000000
+00000000000000000000000000005b436f6e74656e745f54797065735d2e786d6c504b01022d0014000600080000002100a5d6a7e7c0000000360100000b0000
+0000000000000000000000300100005f72656c732f2e72656c73504b01022d00140006000800000021006b799616830000008a0000001c000000000000000000
+00000000190200007468656d652f7468656d652f7468656d654d616e616765722e786d6c504b01022d0014000600080000002100978e38d49b040000c90f0000
+1600000000000000000000000000d60200007468656d652f7468656d652f7468656d65312e786d6c504b01022d00140006000800000021000dd1909fb6000000
+1b0100002700000000000000000000000000a50700007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73504b050600000000050005005d010000a00800000000}
+{\*+617020786d6c6e733a613d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f64726177696e676d6c2f323030362f6d6169
+6e22206267313d226c743122207478313d22646b3122206267323d226c743222207478323d22646b322220616363656e74313d22616363656e74312220616363
+656e74323d22616363656e74322220616363656e74333d22616363656e74332220616363656e74343d22616363656e74342220616363656e74353d22616363656e74352220616363656e74363d22616363656e74362220686c696e6b3d22686c696e6b2220666f6c486c696e6b3d22666f6c486c696e6b222f3e}
+{\*\latentstyles\lsdstimax376\lsdlockeddef0\lsdsemihiddendef0\lsdunhideuseddef0\lsdqformatdef0\lsdprioritydef99{\lsdlockedexcept
 \lsdqformat1 \lsdpriority0 \lsdlocked0 Normal;\lsdqformat1 \lsdpriority9 
\lsdlocked0 heading 1;
+\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 
2;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 
heading 3;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 
\lsdlocked0 heading 4;
+\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 
5;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 
heading 6;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 
\lsdlocked0 heading 7;
+\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 
8;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 
heading 9;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 1;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 2;\lsdsemihidden1 
\lsdunhideused1 \lsdlocked0 index 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 
index 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 5;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 6;\lsdsemihidden1 
\lsdunhideused1 \lsdlocked0 index 7;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 
index 8;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 9;
+\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 
1;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 
2;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 3;
+\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 
4;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 
5;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 6;
+\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 
7;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 
8;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 
9;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Normal Indent;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 footnote text;\lsdsemihidden1 
\lsdunhideused1 \lsdlocked0 annotation text;\lsdsemihidden1 \lsdunhideused1 
\lsdlocked0 header;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 footer;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index heading;\lsdsemihidden1 
\lsdunhideused1 \lsdqformat1 \lsdpriority35 \lsdlocked0 caption;\lsdsemihidden1 
\lsdunhideused1 \lsdlocked0 table of figures;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 envelope address;\lsdsemihidden1 
\lsdunhideused1 \lsdlocked0 envelope return;\lsdsemihidden1 \lsdunhideused1 
\lsdlocked0 footnote reference;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 
annotation reference;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 line number;\lsdsemihidden1 
\lsdunhideused1 \lsdlocked0 page number;\lsdsemihidden1 \lsdunhideused1 
\lsdlocked0 endnote reference;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 
endnote text;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 table of 
authorities;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 macro;\lsdsemihidden1 
\lsdunhideused1 \lsdlocked0 toa heading;\lsdsemihidden1 \lsdunhideused1 
\lsdlocked0 List;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet;\lsdsemihidden1 
\lsdunhideused1 \lsdlocked0 List Number;\lsdsemihidden1 \lsdunhideused1 
\lsdlocked0 List 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 3;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 4;\lsdsemihidden1 
\lsdunhideused1 \lsdlocked0 List 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 
List Bullet 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 3;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 4;\lsdsemihidden1 
\lsdunhideused1 \lsdlocked0 List Bullet 5;\lsdsemihidden1 \lsdunhideused1 
\lsdlocked0 List Number 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 
Number 3;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 4;\lsdsemihidden1 
\lsdunhideused1 \lsdlocked0 List Number 5;\lsdqformat1 \lsdpriority10 
\lsdlocked0 Title;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Closing;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Signature;\lsdsemihidden1 
\lsdunhideused1 \lsdpriority1 \lsdlocked0 Default Paragraph 
Font;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text;\lsdsemihidden1 
\lsdunhideused1 \lsdlocked0 Body Text Indent;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue;\lsdsemihidden1 
\lsdunhideused1 \lsdlocked0 List Continue 2;\lsdsemihidden1 \lsdunhideused1 
\lsdlocked0 List Continue 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 
Continue 4;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 5;\lsdsemihidden1 
\lsdunhideused1 \lsdlocked0 Message Header;\lsdqformat1 \lsdpriority11 
\lsdlocked0 Subtitle;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Salutation;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Date;\lsdsemihidden1 
\lsdunhideused1 \lsdlocked0 Body Text First Indent;\lsdsemihidden1 
\lsdunhideused1 \lsdlocked0 Body Text First Indent 2;\lsdsemihidden1 
\lsdunhideused1 \lsdlocked0 Note Heading;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text 2;\lsdsemihidden1 
\lsdunhideused1 \lsdlocked0 Body Text 3;\lsdsemihidden1 \lsdunhideused1 
\lsdlocked0 Body Text Indent 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body 
Text Indent 3;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Block Text;\lsdsemihidden1 
\lsdunhideused1 \lsdlocked0 Hyperlink;\lsdsemihidden1 \lsdunhideused1 
\lsdlocked0 FollowedHyperlink;\lsdqformat1 \lsdpriority22 \lsdlocked0 Strong;
+\lsdqformat1 \lsdpriority20 \lsdlocked0 Emphasis;\lsdsemihidden1 
\lsdunhideused1 \lsdlocked0 Document Map;\lsdsemihidden1 \lsdunhideused1 
\lsdlocked0 Plain Text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 E-mail 
Signature;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Top of Form;\lsdsemihidden1 
\lsdunhideused1 \lsdlocked0 HTML Bottom of Form;\lsdsemihidden1 \lsdunhideused1 
\lsdlocked0 Normal (Web);\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML 
Acronym;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Address;\lsdsemihidden1 
\lsdunhideused1 \lsdlocked0 HTML Cite;\lsdsemihidden1 \lsdunhideused1 
\lsdlocked0 HTML Code;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML 
Definition;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Keyboard;\lsdsemihidden1 
\lsdunhideused1 \lsdlocked0 HTML Preformatted;\lsdsemihidden1 \lsdunhideused1 
\lsdlocked0 HTML Sample;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML 
Typewriter;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Variable;\lsdsemihidden1 
\lsdunhideused1 \lsdlocked0 Normal Table;\lsdsemihidden1 \lsdunhideused1 
\lsdlocked0 annotation subject;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 No 
List;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Outline List 1;\lsdsemihidden1 
\lsdunhideused1 \lsdlocked0 Outline List 2;\lsdsemihidden1 \lsdunhideused1 
\lsdlocked0 Outline List 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table 
Simple 1;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Simple 2;\lsdsemihidden1 
\lsdunhideused1 \lsdlocked0 Table Simple 3;\lsdsemihidden1 \lsdunhideused1 
\lsdlocked0 Table Classic 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table 
Classic 2;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Classic 3;\lsdsemihidden1 
\lsdunhideused1 \lsdlocked0 Table Classic 4;\lsdsemihidden1 \lsdunhideused1 
\lsdlocked0 Table Colorful 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table 
Colorful 2;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Colorful 3;\lsdsemihidden1 
\lsdunhideused1 \lsdlocked0 Table Columns 1;\lsdsemihidden1 \lsdunhideused1 
\lsdlocked0 Table Columns 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table 
Columns 3;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Columns 4;\lsdsemihidden1 
\lsdunhideused1 \lsdlocked0 Table Columns 5;\lsdsemihidden1 \lsdunhideused1 
\lsdlocked0 Table Grid 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 
2;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 3;\lsdsemihidden1 
\lsdunhideused1 \lsdlocked0 Table Grid 4;\lsdsemihidden1 \lsdunhideused1 
\lsdlocked0 Table Grid 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 
6;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 7;\lsdsemihidden1 
\lsdunhideused1 \lsdlocked0 Table Grid 8;\lsdsemihidden1 \lsdunhideused1 
\lsdlocked0 Table List 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 
2;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 3;\lsdsemihidden1 
\lsdunhideused1 \lsdlocked0 Table List 4;\lsdsemihidden1 \lsdunhideused1 
\lsdlocked0 Table List 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 
6;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 7;\lsdsemihidden1 
\lsdunhideused1 \lsdlocked0 Table List 8;\lsdsemihidden1 \lsdunhideused1 
\lsdlocked0 Table 3D effects 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 
Table 3D effects 2;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table 3D effects 3;\lsdsemihidden1 
\lsdunhideused1 \lsdlocked0 Table Contemporary;\lsdsemihidden1 \lsdunhideused1 
\lsdlocked0 Table Elegant;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table 
Professional;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Subtle 1;\lsdsemihidden1 
\lsdunhideused1 \lsdlocked0 Table Subtle 2;\lsdsemihidden1 \lsdunhideused1 
\lsdlocked0 Table Web 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Web 2;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Web 3;\lsdsemihidden1 
\lsdunhideused1 \lsdlocked0 Balloon Text;\lsdpriority39 \lsdlocked0 Table 
Grid;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Theme;\lsdsemihidden1 
\lsdlocked0 Placeholder Text;
+\lsdqformat1 \lsdpriority1 \lsdlocked0 No Spacing;\lsdpriority60 \lsdlocked0 
Light Shading;\lsdpriority61 \lsdlocked0 Light List;\lsdpriority62 \lsdlocked0 
Light Grid;\lsdpriority63 \lsdlocked0 Medium Shading 1;\lsdpriority64 
\lsdlocked0 Medium Shading 2;
+\lsdpriority65 \lsdlocked0 Medium List 1;\lsdpriority66 \lsdlocked0 Medium 
List 2;\lsdpriority67 \lsdlocked0 Medium Grid 1;\lsdpriority68 \lsdlocked0 
Medium Grid 2;\lsdpriority69 \lsdlocked0 Medium Grid 3;\lsdpriority70 
\lsdlocked0 Dark List;
+\lsdpriority71 \lsdlocked0 Colorful Shading;\lsdpriority72 \lsdlocked0 
Colorful List;\lsdpriority73 \lsdlocked0 Colorful Grid;\lsdpriority60 
\lsdlocked0 Light Shading Accent 1;\lsdpriority61 \lsdlocked0 Light List Accent 
1;
+\lsdpriority62 \lsdlocked0 Light Grid Accent 1;\lsdpriority63 \lsdlocked0 
Medium Shading 1 Accent 1;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 
1;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 1;\lsdsemihidden1 \lsdlocked0 
Revision;
+\lsdqformat1 \lsdpriority34 \lsdlocked0 List Paragraph;\lsdqformat1 
\lsdpriority29 \lsdlocked0 Quote;\lsdqformat1 \lsdpriority30 \lsdlocked0 
Intense Quote;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 1;\lsdpriority67 
\lsdlocked0 Medium Grid 1 Accent 1;
+\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 1;\lsdpriority69 \lsdlocked0 
Medium Grid 3 Accent 1;\lsdpriority70 \lsdlocked0 Dark List Accent 
1;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 1;\lsdpriority72 
\lsdlocked0 Colorful List Accent 1;
+\lsdpriority73 \lsdlocked0 Colorful Grid Accent 1;\lsdpriority60 \lsdlocked0 
Light Shading Accent 2;\lsdpriority61 \lsdlocked0 Light List Accent 
2;\lsdpriority62 \lsdlocked0 Light Grid Accent 2;\lsdpriority63 \lsdlocked0 
Medium Shading 1 Accent 2;
+\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 2;\lsdpriority65 
\lsdlocked0 Medium List 1 Accent 2;\lsdpriority66 \lsdlocked0 Medium List 2 
Accent 2;\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 2;\lsdpriority68 
\lsdlocked0 Medium Grid 2 Accent 2;
+\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 2;\lsdpriority70 \lsdlocked0 
Dark List Accent 2;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 
2;\lsdpriority72 \lsdlocked0 Colorful List Accent 2;\lsdpriority73 \lsdlocked0 
Colorful Grid Accent 2;
+\lsdpriority60 \lsdlocked0 Light Shading Accent 3;\lsdpriority61 \lsdlocked0 
Light List Accent 3;\lsdpriority62 \lsdlocked0 Light Grid Accent 
3;\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 3;\lsdpriority64 
\lsdlocked0 Medium Shading 2 Accent 3;
+\lsdpriority65 \lsdlocked0 Medium List 1 Accent 3;\lsdpriority66 \lsdlocked0 
Medium List 2 Accent 3;\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 
3;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 3;\lsdpriority69 \lsdlocked0 
Medium Grid 3 Accent 3;
+\lsdpriority70 \lsdlocked0 Dark List Accent 3;\lsdpriority71 \lsdlocked0 
Colorful Shading Accent 3;\lsdpriority72 \lsdlocked0 Colorful List Accent 
3;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 3;\lsdpriority60 \lsdlocked0 
Light Shading Accent 4;
+\lsdpriority61 \lsdlocked0 Light List Accent 4;\lsdpriority62 \lsdlocked0 
Light Grid Accent 4;\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 
4;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 4;\lsdpriority65 
\lsdlocked0 Medium List 1 Accent 4;
+\lsdpriority66 \lsdlocked0 Medium List 2 Accent 4;\lsdpriority67 \lsdlocked0 
Medium Grid 1 Accent 4;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 
4;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 4;\lsdpriority70 \lsdlocked0 
Dark List Accent 4;
+\lsdpriority71 \lsdlocked0 Colorful Shading Accent 4;\lsdpriority72 
\lsdlocked0 Colorful List Accent 4;\lsdpriority73 \lsdlocked0 Colorful Grid 
Accent 4;\lsdpriority60 \lsdlocked0 Light Shading Accent 5;\lsdpriority61 
\lsdlocked0 Light List Accent 5;
+\lsdpriority62 \lsdlocked0 Light Grid Accent 5;\lsdpriority63 \lsdlocked0 
Medium Shading 1 Accent 5;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 
5;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 5;\lsdpriority66 \lsdlocked0 
Medium List 2 Accent 5;
+\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 5;\lsdpriority68 \lsdlocked0 
Medium Grid 2 Accent 5;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 
5;\lsdpriority70 \lsdlocked0 Dark List Accent 5;\lsdpriority71 \lsdlocked0 
Colorful Shading Accent 5;
+\lsdpriority72 \lsdlocked0 Colorful List Accent 5;\lsdpriority73 \lsdlocked0 
Colorful Grid Accent 5;\lsdpriority60 \lsdlocked0 Light Shading Accent 
6;\lsdpriority61 \lsdlocked0 Light List Accent 6;\lsdpriority62 \lsdlocked0 
Light Grid Accent 6;
+\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 6;\lsdpriority64 
\lsdlocked0 Medium Shading 2 Accent 6;\lsdpriority65 \lsdlocked0 Medium List 1 
Accent 6;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 6;
+\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 6;\lsdpriority68 \lsdlocked0 
Medium Grid 2 Accent 6;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 
6;\lsdpriority70 \lsdlocked0 Dark List Accent 6;\lsdpriority71 \lsdlocked0 
Colorful Shading Accent 6;
+\lsdpriority72 \lsdlocked0 Colorful List Accent 6;\lsdpriority73 \lsdlocked0 
Colorful Grid Accent 6;\lsdqformat1 \lsdpriority19 \lsdlocked0 Subtle 
Emphasis;\lsdqformat1 \lsdpriority21 \lsdlocked0 Intense Emphasis;
+\lsdqformat1 \lsdpriority31 \lsdlocked0 Subtle Reference;\lsdqformat1 
\lsdpriority32 \lsdlocked0 Intense Reference;\lsdqformat1 \lsdpriority33 
\lsdlocked0 Book Title;\lsdsemihidden1 \lsdunhideused1 \lsdpriority37 
\lsdlocked0 Bibliography;
+\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority39 \lsdlocked0 TOC 
Heading;\lsdpriority41 \lsdlocked0 Plain Table 1;\lsdpriority42 \lsdlocked0 
Plain Table 2;\lsdpriority43 \lsdlocked0 Plain Table 3;\lsdpriority44 
\lsdlocked0 Plain Table 4;
+\lsdpriority45 \lsdlocked0 Plain Table 5;\lsdpriority40 \lsdlocked0 Grid Table 
Light;\lsdpriority46 \lsdlocked0 Grid Table 1 Light;\lsdpriority47 \lsdlocked0 
Grid Table 2;\lsdpriority48 \lsdlocked0 Grid Table 3;\lsdpriority49 \lsdlocked0 
Grid Table 4;
+\lsdpriority50 \lsdlocked0 Grid Table 5 Dark;\lsdpriority51 \lsdlocked0 Grid 
Table 6 Colorful;\lsdpriority52 \lsdlocked0 Grid Table 7 
Colorful;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 1;\lsdpriority47 
\lsdlocked0 Grid Table 2 Accent 1;
+\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 1;\lsdpriority49 \lsdlocked0 
Grid Table 4 Accent 1;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 
1;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 1;
+\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 1;\lsdpriority46 
\lsdlocked0 Grid Table 1 Light Accent 2;\lsdpriority47 \lsdlocked0 Grid Table 2 
Accent 2;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 2;
+\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 2;\lsdpriority50 \lsdlocked0 
Grid Table 5 Dark Accent 2;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful 
Accent 2;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 2;
+\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 3;\lsdpriority47 
\lsdlocked0 Grid Table 2 Accent 3;\lsdpriority48 \lsdlocked0 Grid Table 3 
Accent 3;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 3;
+\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 3;\lsdpriority51 
\lsdlocked0 Grid Table 6 Colorful Accent 3;\lsdpriority52 \lsdlocked0 Grid 
Table 7 Colorful Accent 3;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 
4;
+\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 4;\lsdpriority48 \lsdlocked0 
Grid Table 3 Accent 4;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 
4;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 4;
+\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 4;\lsdpriority52 
\lsdlocked0 Grid Table 7 Colorful Accent 4;\lsdpriority46 \lsdlocked0 Grid 
Table 1 Light Accent 5;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 5;
+\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 5;\lsdpriority49 \lsdlocked0 
Grid Table 4 Accent 5;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 
5;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 5;
+\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 5;\lsdpriority46 
\lsdlocked0 Grid Table 1 Light Accent 6;\lsdpriority47 \lsdlocked0 Grid Table 2 
Accent 6;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 6;
+\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 6;\lsdpriority50 \lsdlocked0 
Grid Table 5 Dark Accent 6;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful 
Accent 6;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 6;
+\lsdpriority46 \lsdlocked0 List Table 1 Light;\lsdpriority47 \lsdlocked0 List 
Table 2;\lsdpriority48 \lsdlocked0 List Table 3;\lsdpriority49 \lsdlocked0 List 
Table 4;\lsdpriority50 \lsdlocked0 List Table 5 Dark;
+\lsdpriority51 \lsdlocked0 List Table 6 Colorful;\lsdpriority52 \lsdlocked0 
List Table 7 Colorful;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 
1;\lsdpriority47 \lsdlocked0 List Table 2 Accent 1;\lsdpriority48 \lsdlocked0 
List Table 3 Accent 1;
+\lsdpriority49 \lsdlocked0 List Table 4 Accent 1;\lsdpriority50 \lsdlocked0 
List Table 5 Dark Accent 1;\lsdpriority51 \lsdlocked0 List Table 6 Colorful 
Accent 1;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 1;
+\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 2;\lsdpriority47 
\lsdlocked0 List Table 2 Accent 2;\lsdpriority48 \lsdlocked0 List Table 3 
Accent 2;\lsdpriority49 \lsdlocked0 List Table 4 Accent 2;
+\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 2;\lsdpriority51 
\lsdlocked0 List Table 6 Colorful Accent 2;\lsdpriority52 \lsdlocked0 List 
Table 7 Colorful Accent 2;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 
3;
+\lsdpriority47 \lsdlocked0 List Table 2 Accent 3;\lsdpriority48 \lsdlocked0 
List Table 3 Accent 3;\lsdpriority49 \lsdlocked0 List Table 4 Accent 
3;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 3;
+\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 3;\lsdpriority52 
\lsdlocked0 List Table 7 Colorful Accent 3;\lsdpriority46 \lsdlocked0 List 
Table 1 Light Accent 4;\lsdpriority47 \lsdlocked0 List Table 2 Accent 4;
+\lsdpriority48 \lsdlocked0 List Table 3 Accent 4;\lsdpriority49 \lsdlocked0 
List Table 4 Accent 4;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 
4;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 4;
+\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 4;\lsdpriority46 
\lsdlocked0 List Table 1 Light Accent 5;\lsdpriority47 \lsdlocked0 List Table 2 
Accent 5;\lsdpriority48 \lsdlocked0 List Table 3 Accent 5;
+\lsdpriority49 \lsdlocked0 List Table 4 Accent 5;\lsdpriority50 \lsdlocked0 
List Table 5 Dark Accent 5;\lsdpriority51 \lsdlocked0 List Table 6 Colorful 
Accent 5;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 5;
+\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 6;\lsdpriority47 
\lsdlocked0 List Table 2 Accent 6;\lsdpriority48 \lsdlocked0 List Table 3 
Accent 6;\lsdpriority49 \lsdlocked0 List Table 4 Accent 6;
+\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 6;\lsdpriority51 
\lsdlocked0 List Table 6 Colorful Accent 6;\lsdpriority52 \lsdlocked0 List 
Table 7 Colorful Accent 6;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Mention;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Smart Hyperlink;\lsdsemihidden1 
\lsdunhideused1 \lsdlocked0 Hashtag;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 
Unresolved Mention;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Smart 
Link;}}{\*\datastore 01050000
+02000000180000004d73786d6c322e534158584d4c5265616465722e362e3000000000000000000000060000
+d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff090006000000000000000000000001000000010000000000000000100000feffffff00000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+fffffffffffffffffdfffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffff0c6ad98892f1d411a65f0040963251e5000000000000000000000000d086
+303e5950da01feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000
+000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000105000000000000}}
\ No newline at end of file
diff --git a/sw/qa/extras/odfexport/odfexport2.cxx 
b/sw/qa/extras/odfexport/odfexport2.cxx
index b6b6bff018a9..00ad45301810 100644
--- a/sw/qa/extras/odfexport/odfexport2.cxx
+++ b/sw/qa/extras/odfexport/odfexport2.cxx
@@ -1207,6 +1207,105 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf150408_IsLegal)
         "is-legal"_ostr, "true");
 }
 
+CPPUNIT_TEST_FIXTURE(Test, testTdf159382)
+{
+    // Testing NoSpaceAfterHangingFootnoteNumbering compat option
+
+    createSwDoc("footnote_spacing_hanging_para.docx");
+    // 1. Make sure that DOCX import sets NoSpaceAfterHangingFootnoteNumbering 
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));
+
+        xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+        sal_Int32 width
+            = getXPath(pXmlDoc,
+                       
"/root/page/ftncont/ftn/txt/SwParaPortion/SwLineLayout/SwFieldPortion"_ostr,
+                       "width"_ostr)
+                  .toInt32();
+        CPPUNIT_ASSERT(width);
+        CPPUNIT_ASSERT_LESS(sal_Int32(100), width); // It was 720, i.e. 0.5 
inch
+    }
+
+    saveAndReload(mpFilter);
+    // 2. Make sure that exported document has 
NoSpaceAfterHangingFootnoteNumbering option set,
+    // and has correct layout
+    {
+        xmlDocUniquePtr pXmlDoc = parseExport("settings.xml");
+        assertXPathContent(
+            pXmlDoc,
+            
"//config:config-item[@config:name='NoSpaceAfterHangingFootnoteNumbering']"_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));
+
+        pXmlDoc = parseLayoutDump();
+        sal_Int32 width = getXPath(
+            pXmlDoc, 
"/root/page/ftncont/ftn/txt/SwParaPortion/SwLineLayout/SwFieldPortion"_ostr,
+            "width"_ostr).toInt32();
+        CPPUNIT_ASSERT(width);
+        CPPUNIT_ASSERT_LESS(sal_Int32(100), width);
+    }
+
+    createSwDoc("footnote_spacing_hanging_para.doc");
+    // 3. Make sure that DOC import sets NoSpaceAfterHangingFootnoteNumbering 
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));
+
+        xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+        sal_Int32 width
+            = getXPath(pXmlDoc,
+                       
"/root/page/ftncont/ftn/txt/SwParaPortion/SwLineLayout/SwFieldPortion"_ostr,
+                       "width"_ostr)
+                  .toInt32();
+        CPPUNIT_ASSERT(width);
+        CPPUNIT_ASSERT_LESS(sal_Int32(100), width);
+    }
+
+    createSwDoc("footnote_spacing_hanging_para.rtf");
+    // 4. Make sure that RTF import sets NoSpaceAfterHangingFootnoteNumbering 
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));
+
+        xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+        sal_Int32 width
+            = getXPath(pXmlDoc,
+                       
"/root/page/ftncont/ftn/txt/SwParaPortion/SwLineLayout/SwFieldPortion"_ostr,
+                       "width"_ostr)
+                  .toInt32();
+        CPPUNIT_ASSERT(width);
+        CPPUNIT_ASSERT_LESS(sal_Int32(100), width);
+    }
+
+    createSwDoc();
+    // 5. Make sure that a new Writer document has this setting set to false
+    {
+        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(false), xSettings->getPropertyValue(
+                                                  
u"NoSpaceAfterHangingFootnoteNumbering"_ustr));
+    }
+}
+
 } // end of anonymous namespace
 CPPUNIT_PLUGIN_IMPLEMENT();
 
diff --git a/sw/source/core/doc/DocumentSettingManager.cxx 
b/sw/source/core/doc/DocumentSettingManager.cxx
index 81079008b023..5563b2f80b06 100644
--- a/sw/source/core/doc/DocumentSettingManager.cxx
+++ b/sw/source/core/doc/DocumentSettingManager.cxx
@@ -192,6 +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::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;
@@ -337,6 +338,9 @@ 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;
+            break;
 
         case DocumentSettingId::TABLE_ROW_KEEP:
             mbTableRowKeep = value;
@@ -697,6 +701,7 @@ void 
sw::DocumentSettingManager::ReplaceCompatibilityOptions(const DocumentSetti
     mbStylesNoDefault = rSource.mbStylesNoDefault;
     mbOldNumbering = rSource.mbOldNumbering;
     mbIgnoreFirstLineIndentInNumbering = 
rSource.mbIgnoreFirstLineIndentInNumbering;
+    mbNoSpaceAfterHangingFootnoteNumbering = 
rSource.mbNoSpaceAfterHangingFootnoteNumbering;
     mbDoNotJustifyLinesWithManualBreak = 
rSource.mbDoNotJustifyLinesWithManualBreak;
     mbDoNotResetParaAttrsForNumFont = rSource.mbDoNotResetParaAttrsForNumFont;
     mbTableRowKeep = rSource.mbTableRowKeep;
@@ -880,6 +885,12 @@ void 
sw::DocumentSettingManager::dumpAsXml(xmlTextWriterPtr pWriter) const
         
BAD_CAST(OString::boolean(mbIgnoreFirstLineIndentInNumbering).getStr()));
     (void)xmlTextWriterEndElement(pWriter);
 
+    (void)xmlTextWriterStartElement(pWriter, 
BAD_CAST("mbNoSpaceAfterHangingFootnoteNumbering"));
+    (void)xmlTextWriterWriteAttribute(
+        pWriter, BAD_CAST("value"),
+        
BAD_CAST(OString::boolean(mbNoSpaceAfterHangingFootnoteNumbering).getStr()));
+    (void)xmlTextWriterEndElement(pWriter);
+
     (void)xmlTextWriterStartElement(pWriter, 
BAD_CAST("mbDoNotJustifyLinesWithManualBreak"));
     (void)xmlTextWriterWriteAttribute(
         pWriter, BAD_CAST("value"),
diff --git a/sw/source/core/inc/DocumentSettingManager.hxx 
b/sw/source/core/inc/DocumentSettingManager.hxx
index 284dccf9cf37..38bd64818dd1 100644
--- a/sw/source/core/inc/DocumentSettingManager.hxx
+++ b/sw/source/core/inc/DocumentSettingManager.hxx
@@ -132,6 +132,7 @@ class DocumentSettingManager final :
     // non-ui-compatibility flags:
     bool mbOldNumbering                             : 1;
     bool mbIgnoreFirstLineIndentInNumbering         : 1;   // #i47448#
+    bool mbNoSpaceAfterHangingFootnoteNumbering     : 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 a1f3b9729383..4718fcfbc169 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -602,9 +602,12 @@ bool SwNumberPortion::Format( SwTextFormatInfo &rInf )
 
         if ( !mbLabelAlignmentPosAndSpaceModeActive )
         {
-            if 
(!rInf.GetTextFrame()->GetDoc().getIDocumentSettingAccess().get(DocumentSettingId::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING)
 &&
+            if 
((!rInf.GetTextFrame()->GetDoc().getIDocumentSettingAccess().get(DocumentSettingId::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING)
 &&
                  // #i32902#
-                 !IsFootnoteNumPortion() )
+                 !IsFootnoteNumPortion()) ||
+                 // tdf#159382
+                (IsFootnoteNumPortion() &&
+                 
rInf.GetTextFrame()->GetDoc().getIDocumentSettingAccess().get(DocumentSettingId::NO_SPACE_AFTER_HANGING_FOOTNOTE_NUMBER)))
             {
                 nDiff = rInf.Left()
                     + rInf.GetTextFrame()->GetTextNodeForParaProps()->
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index fd7bae571d69..1b84f82f26ab 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -1911,6 +1911,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::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 3e40989828d1..2f9c480f3982 100644
--- a/sw/source/uibase/uno/SwXDocumentSettings.cxx
+++ b/sw/source/uibase/uno/SwXDocumentSettings.cxx
@@ -101,6 +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_DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK,
     HANDLE_DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT,
     HANDLE_TABLE_ROW_KEEP,
@@ -205,6 +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},
         { 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,6 +701,12 @@ 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:
+        {
+            bool bTmp = *o3tl::doAccess<bool>(rValue);
+            
mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::NO_SPACE_AFTER_HANGING_FOOTNOTE_NUMBER,
 bTmp);
+        }
+        break;
         case HANDLE_DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK:
         {
             bool bTmp = *o3tl::doAccess<bool>(rValue);
@@ -1379,6 +1387,11 @@ 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:
+        {
+            rValue <<= 
mpDoc->getIDocumentSettingAccess().get(DocumentSettingId::NO_SPACE_AFTER_HANGING_FOOTNOTE_NUMBER);
+        }
+        break;
         case HANDLE_DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK:
         {
             rValue <<= 
mpDoc->getIDocumentSettingAccess().get(DocumentSettingId::DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK);
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx 
b/writerfilter/source/dmapper/DomainMapper.cxx
index a4156210943a..35e4e1662c32 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -138,6 +138,8 @@ 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,
+                                             uno::Any(true));
 
         // Enable only for new documents, since pasting from clipboard can 
influence existing doc
         m_pImpl->SetDocumentSettingsProperty("NoNumberingShowFollowBy", 
uno::Any(true));
diff --git a/writerfilter/source/filter/WriterFilter.cxx 
b/writerfilter/source/filter/WriterFilter.cxx
index 1f97e8e70a30..10ea7da5a16f 100644
--- a/writerfilter/source/filter/WriterFilter.cxx
+++ b/writerfilter/source/filter/WriterFilter.cxx
@@ -304,6 +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("DoNotResetParaAttrsForNumFont", 
uno::Any(false));
     xSettings->setPropertyValue("UseFormerLineSpacing", uno::Any(false));
     xSettings->setPropertyValue("AddParaSpacingToTableCells", uno::Any(true));

Reply via email to