diff options
author | Henning Brinkmann <hbrinkm@openoffice.org> | 2011-03-16 11:04:37 +0100 |
---|---|---|
committer | Henning Brinkmann <hbrinkm@openoffice.org> | 2011-03-16 11:04:37 +0100 |
commit | 88cf9216c48bd6a52f6a64b146b5e8916868a6d9 (patch) | |
tree | dcc0c0f0fe3314f562406452e2051f33d7ce34c5 | |
parent | 2c284c0d082c4dff8545e51b8b2c58324d59f9b0 (diff) |
sw34bf05: #i86906# Set property DefaultText of combobox from Dropbox form field's selected item
-rw-r--r-- | sw/source/filter/ww8/ww8par3.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index 88d1f49ad8..c75f90c54d 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -2192,7 +2192,7 @@ void WW8FormulaControl::FormulaRead(SwWw8ControlType nWhich, nType=1; } fUnknown = nHeaderByte & 0x3; - fDropdownIndex = (nHeaderByte & 0xFC) >> 2; + fDropdownIndex = (nHeaderByte & 0x7C) >> 2; *pDataStream >> nField; fToolTip = nField & 0x01; fNoMark = (nField & 0x02)>>1; @@ -2485,7 +2485,15 @@ sal_Bool WW8FormulaListBox::Import(const uno::Reference < aTmp <<= aListSource; xPropSet->setPropertyValue(C2U("StringItemList"), aTmp ); - aTmp <<= aListSource[0]; + if (fDropdownIndex < nLen) + { + aTmp <<= aListSource[fDropdownIndex]; + } + else + { + aTmp <<= aListSource[0]; + } + xPropSet->setPropertyValue(C2U("DefaultText"), aTmp ); rSz = rRdr.MiserableDropDownFormHack(maListEntries[0], xPropSet); |