summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/filter/ww8/ww8par3.cxx5
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx1
2 files changed, 4 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index 97701b5a2ea6..e62e13f6572d 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -91,8 +91,9 @@ eF_ResT SwWW8ImplReader::Read_F_FormTextBox( WW8FieldDesc* pF, OUString& rStr )
{
WW8FormulaEditBox aFormula(*this);
- if (pF->nLCode && rStr[pF->nLCode-1]==0x01) {
- ImportFormulaControl(aFormula,pF->nSCode+pF->nLCode-1, WW8_CT_EDIT);
+ sal_Int32 const nPos(rStr.indexOf(0x01));
+ if (pF->nLCode && nPos != -1 && nPos < pF->nLCode) {
+ ImportFormulaControl(aFormula, pF->nSCode + nPos, WW8_CT_EDIT);
}
/*
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index 1ddbb49c3823..4089c42a665f 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -895,6 +895,7 @@ long SwWW8ImplReader::Read_Field(WW8PLCFManResult* pRes)
if (aF.nId == 33) aF.bCodeNest=false; // do not recurse into nested page fields
bool bCodeNest = aF.bCodeNest;
if ( aF.nId == 6 ) bCodeNest = false; // We can handle them and lose the inner data
+ if (aF.nId == 70) bCodeNest = false; // need to import 0x01 in FORMTEXT
m_aFieldStack.emplace_back(*m_pPaM->GetPoint(), aF.nId);