summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-11-04 12:37:45 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-11-04 16:37:45 +0100
commitdfa26e6d489a2c5bd79652450a9f27343008d37f (patch)
tree390ceac1fde77f16e650ba67d3e78cbae3ceb2e3
parent6bd4e60930925e1738b71536cbf3363a15000a63 (diff)
bnc#636128 DOC import: handle FFData.cch
Change-Id: I8020ce561a72f10b8f0f517d50407a802049bd48
-rw-r--r--sw/source/filter/ww8/ww8par.hxx4
-rw-r--r--sw/source/filter/ww8/ww8par3.cxx5
2 files changed, 6 insertions, 3 deletions
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index 6e0349b8a8b2..953ee5e4bd5f 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -662,7 +662,7 @@ public:
WW8FormulaControl(const OUString& rN, SwWW8ImplReader &rR)
: rRdr(rR), fUnknown(0), fDropdownIndex(0),
fToolTip(0), fNoMark(0), fUseSize(0), fNumbersOnly(0), fDateOnly(0),
- fUnused(0), nSize(0), hpsCheckBox(20), nChecked(0), sName( rN )
+ fUnused(0), nSize(0), hpsCheckBox(20), nChecked(0), mnMaxLen(0), sName( rN )
{
}
sal_uInt8 fUnknown:2;
@@ -678,6 +678,8 @@ public:
sal_uInt16 hpsCheckBox;
sal_uInt16 nChecked;
+ /// FFData.cch in the spec: maximum length, in characters, of the value of the textbox.
+ sal_uInt16 mnMaxLen;
OUString sTitle;
OUString sDefault;
OUString sFormatting;
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index 046e14685ebb..5e3bbe99c4c8 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -165,6 +165,8 @@ eF_ResT SwWW8ImplReader::Read_F_FormTextBox( WW8FieldDesc* pF, OUString& rStr )
maFieldStack.back().SetBookmarkType(ODF_FORMTEXT);
maFieldStack.back().getParameters()["Description"] = uno::makeAny(OUString(aFormula.sToolTip));
maFieldStack.back().getParameters()["Name"] = uno::makeAny(OUString(aFormula.sTitle));
+ if (aFormula.mnMaxLen)
+ maFieldStack.back().getParameters()["MaxLength"] = uno::makeAny(OUString::number(aFormula.mnMaxLen));
}
return FLD_TEXT;
}
@@ -2144,8 +2146,7 @@ void WW8FormulaControl::FormulaRead(SwWw8ControlType nWhich,
sal_uInt8 iRes = (bits1 & 0x7C) >> 2;
- sal_uInt16 cch = 0;
- pDataStream->ReadUInt16( cch );
+ pDataStream->ReadUInt16( mnMaxLen );
sal_uInt16 hps = 0;
pDataStream->ReadUInt16( hps );