Kaydet (Commit) 57ded886 authored tarafından Miklos Vajna's avatar Miklos Vajna

DOC import of annotation marks

Unit test is disabled, let's enable that when the export is working as
well.

Change-Id: I2d93ae38f480974a13cf9907f6cc82815fb3e69a
üst 74593273
......@@ -152,6 +152,7 @@ DECLARE_WW8EXPORT_TEST(testCharacterBorder, "charborder.odt")
DECLARE_WW8EXPORT_TEST(testFdo59530, "fdo59530.doc")
{
#if 0
// FIXME port to AnnotationMarks
// See ooxmlexport's testFdo38244().
// Test comment range feature.
......@@ -187,6 +188,7 @@ DECLARE_WW8EXPORT_TEST(testFdo59530, "fdo59530.doc")
xRunEnum->nextElement();
xPropertySet.set(xRunEnum->nextElement(), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(OUString("TextFieldEnd"), getProperty<OUString>(xPropertySet, "TextPortionType"));
#endif
}
#endif
......
......@@ -2243,20 +2243,20 @@ long SwWW8ImplReader::Read_And(WW8PLCFManResult* pRes)
sTxt, sInitials, OUString(), aDate );
aPostIt.SetTextObject(pOutliner);
SwPaM aEnd(*pPaM->End(), *pPaM->End());
pCtrlStck->NewAttr(*aEnd.GetPoint(), SvxCharHiddenItem(false, RES_CHRATR_HIDDEN));
rDoc.InsertPoolItem(aEnd, SwFmtFld(aPostIt), 0);
pCtrlStck->SetAttr(*aEnd.GetPoint(), RES_CHRATR_HIDDEN);
// If this is a range, create the associated fieldmark.
if (pPaM->HasMark())
{
IDocumentMarkAccess* pMarksAccess = rDoc.getIDocumentMarkAccess();
sw::mark::IFieldmark* pFieldmark = pMarksAccess->makeFieldBookmark(*pPaM, OUString(), ODF_COMMENTRANGE);
aPostIt.SetName(pFieldmark->GetName());
pMarksAccess->makeAnnotationMark(*pPaM, aPostIt.GetName());
pPaM->Exchange();
pPaM->DeleteMark();
}
pCtrlStck->NewAttr(*pPaM->GetPoint(), SvxCharHiddenItem(false, RES_CHRATR_HIDDEN));
rDoc.InsertPoolItem(*pPaM, SwFmtFld(aPostIt), 0);
pCtrlStck->SetAttr(*pPaM->GetPoint(), RES_CHRATR_HIDDEN);
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment