summaryrefslogtreecommitdiff
path: root/sd/source/filter
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-06-17 15:47:59 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-06-18 09:27:02 +0200
commit3c24e7ed972ae2fc431365e4884e27c0b243c905 (patch)
tree13a002f29a485aacd9214b9ecd45c1ae57c8cca6 /sd/source/filter
parent4968b6484707cb40b70a3115084e19433d1fec7f (diff)
avoid maybe-uninitialized in PowerPointShapeExport
/home/noel/libo3/sd/source/filter/eppt/pptx-epptooxml.cxx: In member function ‘oox::drawingml::ShapeExport& oox::core::PowerPointShapeExport::WritePlaceholderReferenceTextBody(oox::core::PlaceholderType, PageType, com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet>)’: /home/noel/libo3/sd/source/filter/eppt/pptx-epptooxml.cxx:1715:31: error: ‘nDateTimeFormat’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 1715 | SvxTimeFormat eTime = static_cast<SvxTimeFormat>(nDateTimeFormat >> 4); | ^~~~~ /home/noel/libo3/sd/source/filter/eppt/pptx-epptooxml.cxx:1707:36: error: ‘bIsDateTimeFixed’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 1707 | if(ePageType != LAYOUT && !bIsDateTimeFixed) | ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ Change-Id: I7f622321680705fb0b0fa42630949c8d6af8488e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117398 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/filter')
-rw-r--r--sd/source/filter/eppt/pptx-epptooxml.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx
index b34da51dcfe3..18356f1ec595 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -1701,12 +1701,12 @@ ShapeExport& PowerPointShapeExport::WritePlaceholderReferenceTextBody(
case DateAndTime:
{
OUString aDateTimeType = "datetime1";
- bool bIsDateTimeFixed;
+ bool bIsDateTimeFixed = false;
xPagePropSet->getPropertyValue("IsDateTimeFixed") >>= bIsDateTimeFixed;
if(ePageType != LAYOUT && !bIsDateTimeFixed)
{
- sal_Int32 nDateTimeFormat;
+ sal_Int32 nDateTimeFormat = 0;
xPagePropSet->getPropertyValue("DateTimeFormat") >>= nDateTimeFormat;
// 4 LSBs represent the date