tdf#149785 Read Error importing document

after
    commit 04073c5fed
    Author: Noel Grandin <noel.grandin@collabora.co.uk>
    Date:   Tue Jun 21 13:17:09 2022 +0200
    replace oox::OptValue with std::optional

and add a SAL_WARN to make this easier to diagnose in the future

Change-Id: Ia5be0b82e3a5df34f50bc8a2decb1de98e0c5556
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136665
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2022-06-30 19:12:52 +02:00
parent 5cbbbe559e
commit e64e4e373e
2 changed files with 3 additions and 1 deletions
+2 -1
View File
@@ -502,7 +502,8 @@ void TableCell::pushToXCell( const ::oox::core::XmlFilterBase& rFilterBase, cons
applyLineAttributes( rFilterBase, xPropSet, aLinePropertiesInsideV, PROP_RightBorder );
}
if (rProperties.getBgColor().isUsed() && !maFillProperties.maFillColor.isUsed() && maFillProperties.moFillType.value() == XML_noFill)
if (rProperties.getBgColor().isUsed() && !maFillProperties.maFillColor.isUsed() &&
maFillProperties.moFillType.value_or(0) == XML_noFill)
{
maFillProperties.moFillType = XML_solidFill;
maFillProperties.maFillColor = rProperties.getBgColor();
+1
View File
@@ -2333,6 +2333,7 @@ bool SfxObjectShell::ImportFrom(SfxMedium& rMedium,
{
const char *msg = e.what();
const OUString sError(msg, strlen(msg), RTL_TEXTENCODING_ASCII_US);
SAL_WARN("sfx.doc", "exception importing " << sError);
SetError(*new StringErrorInfo(ERRCODE_SFX_DOLOADFAILED,
sError, DialogMask::ButtonsOk | DialogMask::MessageError));
}