writerfilter/source/dmapper/DomainMapper_Impl.cxx |   14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

New commits:
commit 6eb483d3f27e3ee8c56d422fb96f83844370d325
Author:     Justin Luth <justin.l...@collabora.com>
AuthorDate: Sat Mar 11 19:50:37 2023 -0500
Commit:     Justin Luth <jl...@mail.com>
CommitDate: Wed Mar 15 09:43:33 2023 +0000

    tdf#154129 writerfilter framePr: remove last use of pParaStyle
    
    Now that everything is using vProp, pParaStyle can be removed.
    
    Although there could conceivably be a minor logic flow difference
    (in case a specified style had no properties == early return)
    I'm pretty sure that that would actually cause errors,
    so this should be better.
    
    Change-Id: I5079732ebd2b822bea40929c5b4899b8551324e2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148719
    Reviewed-by: Justin Luth <jl...@mail.com>
    Tested-by: Jenkins

diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 786cc0f39de2..db61d2fda2d1 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1612,9 +1612,6 @@ void DomainMapper_Impl::CheckUnregisteredFrameConversion( 
)
         return;
     try
     {
-        StyleSheetEntryPtr pParaStyle =
-            
GetStyleSheetTable()->FindStyleSheetByConvertedStyleName(rAppendContext.pLastParagraphProperties->GetParaStyleName());
-
         // A paragraph's properties come from direct formatting or somewhere 
in the style hierarchy
         std::vector<const ParagraphProperties*> vProps;
         vProps.emplace_back(rAppendContext.pLastParagraphProperties.get());
@@ -1633,12 +1630,8 @@ void 
DomainMapper_Impl::CheckUnregisteredFrameConversion( )
 
         std::vector<beans::PropertyValue> aFrameProperties;
 
-        if ( pParaStyle )
+        if (vProps.size() > 1)
         {
-            const StyleSheetPropertyMap* pStyleProperties = 
pParaStyle->m_pProperties.get();
-            if (!pStyleProperties)
-                return;
-
             sal_Int32 nWidth = -1;
             for (const auto pProp : vProps)
             {
@@ -1652,12 +1645,14 @@ void 
DomainMapper_Impl::CheckUnregisteredFrameConversion( )
                 nWidth = DEFAULT_FRAME_MIN_WIDTH;
             
aFrameProperties.push_back(comphelper::makePropertyValue(getPropertyName(PROP_WIDTH),
 nWidth));
 
+            bool bValidH = false;
             sal_Int32 nHeight = DEFAULT_FRAME_MIN_HEIGHT;
             for (const auto pProp : vProps)
             {
                 if (pProp->Geth() < 0)
                     continue;
                 nHeight = pProp->Geth();
+                bValidH = true;
                 break;
             }
             aFrameProperties.push_back(
@@ -1673,8 +1668,7 @@ void DomainMapper_Impl::CheckUnregisteredFrameConversion( 
)
             }
             if ( nhRule < 0 )
             {
-                if ( rAppendContext.pLastParagraphProperties->Geth() >= 0 ||
-                    pStyleProperties->props().GethRule() >= 0 )
+                if (bValidH)
                 {
                     // [MS-OE376] Word uses a default value of "atLeast" for
                     // this attribute when the value of the h attribute is not 
0.

Reply via email to