sc: add classification toolbar
Again this is just UI to call into sfx2, where the functionality is shared with Writer and Impress. Change-Id: I73ce6fb54d50c23df19ed2c610766b7c515e94d6
This commit is contained in:
@@ -133,6 +133,23 @@
|
||||
<value>true</value>
|
||||
</prop>
|
||||
</node>
|
||||
<node oor:name="private:resource/toolbar/classificationbar" oor:op="replace">
|
||||
<prop oor:name="DockPos" oor:type="xs:string">
|
||||
<value>0,3</value>
|
||||
</prop>
|
||||
<prop oor:name="DockingArea" oor:type="xs:int">
|
||||
<value>0</value>
|
||||
</prop>
|
||||
<prop oor:name="Docked" oor:type="xs:boolean">
|
||||
<value>true</value>
|
||||
</prop>
|
||||
<prop oor:name="Visible" oor:type="xs:boolean">
|
||||
<value>false</value>
|
||||
</prop>
|
||||
<prop oor:name="UIName" oor:type="xs:string">
|
||||
<value xml:lang="en-US">Classification</value>
|
||||
</prop>
|
||||
</node>
|
||||
<node oor:name="private:resource/toolbar/graphicobjectbar" oor:op="replace">
|
||||
<prop oor:name="DockPos" oor:type="xs:string">
|
||||
<value>0,2</value>
|
||||
|
@@ -50,6 +50,7 @@ $(eval $(call gb_UIConfig_add_toolbarfiles,modules/scalc,\
|
||||
sc/uiconfig/scalc/toolbar/arrowshapes \
|
||||
sc/uiconfig/scalc/toolbar/basicshapes \
|
||||
sc/uiconfig/scalc/toolbar/calloutshapes \
|
||||
sc/uiconfig/scalc/toolbar/classificationbar \
|
||||
sc/uiconfig/scalc/toolbar/colorbar \
|
||||
sc/uiconfig/scalc/toolbar/datastreams \
|
||||
sc/uiconfig/scalc/toolbar/drawbar \
|
||||
|
@@ -56,6 +56,7 @@ interface FormatForSelection
|
||||
SID_STYLE_SHOW [ ExecMethod = ExecuteStyle; StateMethod = GetStyleState; ]
|
||||
SID_STYLE_PREVIEW [ ExecMethod = ExecuteStyle; ]
|
||||
SID_STYLE_END_PREVIEW [ ExecMethod = ExecuteStyle; ]
|
||||
SID_CLASSIFICATION_APPLY [ ExecMethod = ExecuteStyle; ]
|
||||
// } Slot's die in der DrawShell disabled werden.
|
||||
|
||||
SID_ATTR_ALIGN_HOR_JUSTIFY [ ExecMethod = ExecuteAlignment; StateMethod = GetAttrState; ]
|
||||
|
@@ -81,6 +81,7 @@
|
||||
|
||||
#include "scabstdlg.hxx"
|
||||
#include <editeng/fontitem.hxx>
|
||||
#include <sfx2/classificationhelper.hxx>
|
||||
|
||||
#include <memory>
|
||||
|
||||
@@ -967,6 +968,18 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
|
||||
if ( bListAction )
|
||||
pDocSh->GetUndoManager()->LeaveListAction();
|
||||
}
|
||||
else if (nSlotId == SID_CLASSIFICATION_APPLY)
|
||||
{
|
||||
const SfxPoolItem* pItem = 0;
|
||||
if (pArgs && pArgs->GetItemState(nSlotId, false, &pItem) == SfxItemState::SET)
|
||||
{
|
||||
const OUString& rName = static_cast<const SfxStringItem*>(pItem)->GetValue();
|
||||
SfxClassificationHelper aHelper(*pDocSh);
|
||||
aHelper.SetBACName(rName);
|
||||
}
|
||||
else
|
||||
SAL_WARN("sc.ui", "missing parameter for SID_CLASSIFICATION_APPLY");
|
||||
}
|
||||
else
|
||||
{
|
||||
OSL_FAIL( "Unknown slot (ScViewShell::ExecuteStyle)" );
|
||||
|
12
sc/uiconfig/scalc/toolbar/classificationbar.xml
Normal file
12
sc/uiconfig/scalc/toolbar/classificationbar.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd">
|
||||
<!--
|
||||
* This file is part of the LibreOffice project.
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
-->
|
||||
<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar">
|
||||
<toolbar:toolbaritem xlink:href=".uno:ClassificationApply"/>
|
||||
</toolbar:toolbar>
|
Reference in New Issue
Block a user