sw/source/uibase/config/modcfg.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
New commits: commit 53b97fd4d058ac36b20555b843a8194b6128e4e3 Author: Stephan Bergmann <sberg...@redhat.com> Date: Wed Jun 15 08:38:46 2016 +0200 /org.openoffice.Office.Writer/FormLetter/MailingOutput/Format is xs:int ...i.e., sal_Int32. Regression introduced with ba9acdf799bf556c8a20b1dc27eb116e23d481db "convert TXTFORMAT constants to scoped enum". (The problem with storing a sal_uInt8 in an Any is that sal_uInt8 == sal_Bool, so actually a Boolean Any is constructed---and configmgr will throw an exception when trying to set that value for the "Format" prop. The problem with extracting a sal_uInt8 from a sal_Int32 Any with getValue/static_cast is that it doesn't even read (only) the low order bits, but on big endian machines reads the high order bits.) This is a backported version of 25a60d19d56a4bdb4f1b6ef27d842f90617fcff8 "/org.openoffice.Office.Writer/FormLetter/MailingOutput/Format is xs:int" which uses o3tl::doAccess newly introduced on master. Change-Id: I654da713bbf78b3215de7a09056a5172fc204258 Reviewed-on: https://gerrit.libreoffice.org/26285 Reviewed-by: Stephan Bergmann <sberg...@redhat.com> Tested-by: Stephan Bergmann <sberg...@redhat.com> (cherry picked from commit abca482aebeb01d516816b543a07edc1dd178240) Reviewed-on: https://gerrit.libreoffice.org/26286 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Michael Stahl <mst...@redhat.com> diff --git a/sw/source/uibase/config/modcfg.cxx b/sw/source/uibase/config/modcfg.cxx index 2e40ba7..f0c8185 100644 --- a/sw/source/uibase/config/modcfg.cxx +++ b/sw/source/uibase/config/modcfg.cxx @@ -1250,7 +1250,7 @@ void SwMiscConfig::ImplCommit() case 3 : pValues[nProp] <<= bGrfToGalleryAsLnk; break; case 4 : pValues[nProp] <<= bNumAlignSize; break; case 5 : pValues[nProp] <<= bSinglePrintJob; break; - case 6 : pValues[nProp] <<= static_cast<sal_uInt8>(nMailingFormats); break; + case 6 : pValues[nProp] <<= static_cast<sal_Int32>(nMailingFormats); break; case 7 : pValues[nProp] <<= sNameFromColumn; break; case 8 : pValues[nProp] <<= sMailingPath; break; case 9 : pValues[nProp] <<= sMailName; break; @@ -1282,7 +1282,13 @@ void SwMiscConfig::Load() case 3 : bGrfToGalleryAsLnk = *static_cast<sal_Bool const *>(pValues[nProp].getValue()); break; case 4 : bNumAlignSize = *static_cast<sal_Bool const *>(pValues[nProp].getValue()); break; case 5 : bSinglePrintJob = *static_cast<sal_Bool const *>(pValues[nProp].getValue()); break; - case 6 : nMailingFormats = static_cast<MailTextFormats>(*static_cast<sal_uInt8 const *>(pValues[nProp].getValue())); break; + case 6 : + { + sal_Int32 n = 0; + pValues[nProp] >>= n; + nMailingFormats = static_cast<MailTextFormats>(n); + break; + } case 7 : pValues[nProp] >>= sTmp; sNameFromColumn = sTmp; break; case 8 : pValues[nProp] >>= sTmp; sMailingPath = sTmp; break; case 9 : pValues[nProp] >>= sTmp; sMailName = sTmp; break; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits