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 | |
parent | e895f1979ebf82cbab9739356ce97fc937efbdd0 (diff) |
sw classification: add initial UNO command
It doesn't do anything useful yet, though.
Change-Id: Ib6574f79996cfc7b09596f8aba21aaf106ee7c79
-rw-r--r-- | include/sfx2/sfxsids.hrc | 2 | ||||
-rw-r--r-- | sfx2/sdi/sfx.sdi | 16 | ||||
-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 |
7 files changed, 45 insertions, 1 deletions
diff --git a/include/sfx2/sfxsids.hrc b/include/sfx2/sfxsids.hrc index 5337a4219f98..25664a9fb3f3 100644 --- a/include/sfx2/sfxsids.hrc +++ b/include/sfx2/sfxsids.hrc @@ -348,7 +348,7 @@ #define SID_INSERT_OBJECT (SID_SFX_START + 561) #define SID_INSERT_FLOATINGFRAME (SID_SFX_START + 563) -// FREE (SID_SFX_START + 672) +#define SID_CLASSIFICATION_APPLY (SID_SFX_START + 672) // FREE (SID_SFX_START + 676) // FREE (SID_SFX_START + 677) diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi index 3ace5f8dd9a0..ad9ce0885b5f 100644 --- a/sfx2/sdi/sfx.sdi +++ b/sfx2/sdi/sfx.sdi @@ -4373,6 +4373,22 @@ SfxBoolItem StyleWatercanMode SID_STYLE_WATERCAN GroupId = GID_FORMAT; ] +SfxVoidItem ClassificationApply SID_CLASSIFICATION_APPLY +(SfxStringItem Name SID_CLASSIFICATION_APPLY) +[ + AutoUpdate = FALSE, + FastCall = FALSE, + ReadOnlyDoc = FALSE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + + AccelConfig = TRUE, + MenuConfig = TRUE, + ToolBoxConfig = TRUE, + GroupId = GID_DOCUMENT; +] SfxUInt16Item SwitchViewShell SID_VIEWSHELL 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; |