Kaydet (Commit) 53b97fd4 authored tarafından Stephan Bergmann's avatar Stephan Bergmann Kaydeden (comit) Michael Stahl

/org.openoffice.Office.Writer/FormLetter/MailingOutput/Format is xs:int

...i.e., sal_Int32.  Regression introduced with
ba9acdf7 "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 25a60d19
"/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/26285Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
Tested-by: 's avatarStephan Bergmann <sbergman@redhat.com>
(cherry picked from commit abca482a)
Reviewed-on: https://gerrit.libreoffice.org/26286Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMichael Stahl <mstahl@redhat.com>
üst f44047ae
...@@ -1250,7 +1250,7 @@ void SwMiscConfig::ImplCommit() ...@@ -1250,7 +1250,7 @@ void SwMiscConfig::ImplCommit()
case 3 : pValues[nProp] <<= bGrfToGalleryAsLnk; break; case 3 : pValues[nProp] <<= bGrfToGalleryAsLnk; break;
case 4 : pValues[nProp] <<= bNumAlignSize; break; case 4 : pValues[nProp] <<= bNumAlignSize; break;
case 5 : pValues[nProp] <<= bSinglePrintJob; 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 7 : pValues[nProp] <<= sNameFromColumn; break;
case 8 : pValues[nProp] <<= sMailingPath; break; case 8 : pValues[nProp] <<= sMailingPath; break;
case 9 : pValues[nProp] <<= sMailName; break; case 9 : pValues[nProp] <<= sMailName; break;
...@@ -1282,7 +1282,13 @@ void SwMiscConfig::Load() ...@@ -1282,7 +1282,13 @@ void SwMiscConfig::Load()
case 3 : bGrfToGalleryAsLnk = *static_cast<sal_Bool const *>(pValues[nProp].getValue()); break; 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 4 : bNumAlignSize = *static_cast<sal_Bool const *>(pValues[nProp].getValue()); break;
case 5 : bSinglePrintJob = *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 7 : pValues[nProp] >>= sTmp; sNameFromColumn = sTmp; break;
case 8 : pValues[nProp] >>= sTmp; sMailingPath = sTmp; break; case 8 : pValues[nProp] >>= sTmp; sMailingPath = sTmp; break;
case 9 : pValues[nProp] >>= sTmp; sMailName = sTmp; break; case 9 : pValues[nProp] >>= sTmp; sMailName = sTmp; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment