diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-02-22 17:23:26 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-02-22 17:47:18 +0100 |
commit | 17a6535b3b2e1f0246e7605c018eded37c4a583c (patch) | |
tree | 34a2e8ab653194d25a49425e215470d6001c21ed /sw | |
parent | e895f1979ebf82cbab9739356ce97fc937efbdd0 (diff) |
sw classification: add initial UNO command
It doesn't do anything useful yet, though.
Change-Id: Ib6574f79996cfc7b09596f8aba21aaf106ee7c79
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/editsh.hxx | 2 | ||||
-rw-r--r-- | sw/sdi/_basesh.sdi | 5 | ||||
-rw-r--r-- | sw/source/core/edit/edfcol.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/app/docsh2.cxx | 12 | ||||
-rw-r--r-- | sw/source/uibase/shells/basesh.cxx | 5 |
5 files changed, 28 insertions, 0 deletions
diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx index d12f6172e6f7..76de18ab7948 100644 --- a/sw/inc/editsh.hxx +++ b/sw/inc/editsh.hxx @@ -359,6 +359,8 @@ public: SwCharFormat* GetCharFormatFromPool( sal_uInt16 nId ) { return static_cast<SwCharFormat*>(SwEditShell::GetFormatFromPool( nId )); } + void SetClassification(const OUString& rName); + void Insert2(SwField&, const bool bForceExpandHints = false); void UpdateFields( SwField & ); ///< One single field. diff --git a/sw/sdi/_basesh.sdi b/sw/sdi/_basesh.sdi index ae883d114d26..22a5c133ad68 100644 --- a/sw/sdi/_basesh.sdi +++ b/sw/sdi/_basesh.sdi @@ -361,6 +361,11 @@ interface BaseTextSelection StateMethod = StateStyle ; ] + SID_CLASSIFICATION_APPLY + [ + ExecMethod = Execute ; + ] + //OS: Selection.Escape gibt es zusaetzlich zu Window.Escape FN_ESCAPE // status(final|play|rec) diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx index 85b29f6ea83f..529924f6c48b 100644 --- a/sw/source/core/edit/edfcol.cxx +++ b/sw/source/core/edit/edfcol.cxx @@ -47,6 +47,10 @@ SwTextFormatColl& SwEditShell::GetTextFormatColl( sal_uInt16 nFormatColl) const return *((*(GetDoc()->GetTextFormatColls()))[nFormatColl]); } +void SwEditShell::SetClassification(const OUString& /*rName*/) +{ +} + // #i62675# void SwEditShell::SetTextFormatColl(SwTextFormatColl *pFormat, const bool bResetListAttrs) diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index b5f631faa623..0138718db64e 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -1140,6 +1140,18 @@ void SwDocShell::Execute(SfxRequest& rReq) SID_OPENDOC, SfxCallMode::API|SfxCallMode::SYNCHRON, &aApp, &aTarget, 0L); } break; + case SID_CLASSIFICATION_APPLY: + { + if (pArgs && pArgs->GetItemState(nWhich, false, &pItem) == SfxItemState::SET) + { + SwWrtShell* pSh = GetWrtShell(); + const OUString& rValue = static_cast<const SfxStringItem*>(pItem)->GetValue(); + pSh->SetClassification(rValue); + } + else + SAL_WARN("sw.ui", "missing parameter for SID_CLASSIFICATION_APPLY"); + } + break; default: OSL_FAIL("wrong Dispatcher"); } diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx index 9787d6d4a757..6c1d56eff45e 100644 --- a/sw/source/uibase/shells/basesh.cxx +++ b/sw/source/uibase/shells/basesh.cxx @@ -911,6 +911,11 @@ void SwBaseShell::Execute(SfxRequest &rReq) } } break; + case SID_CLASSIFICATION_APPLY: + { + GetView().GetDocShell()->Execute(rReq); + } + break; case FN_ESCAPE: GetView().ExecuteSlot(rReq); break; |