diff options
author | Justin Luth <justin.luth@collabora.com> | 2023-03-11 19:50:37 -0500 |
---|---|---|
committer | Justin Luth <jluth@mail.com> | 2023-03-15 09:43:33 +0000 |
commit | 6eb483d3f27e3ee8c56d422fb96f83844370d325 (patch) | |
tree | 7a8440cde1d6a2de20dbd69e1692e7170b849064 | |
parent | 2ab9a2e4166264be83300e7ed038be1b803a5ac8 (diff) |
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 <jluth@mail.com>
Tested-by: Jenkins
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.cxx | 14 |
1 files changed, 4 insertions, 10 deletions
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. |