[Libreoffice-commits] core.git: sw/qa sw/source

Miklos Vajna vmiklos at collabora.co.uk
Thu Jan 9 07:52:56 PST 2014


 sw/qa/extras/ww8export/ww8export.cxx |    2 ++
 sw/source/filter/ww8/ww8par.cxx      |   12 ++++++------
 2 files changed, 8 insertions(+), 6 deletions(-)

New commits:
commit 57ded88656b548063cc000628920a601f0c708f6
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Thu Jan 9 16:42:26 2014 +0100

    DOC import of annotation marks
    
    Unit test is disabled, let's enable that when the export is working as
    well.
    
    Change-Id: I2d93ae38f480974a13cf9907f6cc82815fb3e69a

diff --git a/sw/qa/extras/ww8export/ww8export.cxx b/sw/qa/extras/ww8export/ww8export.cxx
index b66d895..39f6c79 100644
--- a/sw/qa/extras/ww8export/ww8export.cxx
+++ b/sw/qa/extras/ww8export/ww8export.cxx
@@ -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
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index a8d2387..f202945 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -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;
 }
 


More information about the Libreoffice-commits mailing list