diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-07-18 17:00:52 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-07-18 17:27:09 +0100 |
commit | b0f170d7df9cff12535d2ecfd146b32b745a8ef8 (patch) | |
tree | e09f240df49300cb5848b9b1e9441682d6ca690c /sw/source/core/txtnode | |
parent | 165640076df65971eb01f887a3c285cd6eb61d94 (diff) |
0xFFF9 is a better choice for CH_TXTATR_INWORD than 0x0002.
a) the default properties for the code point make it not split a word it
appears in into two different words in any break mode we have. Which is what we
want from a CH_TXTATR_INWORD
b) unicode TR#20 gives for the interlinear annotation anchor: "What to do if
detected: In a proxy context or browser context, remove U+FFF9", so when we
need to strip it from text to run that text through e.g. the spellchecker or
word counting then there's a solid precedent for stripping it
In addition I *do* want the footnote placeholder to break the word it appears
in, that gives the desired wordcount and cursor travelling behaviour
The BREAKWORD and other *random* selection of CH_TXTATR are still odd choices,
and there's way too many of them.
Change-Id: I930ff8ff806af448829bc1a1ae6cb92053e9a284
Diffstat (limited to 'sw/source/core/txtnode')
-rw-r--r-- | sw/source/core/txtnode/ndtxt.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/txtnode/thints.cxx | 6 | ||||
-rw-r--r-- | sw/source/core/txtnode/txtedt.cxx | 10 |
3 files changed, 9 insertions, 9 deletions
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index 85336a8e42a6..0f24ecf87ae7 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -1377,7 +1377,7 @@ void lcl_CopyHint( const sal_uInt16 nWhich, const SwTxtAttr * const pHt, case RES_TXTATR_META: case RES_TXTATR_METAFIELD: OSL_ENSURE(pNewHt, "copying Meta should not fail!"); - OSL_ENSURE(pDest && (CH_TXTATR_INWORD == + OSL_ENSURE(pDest && (CH_TXTATR_BREAKWORD == pDest->GetTxt().GetChar(*pNewHt->GetStart())), "missing CH_TXTATR?"); break; diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx index fd419ef9d7f6..a1afcde4cfa0 100644 --- a/sw/source/core/txtnode/thints.cxx +++ b/sw/source/core/txtnode/thints.cxx @@ -3013,16 +3013,16 @@ sal_Unicode GetCharOfTxtAttr( const SwTxtAttr& rAttr ) sal_Unicode cRet = CH_TXTATR_BREAKWORD; switch ( rAttr.Which() ) { - case RES_TXTATR_FTN: case RES_TXTATR_REFMARK: case RES_TXTATR_TOXMARK: - case RES_TXTATR_META: - case RES_TXTATR_METAFIELD: cRet = CH_TXTATR_INWORD; break; case RES_TXTATR_FIELD: case RES_TXTATR_FLYCNT: + case RES_TXTATR_FTN: + case RES_TXTATR_META: + case RES_TXTATR_METAFIELD: { cRet = CH_TXTATR_BREAKWORD; diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx index 26716a7cf79c..7da33e915e77 100644 --- a/sw/source/core/txtnode/txtedt.cxx +++ b/sw/source/core/txtnode/txtedt.cxx @@ -942,11 +942,11 @@ sal_uInt16 SwTxtNode::Spell(SwSpellArgs* pArgs) } else { - // make sure the selection build later from the - // data below does not include footnotes and other - // "in word" character to the left and right in order - // to preserve those. Therefore count those "in words" - // in order to modify the selection accordingly. + // make sure the selection build later from the data + // below does not include "in word" character to the + // left and right in order to preserve those. Therefore + // count those "in words" in order to modify the + // selection accordingly. const sal_Unicode* pChar = rWord.GetBuffer(); xub_StrLen nLeft = 0; while (pChar && *pChar++ == CH_TXTATR_INWORD) |