[Libreoffice-commits] .: sw/source

Caolán McNamara caolan at kemper.freedesktop.org
Thu Feb 24 03:00:21 PST 2011


 sw/source/filter/ww8/ww8par.cxx |   12 ++++++++++++
 1 file changed, 12 insertions(+)

New commits:
commit f4f22dc6d8d50f8373f360bd06c3b9508bd4b07d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 24 10:56:07 2011 +0000

    For character properties check the exact position in the SwTxtNode

diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 94e2564..8f3daed 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -1112,6 +1112,18 @@ const SfxPoolItem* SwWW8FltControlStack::GetFmtAttr(const SwPosition& rPos,
                     pItem = &(rReader.pCollA[rReader.nAktColl].maWordLR);
             }
 
+            /*
+            If we're hunting for a character property, try and exact position
+            within the text node for lookup
+            */
+            if (pNd->IsTxtNode())
+            {
+                xub_StrLen nPos = rPos.nContent.GetIndex();
+                SfxItemSet aSet(pDoc->GetAttrPool(), nWhich, nWhich);
+                if (static_cast<const SwTxtNode*>(pNd)->GetAttr(aSet, nPos, nPos))
+                    pItem = aSet.GetItem(nWhich);
+            }
+
             if (!pItem)
                 pItem = &pNd->GetAttr(nWhich);
         }


More information about the Libreoffice-commits mailing list