summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJian Hong Cheng <chengjh@apache.org>2012-08-29 04:27:52 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-05-27 12:54:15 +0100
commitf9a3a8a41dc448d551405c53d17f67e9ad1928dc (patch)
tree3691a87156cfc2e89d668d5bc4d954d256baa652 /sw
parentd1ea2722b0d13632818142b84fa7989fb9d5085f (diff)
Fix issue #i120654: Number range variable filed shows in AOO
* sw/source/filter/ww8/ww8par5.cxx MS Word Binary compatibility Patch by: Jane Kang,<kangjane2012@gmail.com> Found by: Yan Ji,<yanji.yj@gmail.com> Review by: Jian Hong Cheng,<chengjh@apache.org> (cherry picked from commit 720fc77527377968a45631d1c6a711b4cae02d39) Change-Id: I428fadd46bbd5b57081e35dcbfd6bb0c10c08282
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index 8cfdeed55d18..163f9b8a79df 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -1524,6 +1524,8 @@ eF_ResT SwWW8ImplReader::Read_F_Seq( WW8FieldDesc*, String& rStr )
{
String aSequenceName;
String aBook;
+ bool bHidden = false;
+ bool bFormat = false;
bool bCountOn = true;
String sStart;
SvxExtNumType eNumFormat = SVX_NUM_ARABIC;
@@ -1541,9 +1543,12 @@ eF_ResT SwWW8ImplReader::Read_F_Seq( WW8FieldDesc*, String& rStr )
break;
case 'h':
+ if( !bFormat )
+ bHidden = true; // Hidden-Flag aktivieren
break;
case '*':
+ bFormat = true; // Format-Flag aktivieren
nRet = aReadParam.SkipToNextToken();
if( -2 == nRet && !( aReadParam.GetResult().EqualsAscii("MERGEFORMAT") || aReadParam.GetResult().EqualsAscii("CHARFORMAT") ))
eNumFormat = GetNumTypeFromName( aReadParam.GetResult() );
@@ -1576,6 +1581,10 @@ eF_ResT SwWW8ImplReader::Read_F_Seq( WW8FieldDesc*, String& rStr )
SwSetExpFieldType( &rDoc, aSequenceName, nsSwGetSetExpType::GSE_SEQ ) );
SwSetExpField aFld( pFT, aEmptyStr, eNumFormat );
+ //#i120654# Add bHidden for /h flag (/h: Hide the field result.)
+ if (bHidden)
+ aFld.SetSubType(aFld.GetSubType() | nsSwExtendedSubType::SUB_INVISIBLE);
+
if (sStart.Len())
aFld.SetFormula( ( aSequenceName += '=' ) += sStart );
else if (!bCountOn)