summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8/ww8par.cxx
diff options
context:
space:
mode:
authorZolnai Tamás <tamas.zolnai@collabora.com>2014-01-03 11:38:05 +0100
committerZolnai Tamás <tamas.zolnai@collabora.com>2014-01-06 02:13:31 +0100
commit28d59a1a48d633f438e344f247362af0858d8911 (patch)
treebc0ec5f3dd24f4d0b03b89e817850cb9321c8398 /sw/source/filter/ww8/ww8par.cxx
parent9ac100fc1eaea06ebd80c4009ac7ebc3aee6fd50 (diff)
cp#2013101510000026: wrong highlight of commented text range imported from doc
When makeFieldBookmark() method is called with ODF_COMMENTRANGE it will ignore the added field name and generate an own one. We have to set the name of the SwPostItField to this generated name so these two names will match. Note: lTagBkmk is only an identifier but not the exported name of the fieldmark so we don't need to stick to use it as a name. (cherry picked from commit 12e287220ebaf3a8f5eaf7bf526dce2c47f45a20) Conflicts: sw/source/filter/ww8/ww8par.cxx (cherry picked from commit d6fc6624e1319257945f49388d635c36685108d5) Change-Id: I499abdcce1be0563c308bcf9f5c0a959a07f858b
Diffstat (limited to 'sw/source/filter/ww8/ww8par.cxx')
-rw-r--r--sw/source/filter/ww8/ww8par.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index b34b96600055..56040b7332ab 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -1790,7 +1790,6 @@ long SwWW8ImplReader::Read_And(WW8PLCFManResult* pRes)
String sAuthor;
String sInitials;
- String sName;
if( bVer67 )
{
const WW67_ATRD* pDescri = (const WW67_ATRD*)pSD->GetData();
@@ -1820,7 +1819,6 @@ long SwWW8ImplReader::Read_And(WW8PLCFManResult* pRes)
sal_uInt32 nTagBkmk = SVBT32ToUInt32(pDescri->ITagBkmk);
if (nTagBkmk != 0xFFFFFFFF)
{
- sName = OUString::valueOf(sal_Int32(nTagBkmk));
int nAtnIndex = GetAnnotationIndex(nTagBkmk);
if (nAtnIndex != -1)
{
@@ -1855,14 +1853,15 @@ long SwWW8ImplReader::Read_And(WW8PLCFManResult* pRes)
this->pFmtOfJustInsertedApo = 0;
SwPostItField aPostIt(
(SwPostItFieldType*)rDoc.GetSysFldType(RES_POSTITFLD), sAuthor,
- sTxt, sInitials, sName, aDate );
+ sTxt, sInitials, String(), aDate );
aPostIt.SetTextObject(pOutliner);
// If this is a range, create the associated fieldmark.
if (pPaM->HasMark())
{
IDocumentMarkAccess* pMarksAccess = rDoc.getIDocumentMarkAccess();
- pMarksAccess->makeFieldBookmark(*pPaM, aPostIt.GetName(), ODF_COMMENTRANGE);
+ sw::mark::IFieldmark* pFieldmark = pMarksAccess->makeFieldBookmark(*pPaM, OUString(), ODF_COMMENTRANGE);
+ aPostIt.SetName(pFieldmark->GetName());
pPaM->Exchange();
pPaM->DeleteMark();
}