sw/source/filter/html/htmlplug.cxx |   10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

New commits:
commit df5bb1387b5c7a30e15aad7811a3c0f0d3fe44c8
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Fri Oct 27 16:24:03 2023 +0300
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Sat Oct 28 08:46:12 2023 +0200

    Simplify a bit
    
    Change-Id: I3926cb84f3c82adf43dcd641f41cdfa3217a8efd
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158567
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/sw/source/filter/html/htmlplug.cxx 
b/sw/source/filter/html/htmlplug.cxx
index 0216a6929dbf..86d5cc0ffe7b 100644
--- a/sw/source/filter/html/htmlplug.cxx
+++ b/sw/source/filter/html/htmlplug.cxx
@@ -1492,15 +1492,13 @@ SwHTMLWriter& OutHTML_FrameFormatOLENodeGrf( 
SwHTMLWriter& rWrt, const SwFrameFo
     {
         // If we skip images, embedded objects would be completely lost.
         // Instead, try to use the HTML export of the embedded object.
-        uno::Reference<text::XTextContent> xTextContent = 
SwXTextEmbeddedObject::CreateXTextEmbeddedObject(*rWrt.m_pDoc, 
const_cast<SwFrameFormat*>(&rFrameFormat));
-        uno::Reference<document::XEmbeddedObjectSupplier2> 
xEmbeddedObjectSupplier(xTextContent, uno::UNO_QUERY);
-        uno::Reference<frame::XStorable> 
xStorable(xEmbeddedObjectSupplier->getEmbeddedObject(), uno::UNO_QUERY);
+        auto xTextContent = 
SwXTextEmbeddedObject::CreateXTextEmbeddedObject(*rWrt.m_pDoc, 
const_cast<SwFrameFormat*>(&rFrameFormat));
+        uno::Reference<frame::XStorable> 
xStorable(xTextContent->getEmbeddedObject(), uno::UNO_QUERY);
         SAL_WARN_IF(!xStorable.is(), "sw.html", 
"OutHTML_FrameFormatOLENodeGrf: no embedded object");
 
         // Figure out what is the filter name of the embedded object.
-        uno::Reference<lang::XServiceInfo> xServiceInfo(xStorable, 
uno::UNO_QUERY);
         OUString aFilter;
-        if (xServiceInfo.is())
+        if (uno::Reference<lang::XServiceInfo> xServiceInfo{ xStorable, 
uno::UNO_QUERY })
         {
             if 
(xServiceInfo->supportsService("com.sun.star.sheet.SpreadsheetDocument"))
                 aFilter = "HTML (StarCalc)";
@@ -1508,7 +1506,7 @@ SwHTMLWriter& OutHTML_FrameFormatOLENodeGrf( 
SwHTMLWriter& rWrt, const SwFrameFo
                 aFilter = "HTML (StarWriter)";
         }
 
-        if (xStorable.is() && !aFilter.isEmpty())
+        if (!aFilter.isEmpty())
         {
             try
             {

Reply via email to