diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2023-06-09 16:06:37 +0900 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2023-06-12 17:56:02 +0200 |
commit | 7f7bada86cb2ac495d27fce9aca56a4dc9b0aedc (patch) | |
tree | d992159d52578405658811e15ca43b20b1586c77 /editeng | |
parent | f60e889c95cc894eaae06ea2199e2b2d107d54a0 (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>
(cherry picked from commit 7d2a7307da71b245fe55c55c5a29f4695c3c54f7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152883
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/items/textitem.cxx | 9 |
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; } |