desktop/source/deployment/gui/dp_gui_extlistbox.cxx |   12 ++++++------
 desktop/source/deployment/gui/dp_gui_extlistbox.hxx |    9 +++------
 2 files changed, 9 insertions(+), 12 deletions(-)

New commits:
commit 0d11dc58eaad338167285e056a9927648d8edd14
Author:     Michael Weghorn <[email protected]>
AuthorDate: Thu Oct 16 10:20:51 2025 +0200
Commit:     Michael Weghorn <[email protected]>
CommitDate: Fri Oct 17 12:12:19 2025 +0200

    extension manager: Drop a forward-decl
    
    Move the TEntry_Impl to after the Entry_Impl
    definition, so the latter doesn't need to be
    forward-declared.
    
    Change-Id: Ieeef96ca2be00c47106f07819253debb213cb04f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192479
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <[email protected]>

diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx 
b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx
index 2934bdc6cb31..8119cb00ae73 100644
--- a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx
+++ b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx
@@ -49,11 +49,6 @@ namespace dp_gui {
 
 class TheExtensionManager;
 
-
-struct Entry_Impl;
-
-typedef std::shared_ptr< Entry_Impl > TEntry_Impl;
-
 struct Entry_Impl
 {
     bool            m_bActive       :1;
@@ -87,6 +82,8 @@ struct Entry_Impl
     void checkDependencies();
 };
 
+typedef std::shared_ptr<Entry_Impl> TEntry_Impl;
+
 class ExtensionBox_Impl;
 
 
commit a0ddd65eee4d716f7e5651843a9b5cbb4de451c8
Author:     Michael Weghorn <[email protected]>
AuthorDate: Thu Oct 16 10:16:11 2025 +0200
Commit:     Michael Weghorn <[email protected]>
CommitDate: Fri Oct 17 12:12:13 2025 +0200

    extension manager: Pass param by ref instead of ref to smart pointer
    
    It's always non-null/dereferenced unconditionally
    inside Entry_Impl::CompareTo and using the same
    type as the one whose method gets called seems
    reasonable when comparing two objects.
    
    Change-Id: Id0f9885cd9bcaf4b606e4afdaa297b9e05c53944
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192478
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <[email protected]>

diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx 
b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
index c8ed9b4f4cd8..69987543d421 100644
--- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
@@ -118,15 +118,15 @@ Entry_Impl::~Entry_Impl()
 {}
 
 
-sal_Int32 Entry_Impl::CompareTo(const CollatorWrapper& rCollator, const 
TEntry_Impl& rEntry) const
+sal_Int32 Entry_Impl::CompareTo(const CollatorWrapper& rCollator, const 
Entry_Impl& rEntry) const
 {
-    sal_Int32 eCompare = rCollator.compareString(m_sTitle, rEntry->m_sTitle);
+    sal_Int32 eCompare = rCollator.compareString(m_sTitle, rEntry.m_sTitle);
     if ( eCompare == 0 )
     {
-        eCompare = m_sVersion.compareTo( rEntry->m_sVersion );
+        eCompare = m_sVersion.compareTo(rEntry.m_sVersion);
         if ( eCompare == 0 )
         {
-            sal_Int32 nCompare = m_xPackage->getRepositoryName().compareTo( 
rEntry->m_xPackage->getRepositoryName() );
+            sal_Int32 nCompare = 
m_xPackage->getRepositoryName().compareTo(rEntry.m_xPackage->getRepositoryName());
             if ( nCompare < 0 )
                 eCompare = -1;
             else if ( nCompare > 0 )
@@ -824,7 +824,7 @@ bool ExtensionBox_Impl::FindEntryPos( const TEntry_Impl& 
rEntry, const tools::Lo
 
     if ( nStart == nEnd )
     {
-        eCompare = rEntry->CompareTo(*m_oCollator, m_vEntries[nStart]);
+        eCompare = rEntry->CompareTo(*m_oCollator, *m_vEntries[nStart]);
         if ( eCompare < 0 )
             return false;
         else if ( eCompare == 0 )
@@ -845,7 +845,7 @@ bool ExtensionBox_Impl::FindEntryPos( const TEntry_Impl& 
rEntry, const tools::Lo
     }
 
     const tools::Long nMid = nStart + ( ( nEnd - nStart ) / 2 );
-    eCompare = rEntry->CompareTo(*m_oCollator, m_vEntries[nMid]);
+    eCompare = rEntry->CompareTo(*m_oCollator, *m_vEntries[nMid]);
 
     if ( eCompare < 0 )
         return FindEntryPos( rEntry, nStart, nMid-1, nPos );
diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx 
b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx
index 918fc7369420..2934bdc6cb31 100644
--- a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx
+++ b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx
@@ -83,7 +83,7 @@ struct Entry_Impl
                const PackageState eState, const bool bReadOnly);
    ~Entry_Impl();
 
-    sal_Int32 CompareTo(const CollatorWrapper& rCollator, const TEntry_Impl& 
rEntry) const;
+    sal_Int32 CompareTo(const CollatorWrapper& rCollator, const Entry_Impl& 
rEntry) const;
     void checkDependencies();
 };
 
commit 1df1bf702d45ebe68b6f922845be3ddde2934a00
Author:     Michael Weghorn <[email protected]>
AuthorDate: Thu Oct 16 10:14:07 2025 +0200
Commit:     Michael Weghorn <[email protected]>
CommitDate: Fri Oct 17 12:12:07 2025 +0200

    extension manager: Pass CollatorWrapper param by ref
    
    Change-Id: Iac5af04a17e63d549d77a2ee600db9cfdc4beeb1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192477
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <[email protected]>

diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx 
b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
index cb3759f275a6..c8ed9b4f4cd8 100644
--- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
@@ -118,9 +118,9 @@ Entry_Impl::~Entry_Impl()
 {}
 
 
-sal_Int32 Entry_Impl::CompareTo( const CollatorWrapper *pCollator, const 
TEntry_Impl& rEntry ) const
+sal_Int32 Entry_Impl::CompareTo(const CollatorWrapper& rCollator, const 
TEntry_Impl& rEntry) const
 {
-    sal_Int32 eCompare = pCollator->compareString( m_sTitle, rEntry->m_sTitle 
);
+    sal_Int32 eCompare = rCollator.compareString(m_sTitle, rEntry->m_sTitle);
     if ( eCompare == 0 )
     {
         eCompare = m_sVersion.compareTo( rEntry->m_sVersion );
@@ -824,7 +824,7 @@ bool ExtensionBox_Impl::FindEntryPos( const TEntry_Impl& 
rEntry, const tools::Lo
 
     if ( nStart == nEnd )
     {
-        eCompare = rEntry->CompareTo( &*m_oCollator, m_vEntries[ nStart ] );
+        eCompare = rEntry->CompareTo(*m_oCollator, m_vEntries[nStart]);
         if ( eCompare < 0 )
             return false;
         else if ( eCompare == 0 )
@@ -845,7 +845,7 @@ bool ExtensionBox_Impl::FindEntryPos( const TEntry_Impl& 
rEntry, const tools::Lo
     }
 
     const tools::Long nMid = nStart + ( ( nEnd - nStart ) / 2 );
-    eCompare = rEntry->CompareTo( &*m_oCollator, m_vEntries[ nMid ] );
+    eCompare = rEntry->CompareTo(*m_oCollator, m_vEntries[nMid]);
 
     if ( eCompare < 0 )
         return FindEntryPos( rEntry, nStart, nMid-1, nPos );
diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx 
b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx
index cfc04f115d22..918fc7369420 100644
--- a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx
+++ b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx
@@ -83,7 +83,7 @@ struct Entry_Impl
                const PackageState eState, const bool bReadOnly);
    ~Entry_Impl();
 
-    sal_Int32 CompareTo(const CollatorWrapper *pCollator, const TEntry_Impl& 
rEntry) const;
+    sal_Int32 CompareTo(const CollatorWrapper& rCollator, const TEntry_Impl& 
rEntry) const;
     void checkDependencies();
 };
 

Reply via email to