diff options
author | Pranav Kant <pranavk@collabora.co.uk> | 2017-02-15 14:27:08 +0530 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2017-02-18 00:54:01 +0100 |
commit | c09422cef0247b4dfcb7933df7d5feffb39f8bc5 (patch) | |
tree | f973b318e0ba3dc757d779e75b95048d5eea519e /sw | |
parent | c0845978774045f6e14d39ea39a7e1740fd99669 (diff) |
SvxPostItIdItem is now string type
Change-Id: Id44bf5dd623749b6e9a46f121f035aa5ce617557
(cherry picked from commit ce96c5957c38384f8911d6307605c502eca0c644)
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/shells/textfld.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sw/source/uibase/shells/textfld.cxx b/sw/source/uibase/shells/textfld.cxx index 8b5b8e33c833..b4c296bf1d0d 100644 --- a/sw/source/uibase/shells/textfld.cxx +++ b/sw/source/uibase/shells/textfld.cxx @@ -332,9 +332,9 @@ void SwTextShell::ExecField(SfxRequest &rReq) case FN_DELETE_COMMENT: { const SvxPostItIdItem* pIdItem = rReq.GetArg<SvxPostItIdItem>(SID_ATTR_POSTIT_ID); - if (pIdItem && pIdItem->GetValue() && GetView().GetPostItMgr()) + if (pIdItem && !pIdItem->GetValue().isEmpty() && GetView().GetPostItMgr()) { - GetView().GetPostItMgr()->Delete(pIdItem->GetValue()); + GetView().GetPostItMgr()->Delete(pIdItem->GetValue().toUInt32()); } else if ( GetView().GetPostItMgr() && GetView().GetPostItMgr()->HasActiveSidebarWin() ) @@ -382,16 +382,16 @@ void SwTextShell::ExecField(SfxRequest &rReq) case FN_REPLY: { const SvxPostItIdItem* pIdItem = rReq.GetArg<SvxPostItIdItem>(SID_ATTR_POSTIT_ID); - if (pIdItem && pIdItem->GetValue()) + if (pIdItem && !pIdItem->GetValue().isEmpty()) { SwFieldType* pType = rSh.GetDoc()->getIDocumentFieldsAccess().GetFieldType(RES_POSTITFLD, OUString(), false); SwIterator<SwFormatField,SwFieldType> aIter( *pType ); SwFormatField* pSwFormatField = aIter.First(); while( pSwFormatField ) { - if ( static_cast<SwPostItField*>(pSwFormatField->GetField())->GetPostItId() == pIdItem->GetValue()) + if ( static_cast<SwPostItField*>(pSwFormatField->GetField())->GetPostItId() == pIdItem->GetValue().toUInt32() ) { - sw::annotation::SwAnnotationWin* pWin = GetView().GetPostItMgr()->GetAnnotationWin(pIdItem->GetValue()); + sw::annotation::SwAnnotationWin* pWin = GetView().GetPostItMgr()->GetAnnotationWin(pIdItem->GetValue().toUInt32()); if (pWin) { const SvxPostItTextItem* pTextItem = rReq.GetArg<SvxPostItTextItem>(SID_ATTR_POSTIT_TEXT); @@ -481,14 +481,14 @@ void SwTextShell::ExecField(SfxRequest &rReq) case SID_EDIT_POSTIT: { const SvxPostItIdItem* pIdItem = rReq.GetArg<SvxPostItIdItem>(SID_ATTR_POSTIT_ID); - if (pIdItem && pIdItem->GetValue()) + if (pIdItem && !pIdItem->GetValue().isEmpty()) { const SvxPostItTextItem* pTextItem = rReq.GetArg<SvxPostItTextItem>(SID_ATTR_POSTIT_TEXT); OUString sText; if ( pTextItem ) sText = pTextItem->GetValue(); - sw::annotation::SwAnnotationWin* pAnnotationWin = GetView().GetPostItMgr()->GetAnnotationWin(pIdItem->GetValue()); + sw::annotation::SwAnnotationWin* pAnnotationWin = GetView().GetPostItMgr()->GetAnnotationWin(pIdItem->GetValue().toUInt32()); if (pAnnotationWin) pAnnotationWin->UpdateText(sText); } |