diff options
-rw-r--r-- | offapi/com/sun/star/text/textfield/Annotation.idl | 5 | ||||
-rw-r--r-- | sw/inc/docufld.hxx | 3 | ||||
-rw-r--r-- | sw/inc/unoprnms.hxx | 4 | ||||
-rw-r--r-- | sw/source/core/fields/docufld.cxx | 12 | ||||
-rw-r--r-- | sw/source/core/unocore/unofield.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/unocore/unomap.cxx | 1 | ||||
-rw-r--r-- | sw/source/core/unocore/unoprnms.cxx | 1 | ||||
-rw-r--r-- | sw/source/filter/html/htmlfld.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/html/swhtml.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/fldui/fldmgr.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/shells/textfld.cxx | 1 |
12 files changed, 27 insertions, 10 deletions
diff --git a/offapi/com/sun/star/text/textfield/Annotation.idl b/offapi/com/sun/star/text/textfield/Annotation.idl index 399b9986cc08..db9d7e230265 100644 --- a/offapi/com/sun/star/text/textfield/Annotation.idl +++ b/offapi/com/sun/star/text/textfield/Annotation.idl @@ -38,6 +38,11 @@ published service Annotation /** contains the name of the author of the annotation. */ [property]string Author; + /** contains the initials of the author of the annotation. + + @since LibreOffice 3.7 + */ + [optional, property]string Initials; /** contains the annotation's content */ [property]string Content; diff --git a/sw/inc/docufld.hxx b/sw/inc/docufld.hxx index 03f5e52fa169..31a7ec22ba8c 100644 --- a/sw/inc/docufld.hxx +++ b/sw/inc/docufld.hxx @@ -520,13 +520,14 @@ class SW_DLLPUBLIC SwPostItField : public SwField { rtl::OUString sTxt; rtl::OUString sAuthor; + rtl::OUString sInitials; DateTime aDateTime; OutlinerParaObject* mpText; SwTextAPIObject* m_pTextObject; public: SwPostItField( SwPostItFieldType*, - const String& rAuthor, const String& rTxt, const DateTime& rDate); + const String& rAuthor, const String& rTxt, const String& rInitials, const DateTime& rDate); ~SwPostItField(); virtual String Expand() const; diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx index 06e1c27c2af0..b277f001118c 100644 --- a/sw/inc/unoprnms.hxx +++ b/sw/inc/unoprnms.hxx @@ -820,7 +820,9 @@ enum SwPropNameIds /* 0751 */ UNO_NAME_HEADER_TEXT_FIRST, /* 0752 */ UNO_NAME_FOOTER_TEXT_FIRST, -/* 0753 */ SW_PROPNAME_END +/* 0753 */ UNO_NAME_INITIALS, + +/* 0754 */ SW_PROPNAME_END // new items in this array must match SwPropNameTab aPropNameTab }; diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx index 9310e47b8fa5..6bc2774357f6 100644 --- a/sw/source/core/fields/docufld.cxx +++ b/sw/source/core/fields/docufld.cxx @@ -1735,8 +1735,8 @@ SwFieldType* SwPostItFieldType::Copy() const --------------------------------------------------------------------*/ SwPostItField::SwPostItField( SwPostItFieldType* pT, - const String& rAuthor, const String& rTxt, const DateTime& rDateTime ) - : SwField( pT ), sTxt( rTxt ), sAuthor( rAuthor ), aDateTime( rDateTime ), mpText(0), m_pTextObject(0) + const String& rAuthor, const String& rTxt, const String& rInitials, const DateTime& rDateTime ) + : SwField( pT ), sTxt( rTxt ), sAuthor( rAuthor ), sInitials( rInitials ), aDateTime( rDateTime ), mpText(0), m_pTextObject(0) { } @@ -1765,7 +1765,7 @@ String SwPostItField::GetDescription() const SwField* SwPostItField::Copy() const { - SwPostItField* pRet = new SwPostItField( (SwPostItFieldType*)GetTyp(), sAuthor, + SwPostItField* pRet = new SwPostItField( (SwPostItFieldType*)GetTyp(), sAuthor, sInitials, sTxt, aDateTime); if (mpText) pRet->SetTextObject( new OutlinerParaObject(*mpText) ); @@ -1827,6 +1827,9 @@ bool SwPostItField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const rAny <<= OUString(sTxt); break; } + case FIELD_PROP_PAR3: + rAny <<= OUString(sInitials); + break; case FIELD_PROP_TEXT: { if ( !m_pTextObject ) @@ -1891,6 +1894,9 @@ bool SwPostItField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId ) mpText = 0; } break; + case FIELD_PROP_PAR3: + rAny >>= sInitials; + break; case FIELD_PROP_TEXT: OSL_FAIL("Not implemented!"); break; diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx index 1940bbef152c..7793e0921c8c 100644 --- a/sw/source/core/unocore/unofield.cxx +++ b/sw/source/core/unocore/unofield.cxx @@ -1246,7 +1246,7 @@ void SwXTextField::attachToRange( aDateTime.SetSec(m_pProps->pDateTime->Seconds); } pFld = new SwPostItField((SwPostItFieldType*)pFldType, - m_pProps->sPar1, m_pProps->sPar2,aDateTime); + m_pProps->sPar1, m_pProps->sPar2, m_pProps->sPar3, aDateTime); if ( m_pTextObject ) { ((SwPostItField*)pFld)->SetTextObject( m_pTextObject->CreateText() ); diff --git a/sw/source/core/unocore/unomap.cxx b/sw/source/core/unocore/unomap.cxx index 4d6fd06e52b3..25e5dd336026 100644 --- a/sw/source/core/unocore/unomap.cxx +++ b/sw/source/core/unocore/unomap.cxx @@ -1862,6 +1862,7 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s { {SW_PROP_NMID(UNO_NAME_AUTHOR), FIELD_PROP_PAR1, CPPU_E2T(CPPUTYPE_OUSTRING), PROPERTY_NONE, 0}, {SW_PROP_NMID(UNO_NAME_CONTENT), FIELD_PROP_PAR2, CPPU_E2T(CPPUTYPE_OUSTRING), PROPERTY_NONE, 0}, + {SW_PROP_NMID(UNO_NAME_INITIALS), FIELD_PROP_PAR3, CPPU_E2T(CPPUTYPE_OUSTRING), PROPERTY_NONE, 0}, {SW_PROP_NMID(UNO_NAME_DATE_TIME_VALUE), FIELD_PROP_DATE_TIME, CPPU_E2T(CPPUTYPE_DATETIME), PROPERTY_NONE, 0}, {SW_PROP_NMID(UNO_NAME_DATE), FIELD_PROP_DATE, CPPU_E2T(CPPUTYPE_DATE), PROPERTY_NONE, 0}, {SW_PROP_NMID(UNO_NAME_TEXT_RANGE), FIELD_PROP_TEXT, CPPU_E2T(CPPUTYPE_REFINTERFACE), PropertyAttribute::READONLY, 0}, diff --git a/sw/source/core/unocore/unoprnms.cxx b/sw/source/core/unocore/unoprnms.cxx index 11956d1ba633..e6bf6e088791 100644 --- a/sw/source/core/unocore/unoprnms.cxx +++ b/sw/source/core/unocore/unoprnms.cxx @@ -792,6 +792,7 @@ const SwPropNameTab aPropNameTab = { /* 0751 FIRST_IS_SHARED */ {MAP_CHAR_LEN("FirstIsShared")}, /* 0752 HEADER_TEXT_FIRST */ {MAP_CHAR_LEN("HeaderTextFirst")}, /* 0753 FOOTER_TEXT_FIRST */ {MAP_CHAR_LEN("FooterTextFirst")}, +/* 0754 UNO_NAME_INITIALS */ {MAP_CHAR_LEN("Initials")}, // new items in this array must match enum SwPropNameIds }; diff --git a/sw/source/filter/html/htmlfld.cxx b/sw/source/filter/html/htmlfld.cxx index 90e16d671c11..46f1bc91668f 100644 --- a/sw/source/filter/html/htmlfld.cxx +++ b/sw/source/filter/html/htmlfld.cxx @@ -656,7 +656,7 @@ void SwHTMLParser::InsertComment( const String& rComment, const sal_Char *pTag ) SwPostItField aPostItFld( (SwPostItFieldType*)pDoc->GetSysFldType( RES_POSTITFLD ), - aEmptyStr, aComment, DateTime( DateTime::SYSTEM ) ); + aEmptyStr, aComment, aEmptyStr, DateTime( DateTime::SYSTEM ) ); InsertAttr( SwFmtFld( aPostItFld ) ); if( bMoveFwd ) diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 05d5adb88380..5f100217c76d 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -5388,7 +5388,7 @@ void SwHTMLParser::ParseMoreMetaOptions() SwPostItField aPostItFld( (SwPostItFieldType*)pDoc->GetSysFldType( RES_POSTITFLD ), - aEmptyStr, sText.makeStringAndClear(), DateTime( DateTime::SYSTEM ) ); + aEmptyStr, sText.makeStringAndClear(), aEmptyStr, DateTime( DateTime::SYSTEM ) ); SwFmtFld aFmtFld( aPostItFld ); InsertAttr( aFmtFld ); } diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 37889068210a..a710f7a359fd 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -1792,7 +1792,7 @@ long SwWW8ImplReader::Read_And(WW8PLCFManResult* pRes) this->pFmtOfJustInsertedApo = 0; SwPostItField aPostIt( (SwPostItFieldType*)rDoc.GetSysFldType(RES_POSTITFLD), sAuthor, - sTxt, aDate ); + sTxt, aEmptyStr, aDate ); aPostIt.SetTextObject(pOutliner); pCtrlStck->NewAttr(*pPaM->GetPoint(), SvxCharHiddenItem(false, RES_CHRATR_HIDDEN)); diff --git a/sw/source/ui/fldui/fldmgr.cxx b/sw/source/ui/fldui/fldmgr.cxx index 2d30341a09b4..e33c78e2e244 100644 --- a/sw/source/ui/fldui/fldmgr.cxx +++ b/sw/source/ui/fldui/fldmgr.cxx @@ -870,7 +870,7 @@ sal_Bool SwFldMgr::InsertFld( const SwInsertFld_Data& rData ) case TYP_POSTITFLD: { SwPostItFieldType* pType = (SwPostItFieldType*)pCurShell->GetFldType(0, RES_POSTITFLD); - pFld = new SwPostItField(pType, rData.sPar1, rData.sPar2, DateTime( DateTime::SYSTEM )); + pFld = new SwPostItField(pType, rData.sPar1, rData.sPar2, aEmptyStr, DateTime( DateTime::SYSTEM )); break; } case TYP_SCRIPTFLD: diff --git a/sw/source/ui/shells/textfld.cxx b/sw/source/ui/shells/textfld.cxx index 21b81490774d..12928188b609 100644 --- a/sw/source/ui/shells/textfld.cxx +++ b/sw/source/ui/shells/textfld.cxx @@ -208,6 +208,7 @@ void SwTextShell::ExecField(SfxRequest &rReq) sal_uInt16 nType = 0; String aPar1 = ((SfxStringItem *)pItem)->GetValue(); String aPar2; + String aPar3; sal_Int32 nCommand = 0; if( SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_FIELD_TYPE, |