sw/inc/unocoll.hxx                       |    2 --
 sw/source/core/unocore/unocoll.cxx       |    9 ++-------
 sw/source/core/unocore/unocrsrhelper.cxx |    2 +-
 sw/source/core/unocore/unoredline.cxx    |    2 +-
 sw/source/filter/ww8/docxtableexport.cxx |    3 ++-
 sw/source/ui/vba/vbaselection.cxx        |    2 +-
 6 files changed, 7 insertions(+), 13 deletions(-)

New commits:
commit 7c556141ee892bf1081e3efb7770ff0fd96c7e55
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Sat Jun 14 23:08:20 2025 +0500
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Sat Jun 14 22:22:36 2025 +0200

    Drop SwXTextTables::GetObject
    
    Unneeded inderection for another single static function call.
    
    Change-Id: I0d6bc7a3adc2780f7a60514d596a30eca2bbe8e5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186503
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/sw/inc/unocoll.hxx b/sw/inc/unocoll.hxx
index 5bc0f5c0726a..4f55106c8ab3 100644
--- a/sw/inc/unocoll.hxx
+++ b/sw/inc/unocoll.hxx
@@ -292,8 +292,6 @@ public:
 
     rtl::Reference<SwXTextTable> getTextTableByName(std::u16string_view Name);
     rtl::Reference<SwXTextTable> getTextTableByIndex(sal_Int32 nIndex);
-
-    static rtl::Reference<SwXTextTable> GetObject(SwFrameFormat& rFormat);
 };
 
 typedef
diff --git a/sw/source/core/unocore/unocoll.cxx 
b/sw/source/core/unocore/unocoll.cxx
index 98a58984dd7c..b5821654470a 100644
--- a/sw/source/core/unocore/unocoll.cxx
+++ b/sw/source/core/unocore/unocoll.cxx
@@ -891,7 +891,7 @@ rtl::Reference<SwXTextTable> 
SwXTextTables::getTextTableByIndex(sal_Int32 nInput
             --nIndex;
         else
         {
-            return SwXTextTables::GetObject(*pFormat);
+            return SwXTextTable::CreateXTextTable(pFormat);
         }
     }
     throw IndexOutOfBoundsException();
@@ -913,7 +913,7 @@ rtl::Reference<SwXTextTable> 
SwXTextTables::getTextTableByName(std::u16string_vi
         SwFrameFormat& rFormat = GetDoc().GetTableFrameFormat(i, true);
         if (rItemName == rFormat.GetName())
         {
-            xTable = SwXTextTables::GetObject(rFormat);
+            xTable = SwXTextTable::CreateXTextTable(&rFormat);
             break;
         }
     }
@@ -986,11 +986,6 @@ uno::Sequence< OUString > 
SwXTextTables::getSupportedServiceNames()
     return { u"com.sun.star.text.TextTables"_ustr };
 }
 
-rtl::Reference<SwXTextTable> SwXTextTables::GetObject(SwFrameFormat& rFormat)
-{
-    return SwXTextTable::CreateXTextTable(& rFormat);
-}
-
 namespace
 {
     template<FlyCntType T> struct UnoFrameWrap_traits {};
diff --git a/sw/source/core/unocore/unocrsrhelper.cxx 
b/sw/source/core/unocore/unocrsrhelper.cxx
index 70ed8f835b78..25984b1744cf 100644
--- a/sw/source/core/unocore/unocrsrhelper.cxx
+++ b/sw/source/core/unocore/unocrsrhelper.cxx
@@ -595,7 +595,7 @@ bool getCursorPropertyValue(const SfxItemPropertyMapEntry& 
rEntry
                     //SwTable& rTable = 
static_cast<SwTableNode*>(pSttNode)->GetTable();
                     if(FN_UNO_TEXT_TABLE == rEntry.nWID)
                     {
-                        rtl::Reference< SwXTextTable >  xTable = 
SwXTextTables::GetObject(*pTableFormat);
+                        rtl::Reference< SwXTextTable >  xTable = 
SwXTextTable::CreateXTextTable(pTableFormat);
                         *pAny <<= uno::Reference< XTextTable >(xTable);
                     }
                     else
diff --git a/sw/source/core/unocore/unoredline.cxx 
b/sw/source/core/unocore/unoredline.cxx
index 72a706656434..a11551e04f2c 100644
--- a/sw/source/core/unocore/unoredline.cxx
+++ b/sw/source/core/unocore/unoredline.cxx
@@ -459,7 +459,7 @@ uno::Any SwXRedline::getPropertyValue( const OUString& 
rPropertyName )
                 SwTableNode* pTableNode = pPoint->GetNode().GetTableNode();
                 assert(pTableNode);
                 SwFrameFormat* pTableFormat = 
pTableNode->GetTable().GetFrameFormat();
-                xRet = cppu::getXWeak(SwXTextTables::GetObject( *pTableFormat 
).get());
+                xRet = 
cppu::getXWeak(SwXTextTable::CreateXTextTable(pTableFormat).get());
             }
             break;
             case SwNodeType::Text :
diff --git a/sw/source/filter/ww8/docxtableexport.cxx 
b/sw/source/filter/ww8/docxtableexport.cxx
index d267960b64ae..3c47ce94dfed 100644
--- a/sw/source/filter/ww8/docxtableexport.cxx
+++ b/sw/source/filter/ww8/docxtableexport.cxx
@@ -200,7 +200,8 @@ void DocxAttributeOutput::TableDefinition(
         nWidthPercent = rFrameSize.GetWidthPercent();
     }
 
-    rtl::Reference<SwXTextTable> xPropertySet = 
SwXTextTables::GetObject(*pTable->GetFrameFormat());
+    rtl::Reference<SwXTextTable> xPropertySet
+        = SwXTextTable::CreateXTextTable(pTable->GetFrameFormat());
     bool isWidthRelative = false;
     xPropertySet->getPropertyValue(u"IsWidthRelative"_ustr) >>= 
isWidthRelative;
     if (!isWidthRelative && !nWidthPercent)
diff --git a/sw/source/ui/vba/vbaselection.cxx 
b/sw/source/ui/vba/vbaselection.cxx
index 81c254487a56..bf3f82b120b2 100644
--- a/sw/source/ui/vba/vbaselection.cxx
+++ b/sw/source/ui/vba/vbaselection.cxx
@@ -815,7 +815,7 @@ SwVbaSelection::Tables( const uno::Any& aIndex )
         SwFrameFormat* pFormat = pTTCursor->GetFrameFormat();
         if ( pFormat )
         {
-            rtl::Reference< SwXTextTable > xTable = 
SwXTextTables::GetObject(*pFormat);
+            rtl::Reference<SwXTextTable> xTable = 
SwXTextTable::CreateXTextTable(pFormat);
             uno::Reference< word::XTable > xVBATable = new SwVbaTable( 
mxParent, mxContext, mxModel, xTable );
             aRet <<= xVBATable;
         }

Reply via email to