[Libreoffice-commits] core.git: reportdesign/source

2023-03-19 Thread Vinit Agarwal (via logerrit)
 reportdesign/source/ui/dlg/Navigator.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 48b1fdf31f2fd4e9de47bda40e58cde7be9bc94d
Author: Vinit Agarwal 
AuthorDate: Fri Mar 10 13:07:22 2023 +0530
Commit: Ilmari Lauhakangas 
CommitDate: Sun Mar 19 08:00:54 2023 +

tdf#114441 - Convert use of sal_uLong to better integer types.

In reportdesign/source/ui/dlg/Navigator.cxx
Updated type of nPos at Line number 574 to int as it would be either
1 or 2 depending on the ternary evaluation

Change-Id: If2bf75ddfb66b518fec109757f32dd6e4a8b77dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148600
Tested-by: Ilmari Lauhakangas 
Reviewed-by: Ilmari Lauhakangas 

diff --git a/reportdesign/source/ui/dlg/Navigator.cxx 
b/reportdesign/source/ui/dlg/Navigator.cxx
index 2c4512470733..90cc2dc0d45b 100644
--- a/reportdesign/source/ui/dlg/Navigator.cxx
+++ b/reportdesign/source/ui/dlg/Navigator.cxx
@@ -571,7 +571,7 @@ void NavigatorTree::_propertyChanged(const 
beans::PropertyChangeEvent& _rEvent)
 xParent.reset();
 if ( _rEvent.PropertyName == PROPERTY_REPORTHEADERON )
 {
-sal_uLong nPos = xReport->getReportHeaderOn() ? 2 : 1;
+int nPos = xReport->getReportHeaderOn() ? 2 : 1;
 
traverseSection(xReport->getReportHeader(),xParent.get(),RID_SVXBMP_REPORTHEADERFOOTER,nPos);
 }
 else if ( _rEvent.PropertyName == PROPERTY_PAGEHEADERON )


[Libreoffice-commits] core.git: extensions/source

2023-03-09 Thread Vinit Agarwal (via logerrit)
 extensions/source/update/check/updatecheck.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit d898620cb47e0d794d4033fdfa13b049f972a9ff
Author: Vinit Agarwal 
AuthorDate: Tue Mar 7 02:59:57 2023 +0530
Commit: Hossein 
CommitDate: Thu Mar 9 19:44:36 2023 +

tdf#147021 - Use std::size() instead of SAL_N_ELEMENTS() macro

Modified updatecheck.cxx where SAL_N_ELEMENTS (nRetryInterval) was used
to get the size of the array. Now it is replaced with std::size().

Change-Id: Ib43ff3ecaeb8e853f14d5b0be45654596a817ec4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148367
Tested-by: Hossein 
Reviewed-by: Hossein 

diff --git a/extensions/source/update/check/updatecheck.cxx 
b/extensions/source/update/check/updatecheck.cxx
index 46a4d8dbeb61..3bde028f96b1 100644
--- a/extensions/source/update/check/updatecheck.cxx
+++ b/extensions/source/update/check/updatecheck.cxx
@@ -542,7 +542,7 @@ UpdateCheckThread::run()
 // Increase next by 15, 60, .. minutes
 static const sal_Int32 nRetryInterval[] = { 900, 3600, 14400, 
86400 };
 
-if( n < SAL_N_ELEMENTS(nRetryInterval) )
+if( n < std::size(nRetryInterval) )
 ++n;
 
 tv.Seconds = nRetryInterval[n-1];
@@ -657,7 +657,7 @@ DownloadThread::run()
 // Increase next by 1, 5, 15, 60, .. minutes
 static const sal_Int16 nRetryInterval[] = { 60, 300, 900, 3600 
};
 
-if( n < SAL_N_ELEMENTS(nRetryInterval) )
+if( n < std::size(nRetryInterval) )
 ++n;
 
 tv.Seconds = nRetryInterval[n-1];


[Libreoffice-commits] core.git: oox/qa

2023-03-08 Thread Vinit Agarwal (via logerrit)
 oox/qa/unit/drawingml.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit df28c5ac2d4883706556772462933f70151fa379
Author: Vinit Agarwal 
AuthorDate: Mon Mar 6 13:22:10 2023 +0530
Commit: Xisco Fauli 
CommitDate: Wed Mar 8 08:34:49 2023 +

tdf#141908 - CppUnittests: replace usage of sal_Int32 with colors

modified: oox/qa/unit/drawingml.cxx

Line number 168
Changed from sal_Int32 to Color which was declared on Line 162

Line number 290
Changed from sal_Int32 to Color which was declared on Line 288

Change-Id: If19b31c54639f1796d5e6375350bec91ec3f79d3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148296
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/oox/qa/unit/drawingml.cxx b/oox/qa/unit/drawingml.cxx
index 3355b66e79f6..994006e76113 100644
--- a/oox/qa/unit/drawingml.cxx
+++ b/oox/qa/unit/drawingml.cxx
@@ -159,13 +159,13 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, 
testChartDataLabelCharColor)
 xDataPoint->getPropertyValue("CustomLabelFields") >>= aLabels;
 uno::Reference xLabel = aLabels[0];
 
-sal_Int32 nCharColor = 0;
+Color nCharColor;
 xLabel->getPropertyValue("CharColor") >>= nCharColor;
 // Without the accompanying fix in place, this test would have failed with:
 // - Expected: 16777215
 // - Actual  : -1
 // i.e. the data label had no explicit (white) color.
-CPPUNIT_ASSERT_EQUAL(static_cast(0xff), nCharColor);
+CPPUNIT_ASSERT_EQUAL(COL_WHITE, nCharColor);
 }
 
 CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testGradientMultiStepTransparency)
@@ -285,9 +285,9 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTableShadow)
 CPPUNIT_ASSERT(xShape->getPropertyValue("Shadow") >>= bShadow);
 
 CPPUNIT_ASSERT(bShadow);
-sal_Int32 nColor = 0;
+Color nColor;
 CPPUNIT_ASSERT(xShape->getPropertyValue("ShadowColor") >>= nColor);
-CPPUNIT_ASSERT_EQUAL(static_cast(0xff), nColor);
+CPPUNIT_ASSERT_EQUAL(Color(0xff), nColor);
 };
 loadFromURL(u"table-shadow.pptx");
 // Without the accompanying fix in place, this test would have failed, 
because shadow on a table