cui/Library_cui.mk | 1 cui/UIConfig_cui.mk | 1 cui/source/dialogs/cuicharmap.cxx | 2 cui/source/factory/cuiexp.cxx | 2 cui/source/factory/dlgfact.cxx | 2 cui/source/factory/dlgfact.hxx | 1 cui/source/factory/init.cxx | 2 cui/source/inc/numpages.hxx | 22 cui/source/tabpages/autocdlg.cxx | 2 cui/source/tabpages/chardlg.cxx | 2 cui/source/tabpages/numpages.cxx | 2 cui/uiconfig/ui/bulletandposition.ui | 1047 +++++++ include/cui/cuicharmap.hxx | 106 include/cui/cuidllapi.h | 23 include/cui/numberingpreview.hxx | 31 include/svx/svxdlg.hxx | 15 include/svx/svxids.hrc | 1 officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu | 8 sd/Library_sdui.mk | 2 sd/inc/sdabstdlg.hxx | 2 sd/inc/strings.hrc | 2 sd/sdi/_drvwsh.sdi | 6 sd/source/ui/dlg/BulletAndPositionDlg.cxx | 1361 ++++++++++ sd/source/ui/dlg/sddlgfact.cxx | 25 sd/source/ui/dlg/sddlgfact.hxx | 20 sd/source/ui/func/fuolbull.cxx | 302 ++ sd/source/ui/inc/BulletAndPositionDlg.hxx | 171 + sd/source/ui/inc/OutlineView.hxx | 2 sd/source/ui/inc/View.hxx | 2 sd/source/ui/inc/drawview.hxx | 3 sd/source/ui/inc/fuolbull.hxx | 24 sd/source/ui/view/drawview.cxx | 206 - sd/source/ui/view/drviews2.cxx | 7 sd/source/ui/view/outlview.cxx | 2 sd/source/ui/view/sdview.cxx | 2 sd/uiconfig/simpress/menubar/menubar.xml | 1 solenv/sanitizers/ui/cui.suppr | 3 svx/sdi/svx.sdi | 17 38 files changed, 3266 insertions(+), 164 deletions(-)
New commits: commit e3015d7021e689c71c2ed8e5dd01a74d832c84f0 Author: Gülşah Köse <gulsah.k...@collabora.com> AuthorDate: Wed Apr 17 20:00:18 2019 +0300 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Thu May 23 10:16:30 2019 +0200 Add new customize and position merged dialog Change-Id: I898fb0830a9f53da4a7917cb5900f082e3a9d6b7 Reviewed-on: https://gerrit.libreoffice.org/71944 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk index 629da3fbc4af..2d46420c4b1a 100644 --- a/cui/Library_cui.mk +++ b/cui/Library_cui.mk @@ -21,6 +21,7 @@ $(eval $(call gb_Library_set_precompiled_header,cui,$(SRCDIR)/cui/inc/pch/precom $(eval $(call gb_Library_add_defs,cui,\ $(if $(filter TRUE,$(ENABLE_GTK)),-DENABLE_GTK) \ + -DCUI_DLLIMPLEMENTATION \ )) $(eval $(call gb_Library_use_custom_headers,cui,\ diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk index 4b087d9ca444..a20d96e6d4b0 100644 --- a/cui/UIConfig_cui.mk +++ b/cui/UIConfig_cui.mk @@ -32,6 +32,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\ cui/uiconfig/ui/borderareatransparencydialog \ cui/uiconfig/ui/borderbackgrounddialog \ cui/uiconfig/ui/borderpage \ + cui/uiconfig/ui/bulletandposition \ cui/uiconfig/ui/breaknumberoption \ cui/uiconfig/ui/calloutdialog \ cui/uiconfig/ui/calloutpage \ diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx index 48cd29e58f37..7999aaba15a2 100644 --- a/cui/source/dialogs/cuicharmap.cxx +++ b/cui/source/dialogs/cuicharmap.cxx @@ -37,7 +37,7 @@ #include <comphelper/dispatchcommand.hxx> #include <dialmgr.hxx> -#include <cuicharmap.hxx> +#include <cui/cuicharmap.hxx> #include <sfx2/request.hxx> #include <sfx2/sfxsids.hrc> #include <sfx2/app.hxx> diff --git a/cui/source/factory/cuiexp.cxx b/cui/source/factory/cuiexp.cxx index e3c13320172f..7c46eee53c93 100644 --- a/cui/source/factory/cuiexp.cxx +++ b/cui/source/factory/cuiexp.cxx @@ -38,7 +38,7 @@ #include <postdlg.hxx> #include <passwdomdlg.hxx> #include <screenshotannotationdlg.hxx> -#include <cuicharmap.hxx> +#include <cui/cuicharmap.hxx> #include <cuihyperdlg.hxx> #include <cfgutil.hxx> #include <SignatureLineDialog.hxx> diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index 7cb8b4335921..ca48341081fc 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -32,7 +32,7 @@ #include <dstribut.hxx> #include <cuiimapwnd.hxx> #include <hlmarkwn.hxx> -#include <cuicharmap.hxx> +#include <cui/cuicharmap.hxx> #include <srchxtra.hxx> #include <textanim.hxx> #include <autocdlg.hxx> diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx index f0e7fc98ec57..1a64bc9adbdd 100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -775,7 +775,6 @@ public: // #i68101# virtual VclPtr<AbstractSvxObjectNameDialog> CreateSvxObjectNameDialog(weld::Window* pParent, const OUString& rName) override; virtual VclPtr<AbstractSvxObjectTitleDescDialog> CreateSvxObjectTitleDescDialog(weld::Window* pParent, const OUString& rTitle, const OUString& rDescription) override; - virtual VclPtr<AbstractSvxMultiPathDialog> CreateSvxMultiPathDialog(weld::Window* pParent) override; virtual VclPtr<AbstractSvxMultiPathDialog> CreateSvxPathSelectDialog(weld::Window* pParent) override; virtual VclPtr<AbstractSvxHpLinkDlg> CreateSvxHpLinkDlg(vcl::Window* pParent, SfxBindings* pBindings) override; diff --git a/cui/source/factory/init.cxx b/cui/source/factory/init.cxx index f4b0b67328a9..eb3a99d2dfa5 100644 --- a/cui/source/factory/init.cxx +++ b/cui/source/factory/init.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <cuicharmap.hxx> +#include <cui/cuicharmap.hxx> // hook to call special character dialog for edits // caution: needs C-Linkage since dynamically loaded via symbol name diff --git a/cui/source/inc/numpages.hxx b/cui/source/inc/numpages.hxx index dda1de56c2ce..183f1d7825ac 100644 --- a/cui/source/inc/numpages.hxx +++ b/cui/source/inc/numpages.hxx @@ -28,6 +28,7 @@ #include <editeng/svxenum.hxx> #include <svtools/ctrlbox.hxx> #include <vcl/customweld.hxx> +#include <cui/numberingpreview.hxx> #define MN_GALLERY_ENTRY 100 @@ -38,27 +39,6 @@ class SvxBmpNumValueSet; class SvxBrushItem; class ValueSet; -class SvxNumberingPreview : public weld::CustomWidgetController -{ - const SvxNumRule* pActNum; - vcl::Font aStdFont; - bool bPosition; - sal_uInt16 nActLevel; - -protected: - virtual void Paint( vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect ) override; - -public: - SvxNumberingPreview(); - - void SetNumRule(const SvxNumRule* pNum) - {pActNum = pNum; Invalidate();}; - void SetPositionMode() - { bPosition = true;} - void SetLevel(sal_uInt16 nSet) {nActLevel = nSet;} - -}; - struct SvxNumSettings_Impl { SvxNumType nNumberType; diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index 00c409916d42..9245e8784966 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -48,7 +48,7 @@ #include <autocdlg.hxx> #include <editeng/acorrcfg.hxx> #include <editeng/svxacorr.hxx> -#include <cuicharmap.hxx> +#include <cui/cuicharmap.hxx> #include <strings.hrc> #include <editeng/unolingu.hxx> #include <dialmgr.hxx> diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index 1422602fc5b9..de5d7e233013 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -55,7 +55,7 @@ #include <svx/dlgutil.hxx> #include <dialmgr.hxx> #include <sfx2/htmlmode.hxx> -#include <cuicharmap.hxx> +#include <cui/cuicharmap.hxx> #include "chardlg.h" #include <editeng/emphasismarkitem.hxx> #include <editeng/charreliefitem.hxx> diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index 4c8a9bd21f28..eb4356342a90 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -38,7 +38,7 @@ #include <sfx2/objsh.hxx> #include <vcl/graph.hxx> #include <vcl/settings.hxx> -#include <cuicharmap.hxx> +#include <cui/cuicharmap.hxx> #include <editeng/flstitem.hxx> #include <svx/dlgutil.hxx> #include <svx/xtable.hxx> diff --git a/cui/uiconfig/ui/bulletandposition.ui b/cui/uiconfig/ui/bulletandposition.ui new file mode 100644 index 000000000000..0dbbe04a583b --- /dev/null +++ b/cui/uiconfig/ui/bulletandposition.ui @@ -0,0 +1,1047 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.22.1 --> +<interface domain="sd"> + <requires lib="gtk+" version="3.18"/> + <object class="GtkAdjustment" id="adjustment1"> + <property name="upper">19.989999999999998</property> + <property name="step_increment">0.050000000000000003</property> + <property name="page_increment">1</property> + </object> + <object class="GtkAdjustment" id="adjustment2"> + <property name="upper">65535</property> + <property name="step_increment">1</property> + <property name="page_increment">10</property> + </object> + <object class="GtkAdjustment" id="adjustment3"> + <property name="lower">1</property> + <property name="upper">10</property> + <property name="step_increment">1</property> + <property name="page_increment">1</property> + </object> + <object class="GtkAdjustment" id="adjustment4"> + <property name="lower">1</property> + <property name="upper">250</property> + <property name="step_increment">1</property> + <property name="page_increment">10</property> + </object> + <object class="GtkAdjustment" id="adjustment5"> + <property name="upper">19.989999999999998</property> + <property name="step_increment">0.050000000000000003</property> + <property name="page_increment">1</property> + </object> + <object class="GtkAdjustment" id="adjustment6"> + <property name="lower">-19.989999999999998</property> + <property name="upper">19.989999999999998</property> + <property name="step_increment">0.050000000000000003</property> + <property name="page_increment">10</property> + </object> + <object class="GtkAdjustment" id="adjustment7"> + <property name="upper">19.989999999999998</property> + <property name="step_increment">0.050000000000000003</property> + <property name="page_increment">10</property> + </object> + <object class="GtkMenu" id="bitmapmenu"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkMenuItem" id="fromfile"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes" context="bulletandposition|fromfile">From file...</property> + <property name="use_underline">True</property> + </object> + </child> + <child> + <object class="GtkMenuItem" id="gallery"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes" context="bulletandposition|gallery">Gallery</property> + <property name="use_underline">True</property> + <child type="submenu"> + <object class="GtkMenu" id="gallerysubmenu"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + </child> + </object> + </child> + </object> + <object class="GtkTreeStore" id="liststore1"> + <columns> + <!-- column-name text --> + <column type="gchararray"/> + <!-- column-name id --> + <column type="gchararray"/> + </columns> + </object> + <object class="GtkDialog" id="BulletAndPosition"> + <property name="height_request">300</property> + <property name="can_focus">False</property> + <property name="border_width">6</property> + <property name="title" translatable="yes" context="bulletandposition|DrawPRTLDialog">Bullets and Numbering</property> + <property name="modal">True</property> + <property name="default_width">0</property> + <property name="default_height">0</property> + <property name="type_hint">dialog</property> + <child> + <placeholder/> + </child> + <child internal-child="vbox"> + <object class="GtkBox" id="dialog-vbox1"> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">12</property> + <child internal-child="action_area"> + <object class="GtkButtonBox" id="dialog-action_area1"> + <property name="can_focus">False</property> + <property name="layout_style">end</property> + <child> + <object class="GtkButton" id="reset"> + <property name="label">gtk-revert-to-saved</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkButton" id="ok"> + <property name="label">gtk-ok</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="can_default">True</property> + <property name="has_default">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkButton" id="cancel"> + <property name="label">gtk-cancel</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="GtkButton" id="help"> + <property name="label">gtk-help</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">3</property> + <property name="secondary">True</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">end</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkBox" id="NumberingOptionsPage"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="border_width">6</property> + <property name="spacing">12</property> + <child> + <object class="GtkFrame" id="frame1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="top_padding">6</property> + <child> + <object class="GtkScrolledWindow"> + <property name="width_request">78</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="shadow_type">in</property> + <child> + <object class="GtkTreeView" id="levellb"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="vexpand">True</property> + <property name="model">liststore1</property> + <property name="headers_visible">False</property> + <property name="headers_clickable">False</property> + <property name="search_column">0</property> + <property name="show_expanders">False</property> + <child internal-child="selection"> + <object class="GtkTreeSelection"/> + </child> + <child> + <object class="GtkTreeViewColumn" id="treeviewcolumn1"> + <child> + <object class="GtkCellRendererText" id="cellrenderertext1"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + </object> + </child> + </object> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes" context="bulletandposition|label1">Level</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkBox" id="box1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="orientation">vertical</property> + <property name="spacing">12</property> + <child> + <object class="GtkFrame" id="frame2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="top_padding">6</property> + <property name="left_padding">12</property> + <child> + <object class="GtkBox" id="box2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">12</property> + <child> + <object class="GtkGrid" id="grid3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="column_homogeneous">True</property> + <child> + <object class="GtkLabel" id="label4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="label" translatable="yes" context="bulletandposition|label4">Type:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">numfmtlb</property> + <property name="xalign">1</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + </packing> + </child> + <child> + <object class="GtkComboBoxText" id="numfmtlb"> + <property name="width_request">174</property> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="valign">start</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="startatft"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="label" translatable="yes" context="bulletandposition|startatft">Start at:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">startat</property> + <property name="xalign">1</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + </packing> + </child> + <child> + <object class="GtkSpinButton" id="startat"> + <property name="width_request">174</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="halign">start</property> + <property name="activates_default">True</property> + <property name="text" translatable="yes" context="bulletandposition|startat">1</property> + <property name="adjustment">adjustment2</property> + <property name="value">1</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="bulletft"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="label" translatable="yes" context="bulletandposition|bulletft">Character:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">bullet</property> + <property name="xalign">1</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">2</property> + </packing> + </child> + <child> + <object class="GtkButton" id="bullet"> + <property name="label" translatable="yes" context="bulletandposition|bullet">Select...</property> + <property name="width_request">174</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="halign">start</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">2</property> + </packing> + </child> + <child> + <object class="GtkMenuButton" id="bitmap"> + <property name="label" translatable="yes" context="bulletandposition|bitmap">Select image...</property> + <property name="width_request">174</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="halign">start</property> + <property name="draw_indicator">True</property> + <property name="popup">bitmapmenu</property> + <child> + <placeholder/> + </child> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">3</property> + </packing> + </child> + <child> + <placeholder/> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkGrid" id="grid2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="row_spacing">6</property> + <property name="column_spacing">2</property> + <child> + <object class="GtkBox" id="whbox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkGrid"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkLabel" id="widthft"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes" context="bulletandposition|widthft">Width:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">widthmf</property> + <property name="xalign">0</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="heightft"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes" context="bulletandposition|heightft">Height:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">heightmf</property> + <property name="ellipsize">end</property> + <property name="width_chars">7</property> + <property name="xalign">0</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + </packing> + </child> + <child> + <object class="GtkSpinButton" id="widthmf"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="activates_default">True</property> + <property name="adjustment">adjustment1</property> + <property name="digits">2</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + </packing> + </child> + <child> + <object class="GtkSpinButton" id="heightmf"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="activates_default">True</property> + <property name="adjustment">adjustment5</property> + <property name="digits">2</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">2</property> + </packing> + </child> + <child> + <object class="GtkBox" id="keepratiobox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkCheckButton" id="keepratio"> + <property name="label" translatable="yes" context="bulletandposition|keepratio">Keep ratio</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="margin_top">23</property> + <property name="hexpand">True</property> + <property name="use_underline">True</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">2</property> + </packing> + </child> + <child> + <object class="GtkExpander" id="beforeafter"> + <property name="name">beforeafter</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="halign">start</property> + <property name="expanded">True</property> + <child> + <object class="GtkBox"> + <property name="width_request">350</property> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="margin_top">6</property> + <property name="spacing">17</property> + <child> + <object class="GtkLabel" id="prefixft"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes" context="bulletandposition|prefixft">Before:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">prefix</property> + <property name="xalign">0</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkEntry" id="prefix"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="activates_default">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="suffixft"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes" context="bulletandposition|suffixft">After:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">suffix</property> + <property name="xalign">0</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="GtkEntry" id="suffix"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="activates_default">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">3</property> + </packing> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes" context="bulletandposition|beforeafter">Separator</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">2</property> + </packing> + </child> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="spacing">27</property> + <child> + <object class="GtkLabel" id="colorft"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes" context="bulletandposition|colorft">Color:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">color</property> + <property name="xalign">1</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkMenuButton" id="color"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + <child> + <placeholder/> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="relsizeft"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes" context="bulletandposition|relsizeft">_Rel. size:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">relsize</property> + <property name="xalign">1</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="GtkSpinButton" id="relsize"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="activates_default">True</property> + <property name="text" translatable="yes" context="bulletandposition|relsize">100</property> + <property name="adjustment">adjustment4</property> + <property name="value">100</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">3</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">2</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkExpander"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="expanded">True</property> + <child> + <object class="GtkGrid"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_top">7</property> + <property name="row_spacing">2</property> + <property name="column_spacing">11</property> + <child> + <object class="GtkLabel" id="indent"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="label" translatable="yes" context="bulletandposition|indent">Indent:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">indentmf</property> + <property name="xalign">1</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="numberingwidth"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="label" translatable="yes" context="bulletandposition|numberingwidth">Width:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">numberingwidthmf</property> + <property name="xalign">1</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + </packing> + </child> + <child> + <object class="GtkSpinButton" id="indentmf"> + <property name="width_request">170</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="activates_default">True</property> + <property name="text" translatable="yes" context="bulletandposition|indentmf">0,00</property> + <property name="adjustment">adjustment6</property> + <property name="digits">2</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + </packing> + </child> + <child> + <object class="GtkSpinButton" id="numberingwidthmf"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="activates_default">True</property> + <property name="text" translatable="yes" context="bulletandposition|numberingwidthmf">0,00</property> + <property name="adjustment">adjustment7</property> + <property name="digits">2</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">1</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="relative"> + <property name="label" translatable="yes" context="bulletandposition|relative">Relati_ve</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="halign">end</property> + <property name="use_underline">True</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="left_attach">2</property> + <property name="top_attach">0</property> + <property name="height">2</property> + </packing> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="position"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes" context="bulletandposition|position">Position</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="GtkExpander"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="expanded">True</property> + <child> + <object class="GtkGrid"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_top">7</property> + <property name="column_spacing">6</property> + <child> + <object class="GtkToggleButton" id="center"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="always_show_image">True</property> + <child> + <object class="GtkImage"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="stock">gtk-justify-center</property> + </object> + </child> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + </packing> + </child> + <child> + <object class="GtkToggleButton" id="left"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="margin_left">88</property> + <property name="always_show_image">True</property> + <child> + <object class="GtkImage"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="stock">gtk-justify-left</property> + </object> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + </packing> + </child> + <child> + <object class="GtkToggleButton" id="right"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="always_show_image">True</property> + <child> + <object class="GtkImage"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="stock">gtk-justify-right</property> + </object> + </child> + </object> + <packing> + <property name="left_attach">2</property> + <property name="top_attach">0</property> + </packing> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="ALlabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes" context="bulletandposition|ALlabel">Alignment</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">3</property> + </packing> + </child> + <child> + <object class="GtkExpander"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="expanded">True</property> + <child> + <object class="GtkGrid"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_top">7</property> + <property name="row_spacing">16</property> + <property name="column_spacing">93</property> + <child> + <object class="GtkRadioButton" id="sliderb"> + <property name="label" translatable="yes" context="bulletandposition|sliderb">Slide</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="halign">start</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="GtkRadioButton" id="selectionrb"> + <property name="label" translatable="yes" context="bulletandposition|selectionrb">Selection</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="halign">start</property> + <property name="active">True</property> + <property name="draw_indicator">True</property> + <property name="group">sliderb</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + </packing> + </child> + <child> + <object class="GtkToggleButton" id="applytomaster"> + <property name="label" translatable="yes" context="bulletandposition|applytomaster">Apply to Master</property> + <property name="height_request">34</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="valign">center</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + <property name="height">2</property> + </packing> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="scopelb"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes" context="bulletandposition|scopelb">Scope</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">4</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes" context="bulletandposition|label2">Properties</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkFrame" id="frame3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment"> + <property name="width_request">0</property> + <property name="height_request">0</property> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkScrolledWindow"> + <property name="width_request">150</property> + <property name="height_request">300</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="shadow_type">in</property> + <child> + <object class="GtkViewport"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkDrawingArea" id="preview"> + <property name="width_request">150</property> + <property name="height_request">300</property> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + </child> + </object> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes" context="bulletandposition|label">Preview</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + <action-widgets> + <action-widget response="101">reset</action-widget> + <action-widget response="-5">ok</action-widget> + <action-widget response="-6">cancel</action-widget> + <action-widget response="-11">help</action-widget> + </action-widgets> + </object> +</interface> diff --git a/cui/source/inc/cuicharmap.hxx b/include/cui/cuicharmap.hxx similarity index 59% rename from cui/source/inc/cuicharmap.hxx rename to include/cui/cuicharmap.hxx index 95e65f170c44..cfe472e632a9 100644 --- a/cui/source/inc/cuicharmap.hxx +++ b/include/cui/cuicharmap.hxx @@ -16,8 +16,8 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_CUI_SOURCE_INC_CUICHARMAP_HXX -#define INCLUDED_CUI_SOURCE_INC_CUICHARMAP_HXX +#ifndef INCLUDED_CUI_CUICHARMAP_HXX +#define INCLUDED_CUI_CUICHARMAP_HXX #include <vcl/customweld.hxx> #include <vcl/weld.hxx> @@ -27,18 +27,19 @@ #include <svx/charmap.hxx> #include <svx/searchcharmap.hxx> #include <sfx2/charwin.hxx> +#include <cui/cuidllapi.h> using namespace ::com::sun::star; class SubsetMap; -#define CHARMAP_MAXLEN 32 +#define CHARMAP_MAXLEN 32 namespace svx { - struct SvxShowCharSetItem; +struct SvxShowCharSetItem; } -class SvxShowText : public weld::CustomWidgetController +class CUI_DLLPUBLIC SvxShowText : public weld::CustomWidgetController { private: ScopedVclPtr<VirtualDevice> m_xVirDev; @@ -50,73 +51,77 @@ private: virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) override; virtual void Resize() override; virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override; + public: SvxShowText(const VclPtr<VirtualDevice>& rVirDev); - void SetFont(const vcl::Font& rFont); - vcl::Font const & GetFont() const { return m_aFont; } - void SetText(const OUString& rText); - OUString const & GetText() const { return m_sText; } - void SetCentered(bool bCenter) { mbCenter = bCenter; } + void SetFont(const vcl::Font& rFont); + vcl::Font const& GetFont() const { return m_aFont; } + void SetText(const OUString& rText); + OUString const& GetText() const { return m_sText; } + void SetCentered(bool bCenter) { mbCenter = bCenter; } - Size get_preferred_size() const { return GetDrawingArea()->get_preferred_size(); } + Size get_preferred_size() const { return GetDrawingArea()->get_preferred_size(); } }; /** The main purpose of this dialog is to enable the use of characters that are not easily accessible from the keyboard. */ -class SvxCharacterMap : public SfxDialogController +class CUI_DLLPUBLIC SvxCharacterMap : public SfxDialogController { private: - - void init(); + void init(); ScopedVclPtr<VirtualDevice> m_xVirDev; - vcl::Font aFont; + vcl::Font aFont; std::unique_ptr<const SubsetMap> pSubsetMap; - bool isSearchMode; + bool isSearchMode; css::uno::Reference<css::frame::XFrame> m_xFrame; std::deque<OUString> maRecentCharList; std::deque<OUString> maRecentCharFontList; std::deque<OUString> maFavCharList; std::deque<OUString> maFavCharFontList; - uno::Reference< uno::XComponentContext > mxContext; + uno::Reference<uno::XComponentContext> mxContext; SvxCharView m_aRecentCharView[16]; SvxCharView m_aFavCharView[16]; SvxShowText m_aShowChar; - std::unique_ptr<weld::Button> m_xOKBtn; - std::unique_ptr<weld::Label> m_xFontText; + std::unique_ptr<weld::Button> m_xOKBtn; + std::unique_ptr<weld::Label> m_xFontText; std::unique_ptr<weld::ComboBox> m_xFontLB; - std::unique_ptr<weld::Label> m_xSubsetText; + std::unique_ptr<weld::Label> m_xSubsetText; std::unique_ptr<weld::ComboBox> m_xSubsetLB; - std::unique_ptr<weld::Entry> m_xSearchText; - std::unique_ptr<weld::Entry> m_xHexCodeText; - std::unique_ptr<weld::Entry> m_xDecimalCodeText; - std::unique_ptr<weld::Button> m_xFavouritesBtn; - std::unique_ptr<weld::Label> m_xCharName; - std::unique_ptr<weld::Widget> m_xRecentGrid; - std::unique_ptr<weld::Widget> m_xFavGrid; + std::unique_ptr<weld::Entry> m_xSearchText; + std::unique_ptr<weld::Entry> m_xHexCodeText; + std::unique_ptr<weld::Entry> m_xDecimalCodeText; + std::unique_ptr<weld::Button> m_xFavouritesBtn; + std::unique_ptr<weld::Label> m_xCharName; + std::unique_ptr<weld::Widget> m_xRecentGrid; + std::unique_ptr<weld::Widget> m_xFavGrid; std::unique_ptr<weld::CustomWeld> m_xShowChar; std::unique_ptr<weld::CustomWeld> m_xRecentCharView[16]; - std::unique_ptr<weld::CustomWeld> m_xFavCharView[16]; + std::unique_ptr<weld::CustomWeld> m_xFavCharView[16]; std::unique_ptr<SvxShowCharSet> m_xShowSet; std::unique_ptr<weld::CustomWeld> m_xShowSetArea; std::unique_ptr<SvxSearchCharSet> m_xSearchSet; std::unique_ptr<weld::CustomWeld> m_xSearchSetArea; - std::unique_ptr<SfxAllItemSet> m_xOutputSet; + std::unique_ptr<SfxAllItemSet> m_xOutputSet; - enum class Radix : sal_Int16 {decimal = 10, hexadecimal=16}; + enum class Radix : sal_Int16 + { + decimal = 10, + hexadecimal = 16 + }; DECL_LINK(FontSelectHdl, weld::ComboBox&, void); DECL_LINK(SubsetSelectHdl, weld::ComboBox&, void); - DECL_LINK(CharDoubleClickHdl, SvxShowCharSet*,void); + DECL_LINK(CharDoubleClickHdl, SvxShowCharSet*, void); DECL_LINK(CharSelectHdl, SvxShowCharSet*, void); DECL_LINK(CharHighlightHdl, SvxShowCharSet*, void); DECL_LINK(CharPreSelectHdl, SvxShowCharSet*, void); - DECL_LINK(FavClickHdl, SvxShowCharSet*,void); - DECL_LINK(SearchCharDoubleClickHdl, SvxShowCharSet*,void); + DECL_LINK(FavClickHdl, SvxShowCharSet*, void); + DECL_LINK(SearchCharDoubleClickHdl, SvxShowCharSet*, void); DECL_LINK(SearchCharSelectHdl, SvxShowCharSet*, void); DECL_LINK(SearchCharHighlightHdl, SvxShowCharSet*, void); DECL_LINK(SearchCharPreSelectHdl, SvxShowCharSet*, void); @@ -144,34 +149,33 @@ public: const SfxItemSet* GetOutputItemSet() const { return m_xOutputSet.get(); } - void DisableFontSelection(); + void DisableFontSelection(); - const vcl::Font& GetCharFont() const { return aFont;} - void SetCharFont( const vcl::Font& rFont ); + const vcl::Font& GetCharFont() const { return aFont; } + void SetCharFont(const vcl::Font& rFont); - void SetChar( sal_UCS4 ); - sal_UCS4 GetChar() const; + void SetChar(sal_UCS4); + sal_UCS4 GetChar() const; - void getRecentCharacterList(); //gets both recent char and recent char font list - void updateRecentCharacterList(const OUString& rChar, const OUString& rFont); + void getRecentCharacterList(); //gets both recent char and recent char font list + void updateRecentCharacterList(const OUString& rChar, const OUString& rFont); - void getFavCharacterList(); //gets both Fav char and Fav char font list - void updateFavCharacterList(const OUString& rChar, const OUString& rFont); - void deleteFavCharacterFromList(const OUString& rChar, const OUString& rFont); - bool isFavChar(const OUString& sTitle, const OUString& rFont); + void getFavCharacterList(); //gets both Fav char and Fav char font list + void updateFavCharacterList(const OUString& rChar, const OUString& rFont); + void deleteFavCharacterFromList(const OUString& rChar, const OUString& rFont); + bool isFavChar(const OUString& sTitle, const OUString& rFont); - void updateRecentCharControl(); - void insertCharToDoc(const OUString& sChar); + void updateRecentCharControl(); + void insertCharToDoc(const OUString& sChar); - void updateFavCharControl(); - void setFavButtonState(const OUString& sTitle, const OUString& rFont); + void updateFavCharControl(); + void setFavButtonState(const OUString& sTitle, const OUString& rFont); - void setCharName(sal_UCS4 nDecimalValue); + void setCharName(sal_UCS4 nDecimalValue); - void toggleSearchView(bool state); + void toggleSearchView(bool state); }; #endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/cui/cuidllapi.h b/include/cui/cuidllapi.h new file mode 100644 index 000000000000..12277c602dd4 --- /dev/null +++ b/include/cui/cuidllapi.h @@ -0,0 +1,23 @@ +/* -*- 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/. + */ + +#ifndef INCLUDED_CUI_CUIDLLAPI_H +#define INCLUDED_CUI_CUIDLLAPI_H + +#include <sal/types.h> + +#if defined(CUI_DLLIMPLEMENTATION) +#define CUI_DLLPUBLIC SAL_DLLPUBLIC_EXPORT +#else +#define CUI_DLLPUBLIC SAL_DLLPUBLIC_IMPORT +#endif + +#endif // INCLUDED_CUI_CUIDLLAPI_H + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/cui/numberingpreview.hxx b/include/cui/numberingpreview.hxx new file mode 100644 index 000000000000..0d6d01dc2a02 --- /dev/null +++ b/include/cui/numberingpreview.hxx @@ -0,0 +1,31 @@ +#ifndef INCLUDED_CUI_NUMBERINGPREVIEW_HXX +#define INCLUDED_CUI_NUMBERINGPREVIEW_HXX + +#include <cui/cuidllapi.h> +#include <editeng/numitem.hxx> +#include <vcl/customweld.hxx> + +class CUI_DLLPUBLIC SvxNumberingPreview : public weld::CustomWidgetController +{ + const SvxNumRule* pActNum; + vcl::Font aStdFont; + bool bPosition; + sal_uInt16 nActLevel; + +protected: + virtual void Paint(vcl::RenderContext& rRenderContext, + const ::tools::Rectangle& rRect) override; + +public: + SvxNumberingPreview(); + + void SetNumRule(const SvxNumRule* pNum) + { + pActNum = pNum; + Invalidate(); + }; + void SetPositionMode() { bPosition = true; } + void SetLevel(sal_uInt16 nSet) { nActLevel = nSet; } +}; + +#endif diff --git a/include/svx/svxdlg.hxx b/include/svx/svxdlg.hxx index 266eb4ccffc6..8469d9f646b4 100644 --- a/include/svx/svxdlg.hxx +++ b/include/svx/svxdlg.hxx @@ -31,6 +31,10 @@ #include <svx/svxdllapi.h> #include <vector> +namespace sd { + class View; +} + namespace com{namespace sun{namespace star{ namespace linguistic2{ class XDictionary; @@ -202,6 +206,16 @@ public: virtual void GetDescription(OUString& rDescription) = 0; }; +class AbstractSvxBulletAndPositionDlg :public VclAbstractDialog +{ +protected: + virtual ~AbstractSvxBulletAndPositionDlg() override = default; +public: + virtual const SfxItemSet* GetOutputItemSet( SfxItemSet* pSet) const = 0 ; + virtual bool IsApplyToMaster() = 0; + virtual bool IsSlideScope() = 0; +}; + class AbstractSvxMessDialog :public VclAbstractDialog { protected: @@ -391,7 +405,6 @@ public: // #i68101# virtual VclPtr<AbstractSvxObjectNameDialog> CreateSvxObjectNameDialog(weld::Window* pParent, const OUString& rName) = 0; virtual VclPtr<AbstractSvxObjectTitleDescDialog> CreateSvxObjectTitleDescDialog(weld::Window* pParent, const OUString& rTitle, const OUString& rDescription) = 0; - virtual VclPtr<AbstractSvxMultiPathDialog> CreateSvxMultiPathDialog(weld::Window* pParent) = 0 ; virtual VclPtr<AbstractSvxMultiPathDialog> CreateSvxPathSelectDialog(weld::Window* pParent) = 0 ; virtual VclPtr<AbstractSvxHpLinkDlg> CreateSvxHpLinkDlg(vcl::Window* pParent, SfxBindings* pBindings)=0; diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc index 4c40a79a94de..ac2fadfb611c 100644 --- a/include/svx/svxids.hrc +++ b/include/svx/svxids.hrc @@ -287,6 +287,7 @@ class SfxStringItem; #define SID_PRESENTATION ( SID_SVX_START + 157 ) #define SID_PRESENTATION_CURRENT_SLIDE ( SID_SVX_START + 158 ) #define SID_REHEARSE_TIMINGS ( SID_SVX_START + 159 ) +#define SID_NUMBERING_AND_POSITION ( SID_SVX_START + 160 ) #define SID_HIDE_SLIDE ( SID_SVX_START + 161 ) #define SID_ATTR_FILL_STYLE ( SID_SVX_START + 164 ) #define SID_ATTR_FILL_COLOR ( SID_SVX_START + 165 ) diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu index ee1f797e7a1d..dbd69129a620 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu @@ -2879,6 +2879,14 @@ <value>7</value> </prop> </node> + <node oor:name=".uno:NumberingAndPosition" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="en-US">Numbering and Position...</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>7</value> + </prop> + </node> <node oor:name=".uno:EditDoc" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">E~dit Mode</value> diff --git a/sd/Library_sdui.mk b/sd/Library_sdui.mk index c2ca40f6ed95..73abad77f94b 100644 --- a/sd/Library_sdui.mk +++ b/sd/Library_sdui.mk @@ -60,6 +60,7 @@ $(eval $(call gb_Library_use_libraries,sdui,\ tl \ utl \ vcl \ + cui \ )) $(eval $(call gb_Library_add_exception_objects,sdui,\ @@ -91,6 +92,7 @@ $(eval $(call gb_Library_add_exception_objects,sdui,\ sd/source/ui/dlg/tpoption \ sd/source/ui/dlg/vectdlg \ sd/source/ui/dlg/PhotoAlbumDialog \ + sd/source/ui/dlg/BulletAndPositionDlg \ )) # $(WORKDIR)/inc/sd/sddll0.hxx : diff --git a/sd/inc/sdabstdlg.hxx b/sd/inc/sdabstdlg.hxx index bdfdaef19daf..90d18bf987ee 100644 --- a/sd/inc/sdabstdlg.hxx +++ b/sd/inc/sdabstdlg.hxx @@ -26,6 +26,7 @@ #include <svl/itemset.hxx> #include <tools/solar.h> #include <vcl/abstdlg.hxx> +#include <svx/svxdlg.hxx> #include <com/sun/star/beans/PropertyValue.hpp> @@ -170,6 +171,7 @@ class SdAbstractDialogFactory public: SD_DLLPUBLIC static SdAbstractDialogFactory* Create(); + virtual VclPtr<AbstractSvxBulletAndPositionDlg> CreateSvxBulletAndPositionDlg(weld::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView) = 0; virtual VclPtr<VclAbstractDialog> CreateBreakDlg(weld::Window* pWindow, ::sd::DrawView* pDrView, ::sd::DrawDocShell* pShell, sal_uLong nSumActionCount, sal_uLong nObjCount ) = 0; virtual VclPtr<AbstractCopyDlg> CreateCopyDlg(weld::Window* pWindow, const SfxItemSet& rInAttrs, ::sd::View* pView ) = 0; virtual VclPtr<AbstractSdCustomShowDlg> CreateSdCustomShowDlg(weld::Window* pWindow, SdDrawDocument& rDrawDoc) = 0; diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc index 02f709408d72..38b9491b497b 100644 --- a/sd/inc/strings.hrc +++ b/sd/inc/strings.hrc @@ -489,6 +489,8 @@ #define STR_CTRLCLICKHYPERLINK NC_("STR_CTRLCLICKHYPERLINK", "%s-click to follow hyperlink: ") #define STR_CLICKHYPERLINK NC_("STR_CLICKHYPERLINK", "Click to open hyperlink: ") +#define RID_SVXSTR_EDIT_GRAPHIC NC_("RID_SVXSTR_EDIT_GRAPHIC", "Link") + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/sdi/_drvwsh.sdi b/sd/sdi/_drvwsh.sdi index 93a30e6757dc..1b0171dafea7 100644 --- a/sd/sdi/_drvwsh.sdi +++ b/sd/sdi/_drvwsh.sdi @@ -710,6 +710,12 @@ interface DrawView StateMethod = GetMenuState ; MenuConfig = TRUE; ] + SID_NUMBERING_AND_POSITION // ole : no, status : ? + [ + ExecMethod = FuTemporary ; + StateMethod = GetMenuState ; + MenuConfig = TRUE; + ] FN_SVX_SET_BULLET [ ExecMethod = FuTemporary ; diff --git a/sd/source/ui/dlg/BulletAndPositionDlg.cxx b/sd/source/ui/dlg/BulletAndPositionDlg.cxx new file mode 100644 index 000000000000..a9fc0adcd9b8 --- /dev/null +++ b/sd/source/ui/dlg/BulletAndPositionDlg.cxx @@ -0,0 +1,1361 @@ +/* -*- 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 <com/sun/star/text/HoriOrientation.hpp> +#include <com/sun/star/text/VertOrientation.hpp> +#include <com/sun/star/text/RelOrientation.hpp> + +#include <tools/mapunit.hxx> +#include <i18nlangtag/languagetag.hxx> +#include <i18nlangtag/mslangid.hxx> +#include <editeng/numitem.hxx> +#include <svl/eitem.hxx> +#include <vcl/svapp.hxx> +#include <svx/colorbox.hxx> +#include <svx/strarray.hxx> +#include <svx/gallery.hxx> +#include <svl/urihelper.hxx> +#include <editeng/brushitem.hxx> +#include <svl/intitem.hxx> +#include <sfx2/objsh.hxx> +#include <vcl/graph.hxx> +#include <vcl/settings.hxx> +#include <editeng/flstitem.hxx> +#include <svx/dlgutil.hxx> +#include <svx/xtable.hxx> +#include <svx/drawitem.hxx> +#include <svx/numvset.hxx> +#include <sfx2/htmlmode.hxx> +#include <unotools/pathoptions.hxx> +#include <svtools/ctrltool.hxx> +#include <svtools/unitconv.hxx> +#include <editeng/unolingu.hxx> +#include <com/sun/star/style/NumberingType.hpp> +#include <com/sun/star/lang/XMultiServiceFactory.hpp> +#include <com/sun/star/container/XIndexAccess.hpp> +#include <com/sun/star/text/DefaultNumberingProvider.hpp> +#include <com/sun/star/text/XDefaultNumberingProvider.hpp> +#include <com/sun/star/text/XNumberingFormatter.hpp> +#include <com/sun/star/beans/PropertyValue.hpp> +#include <comphelper/processfactory.hxx> +#include <com/sun/star/text/XNumberingTypeInfo.hpp> +#include <svx/dialogs.hrc> +#include <svx/svxids.hrc> + +#include <algorithm> +#include <memory> +#include <vector> +#include <sfx2/opengrf.hxx> + +#include <strings.hrc> +#include <sfx2/request.hxx> +#include <svl/aeitem.hxx> +#include <svl/stritem.hxx> +#include <svl/slstitm.hxx> +#include <sfx2/filedlghelper.hxx> +#include <svx/gallery1.hxx> +#include <svx/galtheme.hxx> +#include <unotools/ucbstreamhelper.hxx> +#include <com/sun/star/ucb/SimpleFileAccess.hpp> +#include <rtl/ustring.h> +#include <sal/log.hxx> +#include <vcl/cvtgrf.hxx> +#include <vcl/graphicfilter.hxx> +#include <vcl/virdev.hxx> +#include <svx/SvxNumOptionsTabPageHelper.hxx> +#include <View.hxx> +#include <drawdoc.hxx> +#include <cui/cuicharmap.hxx> +#include <BulletAndPositionDlg.hxx> +#include <sdmod.hxx> +#include <sdpage.hxx> +#include <sdresid.hxx> + +#define SHOW_NUMBERING 0 +#define SHOW_BULLET 1 +#define SHOW_BITMAP 2 + +#define MAX_BMP_WIDTH 16 +#define MAX_BMP_HEIGHT 16 + +static bool bLastRelative = false; + +static const vcl::Font& lcl_GetDefaultBulletFont() +{ + static vcl::Font aDefBulletFont = [&]() { + vcl::Font tmp("OpenSymbol", "", Size(0, 14)); + tmp.SetCharSet(RTL_TEXTENCODING_SYMBOL); + tmp.SetFamily(FAMILY_DONTKNOW); + tmp.SetPitch(PITCH_DONTKNOW); + tmp.SetWeight(WEIGHT_DONTKNOW); + tmp.SetTransparent(true); + return tmp; + }(); + return aDefBulletFont; +} + +class SdDrawDocument; + +SvxBulletAndPositionDlg::SvxBulletAndPositionDlg(weld::Window* pWindow, const SfxItemSet& rSet, + ::sd::View* pView) + : GenericDialogController(pWindow, "cui/ui/bulletandposition.ui", "BulletAndPosition") + , bLastWidthModified(false) + , bModified(false) + , bPreset(false) + , bAutomaticCharStyles(true) + , bHTMLMode(false) + , bInInitControl(false) + , bLabelAlignmentPosAndSpaceModeActive(false) + , bApplyToMaster(false) + , bIsSlideScope(false) + , nBullet(0xff) + , nActNumLvl(1) + , p_Window(pWindow) + , nNumItemId(SID_ATTR_NUMBERING_RULE) + , m_xGrid(m_xBuilder->weld_widget("grid2")) + , m_xLevelLB(m_xBuilder->weld_tree_view("levellb")) + , m_xFmtLB(m_xBuilder->weld_combo_box("numfmtlb")) + , m_xPrefixFT(m_xBuilder->weld_label("prefixft")) + , m_xPrefixED(m_xBuilder->weld_entry("prefix")) + , m_xSuffixFT(m_xBuilder->weld_label("suffixft")) + , m_xSuffixED(m_xBuilder->weld_entry("suffix")) + , m_xBeforeAfter(m_xBuilder->weld_expander("beforeafter")) + , m_xBulColorFT(m_xBuilder->weld_label("colorft")) + , m_xBulColLB(new ColorListBox(m_xBuilder->weld_menu_button("color"), pWindow)) + , m_xBulRelSizeFT(m_xBuilder->weld_label("relsizeft")) + , m_xBulRelSizeMF(m_xBuilder->weld_metric_spin_button("relsize", FieldUnit::PERCENT)) + , m_xStartFT(m_xBuilder->weld_label("startatft")) + , m_xStartED(m_xBuilder->weld_spin_button("startat")) + , m_xBulletFT(m_xBuilder->weld_label("bulletft")) + , m_xBulletPB(m_xBuilder->weld_button("bullet")) + , m_xBitmapMB(m_xBuilder->weld_menu_button("bitmap")) + , m_xWidthFT(m_xBuilder->weld_label("widthft")) + , m_xWidthMF(m_xBuilder->weld_metric_spin_button("widthmf", FieldUnit::CM)) + , m_xHeightFT(m_xBuilder->weld_label("heightft")) + , m_xHeightMF(m_xBuilder->weld_metric_spin_button("heightmf", FieldUnit::CM)) + , m_xRatioCB(m_xBuilder->weld_check_button("keepratio")) + , m_xPreviewWIN(new weld::CustomWeld(*m_xBuilder, "preview", m_aPreviewWIN)) + , m_xDistBorderFT(m_xBuilder->weld_label("indent")) + , m_xDistBorderMF(m_xBuilder->weld_metric_spin_button("indentmf", FieldUnit::CM)) + , m_xRelativeCB(m_xBuilder->weld_check_button("relative")) + , m_xIndentFT(m_xBuilder->weld_label("numberingwidth")) + , m_xIndentMF(m_xBuilder->weld_metric_spin_button("numberingwidthmf", FieldUnit::CM)) + , m_xLeftTB(m_xBuilder->weld_toggle_button("left")) + , m_xCenterTB(m_xBuilder->weld_toggle_button("center")) + , m_xRightTB(m_xBuilder->weld_toggle_button("right")) + , m_xSlideRB(m_xBuilder->weld_radio_button("sliderb")) + , m_xSelectionRB(m_xBuilder->weld_radio_button("selectionrb")) + , m_xApplyToMaster(m_xBuilder->weld_toggle_button("applytomaster")) +{ + m_xBulColLB->SetSlotId(SID_ATTR_CHAR_COLOR); + m_xBulRelSizeMF->set_min(SVX_NUM_REL_SIZE_MIN, FieldUnit::PERCENT); + m_xBulRelSizeMF->set_increments(5, 50, FieldUnit::PERCENT); + aActBulletFont = lcl_GetDefaultBulletFont(); + + m_xBulletPB->connect_clicked(LINK(this, SvxBulletAndPositionDlg, BulletHdl_Impl)); + m_xFmtLB->connect_changed(LINK(this, SvxBulletAndPositionDlg, NumberTypeSelectHdl_Impl)); + m_xBitmapMB->connect_selected(LINK(this, SvxBulletAndPositionDlg, GraphicHdl_Impl)); + m_xBitmapMB->connect_toggled(LINK(this, SvxBulletAndPositionDlg, PopupActivateHdl_Impl)); + m_xLevelLB->set_selection_mode(SelectionMode::Multiple); + m_xLevelLB->connect_changed(LINK(this, SvxBulletAndPositionDlg, LevelHdl_Impl)); + m_xWidthMF->connect_value_changed(LINK(this, SvxBulletAndPositionDlg, SizeHdl_Impl)); + m_xHeightMF->connect_value_changed(LINK(this, SvxBulletAndPositionDlg, SizeHdl_Impl)); + m_xRatioCB->connect_toggled(LINK(this, SvxBulletAndPositionDlg, RatioHdl_Impl)); + m_xStartED->connect_changed(LINK(this, SvxBulletAndPositionDlg, EditModifyHdl_Impl)); + m_xPrefixED->connect_changed(LINK(this, SvxBulletAndPositionDlg, EditModifyHdl_Impl)); + m_xSuffixED->connect_changed(LINK(this, SvxBulletAndPositionDlg, EditModifyHdl_Impl)); + m_xBulRelSizeMF->connect_value_changed(LINK(this, SvxBulletAndPositionDlg, BulRelSizeHdl_Impl)); + m_xBulColLB->SetSelectHdl(LINK(this, SvxBulletAndPositionDlg, BulColorHdl_Impl)); + m_xLeftTB->connect_toggled(LINK(this, SvxBulletAndPositionDlg, SelectLeftAlignmentHdl_Impl)); + m_xCenterTB->connect_toggled( + LINK(this, SvxBulletAndPositionDlg, SelectCenterAlignmentHdl_Impl)); + m_xRightTB->connect_toggled(LINK(this, SvxBulletAndPositionDlg, SelectRightAlignmentHdl_Impl)); + m_xApplyToMaster->connect_toggled(LINK(this, SvxBulletAndPositionDlg, ApplyToMasterHdl_Impl)); + + aInvalidateTimer.SetInvokeHandler( + LINK(this, SvxBulletAndPositionDlg, PreviewInvalidateHdl_Impl)); + aInvalidateTimer.SetTimeout(50); + + eCoreUnit = rSet.GetPool()->GetMetric(rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE)); + + // Fill ListBox with predefined / translated numbering types. + sal_uInt32 nCount = SvxNumberingTypeTable::Count(); + for (sal_uInt32 i = 0; i < nCount; ++i) + { + m_xFmtLB->append(OUString::number(SvxNumberingTypeTable::GetValue(i)), + SvxNumberingTypeTable::GetString(i)); + } + + // Get advanced numbering types from the component. + // Watch out for the ugly + // 136 == 0x88 == SVX_NUM_BITMAP|0x80 == SVX_NUM_BITMAP|LINK_TOKEN + // to not remove that. + SvxNumOptionsTabPageHelper::GetI18nNumbering(*m_xFmtLB, (SVX_NUM_BITMAP | LINK_TOKEN)); + + m_xFmtLB->set_active(0); + m_xRelativeCB->set_active(true); + + Link<weld::MetricSpinButton&, void> aLk3 + = LINK(this, SvxBulletAndPositionDlg, DistanceHdl_Impl); + m_xDistBorderMF->connect_value_changed(aLk3); + m_xIndentMF->connect_value_changed(aLk3); + + m_xRelativeCB->connect_toggled(LINK(this, SvxBulletAndPositionDlg, RelativeHdl_Impl)); + m_xRelativeCB->set_active(bLastRelative); + + Size aSize(m_xGrid->get_preferred_size()); + m_xGrid->set_size_request(aSize.Width(), -1); + + // PageCreated + FieldUnit eMetric = pView->GetDoc().GetUIUnit(); + SfxAllItemSet aSet(*(rSet.GetPool())); + aSet.Put(SfxAllEnumItem(SID_METRIC_ITEM, static_cast<sal_uInt16>(eMetric))); + + const SfxStringItem* pNumCharFmt = aSet.GetItem<SfxStringItem>(SID_NUM_CHAR_FMT, false); + const SfxStringItem* pBulletCharFmt = aSet.GetItem<SfxStringItem>(SID_BULLET_CHAR_FMT, false); + const SfxAllEnumItem* pMetricItem = aSet.GetItem<SfxAllEnumItem>(SID_METRIC_ITEM, false); + + if (pNumCharFmt && pBulletCharFmt) + SetCharFmts(pNumCharFmt->GetValue(), pBulletCharFmt->GetValue()); + + if (pMetricItem) + SetMetric(static_cast<FieldUnit>(pMetricItem->GetValue())); + + // End PageCreated + + Reset(&rSet); + + // ActivatePage part + + const SfxPoolItem* pItem; + const SfxItemSet* pExampleSet = &rSet; + sal_uInt16 nTmpNumLvl = 1; + if (pExampleSet) + { + if (SfxItemState::SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, false, &pItem)) + bPreset = static_cast<const SfxBoolItem*>(pItem)->GetValue(); ... etc. - the rest is truncated _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits