tdf#151197: Remove EmojiControl

Change-Id: I7fb423727425ec42d1161f6ac5649f5cac82f12f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140651
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
This commit is contained in:
Khaled Hosny
2022-09-29 14:39:17 +02:00
committed by خالد حسني
parent e721837929
commit 5f1eb2a12b
69 changed files with 2 additions and 28115 deletions
-3
View File
@@ -1051,7 +1051,6 @@ cmd/32/basicshapes.circle-pie.png cmd/32/pie.png
cmd/32/basicshapes.parallelogram.png cmd/32/flowchartshapes.flowchart-data.png
cmd/32/basicshapes.round-rectangle.png cmd/32/rect_rounded.png
cmd/32/calloutshapes.round-rectangular-callout.png cmd/32/calloutshapes.png
cmd/32/emojicontrol.png cmd/32/symbolshapes.png
cmd/32/fontworkshapetype.fontwork-circle-pour.png cmd/32/basicshapes.ring.png
cmd/32/flowchartshapes.png cmd/32/flowchartshapes.flowchart-document.png
cmd/32/flowchartshapes.flowchart-alternate-process.png cmd/32/basicshapes.round-quadrat.png
@@ -1072,7 +1071,6 @@ cmd/lc_basicshapes.circle-pie.png cmd/lc_pie.png
cmd/lc_basicshapes.parallelogram.png cmd/lc_flowchartshapes.flowchart-data.png
cmd/lc_basicshapes.round-rectangle.png cmd/lc_rect_rounded.png
cmd/lc_calloutshapes.round-rectangular-callout.png cmd/lc_calloutshapes.png
cmd/lc_emojicontrol.png cmd/lc_symbolshapes.png
cmd/lc_fontworkshapetype.fontwork-circle-pour.png cmd/lc_basicshapes.ring.png
cmd/lc_flowchartshapes.png cmd/lc_flowchartshapes.flowchart-document.png
cmd/lc_flowchartshapes.flowchart-alternate-process.png cmd/lc_basicshapes.round-quadrat.png
@@ -1093,7 +1091,6 @@ cmd/sc_basicshapes.circle-pie.png cmd/sc_pie.png
cmd/sc_basicshapes.parallelogram.png cmd/sc_flowchartshapes.flowchart-data.png
cmd/sc_basicshapes.round-rectangle.png cmd/sc_rect_rounded.png
cmd/sc_calloutshapes.round-rectangular-callout.png cmd/sc_calloutshapes.png
cmd/sc_emojicontrol.png cmd/sc_symbolshapes.png
cmd/sc_fontworkshapetype.fontwork-circle-pour.png cmd/sc_basicshapes.ring.png
cmd/sc_flowchartshapes.png cmd/sc_flowchartshapes.flowchart-document.png
cmd/sc_flowchartshapes.flowchart-alternate-process.png cmd/sc_basicshapes.round-quadrat.png
-3
View File
@@ -1051,7 +1051,6 @@ cmd/32/basicshapes.circle-pie.png cmd/32/pie.png
cmd/32/basicshapes.parallelogram.png cmd/32/flowchartshapes.flowchart-data.png
cmd/32/basicshapes.round-rectangle.png cmd/32/rect_rounded.png
cmd/32/calloutshapes.round-rectangular-callout.png cmd/32/calloutshapes.png
cmd/32/emojicontrol.png cmd/32/symbolshapes.png
cmd/32/fontworkshapetype.fontwork-circle-pour.png cmd/32/basicshapes.ring.png
cmd/32/flowchartshapes.png cmd/32/flowchartshapes.flowchart-document.png
cmd/32/flowchartshapes.flowchart-alternate-process.png cmd/32/basicshapes.round-quadrat.png
@@ -1072,7 +1071,6 @@ cmd/lc_basicshapes.circle-pie.png cmd/lc_pie.png
cmd/lc_basicshapes.parallelogram.png cmd/lc_flowchartshapes.flowchart-data.png
cmd/lc_basicshapes.round-rectangle.png cmd/lc_rect_rounded.png
cmd/lc_calloutshapes.round-rectangular-callout.png cmd/lc_calloutshapes.png
cmd/lc_emojicontrol.png cmd/lc_symbolshapes.png
cmd/lc_fontworkshapetype.fontwork-circle-pour.png cmd/lc_basicshapes.ring.png
cmd/lc_flowchartshapes.png cmd/lc_flowchartshapes.flowchart-document.png
cmd/lc_flowchartshapes.flowchart-alternate-process.png cmd/lc_basicshapes.round-quadrat.png
@@ -1093,7 +1091,6 @@ cmd/sc_basicshapes.circle-pie.png cmd/sc_pie.png
cmd/sc_basicshapes.parallelogram.png cmd/sc_flowchartshapes.flowchart-data.png
cmd/sc_basicshapes.round-rectangle.png cmd/sc_rect_rounded.png
cmd/sc_calloutshapes.round-rectangular-callout.png cmd/sc_calloutshapes.png
cmd/sc_emojicontrol.png cmd/sc_symbolshapes.png
cmd/sc_fontworkshapetype.fontwork-circle-pour.png cmd/sc_basicshapes.ring.png
cmd/sc_flowchartshapes.png cmd/sc_flowchartshapes.flowchart-document.png
cmd/sc_flowchartshapes.flowchart-alternate-process.png cmd/sc_basicshapes.round-quadrat.png
Binary file not shown.

Before

Width:  |  Height:  |  Size: 984 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 728 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 614 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 762 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 638 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 958 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 771 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 915 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 451 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 915 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 451 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 909 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 687 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 607 B

