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

Joren De Cuyper jorendc at libreoffice.org
Wed May 20 03:50:26 PDT 2015


 sw/qa/extras/ooxmlexport/data/comment_initials.odt |binary
 sw/qa/extras/ooxmlexport/ooxmlexport7.cxx          |    9 +++++++++
 sw/source/uibase/fldui/fldmgr.cxx                  |    4 +++-
 3 files changed, 12 insertions(+), 1 deletion(-)

New commits:
commit fcc7ba441ec8e5116bbcc08c88b5ddb7c892c988
Author: Joren De Cuyper <jorendc at libreoffice.org>
Date:   Fri May 15 20:11:52 2015 +0200

    tdf#85911 docx: export comment initials
    
    Change-Id: I1437c197312911a15a50715235d840b24117bfba
    Reviewed-on: https://gerrit.libreoffice.org/15742
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Joren De Cuyper <jorendc at libreoffice.org>

diff --git a/sw/qa/extras/ooxmlexport/data/comment_initials.odt b/sw/qa/extras/ooxmlexport/data/comment_initials.odt
new file mode 100644
index 0000000..9b84ed8
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/comment_initials.odt differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
index 03acd85..6dec1e1 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
@@ -851,6 +851,15 @@ DECLARE_OOXMLEXPORT_TEST(testDashedLine_CustDashPercentage, "dashed_line_custdas
     assertXPath(pXmlDoc,"/w:document/w:body/w:p[1]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/a:graphic[1]/a:graphicData[1]/wps:wsp[1]/wps:spPr[1]/a:ln[1]/a:custDash[1]/a:ds[3]", "sp", "300000");
 }
 
+DECLARE_OOXMLEXPORT_TEST(testCommentInitials, "comment_initials.odt")
+{
+    xmlDocPtr pXmlDoc = parseExport("word/comments.xml");
+    if (!pXmlDoc)
+      return;
+
+    assertXPath(pXmlDoc,"/w:comments/w:comment[1]", "initials", "initials");
+}
+
 DECLARE_OOXMLEXPORT_TEST(testTextboxRoundedCorners, "textbox-rounded-corners.docx")
 {
     uno::Reference<drawing::XShape> xShape = getShape(1);
diff --git a/sw/source/uibase/fldui/fldmgr.cxx b/sw/source/uibase/fldui/fldmgr.cxx
index 5a1d5e4..80308ff 100644
--- a/sw/source/uibase/fldui/fldmgr.cxx
+++ b/sw/source/uibase/fldui/fldmgr.cxx
@@ -78,6 +78,7 @@
 #include <tox.hxx>
 #include <misc.hrc>
 #include <cnttab.hxx>
+#include <unotools/useroptions.hxx>
 
 using namespace com::sun::star::uno;
 using namespace com::sun::star::container;
@@ -773,13 +774,14 @@ bool SwFldMgr::InsertFld(
     {   // ATTENTION this field is inserted by a separate dialog
         case TYP_POSTITFLD:
         {
+            SvtUserOptions aUserOpt;
             SwPostItFieldType* pType = static_cast<SwPostItFieldType*>(pCurShell->GetFldType(0, RES_POSTITFLD));
             SwPostItField* pPostItField =
                 new SwPostItField(
                     pType,
                     rData.m_sPar1, // author
                     rData.m_sPar2, // content
-                    OUString(), // author's initials
+                    aUserOpt.GetID(), // author's initials
                     OUString(), // name
                     DateTime(DateTime::SYSTEM) );
             pFld = pPostItField;


More information about the Libreoffice-commits mailing list