cui/source/dialogs/AdditionsDialog.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit eee9c11a9f53216cba6f693b88200e1e03ddb583
Author:     Méven Car <[email protected]>
AuthorDate: Thu Nov 13 18:22:00 2025 +0100
Commit:     Caolán McNamara <[email protected]>
CommitDate: Thu Nov 13 21:02:32 2025 +0100

    AdditonsDialog: rename macro value PAGE_SIZE to avoid conflict
    
    PAGE_SIZE is a common Linux macro, this can cause warnings during
    compilation.
    
    Rename PAGE_SIZE to more specific MAX_ITEMS_PER_PAGE.
    
    Change-Id: If401a84891a65e75541fb44d8ed8b7125ff9e425
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193979
    Reviewed-by: Caolán McNamara <[email protected]>
    Tested-by: Caolán McNamara <[email protected]>
    Tested-by: Jenkins CollaboraOffice <[email protected]>

diff --git a/cui/source/dialogs/AdditionsDialog.cxx 
b/cui/source/dialogs/AdditionsDialog.cxx
index a8eabf6d369c..abaac22f01c7 100644
--- a/cui/source/dialogs/AdditionsDialog.cxx
+++ b/cui/source/dialogs/AdditionsDialog.cxx
@@ -57,7 +57,7 @@
 
 #include <bitmaps.hlst>
 
-#define PAGE_SIZE 30
+#define MAX_ITEMS_PER_PAGE 30
 
 using namespace css;
 using ::com::sun::star::uno::Reference;
@@ -448,7 +448,7 @@ AdditionsDialog::AdditionsDialog(weld::Window* pParent, 
const OUString& sAdditio
     m_xButtonClose->connect_clicked(LINK(this, AdditionsDialog, 
CloseButtonHdl));
 
     m_sTag = sAdditionsTag;
-    m_nMaxItemCount = PAGE_SIZE; // Dialog initialization item count
+    m_nMaxItemCount = MAX_ITEMS_PER_PAGE; // Dialog initialization item count
     m_nCurrentListItemCount = 0; // First, there is no item on the list.
 
     OUString titlePrefix = CuiResId(RID_CUISTR_ADDITIONS_DIALOG_TITLE_PREFIX);
@@ -582,7 +582,7 @@ void AdditionsDialog::RefreshUI()
         m_pSearchThread->StopExecution();
     ClearList();
     m_nCurrentListItemCount = 0;
-    m_nMaxItemCount = PAGE_SIZE;
+    m_nMaxItemCount = MAX_ITEMS_PER_PAGE;
     m_pSearchThread = new SearchAndParseThread(this, false);
     m_pSearchThread->launch();
 }
@@ -743,7 +743,7 @@ IMPL_LINK_NOARG(AdditionsDialog, CloseButtonHdl, 
weld::Button&, void)
 IMPL_LINK_NOARG(AdditionsItem, ShowMoreHdl, weld::Button&, void)
 {
     this->m_xButtonShowMore->set_visible(false);
-    m_pParentDialog->m_nMaxItemCount += PAGE_SIZE;
+    m_pParentDialog->m_nMaxItemCount += MAX_ITEMS_PER_PAGE;
     if (m_pParentDialog->m_pSearchThread.is())
         m_pParentDialog->m_pSearchThread->StopExecution();
     m_pParentDialog->m_pSearchThread = new 
SearchAndParseThread(m_pParentDialog, false);

Reply via email to