extensions/source/propctrlr/listselectiondlg.cxx |   13 +++++++------
 extensions/source/propctrlr/listselectiondlg.hxx |    2 +-
 2 files changed, 8 insertions(+), 7 deletions(-)

New commits:
commit 10b6662eac4a175801a54f824cea33d60c436032
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Thu May 22 13:51:32 2025 +0100
Commit:     Adolfo Jayme Barrientos <fit...@ubuntu.com>
CommitDate: Thu May 22 23:40:05 2025 +0200

    Resolves: tdf#166612 MultiSelection inverted for form list properties
    
    Change-Id: I65bac82ceb1f0ddf4a23837e4c29e40e70eead68
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185664
    Tested-by: Jenkins
    Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>

diff --git a/extensions/source/propctrlr/listselectiondlg.cxx 
b/extensions/source/propctrlr/listselectiondlg.cxx
index 85ba50454212..22e0f746e518 100644
--- a/extensions/source/propctrlr/listselectiondlg.cxx
+++ b/extensions/source/propctrlr/listselectiondlg.cxx
@@ -72,7 +72,7 @@ namespace pcr
             // initialize the multi-selection flag
             bool bMultiSelection = false;
             OSL_VERIFY( m_xListBox->getPropertyValue( PROPERTY_MULTISELECTION 
) >>= bMultiSelection );
-            m_xEntries->set_selection_mode(bMultiSelection ? 
SelectionMode::Single : SelectionMode::Multiple);
+            m_xEntries->set_selection_mode(bMultiSelection ? 
SelectionMode::Multiple : SelectionMode::Single);
 
             // fill the list box with all entries
             Sequence< OUString > aListEntries;
commit 32b2333e36a81581cc4e1d6d962f3c30b171ee6d
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Thu May 22 14:03:04 2025 +0100
Commit:     Adolfo Jayme Barrientos <fit...@ubuntu.com>
CommitDate: Thu May 22 23:39:54 2025 +0200

    Resolves: tdf#166613 wrong selection returned from forms listbox editor
    
    Change-Id: I14e51eb1945d282691275f394bfbac50f3c4cc48
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185667
    Tested-by: Jenkins
    Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>

diff --git a/extensions/source/propctrlr/listselectiondlg.cxx 
b/extensions/source/propctrlr/listselectiondlg.cxx
index 3de89eac76c4..85ba50454212 100644
--- a/extensions/source/propctrlr/listselectiondlg.cxx
+++ b/extensions/source/propctrlr/listselectiondlg.cxx
@@ -95,8 +95,7 @@ namespace pcr
         if ( !m_xListBox.is() )
             return;
 
-        std::vector< sal_Int16 > aSelection;
-        collectSelection( aSelection );
+        std::vector<sal_Int16> aSelection(collectSelection());
 
         try
         {
@@ -117,12 +116,14 @@ namespace pcr
         m_xEntries->thaw();
     }
 
-    void ListSelectionDialog::collectSelection( std::vector< sal_Int16 >& /* 
[out] */ _rSelection )
+    std::vector<sal_Int16> ListSelectionDialog::collectSelection() const
     {
+        std::vector<sal_Int16> aRetSelection;
         auto aSelection = m_xEntries->get_selected_rows();
-        _rSelection.resize(aSelection.size());
+        aRetSelection.reserve(aSelection.size());
         for (auto row : aSelection)
-            _rSelection.push_back(row);
+            aRetSelection.push_back(row);
+        return aRetSelection;
     }
 
     void ListSelectionDialog::selectEntries( const Sequence< sal_Int16 >& /* 
[in ] */ _rSelection )
diff --git a/extensions/source/propctrlr/listselectiondlg.hxx 
b/extensions/source/propctrlr/listselectiondlg.hxx
index 368e9e9aac94..8a1f5a15218c 100644
--- a/extensions/source/propctrlr/listselectiondlg.hxx
+++ b/extensions/source/propctrlr/listselectiondlg.hxx
@@ -51,7 +51,7 @@ namespace pcr
         void    fillEntryList   ( const css::uno::Sequence< OUString >& 
_rListEntries );
 
         void    selectEntries   ( const css::uno::Sequence< sal_Int16 >& /* 
[in ] */ _rSelection );
-        void    collectSelection(       std::vector< sal_Int16 >& /* [out] */ 
_rSelection );
+        std::vector<sal_Int16> collectSelection() const;
     };
 
 } // namespacepcr

Reply via email to