sw/source/filter/ww8/rtfattributeoutput.cxx |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 811dfd7f2706f56119a1943e08d9bce73b0d2203
Author:     Michael Stahl <michael.st...@allotropia.de>
AuthorDate: Tue Feb 28 15:48:30 2023 +0100
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Tue Feb 28 18:25:55 2023 +0000

    sw: RTF export: fix assert on fdo37077-1.rtf
    
    soffice.bin: /home/ms/lo/master/svl/source/items/itempool.cxx:822: const 
SfxPoolItem& SfxItemPool::GetDefaultItem(sal_uInt16) const: Assertion 
`!"unknown which - don't ask me for defaults"' failed.
    
    Because editeng doesnt have RES_MARGIN_TEXTLEFT yet and it's mapped to a
    slot id so the dialog works...
    
    Looks like this TABS_RELATIVE_TO_INDENT doesn't exist in editeng anyway.
    
    (regression from commit db115bec9254417ef7a3faf687478fe5424ab378)
    
    Change-Id: I64169a4d6f4663adaa2a17786836c2dcc7e1f394
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148006
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx 
b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 0175fd5d15b5..9bfe2f787ff2 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -2994,7 +2994,11 @@ void RtfAttributeOutput::ParaTabStop(const 
SvxTabStopItem& rTabStop)
     if (m_rExport.m_rDoc.getIDocumentSettingAccess().get(
             DocumentSettingId::TABS_RELATIVE_TO_INDENT))
     {
-        nOffset = m_rExport.GetItem(RES_MARGIN_TEXTLEFT).GetTextLeft();
+        // don't do it for editengine text, it doesn't implement this anyway
+        if (!GetExport().m_pISet || GetExport().m_pISet->GetRanges()[0].first 
< RES_WHICHHINT_END)
+        {
+            nOffset = m_rExport.GetItem(RES_MARGIN_TEXTLEFT).GetTextLeft();
+        }
     }
 
     for (sal_uInt16 n = 0; n < rTabStop.Count(); n++)

Reply via email to