summaryrefslogtreecommitdiff
path: root/editeng/source
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2023-06-09 16:06:37 +0900
committerTomaž Vajngerl <quikee@gmail.com>2023-06-09 14:12:18 +0200
commit7d2a7307da71b245fe55c55c5a29f4695c3c54f7 (patch)
treeb1d063405b1f8cb0fb002511fca945b469766a33 /editeng/source
parent30bc5fdb49621269b7281aace610ca85b150766c (diff)
fix wrong transform type, error handling when JSON parsing
also fix theme export - change scheme enum type name "hlink" to "hyperlink" and "folHlink" to "followedHyperlink" Change-Id: Id5435d59cd51352efc4a4a8e333ec1ff45847a6f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152782 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'editeng/source')
-rw-r--r--editeng/source/items/textitem.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx
index 2f11ab7bb9b2..546918197a34 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -1555,11 +1555,11 @@ bool SvxColorItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
return false;
if (sComplexColorJson.isEmpty())
- {
return false;
- }
+
OString aJSON = OUStringToOString(sComplexColorJson, RTL_TEXTENCODING_ASCII_US);
- model::color::convertFromJSON(aJSON, maComplexColor);
+ if (!model::color::convertFromJSON(aJSON, maComplexColor))
+ return false;
}
break;
case MID_COMPLEX_COLOR:
@@ -1575,7 +1575,8 @@ bool SvxColorItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
case MID_COLOR_RGB:
default:
{
- return rVal >>= mColor;
+ if (!(rVal >>= mColor))
+ return false;
}
break;
}