summaryrefslogtreecommitdiff
path: root/odk
diff options
context:
space:
mode:
authorHossein <hossein@libreoffice.org>2024-05-16 13:19:58 +0200
committerRené Engelhard <rene@debian.org>2024-05-16 17:14:22 +0200
commit12447b7c70cd1314c35fe7e2ae89078abdd9a4a6 (patch)
tree29cbe92d26944356941ce3c2640bc32f440296cd /odk
parent9d3c6b31158aedc33bd616981f0f80af8a0ed1b0 (diff)
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 <rene@debian.org> Tested-by: René Engelhard <rene@debian.org>
Diffstat (limited to 'odk')
-rw-r--r--odk/examples/DevelopersGuide/FirstSteps/HelloTextTableShape/cxx/HelloTextTableShape.cxx20
1 files changed, 10 insertions, 10 deletions
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)