[Libreoffice-commits] core.git: include/sfx2 sfx2/sdi sw/inc sw/sdi sw/source
Miklos Vajna
vmiklos at collabora.co.uk
Mon Feb 22 16:47:49 UTC 2016
include/sfx2/sfxsids.hrc | 2 +-
sfx2/sdi/sfx.sdi | 16 ++++++++++++++++
sw/inc/editsh.hxx | 2 ++
sw/sdi/_basesh.sdi | 5 +++++
sw/source/core/edit/edfcol.cxx | 4 ++++
sw/source/uibase/app/docsh2.cxx | 12 ++++++++++++
sw/source/uibase/shells/basesh.cxx | 5 +++++
7 files changed, 45 insertions(+), 1 deletion(-)
New commits:
commit 17a6535b3b2e1f0246e7605c018eded37c4a583c
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Mon Feb 22 17:23:26 2016 +0100
sw classification: add initial UNO command
It doesn't do anything useful yet, though.
Change-Id: Ib6574f79996cfc7b09596f8aba21aaf106ee7c79
diff --git a/include/sfx2/sfxsids.hrc b/include/sfx2/sfxsids.hrc
index 5337a42..25664a9 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 3ace5f8..ad9ce08 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 d12f617..76de18a 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 ae883d1..22a5c13 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 85b29f6..529924f 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 b5f631f..0138718 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 9787d6d..6c1d56e 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;
More information about the Libreoffice-commits
mailing list