odk/examples/DevelopersGuide/FirstSteps/HelloTextTableShape/cxx/HelloTextTableShape.cxx
 |   20 +++++-----
 1 file changed, 10 insertions(+), 10 deletions(-)

New commits:
commit 12447b7c70cd1314c35fe7e2ae89078abdd9a4a6
Author:     Hossein <hoss...@libreoffice.org>
AuthorDate: Thu May 16 13:19:58 2024 +0200
Commit:     René Engelhard <r...@debian.org>
CommitDate: Thu May 16 17:14:22 2024 +0200

    Fix odk examples build on 32 bit systems
    
    It is required to cast integer literals to sal_Int32 when passing them
    to Any().
    
    Change-Id: I377f88fc3441d8e4bc7afdb2411c1fd140853134
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167739
    Tested-by: Jenkins
    Reviewed-by: René Engelhard <r...@debian.org>
    Tested-by: René Engelhard <r...@debian.org>

diff --git 
a/odk/examples/DevelopersGuide/FirstSteps/HelloTextTableShape/cxx/HelloTextTableShape.cxx
 
b/odk/examples/DevelopersGuide/FirstSteps/HelloTextTableShape/cxx/HelloTextTableShape.cxx
index 3fa9c1b960fc..b9f2a11ae528 100644
--- 
a/odk/examples/DevelopersGuide/FirstSteps/HelloTextTableShape/cxx/HelloTextTableShape.cxx
+++ 
b/odk/examples/DevelopersGuide/FirstSteps/HelloTextTableShape/cxx/HelloTextTableShape.cxx
@@ -171,7 +171,7 @@ void useWriter()
         //Object table = xIndexedTables.getByIndex(i);
         Any table = xIndexedTables->getByIndex(i);
         xTableProps = Reference<XPropertySet>(table, UNO_QUERY_THROW);
-        xTableProps->setPropertyValue("BackColor", Any(0xC8FFB9));
+        xTableProps->setPropertyValue("BackColor", 
Any(static_cast<sal_Int32>(0xC8FFB9)));
     }
 }
 
@@ -311,7 +311,7 @@ void manipulateTable(const Reference<XCellRange>& 
xCellRange)
         xTableProps = Reference<XPropertySet>(xCellRange, UNO_QUERY_THROW);
     }
     // set cell background color
-    xCellProps->setPropertyValue(backColorPropertyName, Any(0x99CCFF));
+    xCellProps->setPropertyValue(backColorPropertyName, 
Any(static_cast<sal_Int32>(0x99CCFF)));
 
     // set table borders
     // create description for blue line, width 10
@@ -336,14 +336,14 @@ void manipulateTable(const Reference<XCellRange>& 
xCellRange)
 void manipulateShape(const Reference<XShape>& xShape)
 {
     Reference<XPropertySet> xShapeProps = Reference<XPropertySet>(xShape, 
UNO_QUERY_THROW);
-    xShapeProps->setPropertyValue("FillColor", Any(0x99CCFF));
-    xShapeProps->setPropertyValue("LineColor", Any(0x000099));
-    xShapeProps->setPropertyValue("RotateAngle", Any(3000));
-
-    xShapeProps->setPropertyValue("TextLeftDistance", Any(0));
-    xShapeProps->setPropertyValue("TextRightDistance", Any(0));
-    xShapeProps->setPropertyValue("TextUpperDistance", Any(0));
-    xShapeProps->setPropertyValue("TextLowerDistance", Any(0));
+    xShapeProps->setPropertyValue("FillColor", 
Any(static_cast<sal_Int32>(0x99CCFF)));
+    xShapeProps->setPropertyValue("LineColor", 
Any(static_cast<sal_Int32>(0x000099)));
+    xShapeProps->setPropertyValue("RotateAngle", 
Any(static_cast<sal_Int32>(3000)));
+
+    xShapeProps->setPropertyValue("TextLeftDistance", 
Any(static_cast<sal_Int32>(0)));
+    xShapeProps->setPropertyValue("TextRightDistance", 
Any(static_cast<sal_Int32>(0)));
+    xShapeProps->setPropertyValue("TextUpperDistance", 
Any(static_cast<sal_Int32>(0)));
+    xShapeProps->setPropertyValue("TextLowerDistance", 
Any(static_cast<sal_Int32>(0)));
 }
 
 Reference<XComponent> newDocComponent(const OUString docType)

Reply via email to