writerfilter/source/dmapper/StyleSheetTable.cxx |   21 ---------------------
 1 file changed, 21 deletions(-)

New commits:
commit 520de5a4b2a11412a41ad64b65675a9180fb97db
Author:     Justin Luth <justin_l...@sil.org>
AuthorDate: Thu Aug 19 13:23:25 2021 +0200
Commit:     Justin Luth <justin_l...@sil.org>
CommitDate: Sat Aug 21 13:29:42 2021 +0200

    tdf#95495 writerfilter: clear obsolete hack
    
    This looks completely wrong and unnecessary to me.
    HOWEVER, at the time it really fixed a LOT of documents
    and bug reports, so definite congratulations to the
    original programmers for a successful hack in
    a minefield code-area.
    
    But it definitely seems hacky and full of wizardry.
    AFTER setting the PROP_OUTLINE_LEVEL to be the real thing,
    then we change the placeholder values to something different?
    Plus, OutlineLevel has NOTHING to do with a list level,
    so it should be irrelevant here.
    [There is a fail-safe that ensures that outline level
    matches list level for Chapter Numbering, but that is
    not a DOCX thing, but a LO thing.]
    
    Other major changes earlier in 7.3 fixed a lot of
    inheritance issues, and highly refactored
    Chapter Numbering recognition, so it is highly
    likely that this code is completely pointless.
    
    -confirm tdf#95495 examples same in Word 2010, 2016, LO
        • Windows PowerShell Language Specification Version 3.0 (confirmed)
        • 95495 Windows PowerShell - APPENDICES (confirmed)
        • 385.docx (comment 12) (confirmed)
        • numbering.docx (confirmed)
        • test1.docx (confirmed)
    
    Change-Id: I0f1ac7c9367b094a6431fe61442d3b58ffee79d5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120755
    Tested-by: Justin Luth <justin_l...@sil.org>
    Reviewed-by: Justin Luth <justin_l...@sil.org>

diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx 
b/writerfilter/source/dmapper/StyleSheetTable.cxx
index 0ca4d8ca4466..986db5244771 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -1108,27 +1108,6 @@ void StyleSheetTable::ApplyStyleSheets( const 
FontTablePtr& rFontTable )
                                     uno::makeAny( sal_Int16( 
pStyleSheetProperties->GetOutlineLevel( ) + 1 ) ),
                                     beans::PropertyState_DIRECT_VALUE );
                             aPropValues.push_back(aLvlVal);
-
-                            // tdf#95495 missing list level settings in custom 
styles in old DOCX: apply settings of the parent style
-                            if (pStyleSheetProperties->GetListLevel() == -1 && 
pStyleSheetProperties->GetOutlineLevel() == -1)
-                            {
-                                const beans::PropertyValues aPropGrabBag = 
pEntry->GetInteropGrabBagSeq();
-                                for (const auto& rVal : aPropGrabBag)
-                                {
-                                    if (rVal.Name == "customStyle" && 
rVal.Value == true)
-                                    {
-                                        OUString sBaseId = 
pEntry->sBaseStyleIdentifier;
-                                        auto findIt = 
m_pImpl->m_aStyleSheetEntriesMap.find(sBaseId);
-                                        if (findIt != 
m_pImpl->m_aStyleSheetEntriesMap.end())
-                                        {
-                                            const auto& aSheetProps  = 
findIt->second;
-                                            StyleSheetPropertyMap& 
rStyleSheetProps = *aSheetProps->pProperties;
-                                            
pStyleSheetProperties->SetListLevel(rStyleSheetProps.GetListLevel());
-                                            
pStyleSheetProperties->SetOutlineLevel(rStyleSheetProps.GetOutlineLevel());
-                                        }
-                                    }
-                                }
-                            }
                         }
 
                         uno::Reference< beans::XPropertyState >xState( xStyle, 
uno::UNO_QUERY_THROW );

Reply via email to