+1 -1
View File
@@ -105,7 +105,7 @@ class SvxZoomItem;
#define SID_EXTENDEDHELP (SID_SFX_START + 402)
#define SID_HELPBALLOONS TypedWhichId<SfxBoolItem>(SID_SFX_START + 403)
#define SID_HELPTIPS TypedWhichId<SfxBoolItem>(SID_SFX_START + 404)
#define SID_EMOJI_CONTROL (SID_SFX_START + 405)
// free (SID_SFX_START + 405)
#define SID_CHARMAP_CONTROL (SID_SFX_START + 406)
#define SID_TIPOFTHEDAY (SID_SFX_START + 407)
@@ -1545,17 +1545,6 @@
<value>com.sun.star.comp.svx.CharacterSpacingToolBoxControl</value>
</prop>
</node>
<node oor:name="InsertEmojiToolBoxControl" oor:op="replace">
<prop oor:name="Command">
<value>.uno:EmojiControl</value>
</prop>
<prop oor:name="Module">
<value/>
</prop>
<prop oor:name="Controller">
<value>com.sun.star.comp.sfx2.InsertEmojiToolBoxControl</value>
</prop>
</node>
<node oor:name="InsertSymbolToolBoxControl" oor:op="replace">
<prop oor:name="Command">
<value>.uno:CharmapControl</value>
@@ -4237,20 +4237,6 @@ bit 3 (0x8): #define UICOMMANDDESCRIPTION_PROPERTIES_TOGGLEBUTTON 8
<value>1</value>
</prop>
</node>
<node oor:name=".uno:EmojiControl" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Emoji</value>
</prop>
<prop oor:name="TooltipLabel" oor:type="xs:string">
<value xml:lang="en-US">Insert Emoji</value>
</prop>
<prop oor:name="Properties" oor:type="xs:int">
<value>1</value>
</prop>
<prop oor:name="IsExperimental" oor:type="xs:boolean">
<value>true</value>
</prop>
</node>
<node oor:name=".uno:TransformRotationX" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Rotation Pivot Point X</value>
-1
View File
@@ -194,7 +194,6 @@ interface CellSelection
FID_INPUTLINE_BLOCK [ ExecMethod = Execute; StateMethod = GetState; ]
FID_INPUTLINE_MATRIX [ ExecMethod = Execute; StateMethod = GetState; ]
SID_CHARMAP [ ExecMethod = ExecuteEdit; StateMethod = GetCellState; ]
SID_EMOJI_CONTROL [ ExecMethod = ExecuteEdit; StateMethod = GetCellState; ]
SID_CHARMAP_CONTROL [ ExecMethod = ExecuteEdit; StateMethod = GetCellState; ]
SID_INSERT_POSTIT [ ExecMethod = ExecuteEdit; StateMethod = GetCellState; ]
-1
View File
@@ -54,7 +54,6 @@ interface TableDrawText
SID_CLIPBOARD_FORMAT_ITEMS [ ExecMethod = Execute; StateMethod = GetClipState; ]
SID_SELECTALL [ ExecMethod = Execute; StateMethod = GetState; ]
SID_CHARMAP [ ExecMethod = Execute; StateMethod = GetState; ]
SID_EMOJI_CONTROL [ ExecMethod = Execute; StateMethod = GetState; ]
SID_CHARMAP_CONTROL [ ExecMethod = Execute; StateMethod = GetState; ]
SID_THES [ ExecMethod = Execute; StateMethod = GetState; ]
SID_THESAURUS [ ExecMethod = Execute; StateMethod = GetState; ]
-1
View File
@@ -33,7 +33,6 @@ interface TableText
SID_CLIPBOARD_FORMAT_ITEMS [ ExecMethod = Execute; StateMethod = GetClipState; ]
SID_SELECTALL [ ExecMethod = Execute; StateMethod = GetState; ]
SID_CHARMAP [ ExecMethod = Execute; StateMethod = GetState; ]
SID_EMOJI_CONTROL [ ExecMethod = Execute; StateMethod = GetState; ]
SID_CHARMAP_CONTROL [ ExecMethod = Execute; StateMethod = GetState; ]
FID_INSERT_NAME [ ExecMethod = Execute; StateMethod = GetState; ]
SID_THES [ ExecMethod = Execute; StateMethod = GetState; ]
@@ -67,7 +67,6 @@
<toolbar:toolbaritem xlink:href=".uno:GoalSeekDialog" toolbar:visible="false"/>
<toolbar:toolbarseparator/>
<toolbar:toolbaritem xlink:href=".uno:InsertGraphic"/>
<toolbar:toolbaritem xlink:href=".uno:EmojiControl" toolbar:visible="false"/>
<toolbar:toolbaritem xlink:href=".uno:Gallery" toolbar:visible="false"/>
<toolbar:toolbaritem xlink:href=".uno:InsertObjectChart"/>
<toolbar:toolbaritem xlink:href=".uno:InsertObjectStarMath" toolbar:visible="false"/>
-23
View File
@@ -5816,29 +5816,6 @@
<property name="position">0</property>
</packing>
</child>
<child>
<object class="sfxlo-NotebookbarToolBox" id="LineB14">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="toolbar_style">both-horiz</property>
<property name="show_arrow">False</property>
<child>
<object class="GtkToolButton" id="Insert-EmojiControl">
<property name="visible">True</property>
<property name="action_name">.uno:EmojiControl</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
@@ -5554,45 +5554,6 @@
<property name="position">16</property>
</packing>
</child>
<child>
<object class="VclOptionalBox" id="EmojiSection">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
<property name="vexpand">True</property>
<child>
<object class="sfxlo-NotebookbarToolBox" id="SectionBottom131">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="toolbar_style">both-horiz</property>
<property name="show_arrow">False</property>
<child>
<object class="GtkToolButton" id="Insert-EmojiControl">
<property name="visible">True</property>
<property name="action_name">.uno:EmojiControl</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">False</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<style>
<class name="priority-1"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">17</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
-5
View File
@@ -302,11 +302,6 @@ interface DrawView
ExecMethod = FuTemporary ;
StateMethod = GetMenuState ;
]
SID_EMOJI_CONTROL // ole : no, status : ?
[
ExecMethod = FuTemporary ;
StateMethod = GetMenuState ;
]
SID_CHARMAP_CONTROL // ole : no, status : ?
[
ExecMethod = FuTemporary ;
-5
View File
@@ -136,11 +136,6 @@ interface OutlineView
ExecMethod = FuTemporaryModify ;
StateMethod = GetMenuState ;
]
SID_EMOJI_CONTROL // ole : no, status : ?
[
ExecMethod = FuTemporaryModify ;
StateMethod = GetMenuState ;
]
SID_CHARMAP_CONTROL // ole : no, status : ?
[
ExecMethod = FuTemporaryModify ;
-23
View File
@@ -5553,29 +5553,6 @@
<property name="position">0</property>
</packing>
</child>
<child>
<object class="sfxlo-NotebookbarToolBox" id="LineB14">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="toolbar_style">both-horiz</property>
<property name="show_arrow">False</property>
<child>
<object class="GtkToolButton" id="Insert-EmojiControl">
<property name="visible">True</property>
<property name="action_name">.uno:EmojiControl</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
@@ -5464,45 +5464,6 @@
<property name="position">19</property>
</packing>
</child>
<child>
<object class="VclOptionalBox" id="Insert-Section-Emoji">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
<property name="vexpand">True</property>
<child>
<object class="sfxlo-NotebookbarToolBox" id="SectionBottom115">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="toolbar_style">both-horiz</property>
<property name="show_arrow">False</property>
<child>
<object class="GtkToolButton" id="Insert-EmojiControl">
<property name="visible">True</property>
<property name="action_name">.uno:EmojiControl</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">False</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<style>
<class name="priority-1"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">20</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
@@ -62,7 +62,6 @@
<toolbar:toolbarseparator/>
<toolbar:toolbaritem xlink:href=".uno:InsertTable"/>
<toolbar:toolbaritem xlink:href=".uno:InsertGraphic"/>
<toolbar:toolbaritem xlink:href=".uno:EmojiControl" toolbar:visible="false"/>
<toolbar:toolbaritem xlink:href=".uno:InsertAVMedia"/>
<toolbar:toolbaritem xlink:href=".uno:InsertObjectChart"/>
<toolbar:toolbarseparator/>
-23
View File
@@ -5965,29 +5965,6 @@
<property name="position">0</property>
</packing>
</child>
<child>
<object class="sfxlo-NotebookbarToolBox" id="LineB14">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="toolbar_style">both-horiz</property>
<property name="show_arrow">False</property>
<child>
<object class="GtkToolButton" id="Insert-EmojiControl">
<property name="visible">True</property>
<property name="action_name">.uno:EmojiControl</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
@@ -5750,45 +5750,6 @@
<property name="position">21</property>
</packing>
</child>
<child>
<object class="VclOptionalBox" id="Insert-Section-Emoji">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
<property name="vexpand">True</property>
<child>
<object class="sfxlo-NotebookbarToolBox" id="SectionBottom115">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="toolbar_style">both-horiz</property>
<property name="show_arrow">False</property>
<child>
<object class="GtkToolButton" id="Insert-EmojiControl">
<property name="visible">True</property>
<property name="action_name">.uno:EmojiControl</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">False</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<style>
<class name="priority-1"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">22</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
-6
View File
@@ -81,8 +81,6 @@ $(eval $(call gb_Library_use_externals,sfx,\
icui18n \
icuuc \
libxml2 \
orcus \
orcus-parser\
))
ifneq ($(ENABLE_WASM_STRIP_RECENT),TRUE)
@@ -169,10 +167,6 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\
sfx2/source/control/thumbnailviewitem \
sfx2/source/control/thumbnailviewacc \
sfx2/source/control/thumbnailview \
sfx2/source/control/emojiviewitem \
sfx2/source/control/emojiview \
sfx2/source/control/emojicontrol \
sfx2/source/control/emojipopup \
sfx2/source/control/charmapcontrol \
sfx2/source/control/charwin \
sfx2/source/control/unoctitm \
-1
View File
@@ -23,7 +23,6 @@ $(eval $(call gb_Module_add_targets,sfx2,\
CustomTarget_classification \
Library_sfx \
Package_classification \
Package_emoji \
UIConfig_sfx \
))
-16
View File
@@ -1,16 +0,0 @@
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# 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/.
#
$(eval $(call gb_Package_Package,sfx2_emojiconfig,$(SRCDIR)/sfx2))
$(eval $(call gb_Package_add_files,sfx2_emojiconfig,$(LIBO_SHARE_FOLDER)/emojiconfig,\
emojiconfig/emoji.json \
))
# vim: set noet sw=4 ts=4:
-1
View File
@@ -32,7 +32,6 @@ $(eval $(call gb_UIConfig_add_uifiles,sfx,\
sfx2/uiconfig/ui/documentpropertiesdialog \
sfx2/uiconfig/ui/editdocumentdialog \
sfx2/uiconfig/ui/editdurationdialog \
sfx2/uiconfig/ui/emojicontrol \
sfx2/uiconfig/ui/extrabutton \
sfx2/uiconfig/ui/errorfindemaildialog \
sfx2/uiconfig/ui/floatingrecord \
File diff suppressed because it is too large Load Diff
-56
View File
@@ -1,56 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* 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/.
*/
#pragma once
#include <sal/config.h>
#include <svtools/toolbarmenu.hxx>
#include <vcl/customweld.hxx>
namespace com::sun::star::frame
{
class XFrame;
}
class EmojiPopup;
class EmojiView;
class ThumbnailViewItem;
enum class FILTER_CATEGORY;
class SfxEmojiControl final : public WeldToolbarPopup
{
public:
explicit SfxEmojiControl(const EmojiPopup* pControl, weld::Widget* pParent);
virtual ~SfxEmojiControl() override;
virtual void GrabFocus() override;
private:
static void ConvertLabelToUnicode(weld::ToggleButton& rBtn);
FILTER_CATEGORY getFilter(const weld::Toggleable& rBtn) const;
DECL_LINK(ActivatePageHdl, weld::Toggleable&, void);
DECL_STATIC_LINK(SfxEmojiControl, InsertHdl, ThumbnailViewItem*, void);
std::unique_ptr<weld::ToggleButton> mxPeopleBtn;
std::unique_ptr<weld::ToggleButton> mxNatureBtn;
std::unique_ptr<weld::ToggleButton> mxFoodBtn;
std::unique_ptr<weld::ToggleButton> mxActivityBtn;
std::unique_ptr<weld::ToggleButton> mxTravelBtn;
std::unique_ptr<weld::ToggleButton> mxObjectsBtn;
std::unique_ptr<weld::ToggleButton> mxSymbolsBtn;
std::unique_ptr<weld::ToggleButton> mxFlagsBtn;
std::unique_ptr<weld::ToggleButton> mxUnicode9Btn;
std::unique_ptr<EmojiView> mxEmojiView;
std::unique_ptr<weld::CustomWeld> mxEmojiWeld;
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
-41
View File
@@ -1,41 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* 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/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#pragma once
#include <svtools/popupwindowcontroller.hxx>
class EmojiPopup final : public svt::PopupWindowController
{
public:
EmojiPopup(const css::uno::Reference<css::uno::XComponentContext>& rContext);
virtual ~EmojiPopup() override;
virtual VclPtr<vcl::Window> createVclPopupWindow(vcl::Window* pParent) override;
virtual std::unique_ptr<WeldToolbarPopup> weldPopupWindow() override;
// XServiceInfo
virtual OUString SAL_CALL getImplementationName() override;
virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
// XInitialization
virtual void SAL_CALL initialize(const css::uno::Sequence<css::uno::Any>& rArguments) override;
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
-76
View File
@@ -1,76 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* 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/.
*/
#pragma once
#include <sfx2/thumbnailview.hxx>
//unicode item defines
#define ITEM_MAX_WIDTH 30
#define ITEM_MAX_HEIGHT 30
#define ITEM_PADDING 5
#define ITEM_MAX_TEXT_LENGTH 10
enum class FILTER_CATEGORY
{
PEOPLE,
NATURE,
FOOD,
ACTIVITY,
TRAVEL,
OBJECTS,
SYMBOLS,
FLAGS,
UNICODE9
};
// Display unicode emojis depending on the category
class ViewFilter_Category final
{
public:
ViewFilter_Category(FILTER_CATEGORY rCategory)
: mCategory(rCategory)
{
}
bool operator()(const ThumbnailViewItem* pItem);
static bool isFilteredCategory(FILTER_CATEGORY filter, std::u16string_view rCategory);
private:
FILTER_CATEGORY mCategory;
};
class EmojiView final : public ThumbnailView
{
public:
EmojiView(std::unique_ptr<weld::ScrolledWindow> xWindow);
virtual ~EmojiView() override;
// Fill view with emojis
void Populate();
void setInsertEmojiHdl(const Link<ThumbnailViewItem*, void>& rLink);
void AppendItem(const OUString& rTitle, const OUString& rCategory, const OUString& rName);
private:
virtual bool MouseButtonDown(const MouseEvent& rMEvt) override;
virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
virtual bool KeyInput(const KeyEvent& rKEvt) override;
std::string msJSONData;
Link<ThumbnailViewItem*, void> maInsertEmojiHdl;
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
-35
View File
@@ -1,35 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* 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/.
*/
#pragma once
#include <sfx2/thumbnailviewitem.hxx>
class EmojiViewItem final : public ThumbnailViewItem
{
public:
EmojiViewItem(ThumbnailView& rView, sal_uInt16 nId);
virtual ~EmojiViewItem () override;
void setCategory (const OUString &rCategory) { msCategory = rCategory; }
const OUString& getCategory () const { return msCategory; }
virtual void Paint (drawinglayer::processor2d::BaseProcessor2D *pProcessor,
const ThumbnailItemAttributes *pAttrs) override;
virtual void calculateItemsPosition (const tools::Long nThumbnailHeight,
const tools::Long nPadding, sal_uInt32 nMaxTextLength,
const ThumbnailItemAttributes *pAttrs) override;
private:
OUString msCategory;
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
-17
View File
@@ -1921,23 +1921,6 @@ SfxVoidItem TipOfTheDay SID_TIPOFTHEDAY
GroupId = SfxGroupId::Application;
]
SfxVoidItem EmojiControl SID_EMOJI_CONTROL
[
AutoUpdate = FALSE,
FastCall = TRUE,
ReadOnlyDoc = FALSE,
Toggle = FALSE,
Container = FALSE,
RecordAbsolute = FALSE,
RecordPerSet;
AccelConfig = FALSE,
MenuConfig = FALSE,
ToolBoxConfig = TRUE,
GroupId = SfxGroupId::Special;
]
SfxVoidItem HideCurPage SID_BASICIDE_HIDECURPAGE
()
-156
View File
@@ -1,156 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* 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/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <emojicontrol.hxx>
#include <emojipopup.hxx>
#include <emojiview.hxx>
#include <sfx2/thumbnailviewitem.hxx>
#include <comphelper/propertysequence.hxx>
#include <comphelper/dispatchcommand.hxx>
#include <officecfg/Office/Common.hxx>
constexpr OStringLiteral FILTER_PEOPLE = "people";
constexpr OStringLiteral FILTER_NATURE = "nature";
constexpr OStringLiteral FILTER_FOOD = "food";
constexpr OStringLiteral FILTER_ACTIVITY = "activity";
constexpr OStringLiteral FILTER_TRAVEL = "travel";
constexpr OStringLiteral FILTER_OBJECTS = "objects";
constexpr OStringLiteral FILTER_SYMBOLS = "symbols";
constexpr OStringLiteral FILTER_FLAGS = "flags";
constexpr OStringLiteral FILTER_UNICODE9 = "unicode9";
using namespace com::sun::star;
SfxEmojiControl::SfxEmojiControl(const EmojiPopup* pControl, weld::Widget* pParent)
: WeldToolbarPopup(pControl->getFrameInterface(), pParent, "sfx/ui/emojicontrol.ui", "emojictrl")
, mxPeopleBtn(m_xBuilder->weld_toggle_button(FILTER_PEOPLE))
, mxNatureBtn(m_xBuilder->weld_toggle_button(FILTER_NATURE))
, mxFoodBtn(m_xBuilder->weld_toggle_button(FILTER_FOOD))
, mxActivityBtn(m_xBuilder->weld_toggle_button(FILTER_ACTIVITY))
, mxTravelBtn(m_xBuilder->weld_toggle_button(FILTER_TRAVEL))
, mxObjectsBtn(m_xBuilder->weld_toggle_button(FILTER_OBJECTS))
, mxSymbolsBtn(m_xBuilder->weld_toggle_button(FILTER_SYMBOLS))
, mxFlagsBtn(m_xBuilder->weld_toggle_button(FILTER_FLAGS))
, mxUnicode9Btn(m_xBuilder->weld_toggle_button(FILTER_UNICODE9))
, mxEmojiView(new EmojiView(m_xBuilder->weld_scrolled_window("emoji_win", true)))
, mxEmojiWeld(new weld::CustomWeld(*m_xBuilder, "emoji_view", *mxEmojiView))
{
ConvertLabelToUnicode(*mxPeopleBtn);
ConvertLabelToUnicode(*mxNatureBtn);
ConvertLabelToUnicode(*mxFoodBtn);
ConvertLabelToUnicode(*mxActivityBtn);
ConvertLabelToUnicode(*mxTravelBtn);
ConvertLabelToUnicode(*mxObjectsBtn);
ConvertLabelToUnicode(*mxSymbolsBtn);
ConvertLabelToUnicode(*mxFlagsBtn);
ConvertLabelToUnicode(*mxUnicode9Btn);
mxPeopleBtn->connect_toggled(LINK(this, SfxEmojiControl, ActivatePageHdl));
mxNatureBtn->connect_toggled(LINK(this, SfxEmojiControl, ActivatePageHdl));
mxFoodBtn->connect_toggled(LINK(this, SfxEmojiControl, ActivatePageHdl));
mxActivityBtn->connect_toggled(LINK(this, SfxEmojiControl, ActivatePageHdl));
mxTravelBtn->connect_toggled(LINK(this, SfxEmojiControl, ActivatePageHdl));
mxObjectsBtn->connect_toggled(LINK(this, SfxEmojiControl, ActivatePageHdl));
mxSymbolsBtn->connect_toggled(LINK(this, SfxEmojiControl, ActivatePageHdl));
mxFlagsBtn->connect_toggled(LINK(this, SfxEmojiControl, ActivatePageHdl));
mxUnicode9Btn->connect_toggled(LINK(this, SfxEmojiControl, ActivatePageHdl));
mxEmojiView->setItemMaxTextLength(ITEM_MAX_TEXT_LENGTH);
mxEmojiView->setItemDimensions(ITEM_MAX_WIDTH, 0, ITEM_MAX_HEIGHT, ITEM_PADDING);
mxEmojiView->Populate();
ActivatePageHdl(*mxPeopleBtn);
mxEmojiView->setInsertEmojiHdl(LINK(this, SfxEmojiControl, InsertHdl));
mxEmojiView->ShowTooltips(true);
}
void SfxEmojiControl::GrabFocus()
{
mxEmojiView->GrabFocus();
}
SfxEmojiControl::~SfxEmojiControl()
{
}
void SfxEmojiControl::ConvertLabelToUnicode(weld::ToggleButton& rBtn)
{
OUString sLabel = rBtn.get_label();
sal_uInt32 nCodePoint = sLabel.toUInt32(16);
const OUString sHexText(&nCodePoint, 1);
rBtn.set_label(sHexText);
}
FILTER_CATEGORY SfxEmojiControl::getFilter(const weld::Toggleable& rCurPageId) const
{
if (&rCurPageId == mxPeopleBtn.get())
return FILTER_CATEGORY::PEOPLE;
else if (&rCurPageId == mxNatureBtn.get())
return FILTER_CATEGORY::NATURE;
else if (&rCurPageId == mxFoodBtn.get())
return FILTER_CATEGORY::FOOD;
else if (&rCurPageId == mxActivityBtn.get())
return FILTER_CATEGORY::ACTIVITY;
else if (&rCurPageId == mxTravelBtn.get())
return FILTER_CATEGORY::TRAVEL;
else if (&rCurPageId == mxObjectsBtn.get())
return FILTER_CATEGORY::OBJECTS;
else if (&rCurPageId == mxSymbolsBtn.get())
return FILTER_CATEGORY::SYMBOLS;
else if (&rCurPageId == mxFlagsBtn.get())
return FILTER_CATEGORY::FLAGS;
else if (&rCurPageId == mxUnicode9Btn.get())
return FILTER_CATEGORY::UNICODE9;
return FILTER_CATEGORY::PEOPLE;
}
IMPL_LINK(SfxEmojiControl, ActivatePageHdl, weld::Toggleable&, rButton, void)
{
mxPeopleBtn->set_active(&rButton == mxPeopleBtn.get());
mxNatureBtn->set_active(&rButton == mxNatureBtn.get());
mxFoodBtn->set_active(&rButton == mxFoodBtn.get());
mxActivityBtn->set_active(&rButton == mxActivityBtn.get());
mxTravelBtn->set_active(&rButton == mxTravelBtn.get());
mxObjectsBtn->set_active(&rButton == mxObjectsBtn.get());
mxSymbolsBtn->set_active(&rButton == mxSymbolsBtn.get());
mxFlagsBtn->set_active(&rButton == mxFlagsBtn.get());
mxUnicode9Btn->set_active(&rButton == mxUnicode9Btn.get());
mxEmojiView->filterItems(ViewFilter_Category(getFilter(rButton)));
}
IMPL_STATIC_LINK(SfxEmojiControl, InsertHdl, ThumbnailViewItem*, pItem, void)
{
const OUString& sHexText = pItem->getTitle();
sal_uInt32 cEmojiChar = sHexText.toUInt32(16);
OUString sFontName(officecfg::Office::Common::Misc::EmojiFont::get());
uno::Sequence<beans::PropertyValue> aArgs( comphelper::InitPropertySequence({
{ "Symbols", uno::Any(OUString(&cEmojiChar, 1)) },
// add font settings here
{ "FontName", uno::Any(sFontName) }
}));
comphelper::dispatchCommand(".uno:InsertSymbol", aArgs);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
-73
View File
@@ -1,73 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* 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/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <emojipopup.hxx>
#include <emojicontrol.hxx>
#include <vcl/toolbox.hxx>
EmojiPopup::EmojiPopup(const css::uno::Reference<css::uno::XComponentContext>& rContext)
: PopupWindowController(rContext, nullptr, OUString())
{
}
void EmojiPopup::initialize(const css::uno::Sequence<css::uno::Any>& rArguments)
{
PopupWindowController::initialize(rArguments);
ToolBox* pToolBox = nullptr;
ToolBoxItemId nId;
if (getToolboxId(nId, &pToolBox))
pToolBox->SetItemBits(nId, ToolBoxItemBits::DROPDOWNONLY | pToolBox->GetItemBits(nId));
}
EmojiPopup::~EmojiPopup() {}
std::unique_ptr<WeldToolbarPopup> EmojiPopup::weldPopupWindow()
{
return std::make_unique<SfxEmojiControl>(this, m_pToolbar);
}
VclPtr<vcl::Window> EmojiPopup::createVclPopupWindow(vcl::Window* pParent)
{
mxInterimPopover = VclPtr<InterimToolbarPopup>::Create(
getFrameInterface(), pParent,
std::make_unique<SfxEmojiControl>(this, pParent->GetFrameWeld()));
mxInterimPopover->Show();
return mxInterimPopover;
}
OUString EmojiPopup::getImplementationName()
{
return "com.sun.star.comp.sfx2.InsertEmojiToolBoxControl";
}
css::uno::Sequence<OUString> EmojiPopup::getSupportedServiceNames()
{
return { "com.sun.star.frame.ToolbarController" };
}
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
com_sun_star_comp_sfx2_InsertEmojiToolBoxControl_get_implementation(
css::uno::XComponentContext* rContext, css::uno::Sequence<css::uno::Any> const&)
{
return cppu::acquire(new EmojiPopup(rContext));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
-224
View File
@@ -1,224 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* 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/.
*/
#include <osl/file.hxx>
#include <emojiview.hxx>
#include <emojiviewitem.hxx>
#include <rtl/bootstrap.hxx>
#include <sal/log.hxx>
#include <config_folders.h>
#include <officecfg/Office/Common.hxx>
#include <comphelper/processfactory.hxx>
#include <vcl/event.hxx>
#include <vcl/weldutils.hxx>
#include <o3tl/string_view.hxx>
#include <orcus/json_document_tree.hpp>
#include <orcus/config.hpp>
#include <string>
#include <string_view>
#include <fstream>
using namespace ::com::sun::star;
bool ViewFilter_Category::isFilteredCategory(FILTER_CATEGORY filter, std::u16string_view rCategory)
{
bool bRet = true;
if (filter == FILTER_CATEGORY::PEOPLE)
bRet = o3tl::starts_with(rCategory, u"people");
else if (filter == FILTER_CATEGORY::NATURE)
bRet = o3tl::starts_with(rCategory, u"nature");
else if (filter == FILTER_CATEGORY::FOOD)
bRet = o3tl::starts_with(rCategory, u"food");
else if (filter == FILTER_CATEGORY::ACTIVITY)
bRet = o3tl::starts_with(rCategory, u"activity");
else if (filter == FILTER_CATEGORY::TRAVEL)
bRet = o3tl::starts_with(rCategory, u"travel");
else if (filter == FILTER_CATEGORY::OBJECTS)
bRet = o3tl::starts_with(rCategory, u"objects");
else if (filter == FILTER_CATEGORY::SYMBOLS)
bRet = o3tl::starts_with(rCategory, u"symbols");
else if (filter == FILTER_CATEGORY::FLAGS)
bRet = o3tl::starts_with(rCategory, u"flags");
else if (filter == FILTER_CATEGORY::UNICODE9)
bRet = o3tl::starts_with(rCategory, u"unicode9");
return bRet;
}
bool ViewFilter_Category::operator () (const ThumbnailViewItem *pItem)
{
const EmojiViewItem *pViewItem = dynamic_cast<const EmojiViewItem*>(pItem);
if (pViewItem)
return isFilteredCategory(mCategory, pViewItem->getCategory());
return true;
}
EmojiView::EmojiView(std::unique_ptr<weld::ScrolledWindow> xWindow)
: ThumbnailView(std::move(xWindow), nullptr)
{
// locate json data file
OUString aURL("$BRAND_BASE_DIR/" LIBO_SHARE_FOLDER "/emojiconfig/emoji.json");
rtl::Bootstrap::expandMacros(aURL);
OUString aPath;
osl::FileBase::getSystemPathFromFileURL(aURL, aPath);
std::string strPath = OUStringToOString(aPath, RTL_TEXTENCODING_UTF8).getStr();
std::ifstream file(strPath);
if(!file.is_open())
return;
msJSONData = std::string((std::istreambuf_iterator<char>(file)), std::istreambuf_iterator<char>());
if(msJSONData.empty())
return;
}
void EmojiView::SetDrawingArea(weld::DrawingArea* pDrawingArea)
{
ThumbnailView::SetDrawingArea(pDrawingArea);
OUString sFontName(officecfg::Office::Common::Misc::EmojiFont::get());
vcl::Font aFont = pDrawingArea->get_font();
aFont.SetFamilyName(sFontName);
OutputDevice& rDevice = pDrawingArea->get_ref_device();
weld::SetPointFont(rDevice, aFont);
mpItemAttrs->aFontSize.setX(ITEM_MAX_WIDTH - 2*ITEM_PADDING);
mpItemAttrs->aFontSize.setY(ITEM_MAX_HEIGHT - 2*ITEM_PADDING);
}
EmojiView::~EmojiView()
{
}
void EmojiView::Populate()
{
if (msJSONData.empty())
{
SAL_WARN("sfx", "Emoji config data is empty");
return;
}
// Populate view using the orcus json parser
using node = orcus::json::node;
// default json config
orcus::json_config config;
orcus::json::document_tree aEmojiInfo;
// Load JSON string into a document tree.
aEmojiInfo.load(msJSONData, config);
node root = aEmojiInfo.get_document_root();
std::vector<std::string_view> keys = root.keys();
for (auto const& key : keys)
{
node value = root.child(key);
if(value.type() == orcus::json::node_t::object)
{
// iterate each element to get the keys
std::vector<std::string_view> aEmojiParams = value.keys();
OUString sTitle, sCategory, sName;
bool bDuplicate = false;
for (auto const& emojiParam : aEmojiParams)
{
node prop = value.child(emojiParam);
// get values of parameters in AppendItem() function
if(emojiParam == "unicode")
{
sTitle = OStringToOUString(prop.string_value(), RTL_TEXTENCODING_UTF8);
}
else if(emojiParam == "category")
{
sCategory = OStringToOUString(prop.string_value(), RTL_TEXTENCODING_UTF8);
}
else if(emojiParam == "name")
{
sName = OStringToOUString(prop.string_value(), RTL_TEXTENCODING_UTF8);
}
else if(emojiParam == "duplicate")
{
bDuplicate = true;
}
}
// Don't append if a duplicate emoji
if(!bDuplicate)
{
AppendItem(sTitle, sCategory, sName);
}
}
}
}
bool EmojiView::MouseButtonDown( const MouseEvent& rMEvt )
{
GrabFocus();
if (rMEvt.IsLeft())
{
size_t nPos = ImplGetItem(rMEvt.GetPosPixel());
ThumbnailViewItem* pItem = ImplGetItem(nPos);
if(pItem)
maInsertEmojiHdl.Call(pItem);
}
return true;
}
bool EmojiView::KeyInput( const KeyEvent& rKEvt )
{
vcl::KeyCode aKeyCode = rKEvt.GetKeyCode();
if(aKeyCode == ( KEY_MOD1 | KEY_A ) )
{
for (ThumbnailViewItem* pItem : mFilteredItemList)
{
if (!pItem->isSelected())
{
pItem->setSelection(true);
}
}
if (IsReallyVisible() && IsUpdateMode())
Invalidate();
return true;
}
return ThumbnailView::KeyInput(rKEvt);
}
void EmojiView::setInsertEmojiHdl(const Link<ThumbnailViewItem*, void> &rLink)
{
maInsertEmojiHdl = rLink;
}
void EmojiView::AppendItem(const OUString &rTitle, const OUString &rCategory, const OUString &rName)
{
std::unique_ptr<EmojiViewItem> pItem(new EmojiViewItem(*this, getNextItemId()));
pItem->maTitle = rTitle;
pItem->setCategory(rCategory);
pItem->setHelpText(rName);
ThumbnailView::AppendItem(std::move(pItem));
CalculateItemPositions();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
-84
View File
@@ -1,84 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* 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/.
*/
#include <emojiviewitem.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
#include <drawinglayer/primitive2d/PolyPolygonSelectionPrimitive2D.hxx>
#include <drawinglayer/primitive2d/textlayoutdevice.hxx>
#include <drawinglayer/processor2d/baseprocessor2d.hxx>
#include <com/sun/star/lang/Locale.hpp>
#include <tools/poly.hxx>
using namespace basegfx;
using namespace basegfx::utils;
using namespace drawinglayer::attribute;
using namespace drawinglayer::primitive2d;
EmojiViewItem::EmojiViewItem(ThumbnailView& rView, sal_uInt16 nId)
: ThumbnailViewItem(rView, nId)
{
}
EmojiViewItem::~EmojiViewItem ()
{
}
void EmojiViewItem::calculateItemsPosition (const tools::Long /*nThumbnailHeight*/,
const tools::Long /*nPadding*/, sal_uInt32 nMaxTextLength,
const ThumbnailItemAttributes *pAttrs)
{
drawinglayer::primitive2d::TextLayouterDevice aTextDev;
aTextDev.setFontAttribute(pAttrs->aFontAttr,
pAttrs->aFontSize.getX(), pAttrs->aFontSize.getY(),
css::lang::Locale() );
Size aRectSize = maDrawArea.GetSize();
Point aPos = maDrawArea.TopCenter();
// Calculate text position
aPos.Move(-aTextDev.getTextWidth(maTitle, 0, nMaxTextLength) / 2,
(aRectSize.Height() - aTextDev.getTextHeight()) / 3);
maTextPos = aPos;
}
void EmojiViewItem::Paint(drawinglayer::processor2d::BaseProcessor2D *pProcessor,
const ThumbnailItemAttributes *pAttrs)
{
BColor aFillColor = pAttrs->aFillColor;
drawinglayer::primitive2d::Primitive2DContainer aSeq(2);
double fTransparence = 0.0;
// Draw background
if( mbSelected && mbHover)
aFillColor = pAttrs->aSelectHighlightColor;
else if (mbSelected || mbHover)
aFillColor = pAttrs->aHighlightColor;
if (mbHover)
fTransparence = pAttrs->fHighlightTransparence;
aSeq[0] = drawinglayer::primitive2d::Primitive2DReference(
new PolyPolygonSelectionPrimitive2D( B2DPolyPolygon(::tools::Polygon(maDrawArea,5,5).getB2DPolygon()),
aFillColor,
fTransparence,
0.0,
true));
sal_uInt32 nCodePoint = maTitle.toUInt32(16);
const OUString sHexText(&nCodePoint, 1);
addTextPrimitives(sHexText, pAttrs, maTextPos, aSeq);
pProcessor->process(aSeq);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
-181
View File
@@ -1,181 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.22.2 -->
<interface domain="sfx">
<requires lib="gtk+" version="3.20"/>
<object class="GtkPopover" id="emojictrl">
<property name="can_focus">False</property>
<property name="constrain-to">none</property>
<child>
<object class="GtkBox" id="container">
<property name="width_request">350</property>
<property name="height_request">200</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<!-- n-columns=1 n-rows=1 -->
<object class="GtkGrid">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="column_spacing">3</property>
<child>
<object class="GtkToggleButton" id="people">
<property name="label" translatable="no">1f603</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkToggleButton" id="nature">
<property name="label" translatable="no">1f43c</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkToggleButton" id="food">
<property name="label" translatable="no">1f34f</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkToggleButton" id="activity">
<property name="label" translatable="no">1f3c8</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">3</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkToggleButton" id="travel">
<property name="label" translatable="no">1f697</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">4</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkToggleButton" id="objects">
<property name="label" translatable="no">1f4f1</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">5</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkToggleButton" id="symbols">
<property name="label" translatable="no">1f499</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">6</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkToggleButton" id="flags">
<property name="label" translatable="no">1f1ee-1f1f3</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">7</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkToggleButton" id="unicode9">
<property name="label" translatable="no">1f939</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">8</property>
<property name="top_attach">0</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow" id="emoji_win">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="hscrollbar_policy">never</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkViewport">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<child>
<object class="GtkDrawingArea" id="emoji_view">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
</interface>
-4
View File
@@ -89,10 +89,6 @@
constructor="com_sun_star_sfx2_ClassificationCategoriesController_get_implementation">
<service name="com.sun.star.frame.ToolbarController"/>
</implementation>
<implementation name="com.sun.star.comp.sfx2.InsertEmojiToolBoxControl"
constructor="com_sun_star_comp_sfx2_InsertEmojiToolBoxControl_get_implementation">
<service name="com.sun.star.frame.ToolbarController"/>
</implementation>
<implementation name="com.sun.star.comp.sfx2.InsertSymbolToolBoxControl"
constructor="com_sun_star_comp_sfx2_InsertSymbolToolBoxControl_get_implementation">
<service name="com.sun.star.frame.ToolbarController"/>
-4
View File
@@ -10280,7 +10280,6 @@ setup_native/source/win32/customactions/tools/seterror.hxx
sfx2/inc/bitset.hxx
sfx2/inc/bluthsndapi.hxx
sfx2/inc/charmapcontrol.hxx
sfx2/inc/emojiviewitem.hxx
sfx2/inc/guisaveas.hxx
sfx2/inc/inettbc.hxx
sfx2/inc/notebookbar/NotebookbarTabControl.hxx
@@ -10368,9 +10367,6 @@ sfx2/source/control/bindings.cxx
sfx2/source/control/charmapcontrol.cxx
sfx2/source/control/ctrlitem.cxx
sfx2/source/control/dispatch.cxx
sfx2/source/control/emojicontrol.cxx
sfx2/source/control/emojiview.cxx
sfx2/source/control/emojiviewitem.cxx
sfx2/source/control/minfitem.cxx
sfx2/source/control/msg.cxx
sfx2/source/control/msgpool.cxx
@@ -847,7 +847,6 @@ gb_emscripten_fs_image_files := \
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/sfx/ui/documentpropertiesdialog.ui \
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/sfx/ui/editdocumentdialog.ui \
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/sfx/ui/editdurationdialog.ui \
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/sfx/ui/emojicontrol.ui \
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/sfx/ui/errorfindemaildialog.ui \
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/sfx/ui/extrabutton.ui \
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/sfx/ui/floatingrecord.ui \
-5
View File
@@ -204,11 +204,6 @@ interface _Annotation
DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
]
SID_EMOJI_CONTROL
[
DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
]
SID_CHARMAP_CONTROL
[
DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
-5
View File
@@ -182,11 +182,6 @@ interface BaseText
StateMethod = GetState ;
DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
]
SID_EMOJI_CONTROL
[
StateMethod = GetState ;
DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
]
SID_CHARMAP_CONTROL
[
-5
View File
@@ -112,11 +112,6 @@ interface TextDrawText
DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
]
SID_EMOJI_CONTROL
[
DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
]
SID_CHARMAP_CONTROL
[
DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
-1
View File
@@ -1720,7 +1720,6 @@ void SwTextShell::GetState( SfxItemSet &rSet )
case FN_EDIT_FORMULA:
case SID_CHARMAP:
case SID_EMOJI_CONTROL:
case SID_CHARMAP_CONTROL:
{
const SelectionType nType = rSh.GetSelectionType();
+1 -1
View File
@@ -616,7 +616,7 @@ void SwView::CheckReadonlyState()
SID_PASTE_UNFORMATTED, FN_PASTE_NESTED_TABLE, FN_TABLE_PASTE_ROW_BEFORE,
FN_TABLE_PASTE_COL_BEFORE, SID_PASTE_SPECIAL, SID_SBA_BRW_INSERT,
SID_BACKGROUND_COLOR, FN_INSERT_BOOKMARK, SID_CHARMAP_CONTROL,
SID_CHARMAP, SID_EMOJI_CONTROL, FN_INSERT_SOFT_HYPHEN,
SID_CHARMAP, FN_INSERT_SOFT_HYPHEN,
FN_INSERT_HARDHYPHEN, FN_INSERT_HARD_SPACE, FN_INSERT_NNBSP,
FN_INSERT_BREAK, FN_INSERT_LINEBREAK, FN_INSERT_COLUMN_BREAK,
FN_INSERT_BREAK_DLG, FN_INSERT_CONTENT_CONTROL, FN_INSERT_CHECKBOX_CONTENT_CONTROL,
@@ -61,7 +61,6 @@
<toolbar:toolbaritem xlink:href=".uno:InsertPagebreak"/>
<toolbar:toolbaritem xlink:href=".uno:InsertFieldCtrl"/>
<toolbar:toolbaritem xlink:href=".uno:CharmapControl"/>
<toolbar:toolbaritem xlink:href=".uno:EmojiControl" toolbar:visible="false"/>
<toolbar:toolbarseparator/>
<toolbar:toolbaritem xlink:href=".uno:HyperlinkDialog"/>
<toolbar:toolbaritem xlink:href=".uno:InsertFootnote"/>
-1
View File
@@ -64,7 +64,6 @@
<toolbar:toolbaritem xlink:href=".uno:InsertFieldCtrl"/>
<toolbar:toolbaritem xlink:href=".uno:InsertScript" toolbar:visible="false"/>
<toolbar:toolbaritem xlink:href=".uno:CharmapControl"/>
<toolbar:toolbaritem xlink:href=".uno:EmojiControl" toolbar:visible="false"/>
<toolbar:toolbarseparator/>
<toolbar:toolbaritem xlink:href=".uno:HyperlinkDialog"/>
<toolbar:toolbaritem xlink:href=".uno:InsertFootnote"/>
@@ -58,7 +58,6 @@
<toolbar:toolbarseparator/>
<toolbar:toolbaritem xlink:href=".uno:InsertFieldCtrl"/>
<toolbar:toolbaritem xlink:href=".uno:CharmapControl"/>
<toolbar:toolbaritem xlink:href=".uno:EmojiControl" toolbar:visible="false"/>
<toolbar:toolbarseparator/>
<toolbar:toolbaritem xlink:href=".uno:HyperlinkDialog"/>
<toolbar:toolbaritem xlink:href=".uno:InsertFootnote"/>
@@ -62,7 +62,6 @@
<toolbar:toolbaritem xlink:href=".uno:InsertPagebreak"/>
<toolbar:toolbaritem xlink:href=".uno:InsertFieldCtrl"/>
<toolbar:toolbaritem xlink:href=".uno:CharmapControl"/>
<toolbar:toolbaritem xlink:href=".uno:EmojiControl" toolbar:visible="false"/>
<toolbar:toolbarseparator/>
<toolbar:toolbaritem xlink:href=".uno:HyperlinkDialog"/>
<toolbar:toolbaritem xlink:href=".uno:InsertFootnote"/>
-23
View File
@@ -5662,29 +5662,6 @@
<property name="position">0</property>
</packing>
</child>
<child>
<object class="sfxlo-NotebookbarToolBox" id="LineB13">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="toolbar_style">both-horiz</property>
<property name="show_arrow">False</property>
<child>
<object class="GtkToolButton" id="Insert-EmojiControl1">
<property name="visible">True</property>
<property name="action_name">.uno:EmojiControl</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
@@ -5701,45 +5701,6 @@
<property name="position">18</property>
</packing>
</child>
<child>
<object class="VclOptionalBox" id="EmojiSection">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
<property name="vexpand">True</property>
<child>
<object class="sfxlo-NotebookbarToolBox" id="SectionBottom115">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="toolbar_style">both-horiz</property>
<property name="show_arrow">False</property>
<child>
<object class="GtkToolButton" id="Insert-EmojiControl">
<property name="visible">True</property>
<property name="action_name">.uno:EmojiControl</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">False</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<style>
<class name="priority-1"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">19</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
@@ -62,7 +62,6 @@
<toolbar:toolbaritem xlink:href=".uno:InsertPagebreak"/>
<toolbar:toolbaritem xlink:href=".uno:InsertFieldCtrl"/>
<toolbar:toolbaritem xlink:href=".uno:CharmapControl"/>
<toolbar:toolbaritem xlink:href=".uno:EmojiControl" toolbar:visible="false"/>
<toolbar:toolbarseparator/>
<toolbar:toolbaritem xlink:href=".uno:HyperlinkDialog"/>
<toolbar:toolbaritem xlink:href=".uno:InsertFootnote"/>