diff options
author | Joren De Cuyper <jorendc@libreoffice.org> | 2015-05-15 20:11:52 +0200 |
---|---|---|
committer | Joren De Cuyper <jorendc@libreoffice.org> | 2015-05-20 10:50:00 +0000 |
commit | fcc7ba441ec8e5116bbcc08c88b5ddb7c892c988 (patch) | |
tree | 6ebc434293d6081683c65b158eb1191421bc69b1 /sw | |
parent | 2b5d533651333a27dd46e494fcd1a016483bb0b1 (diff) |
tdf#85911 docx: export comment initials
Change-Id: I1437c197312911a15a50715235d840b24117bfba
Reviewed-on: https://gerrit.libreoffice.org/15742
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Joren De Cuyper <jorendc@libreoffice.org>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/comment_initials.odt | bin | 0 -> 9335 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport7.cxx | 9 | ||||
-rw-r--r-- | sw/source/uibase/fldui/fldmgr.cxx | 4 |
3 files changed, 12 insertions, 1 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/comment_initials.odt b/sw/qa/extras/ooxmlexport/data/comment_initials.odt Binary files differnew file mode 100644 index 000000000000..9b84ed859215 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/comment_initials.odt diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx index 03acd850db0b..6dec1e137b11 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 5a1d5e49a27b..80308ff785b5 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; |