sw/source/core/text/frmform.cxx              |    2 -
 sw/source/filter/ww8/docxattributeoutput.cxx |   42 +++++++++++++--------------
 2 files changed, 22 insertions(+), 22 deletions(-)

New commits:
commit 006b35d50024b1932d84380b5d2fec1f7066bccd
Author:     Justin Luth <justin.l...@collabora.com>
AuthorDate: Wed Apr 5 20:32:07 2023 -0400
Commit:     Justin Luth <jl...@mail.com>
CommitDate: Fri Apr 21 22:35:59 2023 +0200

    tdf#154703 NFC sw framePr: flatten TextBoxIsFramePr and fix typo
    
    Change-Id: I0fd30cb62c3676a1c7088636798bd4e6d3a18c50
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150071
    Tested-by: Jenkins
    Reviewed-by: Justin Luth <jl...@mail.com>

diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx
index 41b18363aed2..2f3024f1bb0a 100644
--- a/sw/source/core/text/frmform.cxx
+++ b/sw/source/core/text/frmform.cxx
@@ -1227,7 +1227,7 @@ void SwTextFrame::FormatAdjust( SwTextFormatter &rLine,
 }
 
 // bPrev is set whether Reformat.Start() was called because of Prev().
-// Else, wo don't know whether we can limit the repaint or not.
+// Else, we don't know whether we can limit the repaint or not.
 bool SwTextFrame::FormatLine( SwTextFormatter &rLine, const bool bPrev )
 {
     OSL_ENSURE( ! IsVertical() || IsSwapped(),
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 2e456a8018fb..43cfa953a041 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -973,27 +973,27 @@ void DocxAttributeOutput::PopulateFrameProperties(const 
SwFrameFormat* pFrameFor
 
 bool DocxAttributeOutput::TextBoxIsFramePr(const SwFrameFormat& rFrameFormat)
 {
-    uno::Reference< drawing::XShape > xShape;
-    const SdrObject* pSdrObj = rFrameFormat.FindRealSdrObject();
-    if (pSdrObj)
-        xShape.set(const_cast<SdrObject*>(pSdrObj)->getUnoShape(), 
uno::UNO_QUERY);
-    uno::Reference< beans::XPropertySet > xPropertySet(xShape, uno::UNO_QUERY);
-    uno::Reference< beans::XPropertySetInfo > xPropSetInfo;
-    if (xPropertySet.is())
-        xPropSetInfo = xPropertySet->getPropertySetInfo();
-    uno::Any aFrameProperties ;
-    if (xPropSetInfo.is() && 
xPropSetInfo->hasPropertyByName("FrameInteropGrabBag"))
-    {
-        uno::Sequence< beans::PropertyValue > propList;
-        xPropertySet->getPropertyValue("FrameInteropGrabBag") >>= propList;
-        auto pProp = std::find_if(std::cbegin(propList), std::cend(propList),
-            [](const beans::PropertyValue& rProp) { return rProp.Name == 
"ParaFrameProperties"; });
-        if (pProp != std::cend(propList))
-            aFrameProperties = pProp->Value;
-    }
-    bool bFrameProperties = false;
-    aFrameProperties >>= bFrameProperties;
-    return bFrameProperties;
+    SdrObject* pSdrObj = 
const_cast<SdrObject*>(rFrameFormat.FindRealSdrObject());
+    if (!pSdrObj)
+        return false;
+
+    uno::Reference<beans::XPropertySet> xPropertySet(pSdrObj->getUnoShape(), 
uno::UNO_QUERY);
+    if (!xPropertySet.is())
+        return false;
+
+    uno::Reference<beans::XPropertySetInfo> 
xPropSetInfo(xPropertySet->getPropertySetInfo());
+    if (!xPropSetInfo.is() || 
!xPropSetInfo->hasPropertyByName("FrameInteropGrabBag"))
+        return false;
+
+    bool bRet = false;
+    uno::Sequence<beans::PropertyValue> propList;
+    xPropertySet->getPropertyValue("FrameInteropGrabBag") >>= propList;
+    auto pProp = std::find_if(std::cbegin(propList), std::cend(propList),
+        [](const beans::PropertyValue& rProp) { return rProp.Name == 
"ParaFrameProperties"; });
+    if (pProp != std::cend(propList))
+        pProp->Value >>= bRet;
+
+    return bRet;
 }
 
 void DocxAttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t 
pTextNodeInfoInner )

Reply via email to