diff options
author | Pranav Kant <pranavk@collabora.co.uk> | 2017-02-15 14:27:08 +0530 |
---|---|---|
committer | Pranav Kant <pranavk@collabora.co.uk> | 2017-02-16 10:09:24 +0530 |
commit | ce96c5957c38384f8911d6307605c502eca0c644 (patch) | |
tree | e789e5c8efbc089a6f32c6839f7924008629727b /sw | |
parent | a29b0d68011f9e2be8eee466f3f9ccad283f274c (diff) |
SvxPostItIdItem is now string type
Change-Id: Id44bf5dd623749b6e9a46f121f035aa5ce617557
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 a8fab5bf90b5..bf94094dce97 100644 --- a/sw/source/uibase/shells/textfld.cxx +++ b/sw/source/uibase/shells/textfld.cxx @@ -330,9 +330,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() ) @@ -380,16 +380,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); @@ -479,14 +479,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); } |