summaryrefslogtreecommitdiffstats
path: root/cui/source/inc
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 16:51:28 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 16:51:28 +0000
commit940b4d1848e8c70ab7642901a68594e8016caffc (patch)
treeeb72f344ee6c3d9b80a7ecc079ea79e9fba8676d /cui/source/inc
parentInitial commit. (diff)
downloadlibreoffice-upstream/1%7.0.4.tar.xz
libreoffice-upstream/1%7.0.4.zip
Adding upstream version 1:7.0.4.upstream/1%7.0.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'cui/source/inc')
-rw-r--r--cui/source/inc/CommandCategoryListBox.hxx80
-rw-r--r--cui/source/inc/CustomNotebookbarGenerator.hxx42
-rw-r--r--cui/source/inc/DiagramDialog.hxx42
-rw-r--r--cui/source/inc/FontFeaturesDialog.hxx78
-rw-r--r--cui/source/inc/QrCodeGenDialog.hxx50
-rw-r--r--cui/source/inc/SignSignatureLineDialog.hxx56
-rw-r--r--cui/source/inc/SignatureLineDialog.hxx39
-rw-r--r--cui/source/inc/SignatureLineDialogBase.hxx34
-rw-r--r--cui/source/inc/SpellDialog.hxx231
-rw-r--r--cui/source/inc/SvxConfigPageHelper.hxx89
-rw-r--r--cui/source/inc/SvxMenuConfigPage.hxx72
-rw-r--r--cui/source/inc/SvxNotebookbarConfigPage.hxx87
-rw-r--r--cui/source/inc/SvxToolbarConfigPage.hxx90
-rw-r--r--cui/source/inc/about.hxx62
-rw-r--r--cui/source/inc/acccfg.hxx155
-rw-r--r--cui/source/inc/align.hxx122
-rw-r--r--cui/source/inc/autocdlg.hxx417
-rw-r--r--cui/source/inc/backgrnd.hxx70
-rw-r--r--cui/source/inc/bbdlg.hxx44
-rw-r--r--cui/source/inc/border.hxx194
-rw-r--r--cui/source/inc/cfg.hxx673
-rw-r--r--cui/source/inc/cfgutil.hxx269
-rw-r--r--cui/source/inc/chardlg.hxx343
-rw-r--r--cui/source/inc/colorpicker.hxx47
-rw-r--r--cui/source/inc/connect.hxx86
-rw-r--r--cui/source/inc/cuifmsearch.hxx173
-rw-r--r--cui/source/inc/cuigaldlg.hxx277
-rw-r--r--cui/source/inc/cuigrfflt.hxx183
-rw-r--r--cui/source/inc/cuihyperdlg.hxx140
-rw-r--r--cui/source/inc/cuiimapwnd.hxx50
-rw-r--r--cui/source/inc/cuioptgenrl.hxx75
-rw-r--r--cui/source/inc/cuisrchdlg.hxx44
-rw-r--r--cui/source/inc/cuitabarea.hxx739
-rw-r--r--cui/source/inc/cuitabline.hxx378
-rw-r--r--cui/source/inc/cuitbxform.hxx38
-rw-r--r--cui/source/inc/dbregister.hxx112
-rw-r--r--cui/source/inc/defdlgname.hxx30
-rw-r--r--cui/source/inc/dialmgr.hxx26
-rw-r--r--cui/source/inc/dlgname.hxx125
-rw-r--r--cui/source/inc/dstribut.hxx72
-rw-r--r--cui/source/inc/grfpage.hxx109
-rw-r--r--cui/source/inc/hangulhanjadlg.hxx305
-rw-r--r--cui/source/inc/headertablistbox.hxx42
-rw-r--r--cui/source/inc/helpids.h46
-rw-r--r--cui/source/inc/hldocntp.hxx64
-rw-r--r--cui/source/inc/hldoctp.hxx76
-rw-r--r--cui/source/inc/hlinettp.hxx91
-rw-r--r--cui/source/inc/hlmailtp.hxx65
-rw-r--r--cui/source/inc/hlmarkwn.hxx72
-rw-r--r--cui/source/inc/hlmarkwn_def.hxx29
-rw-r--r--cui/source/inc/hltpbase.hxx138
-rw-r--r--cui/source/inc/hyphen.hxx88
-rw-r--r--cui/source/inc/iconcdlg.hxx84
-rw-r--r--cui/source/inc/insdlg.hxx117
-rw-r--r--cui/source/inc/insrc.hxx44
-rw-r--r--cui/source/inc/labdlg.hxx119
-rw-r--r--cui/source/inc/linkdlg.hxx85
-rw-r--r--cui/source/inc/macroass.hxx92
-rw-r--r--cui/source/inc/macropg.hxx131
-rw-r--r--cui/source/inc/measure.hxx98
-rw-r--r--cui/source/inc/multipat.hxx80
-rw-r--r--cui/source/inc/newtabledlg.hxx75
-rw-r--r--cui/source/inc/numfmt.hxx157
-rw-r--r--cui/source/inc/numpages.hxx388
-rw-r--r--cui/source/inc/optasian.hxx61
-rw-r--r--cui/source/inc/optdict.hxx112
-rw-r--r--cui/source/inc/optlingu.hxx152
-rw-r--r--cui/source/inc/optpath.hxx71
-rw-r--r--cui/source/inc/page.hxx185
-rw-r--r--cui/source/inc/paragrph.hxx304
-rw-r--r--cui/source/inc/passwdomdlg.hxx71
-rw-r--r--cui/source/inc/pastedlg.hxx76
-rw-r--r--cui/source/inc/postdlg.hxx103
-rw-r--r--cui/source/inc/screenshotannotationdlg.hxx42
-rw-r--r--cui/source/inc/scriptdlg.hxx171
-rw-r--r--cui/source/inc/sdrcelldlg.hxx49
-rw-r--r--cui/source/inc/showcols.hxx48
-rw-r--r--cui/source/inc/splitcelldlg.hxx51
-rw-r--r--cui/source/inc/srchxtra.hxx84
-rw-r--r--cui/source/inc/swpossizetabpage.hxx133
-rw-r--r--cui/source/inc/tabstpge.hxx149
-rw-r--r--cui/source/inc/textanim.hxx108
-rw-r--r--cui/source/inc/textattr.hxx95
-rw-r--r--cui/source/inc/thesdlg.hxx82
-rw-r--r--cui/source/inc/tipofthedaydlg.hxx48
-rw-r--r--cui/source/inc/transfrm.hxx251
-rw-r--r--cui/source/inc/treeopt.hxx238
-rw-r--r--cui/source/inc/zoom.hxx70
88 files changed, 11283 insertions, 0 deletions
diff --git a/cui/source/inc/CommandCategoryListBox.hxx b/cui/source/inc/CommandCategoryListBox.hxx
new file mode 100644
index 000000000..059c1474f
--- /dev/null
+++ b/cui/source/inc/CommandCategoryListBox.hxx
@@ -0,0 +1,80 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * 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 <i18nutil/searchopt.hxx>
+#include "cfgutil.hxx"
+
+class CommandCategoryListBox
+{
+ SfxGroupInfoArr_Impl m_aGroupInfo;
+ OUString m_sModuleLongName;
+ css::uno::Reference< css::uno::XComponentContext > m_xContext;
+ css::uno::Reference< css::frame::XFrame > m_xFrame;
+ css::uno::Reference< css::container::XNameAccess > m_xGlobalCategoryInfo;
+ css::uno::Reference< css::container::XNameAccess > m_xModuleCategoryInfo;
+ css::uno::Reference< css::container::XNameAccess > m_xUICmdDescription;
+
+ // For search
+ i18nutil::SearchOptions2 m_searchOptions;
+
+ SfxStylesInfo_Impl* pStylesInfo;
+ SfxStylesInfo_Impl m_aStylesInfo;
+
+ std::unique_ptr<weld::ComboBox> m_xControl;
+
+public:
+ CommandCategoryListBox(std::unique_ptr<weld::ComboBox> xControl);
+ ~CommandCategoryListBox();
+ void ClearAll();
+
+ void Init(
+ const css::uno::Reference< css::uno::XComponentContext >& xContext,
+ const css::uno::Reference< css::frame::XFrame >& xFrame,
+ const OUString& sModuleLongName);
+ void FillFunctionsList(
+ const css::uno::Sequence< css::frame::DispatchInformation >& xCommands,
+ CuiConfigFunctionListBox* pFunctionListBox,
+ const OUString& filterTerm,
+ SaveInData *pCurrentSaveInData );
+ OUString getCommandName(const OUString& sCommand);
+
+ void connect_changed(const Link<weld::ComboBox&, void>& rLink) { m_xControl->connect_changed(rLink); }
+
+ /**
+ Signals that a command category has been selected.
+ And updates the functions list box to include
+ the commands in the selected category.
+ */
+ void categorySelected(CuiConfigFunctionListBox* pFunctionListBox,
+ const OUString& filterTerm, SaveInData* pCurrentSaveInData = nullptr);
+
+ void SetStylesInfo(SfxStylesInfo_Impl* pStyles);
+
+ // Adds children of the given macro group to the functions list
+ void addChildren(
+ const weld::TreeIter* parentEntry, const css::uno::Reference<com::sun::star::script::browse::XBrowseNode> &parentNode,
+ CuiConfigFunctionListBox* pFunctionListBox, const OUString &filterTerm , SaveInData *pCurrentSaveInData,
+ std::vector<std::unique_ptr<weld::TreeIter>> &rNodesToExpand);
+
+ void set_visible(bool bVisible) {m_xControl->set_visible(bVisible);}
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/cui/source/inc/CustomNotebookbarGenerator.hxx b/cui/source/inc/CustomNotebookbarGenerator.hxx
new file mode 100644
index 000000000..b06848dbb
--- /dev/null
+++ b/cui/source/inc/CustomNotebookbarGenerator.hxx
@@ -0,0 +1,42 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * 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 <com/sun/star/uno/Sequence.hxx>
+#include <rtl/ustring.hxx>
+
+using namespace css::uno;
+
+class CustomNotebookbarGenerator
+{
+public:
+ CustomNotebookbarGenerator();
+ static OUString getCustomizedUIPath();
+ static OUString getOriginalUIPath();
+ static OString getSystemPath(OUString const& sURL);
+ static Sequence<OUString> getCustomizedUIItem(OUString sNotebookbarConfigType);
+ static void getFileNameAndAppName(OUString& sAppName, OUString& sNotebookbarUIFileName);
+ static void modifyCustomizedUIFile(const Sequence<OUString>& sUIItemProperties);
+ static void createCustomizedUIFile();
+ static void setCustomizedUIItem(Sequence<OUString> sUIItemProperties,
+ OUString sNotebookbarConfigType);
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/DiagramDialog.hxx b/cui/source/inc/DiagramDialog.hxx
new file mode 100644
index 000000000..e97144050
--- /dev/null
+++ b/cui/source/inc/DiagramDialog.hxx
@@ -0,0 +1,42 @@
+/* -*- 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_SOURCE_INC_DIAGRAMDIALOG_HXX
+#define INCLUDED_CUI_SOURCE_INC_DIAGRAMDIALOG_HXX
+
+#include <tools/link.hxx>
+#include <vcl/weld.hxx>
+
+class DiagramDataInterface;
+
+/** Edit Diagram dialog */
+class DiagramDialog : public weld::GenericDialogController
+{
+public:
+ DiagramDialog(weld::Window* pWindow, std::shared_ptr<DiagramDataInterface> pDiagramData);
+ virtual ~DiagramDialog() override;
+
+private:
+ std::shared_ptr<DiagramDataInterface> mpDiagramData;
+ std::unique_ptr<weld::Button> mpBtnOk;
+ std::unique_ptr<weld::Button> mpBtnCancel;
+ std::unique_ptr<weld::Button> mpBtnAdd;
+ std::unique_ptr<weld::Button> mpBtnRemove;
+ std::unique_ptr<weld::TreeView> mpTreeDiagram;
+ std::unique_ptr<weld::TextView> mpTextAdd;
+
+ DECL_LINK(OnAddClick, weld::Button&, void);
+ DECL_LINK(OnRemoveClick, weld::Button&, void);
+
+ void populateTree(const weld::TreeIter* pParent, const OUString& rParentId);
+};
+
+#endif // INCLUDED_CUI_SOURCE_INC_DIAGRAMDIALOG_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/FontFeaturesDialog.hxx b/cui/source/inc/FontFeaturesDialog.hxx
new file mode 100644
index 000000000..93e5f7c4a
--- /dev/null
+++ b/cui/source/inc/FontFeaturesDialog.hxx
@@ -0,0 +1,78 @@
+/* -*- 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_SOURCE_INC_FONTFEATURESDIALOG_HXX
+#define INCLUDED_CUI_SOURCE_INC_FONTFEATURESDIALOG_HXX
+
+#include <vcl/svapp.hxx>
+#include <vcl/weld.hxx>
+#include <vcl/font/Feature.hxx>
+#include <svx/fntctrl.hxx>
+#include <memory>
+
+namespace cui
+{
+struct FontFeatureItem
+{
+ FontFeatureItem(weld::Widget* pParent)
+ : m_aFeatureCode(0)
+ , m_nDefault(0)
+ , m_xBuilder(Application::CreateBuilder(pParent, "cui/ui/fontfragment.ui"))
+ , m_xContainer(m_xBuilder->weld_widget("fontentry"))
+ , m_xText(m_xBuilder->weld_label("label"))
+ , m_xCombo(m_xBuilder->weld_combo_box("combo"))
+ , m_xCheck(m_xBuilder->weld_check_button("check"))
+ {
+ }
+
+ sal_uInt32 m_aFeatureCode;
+ sal_uInt32 m_nDefault;
+ std::unique_ptr<weld::Builder> m_xBuilder;
+ std::unique_ptr<weld::Widget> m_xContainer;
+ std::unique_ptr<weld::Label> m_xText;
+ std::unique_ptr<weld::ComboBox> m_xCombo;
+ std::unique_ptr<weld::CheckButton> m_xCheck;
+};
+
+class FontFeaturesDialog : public weld::GenericDialogController
+{
+private:
+ std::vector<FontFeatureItem> m_aFeatureItems;
+ OUString m_sFontName;
+ OUString m_sResultFontName;
+
+ SvxFontPrevWindow m_aPreviewWindow;
+ std::unique_ptr<weld::ScrolledWindow> m_xContentWindow;
+ std::unique_ptr<weld::Container> m_xContentGrid;
+ std::unique_ptr<weld::CustomWeld> m_xPreviewWindow;
+
+ void initialize();
+ OUString createFontNameWithFeatures();
+
+ void fillGrid(std::vector<vcl::font::Feature> const& rFontFeatures);
+
+ DECL_LINK(ComboBoxSelectedHdl, weld::ComboBox&, void);
+ DECL_LINK(CheckBoxToggledHdl, weld::ToggleButton&, void);
+
+public:
+ FontFeaturesDialog(weld::Window* pParent, OUString const& rFontName);
+ ~FontFeaturesDialog() override;
+ virtual short run() override;
+
+ OUString const& getResultFontName() const { return m_sResultFontName; }
+
+ void updateFontPreview();
+};
+
+} // end svx namespaces
+
+#endif // INCLUDED_CUI_SOURCE_INC_FONTFEATURESDIALOG_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/QrCodeGenDialog.hxx b/cui/source/inc/QrCodeGenDialog.hxx
new file mode 100644
index 000000000..832662837
--- /dev/null
+++ b/cui/source/inc/QrCodeGenDialog.hxx
@@ -0,0 +1,50 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * 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_INC_QRCODEGENDIALOG_HXX
+#define INCLUDED_CUI_INC_QRCODEGENDIALOG_HXX
+
+#include <config_qrcodegen.h>
+
+#include <vcl/weld.hxx>
+
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/uno/Reference.hxx>
+
+#include <com/sun/star/beans/XPropertySet.hpp>
+
+class QrCodeGenDialog : public weld::GenericDialogController
+{
+public:
+ QrCodeGenDialog(weld::Widget* pParent, css::uno::Reference<css::frame::XModel> xModel,
+ bool bEditExisting);
+
+ virtual short run() override;
+
+protected:
+ css::uno::Reference<css::frame::XModel> m_xModel;
+ void Apply();
+
+private:
+ std::unique_ptr<weld::Entry> m_xEdittext;
+ std::unique_ptr<weld::RadioButton> m_xECC[4];
+ std::unique_ptr<weld::SpinButton> m_xSpinBorder;
+#if ENABLE_QRCODEGEN
+ weld::Widget* mpParent;
+#endif
+
+ css::uno::Reference<css::beans::XPropertySet> m_xExistingShapeProperties;
+
+ void GetErrorCorrection(long);
+ //Function contains QR Code Generating Library Calls
+ static OUString GenerateQRCode(OUString aQrText, long aQrECC, int aQrBorder);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/cui/source/inc/SignSignatureLineDialog.hxx b/cui/source/inc/SignSignatureLineDialog.hxx
new file mode 100644
index 000000000..6bd08ff4b
--- /dev/null
+++ b/cui/source/inc/SignSignatureLineDialog.hxx
@@ -0,0 +1,56 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * 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_INC_SIGNSIGNATURELINEDIALOG_HXX
+#define INCLUDED_CUI_INC_SIGNSIGNATURELINEDIALOG_HXX
+
+#include "SignatureLineDialogBase.hxx"
+
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/graphic/XGraphic.hpp>
+#include <com/sun/star/security/XCertificate.hpp>
+#include <com/sun/star/uno/Reference.hxx>
+
+class SignSignatureLineDialog : public SignatureLineDialogBase
+{
+public:
+ SignSignatureLineDialog(weld::Widget* pParent, css::uno::Reference<css::frame::XModel> xModel);
+
+private:
+ std::unique_ptr<weld::Entry> m_xEditName;
+ std::unique_ptr<weld::TextView> m_xEditComment;
+ std::unique_ptr<weld::Button> m_xBtnLoadImage;
+ std::unique_ptr<weld::Button> m_xBtnClearImage;
+ std::unique_ptr<weld::Button> m_xBtnChooseCertificate;
+ std::unique_ptr<weld::Button> m_xBtnSign;
+ std::unique_ptr<weld::Label> m_xLabelHint;
+ std::unique_ptr<weld::Label> m_xLabelHintText;
+ std::unique_ptr<weld::Label> m_xLabelAddComment;
+
+ css::uno::Reference<css::beans::XPropertySet> m_xShapeProperties;
+ css::uno::Reference<css::security::XCertificate> m_xSelectedCertifate;
+ css::uno::Reference<css::graphic::XGraphic> m_xSignatureImage;
+ OUString m_aSignatureLineId;
+ OUString m_aSuggestedSignerName;
+ OUString m_aSuggestedSignerTitle;
+ bool m_bShowSignDate;
+ OUString m_sOriginalImageBtnLabel;
+
+ void ValidateFields();
+ css::uno::Reference<css::graphic::XGraphic> getSignedGraphic(bool bValid);
+ virtual void Apply() override;
+
+ DECL_LINK(clearImage, weld::Button&, void);
+ DECL_LINK(loadImage, weld::Button&, void);
+ DECL_LINK(chooseCertificate, weld::Button&, void);
+ DECL_LINK(entryChanged, weld::Entry&, void);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/cui/source/inc/SignatureLineDialog.hxx b/cui/source/inc/SignatureLineDialog.hxx
new file mode 100644
index 000000000..fd671acd5
--- /dev/null
+++ b/cui/source/inc/SignatureLineDialog.hxx
@@ -0,0 +1,39 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * 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_INC_SIGNATURELINEDIALOG_HXX
+#define INCLUDED_CUI_INC_SIGNATURELINEDIALOG_HXX
+
+#include "SignatureLineDialogBase.hxx"
+
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/uno/Reference.hxx>
+
+class SignatureLineDialog : public SignatureLineDialogBase
+{
+public:
+ SignatureLineDialog(weld::Widget* pParent, css::uno::Reference<css::frame::XModel> xModel,
+ bool bEditExisting);
+
+private:
+ std::unique_ptr<weld::Entry> m_xEditName;
+ std::unique_ptr<weld::Entry> m_xEditTitle;
+ std::unique_ptr<weld::Entry> m_xEditEmail;
+ std::unique_ptr<weld::TextView> m_xEditInstructions;
+ std::unique_ptr<weld::CheckButton> m_xCheckboxCanAddComments;
+ std::unique_ptr<weld::CheckButton> m_xCheckboxShowSignDate;
+
+ css::uno::Reference<css::beans::XPropertySet> m_xExistingShapeProperties;
+ OUString m_aSignatureLineId;
+
+ virtual void Apply() override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/cui/source/inc/SignatureLineDialogBase.hxx b/cui/source/inc/SignatureLineDialogBase.hxx
new file mode 100644
index 000000000..2e046d945
--- /dev/null
+++ b/cui/source/inc/SignatureLineDialogBase.hxx
@@ -0,0 +1,34 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * 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_INC_SIGNATURELINEDIALOGBASE_HXX
+#define INCLUDED_CUI_INC_SIGNATURELINEDIALOGBASE_HXX
+
+#include <vcl/weld.hxx>
+
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/uno/Reference.hxx>
+
+class SignatureLineDialogBase : public weld::GenericDialogController
+{
+public:
+ SignatureLineDialogBase(weld::Widget* pParent, css::uno::Reference<css::frame::XModel> xModel,
+ const OUString& rUIFile, const OString& rDialogId);
+
+ virtual short run() override;
+
+protected:
+ css::uno::Reference<css::frame::XModel> m_xModel;
+ static OUString getSignatureImage();
+ virtual void Apply() = 0;
+ static OUString getCDataString(const OUString& rString);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/cui/source/inc/SpellDialog.hxx b/cui/source/inc/SpellDialog.hxx
new file mode 100644
index 000000000..cb23f1004
--- /dev/null
+++ b/cui/source/inc/SpellDialog.hxx
@@ -0,0 +1,231 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_SPELLDIALOG_HXX
+#define INCLUDED_CUI_SOURCE_INC_SPELLDIALOG_HXX
+
+#include <sfx2/basedlgs.hxx>
+#include <com/sun/star/uno/Reference.hxx>
+
+
+#include <svx/langbox.hxx>
+#include <memory>
+#include <svl/undo.hxx>
+#include <vcl/customweld.hxx>
+#include <svx/weldeditview.hxx>
+#include <editeng/SpellPortions.hxx>
+
+#include <set>
+
+namespace svx{ class SpellUndoAction_Impl;}
+class UndoChangeGroupGuard;
+
+// forward ---------------------------------------------------------------
+
+struct SpellDialog_Impl;
+namespace com::sun::star::linguistic2 { class XSpellChecker1; }
+
+namespace svx{
+class SpellDialog;
+struct SpellErrorDescription;
+
+class SentenceEditWindow_Impl : public WeldEditView
+{
+private:
+ std::set<sal_Int32> m_aIgnoreErrorsAt;
+ SpellDialog* m_pSpellDialog;
+ weld::Toolbar* m_pToolbar;
+ sal_Int32 m_nErrorStart;
+ sal_Int32 m_nErrorEnd;
+ bool m_bIsUndoEditMode;
+
+ Link<LinkParamNone*,void> m_aModifyLink;
+
+ void CallModifyLink() {m_aModifyLink.Call(nullptr); }
+
+ SpellDialog* GetSpellDialog() const { return m_pSpellDialog; }
+
+ bool GetErrorDescription(SpellErrorDescription& rSpellErrorDescription, sal_Int32 nPosition);
+
+ DECL_LINK(ToolbarHdl, const OString&, void);
+
+protected:
+ virtual bool KeyInput( const KeyEvent& rKEvt ) override;
+
+public:
+ SentenceEditWindow_Impl();
+ virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
+ void SetSpellDialog(SpellDialog* pDialog) { m_pSpellDialog = pDialog; }
+ virtual ~SentenceEditWindow_Impl() override;
+
+ void Init(weld::Toolbar* pToolbar);
+ void SetModifyHdl(const Link<LinkParamNone*,void>& rLink)
+ {
+ m_aModifyLink = rLink;
+ m_xEditEngine->SetModifyHdl(m_aModifyLink);
+ }
+
+ void SetAttrib(const SfxPoolItem& rItem, sal_Int32 nStart, sal_Int32 nEnd);
+
+ void SetText(const OUString& rStr);
+
+ bool MarkNextError( bool bIgnoreCurrentError, const css::uno::Reference<css::linguistic2::XSpellChecker1>& );
+ int ChangeMarkedWord(const OUString& rNewWord, LanguageType eLanguage);
+ void MoveErrorMarkTo(sal_Int32 nErrorStart, sal_Int32 nErrorEnd, bool bGrammar);
+ OUString GetErrorText() const;
+ void RestoreCurrentError();
+
+ void SetAlternatives(
+ const css::uno::Reference<css::linguistic2::XSpellAlternatives>& );
+
+ bool GetAlternatives(SpellErrorDescription& rDesc);
+
+ void ClearModifyFlag() { m_xEditEngine->ClearModifyFlag(); }
+ void ResetModified() { ClearModifyFlag(); m_bIsUndoEditMode = false;}
+ bool IsModified() const { return m_xEditEngine->IsModified(); }
+
+ bool IsUndoEditMode() const { return m_bIsUndoEditMode;}
+ void SetUndoEditMode(bool bSet);
+
+ svx::SpellPortions CreateSpellPortions() const;
+
+ void ResetUndo();
+ void Undo();
+ void AddUndoAction( std::unique_ptr<SfxUndoAction> pAction );
+ size_t GetUndoActionCount() const;
+ void UndoActionStart( sal_uInt16 nId );
+ void UndoActionEnd();
+
+ void MoveErrorEnd(long nOffset);
+
+ void ResetIgnoreErrorsAt() { m_aIgnoreErrorsAt.clear(); }
+};
+
+// class SvxSpellDialog ---------------------------------------------
+class SpellDialogChildWindow;
+
+class SpellDialog : public SfxModelessDialogController
+{
+ friend class SentenceEditWindow_Impl;
+private:
+ OUString m_sResumeST;
+ OUString m_sIgnoreOnceST;
+ OUString m_sNoSuggestionsST;
+
+ OUString m_sTitleSpelling;
+ OUString m_sTitleSpellingGrammar;
+
+ Link<SpellUndoAction_Impl&,void> aDialogUndoLink;
+
+ bool bFocusLocked;
+
+ svx::SpellDialogChildWindow& rParent;
+ svx::SpellPortions m_aSavedSentence;
+
+ std::unique_ptr<SpellDialog_Impl> pImpl;
+ css::uno::Reference<
+ css::linguistic2::XSpellChecker1 > xSpell;
+
+ std::unique_ptr<weld::Label> m_xAltTitle;
+ std::unique_ptr<weld::Label> m_xResumeFT;
+ std::unique_ptr<weld::Label> m_xNoSuggestionsFT;
+ std::unique_ptr<weld::Label> m_xIgnoreOnceFT;
+ std::unique_ptr<weld::Label> m_xLanguageFT;
+ std::unique_ptr<SvxLanguageBox> m_xLanguageLB;
+ std::unique_ptr<weld::Label> m_xExplainFT;
+ std::unique_ptr<weld::LinkButton> m_xExplainLink;
+ std::unique_ptr<weld::Label> m_xNotInDictFT;
+ std::unique_ptr<SentenceEditWindow_Impl> m_xSentenceED;
+ std::unique_ptr<weld::Label> m_xSuggestionFT;
+ std::unique_ptr<weld::TreeView> m_xSuggestionLB;
+ std::unique_ptr<weld::Button> m_xIgnorePB;
+ std::unique_ptr<weld::Button> m_xIgnoreAllPB;
+ std::unique_ptr<weld::Button> m_xIgnoreRulePB;
+ std::unique_ptr<weld::Button> m_xAddToDictPB;
+ std::unique_ptr<weld::MenuButton> m_xAddToDictMB;
+ std::unique_ptr<weld::Button> m_xChangePB;
+ std::unique_ptr<weld::Button> m_xChangeAllPB;
+ std::unique_ptr<weld::Button> m_xAutoCorrPB;
+ std::unique_ptr<weld::CheckButton> m_xCheckGrammarCB;
+ std::unique_ptr<weld::Button> m_xOptionsPB;
+ std::unique_ptr<weld::Button> m_xUndoPB;
+ std::unique_ptr<weld::Button> m_xClosePB;
+ std::unique_ptr<weld::Toolbar> m_xToolbar;
+ std::unique_ptr<weld::CustomWeld> m_xSentenceEDWeld;
+
+ DECL_LINK(ChangeHdl, weld::Button&, void);
+ DECL_LINK(DoubleClickChangeHdl, weld::TreeView&, bool);
+ DECL_LINK(ChangeAllHdl, weld::Button&, void);
+ DECL_LINK(IgnoreAllHdl, weld::Button&, void);
+ DECL_LINK(IgnoreHdl, weld::Button&, void);
+ DECL_LINK(CheckGrammarHdl, weld::Button&, void);
+ DECL_LINK(ExtClickHdl, weld::Button&, void);
+ DECL_LINK(CancelHdl, weld::Button&, void);
+ DECL_LINK(ModifyHdl, LinkParamNone*, void);
+ DECL_LINK(UndoHdl, weld::Button&, void);
+ DECL_LINK(AddToDictSelectHdl, const OString&, void);
+ DECL_LINK(AddToDictClickHdl, weld::Button&, void);
+ DECL_LINK(LanguageSelectHdl, weld::ComboBox&, void);
+ DECL_LINK(DialogUndoHdl, SpellUndoAction_Impl&, void);
+
+ DECL_LINK(InitHdl, void*, void);
+
+ void AddToDictionaryExecute(const OString& rItemId);
+ void StartSpellOptDlg_Impl();
+ int InitUserDicts();
+ void UpdateBoxes_Impl(bool bCallFromSelectHdl = false);
+ void Init_Impl();
+ void SpellContinue_Impl(std::unique_ptr<UndoChangeGroupGuard>* pGuard = nullptr, bool UseSavedSentence = false, bool bIgnoreCurrentError = false );
+ void LockFocusChanges( bool bLock ) {bFocusLocked = bLock;}
+ void ToplevelFocusChanged();
+ void Impl_Restore(bool bUseSavedSentence);
+
+ LanguageType GetSelectedLang_Impl() const;
+
+ /** Retrieves the next sentence.
+ */
+ bool GetNextSentence_Impl(std::unique_ptr<UndoChangeGroupGuard>* pGuard, bool bUseSavedSentence, bool bRecheck /*for rechecking the current sentence*/);
+ /** Corrects all errors that have been selected to be changed always
+ */
+ static bool ApplyChangeAllList_Impl(SpellPortions& rSentence, bool& bHasReplaced);
+ void SetTitle_Impl(LanguageType nLang);
+
+protected:
+
+ OUString getReplacementString() const;
+
+public:
+ SpellDialog(
+ svx::SpellDialogChildWindow* pChildWindow,
+ weld::Window * pParent,
+ SfxBindings* pBindings);
+ virtual ~SpellDialog() override;
+
+ virtual void Activate() override;
+ virtual void Deactivate() override;
+
+ virtual void Close() override;
+
+ void InvalidateDialog();
+};
+
+} //namespace svx
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/SvxConfigPageHelper.hxx b/cui/source/inc/SvxConfigPageHelper.hxx
new file mode 100644
index 000000000..8beed6069
--- /dev/null
+++ b/cui/source/inc/SvxConfigPageHelper.hxx
@@ -0,0 +1,89 @@
+/* -*- 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 <com/sun/star/frame/XModuleManager2.hpp>
+
+#include "cfg.hxx"
+
+class SvxConfigPageHelper
+{
+public:
+ static void RemoveEntry( SvxEntries* pEntries, SvxConfigEntry const * pChildEntry );
+
+ static OUString replaceSaveInName( const OUString& rMessage, const OUString& rSaveInName );
+ static OUString stripHotKey( const OUString& str );
+ static OUString replaceSixteen( const OUString& str, sal_Int32 nReplacement );
+
+ static sal_Int16 GetImageType();
+ static void InitImageType();
+ static css::uno::Reference< css::graphic::XGraphic > GetGraphic(
+ const css::uno::Reference< css::ui::XImageManager >& xImageManager,
+ const OUString& rCommandURL );
+
+ static OUString generateCustomName(
+ const OUString& prefix,
+ SvxEntries* entries,
+ sal_Int32 suffix = 1 );
+ static OUString generateCustomMenuURL(
+ SvxEntries* entries,
+ sal_Int32 suffix = 1 );
+ static sal_uInt32 generateRandomValue();
+ /**
+ Generates a custom resource URL for a new toolbar.
+ Typically something like: private:resource/toolbar/custom_toolbar_########
+ The last 8 letters are randomly generated alphanumeric characters.
+ */
+ static OUString generateCustomURL( SvxEntries* entries );
+
+ static OUString GetModuleName( const OUString& aModuleId );
+ static OUString GetUIModuleName(
+ const OUString& aModuleId,
+ const css::uno::Reference< css::frame::XModuleManager2 >& rModuleManager );
+
+ static bool GetMenuItemData(
+ const css::uno::Reference< css::container::XIndexAccess >& rItemContainer,
+ sal_Int32 nIndex,
+ OUString& rCommandURL,
+ OUString& rLabel,
+ sal_uInt16& rType,
+ sal_Int32& rStyle,
+ css::uno::Reference< css::container::XIndexAccess >& rSubMenu );
+ static bool GetToolbarItemData(
+ const css::uno::Reference< css::container::XIndexAccess >& rItemContainer,
+ sal_Int32 nIndex,
+ OUString& rCommandURL,
+ OUString& rLabel,
+ sal_uInt16& rType,
+ bool& rIsVisible,
+ sal_Int32& rStyle );
+
+ static css::uno::Sequence< css::beans::PropertyValue > ConvertSvxConfigEntry(
+ const SvxConfigEntry* pEntry );
+ static css::uno::Sequence< css::beans::PropertyValue > ConvertToolbarEntry(
+ const SvxConfigEntry* pEntry );
+
+ static bool EntrySort( SvxConfigEntry const * a, SvxConfigEntry const * b );
+
+ static bool SvxConfigEntryModified( SvxConfigEntry const * pEntry );
+
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/SvxMenuConfigPage.hxx b/cui/source/inc/SvxMenuConfigPage.hxx
new file mode 100644
index 000000000..50124e46a
--- /dev/null
+++ b/cui/source/inc/SvxMenuConfigPage.hxx
@@ -0,0 +1,72 @@
+/* -*- 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 <vcl/weld.hxx>
+#include <com/sun/star/ui/XUIConfigurationManager.hpp>
+
+#include "cfg.hxx" //for SvxConfigPage and SaveInData
+
+class SvxMenuConfigPage : public SvxConfigPage
+{
+private:
+ bool m_bIsMenuBar;
+
+ DECL_LINK( SelectMenuEntry, weld::TreeView&, void );
+ DECL_LINK( ContentContextMenuHdl, const CommandEvent&, bool );
+ DECL_LINK( FunctionContextMenuHdl, const CommandEvent&, bool );
+
+ DECL_LINK( GearHdl, const OString&, void );
+
+ DECL_LINK( SelectCategory, weld::ComboBox&, void );
+
+ DECL_LINK( AddCommandHdl, weld::Button&, void );
+ DECL_LINK( RemoveCommandHdl, weld::Button&, void );
+
+ DECL_LINK( InsertHdl, const OString&, void );
+ DECL_LINK( ModifyItemHdl, const OString&, void );
+ DECL_LINK( ResetMenuHdl, weld::Button&, void );
+
+ DECL_LINK( MenuEntriesSizeAllocHdl, const Size&, void );
+
+ virtual void ListModified() override;
+
+ void Init() override;
+ void UpdateButtonStates() override;
+ short QueryReset() override;
+ void DeleteSelectedContent() override;
+ void DeleteSelectedTopLevel() override;
+
+ virtual void SelectElement() override;
+
+public:
+ SvxMenuConfigPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rItemSet, bool bIsMenuBar = true);
+ virtual ~SvxMenuConfigPage() override;
+
+ SaveInData* CreateSaveInData(
+ const css::uno::Reference <
+ css::ui::XUIConfigurationManager >&,
+ const css::uno::Reference <
+ css::ui::XUIConfigurationManager >&,
+ const OUString& aModuleId,
+ bool docConfig ) override;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/SvxNotebookbarConfigPage.hxx b/cui/source/inc/SvxNotebookbarConfigPage.hxx
new file mode 100644
index 000000000..47870949d
--- /dev/null
+++ b/cui/source/inc/SvxNotebookbarConfigPage.hxx
@@ -0,0 +1,87 @@
+/* -*- 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 <libxml/parser.h>
+#include <vcl/weld.hxx>
+#include <com/sun/star/ui/XUIConfigurationManager.hpp>
+
+#include <memory>
+#include <vector>
+
+#include "cfg.hxx" //for SvxConfigPage and SaveInData
+
+class SvxNotebookbarConfigPage : public SvxConfigPage
+{
+private:
+ void UpdateButtonStates() override;
+ short QueryReset() override;
+ void Init() override;
+ void DeleteSelectedContent() override;
+ void DeleteSelectedTopLevel() override;
+ virtual void SelectElement() override;
+ void SetElement();
+
+public:
+ struct NotebookbarEntries
+ {
+ OUString sUIItemId;
+ OUString sClassId;
+ OUString sActionName;
+ OUString sDisplayName;
+ OUString sVisibleValue;
+ };
+ struct CategoriesEntries
+ {
+ OUString sDisplayName;
+ OUString sUIItemId;
+ OUString sClassType;
+ };
+ SvxNotebookbarConfigPage(weld::Container* pPage, weld::DialogController* pController,
+ const SfxItemSet& rItemSet);
+ virtual ~SvxNotebookbarConfigPage() override;
+ SaveInData* CreateSaveInData(const css::uno::Reference<css::ui::XUIConfigurationManager>&,
+ const css::uno::Reference<css::ui::XUIConfigurationManager>&,
+ const OUString& aModuleId, bool docConfig) override;
+ static void FillFunctionsList(xmlNodePtr pRootNodePtr,
+ std::vector<NotebookbarEntries>& aEntries,
+ std::vector<CategoriesEntries>& aCategoryList,
+ OUString& sActiveCategory);
+ static void searchNodeandAttribute(std::vector<NotebookbarEntries>& aEntries,
+ std::vector<CategoriesEntries>& aCategoryList,
+ OUString& sActiveCategory,
+ CategoriesEntries& aCurCategoryEntry, xmlNode* pNodePtr,
+ bool isCategory);
+ static void getNodeValue(xmlNode* pNodePtr, NotebookbarEntries& aNodeEntries);
+};
+
+class SvxNotebookbarEntriesListBox final : public SvxMenuEntriesListBox
+{
+ void ChangedVisibility(int nRow);
+ typedef std::pair<int, int> row_col;
+ DECL_LINK(CheckButtonHdl, const row_col&, void);
+ DECL_LINK(KeyInputHdl, const KeyEvent&, bool);
+
+public:
+ SvxNotebookbarEntriesListBox(std::unique_ptr<weld::TreeView> xControl, SvxConfigPage* pPg);
+ virtual ~SvxNotebookbarEntriesListBox() override;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/SvxToolbarConfigPage.hxx b/cui/source/inc/SvxToolbarConfigPage.hxx
new file mode 100644
index 000000000..5902cdf4b
--- /dev/null
+++ b/cui/source/inc/SvxToolbarConfigPage.hxx
@@ -0,0 +1,90 @@
+/* -*- 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 <vcl/weld.hxx>
+#include <com/sun/star/ui/XUIConfigurationManager.hpp>
+
+#include <memory>
+
+#include "cfg.hxx" //for SvxConfigPage and SaveInData
+
+class SvxToolbarConfigPage : public SvxConfigPage
+{
+private:
+
+ DECL_LINK( SelectToolbarEntry, weld::TreeView&, void );
+ DECL_LINK( MoveHdl, weld::Button&, void );
+
+ DECL_LINK( GearHdl, const OString&, void );
+
+ DECL_LINK( SelectCategory, weld::ComboBox&, void );
+
+ DECL_LINK( ContentContextMenuHdl, const CommandEvent&, bool );
+ DECL_LINK( FunctionContextMenuHdl, const CommandEvent&, bool );
+
+ DECL_LINK( AddCommandHdl, weld::Button&, void );
+ DECL_LINK( RemoveCommandHdl, weld::Button&, void );
+
+ DECL_LINK( InsertHdl, const OString&, void );
+ DECL_LINK( ModifyItemHdl, const OString&, void );
+ DECL_LINK( ResetToolbarHdl, weld::Button&, void );
+
+ virtual void ListModified() override;
+
+ void UpdateButtonStates() override;
+ short QueryReset() override;
+ void Init() override;
+ void DeleteSelectedContent() override;
+ void DeleteSelectedTopLevel() override;
+ virtual void SelectElement() override;
+
+public:
+ SvxToolbarConfigPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rItemSet);
+ virtual ~SvxToolbarConfigPage() override;
+
+ void AddFunction(int nTarget = -1);
+
+ void MoveEntry( bool bMoveUp ) override;
+
+ SaveInData* CreateSaveInData(
+ const css::uno::Reference <
+ css::ui::XUIConfigurationManager >&,
+ const css::uno::Reference <
+ css::ui::XUIConfigurationManager >&,
+ const OUString& aModuleId,
+ bool docConfig ) override;
+};
+
+class SvxToolbarEntriesListBox final : public SvxMenuEntriesListBox
+{
+ void ChangedVisibility(int nRow);
+
+ typedef std::pair<int, int> row_col;
+ DECL_LINK(CheckButtonHdl, const row_col&, void);
+ DECL_LINK(KeyInputHdl, const KeyEvent&, bool);
+
+public:
+
+ SvxToolbarEntriesListBox(std::unique_ptr<weld::TreeView> xControl, SvxToolbarConfigPage* pPg);
+ virtual ~SvxToolbarEntriesListBox() override;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/about.hxx b/cui/source/inc/about.hxx
new file mode 100644
index 000000000..2262da38d
--- /dev/null
+++ b/cui/source/inc/about.hxx
@@ -0,0 +1,62 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_ABOUT_HXX
+#define INCLUDED_CUI_SOURCE_INC_ABOUT_HXX
+
+#include <vcl/bitmapex.hxx>
+#include <vcl/weld.hxx>
+
+class AboutDialog : public weld::GenericDialogController
+{
+private:
+ std::unique_ptr<weld::LinkButton> m_pCreditsButton;
+ std::unique_ptr<weld::LinkButton> m_pWebsiteButton;
+ std::unique_ptr<weld::LinkButton> m_pReleaseNotesButton;
+ std::unique_ptr<weld::Button> m_pCloseButton;
+ std::unique_ptr<weld::Button> m_pCopyButton;
+
+ std::unique_ptr<weld::Image> m_pBrandImage;
+ std::unique_ptr<weld::Image> m_pAboutImage;
+ std::unique_ptr<weld::Label> m_pVersionLabel;
+ std::unique_ptr<weld::Label> m_pBuildCaption;
+ std::unique_ptr<weld::LinkButton> m_pBuildLabel;
+ std::unique_ptr<weld::Label> m_pEnvLabel;
+ std::unique_ptr<weld::Label> m_pUILabel;
+ std::unique_ptr<weld::Label> m_pLocaleLabel;
+ std::unique_ptr<weld::Label> m_pMiscLabel;
+ std::unique_ptr<weld::Label> m_pCopyrightLabel;
+
+ static OUString GetVersionString();
+ static OUString GetBuildString();
+ static OUString GetLocaleString();
+ static OUString GetMiscString();
+
+ static OUString GetCopyrightString();
+ static bool IsStringValidGitHash(const OUString& hash);
+
+ DECL_LINK(HandleClick, weld::Button&, void);
+
+public:
+ AboutDialog(weld::Window* pParent);
+ virtual ~AboutDialog() override;
+};
+
+#endif // INCLUDED_CUI_SOURCE_INC_ABOUT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/acccfg.hxx b/cui/source/inc/acccfg.hxx
new file mode 100644
index 000000000..aecc923ad
--- /dev/null
+++ b/cui/source/inc/acccfg.hxx
@@ -0,0 +1,155 @@
+/* -*- 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 <com/sun/star/ui/XAcceleratorConfiguration.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/frame/XFrame.hpp>
+
+#include <sfx2/tabdlg.hxx>
+#include <vcl/idle.hxx>
+#include <vcl/keycod.hxx>
+#include <i18nutil/searchopt.hxx>
+#include "cfgutil.hxx"
+
+class SfxMacroInfoItem;
+class CuiConfigFunctionListBox;
+class SfxAcceleratorConfigPage;
+class SfxStringItem;
+
+// class SfxAcceleratorConfigPage ----------------------------------------
+
+struct TAccInfo
+{
+public:
+ TAccInfo(sal_Int32 nKeyPos, sal_Int32 nListPos, const vcl::KeyCode& aKey)
+ : m_nKeyPos(nKeyPos)
+ , m_nListPos(nListPos)
+ , m_bIsConfigurable(true) /**< it's important to set true as default -
+ because only fix entries will be disabled later... */
+ , m_sCommand()
+ , m_aKey(aKey)
+ {
+ }
+
+ bool isConfigured() const
+ {
+ return (m_nKeyPos > -1 && m_nListPos > -1 && !m_sCommand.isEmpty());
+ }
+
+ sal_Int32 m_nKeyPos;
+ sal_Int32 m_nListPos;
+ bool m_bIsConfigurable;
+ OUString m_sCommand;
+ vcl::KeyCode m_aKey;
+};
+
+namespace sfx2
+{
+class FileDialogHelper;
+}
+
+enum class StartFileDialogType
+{
+ Open,
+ SaveAs
+};
+
+class SfxAcceleratorConfigPage : public SfxTabPage
+{
+private:
+ const SfxMacroInfoItem* m_pMacroInfoItem;
+ std::unique_ptr<sfx2::FileDialogHelper> m_pFileDlg;
+
+ OUString aLoadAccelConfigStr;
+ OUString aSaveAccelConfigStr;
+ OUString aFilterAllStr;
+ OUString aFilterCfgStr;
+ SfxStylesInfo_Impl m_aStylesInfo;
+ bool m_bStylesInfoInitialized;
+
+ css::uno::Reference<css::uno::XComponentContext> m_xContext;
+ css::uno::Reference<css::ui::XAcceleratorConfiguration> m_xGlobal;
+ css::uno::Reference<css::ui::XAcceleratorConfiguration> m_xModule;
+ css::uno::Reference<css::ui::XAcceleratorConfiguration> m_xAct;
+ css::uno::Reference<css::container::XNameAccess> m_xUICmdDescription;
+ css::uno::Reference<css::frame::XFrame> m_xFrame;
+
+ OUString m_sModuleLongName;
+ OUString m_sModuleUIName;
+
+ // For search
+ Timer m_aUpdateDataTimer;
+ i18nutil::SearchOptions2 m_options;
+
+ Idle m_aFillGroupIdle;
+
+ std::unique_ptr<weld::TreeView> m_xEntriesBox;
+ std::unique_ptr<weld::RadioButton> m_xOfficeButton;
+ std::unique_ptr<weld::RadioButton> m_xModuleButton;
+ std::unique_ptr<weld::Button> m_xChangeButton;
+ std::unique_ptr<weld::Button> m_xRemoveButton;
+ std::unique_ptr<CuiConfigGroupListBox> m_xGroupLBox;
+ std::unique_ptr<CuiConfigFunctionListBox> m_xFunctionBox;
+ std::unique_ptr<weld::TreeView> m_xKeyBox;
+ std::unique_ptr<weld::Entry> m_xSearchEdit;
+ std::unique_ptr<weld::Button> m_xLoadButton;
+ std::unique_ptr<weld::Button> m_xSaveButton;
+ std::unique_ptr<weld::Button> m_xResetButton;
+
+ DECL_LINK(ChangeHdl, weld::Button&, void);
+ DECL_LINK(RemoveHdl, weld::Button&, void);
+ DECL_LINK(SelectHdl, weld::TreeView&, void);
+ DECL_LINK(SearchUpdateHdl, weld::Entry&, void);
+ DECL_LINK(Save, weld::Button&, void);
+ DECL_LINK(Load, weld::Button&, void);
+ DECL_LINK(Default, weld::Button&, void);
+ DECL_LINK(RadioHdl, weld::Button&, void);
+ DECL_LINK(ImplUpdateDataHdl, Timer*, void);
+ DECL_LINK(FocusOut_Impl, weld::Widget&, void);
+ DECL_LINK(TimeOut_Impl, Timer*, void);
+
+ DECL_LINK(KeyInputHdl, const KeyEvent&, bool);
+
+ DECL_LINK(LoadHdl, sfx2::FileDialogHelper*, void);
+ DECL_LINK(SaveHdl, sfx2::FileDialogHelper*, void);
+
+ OUString GetLabel4Command(const OUString& rCommand);
+ int applySearchFilter(OUString const& rSearchTerm);
+ void InitAccCfg();
+ sal_Int32 MapKeyCodeToPos(const vcl::KeyCode& rCode) const;
+ void StartFileDialog(StartFileDialogType nType, const OUString& rTitle);
+
+ void Init(const css::uno::Reference<css::ui::XAcceleratorConfiguration>& pAccMgr);
+ void ResetConfig();
+
+public:
+ SfxAcceleratorConfigPage(weld::Container* pPage, weld::DialogController* pController,
+ const SfxItemSet& rItemSet);
+ virtual ~SfxAcceleratorConfigPage() override;
+
+ virtual bool FillItemSet(SfxItemSet*) override;
+ virtual void Reset(const SfxItemSet*) override;
+
+ void Apply(const css::uno::Reference<css::ui::XAcceleratorConfiguration>& pAccMgr);
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/align.hxx b/cui/source/inc/align.hxx
new file mode 100644
index 000000000..43c2fe0ee
--- /dev/null
+++ b/cui/source/inc/align.hxx
@@ -0,0 +1,122 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_ALIGN_HXX
+#define INCLUDED_CUI_SOURCE_INC_ALIGN_HXX
+
+// list box indexes
+#define ALIGNDLG_HORALIGN_STD 0
+#define ALIGNDLG_HORALIGN_LEFT 1
+#define ALIGNDLG_HORALIGN_CENTER 2
+#define ALIGNDLG_HORALIGN_RIGHT 3
+#define ALIGNDLG_HORALIGN_BLOCK 4
+#define ALIGNDLG_HORALIGN_FILL 5
+#define ALIGNDLG_HORALIGN_DISTRIBUTED 6
+
+#define ALIGNDLG_VERALIGN_STD 0
+#define ALIGNDLG_VERALIGN_TOP 1
+#define ALIGNDLG_VERALIGN_MID 2
+#define ALIGNDLG_VERALIGN_BOTTOM 3
+#define ALIGNDLG_VERALIGN_BLOCK 4
+#define ALIGNDLG_VERALIGN_DISTRIBUTED 5
+
+#include <sfx2/tabdlg.hxx>
+#include <svtools/valueset.hxx>
+#include <svx/dialcontrol.hxx>
+#include <svx/frmdirlbox.hxx>
+#include <vcl/weld.hxx>
+
+namespace svx {
+
+
+class AlignmentTabPage : public SfxTabPage
+{
+ static const sal_uInt16 s_pRanges[];
+
+public:
+ virtual ~AlignmentTabPage() override;
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet );
+ explicit AlignmentTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreSet);
+
+ static const sal_uInt16* GetRanges() { return s_pRanges; }
+
+ virtual bool FillItemSet( SfxItemSet* rSet ) override;
+ virtual void Reset( const SfxItemSet* rSet ) override;
+ virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
+
+private:
+ void InitVsRefEgde();
+ void UpdateEnableControls();
+
+ bool HasAlignmentChanged( const SfxItemSet& rNew, sal_uInt16 nWhich ) const;
+
+ DECL_LINK(UpdateEnableHdl, weld::ComboBox&, void);
+ DECL_LINK(StackedClickHdl, weld::ToggleButton&, void);
+ DECL_LINK(AsianModeClickHdl, weld::ToggleButton&, void);
+ DECL_LINK(WrapClickHdl, weld::ToggleButton&, void);
+ DECL_LINK(HyphenClickHdl, weld::ToggleButton&, void);
+ DECL_LINK(ShrinkClickHdl, weld::ToggleButton&, void);
+
+private:
+ weld::TriStateEnabled m_aStackedState;
+ weld::TriStateEnabled m_aAsianModeState;
+ weld::TriStateEnabled m_aWrapState;
+ weld::TriStateEnabled m_aHyphenState;
+ weld::TriStateEnabled m_aShrinkState;
+
+ ValueSet m_aVsRefEdge;
+
+ std::unique_ptr<weld::ComboBox> m_xLbHorAlign;
+ std::unique_ptr<weld::Label> m_xFtIndent;
+ std::unique_ptr<weld::MetricSpinButton> m_xEdIndent;
+ std::unique_ptr<weld::Label> m_xFtVerAlign;
+ std::unique_ptr<weld::ComboBox> m_xLbVerAlign;
+
+ std::unique_ptr<weld::Label> m_xFtRotate;
+ std::unique_ptr<weld::MetricSpinButton> m_xNfRotate;
+ std::unique_ptr<weld::Label> m_xFtRefEdge;
+ std::unique_ptr<weld::CheckButton> m_xCbStacked;
+ std::unique_ptr<weld::CheckButton> m_xCbAsianMode;
+
+ std::unique_ptr<weld::Widget> m_xBoxDirection;
+ std::unique_ptr<weld::CheckButton> m_xBtnWrap;
+ std::unique_ptr<weld::CheckButton> m_xBtnHyphen;
+ std::unique_ptr<weld::CheckButton> m_xBtnShrink;
+ std::unique_ptr<svx::FrameDirectionListBox> m_xLbFrameDir;
+
+ // hidden labels/string
+ std::unique_ptr<weld::Label> m_xFtBotLock;
+ std::unique_ptr<weld::Label> m_xFtTopLock;
+ std::unique_ptr<weld::Label> m_xFtCelLock;
+ std::unique_ptr<weld::Label> m_xFtABCD;
+
+ std::unique_ptr<weld::Widget> m_xAlignmentFrame;
+ std::unique_ptr<weld::Widget> m_xOrientFrame;
+ std::unique_ptr<weld::Widget> m_xPropertiesFrame;
+
+ std::unique_ptr<weld::CustomWeld> m_xVsRefEdge;
+ std::unique_ptr<DialControl> m_xCtrlDial;
+ std::unique_ptr<weld::CustomWeld> m_xCtrlDialWin;
+};
+
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/autocdlg.hxx b/cui/source/inc/autocdlg.hxx
new file mode 100644
index 000000000..e0c780fe8
--- /dev/null
+++ b/cui/source/inc/autocdlg.hxx
@@ -0,0 +1,417 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_AUTOCDLG_HXX
+#define INCLUDED_CUI_SOURCE_INC_AUTOCDLG_HXX
+
+#include <sfx2/tabdlg.hxx>
+#include <svx/langbox.hxx>
+#include <vcl/metric.hxx>
+
+#include <map>
+#include <set>
+
+class CharClass;
+class CollatorWrapper;
+class SmartTagMgr;
+
+namespace editeng { class SortedAutoCompleteStrings; }
+
+// class OfaAutoCorrDlg --------------------------------------------------
+
+class OfaAutoCorrDlg : public SfxTabDialogController
+{
+ std::unique_ptr<weld::Widget> m_xLanguageBox;
+ std::unique_ptr<SvxLanguageBox> m_xLanguageLB;
+
+ DECL_LINK(SelectLanguageHdl, weld::ComboBox&, void);
+public:
+
+ OfaAutoCorrDlg(weld::Window* pParent, const SfxItemSet *pSet);
+ virtual ~OfaAutoCorrDlg() override;
+
+ void EnableLanguage(bool bEnable);
+};
+
+// class OfaAutocorrOptionsPage ------------------------------------------
+
+class OfaAutocorrOptionsPage : public SfxTabPage
+{
+private:
+ OUString m_sInput;
+ OUString m_sDoubleCaps;
+ OUString m_sStartCap;
+ OUString m_sBoldUnderline;
+ OUString m_sURL;
+ OUString m_sNoDblSpaces;
+ OUString m_sDash;
+ OUString m_sAccidentalCaps;
+
+ std::unique_ptr<weld::TreeView> m_xCheckLB;
+
+ void InsertEntry(const OUString& rTxt);
+
+public:
+ OfaAutocorrOptionsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
+ virtual ~OfaAutocorrOptionsPage() override;
+
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController,
+ const SfxItemSet* rAttrSet);
+
+ virtual bool FillItemSet( SfxItemSet* rSet ) override;
+ virtual void Reset( const SfxItemSet* rSet ) override;
+ virtual void ActivatePage( const SfxItemSet& ) override;
+
+};
+
+// class OfaSwAutoFmtOptionsPage ----------------------------------------------------
+
+class OfaSwAutoFmtOptionsPage : public SfxTabPage
+{
+ OUString sDeleteEmptyPara;
+ OUString sUseReplaceTbl;
+ OUString sCapitalStartWord;
+ OUString sCapitalStartSentence;
+ OUString sUserStyle;
+ OUString sBullet;
+ OUString sBoldUnder;
+ OUString sNoDblSpaces;
+ OUString sCorrectCapsLock;
+ OUString sDetectURL;
+ OUString sDash;
+ OUString sRightMargin;
+ OUString sNum;
+ OUString sBorder;
+ OUString sTable;
+ OUString sReplaceTemplates;
+ OUString sDelSpaceAtSttEnd;
+ OUString sDelSpaceBetweenLines;
+
+ OUString sMargin;
+ OUString sBulletChar;
+ OUString sByInputBulletChar;
+
+ vcl::Font aBulletFont;
+ vcl::Font aByInputBulletFont;
+ sal_uInt16 nPercent;
+
+ std::unique_ptr<weld::TreeView> m_xCheckLB;
+ std::unique_ptr<weld::Button> m_xEditPB;
+
+ DECL_LINK(SelectHdl, weld::TreeView&, void);
+ DECL_LINK(EditHdl, weld::Button&, void);
+ DECL_LINK(DoubleClickEditHdl, weld::TreeView&, bool);
+
+ void CreateEntry(const OUString& rTxt, sal_uInt16 nCol);
+
+public:
+ OfaSwAutoFmtOptionsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController,
+ const SfxItemSet* rAttrSet);
+ virtual ~OfaSwAutoFmtOptionsPage() override;
+
+ virtual bool FillItemSet( SfxItemSet* rSet ) override;
+ virtual void Reset( const SfxItemSet* rSet ) override;
+ virtual void ActivatePage( const SfxItemSet& ) override;
+};
+
+// class OfaAutocorrReplacePage ------------------------------------------
+
+struct DoubleString
+{
+ OUString sShort;
+ OUString sLong;
+ void* pUserData; ///< CheckBox -> form. Text Bool -> selection text
+};
+
+typedef std::vector<DoubleString> DoubleStringArray;
+
+struct StringChangeList
+{
+ DoubleStringArray aNewEntries;
+ DoubleStringArray aDeletedEntries;
+};
+
+typedef std::map<LanguageType, StringChangeList> StringChangeTable;
+
+class OfaAutocorrReplacePage : public SfxTabPage
+{
+private:
+
+ StringChangeTable aChangesTable;
+
+ OUString sModify;
+ OUString sNew;
+
+ std::set<OUString> aFormatText;
+ std::map<LanguageType, DoubleStringArray>
+ aDoubleStringTable;
+ std::unique_ptr<CollatorWrapper> pCompareClass;
+ std::unique_ptr<CharClass> pCharClass;
+ LanguageType eLang;
+
+ bool bHasSelectionText;
+ bool bFirstSelect:1;
+ bool bReplaceEditChanged:1;
+ bool bSWriter:1;
+
+ std::vector<int> m_aReplaceFixedWidths;
+ std::unique_ptr<weld::CheckButton> m_xTextOnlyCB;
+ std::unique_ptr<weld::Entry> m_xShortED;
+ std::unique_ptr<weld::Entry> m_xReplaceED;
+ std::unique_ptr<weld::TreeView> m_xReplaceTLB;
+ std::unique_ptr<weld::Button> m_xNewReplacePB;
+ std::unique_ptr<weld::Button> m_xReplacePB;
+ std::unique_ptr<weld::Button> m_xDeleteReplacePB;
+ std::unique_ptr<weld::Container> m_xButtonBox;
+
+ DECL_LINK(SelectHdl, weld::TreeView&, void);
+ DECL_LINK(NewDelButtonHdl, weld::Button&, void);
+ DECL_LINK(NewDelActionHdl, weld::Entry&, bool);
+ DECL_LINK(EntrySizeAllocHdl, const Size&, void);
+ DECL_LINK(ModifyHdl, weld::Entry&, void);
+ bool NewDelHdl(const weld::Widget*);
+
+ void RefillReplaceBox( bool bFromReset,
+ LanguageType eOldLanguage,
+ LanguageType eNewLanguage);
+
+public:
+ OfaAutocorrReplacePage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
+ virtual ~OfaAutocorrReplacePage() override;
+
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet);
+
+ virtual bool FillItemSet( SfxItemSet* rSet ) override;
+ virtual void Reset( const SfxItemSet* rSet ) override;
+ virtual void ActivatePage( const SfxItemSet& ) override;
+ virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
+
+ void SetLanguage(LanguageType eSet);
+ void DeleteEntry(const OUString& sShort, const OUString& sLong);
+ void NewEntry(const OUString& sShort, const OUString& sLong, bool bKeepSourceFormatting);
+};
+
+// class OfaAutocorrExceptPage ---------------------------------------------
+
+struct StringsArrays
+{
+ std::vector<OUString> aAbbrevStrings;
+ std::vector<OUString> aDoubleCapsStrings;
+
+ StringsArrays() { }
+};
+typedef std::map<LanguageType, StringsArrays> StringsTable;
+
+class OfaAutocorrExceptPage : public SfxTabPage
+{
+private:
+ StringsTable aStringsTable;
+ std::unique_ptr<CollatorWrapper> pCompareClass;
+ LanguageType eLang;
+
+ std::unique_ptr<weld::Entry> m_xAbbrevED;
+ std::unique_ptr<weld::TreeView> m_xAbbrevLB;
+ std::unique_ptr<weld::Button> m_xNewAbbrevPB;
+ std::unique_ptr<weld::Button> m_xDelAbbrevPB;
+ std::unique_ptr<weld::CheckButton> m_xAutoAbbrevCB;
+
+ std::unique_ptr<weld::Entry> m_xDoubleCapsED;
+ std::unique_ptr<weld::TreeView> m_xDoubleCapsLB;
+ std::unique_ptr<weld::Button> m_xNewDoublePB;
+ std::unique_ptr<weld::Button> m_xDelDoublePB;
+ std::unique_ptr<weld::CheckButton> m_xAutoCapsCB;
+
+ DECL_LINK(NewDelButtonHdl, weld::Button&, void);
+ DECL_LINK(NewDelActionHdl, weld::Entry&, bool);
+ DECL_LINK(SelectHdl, weld::TreeView&, void);
+ DECL_LINK(ModifyHdl, weld::Entry&, void);
+ void NewDelHdl(const weld::Widget*);
+ /// Box filled with new language
+ void RefillReplaceBoxes(bool bFromReset,
+ LanguageType eOldLanguage,
+ LanguageType eNewLanguage);
+public:
+ OfaAutocorrExceptPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
+ virtual ~OfaAutocorrExceptPage() override;
+
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController,
+ const SfxItemSet* rAttrSet);
+
+ virtual bool FillItemSet( SfxItemSet* rSet ) override;
+ virtual void Reset( const SfxItemSet* rSet ) override;
+ virtual void ActivatePage( const SfxItemSet& ) override;
+ virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
+ void SetLanguage(LanguageType eSet);
+
+};
+
+// class OfaQuoteTabPage -------------------------------------------------
+
+class OfaQuoteTabPage : public SfxTabPage
+{
+private:
+ OUString sNonBrkSpace;
+ OUString sOrdinal;
+ OUString sTransliterateRTL;
+ OUString sAngleQuotes;
+
+ sal_UCS4 cSglStartQuote;
+ sal_UCS4 cSglEndQuote;
+
+ sal_UCS4 cStartQuote;
+ sal_UCS4 cEndQuote;
+
+ std::unique_ptr<weld::CheckButton> m_xSingleTypoCB;
+ std::unique_ptr<weld::Button> m_xSglStartQuotePB;
+ std::unique_ptr<weld::Label> m_xSglStartExFT;
+ std::unique_ptr<weld::Button> m_xSglEndQuotePB;
+ std::unique_ptr<weld::Label> m_xSglEndExFT;
+ std::unique_ptr<weld::Button> m_xSglStandardPB;
+ std::unique_ptr<weld::CheckButton> m_xDoubleTypoCB;
+ std::unique_ptr<weld::Button> m_xDblStartQuotePB;
+ std::unique_ptr<weld::Label> m_xDblStartExFT;
+ std::unique_ptr<weld::Button> m_xDblEndQuotePB;
+ std::unique_ptr<weld::Label> m_xDblEndExFT;
+ std::unique_ptr<weld::Button> m_xDblStandardPB;
+ OUString m_sStandard;
+ /// For anything but writer
+ std::unique_ptr<weld::TreeView> m_xCheckLB;
+ /// Just for writer
+ std::unique_ptr<weld::TreeView> m_xSwCheckLB;
+
+
+ DECL_LINK(QuoteHdl, weld::Button&, void);
+ DECL_LINK(StdQuoteHdl, weld::Button&, void);
+
+ OUString ChangeStringExt_Impl( sal_UCS4 );
+
+ static void CreateEntry(weld::TreeView& rLstBox, const OUString& rTxt,
+ sal_uInt16 nCol, sal_uInt16 nTextCol);
+
+public:
+ OfaQuoteTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
+ static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController,
+ const SfxItemSet* rAttrSet);
+ virtual ~OfaQuoteTabPage() override;
+
+ virtual bool FillItemSet( SfxItemSet* rSet ) override;
+ virtual void Reset( const SfxItemSet* rSet ) override;
+ virtual void ActivatePage( const SfxItemSet& ) override;
+};
+
+// class OfaAutoCompleteTabPage ---------------------------------------------
+
+class OfaAutoCompleteTabPage : public SfxTabPage
+{
+private:
+ editeng::SortedAutoCompleteStrings* m_pAutoCompleteList;
+ sal_uInt16 m_nAutoCmpltListCnt;
+
+ std::unique_ptr<weld::CheckButton> m_xCBActiv; ///<Enable word completion
+ std::unique_ptr<weld::CheckButton> m_xCBAppendSpace;///<Append space
+ std::unique_ptr<weld::CheckButton> m_xCBAsTip; ///<Show as tip
+
+ std::unique_ptr<weld::CheckButton> m_xCBCollect;///<Collect words
+ std::unique_ptr<weld::CheckButton> m_xCBRemoveList;///<...save the list for later use...
+
+ std::unique_ptr<weld::ComboBox> m_xDCBExpandKey;
+ std::unique_ptr<weld::SpinButton> m_xNFMinWordlen;
+ std::unique_ptr<weld::SpinButton> m_xNFMaxEntries;
+ std::unique_ptr<weld::TreeView> m_xLBEntries;
+ std::unique_ptr<weld::Button> m_xPBEntries;
+
+ DECL_LINK(CheckHdl, weld::ToggleButton&, void);
+ DECL_LINK(KeyReleaseHdl, const KeyEvent&, bool);
+
+public:
+ OfaAutoCompleteTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
+ static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController,
+ const SfxItemSet* rAttrSet);
+ virtual ~OfaAutoCompleteTabPage() override;
+
+ virtual bool FillItemSet( SfxItemSet* rSet ) override;
+ virtual void Reset( const SfxItemSet* rSet ) override;
+ virtual void ActivatePage( const SfxItemSet& ) override;
+
+ void CopyToClipboard() const;
+ DECL_LINK(DeleteHdl, weld::Button&, void);
+};
+
+// class OfaSmartTagOptionsTabPage ---------------------------------------------
+
+/** Smart tag options tab page
+
+ This tab page is used to enable/disable smart tag types
+*/
+class OfaSmartTagOptionsTabPage : public SfxTabPage
+{
+private:
+
+ // controls
+ std::unique_ptr<weld::CheckButton> m_xMainCB;
+ std::unique_ptr<weld::TreeView> m_xSmartTagTypesLB;
+ std::unique_ptr<weld::Button> m_xPropertiesPB;
+
+ /** Inserts items into m_aSmartTagTypesLB
+
+ Reads out the smart tag types supported by the SmartTagMgr and
+ inserts the associated strings into the list box.
+ */
+ void FillListBox( const SmartTagMgr& rSmartTagMgr );
+
+ /** Clears the m_aSmartTagTypesLB
+ */
+ void ClearListBox();
+
+ /** Handler for the check box
+
+ Enables/disables all controls in the tab page (except from the
+ check box.
+ */
+ DECL_LINK(CheckHdl, weld::ToggleButton&, void);
+
+ /** Handler for the push button
+
+ Calls the displayPropertyPage function of the smart tag recognizer
+ associated with the currently selected smart tag type.
+ */
+ DECL_LINK(ClickHdl, weld::Button&, void);
+
+ /** Handler for the list box
+
+ Enables/disables the properties push button if selection in the
+ smart tag types list box changes.
+ */
+ DECL_LINK(SelectHdl, weld::TreeView&, void);
+
+public:
+ /// construction via Create()
+ OfaSmartTagOptionsTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
+ virtual ~OfaSmartTagOptionsTabPage() override;
+
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet);
+
+ virtual bool FillItemSet( SfxItemSet* rSet ) override;
+ virtual void Reset( const SfxItemSet* rSet ) override;
+ virtual void ActivatePage( const SfxItemSet& ) override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/backgrnd.hxx b/cui/source/inc/backgrnd.hxx
new file mode 100644
index 000000000..14d30703e
--- /dev/null
+++ b/cui/source/inc/backgrnd.hxx
@@ -0,0 +1,70 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_BACKGRND_HXX
+#define INCLUDED_CUI_SOURCE_INC_BACKGRND_HXX
+
+#include <memory>
+
+#include "cuitabarea.hxx"
+
+class BackgroundPreviewImpl;
+class SvxOpenGraphicDialog;
+class SvxBrushItem;
+
+/** class SvxBackgroundTabPage --------------------------------------------
+
+ [Description]
+ With this TabPage a Brush (e. g. for a frame's background color)
+ can be set.
+ [Items]
+ <SvxBrushItem>: <SID_ATTR_BRUSH>;
+*/
+
+class SvxBkgTabPage : public SvxAreaTabPage
+{
+ static const sal_uInt16 pPageRanges[];
+
+ std::unique_ptr<weld::ComboBox> m_xTblLBox;
+ bool bHighlighting : 1;
+ bool bCharBackColor : 1;
+ SfxItemSet maSet;
+ std::unique_ptr<SfxItemSet> m_pResetSet;
+
+ sal_Int32 m_nActPos = -1;
+
+ DECL_LINK(TblDestinationHdl_Impl, weld::ComboBox&, void);
+public:
+ SvxBkgTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
+ virtual ~SvxBkgTabPage() override;
+
+ // returns the area of the which-values
+ static const sal_uInt16* GetRanges() { return pPageRanges; }
+
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
+ virtual bool FillItemSet( SfxItemSet* ) override;
+ virtual void ActivatePage( const SfxItemSet& ) override;
+ virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
+ virtual void PageCreated( const SfxAllItemSet& aSet ) override;
+ virtual void Reset( const SfxItemSet * ) override;
+};
+
+#endif // INCLUDED_CUI_SOURCE_INC_BACKGRND_HXX
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/bbdlg.hxx b/cui/source/inc/bbdlg.hxx
new file mode 100644
index 000000000..b25b7cc09
--- /dev/null
+++ b/cui/source/inc/bbdlg.hxx
@@ -0,0 +1,44 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_BBDLG_HXX
+#define INCLUDED_CUI_SOURCE_INC_BBDLG_HXX
+
+#include <sfx2/tabdlg.hxx>
+
+/*--------------------------------------------------------------------
+ Description: bunch the border background pages
+ --------------------------------------------------------------------*/
+
+class SvxBorderBackgroundDlg: public SfxTabDialogController
+{
+public:
+ SvxBorderBackgroundDlg(weld::Window *pParent,
+ const SfxItemSet& rCoreSet,
+ bool bEnableSelector,
+ bool bEnableDrawingLayerFillStyles);
+protected:
+ virtual void PageCreated(const OString& rPageId, SfxTabPage& rTabPage) override;
+
+private:
+ bool mbEnableBackgroundSelector : 1; ///< for Border/Background
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/border.hxx b/cui/source/inc/border.hxx
new file mode 100644
index 000000000..7af464924
--- /dev/null
+++ b/cui/source/inc/border.hxx
@@ -0,0 +1,194 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_BORDER_HXX
+#define INCLUDED_CUI_SOURCE_INC_BORDER_HXX
+
+#include <editeng/shaditem.hxx>
+#include <svtools/ctrlbox.hxx>
+#include <vcl/weld.hxx>
+#include <svtools/valueset.hxx>
+#include <sfx2/tabdlg.hxx>
+#include <svx/algitem.hxx>
+#include <svx/colorbox.hxx>
+#include <svx/frmsel.hxx>
+#include <svx/flagsdef.hxx>
+
+#include <set>
+
+// forward ---------------------------------------------------------------
+
+namespace editeng
+{
+ class SvxBorderLine;
+}
+
+class ShadowControlsWrapper
+{
+public:
+ explicit ShadowControlsWrapper(ValueSet& rVsPos, weld::MetricSpinButton& rMfSize, ColorListBox& rLbColor);
+
+ SvxShadowItem GetControlValue(const SvxShadowItem& rItem) const;
+ void SetControlValue(const SvxShadowItem& rItem);
+ void SetControlDontKnow();
+
+ bool get_value_changed_from_saved() const;
+
+private:
+ ValueSet& mrVsPos;
+ weld::MetricSpinButton& mrMfSize;
+ ColorListBox& mrLbColor;
+};
+
+class MarginControlsWrapper
+{
+public:
+ explicit MarginControlsWrapper(weld::MetricSpinButton& rMfLeft, weld::MetricSpinButton& rMfRight,
+ weld::MetricSpinButton& rMfTop, weld::MetricSpinButton& rMfBottom);
+
+ SvxMarginItem GetControlValue(const SvxMarginItem& rItem) const;
+ void SetControlValue(const SvxMarginItem& rItem);
+ void SetControlDontKnow();
+
+ bool get_value_changed_from_saved() const;
+
+private:
+ weld::MetricSpinButton& mrLeftWrp;
+ weld::MetricSpinButton& mrRightWrp;
+ weld::MetricSpinButton& mrTopWrp;
+ weld::MetricSpinButton& mrBottomWrp;
+};
+
+class SvxBorderTabPage : public SfxTabPage
+{
+ static const sal_uInt16 pRanges[];
+
+public:
+ SvxBorderTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs);
+ virtual ~SvxBorderTabPage() override;
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController,
+ const SfxItemSet* rAttrSet);
+ static const sal_uInt16* GetRanges() { return pRanges; }
+
+ virtual bool FillItemSet( SfxItemSet* rCoreAttrs ) override;
+ virtual void Reset( const SfxItemSet* ) override;
+ virtual void ChangesApplied() override;
+
+ void HideShadowControls();
+ virtual void PageCreated(const SfxAllItemSet& aSet) override;
+ void SetTableMode();
+protected:
+ virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
+
+private:
+ std::vector<Image> m_aShadowImgVec;
+ std::vector<Image> m_aBorderImgVec;
+
+ long nMinValue; ///< minimum distance
+ SwBorderModes nSWMode; ///< table, textframe, paragraph
+ sal_uInt16 mnBoxSlot;
+ sal_uInt16 mnShadowSlot;
+
+ bool mbHorEnabled; ///< true = Inner horizontal border enabled.
+ bool mbVerEnabled; ///< true = Inner vertical border enabled.
+ bool mbTLBREnabled; ///< true = Top-left to bottom-right border enabled.
+ bool mbBLTREnabled; ///< true = Bottom-left to top-right border enabled.
+ bool mbUseMarginItem;
+ bool mbLeftModified;
+ bool mbRightModified;
+ bool mbTopModified;
+ bool mbBottomModified;
+ bool mbSync;
+ bool mbRemoveAdjacentCellBorders;
+ bool bIsCalcDoc;
+
+ std::set<SvxBorderLineStyle> maUsedBorderStyles;
+
+ // Controls
+ svx::FrameSelector m_aFrameSel;
+ std::unique_ptr<ValueSet> m_xWndPresets;
+ std::unique_ptr<weld::CustomWeld> m_xWndPresetsWin;
+ std::unique_ptr<weld::Label> m_xUserDefFT;
+ std::unique_ptr<weld::CustomWeld> m_xFrameSelWin;
+
+ std::unique_ptr<SvtLineListBox> m_xLbLineStyle;
+ std::unique_ptr<ColorListBox> m_xLbLineColor;
+ std::unique_ptr<weld::MetricSpinButton> m_xLineWidthMF;
+
+ std::unique_ptr<weld::Container> m_xSpacingFrame;
+ std::unique_ptr<weld::Label> m_xLeftFT;
+ std::unique_ptr<weld::MetricSpinButton> m_xLeftMF;
+ std::unique_ptr<weld::Label> m_xRightFT;
+ std::unique_ptr<weld::MetricSpinButton> m_xRightMF;
+ std::unique_ptr<weld::Label> m_xTopFT;
+ std::unique_ptr<weld::MetricSpinButton> m_xTopMF;
+ std::unique_ptr<weld::Label> m_xBottomFT;
+ std::unique_ptr<weld::MetricSpinButton> m_xBottomMF;
+ std::unique_ptr<weld::CheckButton> m_xSynchronizeCB;
+
+ std::unique_ptr<weld::Container> m_xShadowFrame;
+ std::unique_ptr<ValueSet> m_xWndShadows;
+ std::unique_ptr<weld::CustomWeld> m_xWndShadowsWin;
+ std::unique_ptr<weld::Label> m_xFtShadowSize;
+ std::unique_ptr<weld::MetricSpinButton> m_xEdShadowSize;
+ std::unique_ptr<weld::Label> m_xFtShadowColor;
+ std::unique_ptr<ColorListBox> m_xLbShadowColor;
+
+ std::unique_ptr<weld::Container> m_xPropertiesFrame;///< properties - "Merge with next paragraph" in Writer
+ std::unique_ptr<weld::CheckButton> m_xMergeWithNextCB;
+ // #i29550#
+ std::unique_ptr<weld::CheckButton> m_xMergeAdjacentBordersCB;
+ std::unique_ptr<weld::CheckButton> m_xRemoveAdjcentCellBordersCB;
+ std::unique_ptr<weld::Label> m_xRemoveAdjcentCellBordersFT;
+ std::unique_ptr<ShadowControlsWrapper> m_xShadowControls;
+ std::unique_ptr<MarginControlsWrapper> m_xMarginControls;
+
+ // Handler
+ DECL_LINK(SelStyleHdl_Impl, SvtLineListBox&, void);
+ DECL_LINK(SelColHdl_Impl, ColorListBox&, void);
+ DECL_LINK(SelPreHdl_Impl, ValueSet*, void);
+ DECL_LINK(SelSdwHdl_Impl, ValueSet*, void);
+ DECL_LINK(LinesChanged_Impl, LinkParamNone*, void);
+ DECL_LINK(ModifyDistanceHdl_Impl, weld::MetricSpinButton&, void);
+ DECL_LINK(ModifyWidthHdl_Impl, weld::MetricSpinButton&, void);
+ DECL_LINK(SyncHdl_Impl, weld::ToggleButton&, void);
+ DECL_LINK(RemoveAdjacentCellBorderHdl_Impl, weld::ToggleButton&, void);
+
+ sal_uInt16 GetPresetImageId(sal_uInt16 nValueSetIdx) const;
+ const char* GetPresetStringId(sal_uInt16 nValueSetIdx) const;
+
+ void FillPresetVS();
+ void FillShadowVS();
+ void FillValueSets();
+
+ // Filler
+ void FillLineListBox_Impl();
+
+ /// share for individual Frame-/Core-Line
+ void ResetFrameLine_Impl( svx::FrameBorderType eBorder,
+ const editeng::SvxBorderLine* pCurLine,
+ bool bValid );
+
+ bool IsBorderLineStyleAllowed( SvxBorderLineStyle nStyle ) const;
+ void UpdateRemoveAdjCellBorderCB( sal_uInt16 nPreset );
+};
+
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx
new file mode 100644
index 000000000..f413495a1
--- /dev/null
+++ b/cui/source/inc/cfg.hxx
@@ -0,0 +1,673 @@
+/* -*- 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 <vcl/transfer.hxx>
+#include <vcl/timer.hxx>
+#include <vcl/weld.hxx>
+#include <svtools/valueset.hxx>
+
+#include <com/sun/star/container/XIndexContainer.hpp>
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/ui/XUIConfigurationManager.hpp>
+#include <com/sun/star/ui/XImageManager.hpp>
+#include <com/sun/star/graphic/XGraphicProvider.hpp>
+#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/lang/XSingleComponentFactory.hpp>
+
+#include <sfx2/tabdlg.hxx>
+#include <memory>
+#include <vector>
+
+#include "cfgutil.hxx"
+#include "CommandCategoryListBox.hxx"
+
+#define notebookbarTabScope "notebookbarTabScope"
+
+static const char ITEM_DESCRIPTOR_COMMANDURL[] = "CommandURL";
+static const char ITEM_DESCRIPTOR_CONTAINER[] = "ItemDescriptorContainer";
+static const char ITEM_DESCRIPTOR_LABEL[] = "Label";
+static const char ITEM_DESCRIPTOR_TYPE[] = "Type";
+static const char ITEM_DESCRIPTOR_STYLE[] = "Style";
+static const char ITEM_DESCRIPTOR_ISVISIBLE[] = "IsVisible";
+static const char ITEM_DESCRIPTOR_RESOURCEURL[] = "ResourceURL";
+static const char ITEM_DESCRIPTOR_UINAME[] = "UIName";
+
+static const char ITEM_MENUBAR_URL[] = "private:resource/menubar/menubar";
+static const char ITEM_TOOLBAR_URL[] = "private:resource/toolbar/";
+
+static const char CUSTOM_TOOLBAR_STR[] = "custom_toolbar_";
+
+static const char aMenuSeparatorStr[] = " | ";
+
+class SvxConfigEntry;
+class SvxConfigPage;
+
+typedef std::vector< SvxConfigEntry* > SvxEntries;
+
+class SvxConfigDialog : public SfxTabDialogController
+{
+private:
+ css::uno::Reference< css::frame::XFrame > m_xFrame;
+
+public:
+ SvxConfigDialog(weld::Window*, const SfxItemSet*);
+
+ virtual void PageCreated(const OString& rId, SfxTabPage &rPage) override;
+ void SetFrame(const css::uno::Reference< css::frame::XFrame >& xFrame);
+};
+
+class SaveInData
+{
+private:
+
+ bool bModified;
+
+ bool bDocConfig;
+ bool bReadOnly;
+
+ css::uno::Reference
+ < css::ui::XUIConfigurationManager > m_xCfgMgr;
+
+ css::uno::Reference
+ < css::ui::XUIConfigurationManager > m_xParentCfgMgr;
+
+ css::uno::Reference
+ < css::ui::XImageManager > m_xImgMgr;
+
+ css::uno::Reference
+ < css::ui::XImageManager > m_xParentImgMgr;
+
+ static css::uno::Reference
+ < css::ui::XImageManager >* xDefaultImgMgr;
+
+protected:
+
+ void ApplyMenu(
+ css::uno::Reference< css::container::XIndexContainer > const & rMenuBar,
+ css::uno::Reference< css::lang::XSingleComponentFactory >& rFactory,
+ SvxConfigEntry *pMenuData );
+
+ void LoadSubMenus(
+ const css::uno::Reference< css::container::XIndexAccess >& xMenuSettings,
+ const OUString& rBaseTitle, SvxConfigEntry const * pParentData, bool bContextMenu );
+
+public:
+
+ SaveInData(
+ const css::uno::Reference < css::ui::XUIConfigurationManager >& xCfgMgr,
+ const css::uno::Reference < css::ui::XUIConfigurationManager >& xParentCfgMgr,
+ const OUString& aModuleId,
+ bool docConfig );
+
+ virtual ~SaveInData() {}
+
+ bool PersistChanges(
+ const css::uno::Reference< css::uno::XInterface >& xManager );
+
+ void SetModified( bool bValue = true ) { bModified = bValue; }
+ bool IsModified( ) const { return bModified; }
+
+ bool IsReadOnly( ) const { return bReadOnly; }
+ bool IsDocConfig( ) const { return bDocConfig; }
+
+ const css::uno::Reference
+ < css::ui::XUIConfigurationManager >&
+ GetConfigManager() const { return m_xCfgMgr; };
+
+ const css::uno::Reference
+ < css::ui::XUIConfigurationManager >&
+ GetParentConfigManager() const { return m_xParentCfgMgr; };
+
+ const css::uno::Reference
+ < css::ui::XImageManager >&
+ GetImageManager() const { return m_xImgMgr; };
+
+ const css::uno::Reference
+ < css::ui::XImageManager >&
+ GetParentImageManager() const { return m_xParentImgMgr; };
+
+ css::uno::Reference
+ < css::container::XNameAccess > m_xCommandToLabelMap;
+
+ css::uno::Sequence
+ < css::beans::PropertyValue > m_aSeparatorSeq;
+
+ css::uno::Reference<css::graphic::XGraphic> GetImage(const OUString& rCommandURL);
+
+ virtual bool HasURL( const OUString& aURL ) = 0;
+ virtual bool HasSettings() = 0;
+ virtual SvxEntries* GetEntries() = 0;
+ virtual void SetEntries( std::unique_ptr<SvxEntries> ) = 0;
+ virtual void Reset() = 0;
+ virtual bool Apply() = 0;
+};
+
+class MenuSaveInData : public SaveInData
+{
+private:
+
+ OUString m_aMenuResourceURL;
+ OUString m_aDescriptorContainer;
+
+ css::uno::Reference
+ < css::container::XIndexAccess > m_xMenuSettings;
+
+ std::unique_ptr<SvxConfigEntry> pRootEntry;
+
+
+ static MenuSaveInData* pDefaultData; ///< static holder of the default menu data
+
+ static void SetDefaultData( MenuSaveInData* pData ) {pDefaultData = pData;}
+ static MenuSaveInData* GetDefaultData() { return pDefaultData; }
+
+ void Apply(
+ css::uno::Reference< css::container::XIndexContainer > const & rNewMenuBar,
+ css::uno::Reference< css::lang::XSingleComponentFactory >& rFactory );
+
+public:
+
+ MenuSaveInData(
+ const css::uno::Reference< css::ui::XUIConfigurationManager >&,
+ const css::uno::Reference< css::ui::XUIConfigurationManager >&,
+ const OUString& aModuleId,
+ bool docConfig );
+
+ virtual ~MenuSaveInData() override;
+
+ /// methods inherited from SaveInData
+ SvxEntries* GetEntries() override;
+ void SetEntries( std::unique_ptr<SvxEntries> ) override;
+ bool HasURL( const OUString& ) override { return false; }
+ bool HasSettings() override { return m_xMenuSettings.is(); }
+ void Reset() override;
+ bool Apply() override;
+};
+
+class ContextMenuSaveInData : public SaveInData
+{
+private:
+ std::unique_ptr< SvxConfigEntry > m_pRootEntry;
+ css::uno::Reference< css::container::XNameAccess > m_xPersistentWindowState;
+ OUString GetUIName( const OUString& rResourceURL );
+
+public:
+ ContextMenuSaveInData(
+ const css::uno::Reference< css::ui::XUIConfigurationManager >& xCfgMgr,
+ const css::uno::Reference< css::ui::XUIConfigurationManager >& xParentCfgMgr,
+ const OUString& aModuleId, bool bIsDocConfig );
+ virtual ~ContextMenuSaveInData() override;
+
+ SvxEntries* GetEntries() override;
+ void SetEntries( std::unique_ptr<SvxEntries> pNewEntries ) override;
+ bool HasSettings() override;
+ bool HasURL( const OUString& rURL ) override;
+ void Reset() override;
+ bool Apply() override;
+
+ void ResetContextMenu( const SvxConfigEntry* pEntry );
+};
+
+class SvxConfigEntry
+{
+private:
+
+ /// common properties
+ sal_uInt16 nId;
+ OUString aLabel;
+ OUString aCommand;
+
+ bool bPopUp;
+ bool bStrEdited;
+ bool bIsUserDefined;
+ bool bIsMain;
+ bool bIsParentData;
+ bool bIsModified;
+
+ /// toolbar specific properties
+ bool bIsVisible;
+ sal_Int32 nStyle;
+
+ css::uno::Reference<
+ css::graphic::XGraphic > xBackupGraphic;
+
+ std::unique_ptr<SvxEntries> mpEntries;
+
+public:
+
+ SvxConfigEntry( const OUString& rDisplayName,
+ const OUString& rCommandURL,
+ bool bPopup,
+ bool bParentData );
+
+ SvxConfigEntry()
+ :
+ nId( 0 ),
+ bPopUp( false ),
+ bStrEdited( false ),
+ bIsUserDefined( false ),
+ bIsMain( false ),
+ bIsParentData( false ),
+ bIsModified( false ),
+ bIsVisible( true ),
+ nStyle( 0 )
+ {}
+
+ ~SvxConfigEntry();
+
+ const OUString& GetCommand() const { return aCommand; }
+
+ const OUString& GetName() const { return aLabel; }
+ void SetName( const OUString& rStr ) { aLabel = rStr; bStrEdited = true; }
+ bool HasChangedName() const { return bStrEdited; }
+
+ bool IsPopup() const { return bPopUp; }
+
+ void SetUserDefined( bool bOn = true ) { bIsUserDefined = bOn; }
+ bool IsUserDefined() const { return bIsUserDefined; }
+
+ bool IsBinding() const { return !bPopUp; }
+ bool IsSeparator() const { return nId == 0; }
+
+ SvxEntries* GetEntries() const { return mpEntries.get(); }
+ void SetEntries( std::unique_ptr<SvxEntries> entries ) { mpEntries = std::move(entries); }
+
+ void SetMain() { bIsMain = true; }
+ bool IsMain() const { return bIsMain; }
+
+ void SetParentData( bool bValue = true ) { bIsParentData = bValue; }
+ bool IsParentData() const { return bIsParentData; }
+
+ void SetModified( bool bValue = true ) { bIsModified = bValue; }
+ bool IsModified() const { return bIsModified; }
+
+ bool IsMovable() const;
+ bool IsDeletable() const;
+ bool IsRenamable() const;
+
+ void SetVisible( bool b ) { bIsVisible = b; }
+ bool IsVisible() const { return bIsVisible; }
+
+ void SetBackupGraphic( css::uno::Reference< css::graphic::XGraphic > const & graphic )
+ { xBackupGraphic = graphic; }
+
+ const css::uno::Reference< css::graphic::XGraphic >& GetBackupGraphic() const
+ { return xBackupGraphic; }
+
+ sal_Int32 GetStyle() const { return nStyle; }
+ void SetStyle( sal_Int32 style ) { nStyle = style; }
+};
+
+class SvxMenuEntriesListBox
+{
+protected:
+ std::unique_ptr<weld::TreeView> m_xControl;
+ ScopedVclPtr<VirtualDevice> m_xDropDown;
+ SvxConfigPage* m_pPage;
+
+public:
+ SvxMenuEntriesListBox(std::unique_ptr<weld::TreeView> xControl, SvxConfigPage* pPage);
+ virtual ~SvxMenuEntriesListBox();
+
+ VirtualDevice& get_dropdown_image() const { return *m_xDropDown; }
+
+ int get_selected_index() const { return m_xControl->get_selected_index(); }
+ OUString get_id(int nPos) const { return m_xControl->get_id(nPos); }
+ void remove(int nPos) { m_xControl->remove(nPos); }
+ int n_children() const { return m_xControl->n_children(); }
+ void set_text(int row, const OUString& rText, int col) { m_xControl->set_text(row, rText, col); }
+ OUString get_text(int row) { return m_xControl->get_text(row); }
+ void set_image(int row, const css::uno::Reference<css::graphic::XGraphic>& rImage, int col) { m_xControl->set_image(row, rImage, col); }
+ void set_dropdown(int row, int col) { m_xControl->set_image(row, *m_xDropDown, col); }
+ void set_id(int row, const OUString& rId) { m_xControl->set_id(row, rId); }
+ void clear() { m_xControl->clear(); } //need frees ?
+ void set_toggle(int row, TriState eState, int col) { m_xControl->set_toggle(row, eState, col); }
+ void scroll_to_row(int pos) { m_xControl->scroll_to_row(pos); }
+ void select(int pos) { m_xControl->select(pos); }
+
+ weld::TreeView& get_widget() { return *m_xControl; }
+
+ void insert(int pos, const OUString& rId)
+ {
+ m_xControl->insert(nullptr, pos, nullptr, &rId,
+ nullptr, nullptr, nullptr, false, nullptr);
+ }
+
+ DECL_LINK(KeyInputHdl, const KeyEvent&, bool);
+
+ void CreateDropDown();
+};
+
+class SvxConfigPageFunctionDropTarget : public DropTargetHelper
+{
+private:
+ SvxConfigPage& m_rPage;
+ weld::TreeView& m_rTreeView;
+
+ virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt ) override;
+ virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt ) override;
+
+public:
+ SvxConfigPageFunctionDropTarget(SvxConfigPage&rPage, weld::TreeView& rTreeView);
+};
+
+class SvxConfigPage : public SfxTabPage
+{
+private:
+
+ Timer m_aUpdateDataTimer;
+ bool bInitialised;
+ SaveInData* pCurrentSaveInData;
+
+ DECL_LINK(SearchUpdateHdl, weld::Entry&, void);
+
+protected:
+
+ /// the ResourceURL to select when opening the dialog
+ OUString m_aURLToSelect;
+
+ css::uno::Reference< css::frame::XFrame > m_xFrame;
+ OUString m_aModuleId;
+
+ // Left side of the dialog where command categories and the available
+ // commands in them are displayed as a searchable list
+ std::unique_ptr<CommandCategoryListBox> m_xCommandCategoryListBox;
+ std::unique_ptr<CuiConfigFunctionListBox> m_xFunctions;
+
+ std::unique_ptr<weld::Label> m_xCategoryLabel;
+ std::unique_ptr<weld::Label> m_xDescriptionFieldLb;
+ std::unique_ptr<weld::TextView> m_xDescriptionField;
+ std::unique_ptr<weld::Label> m_xLeftFunctionLabel;
+ std::unique_ptr<weld::Entry> m_xSearchEdit;
+ std::unique_ptr<weld::Label> m_xSearchLabel;
+
+
+ // Right side of the dialog where the contents of the selected
+ // menu or toolbar are displayed
+ std::unique_ptr<weld::Label> m_xCustomizeLabel;
+ std::unique_ptr<weld::ComboBox> m_xTopLevelListBox;
+ // Used to add and remove toolbars/menus
+ std::unique_ptr<weld::MenuButton> m_xGearBtn;
+ std::unique_ptr<SvxMenuEntriesListBox> m_xContentsListBox;
+ std::unique_ptr<SvxConfigPageFunctionDropTarget> m_xDropTargetHelper;
+
+ std::unique_ptr<weld::Button> m_xMoveUpButton;
+ std::unique_ptr<weld::Button> m_xMoveDownButton;
+
+ std::unique_ptr<weld::ComboBox> m_xSaveInListBox;
+
+ std::unique_ptr<weld::MenuButton> m_xInsertBtn;
+ std::unique_ptr<weld::MenuButton> m_xModifyBtn;
+ // Used to reset the selected toolbar/menu/context menu
+ std::unique_ptr<weld::Button> m_xResetBtn;
+
+ // Middle buttons
+ std::unique_ptr<weld::Button> m_xAddCommandButton;
+ std::unique_ptr<weld::Button> m_xRemoveCommandButton;
+
+ OUString m_sAppName;
+ OUString m_sFileName;
+
+ SvxConfigPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet&);
+
+ DECL_LINK(MoveHdl, weld::Button&, void);
+ DECL_LINK(SelectFunctionHdl, weld::TreeView&, void);
+ DECL_LINK(FunctionDoubleClickHdl, weld::TreeView&, bool);
+ DECL_LINK(SelectSaveInLocation, weld::ComboBox&, void);
+ DECL_LINK(SelectElementHdl, weld::ComboBox&, void);
+ DECL_LINK(ImplUpdateDataHdl, Timer*, void);
+ DECL_LINK(FocusOut_Impl, weld::Widget&, void);
+
+ virtual SaveInData* CreateSaveInData(
+ const css::uno::Reference< css::ui::XUIConfigurationManager >&,
+ const css::uno::Reference< css::ui::XUIConfigurationManager >&,
+ const OUString& aModuleId,
+ bool docConfig ) = 0;
+
+ virtual void Init() = 0;
+ virtual void UpdateButtonStates() = 0;
+ virtual short QueryReset() = 0;
+
+ virtual void SelectElement() = 0;
+
+ int AppendEntry(SvxConfigEntry* pNewEntryData,
+ int nTarget);
+
+ void AddSubMenusToUI( const OUString& rBaseTitle,
+ SvxConfigEntry const * pParentData );
+
+ void InsertEntryIntoUI(SvxConfigEntry* pNewEntryData,
+ weld::TreeView& rTreeView, int nPos,
+ int nStartCol);
+ void InsertEntryIntoUI(SvxConfigEntry* pNewEntryData,
+ weld::TreeView& rTreeView, weld::TreeIter& rIter,
+ int nStartCol);
+
+ void InsertEntryIntoNotebookbarTabUI(const OUString& sClassId, const OUString& sUIItemId,
+ const OUString& sUIItemCommand,
+ weld::TreeView& rTreeView, weld::TreeIter& rIter,
+ int nStartCol);
+
+ SvxEntries* FindParentForChild( SvxEntries* pParentEntries,
+ SvxConfigEntry* pChildData );
+
+ void ReloadTopLevelListBox( SvxConfigEntry const * pSelection = nullptr );
+
+public:
+
+ virtual ~SvxConfigPage() override;
+
+ static bool CanConfig( const OUString& rModuleId );
+
+ SaveInData* GetSaveInData() { return pCurrentSaveInData; }
+ const OUString& GetAppName() const { return m_sAppName; }
+ const OUString& GetFileName() const { return m_sFileName; }
+
+ int AddFunction(int nTarget,
+ bool bAllowDuplicates);
+
+ virtual void MoveEntry( bool bMoveUp );
+
+ bool MoveEntryData(int SourceEntry, int nTargetEntry);
+
+ bool FillItemSet( SfxItemSet* ) override;
+ void Reset( const SfxItemSet* ) override;
+
+ virtual void DeleteSelectedContent() = 0;
+ virtual void DeleteSelectedTopLevel() = 0;
+
+ virtual void ListModified() {}
+
+ SvxConfigEntry* GetTopLevelSelection()
+ {
+ return reinterpret_cast<SvxConfigEntry*>(m_xTopLevelListBox->get_active_id().toInt64());
+ }
+
+ /** identifies the module in the given frame. If the frame is <NULL/>, a default
+ frame will be determined beforehand.
+
+ If the given frame is <NULL/>, a default frame will be used: The method the active
+ frame of the desktop, then the current frame. If both are <NULL/>,
+ the SfxViewFrame::Current's XFrame is used. If this is <NULL/>, too, an empty string is returned.
+
+ If the given frame is not <NULL/>, or a default frame could be successfully determined, then
+ the ModuleManager is asked for the module ID of the component in the frame.
+ */
+ static OUString
+ GetFrameWithDefaultAndIdentify( css::uno::Reference< css::frame::XFrame >& _inout_rxFrame );
+
+ OUString GetScriptURL() const;
+ OUString GetSelectedDisplayName() const;
+};
+
+class SvxMainMenuOrganizerDialog : public weld::GenericDialogController
+{
+ std::unique_ptr<SvxEntries> mpEntries;
+ OUString m_sNewMenuEntryId;
+
+ std::unique_ptr<weld::Widget> m_xMenuBox;
+ std::unique_ptr<weld::Entry> m_xMenuNameEdit;
+ std::unique_ptr<weld::TreeView> m_xMenuListBox;
+ std::unique_ptr<weld::Button> m_xMoveUpButton;
+ std::unique_ptr<weld::Button> m_xMoveDownButton;
+
+ void UpdateButtonStates();
+
+ DECL_LINK(MoveHdl, weld::Button&, void);
+ DECL_LINK(ModifyHdl, weld::Entry&, void);
+ DECL_LINK(SelectHdl, weld::TreeView&, void);
+
+public:
+ SvxMainMenuOrganizerDialog(
+ weld::Window*, SvxEntries*,
+ SvxConfigEntry const *, bool bCreateMenu);
+ virtual ~SvxMainMenuOrganizerDialog() override;
+
+ std::unique_ptr<SvxEntries> ReleaseEntries() { return std::move(mpEntries);}
+ SvxConfigEntry* GetSelectedEntry();
+};
+
+class ToolbarSaveInData : public SaveInData
+{
+private:
+
+ std::unique_ptr<SvxConfigEntry> pRootEntry;
+ OUString m_aDescriptorContainer;
+
+ css::uno::Reference
+ < css::container::XNameAccess > m_xPersistentWindowState;
+
+ void LoadToolbar(
+ const css::uno::Reference< css::container::XIndexAccess >& xToolBarSettings,
+ SvxConfigEntry const * pParentData );
+
+ void ApplyToolbar(
+ css::uno::Reference< css::container::XIndexContainer > const & rNewToolbarBar,
+ css::uno::Reference< css::lang::XSingleComponentFactory >& rFactory,
+ SvxConfigEntry const *pToolbar );
+
+public:
+
+ ToolbarSaveInData(
+ const css::uno::Reference< css::ui::XUIConfigurationManager >&,
+ const css::uno::Reference< css::ui::XUIConfigurationManager >&,
+ const OUString& aModuleId,
+ bool docConfig );
+
+ virtual ~ToolbarSaveInData() override;
+
+ void CreateToolbar( SvxConfigEntry* pToolbar );
+ void RestoreToolbar( SvxConfigEntry* pToolbar );
+ void RemoveToolbar( SvxConfigEntry* pToolbar );
+ void ApplyToolbar( SvxConfigEntry* pToolbar );
+
+ OUString GetSystemUIName( const OUString& rResourceURL );
+
+ sal_Int32 GetSystemStyle( const OUString& rResourceURL );
+
+ void SetSystemStyle( const OUString& rResourceURL, sal_Int32 nStyle );
+
+ void SetSystemStyle(
+ const css::uno::Reference< css::frame::XFrame >& xFrame,
+ const OUString& rResourceURL, sal_Int32 nStyle );
+
+ SvxEntries* GetEntries() override;
+ void SetEntries( std::unique_ptr<SvxEntries> ) override;
+ bool HasSettings() override;
+ bool HasURL( const OUString& rURL ) override;
+ void Reset() override;
+ bool Apply() override;
+};
+
+class SvxNewToolbarDialog : public weld::GenericDialogController
+{
+private:
+ std::unique_ptr<weld::Entry> m_xEdtName;
+ std::unique_ptr<weld::Button> m_xBtnOK;
+public:
+ std::unique_ptr<weld::ComboBox> m_xSaveInListBox;
+
+ SvxNewToolbarDialog(weld::Window* pWindow, const OUString& rName);
+ virtual ~SvxNewToolbarDialog() override;
+
+ OUString GetName() const
+ {
+ return m_xEdtName->get_text();
+ }
+};
+
+class SvxIconSelectorDialog : public weld::GenericDialogController
+{
+private:
+ sal_Int32 m_nExpectedSize;
+
+ css::uno::Reference<
+ css::ui::XImageManager > m_xImageManager;
+
+ css::uno::Reference<
+ css::ui::XImageManager > m_xParentImageManager;
+
+ css::uno::Reference<
+ css::ui::XImageManager > m_xImportedImageManager;
+
+ css::uno::Reference<
+ css::graphic::XGraphicProvider > m_xGraphProvider;
+
+ std::vector<css::uno::Reference<css::graphic::XGraphic>> m_aGraphics;
+
+ std::unique_ptr<ValueSet> m_xTbSymbol;
+ std::unique_ptr<weld::CustomWeld> m_xTbSymbolWin;
+ std::unique_ptr<weld::Label> m_xFtNote;
+ std::unique_ptr<weld::Button> m_xBtnImport;
+ std::unique_ptr<weld::Button> m_xBtnDelete;
+
+ bool ReplaceGraphicItem( const OUString& aURL );
+
+ bool ImportGraphic( const OUString& aURL );
+
+ void ImportGraphics( const css::uno::Sequence< OUString >& aURLs );
+
+public:
+
+ SvxIconSelectorDialog(
+ weld::Window *pWindow,
+ const css::uno::Reference< css::ui::XImageManager >& rXImageManager,
+ const css::uno::Reference< css::ui::XImageManager >& rXParentImageManager);
+
+ virtual ~SvxIconSelectorDialog() override;
+
+ css::uno::Reference< css::graphic::XGraphic >
+ GetSelectedIcon();
+
+ DECL_LINK(SelectHdl, ValueSet*, void);
+ DECL_LINK(ImportHdl, weld::Button&, void);
+ DECL_LINK(DeleteHdl, weld::Button&, void);
+};
+
+//added for issue83555
+class SvxIconChangeDialog : public weld::MessageDialogController
+{
+private:
+ std::unique_ptr<weld::TextView> m_xLineEditDescription;
+public:
+ SvxIconChangeDialog(weld::Window *pWindow, const OUString& rMessage);
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/cfgutil.hxx b/cui/source/inc/cfgutil.hxx
new file mode 100644
index 000000000..944ab68e8
--- /dev/null
+++ b/cui/source/inc/cfgutil.hxx
@@ -0,0 +1,269 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_CFGUTIL_HXX
+#define INCLUDED_CUI_SOURCE_INC_CFGUTIL_HXX
+
+#include <vector>
+#include <memory>
+#include <rtl/ustring.hxx>
+
+#include <com/sun/star/frame/DispatchInformation.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/script/browse/XBrowseNode.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <vcl/weld.hxx>
+
+class Button;
+class SaveInData;
+class SfxMacroInfoItem;
+
+struct SfxStyleInfo_Impl
+{
+ OUString sFamily;
+ OUString sStyle;
+ OUString sCommand;
+ OUString sLabel;
+
+ SfxStyleInfo_Impl()
+ {}
+
+ SfxStyleInfo_Impl(const SfxStyleInfo_Impl& rCopy)
+ {
+ sFamily = rCopy.sFamily;
+ sStyle = rCopy.sStyle;
+ sCommand = rCopy.sCommand;
+ sLabel = rCopy.sLabel;
+ }
+};
+
+struct SfxStylesInfo_Impl
+{
+private:
+ OUString m_aModuleName;
+ css::uno::Reference< css::frame::XModel > m_xDoc;
+
+public:
+
+ SfxStylesInfo_Impl();
+ void init(const OUString& rModuleName, const css::uno::Reference< css::frame::XModel >& xModel);
+
+ static bool parseStyleCommand(SfxStyleInfo_Impl& aStyle);
+ void getLabel4Style(SfxStyleInfo_Impl& aStyle);
+
+ std::vector< SfxStyleInfo_Impl > getStyleFamilies() const;
+ std::vector< SfxStyleInfo_Impl > getStyles(const OUString& sFamily);
+
+ static OUString generateCommand(const OUString& sFamily, const OUString& sStyle);
+};
+
+enum class SfxCfgKind
+{
+ GROUP_FUNCTION = 1,
+ FUNCTION_SLOT = 2,
+ GROUP_SCRIPTCONTAINER = 3,
+ FUNCTION_SCRIPT = 4,
+ GROUP_STYLES = 5,
+ GROUP_ALLFUNCTIONS = 6
+};
+
+struct SfxGroupInfo_Impl
+{
+ SfxCfgKind nKind;
+ sal_uInt16 nUniqueID;
+ void* pObject;
+ OUString sCommand;
+ OUString sLabel;
+ OUString sHelpText;
+ OUString sTooltip;
+
+ SfxGroupInfo_Impl( SfxCfgKind n, sal_uInt16 nr, void* pObj = nullptr ) :
+ nKind( n ), nUniqueID( nr ), pObject( pObj ) {}
+};
+
+typedef std::vector<std::unique_ptr<SfxGroupInfo_Impl> > SfxGroupInfoArr_Impl;
+
+class CuiConfigFunctionListBox
+{
+ friend class CuiConfigGroupListBox;
+ SfxGroupInfoArr_Impl aArr;
+
+ std::unique_ptr<weld::TreeView> m_xTreeView;
+ std::unique_ptr<weld::TreeIter> m_xScratchIter;
+
+public:
+ CuiConfigFunctionListBox(std::unique_ptr<weld::TreeView> xTreeView);
+ void set_sensitive(bool bSensitive) { m_xTreeView->set_sensitive(bSensitive); }
+ void connect_changed(const Link<weld::TreeView&, void>& rLink) { m_xTreeView->connect_changed(rLink); }
+ void connect_row_activated(const Link<weld::TreeView&, bool>& rLink) { m_xTreeView->connect_row_activated(rLink); }
+ void freeze() { m_xTreeView->freeze(); }
+ void thaw() { m_xTreeView->thaw(); }
+ void append(const OUString& rId, const OUString& rStr, const weld::TreeIter* pParent = nullptr)
+ {
+ m_xTreeView->insert(pParent, -1, &rStr, &rId, nullptr, nullptr, nullptr, false, nullptr);
+ }
+ std::unique_ptr<weld::TreeIter> tree_append(const OUString& rId, const OUString& rStr, const weld::TreeIter* pParent = nullptr)
+ {
+ std::unique_ptr<weld::TreeIter> xIter(m_xTreeView->make_iterator());
+ m_xTreeView->insert(pParent, -1, &rStr, &rId, nullptr, nullptr, nullptr, false, xIter.get());
+ return xIter;
+ }
+ void append(const OUString& rId, const OUString& rStr, const OUString& rImage, const weld::TreeIter* pParent = nullptr)
+ {
+ m_xTreeView->insert(pParent, -1, &rStr, &rId, nullptr, nullptr, &rImage, false, nullptr);
+ }
+ void append(const OUString& rId, const OUString& rStr, const css::uno::Reference<css::graphic::XGraphic>& rImage, const weld::TreeIter* pParent = nullptr)
+ {
+ m_xTreeView->insert(pParent, -1, &rStr, &rId, nullptr, nullptr, nullptr, false, m_xScratchIter.get());
+ m_xTreeView->set_image(*m_xScratchIter, rImage, -1);
+ }
+ void remove(int nPos) { m_xTreeView->remove(nPos); }
+ void scroll_to_row(int pos) { m_xTreeView->scroll_to_row(pos); }
+ void remove(const weld::TreeIter& rIter) { m_xTreeView->remove(rIter); }
+ void expand_row(const weld::TreeIter& rIter) { m_xTreeView->expand_row(rIter); }
+ int n_children() const { return m_xTreeView->n_children(); }
+ std::unique_ptr<weld::TreeIter> make_iterator(const weld::TreeIter* pOrig = nullptr) const { return m_xTreeView->make_iterator(pOrig); }
+ bool get_iter_first(weld::TreeIter& rIter) const { return m_xTreeView->get_iter_first(rIter); }
+ // set iter to point to next node, depth first, then sibling
+ bool iter_next(weld::TreeIter& rIter) const { return m_xTreeView->iter_next(rIter); }
+ bool iter_next_sibling(weld::TreeIter& rIter) const { return m_xTreeView->iter_next_sibling(rIter); }
+ bool iter_has_child(const weld::TreeIter& rIter) const { return m_xTreeView->iter_has_child(rIter); }
+ OUString get_text(const weld::TreeIter& rIter) const { return m_xTreeView->get_text(rIter); }
+ OUString get_text(int nPos) const { return m_xTreeView->get_text(nPos); }
+ OUString get_id(const weld::TreeIter& rIter) const { return m_xTreeView->get_id(rIter); }
+ OUString get_id(int nPos) const { return m_xTreeView->get_id(nPos); }
+ bool get_selected(weld::TreeIter* pIter) const { return m_xTreeView->get_selected(pIter); }
+ OUString get_selected_text() const
+ {
+ if (!m_xTreeView->get_selected(m_xScratchIter.get()))
+ return OUString();
+ return m_xTreeView->get_text(*m_xScratchIter);
+ }
+ OUString get_selected_id() const
+ {
+ if (!m_xTreeView->get_selected(m_xScratchIter.get()))
+ return OUString();
+ return m_xTreeView->get_id(*m_xScratchIter);
+ }
+ int get_selected_index() const { return m_xTreeView->get_selected_index(); }
+ void select(const weld::TreeIter& rIter) { m_xTreeView->select(rIter); }
+ void select(int pos) { m_xTreeView->select(pos); }
+ void set_size_request(int nWidth, int nHeight) { m_xTreeView->set_size_request(nWidth, nHeight); }
+ Size get_size_request() const { return m_xTreeView->get_size_request(); }
+ weld::TreeView& get_widget() { return *m_xTreeView; }
+
+ ~CuiConfigFunctionListBox();
+
+ void ClearAll();
+ OUString GetSelectedScriptURI() const;
+ OUString GetHelpText( bool bConsiderParent = true );
+ OUString GetCurCommand() const;
+ OUString GetCurLabel() const;
+
+ DECL_LINK(QueryTooltip, const weld::TreeIter& rIter, OUString);
+};
+
+struct SvxConfigGroupBoxResource_Impl;
+class CuiConfigGroupListBox
+{
+ std::unique_ptr<SvxConfigGroupBoxResource_Impl> xImp;
+ CuiConfigFunctionListBox* m_pFunctionListBox;
+ SfxGroupInfoArr_Impl aArr;
+ OUString m_sModuleLongName;
+ css::uno::Reference< css::uno::XComponentContext > m_xContext;
+ css::uno::Reference< css::frame::XFrame > m_xFrame;
+ css::uno::Reference< css::container::XNameAccess > m_xGlobalCategoryInfo;
+ css::uno::Reference< css::container::XNameAccess > m_xModuleCategoryInfo;
+ css::uno::Reference< css::container::XNameAccess > m_xUICmdDescription;
+ SfxStylesInfo_Impl* m_pStylesInfo;
+ std::unique_ptr<weld::TreeView> m_xTreeView;
+
+ static OUString GetImage(
+ const css::uno::Reference< css::script::browse::XBrowseNode >& node,
+ css::uno::Reference< css::uno::XComponentContext > const & xCtx,
+ bool bIsRootNode);
+
+ static css::uno::Reference< css::uno::XInterface > getDocumentModel(
+ css::uno::Reference< css::uno::XComponentContext > const & xCtx,
+ OUString const & docName);
+
+ void InitModule();
+ void FillScriptList(const css::uno::Reference< css::script::browse::XBrowseNode >& xRootNode,
+ const weld::TreeIter* pParentEntry, bool bCheapChildrenOnDemand);
+ void FillFunctionsList(const css::uno::Sequence< css::frame::DispatchInformation >& xCommands);
+ OUString MapCommand2UIName(const OUString& sCommand);
+
+ DECL_LINK(ExpandingHdl, const weld::TreeIter&, bool);
+
+public:
+ CuiConfigGroupListBox(std::unique_ptr<weld::TreeView> xTreeView);
+ void set_sensitive(bool bSensitive) { m_xTreeView->set_sensitive(bSensitive); }
+ void connect_changed(const Link<weld::TreeView&, void>& rLink) { m_xTreeView->connect_changed(rLink); }
+ void set_size_request(int nWidth, int nHeight) { m_xTreeView->set_size_request(nWidth, nHeight); }
+ weld::TreeView& get_widget() { return *m_xTreeView; }
+ ~CuiConfigGroupListBox();
+ void ClearAll();
+
+ void Init(const css::uno::Reference< css::uno::XComponentContext >& xContext,
+ const css::uno::Reference< css::frame::XFrame >& xFrame,
+ const OUString& sModuleLongName,
+ bool bEventMode);
+ void SetFunctionListBox( CuiConfigFunctionListBox *pBox )
+ { m_pFunctionListBox = pBox; }
+ void GroupSelected();
+ void SelectMacro(const SfxMacroInfoItem*);
+ void SelectMacro(const OUString&, const OUString&);
+ void SetStylesInfo(SfxStylesInfo_Impl* pStyles);
+};
+
+class SvxScriptSelectorDialog : public weld::GenericDialogController
+{
+ OUString m_sDefaultDesc;
+ SfxStylesInfo_Impl m_aStylesInfo;
+
+ std::unique_ptr<weld::Label> m_xDialogDescription;
+ std::unique_ptr<CuiConfigGroupListBox> m_xCategories;
+ std::unique_ptr<CuiConfigFunctionListBox> m_xCommands;
+ std::unique_ptr<weld::Label> m_xLibraryFT;
+ std::unique_ptr<weld::Label> m_xCategoryFT;
+ std::unique_ptr<weld::Label> m_xMacronameFT;
+ std::unique_ptr<weld::Label> m_xCommandsFT;
+ std::unique_ptr<weld::Button> m_xOKButton;
+ std::unique_ptr<weld::Button> m_xCancelButton;
+ std::unique_ptr<weld::TextView> m_xDescriptionText;
+
+ DECL_LINK(ClickHdl, weld::Button&, void);
+ DECL_LINK(SelectHdl, weld::TreeView&, void);
+ DECL_LINK(FunctionDoubleClickHdl, weld::TreeView&, bool);
+
+ void UpdateUI();
+
+public:
+ SvxScriptSelectorDialog(weld::Window* pParent,
+ const css::uno::Reference< css::frame::XFrame >& xFrame);
+ virtual ~SvxScriptSelectorDialog() override;
+
+ OUString GetScriptURL() const;
+ void SetRunLabel();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/chardlg.hxx b/cui/source/inc/chardlg.hxx
new file mode 100644
index 000000000..e81284cc6
--- /dev/null
+++ b/cui/source/inc/chardlg.hxx
@@ -0,0 +1,343 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_CHARDLG_HXX
+#define INCLUDED_CUI_SOURCE_INC_CHARDLG_HXX
+
+#include <svtools/ctrlbox.hxx>
+#include <sfx2/tabdlg.hxx>
+#include <svx/fntctrl.hxx>
+#include <svx/colorbox.hxx>
+#include <svx/langbox.hxx>
+#include <vcl/weld.hxx>
+#include <memory>
+
+// forward ---------------------------------------------------------------
+
+class SvxFontListItem;
+class FontList;
+
+class SvxCharBasePage : public SfxTabPage
+{
+protected:
+ SvxFontPrevWindow m_aPreviewWin;
+ std::unique_ptr<weld::CustomWeld> m_xPreviewWin;
+
+ bool m_bPreviewBackgroundToCharacter;
+
+ SvxCharBasePage(weld::Container* pPage, weld::DialogController* pController, const OUString& rUIXMLDescription, const OString& rID, const SfxItemSet& rAttrSet);
+
+ void SetPrevFontWidthScale( const SfxItemSet& rSet );
+ void SetPrevFontEscapement( sal_uInt8 nProp, sal_uInt8 nEscProp, short nEsc );
+
+ inline SvxFont& GetPreviewFont();
+ inline SvxFont& GetPreviewCJKFont();
+ inline SvxFont& GetPreviewCTLFont();
+
+public:
+ virtual ~SvxCharBasePage() override;
+
+ virtual void ActivatePage( const SfxItemSet& rSet ) override;
+};
+
+// class SvxCharNamePage -------------------------------------------------
+
+struct SvxCharNamePage_Impl;
+
+class SvxCharNamePage : public SvxCharBasePage
+{
+private:
+ static const sal_uInt16 pNameRanges[];
+
+ std::unique_ptr<SvxCharNamePage_Impl> m_pImpl;
+
+ std::unique_ptr<weld::Widget> m_xWestFrame;
+ std::unique_ptr<weld::Label> m_xWestFontNameFT;
+ std::unique_ptr<weld::ComboBox> m_xWestFontNameLB;
+ std::unique_ptr<weld::Label> m_xWestFontStyleFT;
+ std::unique_ptr<FontStyleBox> m_xWestFontStyleLB;
+ std::unique_ptr<weld::Label> m_xWestFontSizeFT;
+ std::unique_ptr<FontSizeBox> m_xWestFontSizeLB;
+ std::unique_ptr<weld::Label> m_xWestFontLanguageFT;
+ std::unique_ptr<SvxLanguageBox> m_xWestFontLanguageLB;
+ std::unique_ptr<weld::Label> m_xWestFontTypeFT;
+ std::unique_ptr<weld::Button> m_xWestFontFeaturesButton;
+
+ std::unique_ptr<weld::Widget> m_xEastFrame;
+ std::unique_ptr<weld::Label> m_xEastFontNameFT;
+ std::unique_ptr<weld::ComboBox> m_xEastFontNameLB;
+ std::unique_ptr<weld::Label> m_xEastFontStyleFT;
+ std::unique_ptr<FontStyleBox> m_xEastFontStyleLB;
+ std::unique_ptr<weld::Label> m_xEastFontSizeFT;
+ std::unique_ptr<FontSizeBox> m_xEastFontSizeLB;
+ std::unique_ptr<weld::Label> m_xEastFontLanguageFT;
+ std::unique_ptr<SvxLanguageBox> m_xEastFontLanguageLB;
+ std::unique_ptr<weld::Label> m_xEastFontTypeFT;
+ std::unique_ptr<weld::Button> m_xEastFontFeaturesButton;
+
+ std::unique_ptr<weld::Widget> m_xCTLFrame;
+ std::unique_ptr<weld::Label> m_xCTLFontNameFT;
+ std::unique_ptr<weld::ComboBox> m_xCTLFontNameLB;
+ std::unique_ptr<weld::Label> m_xCTLFontStyleFT;
+ std::unique_ptr<FontStyleBox> m_xCTLFontStyleLB;
+ std::unique_ptr<weld::Label> m_xCTLFontSizeFT;
+ std::unique_ptr<FontSizeBox> m_xCTLFontSizeLB;
+ std::unique_ptr<weld::Label> m_xCTLFontLanguageFT;
+ std::unique_ptr<SvxLanguageBox> m_xCTLFontLanguageLB;
+ std::unique_ptr<weld::Label> m_xCTLFontTypeFT;
+ std::unique_ptr<weld::Button> m_xCTLFontFeaturesButton;
+
+ void Initialize();
+ const FontList* GetFontList() const;
+ void UpdatePreview_Impl();
+ void FillStyleBox_Impl(const weld::Widget& rBox);
+ void FillSizeBox_Impl(const weld::Widget& rBox);
+
+ enum LanguageGroup
+ {
+ /** Language for western text.
+ */
+ Western = 0,
+
+ /** Language for asian text.
+ */
+ Asian,
+
+ /** Language for ctl text.
+ */
+ Ctl
+ };
+
+ void Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp );
+ bool FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp );
+
+ DECL_LINK(UpdateHdl_Impl, Timer *, void );
+ DECL_LINK(FontModifyComboBoxHdl_Impl, weld::ComboBox&, void);
+ DECL_LINK(FontFeatureButtonClicked, weld::Button&, void);
+
+ void FontModifyHdl_Impl(const weld::Widget&);
+
+public:
+ virtual void ActivatePage( const SfxItemSet& rSet ) override;
+ virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
+
+public:
+ SvxCharNamePage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet );
+ virtual ~SvxCharNamePage() override;
+
+ static const sal_uInt16* GetRanges() { return pNameRanges; }
+
+ virtual void Reset( const SfxItemSet* rSet ) override;
+ virtual bool FillItemSet( SfxItemSet* rSet ) override;
+ virtual void ChangesApplied() override;
+
+ void SetFontList( const SvxFontListItem& rItem );
+ void EnableRelativeMode();
+ void EnableSearchMode();
+
+ void DisableControls( sal_uInt16 nDisable );
+ virtual void PageCreated(const SfxAllItemSet& aSet) override;
+};
+
+// class SvxCharEffectsPage ----------------------------------------------
+
+class SvxCharEffectsPage : public SvxCharBasePage
+{
+private:
+ static const sal_uInt16 pEffectsRanges[];
+ bool m_bOrigFontColor;
+ bool m_bNewFontColor;
+ bool m_bEnableNoneFontColor;
+ Color m_aOrigFontColor;
+ sal_uInt16 m_nHtmlMode;
+ bool m_bUnderlineColorDisabled;
+
+ weld::TriStateEnabled m_aOutlineState;
+ weld::TriStateEnabled m_aShadowState;
+ weld::TriStateEnabled m_aHiddenState;
+ weld::TriStateEnabled m_aIndividualWordsState;
+
+ std::unique_ptr<weld::Label> m_xFontColorFT;
+ std::unique_ptr<ColorListBox> m_xFontColorLB;
+ std::unique_ptr<weld::Label> m_xFontTransparencyFT;
+ std::unique_ptr<weld::MetricSpinButton> m_xFontTransparencyMtr;
+ std::unique_ptr<weld::Label> m_xEffectsFT;
+ std::unique_ptr<weld::ComboBox> m_xEffectsLB;
+ std::unique_ptr<weld::Label> m_xReliefFT;
+ std::unique_ptr<weld::ComboBox> m_xReliefLB;
+ std::unique_ptr<weld::CheckButton> m_xOutlineBtn;
+ std::unique_ptr<weld::CheckButton> m_xShadowBtn;
+ std::unique_ptr<weld::CheckButton> m_xHiddenBtn;
+ std::unique_ptr<weld::ComboBox> m_xOverlineLB;
+ std::unique_ptr<weld::Label> m_xOverlineColorFT;
+ std::unique_ptr<ColorListBox> m_xOverlineColorLB;
+ std::unique_ptr<weld::ComboBox> m_xStrikeoutLB;
+ std::unique_ptr<weld::ComboBox> m_xUnderlineLB;
+ std::unique_ptr<weld::Label> m_xUnderlineColorFT;
+ std::unique_ptr<ColorListBox> m_xUnderlineColorLB;
+ std::unique_ptr<weld::CheckButton> m_xIndividualWordsBtn;
+ std::unique_ptr<weld::Label> m_xEmphasisFT;
+ std::unique_ptr<weld::ComboBox> m_xEmphasisLB;
+ std::unique_ptr<weld::Label> m_xPositionFT;
+ std::unique_ptr<weld::ComboBox> m_xPositionLB;
+ std::unique_ptr<weld::Label> m_xA11yWarningFT;
+
+ void Initialize();
+ void UpdatePreview_Impl();
+ void SetCaseMap_Impl( SvxCaseMap eCaseMap );
+ void ResetColor_Impl( const SfxItemSet& rSet );
+ bool FillItemSetColor_Impl( SfxItemSet& rSet );
+ Color GetPreviewFontColor(const Color& rColor) const;
+ void EnableNoneFontColor();
+
+ void SelectHdl_Impl(const weld::ComboBox*);
+ DECL_LINK(SelectListBoxHdl_Impl, weld::ComboBox&, void);
+ DECL_LINK(OutlineBtnClickHdl, weld::ToggleButton&, void);
+ DECL_LINK(ShadowBtnClickHdl, weld::ToggleButton&, void);
+ DECL_LINK(HiddenBtnClickHdl, weld::ToggleButton&, void);
+ DECL_LINK(CbClickHdl_Impl, weld::ToggleButton&, void);
+ DECL_LINK(ColorBoxSelectHdl_Impl, ColorListBox&, void);
+ DECL_LINK(ModifyFontTransparencyHdl_Impl, weld::MetricSpinButton&, void);
+
+public:
+ SvxCharEffectsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet );
+ virtual ~SvxCharEffectsPage() override;
+
+ virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
+
+public:
+ static const sal_uInt16* GetRanges() { return pEffectsRanges; }
+
+ virtual void Reset( const SfxItemSet* rSet ) override;
+ virtual bool FillItemSet( SfxItemSet* rSet ) override;
+ virtual void ChangesApplied() override;
+
+ void DisableControls( sal_uInt16 nDisable );
+ virtual void PageCreated(const SfxAllItemSet& aSet) override;
+};
+
+// class SvxCharPositionPage ---------------------------------------------
+class SvxCharPositionPage : public SvxCharBasePage
+{
+ static const sal_uInt16 pPositionRanges[];
+
+private:
+ short m_nSuperEsc;
+ short m_nSubEsc;
+
+ sal_uInt16 m_nScaleWidthItemSetVal;
+ sal_uInt16 m_nScaleWidthInitialVal;
+
+ sal_uInt8 m_nSuperProp;
+ sal_uInt8 m_nSubProp;
+
+ std::unique_ptr<weld::RadioButton> m_xHighPosBtn;
+ std::unique_ptr<weld::RadioButton> m_xNormalPosBtn;
+ std::unique_ptr<weld::RadioButton> m_xLowPosBtn;
+ std::unique_ptr<weld::Label> m_xHighLowFT;
+ std::unique_ptr<weld::MetricSpinButton> m_xHighLowMF;
+ std::unique_ptr<weld::CheckButton> m_xHighLowRB;
+ std::unique_ptr<weld::Label> m_xFontSizeFT;
+ std::unique_ptr<weld::MetricSpinButton> m_xFontSizeMF;
+
+ std::unique_ptr<weld::Widget> m_xRotationContainer;
+
+ std::unique_ptr<weld::Label> m_xScalingFT;
+ std::unique_ptr<weld::Label> m_xScalingAndRotationFT;
+ std::unique_ptr<weld::RadioButton> m_x0degRB;
+ std::unique_ptr<weld::RadioButton> m_x90degRB;
+ std::unique_ptr<weld::RadioButton> m_x270degRB;
+ std::unique_ptr<weld::CheckButton> m_xFitToLineCB;
+
+ std::unique_ptr<weld::MetricSpinButton> m_xScaleWidthMF;
+
+ std::unique_ptr<weld::MetricSpinButton> m_xKerningMF;
+ std::unique_ptr<weld::CheckButton> m_xPairKerningBtn;
+
+ void Initialize();
+ void UpdatePreview_Impl( sal_uInt8 nProp, sal_uInt8 nEscProp, short nEsc );
+ void SetEscapement_Impl( SvxEscapement nEsc );
+
+ DECL_LINK(PositionHdl_Impl, weld::ToggleButton&, void);
+ DECL_LINK(RotationHdl_Impl, weld::ToggleButton&, void);
+ DECL_LINK(AutoPositionHdl_Impl, weld::ToggleButton&, void);
+ DECL_LINK(FitToLineHdl_Impl, weld::ToggleButton&, void);
+ DECL_LINK(KerningModifyHdl_Impl, weld::MetricSpinButton&, void);
+ DECL_LINK(ValueChangedHdl_Impl, weld::MetricSpinButton&, void);
+ DECL_LINK(ScaleWidthModifyHdl_Impl, weld::MetricSpinButton&, void);
+ void FontModifyHdl_Impl();
+
+public:
+ SvxCharPositionPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet );
+ virtual ~SvxCharPositionPage() override;
+
+ virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
+
+public:
+ static const sal_uInt16* GetRanges() { return pPositionRanges; }
+
+ virtual void Reset( const SfxItemSet* rSet ) override;
+ virtual bool FillItemSet( SfxItemSet* rSet ) override;
+ virtual void ChangesApplied() override;
+ virtual void FillUserData() override;
+ virtual void PageCreated(const SfxAllItemSet& aSet) override;
+};
+
+// class SvxCharTwoLinesPage ---------------------------------------------
+
+class SvxCharTwoLinesPage : public SvxCharBasePage
+{
+private:
+ static const sal_uInt16 pTwoLinesRanges[];
+ sal_uInt16 m_nStartBracketPosition;
+ sal_uInt16 m_nEndBracketPosition;
+
+ std::unique_ptr<weld::CheckButton> m_xTwoLinesBtn;
+ std::unique_ptr<weld::Widget> m_xEnclosingFrame;
+ std::unique_ptr<weld::TreeView> m_xStartBracketLB;
+ std::unique_ptr<weld::TreeView> m_xEndBracketLB;
+
+ void UpdatePreview_Impl();
+ void Initialize();
+ void SelectCharacter(weld::TreeView* pBox);
+ void SetBracket(sal_Unicode cBracket, bool bStart);
+
+ DECL_LINK(TwoLinesHdl_Impl, weld::ToggleButton&, void);
+ DECL_LINK(CharacterMapHdl_Impl, weld::TreeView&, void);
+
+public:
+ SvxCharTwoLinesPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet );
+ virtual ~SvxCharTwoLinesPage() override;
+
+ virtual void ActivatePage( const SfxItemSet& rSet ) override;
+ virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
+
+ static const sal_uInt16* GetRanges() { return pTwoLinesRanges; }
+
+ virtual void Reset( const SfxItemSet* rSet ) override;
+ virtual bool FillItemSet( SfxItemSet* rSet ) override;
+ virtual void PageCreated(const SfxAllItemSet& aSet) override;
+};
+
+#endif // INCLUDED_CUI_SOURCE_INC_CHARDLG_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/colorpicker.hxx b/cui/source/inc/colorpicker.hxx
new file mode 100644
index 000000000..7c05ebabc
--- /dev/null
+++ b/cui/source/inc/colorpicker.hxx
@@ -0,0 +1,47 @@
+/* -*- 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 .
+ */
+
+#ifndef INCLUDED_CUI_SOURCE_INC_COLORPICKER_HXX
+#define INCLUDED_CUI_SOURCE_INC_COLORPICKER_HXX
+
+#include <sal/config.h>
+
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <rtl/ustring.hxx>
+
+namespace com::sun::star::uno {
+ class XComponentContext;
+ class XInterface;
+}
+
+namespace cui {
+
+OUString ColorPicker_getImplementationName();
+
+css::uno::Reference<css::uno::XInterface> ColorPicker_createInstance(
+ css::uno::Reference<css::uno::XComponentContext> const &);
+
+/// @throws css::uno::RuntimeException
+css::uno::Sequence<OUString> ColorPicker_getSupportedServiceNames();
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/connect.hxx b/cui/source/inc/connect.hxx
new file mode 100644
index 000000000..1b4185147
--- /dev/null
+++ b/cui/source/inc/connect.hxx
@@ -0,0 +1,86 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_CONNECT_HXX
+#define INCLUDED_CUI_SOURCE_INC_CONNECT_HXX
+
+#include <svx/connctrl.hxx>
+#include <sfx2/tabdlg.hxx>
+#include <vcl/customweld.hxx>
+#include <vcl/weld.hxx>
+#include <sfx2/basedlgs.hxx>
+
+class SdrView;
+
+/// Dialog for changing connectors.
+class SvxConnectionPage : public SfxTabPage
+{
+private:
+ static const sal_uInt16 pRanges[];
+ const SfxItemSet& rOutAttrs;
+ SfxItemSet aAttrSet;
+ const SdrView* pView;
+ MapUnit eUnit;
+
+ SvxXConnectionPreview m_aCtlPreview;
+ std::unique_ptr<weld::ComboBox> m_xLbType;
+ std::unique_ptr<weld::Label> m_xFtLine1;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrFldLine1;
+ std::unique_ptr<weld::Label> m_xFtLine2;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrFldLine2;
+ std::unique_ptr<weld::Label> m_xFtLine3;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrFldLine3;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrFldHorz1;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrFldVert1;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrFldHorz2;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrFldVert2;
+ std::unique_ptr<weld::CustomWeld> m_xCtlPreview;
+
+ void FillTypeLB();
+
+ DECL_LINK(ChangeAttrEditHdl_Impl, weld::MetricSpinButton&, void);
+ DECL_LINK(ChangeAttrListBoxHdl_Impl, weld::ComboBox&, void);
+
+public:
+
+ SvxConnectionPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
+ virtual ~SvxConnectionPage() override;
+
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
+ static const sal_uInt16* GetRanges() { return pRanges; }
+
+ virtual bool FillItemSet( SfxItemSet* ) override;
+ virtual void Reset( const SfxItemSet * ) override;
+
+ void Construct();
+ void SetView( const SdrView* pSdrView ) { pView = pSdrView; }
+ virtual void PageCreated(const SfxAllItemSet& aSet) override;
+};
+
+/* Derived from SfxSingleTabDialogController, in order to be informed about
+ virtual methods by the control. */
+class SvxConnectionDialog : public SfxSingleTabDialogController
+{
+public:
+ SvxConnectionDialog(weld::Window* pParent, const SfxItemSet& rAttr,
+ const SdrView* pView);
+};
+
+#endif // INCLUDED_CUI_SOURCE_INC_CONNECT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/cuifmsearch.hxx b/cui/source/inc/cuifmsearch.hxx
new file mode 100644
index 000000000..42183e627
--- /dev/null
+++ b/cui/source/inc/cuifmsearch.hxx
@@ -0,0 +1,173 @@
+/* -*- 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 .
+ */
+
+#ifndef INCLUDED_CUI_SOURCE_INC_CUIFMSEARCH_HXX
+#define INCLUDED_CUI_SOURCE_INC_CUIFMSEARCH_HXX
+
+#include <com/sun/star/sdbc/XResultSet.hpp>
+
+#include <svx/fmsearch.hxx>
+#include <vcl/weld.hxx>
+#include <tools/link.hxx>
+#include <rtl/ustring.hxx>
+
+namespace svxform {
+ class FmSearchConfigItem;
+}
+
+struct FmSearchProgress;
+
+class FmSearchEngine;
+
+/// Dialog for searching in Forms/Tables
+class FmSearchDialog final : public weld::GenericDialogController
+{
+ friend class FmSearchEngine;
+
+ OUString m_sSearch;
+ OUString m_sCancel;
+
+ Link<FmFoundRecordInformation&,void> m_lnkFoundHandler; ///< Handler for "found"
+ Link<FmFoundRecordInformation&,void> m_lnkCanceledNotFoundHdl; ///< Handler for Positioning the Cursors
+
+ Link<FmSearchContext&,sal_uInt32> m_lnkContextSupplier; ///< for search in contexts
+
+ /// memorize the currently selected field for every context
+ std::vector<OUString> m_arrContextFields;
+
+ std::unique_ptr<FmSearchEngine> m_pSearchEngine;
+
+ // see EnableSearchUI
+ std::unique_ptr<::svxform::FmSearchConfigItem> m_pConfig;
+
+ // my all Controls
+ std::unique_ptr<weld::RadioButton> m_prbSearchForText;
+ std::unique_ptr<weld::RadioButton> m_prbSearchForNull;
+ std::unique_ptr<weld::RadioButton> m_prbSearchForNotNull;
+ std::unique_ptr<weld::ComboBox> m_pcmbSearchText;
+ std::unique_ptr<weld::Label> m_pftForm;
+ std::unique_ptr<weld::ComboBox> m_plbForm;
+ std::unique_ptr<weld::RadioButton> m_prbAllFields;
+ std::unique_ptr<weld::RadioButton> m_prbSingleField;
+ std::unique_ptr<weld::ComboBox> m_plbField;
+ std::unique_ptr<weld::Label> m_pftPosition;
+ std::unique_ptr<weld::ComboBox> m_plbPosition;
+ std::unique_ptr<weld::CheckButton> m_pcbUseFormat;
+ std::unique_ptr<weld::CheckButton> m_pcbCase;
+ std::unique_ptr<weld::CheckButton> m_pcbBackwards;
+ std::unique_ptr<weld::CheckButton> m_pcbStartOver;
+ std::unique_ptr<weld::CheckButton> m_pcbWildCard;
+ std::unique_ptr<weld::CheckButton> m_pcbRegular;
+ std::unique_ptr<weld::CheckButton> m_pcbApprox;
+ std::unique_ptr<weld::Button> m_ppbApproxSettings;
+ std::unique_ptr<weld::CheckButton> m_pHalfFullFormsCJK;
+ std::unique_ptr<weld::CheckButton> m_pSoundsLikeCJK;
+ std::unique_ptr<weld::Button> m_pSoundsLikeCJKSettings;
+ std::unique_ptr<weld::Label> m_pftRecord;
+ std::unique_ptr<weld::Label> m_pftHint;
+ std::unique_ptr<weld::Button> m_pbSearchAgain;
+ std::unique_ptr<weld::Button> m_pbClose;
+
+public:
+ /** This can search in different sets of fields. There is a number of contexts; their names are in strContexts (separated
+ by ';'), the user can choose one of them.
+ When the user chooses a context, lnkContextSupplier is called, it gets a pointer on a FmSearchContext-structure,
+ that has to be filled.
+ The following counts for the search :
+ a) in case of formatted search the iterator itself is used (like in the first constructor)
+ b) in case of formatted search NOT the FormatKey at the fields of the iterator is used, but the respective TextComponent
+ is asked (that's why the original iterator is used; by its move the controls behind the TextComponent-interface are
+ updated hopefully)
+ c) in case of not-formatted search a clone of the iterator is used (because the TextComponent-interfaces don't need to
+ be asked)
+ (of course needed : the string number i in strUsedFields of a context must correspond with the interface number i in the
+ arrFields of the context)
+ */
+ FmSearchDialog(weld::Window* pParent, const OUString& strInitialText, const std::vector< OUString >& _rContexts, sal_Int16 nInitialContext,
+ const Link<FmSearchContext&,sal_uInt32>& lnkContextSupplier);
+
+ virtual short run() override;
+
+ virtual ~FmSearchDialog() override;
+
+ /** The found-handler gets in the 'found'-case a pointer on a FmFoundRecordInformation-structure
+ (which is only valid in the handler; so if one needs to memorize the data, don't copy the pointer but
+ the structure).
+ This handler MUST be set.
+ Furthermore, it should be considered, that during the handler the search-dialog is still modal.
+ */
+ void SetFoundHandler(const Link<FmFoundRecordInformation&,void>& lnk) { m_lnkFoundHandler = lnk; }
+ /**
+ If the search has been cancelled or has been finished without success, the current data set is always displayed in the
+ search dialog. This handler exists to make this synchronous with the possible display of the caller (it does not
+ necessarily need to be set).
+ The pointer that is passed to the handler points to a FmFoundRecordInformation-structure, for which aPosition and
+ possibly (in a search with contexts) nContext are valid.
+ */
+ void SetCanceledNotFoundHdl(const Link<FmFoundRecordInformation&,void>& lnk) { m_lnkCanceledNotFoundHdl = lnk; }
+
+ inline void SetActiveField(const OUString& strField);
+
+private:
+ void Init(const OUString& strVisibleFields, const OUString& strInitialText);
+ // only to be used out of the constructors
+
+ void OnFound(const css::uno::Any& aCursorPos, sal_Int16 nFieldPos);
+
+ void EnableSearchUI(bool bEnable);
+
+ void EnableSearchForDependees(bool bEnable);
+
+ void InitContext(sal_Int16 nContext);
+
+ void LoadParams();
+ void SaveParams() const;
+
+ // Handler for the Controls
+ DECL_LINK( OnClickedFieldRadios, weld::Button&, void );
+ DECL_LINK( OnClickedSearchAgain, weld::Button&, void );
+ DECL_LINK( OnClickedSpecialSettings, weld::Button&, void );
+
+ DECL_LINK( OnSearchTextModified, weld::ComboBox&, void );
+
+ DECL_LINK( OnPositionSelected, weld::ComboBox&, void );
+ DECL_LINK( OnFieldSelected, weld::ComboBox&, void );
+
+ DECL_LINK( OnFocusGrabbed, weld::Widget&, void );
+ DECL_LINK( OnCheckBoxToggled, weld::ToggleButton&, void );
+
+ DECL_LINK( OnContextSelection, weld::ComboBox&, void );
+
+ DECL_LINK( OnSearchProgress, const FmSearchProgress*, void );
+
+ void initCommon( const css::uno::Reference< css::sdbc::XResultSet >& _rxCursor );
+};
+
+inline void FmSearchDialog::SetActiveField(const OUString& strField)
+{
+ int nInitialField = m_plbField->find_text(strField);
+ if (nInitialField == -1)
+ nInitialField = 0;
+ m_plbField->set_active(nInitialField);
+ OnFieldSelected(*m_plbField);
+}
+
+#endif // INCLUDED_CUI_SOURCE_INC_CUIFMSEARCH_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/cuigaldlg.hxx b/cui/source/inc/cuigaldlg.hxx
new file mode 100644
index 000000000..0ad85b654
--- /dev/null
+++ b/cui/source/inc/cuigaldlg.hxx
@@ -0,0 +1,277 @@
+/* -*- 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 .
+ */
+
+#ifndef INCLUDED_CUI_SOURCE_INC_CUIGALDLG_HXX
+#define INCLUDED_CUI_SOURCE_INC_CUIGALDLG_HXX
+
+#include <sal/config.h>
+
+#include <salhelper/thread.hxx>
+#include <tools/urlobj.hxx>
+#include <vcl/idle.hxx>
+#include <sfx2/tabdlg.hxx>
+#include <svx/galctrl.hxx>
+#include <svx/galmisc.hxx>
+#include <com/sun/star/media/XPlayer.hpp>
+#include <com/sun/star/ui/dialogs/XFolderPicker2.hpp>
+#include <svtools/dialogclosedlistener.hxx>
+#include <vector>
+
+class GalleryTheme;
+class SearchProgress;
+class TakeProgress;
+class TPGalleryThemeProperties;
+
+typedef std::vector< sal_uLong > TokenList_impl;
+
+struct FilterEntry
+{
+ OUString aFilterName;
+};
+
+class SearchThread: public salhelper::Thread
+{
+private:
+
+ SearchProgress* mpProgress;
+ TPGalleryThemeProperties* mpBrowser;
+ INetURLObject maStartURL;
+
+ void ImplSearch( const INetURLObject& rStartURL,
+ const std::vector< OUString >& rFormats,
+ bool bRecursive );
+
+ virtual ~SearchThread() override;
+ virtual void execute() override;
+
+public:
+
+ SearchThread(SearchProgress* pProgress,
+ TPGalleryThemeProperties* pBrowser,
+ const INetURLObject& rStartURL);
+};
+
+class SearchProgress : public weld::GenericDialogController
+{
+private:
+ INetURLObject startUrl_;
+ TPGalleryThemeProperties* m_pTabPage;
+ rtl::Reference< SearchThread > m_aSearchThread;
+ std::unique_ptr<weld::Label> m_xFtSearchDir;
+ std::unique_ptr<weld::Label> m_xFtSearchType;
+ std::unique_ptr<weld::Button> m_xBtnCancel;
+
+ DECL_LINK(ClickCancelBtn, weld::Button&, void);
+
+public:
+ SearchProgress(weld::Window* pParent, TPGalleryThemeProperties* pTabPage, const INetURLObject& rStartURL);
+ void LaunchThread();
+ virtual ~SearchProgress() override;
+
+ DECL_LINK( CleanUpHdl, void*, void );
+
+ void SetFileType( const OUString& rType ) { m_xFtSearchType->set_label(rType); }
+ void SetDirectory( const INetURLObject& rURL ) { m_xFtSearchDir->set_label(GetReducedString(rURL, 30)); }
+};
+
+class TakeThread: public salhelper::Thread
+{
+private:
+
+ TakeProgress* mpProgress;
+ TPGalleryThemeProperties* mpBrowser;
+ TokenList_impl& mrTakenList;
+
+ virtual ~TakeThread() override;
+ virtual void execute() override;
+
+public:
+
+ TakeThread(
+ TakeProgress* pProgress,
+ TPGalleryThemeProperties* pBrowser,
+ TokenList_impl& rTakenList
+ );
+};
+
+class TakeProgress : public weld::GenericDialogController
+{
+private:
+ weld::Window* m_pParent;
+ TPGalleryThemeProperties* m_pTabPage;
+ rtl::Reference< TakeThread > maTakeThread;
+ TokenList_impl maTakenList;
+ std::unique_ptr<weld::Label> m_xFtTakeFile;
+ std::unique_ptr<weld::Button> m_xBtnCancel;
+
+ DECL_LINK(ClickCancelBtn, weld::Button&, void);
+
+public:
+
+ TakeProgress(weld::Window* pParent, TPGalleryThemeProperties* pTabPage);
+ void LaunchThread();
+ virtual ~TakeProgress() override;
+
+ DECL_LINK( CleanUpHdl, void*, void );
+
+ void SetFile( const INetURLObject& rURL ) { m_xFtTakeFile->set_label(GetReducedString(rURL, 30)); }
+};
+
+class ActualizeProgress : public weld::GenericDialogController
+{
+private:
+ Idle* pIdle;
+ GalleryTheme* pTheme;
+ GalleryProgress aStatusProgress;
+ std::unique_ptr<weld::Label> m_xFtActualizeFile;
+ std::unique_ptr<weld::Button> m_xBtnCancel;
+
+ DECL_LINK(ClickCancelBtn, weld::Button&, void);
+ DECL_LINK(TimeoutHdl, Timer*, void);
+ DECL_LINK(ActualizeHdl, const INetURLObject&, void);
+
+public:
+ ActualizeProgress(weld::Widget* pWindow, GalleryTheme* pThm);
+ virtual ~ActualizeProgress() override;
+
+ virtual short run() override;
+};
+
+class TitleDialog : public weld::GenericDialogController
+{
+private:
+ std::unique_ptr<weld::Entry> m_xEdit;
+public:
+ TitleDialog(weld::Widget* pParent, const OUString& rOldText);
+ virtual ~TitleDialog() override;
+ OUString GetTitle() const { return m_xEdit->get_text(); }
+};
+
+class GalleryIdDialog : public weld::GenericDialogController
+{
+private:
+ GalleryTheme* m_pThm;
+ std::unique_ptr<weld::Button> m_xBtnOk;
+ std::unique_ptr<weld::ComboBox> m_xLbResName;
+
+ DECL_LINK(ClickOkHdl, weld::Button&, void);
+public:
+ GalleryIdDialog(weld::Widget* pParent, GalleryTheme* pThm);
+ virtual ~GalleryIdDialog() override;
+ sal_uInt32 GetId() const { return m_xLbResName->get_active(); }
+};
+
+class GalleryThemeProperties : public SfxTabDialogController
+{
+ ExchangeData* pData;
+
+ virtual void PageCreated(const OString& rId, SfxTabPage &rPage) override;
+
+public:
+ GalleryThemeProperties(weld::Widget* pParent, ExchangeData* pData, SfxItemSet const * pItemSet);
+};
+
+class TPGalleryThemeGeneral : public SfxTabPage
+{
+private:
+ ExchangeData* pData;
+
+ std::unique_ptr<weld::Image> m_xFiMSImage;
+ std::unique_ptr<weld::Entry> m_xEdtMSName;
+ std::unique_ptr<weld::Label> m_xFtMSShowType;
+ std::unique_ptr<weld::Label> m_xFtMSShowPath;
+ std::unique_ptr<weld::Label> m_xFtMSShowContent;
+ std::unique_ptr<weld::Label> m_xFtMSShowChangeDate;
+
+ virtual void Reset( const SfxItemSet* ) override {}
+ virtual bool FillItemSet( SfxItemSet* rSet ) override;
+
+public:
+ TPGalleryThemeGeneral(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
+ void SetXChgData( ExchangeData* pData );
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet );
+};
+
+class TPGalleryThemeProperties : public SfxTabPage
+{
+ friend class SearchThread;
+ friend class TakeProgress;
+ friend class TakeThread;
+
+ ExchangeData* pData;
+ std::vector<OUString> aFoundList;
+ std::vector< std::unique_ptr<FilterEntry> >
+ aFilterEntryList;
+ Timer aPreviewTimer;
+ OUString aLastFilterName;
+ OUString aPreviewString;
+ INetURLObject aURL;
+ bool bEntriesFound;
+ bool bInputAllowed;
+ bool bTakeAll;
+ bool bSearchRecursive;
+
+ rtl::Reference< ::svt::DialogClosedListener > xDialogListener;
+ css::uno::Reference< css::media::XPlayer > xMediaPlayer;
+ css::uno::Reference< css::ui::dialogs::XFolderPicker2 > xFolderPicker;
+
+ DialogGalleryPreview m_aWndPreview;
+ std::unique_ptr<weld::ComboBox> m_xCbbFileType;
+ std::unique_ptr<weld::TreeView> m_xLbxFound;
+ std::unique_ptr<weld::Button> m_xBtnSearch;
+ std::unique_ptr<weld::Button> m_xBtnTake;
+ std::unique_ptr<weld::Button> m_xBtnTakeAll;
+ std::unique_ptr<weld::CheckButton> m_xCbxPreview;
+ std::unique_ptr<weld::CustomWeld> m_xWndPreview;
+
+ virtual void Reset( const SfxItemSet* /*rSet*/ ) override {}
+ virtual bool FillItemSet( SfxItemSet* /*rSet*/ ) override { return true; }
+ static OUString addExtension( const OUString&, const OUString& );
+ void FillFilterList();
+
+ void SearchFiles();
+ void TakeFiles();
+ void DoPreview();
+ void EndSearchProgressHdl(sal_Int32 nResult);
+
+ DECL_LINK(ClickPreviewHdl, weld::ToggleButton&, void);
+ DECL_LINK(ClickSearchHdl, weld::Button&, void);
+ DECL_LINK(ClickTakeHdl, weld::Button&, void);
+ DECL_LINK(ClickTakeAllHdl, weld::Button&, void);
+ DECL_LINK(SelectFoundHdl, weld::TreeView&, void);
+ DECL_LINK(SelectFileTypeHdl, weld::ComboBox&, void);
+ DECL_LINK(DClickFoundHdl, weld::TreeView&, bool);
+ DECL_LINK(PreviewTimerHdl, Timer*, void);
+ DECL_LINK(DialogClosedHdl, css::ui::dialogs::DialogClosedEvent*, void);
+
+public:
+ TPGalleryThemeProperties(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
+ virtual ~TPGalleryThemeProperties() override;
+
+ void SetXChgData( ExchangeData* pData );
+ const ExchangeData* GetXChgData() const { return pData; }
+
+ void StartSearchFiles( const OUString& _rFolderURL, short _nDlgResult );
+
+ static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet);
+};
+
+#endif // INCLUDED_CUI_SOURCE_INC_CUIGALDLG_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/cuigrfflt.hxx b/cui/source/inc/cuigrfflt.hxx
new file mode 100644
index 000000000..b52804673
--- /dev/null
+++ b/cui/source/inc/cuigrfflt.hxx
@@ -0,0 +1,183 @@
+/* -*- 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 .
+ */
+
+#ifndef INCLUDED_CUI_SOURCE_INC_CUIGRFFLT_HXX
+#define INCLUDED_CUI_SOURCE_INC_CUIGRFFLT_HXX
+
+#include <vcl/timer.hxx>
+#include <svx/dlgctrl.hxx>
+#include <svx/rectenum.hxx>
+
+class CuiGraphicPreviewWindow : public weld::CustomWidgetController
+{
+private:
+ const Graphic* mpOrigGraphic;
+ Size maOrigGraphicSizePixel;
+ Size maOutputSizePixel;
+ Link<LinkParamNone*,void> maModifyHdl;
+ Graphic maScaledOrig;
+ Graphic maPreview;
+ double mfScaleX;
+ double mfScaleY;
+
+ virtual void Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect) override;
+ virtual void Resize() override;
+
+ void ScaleImageToFit();
+
+public:
+ CuiGraphicPreviewWindow();
+ virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
+ void init(const Graphic* pOrigGraphic, const Link<LinkParamNone*,void>& rLink)
+ {
+ mpOrigGraphic = pOrigGraphic;
+ maModifyHdl = rLink;
+ maOrigGraphicSizePixel = GetDrawingArea()->get_ref_device().LogicToPixel(mpOrigGraphic->GetPrefSize(),
+ mpOrigGraphic->GetPrefMapMode());
+ ScaleImageToFit();
+ }
+
+ void SetPreview(const Graphic& rGraphic);
+ const Graphic& GetScaledOriginal() const { return maScaledOrig; }
+ double GetScaleX() const { return mfScaleX; }
+ double GetScaleY() const { return mfScaleY; }
+ const Size& GetGraphicSizePixel() const { return maOrigGraphicSizePixel; }
+};
+
+class GraphicFilterDialog : public weld::GenericDialogController
+{
+private:
+
+ Timer maTimer;
+ Link<LinkParamNone*,void> maModifyHdl;
+ bool bIsBitmap;
+
+ DECL_LINK( ImplPreviewTimeoutHdl, Timer *, void );
+ DECL_LINK( ImplModifyHdl, LinkParamNone*, void);
+
+ CuiGraphicPreviewWindow maPreview;
+ std::unique_ptr<weld::CustomWeld> mxPreview;
+
+protected:
+ const Link<LinkParamNone*,void>& GetModifyHdl() const { return maModifyHdl; }
+ const Size& GetGraphicSizePixel() const { return maPreview.GetGraphicSizePixel(); }
+
+public:
+
+ GraphicFilterDialog(weld::Window* pParent, const OUString& rUIXMLDescription, const OString& rID, const Graphic& rGraphic);
+ virtual Graphic GetFilteredGraphic(const Graphic& rGraphic, double fScaleX, double fScaleY) = 0;
+};
+
+class GraphicFilterSmooth : public GraphicFilterDialog
+{
+private:
+ std::unique_ptr<weld::SpinButton> mxMtrRadius;
+ DECL_LINK(EditModifyHdl, weld::SpinButton&, void);
+
+public:
+
+ GraphicFilterSmooth(weld::Window* pParent, const Graphic& rGraphic, double nRadius);
+ virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ) override;
+};
+
+class GraphicFilterMosaic : public GraphicFilterDialog
+{
+private:
+ std::unique_ptr<weld::MetricSpinButton> mxMtrWidth;
+ std::unique_ptr<weld::MetricSpinButton> mxMtrHeight;
+ std::unique_ptr<weld::CheckButton> mxCbxEdges;
+ DECL_LINK(CheckBoxModifyHdl, weld::ToggleButton&, void);
+ DECL_LINK(EditModifyHdl, weld::MetricSpinButton&, void);
+public:
+
+ GraphicFilterMosaic(weld::Window* pParent, const Graphic& rGraphic,
+ sal_uInt16 nTileWidth, sal_uInt16 nTileHeight, bool bEnhanceEdges);
+
+ virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ) override;
+ bool IsEnhanceEdges() const { return mxCbxEdges->get_active(); }
+};
+
+class GraphicFilterSolarize : public GraphicFilterDialog
+{
+private:
+ std::unique_ptr<weld::MetricSpinButton> mxMtrThreshold;
+ std::unique_ptr<weld::CheckButton> mxCbxInvert;
+ DECL_LINK(CheckBoxModifyHdl, weld::ToggleButton&, void);
+ DECL_LINK(EditModifyHdl, weld::MetricSpinButton&, void);
+
+public:
+ GraphicFilterSolarize(weld::Window* pParent, const Graphic& rGraphic,
+ sal_uInt8 nGreyThreshold, bool bInvert);
+ virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ) override;
+ bool IsInvert() const { return mxCbxInvert->get_active(); }
+};
+
+class GraphicFilterSepia : public GraphicFilterDialog
+{
+private:
+ std::unique_ptr<weld::MetricSpinButton> mxMtrSepia;
+ DECL_LINK(EditModifyHdl, weld::MetricSpinButton&, void);
+public:
+ GraphicFilterSepia(weld::Window* pParent, const Graphic& rGraphic,
+ sal_uInt16 nSepiaPercent);
+ virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ) override;
+};
+
+class GraphicFilterPoster : public GraphicFilterDialog
+{
+private:
+ std::unique_ptr<weld::SpinButton> mxNumPoster;
+ DECL_LINK(EditModifyHdl, weld::SpinButton&, void);
+public:
+ GraphicFilterPoster(weld::Window* pParent, const Graphic& rGraphic,
+ sal_uInt16 nPosterColorCount);
+ virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ) override;
+};
+
+class EmbossControl : public SvxRectCtl
+{
+private:
+ Link<LinkParamNone*, void> maModifyHdl;
+ virtual bool MouseButtonDown( const MouseEvent& rEvt ) override;
+ virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
+public:
+ EmbossControl()
+ : SvxRectCtl(nullptr)
+ {
+ }
+
+ void SetModifyHdl( const Link<LinkParamNone*,void>& rHdl ) { maModifyHdl = rHdl; }
+};
+
+class GraphicFilterEmboss : public GraphicFilterDialog
+{
+private:
+ EmbossControl maCtlLight;
+ std::unique_ptr<weld::CustomWeld> mxCtlLight;
+public:
+ GraphicFilterEmboss(weld::Window* pParent, const Graphic& rGraphic,
+ RectPoint eLightSource);
+ virtual ~GraphicFilterEmboss() override;
+
+ virtual Graphic GetFilteredGraphic(const Graphic& rGraphic, double fScaleX, double fScaleY) override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/cuihyperdlg.hxx b/cui/source/inc/cuihyperdlg.hxx
new file mode 100644
index 000000000..702cf6396
--- /dev/null
+++ b/cui/source/inc/cuihyperdlg.hxx
@@ -0,0 +1,140 @@
+/* -*- 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 .
+ */
+
+#ifndef INCLUDED_CUI_SOURCE_INC_CUIHYPERDLG_HXX
+#define INCLUDED_CUI_SOURCE_INC_CUIHYPERDLG_HXX
+
+#include <sal/config.h>
+
+#include <memory>
+
+#include <svx/hlnkitem.hxx>
+#include <sfx2/childwin.hxx>
+#include <sfx2/ctrlitem.hxx>
+#include <sfx2/bindings.hxx>
+
+#include "iconcdlg.hxx"
+
+/*************************************************************************
+|*
+|* Hyperlink-Dialog
+|*
+\************************************************************************/
+
+class SvxHpLinkDlg;
+class SvxHlinkCtrl : public SfxControllerItem
+{
+private:
+ SvxHpLinkDlg* pParent;
+
+ SfxStatusForwarder aRdOnlyForwarder;
+
+public:
+ SvxHlinkCtrl( sal_uInt16 nId, SfxBindings & rBindings, SvxHpLinkDlg* pDlg);
+ virtual void dispose() override;
+
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
+ const SfxPoolItem* pState ) override;
+};
+
+
+/*************************************************************************
+|*
+|* Hyperlink-Dialog
+|*
+\************************************************************************/
+
+class SvxHpLinkDlg : public SfxModelessDialogController
+{
+private:
+ friend class IconChoicePage;
+
+ std::vector< std::unique_ptr<IconChoicePageData> > maPageList;
+
+ OString msCurrentPageId;
+
+ const SfxItemSet* pSet;
+ std::unique_ptr<SfxItemSet> pOutSet;
+ SfxItemSet* pExampleSet;
+ std::unique_ptr<sal_uInt16[]> pRanges;
+
+ SvxHlinkCtrl maCtrl; ///< Controller
+ std::unique_ptr<SfxItemSet> mpItemSet;
+
+ bool mbGrabFocus : 1;
+ bool mbIsHTMLDoc : 1;
+
+ std::unique_ptr<weld::Notebook> m_xIconCtrl;
+ std::unique_ptr<weld::Button> m_xOKBtn;
+ std::unique_ptr<weld::Button> m_xApplyBtn;
+ std::unique_ptr<weld::Button> m_xCancelBtn;
+ std::unique_ptr<weld::Button> m_xHelpBtn;
+ std::unique_ptr<weld::Button> m_xResetBtn;
+
+ DECL_LINK( ChosePageHdl_Impl, const OString&, void );
+
+ IconChoicePageData* GetPageData ( const OString& rId );
+
+ void SwitchPage( const OString& rId );
+
+ DECL_LINK( ResetHdl, weld::Button&, void) ;
+ DECL_LINK (ClickOkHdl_Impl, weld::Button&, void );
+ DECL_LINK (ClickApplyHdl_Impl, weld::Button&, void );
+
+ IconChoicePage* GetTabPage( const OString& rPageId )
+ { return GetPageData(rPageId)->xPage.get(); }
+
+ void ActivatePageImpl ();
+ void DeActivatePageImpl ();
+ void ResetPageImpl ();
+
+ virtual void Close() override;
+ void Apply();
+
+public:
+ SvxHpLinkDlg(SfxBindings* pBindings, SfxChildWindow* pChild, weld::Window* pParent);
+ virtual ~SvxHpLinkDlg () override;
+
+ // interface
+ void AddTabPage(const OString &rId, CreatePage pCreateFunc /* != NULL */);
+
+ void SetCurPageId( const OString& rId ) { msCurrentPageId = rId; SwitchPage(rId ); }
+ OString GetCurPageId() const { return msCurrentPageId; }
+ void ShowPage( const OString& rId );
+
+ /// gives via map converted local slots if applicable
+ const sal_uInt16* GetInputRanges( const SfxItemPool& );
+ void SetInputSet( const SfxItemSet* pInSet );
+
+ void Start();
+ bool QueryClose();
+
+ void PageCreated(const OString& rId, IconChoicePage& rPage);
+
+ void SetPage( SvxHyperlinkItem const * pItem );
+ void SetReadOnlyMode( bool bReadOnly );
+ bool IsHTMLDoc() const { return mbIsHTMLDoc; }
+
+ SfxDispatcher* GetDispatcher() const { return GetBindings().GetDispatcher(); }
+};
+
+
+#endif // INCLUDED_CUI_SOURCE_INC_CUIHYPERDLG_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/cuiimapwnd.hxx b/cui/source/inc/cuiimapwnd.hxx
new file mode 100644
index 000000000..b8fcf1053
--- /dev/null
+++ b/cui/source/inc/cuiimapwnd.hxx
@@ -0,0 +1,50 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_CUIIMAPWND_HXX
+#define INCLUDED_CUI_SOURCE_INC_CUIIMAPWND_HXX
+
+#include <vcl/weld.hxx>
+#include <sfx2/frame.hxx>
+
+class URLDlg : public weld::GenericDialogController
+{
+ std::unique_ptr<weld::Entry> m_xEdtURL;
+ std::unique_ptr<weld::ComboBox> m_xCbbTargets;
+ std::unique_ptr<weld::Entry> m_xEdtName;
+ std::unique_ptr<weld::Entry> m_xEdtAlternativeText;
+ std::unique_ptr<weld::TextView> m_xEdtDescription;
+
+public:
+
+ URLDlg(weld::Widget* pWindow,
+ const OUString& rURL, const OUString& rAlternativeText, const OUString& rDescription,
+ const OUString& rTarget, const OUString& rName,
+ TargetList& rTargetList);
+ virtual ~URLDlg() override;
+
+ OUString GetURL() const { return m_xEdtURL->get_text(); }
+ OUString GetAltText() const { return m_xEdtAlternativeText->get_text(); }
+ OUString GetDesc() const { return m_xEdtDescription->get_text(); }
+ OUString GetTarget() const { return m_xCbbTargets->get_active_text(); }
+ OUString GetName() const { return m_xEdtName->get_text(); }
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/cuioptgenrl.hxx b/cui/source/inc/cuioptgenrl.hxx
new file mode 100644
index 000000000..fa2310d17
--- /dev/null
+++ b/cui/source/inc/cuioptgenrl.hxx
@@ -0,0 +1,75 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_CUIOPTGENRL_HXX
+#define INCLUDED_CUI_SOURCE_INC_CUIOPTGENRL_HXX
+
+// include ---------------------------------------------------------------
+
+#include <sfx2/tabdlg.hxx>
+#include <vcl/weld.hxx>
+
+#include <vector>
+
+// class SvxGeneralTabPage -----------------------------------------------
+
+class SvxGeneralTabPage : public SfxTabPage
+{
+private:
+ // the "Use data for document properties" checkbox
+ std::unique_ptr<weld::CheckButton> m_xUseDataCB;
+ std::unique_ptr<weld::Widget> m_xCryptoFrame;
+ std::unique_ptr<weld::ComboBox> m_xSigningKeyLB;
+ std::unique_ptr<weld::ComboBox> m_xEncryptionKeyLB;
+ std::unique_ptr<weld::CheckButton> m_xEncryptToSelfCB;
+ // rows
+ struct Row;
+ std::vector<std::shared_ptr<Row> > vRows;
+ // fields
+ struct Field;
+ std::vector<std::shared_ptr<Field> > vFields;
+ // "name" fields
+ unsigned nNameRow;
+ unsigned nShortNameField;
+
+ DECL_LINK( ModifyHdl_Impl, weld::Entry&, void );
+
+ bool GetData_Impl();
+ void SetData_Impl();
+
+ void InitControls ();
+ void InitCryptography();
+ void SetLinks ();
+
+protected:
+ virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
+
+public:
+ SvxGeneralTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
+ virtual ~SvxGeneralTabPage() override;
+
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet );
+
+ virtual bool FillItemSet( SfxItemSet* rSet ) override;
+ virtual void Reset( const SfxItemSet* rSet ) override;
+};
+
+#endif // INCLUDED_CUI_SOURCE_INC_CUIOPTGENRL_HXX
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/cuisrchdlg.hxx b/cui/source/inc/cuisrchdlg.hxx
new file mode 100644
index 000000000..fc16a4a10
--- /dev/null
+++ b/cui/source/inc/cuisrchdlg.hxx
@@ -0,0 +1,44 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_CUISRCHDLG_HXX
+#define INCLUDED_CUI_SOURCE_INC_CUISRCHDLG_HXX
+
+#include <i18nutil/transliteration.hxx>
+#include <sfx2/basedlgs.hxx>
+
+class SvxJSearchOptionsPage;
+
+class SvxJSearchOptionsDialog : public SfxSingleTabDialogController
+{
+ SvxJSearchOptionsPage* m_pPage;
+
+ SvxJSearchOptionsDialog( const SvxJSearchOptionsDialog & ) = delete;
+ SvxJSearchOptionsDialog & operator == ( const SvxJSearchOptionsDialog & ) = delete;
+
+public:
+ SvxJSearchOptionsDialog(weld::Window *pParent,
+ const SfxItemSet& rOptionsSet, TransliterationFlags nInitialFlags);
+ virtual ~SvxJSearchOptionsDialog() override;
+
+ TransliterationFlags GetTransliterationFlags() const;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
new file mode 100644
index 000000000..849b009c3
--- /dev/null
+++ b/cui/source/inc/cuitabarea.hxx
@@ -0,0 +1,739 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_CUITABAREA_HXX
+#define INCLUDED_CUI_SOURCE_INC_CUITABAREA_HXX
+
+#include <svtools/valueset.hxx>
+#include <svx/dlgctrl.hxx>
+#include <svx/xflasit.hxx>
+#include <svx/tabarea.hxx>
+#include <svx/hexcolorcontrol.hxx>
+#include <svx/SvxColorValueSet.hxx>
+#include <svx/SvxPresetListBox.hxx>
+#include <svx/PaletteManager.hxx>
+#include <svx/svdview.hxx>
+
+#define NO_BUTTON_SELECTED -1
+
+class ColorListBox;
+class SdrModel;
+class SvxBitmapCtl;
+
+/************************************************************************/
+class ButtonBox
+{
+ private:
+ sal_Int32 mnCurrentButton;
+ std::vector<weld::ToggleButton*> maButtonList;
+ std::map<weld::ToggleButton*, sal_Int32 > maButtonToPos;
+ void SelectButtonImpl( sal_Int32 nPos )
+ {
+ if(mnCurrentButton != NO_BUTTON_SELECTED)
+ {
+ maButtonList[mnCurrentButton]->set_active(false);
+ }
+ mnCurrentButton = nPos;
+ maButtonList[mnCurrentButton]->set_active(true);
+ };
+ public:
+ ButtonBox()
+ {
+ mnCurrentButton = NO_BUTTON_SELECTED;
+ };
+ void AddButton(weld::ToggleButton* pButton)
+ {
+ maButtonList.push_back(pButton);
+ maButtonToPos.insert( std::make_pair(pButton, maButtonList.size() - 1) );
+ }
+ sal_Int32 GetCurrentButtonPos() const { return mnCurrentButton; }
+ sal_Int32 GetButtonPos(weld::ToggleButton* pButton)
+ {
+ std::map<weld::ToggleButton*, sal_Int32>::const_iterator aBtnPos = maButtonToPos.find(pButton);
+ if(aBtnPos != maButtonToPos.end())
+ return aBtnPos->second;
+ else
+ return -1;
+ }
+ void SelectButton(weld::ToggleButton* pButton)
+ {
+ sal_Int32 nPos = GetButtonPos(pButton);
+ if(nPos != -1)
+ SelectButtonImpl(nPos);
+ }
+};
+
+enum class PageType
+{
+ Area,
+ Gradient,
+ Hatch,
+ Bitmap,
+ Shadow,
+ Transparence,
+};
+
+class SvxAreaTabDialog final : public SfxTabDialogController
+{
+ SdrModel* mpDrawModel;
+
+ XColorListRef mpColorList;
+ XColorListRef mpNewColorList;
+ XGradientListRef mpGradientList;
+ XGradientListRef mpNewGradientList;
+ XHatchListRef mpHatchingList;
+ XHatchListRef mpNewHatchingList;
+ XBitmapListRef mpBitmapList;
+ XBitmapListRef mpNewBitmapList;
+ XPatternListRef mpPatternList;
+ XPatternListRef mpNewPatternList;
+
+ ChangeType mnColorListState;
+ ChangeType mnBitmapListState;
+ ChangeType mnPatternListState;
+ ChangeType mnGradientListState;
+ ChangeType mnHatchingListState;
+
+ virtual void PageCreated(const OString& rId, SfxTabPage &rPage) override;
+
+ virtual short Ok() override;
+ DECL_LINK(CancelHdlImpl, weld::Button&, void);
+ void SavePalettes();
+
+public:
+ SvxAreaTabDialog(weld::Window* pParent, const SfxItemSet* pAttr, SdrModel* pModel, bool bShadow);
+
+ void SetNewColorList( XColorListRef const & pColorList )
+ { mpNewColorList = pColorList; }
+ const XColorListRef& GetNewColorList() const { return mpNewColorList; }
+};
+
+/************************************************************************/
+
+class SvxTransparenceTabPage : public SfxTabPage
+{
+ static const sal_uInt16 pTransparenceRanges[];
+
+ const SfxItemSet& rOutAttrs;
+
+ PageType nPageType;
+ sal_uInt16 nDlgType;
+
+ bool bBitmap;
+
+ XFillAttrSetItem aXFillAttr;
+ SfxItemSet& rXFSet;
+
+ SvxXRectPreview m_aCtlBitmapPreview;
+ SvxXRectPreview m_aCtlXRectPreview;
+
+ // main selection
+ std::unique_ptr<weld::RadioButton> m_xRbtTransOff;
+ std::unique_ptr<weld::RadioButton> m_xRbtTransLinear;
+ std::unique_ptr<weld::RadioButton> m_xRbtTransGradient;
+
+ /// linear transparency
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrTransparent;
+
+ // gradient transparency
+ std::unique_ptr<weld::Widget> m_xGridGradient;
+ std::unique_ptr<weld::ComboBox> m_xLbTrgrGradientType;
+ std::unique_ptr<weld::Label> m_xFtTrgrCenterX;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrTrgrCenterX;
+ std::unique_ptr<weld::Label> m_xFtTrgrCenterY;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrTrgrCenterY;
+ std::unique_ptr<weld::Label> m_xFtTrgrAngle;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrTrgrAngle;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrTrgrBorder;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrTrgrStartValue;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrTrgrEndValue;
+ std::unique_ptr<weld::Widget> m_xCtlBitmapBorder;
+ std::unique_ptr<weld::Widget> m_xCtlXRectBorder;
+
+ // preview
+ std::unique_ptr<weld::CustomWeld> m_xCtlBitmapPreview;
+ std::unique_ptr<weld::CustomWeld> m_xCtlXRectPreview;
+
+ DECL_LINK(ClickTransOffHdl_Impl, weld::ToggleButton&, void);
+ DECL_LINK(ClickTransLinearHdl_Impl, weld::ToggleButton&, void);
+ DECL_LINK(ClickTransGradientHdl_Impl, weld::ToggleButton&, void );
+ DECL_LINK(ModifyTransparentHdl_Impl, weld::MetricSpinButton&, void);
+ DECL_LINK(ModifiedTrgrEditHdl_Impl, weld::MetricSpinButton&, void);
+ DECL_LINK(ModifiedTrgrListBoxHdl_Impl, weld::ComboBox&, void);
+ void ModifiedTrgrHdl_Impl(const weld::ComboBox*);
+
+ void ActivateLinear(bool bActivate);
+ void ActivateGradient(bool bActivate);
+ void SetControlState_Impl(css::awt::GradientStyle eXGS);
+
+ bool InitPreview ( const SfxItemSet& rSet );
+ void InvalidatePreview (bool bEnable = true );
+
+public:
+ SvxTransparenceTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
+ virtual ~SvxTransparenceTabPage() override;
+
+ static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet*);
+ static const sal_uInt16* GetRanges() { return pTransparenceRanges; }
+
+ virtual bool FillItemSet(SfxItemSet*) override;
+ virtual void Reset(const SfxItemSet*) override;
+ virtual void ChangesApplied() override;
+ virtual void ActivatePage(const SfxItemSet& rSet) override;
+ virtual DeactivateRC DeactivatePage(SfxItemSet* pSet) override;
+
+ void SetPageType(PageType nInType) { nPageType = nInType; }
+ void SetDlgType(sal_uInt16 nInType) { nDlgType = nInType; }
+ virtual void PageCreated(const SfxAllItemSet& aSet) override;
+};
+
+/************************************************************************/
+
+class SvxAreaTabPage : public SfxTabPage
+{
+ static const sal_uInt16 pAreaRanges[];
+private:
+ std::unique_ptr<SfxTabPage> m_xFillTabPage;
+ ButtonBox maBox;
+
+ XColorListRef m_pColorList;
+ XGradientListRef m_pGradientList;
+ XHatchListRef m_pHatchingList;
+ XBitmapListRef m_pBitmapList;
+ XPatternListRef m_pPatternList;
+
+ // Placeholders for pointer-based entries; these will be inited
+ // to point to these so that the page is usable without that
+ // SvxAreaTabDialog has to call the setter methods (e.g. SetColorChgd).
+ // Without that the pages used in SvxAreaTabDialog are not usable
+ ChangeType maFixed_ChangeType;
+
+ ChangeType* m_pnColorListState;
+ ChangeType* m_pnBitmapListState;
+ ChangeType* m_pnPatternListState;
+ ChangeType* m_pnGradientListState;
+ ChangeType* m_pnHatchingListState;
+
+ XFillAttrSetItem m_aXFillAttr;
+ SfxItemSet& m_rXFSet;
+
+ bool m_bBtnClicked = false;
+
+protected:
+ std::unique_ptr<weld::Container> m_xFillTab;
+ std::unique_ptr<weld::ToggleButton> m_xBtnNone;
+ std::unique_ptr<weld::ToggleButton> m_xBtnColor;
+ std::unique_ptr<weld::ToggleButton> m_xBtnGradient;
+ std::unique_ptr<weld::ToggleButton> m_xBtnHatch;
+ std::unique_ptr<weld::ToggleButton> m_xBtnBitmap;
+ std::unique_ptr<weld::ToggleButton> m_xBtnPattern;
+
+ void SetOptimalSize(weld::DialogController* pController);
+
+ void SelectFillType( weld::ToggleButton& rButton, const SfxItemSet* _pSet = nullptr );
+ SfxTabPage* GetFillTabPage() { return m_xFillTabPage.get(); }
+
+ bool IsBtnClicked() const { return m_bBtnClicked; }
+
+private:
+ DECL_LINK(SelectFillTypeHdl_Impl, weld::ToggleButton&, void);
+
+ template< typename TabPage >
+ bool FillItemSet_Impl( SfxItemSet* );
+ template< typename TabPage >
+ void Reset_Impl( const SfxItemSet* );
+ template< typename TabPage >
+ DeactivateRC DeactivatePage_Impl( SfxItemSet* pSet );
+
+public:
+ SvxAreaTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
+ virtual ~SvxAreaTabPage() override;
+
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
+ static const sal_uInt16* GetRanges() { return pAreaRanges; }
+
+ virtual bool FillItemSet( SfxItemSet* ) override;
+ virtual void Reset( const SfxItemSet * ) override;
+ virtual void ActivatePage( const SfxItemSet& rSet ) override;
+ virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
+
+ void SetColorList( XColorListRef const & pColorList ) { m_pColorList = pColorList; }
+ void SetGradientList( XGradientListRef const & pGrdLst)
+ { m_pGradientList = pGrdLst; }
+ void SetHatchingList( XHatchListRef const & pHtchLst)
+ { m_pHatchingList = pHtchLst; }
+ void SetBitmapList( XBitmapListRef const & pBmpLst) { m_pBitmapList = pBmpLst; }
+ void SetPatternList( XPatternListRef const &pPtrnLst ) { m_pPatternList = pPtrnLst; }
+ virtual void PageCreated(const SfxAllItemSet& aSet) override;
+ void CreatePage(sal_Int32 nId, SfxTabPage* pTab);
+ void SetColorChgd( ChangeType* pIn ) { m_pnColorListState = pIn; }
+ void SetGrdChgd( ChangeType* pIn ) { m_pnGradientListState = pIn; }
+ void SetHtchChgd( ChangeType* pIn ) { m_pnHatchingListState = pIn; }
+ void SetBmpChgd( ChangeType* pIn ) { m_pnBitmapListState = pIn; }
+ void SetPtrnChgd( ChangeType* pIn ) { m_pnPatternListState = pIn; }
+};
+
+
+class SvxShadowTabPage : public SvxTabPage
+{
+ static const sal_uInt16 pShadowRanges[];
+
+private:
+ const SfxItemSet& m_rOutAttrs;
+
+ XColorListRef m_pColorList;
+ ChangeType* m_pnColorListState;
+ PageType m_nPageType;
+ sal_uInt16 m_nDlgType;
+
+ XFillAttrSetItem m_aXFillAttr;
+ SfxItemSet& m_rXFSet;
+ MapUnit m_ePoolUnit;
+
+ SvxRectCtl m_aCtlPosition;
+ SvxXShadowPreview m_aCtlXRectPreview;
+ std::unique_ptr<weld::CheckButton> m_xTsbShowShadow;
+ std::unique_ptr<weld::Widget> m_xGridShadow;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrDistance;
+ std::unique_ptr<ColorListBox> m_xLbShadowColor;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrTransparent;
+ std::unique_ptr<weld::CustomWeld> m_xCtlPosition;
+ std::unique_ptr<weld::CustomWeld> m_xCtlXRectPreview;
+
+ DECL_LINK(ClickShadowHdl_Impl, weld::ToggleButton&, void);
+ DECL_LINK(ModifyShadowHdl_Impl, weld::MetricSpinButton&, void);
+ DECL_LINK(SelectShadowHdl_Impl, ColorListBox&, void);
+
+public:
+ SvxShadowTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
+ virtual ~SvxShadowTabPage() override;
+
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
+ static const sal_uInt16* GetRanges() { return pShadowRanges; }
+
+ virtual bool FillItemSet( SfxItemSet* ) override;
+ virtual void Reset( const SfxItemSet * ) override;
+ virtual void ActivatePage( const SfxItemSet& rSet ) override;
+ virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
+ virtual void PointChanged( weld::DrawingArea* pWindow, RectPoint eRP ) override;
+
+ void SetColorList( XColorListRef const & pColorList ) { m_pColorList = pColorList; }
+ void SetPageType( PageType nInType ) { m_nPageType = nInType; }
+ void SetDlgType( sal_uInt16 nInType ) { m_nDlgType = nInType; }
+ void SetColorChgd( ChangeType* pIn ) { m_pnColorListState = pIn; }
+ virtual void PageCreated(const SfxAllItemSet& aSet) override;
+};
+
+/************************************************************************/
+
+class SvxGradientTabPage : public SfxTabPage
+{
+private:
+ const SfxItemSet& m_rOutAttrs;
+
+ XColorListRef m_pColorList;
+ XGradientListRef m_pGradientList;
+
+ ChangeType* m_pnGradientListState;
+ ChangeType* m_pnColorListState;
+
+ XFillAttrSetItem m_aXFillAttr;
+ SfxItemSet& m_rXFSet;
+
+ SvxXRectPreview m_aCtlPreview;
+ std::unique_ptr<weld::ComboBox> m_xLbGradientType;
+ std::unique_ptr<weld::Label> m_xFtCenter;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrCenterX;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrCenterY;
+ std::unique_ptr<weld::Label> m_xFtAngle;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrAngle;
+ std::unique_ptr<weld::Scale> m_xSliderAngle;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrBorder;
+ std::unique_ptr<weld::Scale> m_xSliderBorder;
+ std::unique_ptr<ColorListBox> m_xLbColorFrom;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrColorFrom;
+ std::unique_ptr<ColorListBox> m_xLbColorTo;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrColorTo;
+ std::unique_ptr<SvxPresetListBox> m_xGradientLB;
+ std::unique_ptr<weld::SpinButton> m_xMtrIncrement;
+ std::unique_ptr<weld::CheckButton> m_xCbIncrement;
+ std::unique_ptr<weld::Button> m_xBtnAdd;
+ std::unique_ptr<weld::Button> m_xBtnModify;
+ std::unique_ptr<weld::CustomWeld> m_xCtlPreview;
+ std::unique_ptr<weld::CustomWeld> m_xGradientLBWin;
+
+ DECL_LINK( ClickAddHdl_Impl, weld::Button&, void );
+ DECL_LINK( ClickModifyHdl_Impl, weld::Button&, void );
+ DECL_LINK( ChangeGradientHdl, ValueSet*, void );
+ void ChangeGradientHdl_Impl();
+ DECL_LINK( ClickRenameHdl_Impl, SvxPresetListBox*, void );
+ DECL_LINK( ClickDeleteHdl_Impl, SvxPresetListBox*, void );
+ DECL_LINK( ModifiedEditHdl_Impl, weld::SpinButton&, void );
+ DECL_LINK( ModifiedMetricHdl_Impl, weld::MetricSpinButton&, void );
+ DECL_LINK( ModifiedColorListBoxHdl_Impl, ColorListBox&, void );
+ DECL_LINK( ModifiedListBoxHdl_Impl, weld::ComboBox&, void );
+ DECL_LINK( ChangeAutoStepHdl_Impl, weld::ToggleButton&, void );
+ DECL_LINK( ModifiedSliderHdl_Impl, weld::Scale&, void );
+ void ModifiedHdl_Impl(void const *);
+
+ void SetControlState_Impl( css::awt::GradientStyle eXGS );
+ sal_Int32 SearchGradientList(const OUString& rGradientName);
+
+public:
+ SvxGradientTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
+ virtual ~SvxGradientTabPage() override;
+
+ void Construct();
+
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
+ virtual bool FillItemSet( SfxItemSet* ) override;
+ virtual void Reset( const SfxItemSet * ) override;
+
+ virtual void ActivatePage( const SfxItemSet& rSet ) override;
+ virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
+
+ void SetColorList( XColorListRef const & pColorList ) { m_pColorList = pColorList; }
+ void SetGradientList( XGradientListRef const & pGrdLst)
+ { m_pGradientList = pGrdLst; }
+ void SetGrdChgd( ChangeType* pIn ) { m_pnGradientListState = pIn; }
+ void SetColorChgd( ChangeType* pIn ) { m_pnColorListState = pIn; }
+};
+
+/************************************************************************/
+
+class SvxHatchTabPage : public SfxTabPage
+{
+private:
+ const SfxItemSet& m_rOutAttrs;
+
+ XColorListRef m_pColorList;
+ XHatchListRef m_pHatchingList;
+
+ ChangeType* m_pnHatchingListState;
+ ChangeType* m_pnColorListState;
+
+ XFillAttrSetItem m_aXFillAttr;
+ SfxItemSet& m_rXFSet;
+
+ MapUnit m_ePoolUnit;
+
+ SvxXRectPreview m_aCtlPreview;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrDistance;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrAngle;
+ std::unique_ptr<weld::Scale> m_xSliderAngle;
+ std::unique_ptr<weld::ComboBox> m_xLbLineType;
+ std::unique_ptr<ColorListBox> m_xLbLineColor;
+ std::unique_ptr<weld::CheckButton> m_xCbBackgroundColor;
+ std::unique_ptr<ColorListBox> m_xLbBackgroundColor;
+ std::unique_ptr<SvxPresetListBox> m_xHatchLB;
+ std::unique_ptr<weld::Button> m_xBtnAdd;
+ std::unique_ptr<weld::Button> m_xBtnModify;
+ std::unique_ptr<weld::CustomWeld> m_xHatchLBWin;
+ std::unique_ptr<weld::CustomWeld> m_xCtlPreview;
+
+ DECL_LINK(ChangeHatchHdl, ValueSet*, void);
+ void ChangeHatchHdl_Impl();
+ DECL_LINK( ModifiedEditHdl_Impl, weld::MetricSpinButton&, void );
+ DECL_LINK( ModifiedListBoxHdl_Impl, weld::ComboBox&, void );
+ DECL_LINK( ModifiedColorListBoxHdl_Impl, ColorListBox&, void );
+ DECL_LINK( ToggleHatchBackgroundColor_Impl, weld::ToggleButton&, void );
+ DECL_LINK( ModifiedBackgroundHdl_Impl, ColorListBox&, void );
+ DECL_LINK( ModifiedSliderHdl_Impl, weld::Scale&, void );
+ void ModifiedHdl_Impl(void const *);
+ DECL_LINK( ClickAddHdl_Impl, weld::Button&, void );
+ DECL_LINK( ClickModifyHdl_Impl, weld::Button&, void );
+ DECL_LINK( ClickRenameHdl_Impl, SvxPresetListBox*, void );
+ DECL_LINK( ClickDeleteHdl_Impl, SvxPresetListBox*, void );
+
+ sal_Int32 SearchHatchList(const OUString& rHatchName);
+
+public:
+ SvxHatchTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
+ virtual ~SvxHatchTabPage() override;
+
+ void Construct();
+
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
+ virtual bool FillItemSet( SfxItemSet* ) override;
+ virtual void Reset( const SfxItemSet * ) override;
+
+ virtual void ActivatePage( const SfxItemSet& rSet ) override;
+ virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
+
+ void SetColorList( XColorListRef const & pColorList ) { m_pColorList = pColorList; }
+ void SetHatchingList( XHatchListRef const & pHtchLst)
+ { m_pHatchingList = pHtchLst; }
+
+ void SetHtchChgd( ChangeType* pIn ) { m_pnHatchingListState = pIn; }
+ void SetColorChgd( ChangeType* pIn ) { m_pnColorListState = pIn; }
+};
+
+/************************************************************************/
+
+class SvxBitmapTabPage : public SfxTabPage
+{
+ static const sal_uInt16 pBitmapRanges[];
+private:
+
+ const SfxItemSet& m_rOutAttrs;
+
+ XBitmapListRef m_pBitmapList;
+ ChangeType* m_pnBitmapListState;
+
+ double m_fObjectWidth;
+ double m_fObjectHeight;
+ bool m_bLogicalSize;
+
+ XFillAttrSetItem m_aXFillAttr;
+ SfxItemSet& m_rXFSet;
+ const SdrView* mpView;
+ MapUnit mePoolUnit;
+ FieldUnit meFieldUnit;
+ Size rBitmapSize;
+ Size rFilledSize;
+ Size rZoomedSize;
+
+ SvxXRectPreview m_aCtlBitmapPreview;
+ std::unique_ptr<SvxPresetListBox> m_xBitmapLB;
+ std::unique_ptr<weld::ComboBox> m_xBitmapStyleLB;
+ std::unique_ptr<weld::Container> m_xSizeBox;
+ std::unique_ptr<weld::CheckButton> m_xTsbScale;
+ std::unique_ptr<weld::MetricSpinButton> m_xBitmapWidth;
+ std::unique_ptr<weld::MetricSpinButton> m_xBitmapHeight;
+ std::unique_ptr<weld::Container> m_xPositionBox;
+ std::unique_ptr<weld::ComboBox> m_xPositionLB;
+ std::unique_ptr<weld::Container> m_xPositionOffBox;
+ std::unique_ptr<weld::MetricSpinButton> m_xPositionOffX;
+ std::unique_ptr<weld::MetricSpinButton> m_xPositionOffY;
+ std::unique_ptr<weld::Container> m_xTileOffBox;
+ std::unique_ptr<weld::ComboBox> m_xTileOffLB;
+ std::unique_ptr<weld::MetricSpinButton> m_xTileOffset;
+ std::unique_ptr<weld::Button> m_xBtnImport;
+ std::unique_ptr<weld::CustomWeld> m_xCtlBitmapPreview;
+ std::unique_ptr<weld::CustomWeld> m_xBitmapLBWin;
+
+ DECL_LINK( ModifyBitmapHdl, ValueSet*, void );
+ DECL_LINK( ClickScaleHdl, weld::Button&, void );
+ DECL_LINK( ModifyBitmapStyleHdl, weld::ComboBox&, void );
+ DECL_LINK( ModifyBitmapSizeHdl, weld::MetricSpinButton&, void );
+ DECL_LINK( ModifyBitmapPositionHdl, weld::ComboBox&, void );
+ DECL_LINK( ModifyPositionOffsetHdl, weld::MetricSpinButton&, void );
+ DECL_LINK( ModifyTileOffsetHdl, weld::MetricSpinButton&, void );
+ DECL_LINK( ClickRenameHdl, SvxPresetListBox*, void );
+ DECL_LINK( ClickDeleteHdl, SvxPresetListBox*, void );
+ DECL_LINK( ClickImportHdl, weld::Button&, void );
+ void ClickBitmapHdl_Impl();
+ void CalculateBitmapPresetSize();
+ sal_Int32 SearchBitmapList(const OUString& rBitmapName);
+ sal_Int32 SearchBitmapList(const GraphicObject& rGraphicObject);
+
+public:
+ SvxBitmapTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
+ virtual ~SvxBitmapTabPage() override;
+
+ void Construct();
+
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
+
+ virtual bool FillItemSet( SfxItemSet* ) override;
+ virtual void Reset( const SfxItemSet * ) override;
+ virtual void ActivatePage( const SfxItemSet& rSet ) override;
+ virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
+
+ void SetBitmapList( const XBitmapListRef& pBmpLst) { m_pBitmapList = pBmpLst; }
+ void SetBmpChgd( ChangeType* pIn ) { m_pnBitmapListState = pIn; }
+};
+
+/************************************************************************/
+
+class SvxPatternTabPage : public SvxTabPage
+{
+private:
+ const SfxItemSet& m_rOutAttrs;
+
+ XColorListRef m_pColorList;
+ XPatternListRef m_pPatternList;
+
+ ChangeType* m_pnPatternListState;
+ ChangeType* m_pnColorListState;
+
+ XFillAttrSetItem m_aXFillAttr;
+ SfxItemSet& m_rXFSet;
+
+ SvxXRectPreview m_aCtlPreview;
+ std::unique_ptr<SvxPixelCtl> m_xCtlPixel;
+ std::unique_ptr<ColorListBox> m_xLbColor;
+ std::unique_ptr<ColorListBox> m_xLbBackgroundColor;
+ std::unique_ptr<SvxPresetListBox> m_xPatternLB;
+ std::unique_ptr<weld::Button> m_xBtnAdd;
+ std::unique_ptr<weld::Button> m_xBtnModify;
+ std::unique_ptr<weld::CustomWeld> m_xCtlPixelWin;
+ std::unique_ptr<weld::CustomWeld> m_xCtlPreview;
+ std::unique_ptr<weld::CustomWeld> m_xPatternLBWin;
+ std::unique_ptr<SvxBitmapCtl> m_xBitmapCtl;
+
+ DECL_LINK( ClickAddHdl_Impl, weld::Button&, void );
+ DECL_LINK( ClickModifyHdl_Impl, weld::Button&, void );
+ DECL_LINK( ChangePatternHdl_Impl, ValueSet*, void );
+ DECL_LINK( ChangeColorHdl_Impl, ColorListBox&, void );
+ DECL_LINK( ClickRenameHdl_Impl, SvxPresetListBox*, void );
+ DECL_LINK( ClickDeleteHdl_Impl, SvxPresetListBox*, void );
+
+ sal_Int32 SearchPatternList(const OUString& rPatternName);
+
+public:
+ SvxPatternTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
+ virtual ~SvxPatternTabPage() override;
+
+ void Construct();
+
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
+ virtual bool FillItemSet( SfxItemSet* ) override;
+ virtual void Reset( const SfxItemSet * ) override;
+
+ virtual void ActivatePage( const SfxItemSet& rSet ) override;
+ virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
+
+ virtual void PointChanged( weld::DrawingArea*, RectPoint eRP ) override;
+
+ void SetColorList( XColorListRef const & pColorList ) { m_pColorList = pColorList; }
+ void SetPatternList( XPatternListRef const & pPatternList) { m_pPatternList = pPatternList; }
+ void SetPtrnChgd( ChangeType* pIn ) { m_pnPatternListState = pIn; }
+ void SetColorChgd( ChangeType* pIn ) { m_pnColorListState = pIn; }
+ void ChangeColor_Impl();
+};
+
+/************************************************************************/
+
+enum class ColorModel
+{
+ RGB,
+ CMYK
+};
+
+class SvxColorTabPage : public SfxTabPage
+{
+private:
+ const SfxItemSet& rOutAttrs;
+
+ XColorListRef pColorList;
+
+ ChangeType* pnColorListState;
+
+ XFillAttrSetItem aXFillAttr;
+ SfxItemSet& rXFSet;
+
+ ColorModel eCM;
+
+ Color aPreviousColor;
+ Color aCurrentColor;
+
+ css::uno::Reference< css::uno::XComponentContext > m_context;
+
+ PaletteManager maPaletteManager;
+ SvxXRectPreview m_aCtlPreviewOld;
+ SvxXRectPreview m_aCtlPreviewNew;
+ std::unique_ptr<SvxColorValueSet> m_xValSetColorList;
+ std::unique_ptr<SvxColorValueSet> m_xValSetRecentList;
+ std::unique_ptr<weld::ComboBox> m_xSelectPalette;
+ std::unique_ptr<weld::RadioButton> m_xRbRGB;
+ std::unique_ptr<weld::RadioButton> m_xRbCMYK;
+ std::unique_ptr<weld::Widget> m_xRGBcustom;
+ std::unique_ptr<weld::Widget> m_xRGBpreset;
+ std::unique_ptr<weld::Entry> m_xRpreset;
+ std::unique_ptr<weld::Entry> m_xGpreset;
+ std::unique_ptr<weld::Entry> m_xBpreset;
+ std::unique_ptr<weld::SpinButton> m_xRcustom;
+ std::unique_ptr<weld::SpinButton> m_xGcustom;
+ std::unique_ptr<weld::SpinButton> m_xBcustom;
+ std::unique_ptr<weld::HexColorControl> m_xHexpreset;
+ std::unique_ptr<weld::HexColorControl> m_xHexcustom;
+ std::unique_ptr<weld::Widget> m_xCMYKcustom;
+ std::unique_ptr<weld::Widget> m_xCMYKpreset;
+ std::unique_ptr<weld::Entry> m_xCpreset;
+ std::unique_ptr<weld::Entry> m_xYpreset;
+ std::unique_ptr<weld::Entry> m_xMpreset;
+ std::unique_ptr<weld::Entry> m_xKpreset;
+ std::unique_ptr<weld::MetricSpinButton> m_xCcustom;
+ std::unique_ptr<weld::MetricSpinButton> m_xYcustom;
+ std::unique_ptr<weld::MetricSpinButton> m_xMcustom;
+ std::unique_ptr<weld::MetricSpinButton> m_xKcustom;
+ std::unique_ptr<weld::Button> m_xBtnAdd;
+ std::unique_ptr<weld::Button> m_xBtnDelete;
+ std::unique_ptr<weld::Button> m_xBtnWorkOn;
+ std::unique_ptr<weld::CustomWeld> m_xCtlPreviewOld;
+ std::unique_ptr<weld::CustomWeld> m_xCtlPreviewNew;
+ std::unique_ptr<weld::CustomWeld> m_xValSetColorListWin;
+ std::unique_ptr<weld::CustomWeld> m_xValSetRecentListWin;
+
+ static void ConvertColorValues (Color& rColor, ColorModel eModell);
+ static void RgbToCmyk_Impl( Color& rColor, sal_uInt16& rK );
+ static void CmykToRgb_Impl( Color& rColor, const sal_uInt16 nKey );
+ sal_uInt16 ColorToPercent_Impl( sal_uInt16 nColor );
+ sal_uInt16 PercentToColor_Impl( sal_uInt16 nPercent );
+
+ void ImpColorCountChanged();
+ void FillPaletteLB();
+
+ DECL_LINK(ClickAddHdl_Impl, weld::Button&, void);
+ DECL_LINK(ClickWorkOnHdl_Impl, weld::Button&, void);
+ DECL_LINK(ClickDeleteHdl_Impl, weld::Button&, void);
+
+ DECL_LINK(SelectPaletteLBHdl, weld::ComboBox&, void);
+ DECL_LINK( SelectValSetHdl_Impl, ValueSet*, void );
+ DECL_LINK( SelectColorModeHdl_Impl, weld::ToggleButton&, void );
+ void ChangeColor(const Color &rNewColor, bool bUpdatePreset = true);
+ void SetColorModel(ColorModel eModel);
+ void ChangeColorModel();
+ void UpdateColorValues( bool bUpdatePreset = true );
+ DECL_LINK(SpinValueHdl_Impl, weld::SpinButton&, void);
+ DECL_LINK(MetricSpinValueHdl_Impl, weld::MetricSpinButton&, void);
+ DECL_LINK(ModifiedHdl_Impl, weld::Entry&, void);
+
+ void UpdateModified();
+
+ static sal_Int32 FindInCustomColors( OUString const & aColorName );
+ sal_Int32 FindInPalette( const Color& rColor );
+
+public:
+ SvxColorTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
+ virtual ~SvxColorTabPage() override;
+
+ void Construct();
+
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
+ virtual bool FillItemSet( SfxItemSet* ) override;
+ virtual void Reset( const SfxItemSet * ) override;
+
+ virtual void ActivatePage( const SfxItemSet& rSet ) override;
+ virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
+
+ void SetPropertyList( XPropertyListType t, const XPropertyListRef &xRef );
+ void SetColorList( const XColorListRef& pColList );
+
+
+ void SetColorChgd( ChangeType* pIn ) { pnColorListState = pIn; }
+
+ void SetCtlPreviewOld( const SfxItemSet& rAttrs ) { m_aCtlPreviewOld.SetAttributes( rAttrs ); }
+
+ virtual void FillUserData() override;
+};
+
+#endif // INCLUDED_CUI_SOURCE_INC_CUITABAREA_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/cuitabline.hxx b/cui/source/inc/cuitabline.hxx
new file mode 100644
index 000000000..87ae008da
--- /dev/null
+++ b/cui/source/inc/cuitabline.hxx
@@ -0,0 +1,378 @@
+/* -*- 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 .
+ */
+
+#ifndef INCLUDED_CUI_SOURCE_INC_CUITABLINE_HXX
+#define INCLUDED_CUI_SOURCE_INC_CUITABLINE_HXX
+
+#include <vector>
+#include <editeng/brushitem.hxx>
+#include <sfx2/tabdlg.hxx>
+#include <svx/svdpage.hxx>
+#include <svx/tabarea.hxx>
+#include <svx/xlnasit.hxx>
+#include <svx/xtable.hxx>
+#include <svx/dlgctrl.hxx>
+#include <vcl/customweld.hxx>
+
+enum class PageType;
+class ColorListBox;
+
+class SvxLineTabDialog final : public SfxTabDialogController
+{
+ SdrModel* pDrawModel;
+ const SdrObject* pObj;
+
+ XColorListRef pColorList;
+ XColorListRef mpNewColorList;
+ XDashListRef pDashList;
+ XDashListRef pNewDashList;
+ XLineEndListRef pLineEndList;
+ XLineEndListRef pNewLineEndList;
+ bool bObjSelected;
+
+ ChangeType nLineEndListState;
+ ChangeType nDashListState;
+ ChangeType mnColorListState;
+
+ PageType nPageType;
+ sal_Int32 nPosDashLb;
+ sal_Int32 nPosLineEndLb;
+
+ virtual void PageCreated(const OString& rId, SfxTabPage &rPage) override;
+
+ virtual short Ok() override;
+ DECL_LINK(CancelHdlImpl, weld::Button&, void);
+ void SavePalettes();
+
+public:
+ SvxLineTabDialog(weld::Window* pParent, const SfxItemSet* pAttr,
+ SdrModel* pModel, const SdrObject* pObj,
+ bool bHasObj);
+
+ void SetNewDashList( XDashListRef const & pInLst)
+ { pNewDashList = pInLst; }
+ const XDashListRef& GetNewDashList() const { return pNewDashList; }
+
+ void SetNewLineEndList( XLineEndListRef const & pInLst)
+ { pNewLineEndList = pInLst; }
+ const XLineEndListRef& GetNewLineEndList() const { return pNewLineEndList; }
+
+ void SetNewColorList( XColorListRef const & pColTab ) { mpNewColorList = pColTab; }
+ const XColorListRef& GetNewColorList() const { return mpNewColorList; }
+};
+
+/*************************************************************************/
+
+struct SvxBmpItemInfo
+{
+ std::unique_ptr<SvxBrushItem> pBrushItem;
+ OUString sItemId;
+};
+
+class SvxLineTabPage : public SfxTabPage
+{
+ static const sal_uInt16 pLineRanges[];
+private:
+ //#58425# symbols on a line (e. g. StarChart) ->
+ /** a list of symbols to be shown in menu. Symbol at position SID_ATTR_SYMBOLTYPE is to be shown in preview.
+ The list position is to be used cyclic. */
+ SdrObjList* m_pSymbolList;
+ bool m_bNewSize;
+ /// a graphic to be displayed in the preview in case that an automatic symbol is chosen
+ Graphic m_aAutoSymbolGraphic;
+ long m_nSymbolType;
+ /// attributes for the shown symbols; only necessary if not equal to line properties
+ SfxItemSet* m_pSymbolAttr;
+
+ std::vector<OUString> m_aGrfNames;
+ std::vector< std::unique_ptr<SvxBmpItemInfo> >
+ m_aGalleryBrushItems;
+ std::vector< std::unique_ptr<SvxBmpItemInfo> >
+ m_aSymbolBrushItems;
+ bool m_bLastWidthModified;
+ Size m_aSymbolLastSize;
+ Graphic m_aSymbolGraphic;
+ Size m_aSymbolSize;
+ bool m_bSymbols;
+
+ const SfxItemSet& m_rOutAttrs;
+ bool m_bObjSelected;
+
+ XLineAttrSetItem m_aXLineAttr;
+ SfxItemSet& m_rXLSet;
+
+ XDashListRef m_pDashList;
+ XLineEndListRef m_pLineEndList;
+
+ ChangeType* m_pnLineEndListState;
+ ChangeType* m_pnDashListState;
+ ChangeType* m_pnColorListState;
+ PageType m_nPageType;
+ sal_uInt16 m_nDlgType;
+ sal_Int32* m_pPosDashLb;
+ sal_Int32* m_pPosLineEndLb;
+
+ MapUnit m_ePoolUnit;
+
+ sal_Int32 m_nActLineWidth;
+
+ SvxXLinePreview m_aCtlPreview;
+ std::unique_ptr<weld::Widget> m_xBoxColor;
+ std::unique_ptr<SvxLineLB> m_xLbLineStyle;
+ std::unique_ptr<ColorListBox> m_xLbColor;
+ std::unique_ptr<weld::Widget> m_xBoxWidth;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrLineWidth;
+ std::unique_ptr<weld::Widget> m_xBoxTransparency;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrTransparent;
+ std::unique_ptr<weld::Widget> m_xFlLineEnds;
+ std::unique_ptr<weld::Widget> m_xBoxArrowStyles;
+ std::unique_ptr<SvxLineEndLB> m_xLbStartStyle;
+ std::unique_ptr<weld::Widget> m_xBoxStart;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrStartWidth;
+ std::unique_ptr<weld::CheckButton> m_xTsbCenterStart;
+ std::unique_ptr<weld::Widget> m_xBoxEnd;
+ std::unique_ptr<SvxLineEndLB> m_xLbEndStyle;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrEndWidth;
+ std::unique_ptr<weld::CheckButton> m_xTsbCenterEnd;
+ std::unique_ptr<weld::CheckButton> m_xCbxSynchronize;
+ std::unique_ptr<weld::CustomWeld> m_xCtlPreview;
+
+ std::unique_ptr<weld::Widget> m_xFLEdgeStyle;
+ std::unique_ptr<weld::Widget> m_xGridEdgeCaps;
+ std::unique_ptr<weld::ComboBox> m_xLBEdgeStyle;
+
+ // LineCaps
+ std::unique_ptr<weld::ComboBox> m_xLBCapStyle;
+
+ std::unique_ptr<weld::Widget> m_xFlSymbol;
+ std::unique_ptr<weld::Widget> m_xGridIconSize;
+ std::unique_ptr<weld::MenuButton> m_xSymbolMB;
+ std::unique_ptr<weld::Menu> m_xSymbolsMenu;
+ std::unique_ptr<weld::Menu> m_xGalleryMenu;
+ std::unique_ptr<weld::MetricSpinButton> m_xSymbolWidthMF;
+ std::unique_ptr<weld::MetricSpinButton> m_xSymbolHeightMF;
+ std::unique_ptr<weld::CheckButton> m_xSymbolRatioCB;
+
+ // handler for gallery popup menu button + size
+ DECL_LINK(GraphicHdl_Impl, const OString&, void);
+ DECL_LINK(SizeHdl_Impl, weld::MetricSpinButton&, void);
+ DECL_LINK(MenuCreateHdl_Impl, weld::ToggleButton&, void);
+ DECL_LINK(RatioHdl_Impl, weld::ToggleButton&, void);
+
+ DECL_LINK(ClickInvisibleHdl_Impl, weld::ComboBox&, void);
+ void ClickInvisibleHdl_Impl();
+ DECL_LINK(ChangeStartClickHdl_Impl, weld::Button&, void);
+ DECL_LINK(ChangeStartListBoxHdl_Impl, weld::ComboBox&, void);
+ DECL_LINK(ChangeStartModifyHdl_Impl, weld::MetricSpinButton&, void);
+ DECL_LINK(ChangeEndListBoxHdl_Impl, weld::ComboBox&, void);
+ DECL_LINK(ChangeEndModifyHdl_Impl, weld::MetricSpinButton&, void);
+ DECL_LINK(ChangeEndClickHdl_Impl, weld::Button&, void);
+ DECL_LINK(ChangePreviewListBoxHdl_Impl, ColorListBox&, void);
+ DECL_LINK(ChangePreviewModifyHdl_Impl, weld::MetricSpinButton&, void);
+ void ChangePreviewHdl_Impl(const weld::MetricSpinButton*);
+ DECL_LINK(ChangeTransparentHdl_Impl, weld::MetricSpinButton&, void);
+
+ DECL_LINK(ChangeEdgeStyleHdl_Impl, weld::ComboBox&, void);
+
+ // LineCaps
+ DECL_LINK(ChangeCapStyleHdl_Impl, weld::ComboBox&, void);
+
+ void FillXLSet_Impl();
+
+ void FillListboxes();
+public:
+
+ void ShowSymbolControls(bool bOn);
+
+ SvxLineTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
+ virtual ~SvxLineTabPage() override;
+
+ void Construct();
+
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
+ static const sal_uInt16* GetRanges() { return pLineRanges; }
+
+ virtual bool FillItemSet( SfxItemSet* ) override;
+ virtual void Reset( const SfxItemSet* ) override;
+
+ virtual void ActivatePage( const SfxItemSet& rSet ) override;
+ virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
+
+ virtual void FillUserData() override;
+
+ void SetDashList( XDashListRef const & pDshLst ) { m_pDashList = pDshLst; }
+ void SetLineEndList( XLineEndListRef const & pLneEndLst) { m_pLineEndList = pLneEndLst; }
+ void SetObjSelected( bool bHasObj ) { m_bObjSelected = bHasObj; }
+
+ void SetPageType( PageType nInType ) { m_nPageType = nInType; }
+ void SetDlgType( sal_uInt16 nInType ) { m_nDlgType = nInType; }
+ void SetPosDashLb( sal_Int32* pInPos ) { m_pPosDashLb = pInPos; }
+ void SetPosLineEndLb( sal_Int32* pInPos ) { m_pPosLineEndLb = pInPos; }
+
+ void SetLineEndChgd( ChangeType* pIn ) { m_pnLineEndListState = pIn; }
+ void SetDashChgd( ChangeType* pIn ) { m_pnDashListState = pIn; }
+ void SetColorChgd( ChangeType* pIn ) { m_pnColorListState = pIn; }
+
+ virtual void PageCreated(const SfxAllItemSet& aSet) override;
+};
+
+/*************************************************************************/
+
+class SvxLineDefTabPage : public SfxTabPage
+{
+private:
+ const SfxItemSet& rOutAttrs;
+ XDash aDash;
+
+ XLineAttrSetItem aXLineAttr;
+ SfxItemSet& rXLSet;
+
+ XDashListRef pDashList;
+
+ ChangeType* pnDashListState;
+ PageType* pPageType;
+ sal_uInt16 nDlgType;
+ sal_Int32* pPosDashLb;
+
+ MapUnit ePoolUnit;
+ FieldUnit eFUnit;
+
+ SvxXLinePreview m_aCtlPreview;
+ std::unique_ptr<SvxLineLB> m_xLbLineStyles;
+ std::unique_ptr<weld::ComboBox> m_xLbType1;
+ std::unique_ptr<weld::ComboBox> m_xLbType2;
+ std::unique_ptr<weld::SpinButton> m_xNumFldNumber1;
+ std::unique_ptr<weld::SpinButton> m_xNumFldNumber2;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrLength1;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrLength2;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrDistance;
+ std::unique_ptr<weld::CheckButton> m_xCbxSynchronize;
+ std::unique_ptr<weld::Button> m_xBtnAdd;
+ std::unique_ptr<weld::Button> m_xBtnModify;
+ std::unique_ptr<weld::Button> m_xBtnDelete;
+ std::unique_ptr<weld::Button> m_xBtnLoad;
+ std::unique_ptr<weld::Button> m_xBtnSave;
+ std::unique_ptr<weld::CustomWeld> m_xCtlPreview;
+
+ void FillDash_Impl();
+ void FillDialog_Impl();
+
+ DECL_LINK(ClickAddHdl_Impl, weld::Button&, void);
+ DECL_LINK(ClickModifyHdl_Impl, weld::Button&, void);
+ DECL_LINK(ClickDeleteHdl_Impl, weld::Button&, void);
+ DECL_LINK(SelectLinestyleListBoxHdl_Impl, weld::ComboBox&, void);
+ void SelectLinestyleHdl_Impl(const weld::ComboBox*);
+ DECL_LINK(ChangePreviewHdl_Impl, weld::MetricSpinButton&, void);
+ DECL_LINK(ChangeNumber1Hdl_Impl, weld::SpinButton&, void);
+ DECL_LINK(ChangeNumber2Hdl_Impl, weld::SpinButton&, void);
+ DECL_LINK(ClickLoadHdl_Impl, weld::Button&, void);
+ DECL_LINK(ClickSaveHdl_Impl, weld::Button&, void);
+ DECL_LINK(ChangeMetricHdl_Impl, weld::ToggleButton&, void);
+ DECL_LINK(SelectTypeListBoxHdl_Impl, weld::ComboBox&, void);
+ void SelectTypeHdl_Impl(const weld::ComboBox*);
+ void ChangeMetricHdl_Impl(const weld::ToggleButton*);
+
+ void CheckChanges_Impl();
+
+public:
+ SvxLineDefTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
+ virtual ~SvxLineDefTabPage() override;
+
+ void Construct();
+
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
+ virtual bool FillItemSet( SfxItemSet* ) override;
+ virtual void Reset( const SfxItemSet * ) override;
+
+ virtual void ActivatePage( const SfxItemSet& rSet ) override;
+ virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
+
+ void SetDashList( XDashListRef const & pDshLst ) { pDashList = pDshLst; }
+
+ void SetPageType( PageType* pInType ) { pPageType = pInType; }
+ void SetDlgType( sal_uInt16 nInType ) { nDlgType = nInType; }
+ void SetPosDashLb( sal_Int32* pInPos ) { pPosDashLb = pInPos; }
+
+ void SetDashChgd( ChangeType* pIn ) { pnDashListState = pIn; }
+};
+
+/*************************************************************************/
+
+class SvxLineEndDefTabPage : public SfxTabPage
+{
+private:
+ const SfxItemSet& rOutAttrs;
+ const SdrObject* pPolyObj;
+
+ XLineAttrSetItem aXLineAttr;
+ SfxItemSet& rXLSet;
+
+ XLineEndListRef pLineEndList;
+
+ ChangeType* pnLineEndListState;
+ PageType* pPageType;
+ sal_uInt16 nDlgType;
+ sal_Int32* pPosLineEndLb;
+
+ SvxXLinePreview m_aCtlPreview;
+ std::unique_ptr<weld::Entry> m_xEdtName;
+ std::unique_ptr<SvxLineEndLB> m_xLbLineEnds;
+ std::unique_ptr<weld::Button> m_xBtnAdd;
+ std::unique_ptr<weld::Button> m_xBtnModify;
+ std::unique_ptr<weld::Button> m_xBtnDelete;
+ std::unique_ptr<weld::Button> m_xBtnLoad;
+ std::unique_ptr<weld::Button> m_xBtnSave;
+ std::unique_ptr<weld::CustomWeld> m_xCtlPreview;
+
+ DECL_LINK(ClickAddHdl_Impl, weld::Button&, void);
+ DECL_LINK(ClickModifyHdl_Impl, weld::Button&, void);
+ DECL_LINK(ClickDeleteHdl_Impl, weld::Button&, void);
+ DECL_LINK(ClickLoadHdl_Impl, weld::Button&, void);
+ DECL_LINK(ClickSaveHdl_Impl, weld::Button&, void);
+ DECL_LINK(SelectLineEndHdl_Impl, weld::ComboBox&, void);
+
+ void SelectLineEndHdl_Impl();
+ void CheckChanges_Impl();
+
+public:
+ SvxLineEndDefTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
+ virtual ~SvxLineEndDefTabPage() override;
+
+ void Construct();
+
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
+ virtual bool FillItemSet( SfxItemSet* ) override;
+ virtual void Reset( const SfxItemSet * ) override;
+
+ virtual void ActivatePage( const SfxItemSet& rSet ) override;
+ virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
+
+ void SetLineEndList( XLineEndListRef const & pInList ) { pLineEndList = pInList; }
+ void SetPolyObj( const SdrObject* pObj ) { pPolyObj = pObj; }
+
+ void SetPageType( PageType* pInType ) { pPageType = pInType; }
+ void SetDlgType( sal_uInt16 nInType ) { nDlgType = nInType; }
+ void SetPosLineEndLb( sal_Int32* pInPos ) { pPosLineEndLb = pInPos; }
+
+ void SetLineEndChgd( ChangeType* pIn ) { pnLineEndListState = pIn; }
+};
+
+#endif // INCLUDED_CUI_SOURCE_INC_CUITABLINE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/cuitbxform.hxx b/cui/source/inc/cuitbxform.hxx
new file mode 100644
index 000000000..f6e52b094
--- /dev/null
+++ b/cui/source/inc/cuitbxform.hxx
@@ -0,0 +1,38 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_CUITBXFORM_HXX
+#define INCLUDED_CUI_SOURCE_INC_CUITBXFORM_HXX
+
+#include <vcl/weld.hxx>
+
+class FmInputRecordNoDialog : public weld::GenericDialogController
+{
+ std::unique_ptr<weld::SpinButton> m_xRecordNo;
+
+public:
+ FmInputRecordNoDialog(weld::Window* pParent);
+ virtual ~FmInputRecordNoDialog() override;
+
+ void SetValue(int dNew) { m_xRecordNo->set_value(dNew); }
+ int GetValue() const { return m_xRecordNo->get_value(); }
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/dbregister.hxx b/cui/source/inc/dbregister.hxx
new file mode 100644
index 000000000..e1bc2f6b1
--- /dev/null
+++ b/cui/source/inc/dbregister.hxx
@@ -0,0 +1,112 @@
+/* -*- 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 .
+ */
+
+#ifndef INCLUDED_CUI_SOURCE_INC_DBREGISTER_HXX
+#define INCLUDED_CUI_SOURCE_INC_DBREGISTER_HXX
+
+#include <rtl/ustring.hxx>
+#include <sfx2/basedlgs.hxx>
+#include <sfx2/tabdlg.hxx>
+
+namespace svx
+{
+
+ class DbRegistrationOptionsPage : public SfxTabPage
+ {
+ private:
+ sal_uLong m_nOldCount;
+ bool m_bModified;
+
+ std::unique_ptr<weld::Button> m_xNew;
+ std::unique_ptr<weld::Button> m_xEdit;
+ std::unique_ptr<weld::Button> m_xDelete;
+ std::unique_ptr<weld::TreeView> m_xPathBox;
+ std::unique_ptr<weld::TreeIter> m_xIter;
+
+ DECL_LINK( NewHdl, weld::Button&, void );
+ DECL_LINK( EditHdl, weld::Button&, void );
+ DECL_LINK( DeleteHdl, weld::Button&, void );
+ DECL_LINK( PathBoxDoubleClickHdl, weld::TreeView&, bool);
+
+ DECL_LINK( PathSelect_Impl, weld::TreeView&, void);
+
+ DECL_LINK( HeaderSelect_Impl, int, void );
+ DECL_LINK( NameValidator, const OUString&, bool);
+
+ /** inserts a new entry in the tablistbox
+ @param _sName
+ The name of the entry.
+ @param _sLocation
+ The location of the file.
+ */
+ void insertNewEntry( const OUString& _sName,const OUString& _sLocation, const bool bReadOnly );
+
+ /** opens the LinkDialog to create a register pair
+ @param sOldName
+ The old name of the entry may be empty.
+ @param sOldLocation
+ The old location of the entry may be empty.
+ @param nEntry
+ The entry to remove if the entry will be changed
+ */
+ void openLinkDialog(const OUString& sOldName, const OUString& sOldLocation, int nEntry = -1);
+
+ public:
+ DbRegistrationOptionsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
+ virtual ~DbRegistrationOptionsPage() override;
+
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet );
+
+ virtual bool FillItemSet( SfxItemSet* rSet ) override;
+ virtual void Reset( const SfxItemSet* rSet ) override;
+ virtual void FillUserData() override;
+ };
+
+ /** helper for DatabaseRegistrationDialog
+
+ Necessary so that DatabaseRegistrationDialog is self-contained, i.e. always reflects
+ the current registration state.
+ */
+ class RegistrationItemSetHolder
+ {
+ private:
+ SfxItemSet m_aRegistrationItems;
+
+ protected:
+ RegistrationItemSetHolder( const SfxItemSet& _rMasterSet );
+ ~RegistrationItemSetHolder();
+
+ protected:
+ const SfxItemSet& getRegistrationItems() const { return m_aRegistrationItems; }
+ };
+
+ class DatabaseRegistrationDialog :public RegistrationItemSetHolder
+ ,public SfxSingleTabDialogController
+ {
+ public:
+ DatabaseRegistrationDialog(weld::Window* pParent, const SfxItemSet& rAttr);
+
+ virtual short run() override;
+ };
+}
+
+#endif // INCLUDED_CUI_SOURCE_INC_DBREGISTER_HXX
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/defdlgname.hxx b/cui/source/inc/defdlgname.hxx
new file mode 100644
index 000000000..08aa42497
--- /dev/null
+++ b/cui/source/inc/defdlgname.hxx
@@ -0,0 +1,30 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_DEFDLGNAME_HXX
+#define INCLUDED_CUI_SOURCE_INC_DEFDLGNAME_HXX
+
+
+// const -----------------------------------------------------------------
+
+const short RET_BTN_1 = 100;
+const short RET_BTN_2 = 101;
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/dialmgr.hxx b/cui/source/inc/dialmgr.hxx
new file mode 100644
index 000000000..c31fde3a2
--- /dev/null
+++ b/cui/source/inc/dialmgr.hxx
@@ -0,0 +1,26 @@
+/* -*- 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 <rtl/ustring.hxx>
+
+OUString CuiResId(const char* pKey);
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/dlgname.hxx b/cui/source/inc/dlgname.hxx
new file mode 100644
index 000000000..8fd754990
--- /dev/null
+++ b/cui/source/inc/dlgname.hxx
@@ -0,0 +1,125 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_DLGNAME_HXX
+#define INCLUDED_CUI_SOURCE_INC_DLGNAME_HXX
+
+#include <vcl/weld.hxx>
+
+/// Dialog for editing a name
+class SvxNameDialog : public weld::GenericDialogController
+{
+private:
+ std::unique_ptr<weld::Entry> m_xEdtName;
+ std::unique_ptr<weld::Label> m_xFtDescription;
+ std::unique_ptr<weld::Button> m_xBtnOK;
+
+ Link<SvxNameDialog&,bool> m_aCheckNameHdl;
+ Link<SvxNameDialog&,OUString> m_aCheckNameTooltipHdl;
+
+ DECL_LINK(ModifyHdl, weld::Entry&, void);
+
+public:
+ SvxNameDialog(weld::Window* pWindow, const OUString& rName, const OUString& rDesc);
+
+ OUString GetName() const { return m_xEdtName->get_text(); }
+
+ /** add a callback Link that is called whenever the content of the edit
+ field is changed. The Link result determines whether the OK
+ Button is enabled (> 0) or disabled (== 0).
+
+ @param rLink a Callback declared with DECL_LINK and implemented with
+ IMPL_LINK, that is executed on modification.
+
+ @param bCheckImmediately If true, the Link is called directly after
+ setting it. It is recommended to set this flag to true to avoid
+ an inconsistent state if the initial String (given in the CTOR)
+ does not satisfy the check condition.
+
+ @todo Remove the parameter bCheckImmediately and incorporate the 'true'
+ behaviour as default.
+ */
+ void SetCheckNameHdl(const Link<SvxNameDialog&,bool>& rLink, bool bCheckImmediately)
+ {
+ m_aCheckNameHdl = rLink;
+ if (bCheckImmediately)
+ m_xBtnOK->set_sensitive(rLink.Call(*this));
+ }
+
+ void SetCheckNameTooltipHdl(const Link<SvxNameDialog&,OUString>& rLink)
+ {
+ m_aCheckNameTooltipHdl = rLink;
+ m_xBtnOK->set_tooltip_text(rLink.Call(*this));
+ }
+
+ void SetEditHelpId(const OString& aHelpId) { m_xEdtName->set_help_id(aHelpId);}
+};
+
+/** #i68101#
+ Dialog for editing Object name
+ plus uniqueness-callback-linkHandler */
+class SvxObjectNameDialog : public weld::GenericDialogController
+{
+private:
+ // name
+ std::unique_ptr<weld::Entry> m_xEdtName;
+
+ // buttons
+ std::unique_ptr<weld::Button> m_xBtnOK;
+
+ // callback link for name uniqueness
+ Link<SvxObjectNameDialog&,bool> aCheckNameHdl;
+
+ DECL_LINK(ModifyHdl, weld::Entry&, void);
+
+public:
+ // constructor
+ SvxObjectNameDialog(weld::Window* pWindow, const OUString& rName);
+
+ // data access
+ OUString GetName() const { return m_xEdtName->get_text(); }
+
+ // set handler
+ void SetCheckNameHdl(const Link<SvxObjectNameDialog&,bool>& rLink)
+ {
+ aCheckNameHdl = rLink;
+ }
+};
+
+/** #i68101#
+ Dialog for editing Object Title and Description */
+class SvxObjectTitleDescDialog : public weld::GenericDialogController
+{
+private:
+ // title
+ std::unique_ptr<weld::Entry> m_xEdtTitle;
+
+ // description
+ std::unique_ptr<weld::TextView> m_xEdtDescription;
+
+public:
+ // constructor
+ SvxObjectTitleDescDialog(weld::Window* pWindow, const OUString& rTitle, const OUString& rDesc);
+ // data access
+ OUString GetTitle() const { return m_xEdtTitle->get_text(); }
+ OUString GetDescription() const { return m_xEdtDescription->get_text(); }
+};
+
+#endif // INCLUDED_CUI_SOURCE_INC_DLGNAME_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/dstribut.hxx b/cui/source/inc/dstribut.hxx
new file mode 100644
index 000000000..3d3c99de1
--- /dev/null
+++ b/cui/source/inc/dstribut.hxx
@@ -0,0 +1,72 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_DSTRIBUT_HXX
+#define INCLUDED_CUI_SOURCE_INC_DSTRIBUT_HXX
+
+#include <sfx2/tabdlg.hxx>
+#include <svx/dstribut_enum.hxx>
+#include <vcl/weld.hxx>
+
+class SvxDistributePage : public SfxTabPage
+{
+ SvxDistributeHorizontal m_eDistributeHor;
+ SvxDistributeVertical m_eDistributeVer;
+
+ std::unique_ptr<weld::RadioButton> m_xBtnHorNone;
+ std::unique_ptr<weld::RadioButton> m_xBtnHorLeft;
+ std::unique_ptr<weld::RadioButton> m_xBtnHorCenter;
+ std::unique_ptr<weld::RadioButton> m_xBtnHorDistance;
+ std::unique_ptr<weld::RadioButton> m_xBtnHorRight;
+ std::unique_ptr<weld::RadioButton> m_xBtnVerNone;
+ std::unique_ptr<weld::RadioButton> m_xBtnVerTop;
+ std::unique_ptr<weld::RadioButton> m_xBtnVerCenter;
+ std::unique_ptr<weld::RadioButton> m_xBtnVerDistance;
+ std::unique_ptr<weld::RadioButton> m_xBtnVerBottom;
+
+public:
+ SvxDistributePage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs,
+ SvxDistributeHorizontal eHor,
+ SvxDistributeVertical eVer);
+ virtual ~SvxDistributePage() override;
+
+ virtual bool FillItemSet(SfxItemSet*) override;
+ virtual void Reset(const SfxItemSet*) override;
+
+ SvxDistributeHorizontal GetDistributeHor() const { return m_eDistributeHor; }
+ SvxDistributeVertical GetDistributeVer() const { return m_eDistributeVer; }
+};
+
+class SvxDistributeDialog : public SfxSingleTabDialogController
+{
+ SvxDistributePage* mpPage;
+
+public:
+ SvxDistributeDialog(weld::Window* pParent, const SfxItemSet& rAttr,
+ SvxDistributeHorizontal eHor,
+ SvxDistributeVertical eVer);
+ virtual ~SvxDistributeDialog() override;
+
+ SvxDistributeHorizontal GetDistributeHor() const { return mpPage->GetDistributeHor(); }
+ SvxDistributeVertical GetDistributeVer() const { return mpPage->GetDistributeVer(); }
+};
+
+
+#endif // INCLUDED_CUI_SOURCE_INC_DSTRIBUT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/grfpage.hxx b/cui/source/inc/grfpage.hxx
new file mode 100644
index 000000000..afdc7cb6b
--- /dev/null
+++ b/cui/source/inc/grfpage.hxx
@@ -0,0 +1,109 @@
+/* -*- 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 .
+ */
+
+#ifndef INCLUDED_CUI_SOURCE_INC_GRFPAGE_HXX
+#define INCLUDED_CUI_SOURCE_INC_GRFPAGE_HXX
+
+#include <vcl/customweld.hxx>
+#include <vcl/graph.hxx>
+#include <sfx2/tabdlg.hxx>
+
+class SvxCropExample : public weld::CustomWidgetController
+{
+ MapMode m_aMapMode;
+ Size m_aFrameSize;
+ Point m_aTopLeft, m_aBottomRight;
+ Graphic m_aGrf;
+
+public:
+ SvxCropExample();
+
+ virtual void Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect) override;
+ virtual void Resize() override;
+ virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
+
+ void SetTop( long nVal ) { m_aTopLeft.setX(nVal); }
+ void SetBottom( long nVal ) { m_aBottomRight.setX(nVal); }
+ void SetLeft( long nVal ) { m_aTopLeft.setY(nVal); }
+ void SetRight( long nVal) { m_aBottomRight.setY(nVal); }
+ void SetFrameSize( const Size& rSz );
+ void SetGraphic( const Graphic& rGrf ) { m_aGrf = rGrf; }
+};
+
+class SvxGrfCropPage : public SfxTabPage
+{
+ friend class VclPtr<SvxGrfCropPage>;
+
+ OUString aGraphicName;
+ Size aOrigSize;
+ Size aOrigPixelSize;
+ Size aPageSize;
+ long nOldWidth;
+ long nOldHeight;
+ bool bSetOrigSize;
+
+ SvxCropExample m_aExampleWN;
+
+ std::unique_ptr<weld::Widget> m_xCropFrame;
+ std::unique_ptr<weld::RadioButton> m_xZoomConstRB;
+ std::unique_ptr<weld::RadioButton> m_xSizeConstRB;
+ std::unique_ptr<weld::MetricSpinButton> m_xLeftMF;
+ std::unique_ptr<weld::MetricSpinButton> m_xRightMF;
+ std::unique_ptr<weld::MetricSpinButton> m_xTopMF;
+ std::unique_ptr<weld::MetricSpinButton> m_xBottomMF;
+
+ std::unique_ptr<weld::Widget> m_xScaleFrame;
+ std::unique_ptr<weld::MetricSpinButton> m_xWidthZoomMF;
+ std::unique_ptr<weld::MetricSpinButton> m_xHeightZoomMF;
+
+ std::unique_ptr<weld::Widget> m_xSizeFrame;
+ std::unique_ptr<weld::MetricSpinButton> m_xWidthMF;
+ std::unique_ptr<weld::MetricSpinButton> m_xHeightMF;
+
+ std::unique_ptr<weld::Widget> m_xOrigSizeGrid;
+ std::unique_ptr<weld::Label> m_xOrigSizeFT;
+ std::unique_ptr<weld::Button> m_xOrigSizePB;
+
+ // Example
+ std::unique_ptr<weld::CustomWeld> m_xExampleWN;
+
+ DECL_LINK(ZoomHdl, weld::MetricSpinButton&, void);
+ DECL_LINK(SizeHdl, weld::MetricSpinButton&, void);
+ DECL_LINK(CropModifyHdl, weld::MetricSpinButton&, void);
+ DECL_LINK(OrigSizeHdl, weld::Button&, void);
+
+ void CalcZoom();
+ void CalcMinMaxBorder();
+ void GraphicHasChanged(bool bFound);
+ virtual void ActivatePage(const SfxItemSet& rSet) override;
+
+ static Size GetGrfOrigSize(const Graphic&);
+public:
+ SvxGrfCropPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet &rSet);
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet *rSet );
+ virtual ~SvxGrfCropPage() override;
+
+ virtual bool FillItemSet( SfxItemSet *rSet ) override;
+ virtual void Reset( const SfxItemSet *rSet ) override;
+ virtual DeactivateRC DeactivatePage( SfxItemSet *pSet ) override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/hangulhanjadlg.hxx b/cui/source/inc/hangulhanjadlg.hxx
new file mode 100644
index 000000000..056aee159
--- /dev/null
+++ b/cui/source/inc/hangulhanjadlg.hxx
@@ -0,0 +1,305 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_HANGULHANJADLG_HXX
+#define INCLUDED_CUI_SOURCE_INC_HANGULHANJADLG_HXX
+
+#include <vcl/customweld.hxx>
+#include <vcl/event.hxx>
+#include <vcl/weld.hxx>
+#include <editeng/hangulhanja.hxx>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/linguistic2/XConversionDictionaryList.hpp>
+#include <svtools/valueset.hxx>
+
+#include <vector>
+#include <memory>
+
+namespace svx
+{
+
+ class SuggestionSet : public ValueSet
+ {
+ public:
+ SuggestionSet(std::unique_ptr<weld::ScrolledWindow> xScrolledWindow);
+
+ virtual void UserDraw( const UserDrawEvent& rUDEvt ) override;
+ };
+
+ class SuggestionDisplay
+ {
+ public:
+ SuggestionDisplay(weld::Builder& rBuilder);
+
+ void DisplayListBox( bool bDisplayListBox );
+
+ void SetSelectHdl( const Link<SuggestionDisplay&,void>& rLink );
+
+ void Clear();
+ void InsertEntry( const OUString& rStr );
+ void SelectEntryPos( sal_uInt16 nPos );
+
+ sal_uInt16 GetEntryCount() const;
+
+ OUString GetEntry( sal_uInt16 nPos ) const;
+ OUString GetSelectedEntry() const;
+
+ DECL_LINK( SelectSuggestionListBoxHdl, weld::TreeView&, void );
+ DECL_LINK( SelectSuggestionValueSetHdl, ValueSet*, void );
+ void SelectSuggestionHdl(bool bListBox);
+
+ void SetHelpIds();
+
+ void set_size_request(int nWidth, int nHeight)
+ {
+ m_xValueSetWin->set_size_request(nWidth, nHeight);
+ m_xListBox->set_size_request(nWidth, nHeight);
+ }
+
+ private:
+ void implUpdateDisplay();
+ weld::Widget& implGetCurrentControl();
+
+ private:
+ bool m_bDisplayListBox; //otherwise ValueSet
+ bool m_bInSelectionUpdate;
+ Link<SuggestionDisplay&,void> m_aSelectLink;
+
+ std::unique_ptr<SuggestionSet> m_xValueSet;
+ std::unique_ptr<weld::CustomWeld> m_xValueSetWin;
+ std::unique_ptr<weld::TreeView> m_xListBox;
+ };
+
+ class RubyRadioButton;
+
+ class HangulHanjaConversionDialog : public weld::GenericDialogController
+ {
+ private:
+ /** are we working for a document? This is normally true, but in case
+ the user uses the "find" functionality, we switch to working
+ with what the user entered, which then does not have any relation to
+ the document anymore. Some functionality must be disabled then */
+ bool m_bDocumentMode;
+
+ Link<LinkParamNone*,void> m_aOptionsChangedLink;
+ Link<weld::ToggleButton&,void> m_aClickByCharacterLink;
+
+ std::unique_ptr<weld::Button> m_xFind;
+ std::unique_ptr<weld::Button> m_xIgnore;
+ std::unique_ptr<weld::Button> m_xIgnoreAll;
+ std::unique_ptr<weld::Button> m_xReplace;
+ std::unique_ptr<weld::Button> m_xReplaceAll;
+ std::unique_ptr<weld::Button> m_xOptions;
+ std::unique_ptr<SuggestionDisplay> m_xSuggestions;
+ std::unique_ptr<weld::RadioButton> m_xSimpleConversion;
+ std::unique_ptr<weld::RadioButton> m_xHangulBracketed;
+ std::unique_ptr<weld::RadioButton> m_xHanjaBracketed;
+ std::unique_ptr<weld::Entry> m_xWordInput;
+ std::unique_ptr<weld::Label> m_xOriginalWord;
+ std::unique_ptr<RubyRadioButton> m_xHanjaAbove;
+ std::unique_ptr<RubyRadioButton> m_xHanjaBelow;
+ std::unique_ptr<RubyRadioButton> m_xHangulAbove;
+ std::unique_ptr<RubyRadioButton> m_xHangulBelow;
+ std::unique_ptr<weld::CheckButton> m_xHangulOnly;
+ std::unique_ptr<weld::CheckButton> m_xHanjaOnly;
+ std::unique_ptr<weld::CheckButton> m_xReplaceByChar;
+ public:
+ HangulHanjaConversionDialog(weld::Window* pParent);
+ virtual ~HangulHanjaConversionDialog() override;
+
+ public:
+ void SetOptionsChangedHdl( const Link<LinkParamNone*,void>& _rHdl );
+ void SetIgnoreHdl( const Link<weld::Button&,void>& _rHdl );
+ void SetIgnoreAllHdl( const Link<weld::Button&,void>& _rHdl );
+ void SetChangeHdl( const Link<weld::Button&,void>& _rHdl );
+ void SetChangeAllHdl( const Link<weld::Button&,void>& _rHdl );
+
+ void SetClickByCharacterHdl( const Link<weld::ToggleButton&,void>& _rHdl );
+ void SetConversionFormatChangedHdl( const Link<weld::Button&,void>& _rHdl );
+ void SetFindHdl( const Link<weld::Button&,void>& _rHdl );
+
+ OUString GetCurrentString( ) const;
+ void SetCurrentString(
+ const OUString& _rNewString,
+ const css::uno::Sequence< OUString >& _rSuggestions,
+ bool _bOriginatesFromDocument
+ );
+
+ void FocusSuggestion( );
+
+ /// retrieves the current suggestion
+ OUString GetCurrentSuggestion( ) const;
+
+ void SetConversionFormat( editeng::HangulHanjaConversion::ConversionFormat _eType );
+ editeng::HangulHanjaConversion::ConversionFormat GetConversionFormat( ) const;
+
+ void SetByCharacter( bool _bByCharacter );
+ void SetConversionDirectionState( bool _bTryBothDirections, editeng::HangulHanjaConversion::ConversionDirection _ePrimaryConversionDirection );
+
+ /// should text which does not match the primary conversion direction be ignored?
+ bool GetUseBothDirections( ) const;
+
+ /** get current conversion direction to use
+ (return argument if GetUseBothDirections is true) */
+ editeng::HangulHanjaConversion::ConversionDirection GetDirection( editeng::HangulHanjaConversion::ConversionDirection eDefaultDirection ) const;
+
+ /// enables or disables the checkboxes for ruby formatted replacements
+ void EnableRubySupport( bool bVal );
+
+ private:
+ DECL_LINK( OnOption, weld::Button&, void );
+ DECL_LINK( OnSuggestionModified, weld::Entry&, void );
+ DECL_LINK( OnSuggestionSelected, SuggestionDisplay&, void );
+ DECL_LINK( OnConversionDirectionClicked, weld::ToggleButton&, void );
+ DECL_LINK( ClickByCharacterHdl, weld::ToggleButton&, void );
+
+ /// fill the suggestion list box with suggestions for the actual input
+ void FillSuggestions( const css::uno::Sequence< OUString >& _rSuggestions );
+ };
+
+
+ typedef std::vector< css::uno::Reference< css::linguistic2::XConversionDictionary > > HHDictList;
+
+ class HangulHanjaOptionsDialog : public weld::GenericDialogController
+ {
+ private:
+ HHDictList m_aDictList;
+ css::uno::Reference< css::linguistic2::XConversionDictionaryList > m_xConversionDictionaryList;
+
+ std::unique_ptr<weld::TreeView> m_xDictsLB;
+ std::unique_ptr<weld::CheckButton> m_xIgnorepostCB;
+ std::unique_ptr<weld::CheckButton> m_xShowrecentlyfirstCB;
+ std::unique_ptr<weld::CheckButton> m_xAutoreplaceuniqueCB;
+ std::unique_ptr<weld::Button> m_xNewPB;
+ std::unique_ptr<weld::Button> m_xEditPB;
+ std::unique_ptr<weld::Button> m_xDeletePB;
+ std::unique_ptr<weld::Button> m_xOkPB;
+
+ DECL_LINK( OkHdl, weld::Button&, void );
+ DECL_LINK( DictsLB_SelectHdl, weld::TreeView&, void );
+ DECL_LINK( NewDictHdl, weld::Button&, void );
+ DECL_LINK( EditDictHdl, weld::Button&, void );
+ DECL_LINK( DeleteDictHdl, weld::Button&, void );
+
+ void Init(); ///< reads settings from core and init controls
+ public:
+ HangulHanjaOptionsDialog(weld::Window* pParent);
+ virtual ~HangulHanjaOptionsDialog() override;
+
+ void AddDict( const OUString& _rName, bool _bChecked );
+ };
+
+ class HangulHanjaNewDictDialog : public weld::GenericDialogController
+ {
+ private:
+ bool m_bEntered;
+
+ std::unique_ptr<weld::Button> m_xOkBtn;
+ std::unique_ptr<weld::Entry> m_xDictNameED;
+
+ DECL_LINK(OKHdl, weld::Button&, void);
+ DECL_LINK(ModifyHdl, weld::Entry&, void);
+ public:
+ HangulHanjaNewDictDialog(weld::Window* pParent);
+ virtual ~HangulHanjaNewDictDialog() override;
+
+ bool GetName( OUString& _rRetName ) const;
+ };
+
+ class SuggestionList;
+ class HangulHanjaEditDictDialog;
+
+ class SuggestionEdit
+ {
+ private:
+ HangulHanjaEditDictDialog* m_pParent;
+ SuggestionEdit* m_pPrev;
+ SuggestionEdit* m_pNext;
+ weld::ScrolledWindow* m_pScrollBar;
+ std::unique_ptr<weld::Entry> m_xEntry;
+
+ bool ShouldScroll( bool _bUp ) const;
+ void DoJump( bool _bUp );
+ public:
+ SuggestionEdit(std::unique_ptr<weld::Entry> xEntry, HangulHanjaEditDictDialog* pParent);
+ DECL_LINK(KeyInputHdl, const KeyEvent&, bool);
+ void init(weld::ScrolledWindow* pScrollBar, SuggestionEdit* pPrev, SuggestionEdit* pNext);
+
+ void grab_focus() { m_xEntry->grab_focus(); }
+ OUString get_text() const { return m_xEntry->get_text(); }
+ void set_text(const OUString& rText) { m_xEntry->set_text(rText); }
+ void connect_changed(const Link<weld::Entry&, void>& rLink) { m_xEntry->connect_changed(rLink); }
+ };
+
+ class HangulHanjaEditDictDialog : public weld::GenericDialogController
+ {
+ private:
+ const OUString m_aEditHintText;
+ HHDictList& m_rDictList;
+ sal_uInt32 m_nCurrentDict;
+
+ OUString m_aOriginal;
+ std::unique_ptr<SuggestionList> m_xSuggestions;
+
+ sal_uInt16 m_nTopPos;
+ bool m_bModifiedSuggestions;
+ bool m_bModifiedOriginal;
+
+ std::unique_ptr<weld::ComboBox> m_xBookLB;
+ std::unique_ptr<weld::ComboBox> m_xOriginalLB;
+ std::unique_ptr<SuggestionEdit> m_xEdit1;
+ std::unique_ptr<SuggestionEdit> m_xEdit2;
+ std::unique_ptr<SuggestionEdit> m_xEdit3;
+ std::unique_ptr<SuggestionEdit> m_xEdit4;
+ std::unique_ptr<weld::Widget> m_xContents;
+ std::unique_ptr<weld::ScrolledWindow> m_xScrollSB;
+ std::unique_ptr<weld::Button> m_xNewPB;
+ std::unique_ptr<weld::Button> m_xDeletePB;
+
+ DECL_LINK( OriginalModifyHdl, weld::ComboBox&, void );
+ DECL_LINK( ScrollHdl, weld::ScrolledWindow&, void );
+ DECL_LINK( EditModifyHdl1, weld::Entry&, void );
+ DECL_LINK( EditModifyHdl2, weld::Entry&, void );
+ DECL_LINK( EditModifyHdl3, weld::Entry&, void );
+ DECL_LINK( EditModifyHdl4, weld::Entry&, void );
+
+ DECL_LINK( BookLBSelectHdl, weld::ComboBox&, void );
+ DECL_LINK( NewPBPushHdl, weld::Button&, void );
+ DECL_LINK( DeletePBPushHdl, weld::Button&, void );
+
+ void InitEditDictDialog(sal_uInt32 nSelDict);
+ void UpdateOriginalLB();
+ void UpdateSuggestions();
+ void UpdateButtonStates();
+
+ void SetEditText( SuggestionEdit& rEdit, sal_uInt16 nEntryNum );
+ void EditModify( const weld::Entry* pEdit, sal_uInt8 nEntryOffset );
+
+ bool DeleteEntryFromDictionary( const css::uno::Reference< css::linguistic2::XConversionDictionary >& xDict );
+
+ public:
+ HangulHanjaEditDictDialog(weld::Window* pParent, HHDictList& rDictList, sal_uInt32 nSelDict);
+ virtual ~HangulHanjaEditDictDialog() override;
+
+ void UpdateScrollbar();
+ };
+}
+
+#endif // SVX_HANGUL_HANJA_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/headertablistbox.hxx b/cui/source/inc/headertablistbox.hxx
new file mode 100644
index 000000000..c4c65feac
--- /dev/null
+++ b/cui/source/inc/headertablistbox.hxx
@@ -0,0 +1,42 @@
+/* -*- 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 .
+ */
+
+#ifndef INCLUDED_CUI_SOURCE_INC_HEADERTABLISTBOX_HXX
+#define INCLUDED_CUI_SOURCE_INC_HEADERTABLISTBOX_HXX
+
+#include <vcl/weld.hxx>
+
+class MacroEventListBox final
+{
+private:
+ std::unique_ptr<weld::TreeView> m_xTreeView;
+public:
+ MacroEventListBox(std::unique_ptr<weld::TreeView> xTreeView);
+ void set_sensitive(bool bSensitive) { m_xTreeView->set_sensitive(bSensitive); }
+ void show() { m_xTreeView->show(); }
+
+ weld::TreeView& GetListBox()
+ {
+ return *m_xTreeView;
+ }
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/helpids.h b/cui/source/inc/helpids.h
new file mode 100644
index 000000000..3ae4404c1
--- /dev/null
+++ b/cui/source/inc/helpids.h
@@ -0,0 +1,46 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_HELPID_HRC
+#define INCLUDED_CUI_SOURCE_INC_HELPID_HRC
+
+#define HID_OPTIONS_COLORCONFIG_SAVE_SCHEME "CUI_HID_OPTIONS_COLORCONFIG_SAVE_SCHEME"
+#define HID_OFA_FONT_SUBST_CLB "CUI_HID_OFA_FONT_SUBST_CLB"
+#define HID_DBPATH_CTL_PATH "CUI_HID_DBPATH_CTL_PATH"
+#define HID_DBPATH_HEADERBAR "CUI_HID_DBPATH_HEADERBAR"
+#define HID_OFADLG_TREELISTBOX "CUI_HID_OFADLG_TREELISTBOX"
+#define HID_SVX_CONFIG_TOOLBAR "CUI_HID_SVX_CONFIG_TOOLBAR"
+#define HID_SVX_CONFIG_TOOLBAR_CONTENTS "CUI_HID_SVX_CONFIG_TOOLBAR_CONTENTS"
+#define HID_SVX_CONFIG_NOTEBOOKBAR_CONTENTS "CUI_HID_SVX_CONFIG_NOTEBOOKBAR_CONTENTS"
+#define HID_HANGULDLG_SUGGESTIONS_GRID "CUI_HID_HANGULDLG_SUGGESTIONS_GRID"
+#define HID_HANGULDLG_SUGGESTIONS_LIST "CUI_HID_HANGULDLG_SUGGESTIONS_LIST"
+#define HID_SVX_CONFIG_NAME_SUBMENU "CUI_HID_SVX_CONFIG_NAME_SUBMENU"
+#define HID_SVX_CONFIG_RENAME_MENU "CUI_HID_SVX_CONFIG_RENAME_MENU"
+#define HID_SVX_CONFIG_RENAME_MENU_ITEM "CUI_HID_SVX_CONFIG_RENAME_MENU_ITEM"
+#define HID_SVX_CONFIG_RENAME_TOOLBAR "CUI_HID_SVX_CONFIG_RENAME_TOOLBAR"
+#define HID_SVX_CONFIG_RENAME_TOOLBAR_ITEM "CUI_HID_SVX_CONFIG_RENAME_TOOLBAR_ITEM"
+#define HID_SVX_UP_TOOLBAR_ITEM "CUI_HID_SVX_UP_TOOLBAR_ITEM"
+#define HID_SVX_DOWN_TOOLBAR_ITEM "CUI_HID_SVX_DOWN_TOOLBAR_ITEM"
+#define HID_SVX_SAVE_IN "CUI_HID_SVX_SAVE_IN"
+#define HID_SVX_TOPLEVELLISTBOX "CUI_HID_SVX_TOPLEVELLISTBOX"
+#define HID_SVX_DESCFIELD "CUI_HID_SVX_DESCFIELD"
+#define HID_MACRO_HEADERTABLISTBOX "CUI_HID_MACRO_HEADERTABLISTBOX"
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/hldocntp.hxx b/cui/source/inc/hldocntp.hxx
new file mode 100644
index 000000000..719968853
--- /dev/null
+++ b/cui/source/inc/hldocntp.hxx
@@ -0,0 +1,64 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_HLDOCNTP_HXX
+#define INCLUDED_CUI_SOURCE_INC_HLDOCNTP_HXX
+
+#include "hltpbase.hxx"
+
+/*************************************************************************
+|*
+|* Tabpage : Hyperlink - New Document
+|*
+\************************************************************************/
+class SvxHyperlinkNewDocTp : public SvxHyperlinkTabPageBase
+{
+private:
+ std::unique_ptr<weld::RadioButton> m_xRbtEditNow;
+ std::unique_ptr<weld::RadioButton> m_xRbtEditLater;
+ std::unique_ptr<SvxHyperURLBox> m_xCbbPath;
+ std::unique_ptr<weld::Button> m_xBtCreate;
+ std::unique_ptr<weld::TreeView> m_xLbDocTypes;
+
+ bool ImplGetURLObject( const OUString& rPath, const OUString& rBase, INetURLObject& aURLObject ) const;
+ void FillDocumentList ();
+
+ DECL_LINK (ClickNewHdl_Impl, weld::Button&, void );
+ DECL_STATIC_LINK(SvxHyperlinkNewDocTp, DispatchDocument, void*, void);
+
+protected:
+ void FillDlgFields(const OUString& rStrURL) override;
+ void GetCurentItemData ( OUString& rStrURL, OUString& aStrName,
+ OUString& aStrIntName, OUString& aStrFrame,
+ SvxLinkInsertMode& eMode ) override;
+
+public:
+ SvxHyperlinkNewDocTp(weld::Container* pParent, SvxHpLinkDlg* pDlg, const SfxItemSet* pItemSet);
+ virtual ~SvxHyperlinkNewDocTp () override;
+
+ static std::unique_ptr<IconChoicePage> Create(weld::Container* pWindow, SvxHpLinkDlg* pDlg, const SfxItemSet* pItemSet);
+
+ virtual bool AskApply () override;
+ virtual void DoApply () override;
+
+ virtual void SetInitFocus() override;
+};
+
+#endif // INCLUDED_CUI_SOURCE_INC_HLDOCNTP_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/hldoctp.hxx b/cui/source/inc/hldoctp.hxx
new file mode 100644
index 000000000..9f5f8395f
--- /dev/null
+++ b/cui/source/inc/hldoctp.hxx
@@ -0,0 +1,76 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_HLDOCTP_HXX
+#define INCLUDED_CUI_SOURCE_INC_HLDOCTP_HXX
+
+#include "hltpbase.hxx"
+
+/*************************************************************************
+|*
+|* Tabpage : Hyperlink - Document
+|*
+\************************************************************************/
+class SvxHyperlinkDocTp final : public SvxHyperlinkTabPageBase
+{
+private:
+ std::unique_ptr<SvxHyperURLBox> m_xCbbPath;
+ std::unique_ptr<weld::Button> m_xBtFileopen;
+ std::unique_ptr<weld::Entry> m_xEdTarget;
+ std::unique_ptr<weld::Label> m_xFtFullURL;
+ std::unique_ptr<weld::Button> m_xBtBrowse;
+
+ OUString maStrURL;
+
+ bool m_bMarkWndOpen;
+
+ DECL_LINK (ClickFileopenHdl_Impl, weld::Button&, void );
+ DECL_LINK (ClickTargetHdl_Impl, weld::Button&, void );
+
+ DECL_LINK (ModifiedPathHdl_Impl, weld::ComboBox&, void ); ///< Contents of combobox "Path" modified
+ DECL_LINK (ModifiedTargetHdl_Impl, weld::Entry&, void ); ///< Contents of editfield "Target" modified
+
+ DECL_LINK( LostFocusPathHdl_Impl, weld::Widget&, void ); ///< Combobox "path" lost its focus
+
+ DECL_LINK( TimeoutHdl_Impl, Timer *, void ); ///< Handler for timer -timeout
+
+ enum class EPathType { Invalid, ExistsFile };
+ static EPathType GetPathType ( const OUString& rStrPath );
+
+ void FillDlgFields(const OUString& rStrURL) override;
+ void GetCurentItemData ( OUString& rStrURL, OUString& aStrName,
+ OUString& aStrIntName, OUString& aStrFrame,
+ SvxLinkInsertMode& eMode ) override;
+ virtual bool ShouldOpenMarkWnd () override {return m_bMarkWndOpen;}
+ virtual void SetMarkWndShouldOpen (bool bOpen) override {m_bMarkWndOpen=bOpen;}
+ OUString GetCurrentURL() const;
+
+public:
+ SvxHyperlinkDocTp(weld::Container* pParent, SvxHpLinkDlg* pDlg, const SfxItemSet* pItemSet);
+ virtual ~SvxHyperlinkDocTp() override;
+
+ static std::unique_ptr<IconChoicePage> Create(weld::Container* pWindow, SvxHpLinkDlg* pDlg, const SfxItemSet* pItemSet);
+
+ virtual void SetMarkStr ( const OUString& aStrMark ) override;
+
+ virtual void SetInitFocus() override;
+};
+
+#endif // INCLUDED_CUI_SOURCE_INC_HLDOCTP_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/hlinettp.hxx b/cui/source/inc/hlinettp.hxx
new file mode 100644
index 000000000..115e1e428
--- /dev/null
+++ b/cui/source/inc/hlinettp.hxx
@@ -0,0 +1,91 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_HLINETTP_HXX
+#define INCLUDED_CUI_SOURCE_INC_HLINETTP_HXX
+
+#include "cuihyperdlg.hxx"
+#include "hltpbase.hxx"
+
+/*************************************************************************
+|*
+|* Tabpage : Hyperlink - Internet
+|*
+\************************************************************************/
+
+class SvxHyperlinkInternetTp : public SvxHyperlinkTabPageBase
+{
+private:
+ OUString maStrOldUser;
+ OUString maStrOldPassword;
+
+ bool m_bMarkWndOpen;
+
+ std::unique_ptr<weld::RadioButton> m_xRbtLinktypInternet;
+ std::unique_ptr<weld::RadioButton> m_xRbtLinktypFTP;
+ std::unique_ptr<SvxHyperURLBox> m_xCbbTarget;
+ std::unique_ptr<weld::Label> m_xFtTarget;
+ std::unique_ptr<weld::Label> m_xFtLogin;
+ std::unique_ptr<weld::Entry> m_xEdLogin;
+ std::unique_ptr<weld::Label> m_xFtPassword;
+ std::unique_ptr<weld::Entry> m_xEdPassword;
+ std::unique_ptr<weld::CheckButton> m_xCbAnonymous;
+
+ DECL_LINK( Click_SmartProtocol_Impl, weld::Button&, void ); ///< Radiobutton clicked: Type HTTP or FTP
+ DECL_LINK( ClickAnonymousHdl_Impl, weld::Button&, void ); ///< Checkbox : Anonymous User
+ DECL_LINK( ModifiedLoginHdl_Impl, weld::Entry&, void ); ///< Contents of editfield "Login" modified
+ DECL_LINK( LostFocusTargetHdl_Impl, weld::Widget&, void ); ///< Combobox "Target" lost its focus
+ DECL_LINK( ModifiedTargetHdl_Impl, weld::ComboBox&, void ); ///< Contents of editfield "Target" modified
+
+ DECL_LINK( TimeoutHdl_Impl, Timer *, void); ///< Handler for timer -timeout
+
+
+ void SetScheme(const OUString& rScheme);
+ void RemoveImproperProtocol(const OUString& rProperScheme);
+ OUString GetSchemeFromButtons() const;
+ INetProtocol GetSmartProtocolFromButtons() const;
+
+ OUString CreateAbsoluteURL() const;
+
+ void setAnonymousFTPUser();
+ void setFTPUser(const OUString& rUser, const OUString& rPassword);
+ void RefreshMarkWindow();
+
+protected:
+ virtual void FillDlgFields(const OUString& rStrURL) override;
+ virtual void GetCurentItemData ( OUString& rStrURL, OUString& aStrName,
+ OUString& aStrIntName, OUString& aStrFrame,
+ SvxLinkInsertMode& eMode ) override;
+ virtual bool ShouldOpenMarkWnd () override {return ( m_bMarkWndOpen && m_xRbtLinktypInternet->get_active() );}
+ virtual void SetMarkWndShouldOpen (bool bOpen) override {m_bMarkWndOpen=bOpen;}
+
+public:
+ SvxHyperlinkInternetTp(weld::Container* pParent, SvxHpLinkDlg* pDlg, const SfxItemSet* pItemSet);
+ virtual ~SvxHyperlinkInternetTp() override;
+
+ static std::unique_ptr<IconChoicePage> Create(weld::Container* pWindow, SvxHpLinkDlg* pDlg, const SfxItemSet* pItemSet);
+
+ virtual void SetMarkStr ( const OUString& aStrMark ) override;
+
+ virtual void SetInitFocus() override;
+};
+
+
+#endif // INCLUDED_CUI_SOURCE_INC_HLINETTP_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/hlmailtp.hxx b/cui/source/inc/hlmailtp.hxx
new file mode 100644
index 000000000..c137a3cf1
--- /dev/null
+++ b/cui/source/inc/hlmailtp.hxx
@@ -0,0 +1,65 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_HLMAILTP_HXX
+#define INCLUDED_CUI_SOURCE_INC_HLMAILTP_HXX
+
+#include "hltpbase.hxx"
+
+/*************************************************************************
+|*
+|* Tabpage : Hyperlink - Mail
+|*
+\************************************************************************/
+
+class SvxHyperlinkMailTp : public SvxHyperlinkTabPageBase
+{
+private:
+ std::unique_ptr<SvxHyperURLBox> m_xCbbReceiver;
+ std::unique_ptr<weld::Button> m_xBtAdrBook;
+ std::unique_ptr<weld::Label> m_xFtSubject;
+ std::unique_ptr<weld::Entry> m_xEdSubject;
+
+ DECL_STATIC_LINK(SvxHyperlinkMailTp, ClickAdrBookHdl_Impl, weld::Button&, void);
+ ///< Button : Address book
+ DECL_LINK (ModifiedReceiverHdl_Impl, weld::ComboBox&, void ); ///< Combobox "receiver" modified
+
+ void SetScheme(const OUString& rScheme);
+ void RemoveImproperProtocol(const OUString& aProperScheme);
+
+ OUString CreateAbsoluteURL() const;
+
+protected:
+ virtual void FillDlgFields(const OUString& rStrURL) override;
+ virtual void GetCurentItemData ( OUString& rStrURL, OUString& aStrName,
+ OUString& aStrIntName, OUString& aStrFrame,
+ SvxLinkInsertMode& eMode ) override;
+
+public:
+ SvxHyperlinkMailTp(weld::Container* pParent, SvxHpLinkDlg* pDlg, const SfxItemSet* pItemSet);
+ virtual ~SvxHyperlinkMailTp() override;
+
+ static std::unique_ptr<IconChoicePage> Create(weld::Container* pWindow, SvxHpLinkDlg* pDlg, const SfxItemSet* pItemSet);
+
+ virtual void SetInitFocus() override;
+};
+
+
+#endif // INCLUDED_CUI_SOURCE_INC_HLMAILTP_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/hlmarkwn.hxx b/cui/source/inc/hlmarkwn.hxx
new file mode 100644
index 000000000..9dd566a74
--- /dev/null
+++ b/cui/source/inc/hlmarkwn.hxx
@@ -0,0 +1,72 @@
+/* -*- 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 .
+ */
+
+#ifndef INCLUDED_CUI_SOURCE_INC_HLMARKWN_HXX
+#define INCLUDED_CUI_SOURCE_INC_HLMARKWN_HXX
+
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <vcl/weld.hxx>
+
+class SvxHyperlinkTabPageBase;
+
+//# #
+//# Window-Class #
+//# #
+class SvxHlinkDlgMarkWnd : public weld::GenericDialogController
+{
+private:
+ friend class SvxHlmarkTreeLBox;
+
+ SvxHyperlinkTabPageBase* mpParent;
+
+ sal_uInt16 mnError;
+
+ std::unique_ptr<weld::Button> mxBtApply;
+ std::unique_ptr<weld::Button> mxBtClose;
+ std::unique_ptr<weld::TreeView> mxLbTree;
+ std::unique_ptr<weld::Label> mxError;
+
+ void ErrorChanged();
+
+protected:
+ bool RefreshFromDoc( const OUString& aURL );
+ void RestoreLastSelection();
+
+ std::unique_ptr<weld::TreeIter> FindEntry(const OUString& aStrName);
+ void ClearTree();
+ int FillTree( const css::uno::Reference< css::container::XNameAccess >& xLinks, const weld::TreeIter* pParentEntry =nullptr );
+
+ DECL_LINK( ClickApplyHdl_Impl, weld::Button&, void );
+ DECL_LINK( DoubleClickApplyHdl_Impl, weld::TreeView&, bool );
+ DECL_LINK( ClickCloseHdl_Impl, weld::Button&, void );
+
+public:
+ SvxHlinkDlgMarkWnd(weld::Window* pParentDialog, SvxHyperlinkTabPageBase *pParentPage);
+ virtual ~SvxHlinkDlgMarkWnd() override;
+
+ void MoveTo(const Point& rNewPos);
+ void RefreshTree(const OUString& aStrURL);
+ bool SelectEntry(const OUString& aStrMark);
+
+ sal_uInt16 SetError( sal_uInt16 nError);
+};
+
+#endif // INCLUDED_CUI_SOURCE_INC_HLMARKWN_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/hlmarkwn_def.hxx b/cui/source/inc/hlmarkwn_def.hxx
new file mode 100644
index 000000000..6caa0c510
--- /dev/null
+++ b/cui/source/inc/hlmarkwn_def.hxx
@@ -0,0 +1,29 @@
+/* -*- 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 .
+ */
+
+#ifndef INCLUDED_CUI_SOURCE_INC_HLMARKWN_DEF_HXX
+#define INCLUDED_CUI_SOURCE_INC_HLMARKWN_DEF_HXX
+
+#define LERR_NOERROR 0
+#define LERR_NOENTRIES 1
+#define LERR_DOCNOTOPEN 2
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/hltpbase.hxx b/cui/source/inc/hltpbase.hxx
new file mode 100644
index 000000000..0860fff0e
--- /dev/null
+++ b/cui/source/inc/hltpbase.hxx
@@ -0,0 +1,138 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_HLTPBASE_HXX
+#define INCLUDED_CUI_SOURCE_INC_HLTPBASE_HXX
+
+#include <sfx2/tabdlg.hxx>
+#include <vcl/transfer.hxx>
+#include <sfx2/dispatch.hxx>
+#include <svtools/inettbc.hxx>
+#include <vcl/timer.hxx>
+#include <vcl/waitobj.hxx>
+
+#include <com/sun/star/frame/XFrame.hpp>
+#include <svx/hlnkitem.hxx>
+
+#include "hlmarkwn.hxx"
+#include "iconcdlg.hxx"
+
+/// ComboBox-Control for URL's with History and Autocompletion
+class SvxHyperURLBox : public SvtURLBox, public DropTargetHelper
+{
+protected:
+ virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt ) override;
+ virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt ) override;
+
+public:
+ SvxHyperURLBox(std::unique_ptr<weld::ComboBox> xWidget);
+};
+
+/// Tabpage : Basisclass
+class SvxHyperlinkTabPageBase : public IconChoicePage
+{
+private:
+ std::unique_ptr<weld::ComboBox> mxCbbFrame;
+ std::unique_ptr<weld::ComboBox> mxLbForm;
+ std::unique_ptr<weld::Entry> mxEdIndication;
+ std::unique_ptr<weld::Entry> mxEdText;
+ std::unique_ptr<weld::Button> mxBtScript;
+ std::unique_ptr<weld::Label> mxFormLabel;
+ std::unique_ptr<weld::Label> mxFrameLabel;
+
+ bool mbIsCloseDisabled;
+
+ css::uno::Reference< css::frame::XFrame >
+ mxDocumentFrame;
+
+protected:
+ SvxHpLinkDlg* mpDialog;
+
+ bool mbStdControlsInit;
+
+ OUString maStrInitURL;
+
+ Timer maTimer;
+
+ TopLevelWindowLocker maBusy;
+
+ std::shared_ptr<SvxHlinkDlgMarkWnd> mxMarkWnd;
+
+ void InitStdControls ();
+ void FillStandardDlgFields ( const SvxHyperlinkItem* pHyperlinkItem );
+ virtual void FillDlgFields(const OUString& rStrURL) = 0;
+ virtual void GetCurentItemData ( OUString& rStrURL, OUString& aStrName,
+ OUString& aStrIntName, OUString& aStrFrame,
+ SvxLinkInsertMode& eMode ) = 0;
+
+ void GetDataFromCommonFields( OUString& aStrName,
+ OUString& aStrIntName, OUString& aStrFrame,
+ SvxLinkInsertMode& eMode );
+
+ DECL_LINK (ClickScriptHdl_Impl, weld::Button&, void ); ///< Button : Script
+
+ static OUString GetSchemeFromURL( const OUString& rStrURL );
+
+ void DisableClose( bool _bDisable );
+
+public:
+ SvxHyperlinkTabPageBase (
+ weld::Container* pParent,
+ SvxHpLinkDlg* pDlg,
+ const OUString& rUIXMLDescription,
+ const OString& rID,
+ const SfxItemSet* pItemSet
+ );
+ virtual ~SvxHyperlinkTabPageBase () override;
+
+ void SetDocumentFrame(
+ const css::uno::Reference< css::frame::XFrame >& rxDocumentFrame )
+ {
+ mxDocumentFrame = rxDocumentFrame;
+ }
+
+ virtual bool AskApply ();
+ virtual void DoApply ();
+ virtual void SetInitFocus();
+ virtual void SetMarkStr ( const OUString& aStrMark );
+ virtual void Reset( const SfxItemSet& ) override;
+ virtual bool FillItemSet( SfxItemSet* ) override;
+ virtual void ActivatePage( const SfxItemSet& rItemSet ) override;
+ virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
+
+ bool IsMarkWndVisible() const { return static_cast<bool>(mxMarkWnd); }
+ void MoveToExtraWnd ( Point aNewPos );
+
+ virtual bool QueryClose() override;
+
+protected:
+ virtual bool ShouldOpenMarkWnd();
+ virtual void SetMarkWndShouldOpen(bool bOpen);
+
+ void ShowMarkWnd();
+ void HideMarkWnd();
+
+ SfxDispatcher* GetDispatcher() const;
+
+ HyperDialogEvent GetMacroEvents() const;
+ SvxMacroTableDtor* GetMacroTable();
+};
+
+#endif // INCLUDED_CUI_SOURCE_INC_HLTPBASE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/hyphen.hxx b/cui/source/inc/hyphen.hxx
new file mode 100644
index 000000000..fdf65cd4b
--- /dev/null
+++ b/cui/source/inc/hyphen.hxx
@@ -0,0 +1,88 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_HYPHEN_HXX
+#define INCLUDED_CUI_SOURCE_INC_HYPHEN_HXX
+
+#include <memory>
+
+#include <vcl/weld.hxx>
+#include <sfx2/basedlgs.hxx>
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/linguistic2/XHyphenator.hpp>
+#include <com/sun/star/linguistic2/XPossibleHyphens.hpp>
+
+class SvxSpellWrapper;
+
+class SvxHyphenWordDialog : public SfxDialogController
+{
+ OUString m_aLabel;
+ SvxSpellWrapper *const m_pHyphWrapper;
+ css::uno::Reference< css::linguistic2::XHyphenator > m_xHyphenator;
+ css::uno::Reference< css::linguistic2::XPossibleHyphens > m_xPossHyph;
+ OUString m_aEditWord; // aEditWord and aWordEdit.GetText() differ only by the character for the current selected hyphenation position
+ OUString m_aActWord; // actual word to be hyphenated
+ LanguageType m_nActLanguage; // and its language
+ sal_Int16 m_nMaxHyphenationPos; // right most valid hyphenation pos
+ sal_Int32 m_nOldPos;
+ sal_Int32 m_nHyphenationPositionsOffset;
+ int m_nWordEditWidth;
+ bool m_bBusy;
+
+ std::unique_ptr<weld::Entry> m_xWordEdit;
+ std::unique_ptr<weld::Button> m_xLeftBtn;
+ std::unique_ptr<weld::Button> m_xRightBtn;
+ std::unique_ptr<weld::Button> m_xOkBtn;
+ std::unique_ptr<weld::Button> m_xContBtn;
+ std::unique_ptr<weld::Button> m_xDelBtn;
+ std::unique_ptr<weld::Button> m_xHyphAll;
+ std::unique_ptr<weld::Button> m_xCloseBtn;
+
+ void EnableLRBtn_Impl();
+ OUString EraseUnusableHyphens_Impl();
+
+ void InitControls_Impl();
+ void ContinueHyph_Impl( sal_Int32 nInsPos = -1 ); // continue by default
+
+ void select_region(int nStart, int nEnd);
+
+ DECL_LINK(Left_Impl, weld::Button&, void);
+ DECL_LINK(Right_Impl, weld::Button&, void);
+ DECL_LINK(CutHdl_Impl, weld::Button&, void);
+ DECL_LINK(ContinueHdl_Impl, weld::Button&, void);
+ DECL_LINK(DeleteHdl_Impl, weld::Button&, void);
+ DECL_LINK(HyphenateAllHdl_Impl, weld::Button&, void);
+ DECL_LINK(CancelHdl_Impl, weld::Button&, void);
+ DECL_LINK(GetFocusHdl_Impl, weld::Widget&, void);
+ DECL_LINK(CursorChangeHdl_Impl, weld::Entry&, void);
+
+public:
+ SvxHyphenWordDialog(const OUString &rWord, LanguageType nLang,
+ weld::Window* pParent,
+ css::uno::Reference<css::linguistic2::XHyphenator> const &xHyphen,
+ SvxSpellWrapper* pWrapper);
+ virtual ~SvxHyphenWordDialog() override;
+
+ void SetWindowTitle( LanguageType nLang );
+ bool SelLeft();
+ bool SelRight();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/iconcdlg.hxx b/cui/source/inc/iconcdlg.hxx
new file mode 100644
index 000000000..230c22be7
--- /dev/null
+++ b/cui/source/inc/iconcdlg.hxx
@@ -0,0 +1,84 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_ICONCDLG_HXX
+#define INCLUDED_CUI_SOURCE_INC_ICONCDLG_HXX
+
+#include <rtl/ustring.hxx>
+#include <sfx2/tabdlg.hxx>
+
+// forward-declarations
+struct IconChoicePageData;
+class SvxHpLinkDlg;
+class IconChoicePage;
+class SfxItemPool;
+class SfxItemSet;
+
+// Create-Function
+typedef std::unique_ptr<IconChoicePage> (*CreatePage)(weld::Container* pParent, SvxHpLinkDlg* pDlg, const SfxItemSet* pAttrSet);
+
+/// Data-structure for pages in dialog
+struct IconChoicePageData
+{
+ OString sId;
+ std::unique_ptr<IconChoicePage> xPage; ///< the TabPage itself
+ bool bRefresh; ///< Flag: page has to be newly initialized
+
+ // constructor
+ IconChoicePageData(const OString& rId, std::unique_ptr<IconChoicePage> xInPage)
+ : sId(rId)
+ , xPage(std::move(xInPage))
+ , bRefresh(false)
+ {}
+};
+
+class IconChoicePage
+{
+protected:
+ std::unique_ptr<weld::Builder> xBuilder;
+ std::unique_ptr<weld::Container> xContainer;
+
+private:
+ const SfxItemSet* pSet;
+ bool bHasExchangeSupport;
+
+protected:
+
+ IconChoicePage(weld::Container* pParent, const OUString& rUIXMLDescription, const OString& rID, const SfxItemSet* pItemSet);
+
+public:
+ virtual ~IconChoicePage();
+
+ OString GetHelpId() const { return xContainer->get_help_id(); }
+
+ const SfxItemSet& GetItemSet() const { return *pSet; }
+
+ virtual bool FillItemSet( SfxItemSet* ) = 0;
+ virtual void Reset( const SfxItemSet& ) = 0;
+
+ bool HasExchangeSupport() const { return bHasExchangeSupport; }
+ void SetExchangeSupport() { bHasExchangeSupport = true; }
+
+ virtual void ActivatePage( const SfxItemSet& );
+ virtual DeactivateRC DeactivatePage( SfxItemSet* pSet );
+ virtual bool QueryClose();
+};
+
+#endif // INCLUDED_CUI_SOURCE_INC_ICONCDLG_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/insdlg.hxx b/cui/source/inc/insdlg.hxx
new file mode 100644
index 000000000..7c17022ed
--- /dev/null
+++ b/cui/source/inc/insdlg.hxx
@@ -0,0 +1,117 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_INSDLG_HXX
+#define INCLUDED_CUI_SOURCE_INC_INSDLG_HXX
+
+#include <com/sun/star/uno/Reference.h>
+#include <com/sun/star/embed/XEmbeddedObject.hpp>
+#include <com/sun/star/embed/XStorage.hpp>
+
+#include <svtools/insdlg.hxx>
+#include <vcl/weld.hxx>
+#include <comphelper/embeddedobjectcontainer.hxx>
+
+class INetURLObject;
+
+class InsertObjectDialog_Impl : public weld::GenericDialogController
+{
+protected:
+ css::uno::Reference < css::embed::XEmbeddedObject > m_xObj;
+ const css::uno::Reference < css::embed::XStorage > m_xStorage;
+ comphelper::EmbeddedObjectContainer aCnt;
+
+ InsertObjectDialog_Impl(weld::Window * pParent,
+ const OUString& rUIXMLDescription, const OString& rID,
+ const css::uno::Reference < css::embed::XStorage >& xStorage);
+public:
+ const css::uno::Reference<css::embed::XEmbeddedObject>& GetObject() const { return m_xObj; }
+ virtual css::uno::Reference<css::io::XInputStream> GetIconIfIconified(OUString* pGraphicMediaType);
+ void SetHelpId(const OString& rHelpId) { m_xDialog->set_help_id(rHelpId); }
+ virtual bool IsCreateNew() const;
+};
+
+class SvInsertOleDlg : public InsertObjectDialog_Impl
+{
+ const SvObjectServerList* m_pServers;
+
+ css::uno::Sequence< sal_Int8 > m_aIconMetaFile;
+ OUString m_aIconMediaType;
+
+ std::unique_ptr<weld::RadioButton> m_xRbNewObject;
+ std::unique_ptr<weld::RadioButton> m_xRbObjectFromfile;
+ std::unique_ptr<weld::Frame> m_xObjectTypeFrame;
+ std::unique_ptr<weld::TreeView> m_xLbObjecttype;
+ std::unique_ptr<weld::Frame> m_xFileFrame;
+ std::unique_ptr<weld::Entry> m_xEdFilepath;
+ std::unique_ptr<weld::Button> m_xBtnFilepath;
+ std::unique_ptr<weld::CheckButton> m_xCbFilelink;
+ std::unique_ptr<weld::CheckButton> m_xCbAsIcon;
+
+ DECL_LINK(DoubleClickHdl, weld::TreeView&, bool);
+ DECL_LINK(BrowseHdl, weld::Button&, void);
+ DECL_LINK(RadioHdl, weld::Button&, void);
+ bool IsCreateNew() const override { return m_xRbNewObject->get_active(); }
+
+public:
+ SvInsertOleDlg(weld::Window* pParent,
+ const css::uno::Reference < css::embed::XStorage >& xStorage,
+ const SvObjectServerList* pServers );
+ virtual short run() override;
+
+ /// get replacement for the iconified embedded object and the mediatype of the replacement
+ css::uno::Reference< css::io::XInputStream > GetIconIfIconified( OUString* pGraphicMediaType ) override;
+};
+
+class SfxInsertFloatingFrameDialog : public InsertObjectDialog_Impl
+{
+private:
+ std::unique_ptr<weld::Entry> m_xEDName;
+ std::unique_ptr<weld::Entry> m_xEDURL;
+ std::unique_ptr<weld::Button> m_xBTOpen;
+
+ std::unique_ptr<weld::RadioButton> m_xRBScrollingOn;
+ std::unique_ptr<weld::RadioButton> m_xRBScrollingOff;
+ std::unique_ptr<weld::RadioButton> m_xRBScrollingAuto;
+
+ std::unique_ptr<weld::RadioButton> m_xRBFrameBorderOn;
+ std::unique_ptr<weld::RadioButton> m_xRBFrameBorderOff;
+
+ std::unique_ptr<weld::Label> m_xFTMarginWidth;
+ std::unique_ptr<weld::SpinButton> m_xNMMarginWidth;
+ std::unique_ptr<weld::CheckButton> m_xCBMarginWidthDefault;
+ std::unique_ptr<weld::Label> m_xFTMarginHeight;
+ std::unique_ptr<weld::SpinButton> m_xNMMarginHeight;
+ std::unique_ptr<weld::CheckButton> m_xCBMarginHeightDefault;
+
+ DECL_LINK(OpenHdl, weld::Button&, void);
+ DECL_LINK(CheckHdl, weld::Button&, void);
+
+ void Init();
+
+public:
+ SfxInsertFloatingFrameDialog(weld::Window *pParent,
+ const css::uno::Reference<css::embed::XStorage>& xStorage);
+ SfxInsertFloatingFrameDialog(weld::Window* pParent,
+ const css::uno::Reference<css::embed::XEmbeddedObject>& xObj);
+ virtual short run() override;
+};
+
+#endif // INCLUDED_CUI_SOURCE_INC_INSDLG_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/insrc.hxx b/cui/source/inc/insrc.hxx
new file mode 100644
index 000000000..ea6428eb3
--- /dev/null
+++ b/cui/source/inc/insrc.hxx
@@ -0,0 +1,44 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_INSRC_HXX
+#define INCLUDED_CUI_SOURCE_INC_INSRC_HXX
+
+#include <rtl/string.hxx>
+#include <svx/svxdlg.hxx>
+#include <vcl/weld.hxx>
+
+class SvxInsRowColDlg : public SvxAbstractInsRowColDlg, public weld::GenericDialogController
+{
+private:
+ std::unique_ptr<weld::SpinButton> m_xCountEdit;
+ std::unique_ptr<weld::RadioButton> m_xBeforeBtn;
+ std::unique_ptr<weld::RadioButton> m_xAfterBtn;
+
+public:
+ SvxInsRowColDlg(weld::Window* pParent, bool bCol, const OString& rHelpId);
+
+ virtual short Execute() override;
+
+ virtual bool isInsertBefore() const override;
+ virtual sal_uInt16 getInsertCount() const override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/labdlg.hxx b/cui/source/inc/labdlg.hxx
new file mode 100644
index 000000000..d759df2e6
--- /dev/null
+++ b/cui/source/inc/labdlg.hxx
@@ -0,0 +1,119 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_LABDLG_HXX
+#define INCLUDED_CUI_SOURCE_INC_LABDLG_HXX
+
+#include <svtools/valueset.hxx>
+#include <sfx2/tabdlg.hxx>
+#include <svx/sxctitm.hxx>
+#include <svx/sxcecitm.hxx>
+#include <svx/anchorid.hxx>
+#include <vcl/image.hxx>
+
+class SdrView;
+
+// class SvxCaptionTabPage -----------------------------------------------
+
+const sal_uInt16 CAPTYPE_BITMAPS_COUNT = 3;
+
+class SvxCaptionTabPage : public SfxTabPage
+{
+private:
+ static const sal_uInt16 pCaptionRanges[];
+
+ Image m_aBmpCapTypes[CAPTYPE_BITMAPS_COUNT];
+
+ std::vector<OUString> m_aStrHorzList;
+ std::vector<OUString> m_aStrVertList;
+
+ SdrCaptionType nCaptionType;
+ sal_Int32 nGap;
+ SdrCaptionEscDir nEscDir;
+ bool bEscRel;
+ sal_Int32 nEscAbs;
+ sal_Int32 nEscRel;
+ sal_Int32 nLineLen;
+ bool bFitLineLen;
+
+ sal_uInt16 nPosition;
+ sal_uInt16 nExtension;
+
+ const SfxItemSet& rOutAttrs;
+ const SdrView* pView;
+
+ std::unique_ptr<weld::MetricSpinButton> m_xMF_SPACING;
+ std::unique_ptr<weld::ComboBox> m_xLB_EXTENSION;
+ std::unique_ptr<weld::Label> m_xFT_BYFT;
+ std::unique_ptr<weld::MetricSpinButton> m_xMF_BY;
+ std::unique_ptr<weld::Label> m_xFT_POSITIONFT;
+ std::unique_ptr<weld::ComboBox> m_xLB_POSITION;
+ std::unique_ptr<weld::ComboBox> m_xLineTypes;
+ std::unique_ptr<weld::Label> m_xFT_LENGTHFT;
+ std::unique_ptr<weld::MetricSpinButton> m_xMF_LENGTH;
+ std::unique_ptr<weld::CheckButton> m_xCB_OPTIMAL;
+ std::unique_ptr<ValueSet> m_xCT_CAPTTYPE;
+ std::unique_ptr<weld::CustomWeld> m_xCT_CAPTTYPEWin;
+
+ void SetupExtension_Impl( sal_uInt16 nType );
+ void SetupType_Impl( SdrCaptionType nType );
+ DECL_LINK(ExtensionSelectHdl_Impl, weld::ComboBox&, void);
+ DECL_LINK(PositionSelectHdl_Impl, weld::ComboBox&, void);
+ DECL_LINK(LineOptHdl_Impl, weld::ToggleButton&, void);
+ DECL_LINK(SelectCaptTypeHdl_Impl, ValueSet*, void);
+
+public:
+ SvxCaptionTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
+ virtual ~SvxCaptionTabPage() override;
+
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
+ static const sal_uInt16* GetRanges() { return pCaptionRanges; }
+
+ virtual bool FillItemSet( SfxItemSet* ) override;
+ virtual void Reset( const SfxItemSet * ) override;
+ void Construct();
+ void SetView( const SdrView* pSdrView )
+ { pView = pSdrView; }
+
+ void FillValueSet();
+};
+
+// class SvxCaptionTabDialog ---------------------------------------------
+struct SvxSwFrameValidation;
+class SvxCaptionTabDialog : public SfxTabDialogController
+{
+private:
+ const SdrView* pView;
+ SvxAnchorIds nAnchorCtrls;
+
+ Link<SvxSwFrameValidation&,void> aValidateLink;
+
+ virtual void PageCreated(const OString& rId, SfxTabPage &rPage) override;
+
+public:
+ SvxCaptionTabDialog(weld::Window* pParent, const SdrView* pView,
+ SvxAnchorIds nAnchorTypes);
+
+ /// link for the Writer to validate positions
+ void SetValidateFramePosLink( const Link<SvxSwFrameValidation&,void>& rLink );
+};
+
+
+#endif // INCLUDED_CUI_SOURCE_INC_LABDLG_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/linkdlg.hxx b/cui/source/inc/linkdlg.hxx
new file mode 100644
index 000000000..90d51aba8
--- /dev/null
+++ b/cui/source/inc/linkdlg.hxx
@@ -0,0 +1,85 @@
+/* -*- 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 .
+ */
+
+#ifndef INCLUDED_CUI_SOURCE_INC_LINKDLG_HXX
+#define INCLUDED_CUI_SOURCE_INC_LINKDLG_HXX
+
+#include <vcl/idle.hxx>
+#include <vcl/virdev.hxx>
+#include <vcl/weld.hxx>
+
+/********************** SvUpdateLinksDialog ******************************
+*************************************************************************/
+namespace sfx2
+{
+ class LinkManager;
+ class SvBaseLink;
+}
+
+enum class SfxLinkUpdateMode;
+
+class SvBaseLinksDlg : public weld::GenericDialogController
+{
+ OUString aStrAutolink;
+ OUString aStrManuallink;
+ OUString aStrBrokenlink;
+ OUString aStrCloselinkmsg;
+ OUString aStrCloselinkmsgMulti;
+ OUString aStrWaitinglink;
+ sfx2::LinkManager* pLinkMgr;
+ Idle aUpdateIdle;
+
+ std::unique_ptr<weld::TreeView> m_xTbLinks;
+ std::unique_ptr<weld::LinkButton> m_xFtFullFileName;
+ std::unique_ptr<weld::Label> m_xFtFullSourceName;
+ std::unique_ptr<weld::Label> m_xFtFullTypeName;
+ std::unique_ptr<weld::RadioButton> m_xRbAutomatic;
+ std::unique_ptr<weld::RadioButton> m_xRbManual;
+ std::unique_ptr<weld::Button> m_xPbUpdateNow;
+ std::unique_ptr<weld::Button> m_xPbChangeSource;
+ std::unique_ptr<weld::Button> m_xPbBreakLink;
+
+ ScopedVclPtr<VirtualDevice> m_xVirDev;
+
+ DECL_LINK( LinksSelectHdl, weld::TreeView&, void );
+ DECL_LINK( LinksDoubleClickHdl, weld::TreeView&, bool );
+ DECL_LINK( AutomaticClickHdl, weld::Button&, void );
+ DECL_LINK( ManualClickHdl, weld::Button&, void );
+ DECL_LINK( UpdateNowClickHdl, weld::Button&, void);
+ DECL_LINK( ChangeSourceClickHdl, weld::Button&, void );
+ DECL_LINK( BreakLinkClickHdl, weld::Button&, void );
+ DECL_LINK( UpdateWaitingHdl, Timer *, void );
+ DECL_LINK( EndEditHdl, sfx2::SvBaseLink&, void );
+ void LinksSelectHdl(weld::TreeView* pTreeView);
+ sfx2::SvBaseLink* GetSelEntry(int* pPos);
+ OUString ImplGetStateStr( const sfx2::SvBaseLink& );
+ void SetType(sfx2::SvBaseLink& rLink, int nPos, SfxLinkUpdateMode nType);
+ void InsertEntry(const sfx2::SvBaseLink& rLink, int nPos = -1, bool bSelect = false);
+
+ void SetManager( sfx2::LinkManager* );
+
+public:
+ SvBaseLinksDlg(weld::Window * pParent, sfx2::LinkManager*, bool bHtml);
+ virtual ~SvBaseLinksDlg() override;
+ void SetActLink( sfx2::SvBaseLink const * pLink );
+};
+
+#endif // INCLUDED_CUI_SOURCE_INC_LINKDLG_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/macroass.hxx b/cui/source/inc/macroass.hxx
new file mode 100644
index 000000000..d4403686c
--- /dev/null
+++ b/cui/source/inc/macroass.hxx
@@ -0,0 +1,92 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_MACROASS_HXX
+#define INCLUDED_CUI_SOURCE_INC_MACROASS_HXX
+
+#include <sal/config.h>
+
+#include <sfx2/basedlgs.hxx>
+#include <sfx2/tabdlg.hxx>
+#include <svl/macitem.hxx>
+#include <vcl/weld.hxx>
+#include <com/sun/star/frame/XFrame.hpp>
+#include <memory>
+
+class SfxMacroTabPage_;
+class SfxMacroTabPage_Impl;
+
+class SfxMacroTabPage final : public SfxTabPage
+{
+ SvxMacroTableDtor aTbl;
+ DECL_LINK(SelectEvent_Impl, weld::TreeView&, void);
+ DECL_LINK(SelectGroup_Impl, weld::TreeView&, void);
+ DECL_LINK(SelectMacro_Impl, weld::TreeView&, void);
+
+ DECL_LINK(AssignDeleteHdl_Impl, weld::TreeView&, bool);
+ DECL_LINK(AssignDeleteClickHdl_Impl, weld::Button&, void);
+ void AssignDeleteHdl(const weld::Widget*);
+ DECL_LINK( TimeOut_Impl, Timer*, void );
+
+ std::unique_ptr<SfxMacroTabPage_Impl> mpImpl;
+
+ void InitAndSetHandler();
+ void FillEvents();
+ void EnableButtons();
+
+public:
+ SfxMacroTabPage(
+ weld::Container* pPage, weld::DialogController* pController,
+ const css::uno::Reference< css::frame::XFrame >& rxDocumentFrame,
+ const SfxItemSet& rSet
+ );
+
+ virtual ~SfxMacroTabPage() override;
+
+ void AddEvent( const OUString & rEventName, SvMacroItemId nEventId );
+
+ void ScriptChanged();
+ virtual void PageCreated (const SfxAllItemSet& aSet) override;
+ virtual void ActivatePage( const SfxItemSet& ) override;
+ void LaunchFillGroup();
+
+ // --------- inherit from the base -------------
+ virtual bool FillItemSet( SfxItemSet* rSet ) override;
+ virtual void Reset( const SfxItemSet* rSet ) override;
+
+ bool IsReadOnly() const override;
+
+ // --------- inherit from the base -------------
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet );
+};
+
+class SfxMacroAssignDlg : public SfxSingleTabDialogController
+{
+public:
+ SfxMacroAssignDlg(weld::Widget* pParent,
+ const css::uno::Reference< css::frame::XFrame >& rxDocumentFrame,
+ const SfxItemSet& rSet);
+ SfxMacroTabPage* GetTabPage()
+ {
+ return static_cast<SfxMacroTabPage*>(m_xSfxPage.get());
+ }
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/macropg.hxx b/cui/source/inc/macropg.hxx
new file mode 100644
index 000000000..5017aeeab
--- /dev/null
+++ b/cui/source/inc/macropg.hxx
@@ -0,0 +1,131 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_MACROPG_HXX
+#define INCLUDED_CUI_SOURCE_INC_MACROPG_HXX
+
+#include <sfx2/basedlgs.hxx>
+#include <sfx2/tabdlg.hxx>
+
+#include <com/sun/star/container/XNameReplace.hpp>
+#include <com/sun/star/util/XModifiable.hpp>
+#include <com/sun/star/uno/Reference.hxx>
+#include <rtl/ustring.hxx>
+
+#include <unordered_map>
+#include <vector>
+
+typedef std::unordered_map< OUString, std::pair< OUString, OUString > > EventsHash;
+
+struct EventDisplayName
+{
+ const char* pAsciiEventName;
+ const char* pEventResourceID;
+ EventDisplayName(const char* pAsciiName, const char* pResId)
+ : pAsciiEventName(pAsciiName)
+ , pEventResourceID(pResId)
+ {
+ }
+};
+typedef std::vector< EventDisplayName > EventDisplayNames;
+
+class SvxMacroTabPage_;
+class SvTabListBox;
+
+class SvxMacroTabPage_Impl;
+
+
+class SvxMacroTabPage_ : public SfxTabPage
+{
+ DECL_LINK( SelectEvent_Impl, weld::TreeView&, void );
+ DECL_LINK( AssignDeleteHdl_Impl, weld::Button&, void );
+ DECL_LINK( DoubleClickHdl_Impl, weld::TreeView&, bool );
+
+ static void GenericHandler_Impl( SvxMacroTabPage_* pThis, const weld::Button* pBtn );
+
+ css::uno::Reference< css::container::XNameReplace > m_xAppEvents;
+protected:
+ std::unique_ptr<SvxMacroTabPage_Impl> mpImpl;
+ css::uno::Reference< css::container::XNameReplace > m_xDocEvents;
+ css::uno::Reference< css::util::XModifiable > m_xModifiable;
+ EventsHash m_appEventsHash;
+ EventsHash m_docEventsHash;
+ bool bDocModified, bAppEvents, bInitialized;
+ EventDisplayNames aDisplayNames;
+
+ SvxMacroTabPage_(weld::Container* pPage, weld::DialogController* pController, const OUString& rUIXMLDescription, const OString& rID, const SfxItemSet& rItemSet);
+
+ void EnableButtons();
+ static css::uno::Any GetPropsByName( const OUString& eventName, EventsHash& eventsHash );
+ static std::pair< OUString, OUString > GetPairFromAny( const css::uno::Any& aAny );
+
+public:
+
+ virtual ~SvxMacroTabPage_() override;
+ void InitResources();
+
+ void InitAndSetHandler( const css::uno::Reference< css::container::XNameReplace >& xAppEvents, const css::uno::Reference< css::container::XNameReplace >& xDocEvents, const css::uno::Reference< css::util::XModifiable >& xModifiable );
+ virtual bool FillItemSet( SfxItemSet* rSet ) override;
+
+ virtual void Reset( const SfxItemSet* ) override;
+
+ void DisplayAppEvents( bool appEvents);
+ void SetReadOnly( bool bSet );
+ bool IsReadOnly() const override;
+};
+
+class SvxMacroTabPage : public SvxMacroTabPage_
+{
+public:
+ SvxMacroTabPage(
+ weld::Container* pPage, weld::DialogController* pController,
+ const css::uno::Reference< css::frame::XFrame >& _rxDocumentFrame,
+ const SfxItemSet& rSet,
+ css::uno::Reference< css::container::XNameReplace > const & xNameReplace,
+ sal_uInt16 nSelectedIndex
+ );
+};
+
+// class SvxMacroAssignDlg --------------------------------------------------
+
+typedef const sal_uInt16* (*GetTabPageRanges)(); // gives international Which-values
+
+class SvxMacroAssignSingleTabDialog : public SfxSingleTabDialogController
+{
+public:
+ SvxMacroAssignSingleTabDialog(weld::Window* pParent, const SfxItemSet& rOptionsSet);
+
+private:
+ DECL_LINK(OKHdl_Impl, weld::Button&, void);
+};
+
+class SvxMacroAssignDlg : public SvxMacroAssignSingleTabDialog
+{
+public:
+ SvxMacroAssignDlg(
+ weld::Window* pParent,
+ const css::uno::Reference< css::frame::XFrame >& _rxDocumentFrame,
+ const SfxItemSet& rSet,
+ const css::uno::Reference< css::container::XNameReplace >& xNameReplace,
+ sal_uInt16 nSelectedIndex
+ );
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/measure.hxx b/cui/source/inc/measure.hxx
new file mode 100644
index 000000000..7915fcc38
--- /dev/null
+++ b/cui/source/inc/measure.hxx
@@ -0,0 +1,98 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_MEASURE_HXX
+#define INCLUDED_CUI_SOURCE_INC_MEASURE_HXX
+
+#include <sfx2/basedlgs.hxx>
+#include <svx/dlgctrl.hxx>
+#include <svx/measctrl.hxx>
+
+class SdrView;
+
+/// Dialog for changing TextAttributes
+class SvxMeasurePage : public SvxTabPage
+{
+private:
+ static const sal_uInt16 pRanges[];
+
+ const SfxItemSet& rOutAttrs;
+ SfxItemSet aAttrSet;
+ const SdrView* pView;
+ MapUnit eUnit;
+
+ bool bPositionModified;
+
+ SvxRectCtl m_aCtlPosition;
+ SvxXMeasurePreview m_aCtlPreview;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrFldLineDist;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrFldHelplineOverhang;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrFldHelplineDist;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrFldHelpline1Len;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrFldHelpline2Len;
+ std::unique_ptr<weld::CheckButton> m_xTsbBelowRefEdge;
+ std::unique_ptr<weld::SpinButton> m_xMtrFldDecimalPlaces;
+ std::unique_ptr<weld::CheckButton> m_xTsbAutoPosV;
+ std::unique_ptr<weld::CheckButton> m_xTsbAutoPosH;
+ std::unique_ptr<weld::CheckButton> m_xTsbShowUnit;
+ std::unique_ptr<weld::ComboBox> m_xLbUnit;
+ std::unique_ptr<weld::CheckButton> m_xTsbParallel;
+ std::unique_ptr<weld::Label> m_xFtAutomatic;
+ std::unique_ptr<weld::CustomWeld> m_xCtlPosition;
+ std::unique_ptr<weld::CustomWeld> m_xCtlPreview;
+
+ void FillUnitLB();
+
+ DECL_LINK(ClickAutoPosHdl_Impl, weld::ToggleButton&, void);
+ DECL_LINK(ChangeAttrEditHdl_Impl, weld::MetricSpinButton&, void);
+ DECL_LINK(ChangeAttrSpinHdl_Impl, weld::SpinButton&, void);
+ DECL_LINK(ChangeAttrListBoxHdl_Impl, weld::ComboBox&, void);
+ DECL_LINK(ChangeAttrClickHdl_Impl, weld::ToggleButton&, void);
+ void ChangeAttrHdl_Impl(void const *);
+
+public:
+
+ SvxMeasurePage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
+ virtual ~SvxMeasurePage() override;
+
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
+ static const sal_uInt16* GetRanges() { return pRanges; }
+
+ virtual bool FillItemSet( SfxItemSet* ) override;
+ virtual void Reset( const SfxItemSet * ) override;
+
+ virtual void PointChanged( weld::DrawingArea* pWindow, RectPoint eRP ) override;
+
+ void Construct();
+ void SetView( const SdrView* pSdrView ) { pView = pSdrView; }
+ virtual void PageCreated(const SfxAllItemSet& aSet) override;
+
+};
+
+/* Derived from SfxSingleTabDialogController, in order to be able to be
+ informed about virtual methods by the control. */
+class SvxMeasureDialog : public SfxSingleTabDialogController
+{
+public:
+ SvxMeasureDialog(weld::Window* pParent, const SfxItemSet& rAttr,
+ const SdrView* pView);
+};
+
+#endif // INCLUDED_CUI_SOURCE_INC_MEASURE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/multipat.hxx b/cui/source/inc/multipat.hxx
new file mode 100644
index 000000000..67832c1e8
--- /dev/null
+++ b/cui/source/inc/multipat.hxx
@@ -0,0 +1,80 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_MULTIPAT_HXX
+#define INCLUDED_CUI_SOURCE_INC_MULTIPAT_HXX
+
+#include <vcl/weld.hxx>
+
+// define ----------------------------------------------------------------
+
+// different delimiter for Unix (:) and Windows (;)
+
+#ifdef UNX
+#define CLASSPATH_DELIMITER ':'
+#else
+#define CLASSPATH_DELIMITER ';'
+#endif
+
+class SvxMultiPathDialog : public weld::GenericDialogController
+{
+private:
+ std::unique_ptr<weld::TreeView> m_xRadioLB;
+ std::unique_ptr<weld::Button> m_xAddBtn;
+ std::unique_ptr<weld::Button> m_xDelBtn;
+
+ void AppendEntry(const OUString& rText, const OUString& rId);
+ void HandleEntryChecked(int nRow);
+
+ DECL_LINK(AddHdl_Impl, weld::Button&, void);
+ DECL_LINK(DelHdl_Impl, weld::Button&, void);
+ DECL_LINK(SelectHdl_Impl, weld::TreeView&, void);
+ typedef std::pair<int, int> row_col;
+ DECL_LINK(CheckHdl_Impl, const row_col&, void);
+
+public:
+ SvxMultiPathDialog(weld::Window* pParent);
+ virtual ~SvxMultiPathDialog() override;
+
+ OUString GetPath() const;
+ void SetPath(const OUString& rPath);
+ void SetTitle(const OUString& rTitle) { m_xDialog->set_title(rTitle); }
+};
+
+class SvxPathSelectDialog : public weld::GenericDialogController
+{
+private:
+ std::unique_ptr<weld::TreeView> m_xPathLB;
+ std::unique_ptr<weld::Button> m_xAddBtn;
+ std::unique_ptr<weld::Button> m_xDelBtn;
+
+ DECL_LINK(AddHdl_Impl, weld::Button&, void);
+ DECL_LINK(DelHdl_Impl, weld::Button&, void);
+ DECL_LINK(SelectHdl_Impl, weld::TreeView&, void);
+
+public:
+ SvxPathSelectDialog(weld::Window* pParent);
+
+ OUString GetPath() const;
+ void SetPath( const OUString& rPath );
+ void SetTitle(const OUString& rTitle) { m_xDialog->set_title(rTitle); }
+};
+
+#endif // INCLUDED_CUI_SOURCE_INC_MULTIPAT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/newtabledlg.hxx b/cui/source/inc/newtabledlg.hxx
new file mode 100644
index 000000000..9ec717c70
--- /dev/null
+++ b/cui/source/inc/newtabledlg.hxx
@@ -0,0 +1,75 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_NEWTABLEDLG_HXX
+#define INCLUDED_CUI_SOURCE_INC_NEWTABLEDLG_HXX
+
+#include <svx/svxdlg.hxx>
+#include <vcl/weld.hxx>
+
+class SvxNewTableDialog : public weld::GenericDialogController
+{
+private:
+ std::unique_ptr<weld::SpinButton> mxNumColumns;
+ std::unique_ptr<weld::SpinButton> mxNumRows;
+
+public:
+ SvxNewTableDialog(weld::Window* pParent);
+
+ virtual sal_Int32 getRows() const;
+ virtual sal_Int32 getColumns() const;
+};
+
+class SvxNewTableDialogWrapper : public SvxAbstractNewTableDialog
+{
+private:
+ std::shared_ptr<weld::DialogController> m_xDlg;
+
+public:
+ SvxNewTableDialogWrapper(weld::Window* pParent)
+ : m_xDlg(std::make_shared<SvxNewTableDialog>(pParent))
+ {
+ }
+
+ virtual std::shared_ptr<weld::DialogController> getDialogController() override
+ {
+ return m_xDlg;
+ }
+
+ virtual sal_Int32 getRows() const override
+ {
+ SvxNewTableDialog* pDlg = dynamic_cast<SvxNewTableDialog*>(m_xDlg.get());
+ if (pDlg)
+ return pDlg->getRows();
+
+ return 0;
+ }
+
+ virtual sal_Int32 getColumns() const override
+ {
+ SvxNewTableDialog* pDlg = dynamic_cast<SvxNewTableDialog*>(m_xDlg.get());
+ if (pDlg)
+ return pDlg->getColumns();
+
+ return 0;
+ }
+};
+
+#endif // INCLUDED_CUI_SOURCE_INC_NEWTABLEDLG_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/numfmt.hxx b/cui/source/inc/numfmt.hxx
new file mode 100644
index 000000000..1be328d94
--- /dev/null
+++ b/cui/source/inc/numfmt.hxx
@@ -0,0 +1,157 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_NUMFMT_HXX
+#define INCLUDED_CUI_SOURCE_INC_NUMFMT_HXX
+
+
+#include <rtl/ustring.hxx>
+#include <sfx2/tabdlg.hxx>
+#include <svx/langbox.hxx>
+#include <tools/color.hxx>
+#include <vcl/customweld.hxx>
+#include <vcl/weld.hxx>
+
+class SvxNumberFormatShell;
+class SvxNumberInfoItem;
+class vector;
+
+
+class SvxNumberPreview : public weld::CustomWidgetController
+{
+private:
+ OUString aPrevStr;
+ Color aPrevCol;
+ sal_Int32 mnPos;
+ sal_Unicode mnChar;
+
+protected:
+ virtual void Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect) override;
+
+public:
+ SvxNumberPreview();
+
+ void NotifyChange( const OUString& rPrevStr, const Color* pColor = nullptr );
+
+ virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override
+ {
+ CustomWidgetController::SetDrawingArea(pDrawingArea);
+ pDrawingArea->set_size_request(-1, pDrawingArea->get_text_height() * 3);
+ }
+};
+
+class SvxNumberFormatTabPage : public SfxTabPage
+{
+ static const sal_uInt16 pRanges[];
+
+public:
+ SvxNumberFormatTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs);
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController,
+ const SfxItemSet* rAttrSet );
+ virtual ~SvxNumberFormatTabPage() override;
+ // Returns area information.
+ static const sal_uInt16* GetRanges() { return pRanges; }
+
+ virtual bool FillItemSet( SfxItemSet* rSet ) override;
+ virtual void Reset( const SfxItemSet* rSet ) override;
+ virtual DeactivateRC DeactivatePage ( SfxItemSet* pSet ) override;
+
+ void HideLanguage(bool bFlag=true);
+ virtual void PageCreated(const SfxAllItemSet& aSet) override;
+
+private:
+ std::unique_ptr<SvxNumberInfoItem> pNumItem;
+ std::unique_ptr<SvxNumberFormatShell> pNumFmtShell;
+ sal_uLong nInitFormat;
+ short m_nLbFormatSelPosEdComment;
+
+ bool bNumItemFlag; ///< for handling with DocShell
+ bool bOneAreaFlag;
+ bool bLegacyAutomaticCurrency;
+ short nFixedCategory;
+
+ OUString sAutomaticLangEntry;
+ OUString sAutomaticCurrencyEntry;
+
+ SvxNumberPreview m_aWndPreview;
+ std::unique_ptr<weld::Label> m_xFtCategory;
+ std::unique_ptr<weld::TreeView> m_xLbCategory;
+ std::unique_ptr<weld::Label> m_xFtFormat;
+ std::unique_ptr<weld::ComboBox> m_xLbCurrency;
+ std::unique_ptr<weld::TreeView> m_xLbFormat;
+ std::unique_ptr<weld::Label> m_xFtLanguage;
+ std::unique_ptr<weld::CheckButton> m_xCbSourceFormat;
+ std::unique_ptr<weld::Label> m_xFtOptions;
+ std::unique_ptr<weld::Label> m_xFtDecimals;
+ std::unique_ptr<weld::SpinButton> m_xEdDecimals;
+ std::unique_ptr<weld::Label> m_xFtDenominator;
+ std::unique_ptr<weld::SpinButton> m_xEdDenominator;
+ std::unique_ptr<weld::CheckButton> m_xBtnNegRed;
+ std::unique_ptr<weld::Label> m_xFtLeadZeroes;
+ std::unique_ptr<weld::SpinButton> m_xEdLeadZeroes;
+ std::unique_ptr<weld::CheckButton> m_xBtnThousand;
+ std::unique_ptr<weld::CheckButton> m_xBtnEngineering;
+ std::unique_ptr<weld::Widget> m_xFormatCodeFrame;
+ std::unique_ptr<weld::Entry> m_xEdFormat;
+ std::unique_ptr<weld::Button> m_xIbAdd;
+ std::unique_ptr<weld::Button> m_xIbInfo;
+ std::unique_ptr<weld::Button> m_xIbRemove;
+ std::unique_ptr<weld::Label> m_xFtComment;
+ std::unique_ptr<weld::Entry> m_xEdComment;
+ std::unique_ptr<SvxLanguageBox> m_xLbLanguage;
+ std::unique_ptr<weld::CustomWeld> m_xWndPreview;
+
+ void Init_Impl();
+ void FillCurrencyBox();
+ void FillFormatListBox_Impl( std::vector<OUString>& rEntries );
+ void UpdateOptions_Impl( bool bCheckCatChange );
+ void UpdateFormatListBox_Impl( bool bCat, bool bUpdateEdit );
+ void UpdateThousandEngineeringCheckBox();
+ void UpdateDecimalsDenominatorEditBox();
+ void Obstructing();
+ void EnableBySourceFormat_Impl();
+ void SetCategory( sal_uInt16 nPos );
+ OUString GetExpColorString( Color*& rpPreviewColor, const OUString& aFormatStr, short nTmpCatPos );
+ void MakePreviewText( const OUString& rFormat );
+ void ChangePreviewText( sal_uInt16 nPos );
+ void AddAutomaticLanguage_Impl(LanguageType eAutoLang, bool bSelect);
+ bool Click_Impl(weld::Button& rIB);
+ // Handler
+ DECL_LINK(LostFocusHdl_Impl, weld::Widget&, void);
+ DECL_LINK(DoubleClickHdl_Impl, weld::TreeView&, bool);
+ DECL_LINK(SelFormatListBoxHdl_Impl, weld::ComboBox&, void);
+ DECL_LINK(SelFormatTreeListBoxHdl_Impl, weld::TreeView&, void);
+ DECL_LINK(SelFormatClickHdl_Impl, weld::Button&, void);
+ void SelFormatHdl_Impl(weld::Widget*);
+ DECL_LINK(ClickHdl_Impl, weld::Button&, void);
+ DECL_LINK(EditModifyHdl_Impl, weld::Entry&, void);
+ DECL_LINK(OptEditHdl_Impl, weld::SpinButton&, void);
+ DECL_LINK(OptClickHdl_Impl, weld::Button&, void);
+ void EditHdl_Impl(const weld::Entry*);
+ void OptHdl_Impl(const weld::Widget*);
+
+ // set and get currency, taking into account if the legacy
+ // automatic currency entry exists
+ void set_active_currency(sal_Int32 nCurCurrencyEntryPos);
+ sal_uInt32 get_active_currency() const;
+
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/numpages.hxx b/cui/source/inc/numpages.hxx
new file mode 100644
index 000000000..ebbe46625
--- /dev/null
+++ b/cui/source/inc/numpages.hxx
@@ -0,0 +1,388 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_NUMPAGES_HXX
+#define INCLUDED_CUI_SOURCE_INC_NUMPAGES_HXX
+
+#include <vector>
+#include <memory>
+
+#include <sfx2/tabdlg.hxx>
+#include <editeng/numdef.hxx>
+#include <editeng/svxenum.hxx>
+#include <svtools/ctrlbox.hxx>
+#include <vcl/customweld.hxx>
+#include <vcl/timer.hxx>
+#include <cui/numberingpreview.hxx>
+
+#define MN_GALLERY_ENTRY 100
+
+class ColorListBox;
+class SvxNumValueSet;
+class SvxNumRule;
+class SvxBmpNumValueSet;
+class SvxBrushItem;
+struct ImplSVEvent;
+
+struct SvxNumSettings_Impl
+{
+ SvxNumType nNumberType;
+ short nParentNumbering;
+ OUString sPrefix;
+ OUString sSuffix;
+ OUString sBulletChar;
+ OUString sBulletFont;
+ SvxNumSettings_Impl() :
+ nNumberType(SVX_NUM_CHARS_UPPER_LETTER),
+ nParentNumbering(0)
+ {}
+};
+
+typedef std::vector<std::unique_ptr<SvxNumSettings_Impl> > SvxNumSettingsArr_Impl;
+
+
+class SvxSingleNumPickTabPage final : public SfxTabPage
+{
+ SvxNumSettingsArr_Impl aNumSettingsArr;
+ std::unique_ptr<SvxNumRule> pActNum;
+ std::unique_ptr<SvxNumRule> pSaveNum;
+ sal_uInt16 nActNumLvl;
+ bool bModified : 1;
+ bool bPreset : 1;
+
+ sal_uInt16 nNumItemId;
+
+ std::unique_ptr<SvxNumValueSet> m_xExamplesVS;
+ std::unique_ptr<weld::CustomWeld> m_xExamplesVSWin;
+
+ DECL_LINK(NumSelectHdl_Impl, ValueSet*, void);
+ DECL_LINK(DoubleClickHdl_Impl, ValueSet*, void);
+
+public:
+ SvxSingleNumPickTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
+ virtual ~SvxSingleNumPickTabPage() override;
+
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController,
+ const SfxItemSet* rAttrSet);
+
+ virtual void ActivatePage(const SfxItemSet& rSet) override;
+ virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override;
+ virtual bool FillItemSet( SfxItemSet* rSet ) override;
+ virtual void Reset( const SfxItemSet* rSet ) override;
+};
+
+class SvxBulletPickTabPage final : public SfxTabPage
+{
+ std::unique_ptr<SvxNumRule> pActNum;
+ std::unique_ptr<SvxNumRule> pSaveNum;
+ sal_uInt16 nActNumLvl;
+ bool bModified : 1;
+ bool bPreset : 1;
+ sal_uInt16 nNumItemId;
+
+ OUString sBulletCharFormatName;
+
+ std::unique_ptr<SvxNumValueSet> m_xExamplesVS;
+ std::unique_ptr<weld::CustomWeld> m_xExamplesVSWin;
+
+ DECL_LINK(NumSelectHdl_Impl, ValueSet*, void);
+ DECL_LINK(DoubleClickHdl_Impl, ValueSet*, void);
+public:
+ SvxBulletPickTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
+ virtual ~SvxBulletPickTabPage() override;
+
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController,
+ const SfxItemSet* rAttrSet);
+
+ virtual void ActivatePage(const SfxItemSet& rSet) override;
+ virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override;
+ virtual bool FillItemSet( SfxItemSet* rSet ) override;
+ virtual void Reset( const SfxItemSet* rSet ) override;
+
+ virtual void PageCreated(const SfxAllItemSet& aSet) override;
+};
+
+#define NUM_VALUSET_COUNT 16
+
+/// TabPage for complete numeration
+class SvxNumPickTabPage final : public SfxTabPage
+{
+ OUString sNumCharFmtName;
+ OUString sBulletCharFormatName;
+
+ SvxNumSettingsArr_Impl aNumSettingsArrays[NUM_VALUSET_COUNT]; // is initialized with the five formats
+
+ std::unique_ptr<SvxNumRule> pActNum;
+ std::unique_ptr<SvxNumRule> pSaveNum;
+ sal_uInt16 nActNumLvl;
+ sal_uInt16 nNumItemId;
+ bool bModified : 1;
+ bool bPreset : 1;
+
+ std::unique_ptr<SvxNumValueSet> m_xExamplesVS;
+ std::unique_ptr<weld::CustomWeld> m_xExamplesVSWin;
+
+ DECL_LINK(NumSelectHdl_Impl, ValueSet*, void);
+ DECL_LINK(DoubleClickHdl_Impl, ValueSet*, void);
+
+public:
+ SvxNumPickTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
+ virtual ~SvxNumPickTabPage() override;
+
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController,
+ const SfxItemSet* rAttrSet);
+
+ virtual void ActivatePage(const SfxItemSet& rSet) override;
+ virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override;
+ virtual bool FillItemSet( SfxItemSet* rSet ) override;
+ virtual void Reset( const SfxItemSet* rSet ) override;
+
+ void SetCharFormatNames(const OUString& rCharName, const OUString& rBulName)
+ { sNumCharFmtName = rCharName;
+ sBulletCharFormatName = rBulName;}
+ virtual void PageCreated(const SfxAllItemSet& aSet) override;
+};
+
+class SvxBitmapPickTabPage final : public SfxTabPage
+{
+ std::vector<OUString> aGrfNames;
+
+ std::unique_ptr<SvxNumRule> pActNum;
+ std::unique_ptr<SvxNumRule> pSaveNum;
+ sal_uInt16 nActNumLvl;
+ sal_uInt16 nNumItemId;
+ MapUnit eCoreUnit;
+ bool bModified : 1;
+ bool bPreset : 1;
+
+ std::unique_ptr<weld::Label> m_xErrorText;
+ std::unique_ptr<weld::Button> m_xBtBrowseFile;
+ std::unique_ptr<SvxBmpNumValueSet> m_xExamplesVS;
+ std::unique_ptr<weld::CustomWeld> m_xExamplesVSWin;
+
+ DECL_LINK(NumSelectHdl_Impl, ValueSet*, void);
+ DECL_LINK(DoubleClickHdl_Impl, ValueSet*, void);
+ DECL_LINK(ClickAddBrowseHdl_Impl, weld::Button&, void);
+
+public:
+ SvxBitmapPickTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
+ virtual ~SvxBitmapPickTabPage() override;
+
+ static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController,
+ const SfxItemSet* rAttrSet);
+
+ virtual void ActivatePage(const SfxItemSet& rSet) override;
+ virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override;
+ virtual bool FillItemSet( SfxItemSet* rSet ) override;
+ virtual void Reset( const SfxItemSet* rSet ) override;
+};
+
+class SvxNumOptionsTabPage : public SfxTabPage
+{
+ OUString m_sNumCharFmtName;
+ OUString m_sBulletCharFormatName;
+
+ Timer aInvalidateTimer;
+
+ std::unique_ptr<SvxNumRule> pActNum;
+ std::unique_ptr<SvxNumRule> pSaveNum;
+
+ Size aInitSize[SVX_MAX_NUM];
+
+ ImplSVEvent* m_pLevelHdlEvent;
+
+ bool bLastWidthModified : 1;
+ bool bModified : 1;
+ bool bPreset : 1;
+ bool bAutomaticCharStyles: 1;
+ bool bHTMLMode : 1;
+
+ std::vector<OUString> aGrfNames;
+ vcl::Font aActBulletFont;
+
+ sal_uInt8 nBullet;
+ sal_uInt16 nActNumLvl;
+ sal_uInt16 nNumItemId;
+ MapUnit eCoreUnit;
+
+ SvxNumberingPreview m_aPreviewWIN;
+ std::unique_ptr<weld::Widget> m_xGrid;
+ std::unique_ptr<weld::TreeView> m_xLevelLB;
+ std::unique_ptr<weld::ComboBox> m_xFmtLB;
+ std::unique_ptr<weld::Label> m_xSeparatorFT;
+ std::unique_ptr<weld::Label> m_xPrefixFT;
+ std::unique_ptr<weld::Entry> m_xPrefixED;
+ std::unique_ptr<weld::Label> m_xSuffixFT;
+ std::unique_ptr<weld::Entry> m_xSuffixED;
+ std::unique_ptr<weld::Label> m_xCharFmtFT;
+ std::unique_ptr<weld::ComboBox> m_xCharFmtLB;
+ std::unique_ptr<weld::Label> m_xBulColorFT;
+ std::unique_ptr<ColorListBox> m_xBulColLB;
+ std::unique_ptr<weld::Label> m_xBulRelSizeFT;
+ std::unique_ptr<weld::MetricSpinButton> m_xBulRelSizeMF;
+ std::unique_ptr<weld::Label> m_xAllLevelFT;
+ std::unique_ptr<weld::SpinButton> m_xAllLevelNF;
+ std::unique_ptr<weld::Label> m_xStartFT;
+ std::unique_ptr<weld::SpinButton> m_xStartED;
+ std::unique_ptr<weld::Label> m_xBulletFT;
+ std::unique_ptr<weld::Button> m_xBulletPB;
+ std::unique_ptr<weld::Label> m_xBitmapFT;
+ std::unique_ptr<weld::MenuButton> m_xBitmapMB;
+ std::unique_ptr<weld::Label> m_xWidthFT;
+ std::unique_ptr<weld::MetricSpinButton> m_xWidthMF;
+ std::unique_ptr<weld::Label> m_xHeightFT;
+ std::unique_ptr<weld::MetricSpinButton> m_xHeightMF;
+ std::unique_ptr<weld::CheckButton> m_xRatioCB;
+ std::unique_ptr<weld::Label> m_xOrientFT;
+ std::unique_ptr<weld::ComboBox> m_xOrientLB;
+ std::unique_ptr<weld::Widget> m_xAllLevelsFrame;
+ std::unique_ptr<weld::Menu> m_xGalleryMenu;
+ std::unique_ptr<weld::CheckButton> m_xSameLevelCB;
+ std::unique_ptr<weld::CustomWeld> m_xPreviewWIN;
+
+ void InitControls();
+ /** To switch between the numbering type
+ 0 - Number;
+ 1 - Bullet;
+ 2 - Bitmap; */
+ void SwitchNumberType( sal_uInt8 nType );
+ void CheckForStartValue_Impl(sal_uInt16 nNumberingType);
+
+ DECL_LINK(NumberTypeSelectHdl_Impl, weld::ComboBox&, void);
+ DECL_LINK(LevelHdl_Impl, weld::TreeView&, void);
+ DECL_LINK(LevelHdl, void *, void);
+ DECL_LINK(PopupActivateHdl_Impl, weld::ToggleButton&, void);
+ DECL_LINK(GraphicHdl_Impl, const OString&, void);
+ DECL_LINK(BulletHdl_Impl, weld::Button&, void);
+ DECL_LINK(SizeHdl_Impl, weld::MetricSpinButton&, void);
+ DECL_LINK(RatioHdl_Impl, weld::ToggleButton&, void);
+ DECL_LINK(CharFmtHdl_Impl, weld::ComboBox&, void);
+ DECL_LINK(EditModifyHdl_Impl, weld::Entry&, void);
+ DECL_LINK(SpinModifyHdl_Impl, weld::SpinButton&, void);
+ DECL_LINK(AllLevelHdl_Impl, weld::SpinButton&, void);
+ DECL_LINK(OrientHdl_Impl, weld::ComboBox&, void);
+ DECL_LINK(SameLevelHdl_Impl, weld::ToggleButton&, void);
+ DECL_LINK(BulColorHdl_Impl, ColorListBox&, void);
+ DECL_LINK(BulRelSizeHdl_Impl, weld::MetricSpinButton&, void);
+ DECL_LINK(PreviewInvalidateHdl_Impl, Timer*, void);
+ void EditModifyHdl_Impl(const weld::Entry*);
+
+public:
+ SvxNumOptionsTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
+ virtual ~SvxNumOptionsTabPage() override;
+
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController,
+ const SfxItemSet* rAttrSet);
+
+ virtual void ActivatePage(const SfxItemSet& rSet) override;
+ virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override;
+ virtual bool FillItemSet( SfxItemSet* rSet ) override;
+ virtual void Reset( const SfxItemSet* rSet ) override;
+
+ void SetCharFmts(const OUString& rNumName, const OUString& rBulletName)
+ {
+ m_sNumCharFmtName = rNumName;
+ m_sBulletCharFormatName = rBulletName;
+ }
+ void SetMetric(FieldUnit eSet);
+
+ void SetModified(bool bRepaint = true);
+ virtual void PageCreated(const SfxAllItemSet& aSet) override;
+};
+
+
+class SvxNumPositionTabPage : public SfxTabPage
+{
+ std::unique_ptr<SvxNumRule> pActNum;
+ std::unique_ptr<SvxNumRule> pSaveNum;
+
+ ImplSVEvent* m_pLevelHdlEvent;
+ sal_uInt16 nActNumLvl;
+ sal_uInt16 nNumItemId;
+ MapUnit eCoreUnit;
+
+ bool bModified : 1;
+ bool bPreset : 1;
+ bool bInInintControl : 1; // workaround for Modify-error, is said to be corrected from 391 on
+ bool bLabelAlignmentPosAndSpaceModeActive;
+
+ SvxNumberingPreview m_aPreviewWIN;
+ std::unique_ptr<weld::TreeView> m_xLevelLB;
+ // former set of controls shown for numbering rules containing list level
+ // attributes in SvxNumberFormat::SvxNumPositionAndSpaceMode == LABEL_WIDTH_AND_POSITION
+ std::unique_ptr<weld::Label> m_xDistBorderFT;
+ std::unique_ptr<weld::MetricSpinButton> m_xDistBorderMF;
+ std::unique_ptr<weld::CheckButton> m_xRelativeCB;
+ std::unique_ptr<weld::Label> m_xIndentFT;
+ std::unique_ptr<weld::MetricSpinButton> m_xIndentMF;
+ std::unique_ptr<weld::Label> m_xDistNumFT;
+ std::unique_ptr<weld::MetricSpinButton> m_xDistNumMF;
+ std::unique_ptr<weld::Label> m_xAlignFT;
+ std::unique_ptr<weld::ComboBox> m_xAlignLB;
+ // new set of controls shown for numbering rules containing list level
+ // attributes in SvxNumberFormat::SvxNumPositionAndSpaceMode == LABEL_ALIGNMENT
+ std::unique_ptr<weld::Label> m_xLabelFollowedByFT;
+ std::unique_ptr<weld::ComboBox> m_xLabelFollowedByLB;
+ std::unique_ptr<weld::Label> m_xListtabFT;
+ std::unique_ptr<weld::MetricSpinButton> m_xListtabMF;
+ std::unique_ptr<weld::Label>m_xAlign2FT;
+ std::unique_ptr<weld::ComboBox> m_xAlign2LB;
+ std::unique_ptr<weld::Label> m_xAlignedAtFT;
+ std::unique_ptr<weld::MetricSpinButton> m_xAlignedAtMF;
+ std::unique_ptr<weld::Label> m_xIndentAtFT;
+ std::unique_ptr<weld::MetricSpinButton> m_xIndentAtMF;
+ std::unique_ptr<weld::Button> m_xStandardPB;
+ std::unique_ptr<weld::CustomWeld> m_xPreviewWIN;
+
+ void InitControls();
+
+ DECL_LINK(LevelHdl_Impl, weld::TreeView&, void);
+ DECL_LINK(LevelHdl, void *, void);
+ DECL_LINK(EditModifyHdl_Impl, weld::ComboBox&, void);
+ DECL_LINK(DistanceHdl_Impl, weld::MetricSpinButton&, void);
+ DECL_LINK(RelativeHdl_Impl, weld::ToggleButton&, void);
+ DECL_LINK(StandardHdl_Impl, weld::Button&, void);
+
+ void InitPosAndSpaceMode();
+ void ShowControlsDependingOnPosAndSpaceMode();
+
+ DECL_LINK(LabelFollowedByHdl_Impl, weld::ComboBox&, void);
+ DECL_LINK(ListtabPosHdl_Impl, weld::MetricSpinButton&, void);
+ DECL_LINK(AlignAtHdl_Impl, weld::MetricSpinButton&, void);
+ DECL_LINK(IndentAtHdl_Impl, weld::MetricSpinButton&, void);
+
+public:
+ SvxNumPositionTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
+ virtual ~SvxNumPositionTabPage() override;
+
+ virtual void ActivatePage(const SfxItemSet& rSet) override;
+ virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override;
+ virtual bool FillItemSet( SfxItemSet* rSet ) override;
+ virtual void Reset( const SfxItemSet* rSet ) override;
+
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController,
+ const SfxItemSet* rAttrSet);
+
+ void SetMetric(FieldUnit eSet);
+ void SetModified();
+ virtual void PageCreated(const SfxAllItemSet& aSet) override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/optasian.hxx b/cui/source/inc/optasian.hxx
new file mode 100644
index 000000000..d8febfb7b
--- /dev/null
+++ b/cui/source/inc/optasian.hxx
@@ -0,0 +1,61 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_OPTASIAN_HXX
+#define INCLUDED_CUI_SOURCE_INC_OPTASIAN_HXX
+
+#include <memory>
+#include <sfx2/tabdlg.hxx>
+#include <svx/langbox.hxx>
+
+struct SvxAsianLayoutPage_Impl;
+class SvxAsianLayoutPage : public SfxTabPage
+{
+ std::unique_ptr<SvxAsianLayoutPage_Impl> pImpl;
+
+ std::unique_ptr<weld::RadioButton> m_xCharKerningRB;
+ std::unique_ptr<weld::RadioButton> m_xCharPunctKerningRB;
+ std::unique_ptr<weld::RadioButton> m_xNoCompressionRB;
+ std::unique_ptr<weld::RadioButton> m_xPunctCompressionRB;
+ std::unique_ptr<weld::RadioButton> m_xPunctKanaCompressionRB;
+ std::unique_ptr<weld::Label> m_xLanguageFT;
+ std::unique_ptr<SvxLanguageBox> m_xLanguageLB;
+ std::unique_ptr<weld::CheckButton> m_xStandardCB;
+ std::unique_ptr<weld::Label> m_xStartFT;
+ std::unique_ptr<weld::Entry> m_xStartED;
+ std::unique_ptr<weld::Label> m_xEndFT;
+ std::unique_ptr<weld::Entry> m_xEndED;
+ std::unique_ptr<weld::Label> m_xHintFT;
+
+ DECL_LINK(LanguageHdl, weld::ComboBox&, void);
+ DECL_LINK(ChangeStandardHdl, weld::ToggleButton&, void);
+ DECL_LINK(ModifyHdl, weld::Entry&, void);
+
+public:
+ SvxAsianLayoutPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet );
+ virtual ~SvxAsianLayoutPage() override;
+
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet );
+ static const sal_uInt16* GetRanges();
+ virtual bool FillItemSet( SfxItemSet* rSet ) override;
+ virtual void Reset( const SfxItemSet* rSet ) override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/optdict.hxx b/cui/source/inc/optdict.hxx
new file mode 100644
index 000000000..7d8ffd522
--- /dev/null
+++ b/cui/source/inc/optdict.hxx
@@ -0,0 +1,112 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_OPTDICT_HXX
+#define INCLUDED_CUI_SOURCE_INC_OPTDICT_HXX
+
+#include <vcl/weld.hxx>
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <svx/langbox.hxx>
+
+namespace com::sun::star{
+ namespace linguistic2{
+ class XDictionary;
+ class XSpellChecker1;
+ }
+}
+
+// forward ---------------------------------------------------------------
+
+
+// class SvxNewDictionaryDialog ------------------------------------------
+
+class SvxNewDictionaryDialog : public weld::GenericDialogController
+{
+private:
+ std::unique_ptr<weld::Entry> m_xNameEdit;
+ std::unique_ptr<SvxLanguageBox> m_xLanguageLB;
+ std::unique_ptr<weld::CheckButton> m_xExceptBtn;
+ std::unique_ptr<weld::Button> m_xOKBtn;
+ css::uno::Reference<css::linguistic2::XDictionary> m_xNewDic;
+
+ DECL_LINK(OKHdl_Impl, weld::Button&, void);
+ DECL_LINK(ModifyHdl_Impl, weld::Entry&, void);
+
+public:
+ SvxNewDictionaryDialog(weld::Window* pParent);
+
+ const css::uno::Reference<css::linguistic2::XDictionary>& GetNewDictionary() const { return m_xNewDic; }
+};
+
+// class SvxEditDictionaryDialog -----------------------------------------
+
+class SvxEditDictionaryDialog : public weld::GenericDialogController
+{
+private:
+ OUString sModify;
+ OUString sNew;
+ OUString sReplaceFT_Text;
+
+ css::uno::Sequence<
+ css::uno::Reference<
+ css::linguistic2::XDictionary > > aDics; //! snapshot copy to work on
+
+ bool bFirstSelect;
+ bool bDoNothing;
+ bool bDicIsReadonly;
+
+ weld::TreeView* m_pWordsLB;
+ std::unique_ptr<weld::ComboBox> m_xAllDictsLB;
+ std::unique_ptr<weld::Label> m_xLangFT;
+ std::unique_ptr<SvxLanguageBox> m_xLangLB;
+ std::unique_ptr<weld::Entry> m_xWordED;
+ std::unique_ptr<weld::Label> m_xReplaceFT;
+ std::unique_ptr<weld::Entry> m_xReplaceED;
+ std::unique_ptr<weld::TreeView> m_xSingleColumnLB;
+ std::unique_ptr<weld::TreeView> m_xDoubleColumnLB;
+ std::unique_ptr<weld::Button> m_xNewReplacePB;
+ std::unique_ptr<weld::Button> m_xDeletePB;
+
+ DECL_LINK(SelectBookHdl_Impl, weld::ComboBox&, void);
+ DECL_LINK(SelectLangHdl_Impl, weld::ComboBox&, void);
+ DECL_LINK(SelectHdl, weld::TreeView&, void);
+ DECL_LINK(NewDelButtonHdl, weld::Button&, void);
+ DECL_LINK(NewDelActionHdl, weld::Entry&, bool);
+ DECL_LINK(ModifyHdl, weld::Entry&, void);
+ DECL_LINK(EntrySizeAllocHdl, const Size&, void);
+ DECL_STATIC_LINK(SvxEditDictionaryDialog, InsertTextHdl, OUString&, bool);
+ bool NewDelHdl(const weld::Widget*);
+
+ void ShowWords_Impl( sal_uInt16 nId );
+ void SetLanguage_Impl( LanguageType nLanguage );
+ bool IsDicReadonly_Impl() const { return bDicIsReadonly; }
+ void SetDicReadonly_Impl( css::uno::Reference<
+ css::linguistic2::XDictionary > const &xDic );
+
+ void RemoveDictEntry(int nEntry);
+ int GetLBInsertPos(const OUString &rDicWord);
+
+public:
+ SvxEditDictionaryDialog(weld::Window* pParent, const OUString& rName);
+ virtual ~SvxEditDictionaryDialog() override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/optlingu.hxx b/cui/source/inc/optlingu.hxx
new file mode 100644
index 000000000..cbaaaefdf
--- /dev/null
+++ b/cui/source/inc/optlingu.hxx
@@ -0,0 +1,152 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_OPTLINGU_HXX
+#define INCLUDED_CUI_SOURCE_INC_OPTLINGU_HXX
+
+#include <sfx2/tabdlg.hxx>
+#include <svx/langbox.hxx>
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/Sequence.hxx>
+
+namespace com::sun::star{
+ namespace beans{
+ class XPropertySet;
+ }
+ namespace linguistic2{
+ class XDictionary;
+ class XDictionaryList;
+ class XLinguProperties;
+ }
+}
+
+class SvTreeListEntry;
+class SvxLinguData_Impl;
+
+// define ----------------------------------------------------------------
+
+#define GROUP_MODULES (sal_uInt16(0x0008))
+
+// forward ---------------------------------------------------------------
+
+class SvxEditModulesDlg : public weld::GenericDialogController
+{
+ OUString sSpell;
+ OUString sHyph;
+ OUString sThes;
+ OUString sGrammar;
+
+ std::unique_ptr<SvxLinguData_Impl> pDefaultLinguData;
+ SvxLinguData_Impl& rLinguData;
+
+ std::unique_ptr<weld::TreeView> m_xModulesCLB;
+ std::unique_ptr<weld::Button> m_xPrioUpPB;
+ std::unique_ptr<weld::Button> m_xPrioDownPB;
+ std::unique_ptr<weld::Button> m_xBackPB;
+ std::unique_ptr<weld::LinkButton> m_xMoreDictsLink;
+ std::unique_ptr<weld::Button> m_xClosePB;
+ std::unique_ptr<SvxLanguageBox> m_xLanguageLB;
+
+ DECL_LINK( SelectHdl_Impl, weld::TreeView&, void );
+ DECL_LINK( UpDownHdl_Impl, weld::Button&, void );
+ DECL_LINK( ClickHdl_Impl, weld::Button&, void );
+ DECL_LINK( BackHdl_Impl, weld::Button&, void );
+ DECL_LINK( LangSelectListBoxHdl_Impl, weld::ComboBox&, void );
+ typedef std::pair<int, int> row_col;
+ DECL_LINK( BoxCheckButtonHdl_Impl, const row_col&, void );
+ void LangSelectHdl_Impl(const SvxLanguageBox* pBox);
+
+public:
+ SvxEditModulesDlg(weld::Window* pParent, SvxLinguData_Impl& rData);
+ virtual ~SvxEditModulesDlg() override;
+};
+
+struct ImplSVEvent;
+
+// class SvxLinguTabPage -------------------------------------------------
+class SvxLinguTabPage : public SfxTabPage
+{
+private:
+ OUString sCapitalWords;
+ OUString sWordsWithDigits;
+ OUString sSpellSpecial;
+ OUString sSpellAuto;
+ OUString sGrammarAuto;
+ OUString sNumMinWordlen;
+ OUString sNumPreBreak;
+ OUString sNumPostBreak;
+ OUString sHyphAuto;
+ OUString sHyphSpecial;
+
+ int nUPN_HYPH_MIN_WORD_LENGTH;
+ int nUPN_HYPH_MIN_LEADING;
+ int nUPN_HYPH_MIN_TRAILING;
+
+ ImplSVEvent* m_nDlbClickEventId;
+
+ css::uno::Reference<
+ css::linguistic2::XLinguProperties > xProp;
+
+ css::uno::Reference<
+ css::linguistic2::XDictionaryList > xDicList;
+ css::uno::Sequence<
+ css::uno::Reference<
+ css::linguistic2::XDictionary > > aDics;
+
+ std::unique_ptr<SvxLinguData_Impl> pLinguData;
+
+ std::unique_ptr<weld::Label> m_xLinguModulesFT;
+ std::unique_ptr<weld::TreeView> m_xLinguModulesCLB;
+ std::unique_ptr<weld::Button> m_xLinguModulesEditPB;
+ std::unique_ptr<weld::Label> m_xLinguDicsFT;
+ std::unique_ptr<weld::TreeView> m_xLinguDicsCLB;
+ std::unique_ptr<weld::Button> m_xLinguDicsNewPB;
+ std::unique_ptr<weld::Button> m_xLinguDicsEditPB;
+ std::unique_ptr<weld::Button> m_xLinguDicsDelPB;
+ std::unique_ptr<weld::TreeView> m_xLinguOptionsCLB;
+ std::unique_ptr<weld::Button> m_xLinguOptionsEditPB;
+ std::unique_ptr<weld::LinkButton> m_xMoreDictsLink;
+
+ void AddDicBoxEntry( const css::uno::Reference< css::linguistic2::XDictionary > &rxDic, sal_uInt16 nIdx );
+ static sal_uInt32 GetDicUserData( const css::uno::Reference< css::linguistic2::XDictionary > &rxDic, sal_uInt16 nIdx );
+
+ DECL_LINK( SelectHdl_Impl, weld::TreeView&, void );
+ DECL_LINK( ClickHdl_Impl, weld::Button&, void );
+ DECL_LINK( BoxDoubleClickHdl_Impl, weld::TreeView&, bool );
+ typedef std::pair<int, int> row_col;
+ DECL_LINK( ModulesBoxCheckButtonHdl_Impl, const row_col&, void );
+ DECL_LINK( DicsBoxCheckButtonHdl_Impl, const row_col&, void );
+ DECL_LINK( PostDblClickHdl_Impl, void *, void);
+
+ void UpdateModulesBox_Impl();
+ void UpdateDicBox_Impl();
+
+public:
+ SvxLinguTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreSet);
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet );
+ virtual ~SvxLinguTabPage() override;
+
+ virtual bool FillItemSet( SfxItemSet* rSet ) override;
+ virtual void Reset( const SfxItemSet* rSet ) override;
+
+ void HideGroups( sal_uInt16 nGrp );
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/optpath.hxx b/cui/source/inc/optpath.hxx
new file mode 100644
index 000000000..cc3d67b42
--- /dev/null
+++ b/cui/source/inc/optpath.hxx
@@ -0,0 +1,71 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_OPTPATH_HXX
+#define INCLUDED_CUI_SOURCE_INC_OPTPATH_HXX
+
+#include <memory>
+#include <sfx2/tabdlg.hxx>
+
+#include <com/sun/star/ui/dialogs/XFolderPicker2.hpp>
+#include <svtools/dialogclosedlistener.hxx>
+
+// forward ---------------------------------------------------------------
+struct OptPath_Impl;
+class SvxPathTabPage;
+
+// class SvxPathTabPage --------------------------------------------------
+class SvxPathTabPage : public SfxTabPage
+{
+private:
+ std::unique_ptr<OptPath_Impl> pImpl;
+
+ rtl::Reference< ::svt::DialogClosedListener > xDialogListener;
+ css::uno::Reference< css::ui::dialogs::XFolderPicker2 > xFolderPicker;
+
+ std::unique_ptr<weld::Button> m_xStandardBtn;
+ std::unique_ptr<weld::Button> m_xPathBtn;
+ std::unique_ptr<weld::TreeView> m_xPathBox;
+
+ void ChangeCurrentEntry( const OUString& _rFolder );
+
+ DECL_LINK(PathHdl_Impl, weld::Button&, void);
+ DECL_LINK(DoubleClickPathHdl_Impl, weld::TreeView&, bool);
+ DECL_LINK(StandardHdl_Impl, weld::Button&, void);
+
+ DECL_LINK(PathSelect_Impl, weld::TreeView&, void);
+
+ DECL_LINK(DialogClosedHdl, css::ui::dialogs::DialogClosedEvent*, void);
+
+ void GetPathList( sal_uInt16 _nPathHandle, OUString& _rInternalPath,
+ OUString& _rUserPath, OUString& _rWritablePath, bool& _rReadOnly );
+ void SetPathList( sal_uInt16 _nPathHandle,
+ const OUString& _rUserPath, const OUString& _rWritablePath );
+
+public:
+ SvxPathTabPage( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet );
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet );
+ virtual ~SvxPathTabPage() override;
+
+ virtual bool FillItemSet( SfxItemSet* rSet ) override;
+ virtual void Reset( const SfxItemSet* rSet ) override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/page.hxx b/cui/source/inc/page.hxx
new file mode 100644
index 000000000..1019a9fbc
--- /dev/null
+++ b/cui/source/inc/page.hxx
@@ -0,0 +1,185 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_PAGE_HXX
+#define INCLUDED_CUI_SOURCE_INC_PAGE_HXX
+
+#include <sfx2/tabdlg.hxx>
+#include <svx/pagectrl.hxx>
+#include <svx/pagenumberlistbox.hxx>
+#include <svx/papersizelistbox.hxx>
+#include <svx/frmdirlbox.hxx>
+#include <i18nutil/paper.hxx>
+#include <svx/flagsdef.hxx>
+
+// class SvxPageDescPage -------------------------------------------------
+/*
+ [Description]
+ TabPage for page settings (size, margins, ...)
+
+ [Items]
+ <SvxPageItem>: <SID_ATTR_PAGE>
+ <SvxSizeItem>: <SID_ATTR_SIZE>
+ <SvxSizeItem>: <SID_ATTR_MAXSIZE>
+ <SvxULSpaceItem>: <SID_ATTR_LRSPACE>
+ <SvxLRSpaceItem>: <SID_ATTR_ULSPACE>
+ <SfxAllEnumItem>: <SID_ATTR_PAPERTRAY>
+ <SvxPaperBinItem>: <SID_ATTR_PAPERBIN>
+ <SvxBoolItem>: <SID_ATTR_EXT1>
+ <SvxBoolItem>: <SID_ATTR_EXT2>
+
+ <SfxSetItem>: <SID_ATTR_HEADERSET>
+ <SfxBoolItem>: <SID_ATTR_ON>
+ <SfxBoolItem>: <SID_ATTR_DYNAMIC>
+ <SfxBoolItem>: <SID_ATTR_SHARED>
+ <SvxSizeItem>: <SID_ATTR_SIZE>
+ <SvxULSpaceItem>: <SID_ATTR_ULSPACE>
+ <SvxLRSpaceItem>: <SID_ATTR_LRSPACE>
+
+ <SfxSetItem>: <SID_ATTR_FOOTERSET>
+ <SfxBoolItem>: <SID_ATTR_ON>
+ <SfxBoolItem>: <SID_ATTR_DYNAMIC>
+ <SfxBoolItem>: <SID_ATTR_SHARED>
+ <SvxSizeItem>: <SID_ATTR_SIZE>
+ <SvxULSpaceItem>: <SID_ATTR_ULSPACE>
+ <SvxLRSpaceItem>: <SID_ATTR_LRSPACE>
+*/
+
+typedef sal_uInt16 MarginPosition;
+
+class SvxPageDescPage : public SfxTabPage
+{
+ static const sal_uInt16 pRanges[];
+private:
+ OUString sStandardRegister;
+ long nFirstLeftMargin;
+ long nFirstRightMargin;
+ long nFirstTopMargin;
+ long nFirstBottomMargin;
+ long nLastLeftMargin;
+ long nLastRightMargin;
+ long nLastTopMargin;
+ long nLastBottomMargin;
+
+ bool bLandscape;
+ bool bBorderModified;
+ SvxModeType eMode;
+ Paper ePaperStart;
+
+ MarginPosition m_nPos;
+ VclPtr<Printer> mpDefPrinter;
+
+ bool mbDelPrinter : 1;
+ bool mbEnableDrawingLayerFillStyles : 1;
+
+ SvxPageWindow m_aBspWin;
+
+ // paper format
+ std::unique_ptr<SvxPaperSizeListBox> m_xPaperSizeBox;
+ std::unique_ptr<weld::MetricSpinButton> m_xPaperWidthEdit;
+ std::unique_ptr<weld::MetricSpinButton> m_xPaperHeightEdit;
+ std::unique_ptr<weld::Label> m_xOrientationFT;
+ std::unique_ptr<weld::RadioButton> m_xPortraitBtn;
+ std::unique_ptr<weld::RadioButton> m_xLandscapeBtn;
+ std::unique_ptr<weld::Label> m_xTextFlowLbl;
+ std::unique_ptr<svx::FrameDirectionListBox> m_xTextFlowBox;
+ std::unique_ptr<weld::ComboBox> m_xPaperTrayBox;
+ // Margins
+ std::unique_ptr<weld::Label> m_xLeftMarginLbl;
+ std::unique_ptr<weld::MetricSpinButton> m_xLeftMarginEdit;
+ std::unique_ptr<weld::Label> m_xRightMarginLbl;
+ std::unique_ptr<weld::MetricSpinButton> m_xRightMarginEdit;
+ std::unique_ptr<weld::MetricSpinButton> m_xTopMarginEdit;
+ std::unique_ptr<weld::MetricSpinButton> m_xBottomMarginEdit;
+ // layout settings
+ std::unique_ptr<weld::Label> m_xPageText;
+ std::unique_ptr<weld::ComboBox> m_xLayoutBox;
+ std::unique_ptr<weld::Label> m_xNumberFormatText;
+ std::unique_ptr<SvxPageNumberListBox> m_xNumberFormatBox;
+ //Extras Calc
+ std::unique_ptr<weld::Label> m_xTblAlignFT;
+ std::unique_ptr<weld::CheckButton> m_xHorzBox;
+ std::unique_ptr<weld::CheckButton> m_xVertBox;
+ // Impress and Draw
+ std::unique_ptr<weld::CheckButton> m_xAdaptBox;
+ //Register Writer
+ std::unique_ptr<weld::CheckButton> m_xRegisterCB;
+ std::unique_ptr<weld::Label> m_xRegisterFT;
+ std::unique_ptr<weld::ComboBox> m_xRegisterLB;
+ std::unique_ptr<weld::Label> m_xInsideLbl;
+ std::unique_ptr<weld::Label> m_xOutsideLbl;
+ std::unique_ptr<weld::Label> m_xPrintRangeQueryText;
+ std::unique_ptr<weld::CustomWeld> m_xBspWin;
+
+ void Init_Impl();
+ DECL_LINK(LayoutHdl_Impl, weld::ComboBox&, void);
+ DECL_LINK(PaperBinHdl_Impl, weld::Widget&, void);
+ DECL_LINK(SwapOrientation_Impl, weld::Button&, void);
+ void SwapFirstValues_Impl( bool bSet );
+ DECL_LINK(BorderModify_Impl, weld::MetricSpinButton&, void);
+ void InitHeadFoot_Impl( const SfxItemSet& rSet );
+ DECL_LINK(CenterHdl_Impl, weld::ToggleButton&, void);
+ void UpdateExample_Impl( bool bResetbackground = false );
+
+ DECL_LINK(PaperSizeSelect_Impl, weld::ComboBox&, void );
+ DECL_LINK(PaperSizeModify_Impl, weld::MetricSpinButton&, void);
+
+ DECL_LINK(FrameDirectionModify_Impl, weld::ComboBox&, void );
+
+ void ResetBackground_Impl( const SfxItemSet& rSet );
+
+ void RangeHdl_Impl();
+ void CalcMargin_Impl();
+
+ DECL_LINK(RegisterModify, weld::ToggleButton&, void);
+
+ // page direction
+ /** Disables vertical page direction entries in the text flow listbox. */
+ void DisableVerticalPageDir();
+
+ bool IsPrinterRangeOverflow(weld::MetricSpinButton& rField, long nFirstMargin,
+ long nLastMargin, MarginPosition nPos);
+ void CheckMarginEdits( bool _bClear );
+ bool IsMarginOutOfRange() const;
+
+protected:
+ virtual void ActivatePage( const SfxItemSet& rSet ) override;
+ virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
+
+public:
+ SvxPageDescPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet );
+ virtual ~SvxPageDescPage() override;
+
+ // returns the range of the Which values
+ static const sal_uInt16* GetRanges() { return pRanges; }
+
+ virtual bool FillItemSet( SfxItemSet* rOutSet ) override;
+ virtual void Reset( const SfxItemSet* rSet ) override;
+ virtual void FillUserData() override;
+
+ void SetPaperFormatRanges( Paper eStart )
+ { ePaperStart = eStart; }
+
+ void SetCollectionList(const std::vector<OUString> &aList);
+ virtual void PageCreated(const SfxAllItemSet& aSet) override;
+};
+
+#endif // INCLUDED_CUI_SOURCE_INC_PAGE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/paragrph.hxx b/cui/source/inc/paragrph.hxx
new file mode 100644
index 000000000..b57199d91
--- /dev/null
+++ b/cui/source/inc/paragrph.hxx
@@ -0,0 +1,304 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_PARAGRPH_HXX
+#define INCLUDED_CUI_SOURCE_INC_PARAGRPH_HXX
+
+#include <sfx2/tabdlg.hxx>
+#include <svx/relfld.hxx>
+#include <svx/paraprev.hxx>
+#include <svx/frmdirlbox.hxx>
+
+class SvxLineSpacingItem;
+
+// class SvxStdParagraphTabPage ------------------------------------------
+/*
+ [Description]
+ With this TabPage standard attributes of a paragraph can be set
+ (indention, distance, alignment, line spacing).
+
+ [Items]
+ <SvxAdjustItem><SID_ATTR_PARA_ADJUST>
+ <SvxLineSpacingItem><SID_ATTR_PARA_LINESPACE>
+ <SvxULSpaceItem><SID_ATTR_ULSPACE>
+ <SvxLRSpaceItem><SID_ATTR_LRSPACE>
+*/
+
+class SvxStdParagraphTabPage: public SfxTabPage
+{
+ static const sal_uInt16 pStdRanges[];
+
+private:
+ long nWidth;
+ long nMinFixDist;
+ bool bRelativeMode;
+ OUString sAbsDist;
+
+ SvxParaPrevWindow m_aExampleWin;
+
+ // indention
+ std::unique_ptr<SvxRelativeField> m_xLeftIndent;
+
+ std::unique_ptr<weld::Label> m_xRightLabel;
+ std::unique_ptr<SvxRelativeField> m_xRightIndent;
+
+ std::unique_ptr<weld::Label> m_xFLineLabel;
+ std::unique_ptr<SvxRelativeField> m_xFLineIndent;
+ std::unique_ptr<weld::CheckButton> m_xAutoCB;
+
+ // distance
+ std::unique_ptr<SvxRelativeField> m_xTopDist;
+ std::unique_ptr<SvxRelativeField> m_xBottomDist;
+ std::unique_ptr<weld::CheckButton> m_xContextualCB;
+
+ // line spacing
+ std::unique_ptr<weld::ComboBox> m_xLineDist;
+ std::unique_ptr<weld::MetricSpinButton> m_xLineDistAtPercentBox;
+ std::unique_ptr<weld::MetricSpinButton> m_xLineDistAtMetricBox;
+ std::unique_ptr<weld::Label> m_xLineDistAtLabel;
+ std::unique_ptr<weld::Label> m_xAbsDist;
+
+ // only writer
+ std::unique_ptr<weld::Widget> m_xRegisterFL;
+ std::unique_ptr<weld::CheckButton> m_xRegisterCB;
+
+ // preview
+ std::unique_ptr<weld::CustomWeld> m_xExampleWin;
+
+ void SetLineSpacing_Impl( const SvxLineSpacingItem& rAttr );
+ void Init_Impl();
+ void UpdateExample_Impl();
+ void ELRLoseFocus();
+
+ DECL_LINK(LineDistPopupHdl_Impl, weld::ComboBox&, void);
+ DECL_LINK(LineDistHdl_Impl, weld::ComboBox&, void);
+ DECL_LINK(ModifyHdl_Impl, weld::MetricSpinButton&, void);
+ DECL_LINK(AutoHdl_Impl, weld::ToggleButton&, void);
+
+ bool m_bLineDistToggled = false;
+
+protected:
+ virtual void ActivatePage( const SfxItemSet& rSet ) override;
+ virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
+
+
+public:
+ SvxStdParagraphTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet );
+ virtual ~SvxStdParagraphTabPage() override;
+
+ DECL_LINK(ELRLoseFocusHdl, weld::MetricSpinButton&, void);
+
+ static const sal_uInt16* GetRanges() { return pStdRanges; }
+
+ virtual bool FillItemSet( SfxItemSet* rSet ) override;
+ virtual void Reset( const SfxItemSet* rSet ) override;
+ virtual void ChangesApplied() override;
+
+ void EnableRelativeMode();
+ void EnableRegisterMode();
+ void EnableContextualMode();
+ void EnableAutoFirstLine();
+ void EnableAbsLineDist(long nMinTwip);
+ void EnableNegativeMode();
+ virtual void PageCreated(const SfxAllItemSet& aSet) override;
+};
+
+// class SvxParaAlignTabPage ------------------------------------------------
+
+class SvxParaAlignTabPage : public SfxTabPage
+{
+ static const sal_uInt16 pAlignRanges[];
+
+ SvxParaPrevWindow m_aExampleWin;
+
+ // alignment
+ std::unique_ptr<weld::RadioButton> m_xLeft;
+ std::unique_ptr<weld::RadioButton> m_xRight;
+ std::unique_ptr<weld::RadioButton> m_xCenter;
+ std::unique_ptr<weld::RadioButton> m_xJustify;
+ std::unique_ptr<weld::Label> m_xLeftBottom;
+ std::unique_ptr<weld::Label> m_xRightTop;
+
+ std::unique_ptr<weld::Label> m_xLastLineFT;
+ std::unique_ptr<weld::ComboBox> m_xLastLineLB;
+ std::unique_ptr<weld::CheckButton> m_xExpandCB;
+
+ std::unique_ptr<weld::CheckButton> m_xSnapToGridCB;
+
+ //preview
+ std::unique_ptr<weld::CustomWeld> m_xExampleWin;
+ //vertical alignment
+ std::unique_ptr<weld::Widget> m_xVertAlignFL;
+ std::unique_ptr<weld::ComboBox> m_xVertAlignLB;
+
+ std::unique_ptr<weld::Widget> m_xPropertiesFL;
+ std::unique_ptr<svx::FrameDirectionListBox> m_xTextDirectionLB;
+
+ DECL_LINK(AlignHdl_Impl, weld::ToggleButton&, void);
+ DECL_LINK(LastLineHdl_Impl, weld::ComboBox&, void);
+ DECL_LINK(TextDirectionHdl_Impl, weld::ComboBox&, void);
+
+ void UpdateExample_Impl();
+
+protected:
+ virtual void ActivatePage( const SfxItemSet& rSet ) override;
+ virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
+
+public:
+ SvxParaAlignTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet );
+ virtual ~SvxParaAlignTabPage() override;
+
+ static const sal_uInt16* GetRanges() { return pAlignRanges; }
+
+ virtual bool FillItemSet( SfxItemSet* rSet ) override;
+ virtual void Reset( const SfxItemSet* rSet ) override;
+ virtual void ChangesApplied() override;
+
+ void EnableJustifyExt();
+ virtual void PageCreated(const SfxAllItemSet& aSet) override;
+};
+
+// class SvxExtParagraphTabPage ------------------------------------------
+/*
+ [Description]
+ With this TabPage special attributes of a paragraph can be set
+ (hyphenation, pagebreak, orphan, widow, ...).
+
+ [Items]
+ <SvxHyphenZoneItem><SID_ATTR_PARA_HYPHENZONE>
+ <SvxFormatBreakItem><SID_ATTR_PARA_PAGEBREAK>
+ <SvxFormatSplitItem><SID_ATTR_PARA_SPLIT>
+ <SvxWidowsItem><SID_ATTR_PARA_WIDOWS>
+ <SvxOrphansItem><SID_ATTR_PARA_ORPHANS>
+*/
+
+class SvxExtParagraphTabPage: public SfxTabPage
+{
+ static const sal_uInt16 pExtRanges[];
+
+public:
+ SvxExtParagraphTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController,
+ const SfxItemSet* rSet );
+ virtual ~SvxExtParagraphTabPage() override;
+
+ static const sal_uInt16* GetRanges() { return pExtRanges; }
+
+ virtual bool FillItemSet( SfxItemSet* rSet ) override;
+ virtual void Reset( const SfxItemSet* rSet ) override;
+ virtual void ChangesApplied() override;
+
+ void DisablePageBreak();
+
+protected:
+ virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
+
+private:
+ weld::TriStateEnabled aHyphenState;
+ weld::TriStateEnabled aPageBreakState;
+ weld::TriStateEnabled aApplyCollState;
+ weld::TriStateEnabled aPageNumState;
+ weld::TriStateEnabled aKeepTogetherState;
+ weld::TriStateEnabled aKeepParaState;
+ weld::TriStateEnabled aOrphanState;
+ weld::TriStateEnabled aWidowState;
+
+ bool bPageBreak;
+ bool bHtmlMode;
+ sal_uInt16 nStdPos;
+
+ // hyphenation
+ std::unique_ptr<weld::CheckButton> m_xHyphenBox;
+ std::unique_ptr<weld::CheckButton> m_xHyphenNoCapsBox;
+ std::unique_ptr<weld::Label> m_xBeforeText;
+ std::unique_ptr<weld::SpinButton> m_xExtHyphenBeforeBox;
+ std::unique_ptr<weld::Label> m_xAfterText;
+ std::unique_ptr<weld::SpinButton> m_xExtHyphenAfterBox;
+ std::unique_ptr<weld::Label> m_xMaxHyphenLabel;
+ std::unique_ptr<weld::SpinButton> m_xMaxHyphenEdit;
+
+ // pagebreak
+ std::unique_ptr<weld::CheckButton> m_xPageBreakBox;
+ std::unique_ptr<weld::Label> m_xBreakTypeFT;
+ std::unique_ptr<weld::ComboBox> m_xBreakTypeLB;
+ std::unique_ptr<weld::Label> m_xBreakPositionFT;
+ std::unique_ptr<weld::ComboBox> m_xBreakPositionLB;
+ std::unique_ptr<weld::CheckButton> m_xApplyCollBtn;
+ std::unique_ptr<weld::ComboBox> m_xApplyCollBox;
+ std::unique_ptr<weld::CheckButton> m_xPageNumBox;
+ std::unique_ptr<weld::SpinButton> m_xPagenumEdit;
+
+ // paragraph division
+ std::unique_ptr<weld::CheckButton> m_xKeepTogetherBox;
+ std::unique_ptr<weld::CheckButton> m_xKeepParaBox;
+
+ // orphan/widow
+ std::unique_ptr<weld::CheckButton> m_xOrphanBox;
+ std::unique_ptr<weld::SpinButton> m_xOrphanRowNo;
+ std::unique_ptr<weld::Label> m_xOrphanRowLabel;
+
+ std::unique_ptr<weld::CheckButton> m_xWidowBox;
+ std::unique_ptr<weld::SpinButton> m_xWidowRowNo;
+ std::unique_ptr<weld::Label> m_xWidowRowLabel;
+
+ void HyphenClickHdl();
+ void PageNumBoxClickHdl();
+ void ApplyCollClickHdl();
+ void PageBreakHdl();
+ void KeepTogetherHdl();
+ void OrphanHdl();
+ void WidowHdl();
+
+ DECL_LINK(PageBreakHdl_Impl, weld::ToggleButton&, void);
+ DECL_LINK(KeepTogetherHdl_Impl, weld::ToggleButton&, void);
+ DECL_LINK(WidowHdl_Impl, weld::ToggleButton&, void);
+ DECL_LINK(OrphanHdl_Impl, weld::ToggleButton&, void);
+ DECL_LINK(HyphenClickHdl_Impl, weld::ToggleButton&, void);
+ DECL_LINK(ApplyCollClickHdl_Impl, weld::ToggleButton&, void);
+ DECL_LINK(PageBreakPosHdl_Impl, weld::ComboBox&, void);
+ DECL_LINK(PageBreakTypeHdl_Impl, weld::ComboBox&, void);
+ DECL_LINK(PageNumBoxClickHdl_Impl, weld::ToggleButton&, void);
+ DECL_LINK(KeepParaBoxClickHdl_Impl, weld::ToggleButton&, void);
+
+ virtual void PageCreated(const SfxAllItemSet& aSet) override;
+};
+
+class SvxAsianTabPage : public SfxTabPage
+{
+ std::unique_ptr<weld::CheckButton> m_xForbiddenRulesCB;
+ std::unique_ptr<weld::CheckButton> m_xHangingPunctCB;
+ std::unique_ptr<weld::CheckButton> m_xScriptSpaceCB;
+
+public:
+ SvxAsianTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
+ static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet);
+ virtual ~SvxAsianTabPage() override;
+
+ static const sal_uInt16* GetRanges();
+
+ virtual bool FillItemSet( SfxItemSet* rSet ) override;
+ virtual void Reset( const SfxItemSet* rSet ) override;
+ virtual void ChangesApplied() override;
+};
+
+#endif // INCLUDED_CUI_SOURCE_INC_PARAGRPH_HXX
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/passwdomdlg.hxx b/cui/source/inc/passwdomdlg.hxx
new file mode 100644
index 000000000..1f690ca39
--- /dev/null
+++ b/cui/source/inc/passwdomdlg.hxx
@@ -0,0 +1,71 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_PASSWDOMDLG_HXX
+#define INCLUDED_CUI_SOURCE_INC_PASSWDOMDLG_HXX
+
+#include <sfx2/basedlgs.hxx>
+#include <memory>
+
+class PasswordToOpenModifyDialog : public SfxDialogController
+{
+ std::unique_ptr<weld::Entry> m_xPasswdToOpenED;
+ std::unique_ptr<weld::Label> m_xPasswdToOpenInd;
+ std::unique_ptr<weld::Entry> m_xReenterPasswdToOpenED;
+ std::unique_ptr<weld::Label> m_xReenterPasswdToOpenInd;
+ std::unique_ptr<weld::Expander> m_xOptionsExpander;
+ std::unique_ptr<weld::Button> m_xOk;
+ std::unique_ptr<weld::CheckButton> m_xOpenReadonlyCB;
+ std::unique_ptr<weld::Label> m_xPasswdToModifyFT;
+ std::unique_ptr<weld::Entry> m_xPasswdToModifyED;
+ std::unique_ptr<weld::Label> m_xPasswdToModifyInd;
+ std::unique_ptr<weld::Label> m_xReenterPasswdToModifyFT;
+ std::unique_ptr<weld::Entry> m_xReenterPasswdToModifyED;
+ std::unique_ptr<weld::Label> m_xReenterPasswdToModifyInd;
+
+ OUString m_aOneMismatch;
+ OUString m_aTwoMismatch;
+ OUString m_aInvalidStateForOkButton;
+ OUString m_aInvalidStateForOkButton_v2;
+ OUString m_aIndicatorTemplate;
+
+ int m_nMaxPasswdLen;
+ bool m_bIsPasswordToModify;
+
+
+ DECL_LINK(OkBtnClickHdl, weld::Button&, void);
+ DECL_LINK(ReadonlyOnOffHdl, weld::Button&, void);
+ DECL_LINK(ChangeHdl, weld::Entry&, void);
+
+ PasswordToOpenModifyDialog( const PasswordToOpenModifyDialog & ) = delete;
+ PasswordToOpenModifyDialog & operator = ( const PasswordToOpenModifyDialog & ) = delete;
+
+public:
+ PasswordToOpenModifyDialog(weld::Window* pParent,
+ sal_uInt16 nMaxPasswdLen /* 0 -> no max len enforced */,
+ bool bIsPasswordToModify );
+
+ // AbstractPasswordToOpenModifyDialog
+ OUString GetPasswordToOpen() const;
+ OUString GetPasswordToModify() const;
+ bool IsRecommendToOpenReadonly() const;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/pastedlg.hxx b/cui/source/inc/pastedlg.hxx
new file mode 100644
index 000000000..a9a691b4f
--- /dev/null
+++ b/cui/source/inc/pastedlg.hxx
@@ -0,0 +1,76 @@
+/* -*- 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 .
+ */
+
+#ifndef INCLUDED_CUI_SOURCE_INC_PASTEDLG_HXX
+#define INCLUDED_CUI_SOURCE_INC_PASTEDLG_HXX
+
+#include <map>
+#include <sot/formats.hxx>
+#include <tools/globname.hxx>
+#include <vcl/transfer.hxx>
+#include <vcl/weld.hxx>
+
+struct TransferableObjectDescriptor;
+class TransferableDataHelper;
+
+class SvPasteObjectDialog : public weld::GenericDialogController
+{
+ std::map< SotClipboardFormatId, OUString > aSupplementMap;
+ // Additional UNO command to be displayed along the supported paste formats
+ std::pair<OUString, OUString> aExtraCommand;
+ SvGlobalName aObjClassName;
+ OUString aObjName;
+
+ std::unique_ptr<weld::Label> m_xFtObjectSource;
+ std::unique_ptr<weld::TreeView> m_xLbInsertList;
+ std::unique_ptr<weld::Button> m_xOKButton;
+
+ weld::TreeView& ObjectLB() { return *m_xLbInsertList; }
+
+ void SelectObject();
+ DECL_LINK(SelectHdl, weld::TreeView&, void);
+ DECL_LINK(DoubleClickHdl, weld::TreeView&, bool);
+
+public:
+ SvPasteObjectDialog(weld::Window* pParent);
+
+ void Insert( SotClipboardFormatId nFormat, const OUString & rFormatName );
+ void InsertUno( const OUString& sUnoCmd, const OUString& sLabel);
+ void SetObjName( const SvGlobalName & rClass, const OUString & rObjName );
+ /**
+ * @brief PreGetFormat Prepares the dialog for running to get format of paste as a SotClipboardFormatId value by calling GetFormatOnly()
+ * @param aHelper
+ */
+ void PreGetFormat( const TransferableDataHelper& aHelper);
+ /**
+ * @brief GetFormatOnly Returns a SotClipboardFormatId value. Should be called after actually running the dialog.
+ * @return
+ */
+ SotClipboardFormatId GetFormatOnly();
+ /**
+ * @brief GetFormat Prepares and runs the dialog, and returns a SotClipboardFormatId depending on the RET_OK result
+ * @param aHelper TransferableDataHelper containing the data to be pasted
+ * @return a SotClipboardFormatId value depending on the result of running the dialog
+ */
+ SotClipboardFormatId GetFormat( const TransferableDataHelper& aHelper);
+};
+
+#endif // INCLUDED_CUI_SOURCE_INC_PASTEDLG_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/postdlg.hxx b/cui/source/inc/postdlg.hxx
new file mode 100644
index 000000000..62a3379b9
--- /dev/null
+++ b/cui/source/inc/postdlg.hxx
@@ -0,0 +1,103 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_POSTDLG_HXX
+#define INCLUDED_CUI_SOURCE_INC_POSTDLG_HXX
+
+#include <sfx2/basedlgs.hxx>
+
+// class SvxPostItDialog -------------------------------------------------
+/*
+ [Description]
+ In this dialog a note can be created or edited. If the
+ application holds a list of notes, it can be iterated
+ over this list with links.
+
+ [Items]
+ <SvxPostItAuthorItem><SID_ATTR_POSTIT_AUTHOR>
+ <SvxPostItDateItem><SID_ATTR_POSTIT_DATE>
+ <SvxPostItTextItem><SID_ATTR_POSTIT_TEXT>
+*/
+
+class SvxPostItDialog : public SfxDialogController
+{
+public:
+ SvxPostItDialog(weld::Widget* pParent, const SfxItemSet& rCoreSet,
+ bool bPrevNext);
+ virtual ~SvxPostItDialog() override;
+
+ static const sal_uInt16* GetRanges();
+ const SfxItemSet* GetOutputItemSet() const { return m_xOutSet.get(); }
+
+ void SetPrevHdl( const Link<SvxPostItDialog&,void>& rLink )
+ { m_aPrevHdlLink = rLink; }
+ void SetNextHdl( const Link<SvxPostItDialog&,void>& rLink )
+ { m_aNextHdlLink = rLink; }
+
+ void EnableTravel(bool bNext, bool bPrev);
+ OUString GetNote() const
+ {
+ return m_xEditED->get_text();
+ }
+ void SetNote(const OUString& rTxt)
+ {
+ m_xEditED->set_text(rTxt);
+ }
+ void ShowLastAuthor(const OUString& rAuthor, const OUString& rDate);
+ void DontChangeAuthor()
+ {
+ m_xAuthorBtn->set_sensitive(false);
+ }
+ void HideAuthor()
+ {
+ m_xInsertAuthor->hide();
+ }
+ void set_title(const OUString& rTitle)
+ {
+ m_xDialog->set_title(rTitle);
+ }
+ std::shared_ptr<weld::Dialog> const & GetDialog() const
+ {
+ return m_xDialog;
+ }
+
+private:
+ const SfxItemSet& m_rSet;
+ std::unique_ptr<SfxItemSet> m_xOutSet;
+
+ Link<SvxPostItDialog&,void> m_aPrevHdlLink;
+ Link<SvxPostItDialog&,void> m_aNextHdlLink;
+
+ std::unique_ptr<weld::Label> m_xLastEditFT;
+ std::unique_ptr<weld::Label> m_xAltTitle;
+ std::unique_ptr<weld::TextView> m_xEditED;
+ std::unique_ptr<weld::Widget> m_xInsertAuthor;
+ std::unique_ptr<weld::Button> m_xAuthorBtn;
+ std::unique_ptr<weld::Button> m_xOKBtn;
+ std::unique_ptr<weld::Button> m_xPrevBtn;
+ std::unique_ptr<weld::Button> m_xNextBtn;
+
+ DECL_LINK(Stamp, weld::Button&, void);
+ DECL_LINK(OKHdl, weld::Button&, void);
+ DECL_LINK(PrevHdl, weld::Button&, void);
+ DECL_LINK(NextHdl, weld::Button&, void);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/screenshotannotationdlg.hxx b/cui/source/inc/screenshotannotationdlg.hxx
new file mode 100644
index 000000000..94972219d
--- /dev/null
+++ b/cui/source/inc/screenshotannotationdlg.hxx
@@ -0,0 +1,42 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_SCREENSHANNDLG_HXX
+#define INCLUDED_CUI_SOURCE_INC_SCREENSHANNDLG_HXX
+
+#include <vcl/weld.hxx>
+#include <memory>
+
+class ScreenshotAnnotationDlg_Impl;
+
+class ScreenshotAnnotationDlg : public weld::GenericDialogController
+{
+private:
+ std::unique_ptr< ScreenshotAnnotationDlg_Impl > m_pImpl;
+
+ ScreenshotAnnotationDlg(const ScreenshotAnnotationDlg &) = delete;
+ ScreenshotAnnotationDlg& operator=(const ScreenshotAnnotationDlg &) = delete;
+
+public:
+ ScreenshotAnnotationDlg(weld::Dialog& rParentDialog);
+ virtual ~ScreenshotAnnotationDlg() override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/scriptdlg.hxx b/cui/source/inc/scriptdlg.hxx
new file mode 100644
index 000000000..7ae0f3335
--- /dev/null
+++ b/cui/source/inc/scriptdlg.hxx
@@ -0,0 +1,171 @@
+/* -*- 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 .
+ */
+
+#ifndef INCLUDED_CUI_SOURCE_INC_SCRIPTDLG_HXX
+#define INCLUDED_CUI_SOURCE_INC_SCRIPTDLG_HXX
+
+#include <memory>
+#include <sfx2/basedlgs.hxx>
+#include <vcl/abstdlg.hxx>
+#include <vcl/weld.hxx>
+
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/script/browse/XBrowseNode.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+
+#include <unordered_map>
+
+#define OBJTYPE_METHOD 2L
+#define OBJTYPE_SCRIPTCONTAINER 3L
+#define OBJTYPE_SFROOT 4L
+
+typedef std::unordered_map < OUString, OUString > Selection_hash;
+
+class SFEntry;
+
+enum class InputDialogMode {
+ NEWLIB = 1,
+ NEWMACRO = 2,
+ RENAME = 3,
+};
+
+class CuiInputDialog : public weld::GenericDialogController
+{
+private:
+ std::unique_ptr<weld::Entry> m_xEdit;
+public:
+ CuiInputDialog(weld::Window * pParent, InputDialogMode nMode);
+ OUString GetObjectName() const { return m_xEdit->get_text(); }
+ void SetObjectName(const OUString& rName)
+ {
+ m_xEdit->set_text(rName);
+ m_xEdit->select_region(0, -1);
+ }
+};
+
+class SFEntry final
+{
+private:
+ bool loaded;
+ css::uno::Reference< css::script::browse::XBrowseNode > nodes;
+ css::uno::Reference< css::frame::XModel > model;
+public:
+ SFEntry( const css::uno::Reference< css::script::browse::XBrowseNode >& entryNodes ,
+ const css::uno::Reference< css::frame::XModel >& entryModel) { nodes = entryNodes; loaded=false; model = entryModel; }
+ SFEntry( const SFEntry& r ) { nodes = r.nodes; loaded = r.loaded; }
+ const css::uno::Reference< css::script::browse::XBrowseNode >& GetNode() const { return nodes ;}
+ const css::uno::Reference< css::frame::XModel >& GetModel() const { return model ;};
+ bool isLoaded() const { return loaded; }
+ void setLoaded() { loaded=true; }
+};
+
+class SvxScriptOrgDialog : public SfxDialogController
+{
+protected:
+ OUString m_sLanguage;
+ static Selection_hash m_lastSelection;
+ const OUString m_delErrStr;
+ const OUString m_delErrTitleStr;
+ const OUString m_delQueryStr;
+ const OUString m_delQueryTitleStr;
+ const OUString m_createErrStr;
+ const OUString m_createDupStr;
+ const OUString m_createErrTitleStr;
+ const OUString m_renameErrStr;
+ const OUString m_renameErrTitleStr;
+ const OUString m_sMyMacros;
+ const OUString m_sProdMacros;
+
+ std::unique_ptr<weld::TreeView> m_xScriptsBox;
+ std::unique_ptr<weld::Button> m_xRunButton;
+ std::unique_ptr<weld::Button> m_xCloseButton;
+ std::unique_ptr<weld::Button> m_xCreateButton;
+ std::unique_ptr<weld::Button> m_xEditButton;
+ std::unique_ptr<weld::Button> m_xRenameButton;
+ std::unique_ptr<weld::Button> m_xDelButton;
+
+ DECL_LINK( ScriptSelectHdl, weld::TreeView&, void );
+ DECL_LINK( ExpandingHdl, const weld::TreeIter&, bool );
+ DECL_LINK( ButtonHdl, weld::Button&, void );
+ static bool getBoolProperty( css::uno::Reference< css::beans::XPropertySet > const & xProps, OUString const & propName );
+ void CheckButtons( css::uno::Reference< css::script::browse::XBrowseNode > const & node );
+
+ void createEntry(weld::TreeIter& rEntry);
+ void renameEntry(const weld::TreeIter& rEntry);
+ void deleteEntry(weld::TreeIter& rEntry);
+ css::uno::Reference<css::script::browse::XBrowseNode> getBrowseNode(const weld::TreeIter& rEntry);
+ css::uno::Reference<css::frame::XModel> getModel(const weld::TreeIter& rEntry);
+ OUString getListOfChildren( const css::uno::Reference< css::script::browse::XBrowseNode >& node, int depth );
+ void StoreCurrentSelection();
+ void RestorePreviousSelection();
+
+ void Init(const OUString& language);
+ void delUserData(const weld::TreeIter& rIter);
+ void deleteTree(weld::TreeIter& rIter);
+ void deleteAllTree();
+ void insertEntry(OUString const & rText, OUString const & rBitmap,
+ const weld::TreeIter* pParent,
+ bool bChildrenOnDemand,
+ std::unique_ptr< SFEntry > && aUserData,
+ const OUString& factoryURL, bool bSelect);
+ void insertEntry(OUString const & rText, OUString const & rBitmap,
+ const weld::TreeIter* pParent,
+ bool bChildrenOnDemand,
+ std::unique_ptr< SFEntry > && aUserData,
+ bool bSelect);
+
+ void RequestSubEntries(const weld::TreeIter& rRootEntry,
+ css::uno::Reference< css::script::browse::XBrowseNode > const & node,
+ css::uno::Reference< css::frame::XModel>& model);
+
+ static css::uno::Reference< css::script::browse::XBrowseNode >
+ getLangNodeFromRootNode( css::uno::Reference< css::script::browse::XBrowseNode > const & root, OUString const & language );
+
+ static css::uno::Reference< css::uno::XInterface > getDocumentModel( css::uno::Reference< css::uno::XComponentContext > const & xCtx, OUString const & docName );
+
+public:
+ // prob need another arg in the ctor
+ // to specify the language or provider
+ SvxScriptOrgDialog(weld::Window* pParent, const OUString& language);
+ virtual ~SvxScriptOrgDialog() override;
+
+ virtual short run() override;
+};
+
+class SvxScriptErrorDialog : public VclAbstractDialog
+{
+private:
+
+ OUString m_sMessage;
+
+ DECL_STATIC_LINK( SvxScriptErrorDialog, ShowDialog, void*, void );
+
+public:
+
+ SvxScriptErrorDialog( css::uno::Any const & aException );
+
+ virtual ~SvxScriptErrorDialog() override;
+
+ short Execute() override;
+};
+
+#endif // INCLUDED_CUI_SOURCE_INC_SCRIPTDLG_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/sdrcelldlg.hxx b/cui/source/inc/sdrcelldlg.hxx
new file mode 100644
index 000000000..50ab4b39a
--- /dev/null
+++ b/cui/source/inc/sdrcelldlg.hxx
@@ -0,0 +1,49 @@
+/* -*- 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 .
+ */
+
+#ifndef INCLUDED_CUI_SOURCE_INC_SDRCELLDLG_HXX
+#define INCLUDED_CUI_SOURCE_INC_SDRCELLDLG_HXX
+
+
+#include <sfx2/tabdlg.hxx>
+#include <svx/xtable.hxx>
+
+class SdrModel;
+class SvxFormatCellsDialog : public SfxTabDialogController
+{
+private:
+ const SfxItemSet& mrOutAttrs;
+
+ XColorListRef mpColorTab;
+ XGradientListRef mpGradientList;
+ XHatchListRef mpHatchingList;
+ XBitmapListRef mpBitmapList;
+ XPatternListRef mpPatternList;
+
+public:
+ SvxFormatCellsDialog(weld::Window* pParent, const SfxItemSet* pAttr, const SdrModel& rModel);
+
+ virtual void PageCreated(const OString& rId, SfxTabPage &rPage) override;
+
+};
+
+#endif // INCLUDED_CUI_SOURCE_INC_SDRCELLDLG_HXX
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/showcols.hxx b/cui/source/inc/showcols.hxx
new file mode 100644
index 000000000..3b15abfd3
--- /dev/null
+++ b/cui/source/inc/showcols.hxx
@@ -0,0 +1,48 @@
+/* -*- 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 .
+ */
+
+#ifndef INCLUDED_CUI_SOURCE_INC_SHOWCOLS_HXX
+#define INCLUDED_CUI_SOURCE_INC_SHOWCOLS_HXX
+
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/container/XIndexContainer.hpp>
+#include <vcl/weld.hxx>
+
+// FmShowColsDialog
+
+class FmShowColsDialog final : public weld::GenericDialogController
+{
+ std::unique_ptr<weld::TreeView> m_xList;
+ std::unique_ptr<weld::Button> m_xOK;
+
+ css::uno::Reference<css::container::XIndexAccess> m_xColumns;
+
+public:
+ FmShowColsDialog(weld::Window* pParent);
+ virtual ~FmShowColsDialog() override;
+
+ void SetColumns(const css::uno::Reference<css::container::XIndexContainer>& xCols);
+
+private:
+ DECL_LINK(OnClickedOk, weld::Button&, void);
+};
+
+#endif // INCLUDED_CUI_SOURCE_INC_SHOWCOLS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/splitcelldlg.hxx b/cui/source/inc/splitcelldlg.hxx
new file mode 100644
index 000000000..b0c2fddae
--- /dev/null
+++ b/cui/source/inc/splitcelldlg.hxx
@@ -0,0 +1,51 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_SPLITCELLDLG_HXX
+#define INCLUDED_CUI_SOURCE_INC_SPLITCELLDLG_HXX
+
+#include <svx/svxdlg.hxx>
+#include <vcl/weld.hxx>
+
+class SvxSplitTableDlg : public SvxAbstractSplitTableDialog, public weld::GenericDialogController
+{
+private:
+ std::unique_ptr<weld::SpinButton> m_xCountEdit;
+ std::unique_ptr<weld::RadioButton> m_xHorzBox;
+ std::unique_ptr<weld::RadioButton> m_xVertBox;
+ std::unique_ptr<weld::CheckButton> m_xPropCB;
+
+ long mnMaxVertical;
+ long mnMaxHorizontal;
+
+public:
+ SvxSplitTableDlg(weld::Window *pParent, bool bIsTableVertical, long nMaxVertical, long nMaxHorizontal);
+
+ DECL_LINK(ClickHdl, weld::Button&, void);
+
+ virtual bool IsHorizontal() const override;
+ virtual bool IsProportional() const override;
+ virtual long GetCount() const override;
+
+ virtual short Execute() override;
+ virtual void SetSplitVerticalByDefault() override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/srchxtra.hxx b/cui/source/inc/srchxtra.hxx
new file mode 100644
index 000000000..5513ae236
--- /dev/null
+++ b/cui/source/inc/srchxtra.hxx
@@ -0,0 +1,84 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_SRCHXTRA_HXX
+#define INCLUDED_CUI_SOURCE_INC_SRCHXTRA_HXX
+
+#include <sfx2/tabdlg.hxx>
+#include <svtools/ctrltool.hxx>
+#include <svx/srchdlg.hxx>
+#include <vcl/weld.hxx>
+
+class SvxSearchFormatDialog : public SfxTabDialogController
+{
+public:
+ SvxSearchFormatDialog(weld::Window* pParent, const SfxItemSet& rSet);
+ virtual ~SvxSearchFormatDialog() override;
+
+protected:
+ virtual void PageCreated(const OString& rId, SfxTabPage &rPage) override;
+
+private:
+ std::unique_ptr<FontList> m_pFontList;
+};
+
+// class SvxSearchFormatDialog -------------------------------------------
+
+class SvxSearchAttributeDialog : public weld::GenericDialogController
+{
+public:
+ SvxSearchAttributeDialog(weld::Window* pParent, SearchAttrItemList& rLst,
+ const sal_uInt16* pWhRanges);
+ virtual ~SvxSearchAttributeDialog() override;
+
+private:
+ SearchAttrItemList& rList;
+
+ std::unique_ptr<weld::TreeView> m_xAttrLB;
+ std::unique_ptr<weld::Button> m_xOKBtn;
+
+ DECL_LINK(OKHdl, weld::Button&, void);
+};
+
+// class SvxSearchSimilarityDialog ---------------------------------------
+
+class SvxSearchSimilarityDialog : public weld::GenericDialogController
+{
+private:
+ std::unique_ptr<weld::SpinButton> m_xOtherFld;
+ std::unique_ptr<weld::SpinButton> m_xLongerFld;
+ std::unique_ptr<weld::SpinButton> m_xShorterFld;
+ std::unique_ptr<weld::CheckButton> m_xRelaxBox;
+
+public:
+ SvxSearchSimilarityDialog(weld::Window* pParent,
+ bool bRelax,
+ sal_uInt16 nOther,
+ sal_uInt16 nShorter,
+ sal_uInt16 nLonger);
+ virtual ~SvxSearchSimilarityDialog() override;
+
+ sal_uInt16 GetOther() const { return static_cast<sal_uInt16>(m_xOtherFld->get_value()); }
+ sal_uInt16 GetShorter() const { return static_cast<sal_uInt16>(m_xShorterFld->get_value()); }
+ sal_uInt16 GetLonger() const { return static_cast<sal_uInt16>(m_xLongerFld->get_value()); }
+ bool IsRelaxed() const { return m_xRelaxBox->get_active(); }
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/swpossizetabpage.hxx b/cui/source/inc/swpossizetabpage.hxx
new file mode 100644
index 000000000..1fe926566
--- /dev/null
+++ b/cui/source/inc/swpossizetabpage.hxx
@@ -0,0 +1,133 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_SWPOSSIZETABPAGE_HXX
+#define INCLUDED_CUI_SOURCE_INC_SWPOSSIZETABPAGE_HXX
+
+#include <sfx2/tabdlg.hxx>
+#include <svx/swframeexample.hxx>
+#include <vcl/weld.hxx>
+
+// SvxSwPosSizeTabPage - position and size page for Writer drawing objects
+struct FrmMap;
+class SdrView;
+struct SvxSwFrameValidation;
+enum class SvxAnchorIds;
+
+class SvxSwPosSizeTabPage : public SfxTabPage
+{
+ Link<SvxSwFrameValidation&,void> m_aValidateLink;
+
+ ::tools::Rectangle m_aRect; //size of all selected objects
+ ::tools::Rectangle m_aWorkArea;
+ Point m_aAnchorPos;
+
+ FrmMap const * m_pVMap;
+ FrmMap const * m_pHMap;
+ const SdrView* m_pSdrView;
+
+ // initial values
+ short m_nOldH;
+ short m_nOldHRel;
+ short m_nOldV;
+ short m_nOldVRel;
+
+ double m_fWidthHeightRatio; //width-to-height ratio to support the KeepRatio button
+ bool m_bHtmlMode;
+ bool m_bIsVerticalFrame;
+ bool m_bPositioningDisabled;
+ bool m_bIsMultiSelection;
+ bool m_bIsInRightToLeft;
+ TriState m_nProtectSizeState;
+
+ SwFrameExample m_aExampleWN;
+
+ std::unique_ptr<weld::MetricSpinButton> m_xWidthMF;
+ std::unique_ptr<weld::MetricSpinButton> m_xHeightMF;
+ std::unique_ptr<weld::CheckButton> m_xKeepRatioCB;
+ std::unique_ptr<weld::RadioButton> m_xToPageRB;
+ std::unique_ptr<weld::RadioButton> m_xToParaRB;
+ std::unique_ptr<weld::RadioButton> m_xToCharRB;
+ std::unique_ptr<weld::RadioButton> m_xAsCharRB;
+ std::unique_ptr<weld::RadioButton> m_xToFrameRB;
+ std::unique_ptr<weld::CheckButton> m_xPositionCB;
+ std::unique_ptr<weld::CheckButton> m_xSizeCB;
+ std::unique_ptr<weld::Widget> m_xPosFrame;
+ std::unique_ptr<weld::Label> m_xHoriFT;
+ std::unique_ptr<weld::ComboBox> m_xHoriLB;
+ std::unique_ptr<weld::Label> m_xHoriByFT;
+ std::unique_ptr<weld::MetricSpinButton> m_xHoriByMF;
+ std::unique_ptr<weld::Label> m_xHoriToFT;
+ std::unique_ptr<weld::ComboBox> m_xHoriToLB;
+ std::unique_ptr<weld::CheckButton> m_xHoriMirrorCB;
+ std::unique_ptr<weld::Label> m_xVertFT;
+ std::unique_ptr<weld::ComboBox> m_xVertLB;
+ std::unique_ptr<weld::Label> m_xVertByFT;
+ std::unique_ptr<weld::MetricSpinButton> m_xVertByMF;
+ std::unique_ptr<weld::Label> m_xVertToFT;
+ std::unique_ptr<weld::ComboBox> m_xVertToLB;
+ std::unique_ptr<weld::CheckButton> m_xFollowCB;
+ std::unique_ptr<weld::CustomWeld> m_xExampleWN;
+
+ DECL_LINK(RangeModifyHdl, weld::Widget&, void);
+ DECL_LINK(RangeModifyClickHdl, weld::ToggleButton&, void);
+ DECL_LINK(AnchorTypeHdl, weld::ToggleButton&, void);
+ DECL_LINK(PosHdl, weld::ComboBox&, void);
+ DECL_LINK(RelHdl, weld::ComboBox&, void);
+ DECL_LINK(MirrorHdl, weld::ToggleButton&, void);
+ DECL_LINK(ModifyHdl, weld::MetricSpinButton&, void);
+ DECL_LINK(ProtectHdl, weld::ToggleButton&, void);
+
+ void InitPos(RndStdIds nAnchorType, sal_uInt16 nH, sal_uInt16 nHRel,
+ sal_uInt16 nV, sal_uInt16 nVRel,
+ long nX, long nY);
+ static sal_uInt16 GetMapPos(FrmMap const *pMap, const weld::ComboBox& rAlignLB);
+ static short GetAlignment(FrmMap const *pMap, sal_uInt16 nMapPos, const weld::ComboBox& rRelationLB);
+ static short GetRelation(const weld::ComboBox& rRelationLB);
+ RndStdIds GetAnchorType(bool* pbHasChanged = nullptr);
+ void FillRelLB(FrmMap const *pMap, sal_uInt16 nLBSelPos, sal_uInt16 nAlign, sal_uInt16 nRel, weld::ComboBox& rLB, weld::Label& rFT);
+ sal_uInt16 FillPosLB(FrmMap const *pMap, sal_uInt16 nAlign, const sal_uInt16 _nRel, weld::ComboBox& rLB);
+
+ void UpdateExample();
+
+ void setOptimalFrmWidth();
+ void setOptimalRelWidth();
+
+public:
+ SvxSwPosSizeTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
+ virtual ~SvxSwPosSizeTabPage() override;
+
+ static const sal_uInt16* GetRanges();
+
+ virtual bool FillItemSet( SfxItemSet* ) override;
+ virtual void Reset( const SfxItemSet * ) override;
+
+ virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
+
+ void EnableAnchorTypes(SvxAnchorIds nAnchorEnable);
+
+ void SetValidateFramePosLink( const Link<SvxSwFrameValidation&,void>& rLink )
+ {m_aValidateLink = rLink;}
+
+ void SetView( const SdrView* pSdrView );
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/tabstpge.hxx b/cui/source/inc/tabstpge.hxx
new file mode 100644
index 000000000..6c9e63b10
--- /dev/null
+++ b/cui/source/inc/tabstpge.hxx
@@ -0,0 +1,149 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_TABSTPGE_HXX
+#define INCLUDED_CUI_SOURCE_INC_TABSTPGE_HXX
+
+#include <vcl/customweld.hxx>
+#include <vcl/weld.hxx>
+#include <sfx2/tabdlg.hxx>
+
+#include <editeng/tstpitem.hxx>
+#include <svx/flagsdef.hxx>
+
+class SvxTabulatorTabPage;
+
+// class TabWin_Impl -----------------------------------------------------
+
+class TabWin_Impl : public weld::CustomWidgetController
+{
+private:
+ sal_uInt16 nTabStyle;
+
+public:
+
+ TabWin_Impl() : nTabStyle(0)
+ {
+ }
+ virtual void Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect) override;
+
+ void SetTabStyle(sal_uInt16 nStyle) {nTabStyle = nStyle; }
+};
+
+// class SvxTabulatorTabPage ---------------------------------------------
+/*
+ [Description]
+ In this TabPage tabulators are managed.
+
+ [Items]
+ <SvxTabStopItem><SID_ATTR_TABSTOP>
+ <SfxUInt16Item><SID_ATTR_TABSTOP_DEFAULTS>
+ <SfxUInt16Item><SID_ATTR_TABSTOP_POS>
+ <SfxInt32Item><SID_ATTR_TABSTOP_OFFSET>
+*/
+
+class SvxTabulatorTabPage : public SfxTabPage
+{
+ static const sal_uInt16 pRanges[];
+
+public:
+ SvxTabulatorTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet );
+ virtual ~SvxTabulatorTabPage() override;
+
+ static const sal_uInt16* GetRanges() { return pRanges; }
+
+ virtual bool FillItemSet( SfxItemSet* rSet ) override;
+ virtual void Reset( const SfxItemSet* rSet ) override;
+
+ void DisableControls( const TabulatorDisableFlags nFlag );
+
+protected:
+ virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
+
+private:
+ // local variables, internal functions
+ SvxTabStop aCurrentTab;
+ std::unique_ptr<SvxTabStopItem> aNewTabs;
+ long nDefDist;
+
+ TabWin_Impl m_aLeftWin;
+ TabWin_Impl m_aRightWin;
+ TabWin_Impl m_aCenterWin;
+ TabWin_Impl m_aDezWin;
+
+ // just to format the numbers, not shown
+ std::unique_ptr<weld::MetricSpinButton> m_xTabSpin;
+ // tabulators and positions
+ std::unique_ptr<weld::EntryTreeView> m_xTabBox;
+ // TabType
+ std::unique_ptr<weld::RadioButton> m_xLeftTab;
+ std::unique_ptr<weld::RadioButton> m_xRightTab;
+ std::unique_ptr<weld::RadioButton> m_xCenterTab;
+ std::unique_ptr<weld::RadioButton> m_xDezTab;
+
+ std::unique_ptr<weld::Entry> m_xDezChar;
+ std::unique_ptr<weld::Label> m_xDezCharLabel;
+
+ std::unique_ptr<weld::RadioButton> m_xNoFillChar;
+ std::unique_ptr<weld::RadioButton> m_xFillPoints;
+ std::unique_ptr<weld::RadioButton> m_xFillDashLine ;
+ std::unique_ptr<weld::RadioButton> m_xFillSolidLine;
+ std::unique_ptr<weld::RadioButton> m_xFillSpecial;
+ std::unique_ptr<weld::Entry> m_xFillChar;
+
+ std::unique_ptr<weld::Button> m_xNewBtn;
+ std::unique_ptr<weld::Button> m_xDelAllBtn;
+ std::unique_ptr<weld::Button> m_xDelBtn;
+
+ std::unique_ptr<weld::Container> m_xTypeFrame;
+ std::unique_ptr<weld::Container> m_xFillFrame;
+
+ std::unique_ptr<weld::CustomWeld> m_xLeftWin;
+ std::unique_ptr<weld::CustomWeld> m_xRightWin;
+ std::unique_ptr<weld::CustomWeld> m_xCenterWin;
+ std::unique_ptr<weld::CustomWeld> m_xDezWin;
+
+ void InitTabPos_Impl( sal_uInt16 nPos = 0 );
+ void SetFillAndTabType_Impl();
+ void NewHdl_Impl(const weld::Button*);
+
+ OUString FormatTab();
+
+ // Handler
+ DECL_LINK(NewHdl_Impl, weld::Button&, void);
+ DECL_LINK(DelHdl_Impl, weld::Button&, void);
+ DECL_LINK(DelAllHdl_Impl, weld::Button&, void);
+
+ DECL_LINK(FillTypeCheckHdl_Impl, weld::ToggleButton&, void);
+ DECL_LINK(TabTypeCheckHdl_Impl, weld::ToggleButton&, void);
+
+ DECL_LINK(SelectHdl_Impl, weld::TreeView&, bool);
+ DECL_LINK(ModifyHdl_Impl, weld::ComboBox&, void);
+ DECL_LINK(ReformatHdl_Impl, weld::Widget&, void);
+ DECL_LINK(GetFillCharHdl_Impl, weld::Widget&, void);
+ DECL_LINK(GetDezCharHdl_Impl, weld::Widget&, void);
+
+ int FindCurrentTab();
+
+ virtual void PageCreated(const SfxAllItemSet& aSet) override;
+};
+
+#endif // INCLUDED_CUI_SOURCE_INC_TABSTPGE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/textanim.hxx b/cui/source/inc/textanim.hxx
new file mode 100644
index 000000000..3ae2452b0
--- /dev/null
+++ b/cui/source/inc/textanim.hxx
@@ -0,0 +1,108 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_TEXTANIM_HXX
+#define INCLUDED_CUI_SOURCE_INC_TEXTANIM_HXX
+
+#include <sfx2/tabdlg.hxx>
+#include <svx/sdtakitm.hxx>
+#include <svx/sdtaditm.hxx>
+#include <vcl/weld.hxx>
+
+class SdrView;
+
+/*************************************************************************
+|*
+|* Page for changing TextAnimations (running text etc.)
+|*
+\************************************************************************/
+
+class SvxTextAnimationPage : public SfxTabPage
+{
+private:
+ static const sal_uInt16 pRanges[];
+
+ SdrTextAniKind eAniKind;
+ FieldUnit eFUnit;
+ MapUnit eUnit;
+
+ TriState m_aUpState;
+ TriState m_aLeftState;
+ TriState m_aRightState;
+ TriState m_aDownState;
+
+ std::unique_ptr<weld::ComboBox> m_xLbEffect;
+ std::unique_ptr<weld::Widget> m_xBoxDirection;
+ std::unique_ptr<weld::ToggleButton> m_xBtnUp;
+ std::unique_ptr<weld::ToggleButton> m_xBtnLeft;
+ std::unique_ptr<weld::ToggleButton> m_xBtnRight;
+ std::unique_ptr<weld::ToggleButton> m_xBtnDown;
+
+ std::unique_ptr<weld::Frame> m_xFlProperties;
+ std::unique_ptr<weld::CheckButton> m_xTsbStartInside;
+ std::unique_ptr<weld::CheckButton> m_xTsbStopInside;
+
+ std::unique_ptr<weld::Widget> m_xBoxCount;
+ std::unique_ptr<weld::CheckButton> m_xTsbEndless;
+ std::unique_ptr<weld::SpinButton> m_xNumFldCount;
+
+ std::unique_ptr<weld::CheckButton> m_xTsbPixel;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrFldAmount;
+
+ std::unique_ptr<weld::CheckButton> m_xTsbAuto;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrFldDelay;
+
+ DECL_LINK( SelectEffectHdl_Impl, weld::ComboBox&, void );
+ DECL_LINK( ClickEndlessHdl_Impl, weld::Button&, void );
+ DECL_LINK( ClickAutoHdl_Impl, weld::Button&, void );
+ DECL_LINK( ClickPixelHdl_Impl, weld::Button&, void );
+ DECL_LINK( ClickDirectionHdl_Impl, weld::Button&, void );
+
+ void SelectDirection( SdrTextAniDirection nValue );
+ sal_uInt16 GetSelectedDirection() const;
+
+public:
+ SvxTextAnimationPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
+ virtual ~SvxTextAnimationPage() override;
+
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
+ static const sal_uInt16* GetRanges() { return pRanges; }
+
+ virtual bool FillItemSet( SfxItemSet* ) override;
+ virtual void Reset( const SfxItemSet * ) override;
+};
+
+/*************************************************************************
+|*
+|* Text-Tab-Dialog
+|*
+\************************************************************************/
+class SvxTextTabDialog : public SfxTabDialogController
+{
+private:
+ const SdrView* pView;
+
+ virtual void PageCreated(const OString& rId, SfxTabPage &rPage) override;
+
+public:
+ SvxTextTabDialog(weld::Window* pParent, const SfxItemSet* pAttr, const SdrView* pView);
+};
+
+#endif // INCLUDED_CUI_SOURCE_INC_TEXTANIM_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/textattr.hxx b/cui/source/inc/textattr.hxx
new file mode 100644
index 000000000..392794de9
--- /dev/null
+++ b/cui/source/inc/textattr.hxx
@@ -0,0 +1,95 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_TEXTATTR_HXX
+#define INCLUDED_CUI_SOURCE_INC_TEXTATTR_HXX
+
+#include <svx/dlgctrl.hxx>
+#include <svx/svdobj.hxx>
+
+class SdrView;
+
+/*************************************************************************
+|*
+|* Dialog for changing TextAttributes
+|*
+\************************************************************************/
+
+class SvxTextAttrPage : public SvxTabPage
+{
+private:
+ static const sal_uInt16 pRanges[];
+
+ const SfxItemSet& rOutAttrs;
+ SdrObjKind m_eObjKind;
+
+ bool bAutoGrowSizeEnabled;
+ bool bContourEnabled;
+ bool bAutoGrowWidthEnabled;
+ bool bAutoGrowHeightEnabled;
+ bool bWordWrapTextEnabled;
+ bool bFitToSizeEnabled;
+
+ SvxRectCtl m_aCtlPosition;
+
+ std::unique_ptr<weld::Widget> m_xDrawingText;
+ std::unique_ptr<weld::Widget> m_xCustomShapeText;
+ std::unique_ptr<weld::CheckButton> m_xTsbAutoGrowWidth;
+ std::unique_ptr<weld::CheckButton> m_xTsbAutoGrowHeight;
+ std::unique_ptr<weld::CheckButton> m_xTsbFitToSize;
+ std::unique_ptr<weld::CheckButton> m_xTsbContour;
+ std::unique_ptr<weld::CheckButton> m_xTsbWordWrapText;
+ std::unique_ptr<weld::CheckButton> m_xTsbAutoGrowSize;
+ std::unique_ptr<weld::Frame> m_xFlDistance;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrFldLeft;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrFldRight;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrFldTop;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrFldBottom;
+ std::unique_ptr<weld::Frame> m_xFlPosition;
+ std::unique_ptr<weld::CustomWeld> m_xCtlPosition;
+ std::unique_ptr<weld::CheckButton> m_xTsbFullWidth;
+
+ DECL_LINK(ClickFullWidthHdl_Impl, weld::Button&, void);
+ DECL_LINK(ClickHdl_Impl, weld::Button&, void);
+
+ /** Return whether the text direction is from left to right (</sal_True>) or
+ top to bottom (</sal_False>).
+ */
+ bool IsTextDirectionLeftToRight() const;
+
+public:
+
+ SvxTextAttrPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
+ virtual ~SvxTextAttrPage() override;
+
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
+ static const sal_uInt16* GetRanges() { return pRanges; }
+
+ virtual bool FillItemSet( SfxItemSet* ) override;
+ virtual void Reset( const SfxItemSet * ) override;
+
+ virtual void PointChanged( weld::DrawingArea* pWindow, RectPoint eRP ) override;
+
+ void Construct();
+ void SetObjKind(SdrObjKind eObjKind) { m_eObjKind = eObjKind; }
+ virtual void PageCreated(const SfxAllItemSet& aSet) override;
+};
+
+#endif // INCLUDED_CUI_SOURCE_INC_TEXTATTR_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/thesdlg.hxx b/cui/source/inc/thesdlg.hxx
new file mode 100644
index 000000000..65c4050cc
--- /dev/null
+++ b/cui/source/inc/thesdlg.hxx
@@ -0,0 +1,82 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_THESDLG_HXX
+#define INCLUDED_CUI_SOURCE_INC_THESDLG_HXX
+
+#include <com/sun/star/linguistic2/XThesaurus.hpp>
+
+#include <vcl/idle.hxx>
+#include <sfx2/basedlgs.hxx>
+
+#include <memory>
+#include <stack>
+
+class SvxThesaurusDialog : public SfxDialogController
+{
+ Idle m_aModifyIdle;
+
+ css::uno::Reference< css::linguistic2::XThesaurus > xThesaurus;
+ OUString aLookUpText;
+ LanguageType nLookUpLanguage;
+ std::stack< OUString > aLookUpHistory;
+ bool m_bWordFound;
+
+ std::unique_ptr<weld::Button> m_xLeftBtn;
+ std::unique_ptr<weld::ComboBox> m_xWordCB;
+ std::unique_ptr<weld::TreeView> m_xAlternativesCT;
+ std::unique_ptr<weld::Label> m_xNotFound;
+ std::unique_ptr<weld::Entry> m_xReplaceEdit;
+ std::unique_ptr<weld::ComboBox> m_xLangLB;
+ std::unique_ptr<weld::Button> m_xReplaceBtn;
+
+public:
+ virtual ~SvxThesaurusDialog() override;
+
+ // Handler
+ DECL_LINK( ReplaceBtnHdl_Impl, weld::Button&, void );
+ DECL_LINK( LeftBtnHdl_Impl, weld::Button&, void );
+ DECL_LINK( LanguageHdl_Impl, weld::ComboBox&, void );
+ DECL_LINK( WordSelectHdl_Impl, weld::ComboBox&, void );
+ DECL_LINK( AlternativesSelectHdl_Impl, weld::TreeView&, void );
+ DECL_LINK( AlternativesDoubleClickHdl_Impl, weld::TreeView&, bool );
+ DECL_LINK( SelectFirstHdl_Impl, void*, void );
+ DECL_LINK( ReplaceEditHdl_Impl, weld::Entry&, void );
+ DECL_LINK( ModifyTimer_Hdl, Timer *, void );
+ DECL_LINK( KeyInputHdl, const KeyEvent&, bool );
+
+ /// @throws css::lang::IllegalArgumentException
+ /// @throws css::uno::RuntimeException
+ css::uno::Sequence< css::uno::Reference< css::linguistic2::XMeaning > >
+ queryMeanings_Impl( OUString& rTerm, const css::lang::Locale& rLocale, const css::beans::PropertyValues& rProperties );
+
+ bool UpdateAlternativesBox_Impl();
+ void LookUp( const OUString &rText );
+ void LookUp_Impl();
+
+public:
+ SvxThesaurusDialog(weld::Window* pParent,
+ css::uno::Reference< css::linguistic2::XThesaurus > const & xThesaurus,
+ const OUString &rWord, LanguageType nLanguage);
+ void SetWindowTitle( LanguageType nLanguage );
+ OUString GetWord() const;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/tipofthedaydlg.hxx b/cui/source/inc/tipofthedaydlg.hxx
new file mode 100644
index 000000000..425805af6
--- /dev/null
+++ b/cui/source/inc/tipofthedaydlg.hxx
@@ -0,0 +1,48 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_TIPOFTHEDAYDLG_HXX
+#define INCLUDED_CUI_SOURCE_INC_TIPOFTHEDAYDLG_HXX
+
+#include <vcl/weld.hxx>
+
+class TipOfTheDayDialog : public weld::GenericDialogController
+{
+private:
+ std::unique_ptr<weld::Image> m_pImage;
+ std::unique_ptr<weld::Label> m_pText;
+ std::unique_ptr<weld::CheckButton> m_pShowTip;
+ std::unique_ptr<weld::Button> m_pNext;
+ std::unique_ptr<weld::LinkButton> m_pLink;
+
+ sal_Int32 nCurrentTip;
+ sal_Int32 nNumberOfTips;
+ sal_Int32 nDay;
+ OUString aLink;
+ void UpdateTip();
+ DECL_LINK(OnNextClick, weld::Button&, void);
+ DECL_LINK(OnLinkClick, weld::LinkButton&, bool);
+
+public:
+ TipOfTheDayDialog(weld::Window* pWindow);
+ virtual ~TipOfTheDayDialog() override;
+};
+
+#endif // INCLUDED_CUI_SOURCE_INC_TIPOFTHEDAYDLG_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/transfrm.hxx b/cui/source/inc/transfrm.hxx
new file mode 100644
index 000000000..2c27a19fb
--- /dev/null
+++ b/cui/source/inc/transfrm.hxx
@@ -0,0 +1,251 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_TRANSFRM_HXX
+#define INCLUDED_CUI_SOURCE_INC_TRANSFRM_HXX
+
+#include <svx/dlgctrl.hxx>
+#include <svx/dialcontrol.hxx>
+#include <svx/anchorid.hxx>
+#include <basegfx/range/b2drange.hxx>
+
+// predefines
+class SdrView;
+
+/*************************************************************************
+|*
+|* Transform-Tab-Dialog
+|*
+\************************************************************************/
+
+struct SvxSwFrameValidation;
+class SvxTransformTabDialog : public SfxTabDialogController
+{
+private:
+ const SdrView* pView;
+
+ SvxAnchorIds nAnchorCtrls;
+ Link<SvxSwFrameValidation&,void> aValidateLink;
+
+ virtual void PageCreated(const OString& rId, SfxTabPage &rPage) override;
+
+public:
+ SvxTransformTabDialog(weld::Window* pParent, const SfxItemSet* pAttr,
+ const SdrView* pView,
+ SvxAnchorIds nAnchorTypes);
+
+ //link for the Writer to validate positions
+ void SetValidateFramePosLink( const Link<SvxSwFrameValidation&,void>& rLink );
+};
+
+/*************************************************************************
+|*
+|* position and size tab page
+|*
+\************************************************************************/
+
+class SvxPositionSizeTabPage : public SvxTabPage
+{
+ static const sal_uInt16 pPosSizeRanges[];
+
+private:
+ const SfxItemSet& mrOutAttrs;
+
+ const SdrView* mpView;
+
+ // #i75273#
+ basegfx::B2DRange maRange;
+ basegfx::B2DRange maWorkRange;
+ basegfx::B2DPoint maAnchor;
+
+ MapUnit mePoolUnit;
+ FieldUnit meDlgUnit;
+ TriState mnProtectSizeState;
+ bool mbPageDisabled;
+ bool mbProtectDisabled;
+ bool mbSizeDisabled;
+ bool mbAdjustDisabled;
+ bool mbIgnoreAutoGrowWidth;
+ bool mbIgnoreAutoGrowHeight;
+
+ // from size
+ // #i75273#
+ double mfOldWidth;
+ double mfOldHeight;
+ RectPoint meRP;
+
+ SvxRectCtl m_aCtlPos;
+ SvxRectCtl m_aCtlSize;
+
+ // position
+ std::unique_ptr<weld::Widget> m_xFlPosition;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrPosX;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrPosY;
+ std::unique_ptr<weld::CustomWeld> m_xCtlPos;
+
+ // size
+ std::unique_ptr<weld::Widget> m_xFlSize;
+ std::unique_ptr<weld::Label> m_xFtWidth;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrWidth;
+ std::unique_ptr<weld::Label> m_xFtHeight;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrHeight;
+ std::unique_ptr<weld::CheckButton> m_xCbxScale;
+ std::unique_ptr<weld::CustomWeld> m_xCtlSize;
+
+ // protect
+ std::unique_ptr<weld::Widget> m_xFlProtect;
+ std::unique_ptr<weld::CheckButton> m_xTsbPosProtect;
+ std::unique_ptr<weld::CheckButton> m_xTsbSizeProtect;
+
+ // adjust
+ std::unique_ptr<weld::Widget> m_xFlAdjust;
+ std::unique_ptr<weld::CheckButton> m_xTsbAutoGrowWidth;
+ std::unique_ptr<weld::CheckButton> m_xTsbAutoGrowHeight;
+
+ DECL_LINK(ChangePosProtectHdl, weld::ToggleButton&, void);
+ DECL_LINK(ChangeSizeProtectHdl, weld::ToggleButton&, void);
+
+ void SetMinMaxPosition();
+ void GetTopLeftPosition(double& rfX, double& rfY, const basegfx::B2DRange& rRange);
+
+ DECL_LINK( ChangeWidthHdl, weld::MetricSpinButton&, void );
+ DECL_LINK( ChangeHeightHdl, weld::MetricSpinButton&, void );
+ DECL_LINK( ClickSizeProtectHdl, weld::ToggleButton&, void );
+ DECL_LINK( ClickAutoHdl, weld::ToggleButton&, void );
+
+public:
+ SvxPositionSizeTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
+ virtual ~SvxPositionSizeTabPage() override;
+
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
+ static const sal_uInt16* GetRanges() { return pPosSizeRanges; }
+
+ virtual bool FillItemSet( SfxItemSet* ) override;
+ virtual void Reset( const SfxItemSet * ) override;
+
+ virtual void ActivatePage( const SfxItemSet& rSet ) override;
+ virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
+
+ virtual void PointChanged(weld::DrawingArea* pWindow, RectPoint eRP) override;
+
+ void Construct();
+ void SetView( const SdrView* pSdrView ) { mpView = pSdrView; }
+
+ virtual void FillUserData() override;
+
+ void DisableResize();
+ void DisableProtect();
+
+ void UpdateControlStates();
+};
+
+/*************************************************************************
+|*
+|* rotation angle tab page
+|*
+\************************************************************************/
+class SvxAngleTabPage : public SvxTabPage
+{
+ static const sal_uInt16 pAngleRanges[];
+
+private:
+ const SdrView* pView;
+
+ // #i75273#
+ basegfx::B2DRange maRange;
+ basegfx::B2DPoint maAnchor;
+
+ MapUnit ePoolUnit;
+ FieldUnit eDlgUnit;
+
+ SvxRectCtl m_aCtlRect;
+
+ std::unique_ptr<weld::Widget> m_xFlPosition;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrPosX;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrPosY;
+ std::unique_ptr<weld::CustomWeld> m_xCtlRect;
+ std::unique_ptr<weld::Widget> m_xFlAngle;
+ std::unique_ptr<weld::MetricSpinButton> m_xNfAngle;
+ std::unique_ptr<svx::DialControl> m_xCtlAngle;
+ std::unique_ptr<weld::CustomWeld> m_xCtlAngleWin;
+
+public:
+ SvxAngleTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
+ virtual ~SvxAngleTabPage() override;
+
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
+ static const sal_uInt16* GetRanges() { return pAngleRanges; }
+
+ virtual bool FillItemSet( SfxItemSet* ) override;
+ virtual void Reset( const SfxItemSet * ) override;
+
+ virtual void ActivatePage( const SfxItemSet& rSet ) override;
+ virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
+
+ virtual void PointChanged(weld::DrawingArea* pWindow, RectPoint eRP) override;
+
+ void Construct();
+ void SetView( const SdrView* pSdrView ) { pView = pSdrView; }
+};
+
+/*************************************************************************
+|*
+|* slant/corner radius tab page
+|*
+\************************************************************************/
+class SvxSlantTabPage : public SfxTabPage
+{
+ static const sal_uInt16 pSlantRanges[];
+
+private:
+ const SdrView* pView;
+
+ MapUnit ePoolUnit;
+ FieldUnit eDlgUnit;
+
+ std::unique_ptr<weld::Widget> m_xFlRadius;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrRadius;
+ std::unique_ptr<weld::Widget> m_xFlAngle;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrAngle;
+ std::unique_ptr<weld::Widget> m_aControlGroups[2];
+ std::unique_ptr<weld::Widget> m_aControlGroupX[2];
+ std::unique_ptr<weld::MetricSpinButton> m_aControlX[2];
+ std::unique_ptr<weld::Widget> m_aControlGroupY[2];
+ std::unique_ptr<weld::MetricSpinButton> m_aControlY[2];
+
+public:
+ SvxSlantTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
+ virtual ~SvxSlantTabPage() override;
+
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
+ static const sal_uInt16* GetRanges() { return pSlantRanges; }
+
+ virtual bool FillItemSet( SfxItemSet* ) override;
+ virtual void Reset( const SfxItemSet * ) override;
+
+ virtual void ActivatePage( const SfxItemSet& rSet ) override;
+ virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
+
+ void Construct();
+ void SetView( const SdrView* pSdrView ) { pView = pSdrView; }
+};
+
+
+#endif // INCLUDED_CUI_SOURCE_INC_TRANSFRM_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/treeopt.hxx b/cui/source/inc/treeopt.hxx
new file mode 100644
index 000000000..c2aac20ee
--- /dev/null
+++ b/cui/source/inc/treeopt.hxx
@@ -0,0 +1,238 @@
+/* -*- 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 .
+ */
+
+#ifndef INCLUDED_CUI_SOURCE_INC_TREEOPT_HXX
+#define INCLUDED_CUI_SOURCE_INC_TREEOPT_HXX
+
+#include <sal/config.h>
+
+#include <memory>
+
+#include <sfx2/basedlgs.hxx>
+#include <svtools/restartdialog.hxx>
+
+class SfxModule;
+class SfxShell;
+
+// struct OrderedEntry ---------------------------------------------------
+
+struct OrderedEntry
+{
+ sal_Int32 m_nIndex;
+ OUString m_sId;
+
+ OrderedEntry( sal_Int32 nIndex, const OUString& rId ) :
+ m_nIndex( nIndex ), m_sId( rId ) {}
+};
+
+
+// struct Module ---------------------------------------------------------
+
+struct Module
+{
+ bool m_bActive;
+ std::vector< std::unique_ptr<OrderedEntry> > m_aNodeList;
+
+ Module() : m_bActive( false ) {}
+};
+
+// struct OptionsLeaf ----------------------------------------------------
+
+struct OptionsLeaf
+{
+ OUString m_sLabel;
+ OUString m_sPageURL;
+ OUString m_sEventHdl;
+ OUString m_sGroupId;
+ sal_Int32 m_nGroupIndex;
+
+ OptionsLeaf( const OUString& rLabel,
+ const OUString& rPageURL,
+ const OUString& rEventHdl,
+ const OUString& rGroupId,
+ sal_Int32 nGroupIndex ) :
+ m_sLabel( rLabel ),
+ m_sPageURL( rPageURL ),
+ m_sEventHdl( rEventHdl ),
+ m_sGroupId( rGroupId ),
+ m_nGroupIndex( nGroupIndex ) {}
+};
+
+// struct OptionsNode ----------------------------------------------------
+
+struct OptionsNode
+{
+ OUString m_sId;
+ OUString m_sLabel;
+ bool m_bAllModules;
+ std::vector< std::unique_ptr<OptionsLeaf> > m_aLeaves;
+ std::vector< std::vector< std::unique_ptr<OptionsLeaf> > >
+ m_aGroupedLeaves;
+
+ OptionsNode( const OUString& rId,
+ const OUString& rLabel,
+ bool bAllModules ) :
+ m_sId( rId ),
+ m_sLabel( rLabel ),
+ m_bAllModules( bAllModules ) {}
+};
+
+typedef std::vector< std::unique_ptr<OptionsNode> > VectorOfNodes;
+
+struct LastPageSaver
+{
+ sal_uInt16 m_nLastPageId;
+ OUString m_sLastPageURL_Tools;
+ OUString m_sLastPageURL_ExtMgr;
+
+ LastPageSaver() : m_nLastPageId( USHRT_MAX ) {}
+};
+
+// class OfaTreeOptionsDialog --------------------------------------------
+
+namespace com::sun::star::frame { class XFrame; }
+namespace com::sun::star::awt { class XContainerWindowProvider; }
+
+struct OptionsPageInfo;
+struct Module;
+class ExtensionsTabPage;
+class SvxColorTabPage;
+
+class OfaTreeOptionsDialog final: public SfxOkDialogController
+{
+private:
+ std::unique_ptr<weld::Button> xOkPB;
+ std::unique_ptr<weld::Button> xApplyPB;
+ std::unique_ptr<weld::Button> xBackPB;
+
+ std::unique_ptr<weld::TreeView> xTreeLB;
+ std::unique_ptr<weld::Container> xTabBox;
+
+ weld::Window* m_pParent;
+
+ std::unique_ptr<weld::TreeIter> xCurrentPageEntry;
+
+ OUString sTitle;
+
+ bool bForgetSelection;
+ bool bIsFromExtensionManager;
+
+ // check "for the current document only" and set focus to "Western" languages box
+ bool bIsForSetDocumentLanguage;
+
+ bool bNeedsRestart;
+ svtools::RestartReason eRestartReason;
+
+ css::uno::Reference < css::awt::XContainerWindowProvider >
+ m_xContainerWinProvider;
+
+ static LastPageSaver* pLastPageSaver;
+
+ std::unique_ptr<SfxItemSet> CreateItemSet( sal_uInt16 nId );
+ static void ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet );
+ void InitTreeAndHandler();
+ void Initialize( const css::uno::Reference< css::frame::XFrame >& _xFrame );
+ void InitWidgets();
+
+ void LoadExtensionOptions( const OUString& rExtensionId );
+ static OUString GetModuleIdentifier( const css::uno::Reference<
+ css::frame::XFrame >& xFrame );
+ static std::unique_ptr<Module> LoadModule( const OUString& rModuleIdentifier );
+ static VectorOfNodes LoadNodes( Module* pModule, const OUString& rExtensionId );
+ void InsertNodes( const VectorOfNodes& rNodeList );
+
+ void ApplyOptions( bool deactivate );
+
+ DECL_LINK(ShowPageHdl_Impl, weld::TreeView&, void);
+ DECL_LINK(BackHdl_Impl, weld::Button&, void);
+ DECL_LINK(ApplyHdl_Impl, weld::Button&, void);
+ DECL_LINK(OKHdl_Impl, weld::Button&, void);
+ DECL_LINK(HelpHdl_Impl, weld::Widget&, bool);
+ void SelectHdl_Impl();
+
+ virtual short run() override;
+
+ virtual weld::Button& GetOKButton() const override { return *xOkPB; }
+ virtual const SfxItemSet* GetExampleSet() const override { return nullptr; }
+
+public:
+ OfaTreeOptionsDialog(weld::Window* pParent,
+ const css::uno::Reference< css::frame::XFrame >& _xFrame,
+ bool bActivateLastSelection);
+ OfaTreeOptionsDialog(weld::Window* pParent, const OUString& rExtensionId);
+ virtual ~OfaTreeOptionsDialog() override;
+
+ OptionsPageInfo* AddTabPage( sal_uInt16 nId, const OUString& rPageName, sal_uInt16 nGroup );
+ sal_uInt16 AddGroup( const OUString& rGroupName, SfxShell* pCreateShell,
+ SfxModule* pCreateModule, sal_uInt16 nDialogId );
+
+ void ActivateLastSelection();
+ void ActivatePage( sal_uInt16 nResId );
+ void ActivatePage( const OUString& rPageURL );
+ void ApplyItemSets();
+
+ // helper functions to call the language settings TabPage from the SpellDialog
+ static void ApplyLanguageOptions(const SfxItemSet& rSet);
+
+ void SetNeedsRestart( svtools::RestartReason eReason );
+};
+
+// class ExtensionsTabPage -----------------------------------------------
+
+namespace com::sun::star::awt { class XWindow; }
+namespace com::sun::star::awt { class XContainerWindowEventHandler; }
+
+class ExtensionsTabPage
+{
+private:
+ weld::Container* m_pContainer;
+ OUString m_sPageURL;
+ css::uno::Reference<css::awt::XWindow> m_xPageParent;
+ css::uno::Reference<css::awt::XWindow> m_xPage;
+ OUString m_sEventHdl;
+ css::uno::Reference< css::awt::XContainerWindowEventHandler >
+ m_xEventHdl;
+ css::uno::Reference< css::awt::XContainerWindowProvider >
+ m_xWinProvider;
+
+ void CreateDialogWithHandler();
+ bool DispatchAction( const OUString& rAction );
+
+public:
+ ExtensionsTabPage(
+ weld::Container* pParent,
+ const OUString& rPageURL, const OUString& rEvtHdl,
+ const css::uno::Reference<
+ css::awt::XContainerWindowProvider >& rProvider );
+
+ ~ExtensionsTabPage();
+
+ void Show();
+ void Hide();
+
+ void ActivatePage();
+ void DeactivatePage();
+
+ void ResetPage();
+ void SavePage();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/zoom.hxx b/cui/source/inc/zoom.hxx
new file mode 100644
index 000000000..f35a7bfba
--- /dev/null
+++ b/cui/source/inc/zoom.hxx
@@ -0,0 +1,70 @@
+/* -*- 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 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_ZOOM_HXX
+#define INCLUDED_CUI_SOURCE_INC_ZOOM_HXX
+
+#include <memory>
+#include <sfx2/basedlgs.hxx>
+#include <svl/itemset.hxx>
+#include <svx/zoom_def.hxx>
+#include <vcl/weld.hxx>
+
+class SvxZoomDialog : public SfxDialogController
+{
+private:
+ const SfxItemSet& m_rSet;
+ std::unique_ptr<SfxItemSet> m_pOutSet;
+ bool m_bModified;
+
+ std::unique_ptr<weld::RadioButton> m_xOptimalBtn;
+ std::unique_ptr<weld::RadioButton> m_xWholePageBtn;
+ std::unique_ptr<weld::RadioButton> m_xPageWidthBtn;
+ std::unique_ptr<weld::RadioButton> m_x100Btn;
+ std::unique_ptr<weld::RadioButton> m_xUserBtn;
+ std::unique_ptr<weld::MetricSpinButton> m_xUserEdit;
+ std::unique_ptr<weld::Widget> m_xViewFrame;
+ std::unique_ptr<weld::RadioButton> m_xAutomaticBtn;
+ std::unique_ptr<weld::RadioButton> m_xSingleBtn;
+ std::unique_ptr<weld::RadioButton> m_xColumnsBtn;
+ std::unique_ptr<weld::SpinButton> m_xColumnsEdit;
+ std::unique_ptr<weld::CheckButton> m_xBookModeChk;
+ std::unique_ptr<weld::Button> m_xOKBtn;
+
+ DECL_LINK(UserHdl, weld::ToggleButton&, void);
+ DECL_LINK(SpinHdl, weld::MetricSpinButton&, void);
+ DECL_LINK(ViewLayoutUserHdl, weld::ToggleButton&, void);
+ DECL_LINK(ViewLayoutSpinHdl, weld::SpinButton&, void);
+ DECL_LINK(ViewLayoutCheckHdl, weld::ToggleButton&, void);
+ DECL_LINK(OKHdl, weld::Button&, void);
+
+public:
+ SvxZoomDialog(weld::Window* pParent, const SfxItemSet& rCoreSet);
+
+ const SfxItemSet* GetOutputItemSet() const;
+
+ sal_uInt16 GetFactor() const;
+ void SetFactor(sal_uInt16 nNewFactor, ZoomButtonId nButtonId = ZoomButtonId::NONE);
+
+ void HideButton(ZoomButtonId nButtonId);
+ void SetLimits(sal_uInt16 nMin, sal_uInt16 nMax);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */