summaryrefslogtreecommitdiff
path: root/cui/source/inc
diff options
context:
space:
mode:
Diffstat (limited to 'cui/source/inc')
-rw-r--r--cui/source/inc/AdditionsDialog.hxx172
-rw-r--r--cui/source/inc/CommandCategoryListBox.hxx50
-rw-r--r--cui/source/inc/CustomNotebookbarGenerator.hxx4
-rw-r--r--cui/source/inc/DiagramDialog.hxx15
-rw-r--r--cui/source/inc/FontFeatures.hxx17
-rw-r--r--cui/source/inc/FontFeaturesDialog.hxx29
-rw-r--r--cui/source/inc/GraphicsTestsDialog.hxx54
-rw-r--r--cui/source/inc/ImageViewerDialog.hxx20
-rw-r--r--cui/source/inc/QrCodeGenDialog.hxx25
-rw-r--r--cui/source/inc/SignSignatureLineDialog.hxx8
-rw-r--r--cui/source/inc/SignatureLineDialog.hxx9
-rw-r--r--cui/source/inc/SignatureLineDialogBase.hxx14
-rw-r--r--cui/source/inc/SpellDialog.hxx31
-rw-r--r--cui/source/inc/SvxConfigPageHelper.hxx77
-rw-r--r--cui/source/inc/SvxMenuConfigPage.hxx47
-rw-r--r--cui/source/inc/SvxNotebookbarConfigPage.hxx6
-rw-r--r--cui/source/inc/SvxToolbarConfigPage.hxx53
-rw-r--r--cui/source/inc/TextColumnsPage.hxx40
-rw-r--r--cui/source/inc/about.hxx11
-rw-r--r--cui/source/inc/acccfg.hxx7
-rw-r--r--cui/source/inc/align.hxx24
-rw-r--r--cui/source/inc/autocdlg.hxx28
-rw-r--r--cui/source/inc/backgrnd.hxx22
-rw-r--r--cui/source/inc/bbdlg.hxx7
-rw-r--r--cui/source/inc/border.hxx27
-rw-r--r--cui/source/inc/cfg.hxx73
-rw-r--r--cui/source/inc/cfgutil.hxx39
-rw-r--r--cui/source/inc/chardlg.hxx62
-rw-r--r--cui/source/inc/connect.hxx11
-rw-r--r--cui/source/inc/cuifmsearch.hxx63
-rw-r--r--cui/source/inc/cuigaldlg.hxx21
-rw-r--r--cui/source/inc/cuigrfflt.hxx11
-rw-r--r--cui/source/inc/cuihyperdlg.hxx37
-rw-r--r--cui/source/inc/cuiimapwnd.hxx5
-rw-r--r--cui/source/inc/cuioptgenrl.hxx13
-rw-r--r--cui/source/inc/cuisrchdlg.hxx5
-rw-r--r--cui/source/inc/cuitabarea.hxx114
-rw-r--r--cui/source/inc/cuitabline.hxx30
-rw-r--r--cui/source/inc/cuitbxform.hxx5
-rw-r--r--cui/source/inc/dbregister.hxx12
-rw-r--r--cui/source/inc/defdlgname.hxx5
-rw-r--r--cui/source/inc/dialmgr.hxx3
-rw-r--r--cui/source/inc/dlgname.hxx125
-rw-r--r--cui/source/inc/dstribut.hxx72
-rw-r--r--cui/source/inc/fileextcheckdlg.hxx39
-rw-r--r--cui/source/inc/grfpage.hxx33
-rw-r--r--cui/source/inc/hangulhanjadlg.hxx18
-rw-r--r--cui/source/inc/headertablistbox.hxx11
-rw-r--r--cui/source/inc/helpids.h54
-rw-r--r--cui/source/inc/hldocntp.hxx10
-rw-r--r--cui/source/inc/hldoctp.hxx9
-rw-r--r--cui/source/inc/hlinettp.hxx37
-rw-r--r--cui/source/inc/hlmailtp.hxx12
-rw-r--r--cui/source/inc/hlmarkwn.hxx11
-rw-r--r--cui/source/inc/hlmarkwn_def.hxx11
-rw-r--r--cui/source/inc/hltpbase.hxx12
-rw-r--r--cui/source/inc/hyphen.hxx9
-rw-r--r--cui/source/inc/iconcdlg.hxx38
-rw-r--r--cui/source/inc/insdlg.hxx15
-rw-r--r--cui/source/inc/insrc.hxx24
-rw-r--r--cui/source/inc/labdlg.hxx13
-rw-r--r--cui/source/inc/linkdlg.hxx36
-rw-r--r--cui/source/inc/macroass.hxx6
-rw-r--r--cui/source/inc/macropg.hxx27
-rw-r--r--cui/source/inc/measure.hxx13
-rw-r--r--cui/source/inc/multipat.hxx19
-rw-r--r--cui/source/inc/newtabledlg.hxx17
-rw-r--r--cui/source/inc/numfmt.hxx22
-rw-r--r--cui/source/inc/numpages.hxx39
-rw-r--r--cui/source/inc/optasian.hxx22
-rw-r--r--cui/source/inc/optdict.hxx10
-rw-r--r--cui/source/inc/optlingu.hxx16
-rw-r--r--cui/source/inc/optpath.hxx15
-rw-r--r--cui/source/inc/page.hxx45
-rw-r--r--cui/source/inc/paragrph.hxx93
-rw-r--r--cui/source/inc/passwdomdlg.hxx14
-rw-r--r--cui/source/inc/pastedlg.hxx5
-rw-r--r--cui/source/inc/postdlg.hxx13
-rw-r--r--cui/source/inc/screenshotannotationdlg.hxx11
-rw-r--r--cui/source/inc/scriptdlg.hxx24
-rw-r--r--cui/source/inc/sdrcelldlg.hxx11
-rw-r--r--cui/source/inc/securityoptions.hxx86
-rw-r--r--cui/source/inc/showcols.hxx5
-rw-r--r--cui/source/inc/splitcelldlg.hxx35
-rw-r--r--cui/source/inc/srchxtra.hxx9
-rw-r--r--cui/source/inc/swpossizetabpage.hxx24
-rw-r--r--cui/source/inc/tabstpge.hxx15
-rw-r--r--cui/source/inc/textanim.hxx17
-rw-r--r--cui/source/inc/textattr.hxx15
-rw-r--r--cui/source/inc/thesdlg.hxx10
-rw-r--r--cui/source/inc/tipofthedaydlg.hxx20
-rw-r--r--cui/source/inc/toolbarmodedlg.hxx37
-rw-r--r--cui/source/inc/transfrm.hxx34
-rw-r--r--cui/source/inc/treeopt.hxx111
-rw-r--r--cui/source/inc/whatsnew.hxx79
-rw-r--r--cui/source/inc/zoom.hxx11
96 files changed, 1562 insertions, 1263 deletions
diff --git a/cui/source/inc/AdditionsDialog.hxx b/cui/source/inc/AdditionsDialog.hxx
index 8b3211bb3d1a..559a4ca911ff 100644
--- a/cui/source/inc/AdditionsDialog.hxx
+++ b/cui/source/inc/AdditionsDialog.hxx
@@ -10,88 +10,170 @@
#pragma once
-#include <vcl/svapp.hxx>
#include <salhelper/thread.hxx>
#include <rtl/ref.hxx>
#include <vcl/weld.hxx>
-struct AdditionsItem
-{
- AdditionsItem(weld::Widget* pParent)
- : m_xBuilder(Application::CreateBuilder(pParent, "cui/ui/additionsfragment.ui"))
- , m_xContainer(m_xBuilder->weld_widget("additionsEntry"))
- , m_xImageScreenshot(m_xBuilder->weld_image("imageScreenshot"))
- , m_xButtonInstall(m_xBuilder->weld_button("buttonInstall"))
- , m_xLinkButtonName(m_xBuilder->weld_link_button("linkButtonName"))
- , m_xLabelAuthor(m_xBuilder->weld_label("labelAuthor"))
- , m_xLabelDesc(m_xBuilder->weld_label("labelDesc")) // no change (print description)
- , m_xLabelDescription(m_xBuilder->weld_label("labelDescription"))
- , m_xLabelLicense(m_xBuilder->weld_label("labelLicense"))
- , m_xLabelVersion(m_xBuilder->weld_label("labelVersion"))
- , m_xLabelComments(m_xBuilder->weld_label("labelComments")) // no change
- , m_xLinkButtonComments(m_xBuilder->weld_link_button("linkButtonComments"))
- , m_xImageVoting(m_xBuilder->weld_image("imageVoting"))
- , m_xImageDownloadNumber(m_xBuilder->weld_image("imageDownloadNumber"))
- , m_xLabelDownloadNumber(m_xBuilder->weld_label("labelDownloadNumber"))
- {
- }
+// Detect changes on the UI
+#include <vcl/timer.hxx>
- std::unique_ptr<weld::Builder> m_xBuilder;
- std::unique_ptr<weld::Widget> m_xContainer;
- std::unique_ptr<weld::Image> m_xImageScreenshot;
- std::unique_ptr<weld::Button> m_xButtonInstall;
- std::unique_ptr<weld::LinkButton> m_xLinkButtonName;
- std::unique_ptr<weld::Label> m_xLabelAuthor;
- std::unique_ptr<weld::Label> m_xLabelDesc;
- std::unique_ptr<weld::Label> m_xLabelDescription;
- std::unique_ptr<weld::Label> m_xLabelLicense;
- std::unique_ptr<weld::Label> m_xLabelVersion;
- std::unique_ptr<weld::Label> m_xLabelComments;
- std::unique_ptr<weld::LinkButton> m_xLinkButtonComments;
- std::unique_ptr<weld::Image> m_xImageVoting;
- std::unique_ptr<weld::Image> m_xImageDownloadNumber;
- std::unique_ptr<weld::Label> m_xLabelDownloadNumber;
-};
+// Search and filter
+#include <i18nutil/searchopt.hxx>
+
+// Extension Manager Connection
+#include <com/sun/star/deployment/XExtensionManager.hpp>
+
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/ucb/XCommandEnvironment.hpp>
+#include <com/sun/star/ucb/XProgressHandler.hpp>
+#include <cppuhelper/implbase.hxx>
+
+#include <atomic>
+
+class AdditionsDialog;
class SearchAndParseThread;
+class AdditionsItem;
+
+struct AdditionInfo
+{
+ OUString sExtensionID;
+ OUString sName;
+ OUString sAuthorName;
+ OUString sExtensionURL;
+ OUString sScreenshotURL;
+ OUString sIntroduction;
+ OUString sDescription;
+ OUString sCompatibleVersion;
+ OUString sReleaseVersion;
+ OUString sLicense;
+ OUString sCommentNumber;
+ OUString sCommentURL;
+ OUString sRating;
+ OUString sDownloadNumber;
+ OUString sDownloadURL;
+};
class AdditionsDialog : public weld::GenericDialogController
{
private:
- // void fillGrid();
+ Timer m_aSearchDataTimer;
+
+ DECL_LINK(GearHdl, const OUString&, void);
+ DECL_LINK(SearchUpdateHdl, weld::Entry&, void);
+ DECL_LINK(ImplUpdateDataHdl, Timer*, void);
+ DECL_LINK(FocusOut_Impl, weld::Widget&, void);
+ DECL_LINK(CloseButtonHdl, weld::Button&, void);
public:
+ css::uno::Reference<css::deployment::XExtensionManager> m_xExtensionManager;
std::unique_ptr<weld::Entry> m_xEntrySearch;
- std::unique_ptr<weld::MenuButton> m_xMenuButtonSettings;
- std::vector<AdditionsItem> m_aAdditionsItems;
+ std::unique_ptr<weld::Button> m_xButtonClose;
+ std::vector<std::shared_ptr<AdditionsItem>> m_aAdditionsItems; // UI components
+ std::vector<AdditionInfo> m_aAllExtensionsVector; // Stores the all extensions' info
std::unique_ptr<weld::ScrolledWindow> m_xContentWindow;
std::unique_ptr<weld::Container> m_xContentGrid;
std::unique_ptr<weld::Label> m_xLabelProgress;
+ std::unique_ptr<weld::MenuButton> m_xGearBtn;
+
::rtl::Reference<SearchAndParseThread> m_pSearchThread;
- AdditionsDialog(weld::Window* pParent);
- ~AdditionsDialog() override;
+ OUString m_sURL;
+ OUString m_sTag;
+ size_t
+ m_nMaxItemCount; // Max number of item which will appear on the list before the press to the show more button.
+ size_t m_nCurrentListItemCount; // Current number of item on the list
+ i18nutil::SearchOptions2 m_searchOptions;
+ AdditionsDialog(weld::Window* pParent, const OUString& sAdditionsTag);
+ ~AdditionsDialog() override;
+ css::uno::Sequence<css::uno::Sequence<css::uno::Reference<css::deployment::XPackage>>>
+ getInstalledExtensions();
void SetProgress(const OUString& rProgress);
+ void ClearList();
+ void RefreshUI();
+
+ static bool sortByComment(const AdditionInfo& a, const AdditionInfo& b);
+ static bool sortByRating(const AdditionInfo& a, const AdditionInfo& b);
+ static bool sortByDownload(const AdditionInfo& a, const AdditionInfo& b);
+};
+
+class AdditionsItem
+{
+public:
+ AdditionsItem(weld::Widget* pParent, AdditionsDialog* pParentDialog,
+ const AdditionInfo& additionInfo);
+ bool getExtensionFile(OUString& sExtensionFile);
+
+ DECL_LINK(ShowMoreHdl, weld::Button&, void);
+ DECL_LINK(InstallHdl, weld::Button&, void);
+
+ std::unique_ptr<weld::Builder> m_xBuilder;
+ std::unique_ptr<weld::Widget> m_xContainer;
+ std::unique_ptr<weld::Image> m_xImageScreenshot;
+ std::unique_ptr<weld::Button> m_xButtonInstall;
+ std::unique_ptr<weld::LinkButton> m_xLinkButtonWebsite;
+ std::unique_ptr<weld::Label> m_xLabelName;
+ std::unique_ptr<weld::Label> m_xLabelAuthor;
+ std::unique_ptr<weld::Label> m_xLabelDescription;
+ std::unique_ptr<weld::Label> m_xLabelLicense;
+ std::unique_ptr<weld::Label> m_xLabelVersion;
+ std::unique_ptr<weld::LinkButton> m_xLinkButtonComments;
+ std::unique_ptr<weld::Image> m_xImageVoting1;
+ std::unique_ptr<weld::Image> m_xImageVoting2;
+ std::unique_ptr<weld::Image> m_xImageVoting3;
+ std::unique_ptr<weld::Image> m_xImageVoting4;
+ std::unique_ptr<weld::Image> m_xImageVoting5;
+ std::unique_ptr<weld::Label> m_xLabelDownloadNumber;
+ std::unique_ptr<weld::Button> m_xButtonShowMore;
+ AdditionsDialog* m_pParentDialog;
+ OUString m_sDownloadURL;
+ OUString m_sExtensionID;
};
class SearchAndParseThread : public salhelper::Thread
{
private:
AdditionsDialog* m_pAdditionsDialog;
- OUString m_aURL;
std::atomic<bool> m_bExecute;
bool m_bIsFirstLoading;
+ bool m_bUITest;
+
+ void Search();
+ void Append(AdditionInfo& additionInfo);
+ void CheckInstalledExtensions();
virtual ~SearchAndParseThread() override;
virtual void execute() override;
public:
- SearchAndParseThread(AdditionsDialog* pDialog, const OUString& rURL,
- const bool& bIsFirstLoading);
+ SearchAndParseThread(AdditionsDialog* pDialog, bool bIsFirstLoading);
void StopExecution() { m_bExecute = false; }
};
+class TmpRepositoryCommandEnv
+ : public ::cppu::WeakImplHelper<css::ucb::XCommandEnvironment, css::task::XInteractionHandler,
+ css::ucb::XProgressHandler>
+{
+public:
+ virtual ~TmpRepositoryCommandEnv() override;
+ TmpRepositoryCommandEnv();
+
+ // XCommandEnvironment
+ virtual css::uno::Reference<css::task::XInteractionHandler>
+ SAL_CALL getInteractionHandler() override;
+ virtual css::uno::Reference<css::ucb::XProgressHandler> SAL_CALL getProgressHandler() override;
+
+ // XInteractionHandler
+ virtual void SAL_CALL
+ handle(css::uno::Reference<css::task::XInteractionRequest> const& xRequest) override;
+
+ // XProgressHandler
+ virtual void SAL_CALL push(css::uno::Any const& Status) override;
+ virtual void SAL_CALL update(css::uno::Any const& Status) override;
+ virtual void SAL_CALL pop() override;
+};
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/CommandCategoryListBox.hxx b/cui/source/inc/CommandCategoryListBox.hxx
index 059c1474f1cd..c4882ae1745d 100644
--- a/cui/source/inc/CommandCategoryListBox.hxx
+++ b/cui/source/inc/CommandCategoryListBox.hxx
@@ -26,11 +26,11 @@ 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;
+ 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;
@@ -45,36 +45,38 @@ public:
~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 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); }
+ 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 categorySelected(CuiConfigFunctionListBox* pFunctionListBox, const OUString& filterTerm,
+ SaveInData* pCurrentSaveInData = nullptr);
- void SetStylesInfo(SfxStylesInfo_Impl* pStyles);
+ 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
+ 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);}
+ 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
index b06848dbb955..a7149879aef0 100644
--- a/cui/source/inc/CustomNotebookbarGenerator.hxx
+++ b/cui/source/inc/CustomNotebookbarGenerator.hxx
@@ -35,8 +35,8 @@ public:
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);
+ static void setCustomizedUIItem(const Sequence<OUString>& rUIItemProperties,
+ const OUString& rNotebookbarConfigType);
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/DiagramDialog.hxx b/cui/source/inc/DiagramDialog.hxx
index e97144050a0e..a612e092a8e7 100644
--- a/cui/source/inc/DiagramDialog.hxx
+++ b/cui/source/inc/DiagramDialog.hxx
@@ -7,36 +7,35 @@
* 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
+#pragma once
#include <tools/link.hxx>
#include <vcl/weld.hxx>
-class DiagramDataInterface;
+class SdrObjGroup;
/** Edit Diagram dialog */
class DiagramDialog : public weld::GenericDialogController
{
public:
- DiagramDialog(weld::Window* pWindow, std::shared_ptr<DiagramDataInterface> pDiagramData);
+ DiagramDialog(weld::Window* pWindow, SdrObjGroup& rDiagram);
virtual ~DiagramDialog() override;
private:
- std::shared_ptr<DiagramDataInterface> mpDiagramData;
- std::unique_ptr<weld::Button> mpBtnOk;
+ SdrObjGroup& m_rDiagram;
+ sal_uInt32 m_nUndos;
+
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(OnAddCancel, weld::Button&, void);
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/FontFeatures.hxx b/cui/source/inc/FontFeatures.hxx
new file mode 100644
index 000000000000..f16c11628143
--- /dev/null
+++ b/cui/source/inc/FontFeatures.hxx
@@ -0,0 +1,17 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+#pragma once
+
+#include <vector>
+#include <vcl/font/Feature.hxx>
+#include <vcl/virdev.hxx>
+
+std::vector<vcl::font::Feature> getFontFeatureList(OUString const& rFontName, VirtualDevice& rVDev);
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
diff --git a/cui/source/inc/FontFeaturesDialog.hxx b/cui/source/inc/FontFeaturesDialog.hxx
index 93e5f7c4a76e..93ba0cb9f80d 100644
--- a/cui/source/inc/FontFeaturesDialog.hxx
+++ b/cui/source/inc/FontFeaturesDialog.hxx
@@ -8,8 +8,7 @@
*
*/
-#ifndef INCLUDED_CUI_SOURCE_INC_FONTFEATURESDIALOG_HXX
-#define INCLUDED_CUI_SOURCE_INC_FONTFEATURESDIALOG_HXX
+#pragma once
#include <vcl/svapp.hxx>
#include <vcl/weld.hxx>
@@ -23,46 +22,58 @@ struct FontFeatureItem
{
FontFeatureItem(weld::Widget* pParent)
: m_aFeatureCode(0)
- , m_nDefault(0)
+ , m_nDefault(-1)
, 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"))
{
+ m_xCheck->connect_toggled(LINK(this, FontFeatureItem, CheckBoxToggledHdl));
}
sal_uInt32 m_aFeatureCode;
- sal_uInt32 m_nDefault;
+ sal_Int32 m_nDefault;
+ weld::TriStateEnabled m_aTriStateEnabled;
+ Link<weld::Toggleable&, void> m_aToggleHdl;
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;
+
+private:
+ DECL_LINK(CheckBoxToggledHdl, weld::Toggleable&, void);
};
class FontFeaturesDialog : public weld::GenericDialogController
{
private:
- std::vector<FontFeatureItem> m_aFeatureItems;
+ std::vector<std::unique_ptr<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_xContentBox;
std::unique_ptr<weld::Container> m_xContentGrid;
+ std::unique_ptr<weld::Container> m_xStylisticSetsBox;
+ std::unique_ptr<weld::Container> m_xStylisticSetsGrid;
+ std::unique_ptr<weld::Container> m_xCharacterVariantsBox;
+ std::unique_ptr<weld::Container> m_xCharacterVariantsGrid;
std::unique_ptr<weld::CustomWeld> m_xPreviewWindow;
void initialize();
OUString createFontNameWithFeatures();
- void fillGrid(std::vector<vcl::font::Feature> const& rFontFeatures);
+ // returns the max height of a row
+ int fillGrid(std::vector<vcl::font::Feature> const& rFontFeatures);
DECL_LINK(ComboBoxSelectedHdl, weld::ComboBox&, void);
- DECL_LINK(CheckBoxToggledHdl, weld::ToggleButton&, void);
+ DECL_LINK(CheckBoxToggledHdl, weld::Toggleable&, void);
public:
- FontFeaturesDialog(weld::Window* pParent, OUString const& rFontName);
+ FontFeaturesDialog(weld::Window* pParent, OUString aFontName);
~FontFeaturesDialog() override;
virtual short run() override;
@@ -73,6 +84,4 @@ public:
} // end svx namespaces
-#endif // INCLUDED_CUI_SOURCE_INC_FONTFEATURESDIALOG_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/GraphicsTestsDialog.hxx b/cui/source/inc/GraphicsTestsDialog.hxx
new file mode 100644
index 000000000000..2bf18de5dde7
--- /dev/null
+++ b/cui/source/inc/GraphicsTestsDialog.hxx
@@ -0,0 +1,54 @@
+/* -*- 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/.
+ */
+#pragma once
+
+#include <vcl/bitmap.hxx>
+#include <vcl/weld.hxx>
+#include <tools/link.hxx>
+
+#include <vector>
+
+class GraphicTestEntry final
+{
+private:
+ std::unique_ptr<weld::Builder> m_xBuilder;
+ std::unique_ptr<weld::Container> m_xContainer;
+ std::unique_ptr<weld::Label> m_xTestLabel;
+ std::unique_ptr<weld::Button> m_xTestButton;
+
+ weld::Dialog* m_xParentDialog;
+
+ Bitmap m_xResultBitmap;
+
+public:
+ DECL_LINK(HandleResultViewRequest, weld::Button&, void);
+ GraphicTestEntry(weld::Container* pParent, weld::Dialog* pDialog, OUString aTestName,
+ OUString aTestStatus, Bitmap aTestBitmap);
+ weld::Widget* get_widget() const { return m_xContainer.get(); }
+};
+
+class GraphicsTestsDialog : public weld::GenericDialogController
+{
+ std::unique_ptr<weld::TextView> m_xResultLog;
+ std::unique_ptr<weld::Button> m_xDownloadResults;
+ std::unique_ptr<weld::Box> m_xContainerBox;
+
+ std::vector<std::unique_ptr<GraphicTestEntry>> m_xGraphicTestEntries;
+
+ OUString m_xZipFileUrl;
+ OUString m_xCreateFolderUrl;
+
+ DECL_LINK(HandleDownloadRequest, weld::Button&, void);
+ DECL_LINK(HandleResultViewRequest, weld::Button&, void);
+
+public:
+ GraphicsTestsDialog(weld::Container* pParent);
+ ~GraphicsTestsDialog();
+ virtual short run() override;
+};
diff --git a/cui/source/inc/ImageViewerDialog.hxx b/cui/source/inc/ImageViewerDialog.hxx
new file mode 100644
index 000000000000..884deb18d4a7
--- /dev/null
+++ b/cui/source/inc/ImageViewerDialog.hxx
@@ -0,0 +1,20 @@
+/* -*- 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/.
+ */
+#pragma once
+
+#include <vcl/bitmapex.hxx>
+#include <vcl/weld.hxx>
+
+class ImageViewerDialog : public weld::GenericDialogController
+{
+ std::unique_ptr<weld::Image> m_xDisplayImage;
+
+public:
+ ImageViewerDialog(weld::Dialog* pParent, BitmapEx aBitmap, OUString atitle);
+};
diff --git a/cui/source/inc/QrCodeGenDialog.hxx b/cui/source/inc/QrCodeGenDialog.hxx
index 563182d7a043..02037ad4cdf6 100644
--- a/cui/source/inc/QrCodeGenDialog.hxx
+++ b/cui/source/inc/QrCodeGenDialog.hxx
@@ -6,8 +6,9 @@
* 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
+#pragma once
+
+#include <config_zxing.h>
#include <vcl/weld.hxx>
@@ -23,24 +24,28 @@ public:
bool bEditExisting);
virtual short run() override;
+ static bool runAsync(const std::shared_ptr<QrCodeGenDialog>& rController,
+ const std::function<void(sal_Int32)>& rFunc);
-protected:
- css::uno::Reference<css::frame::XModel> m_xModel;
void Apply();
+#if ENABLE_ZXING
+ weld::Widget* GetParent() { return mpParent; }
+#endif
private:
- std::unique_ptr<weld::Entry> m_xEdittext;
+ css::uno::Reference<css::frame::XModel> m_xModel;
+ std::unique_ptr<weld::TextView> m_xEdittext;
std::unique_ptr<weld::RadioButton> m_xECC[4];
std::unique_ptr<weld::SpinButton> m_xSpinBorder;
+ std::unique_ptr<weld::ComboBox> m_xComboType;
+
+#if ENABLE_ZXING
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);
+ void GetErrorCorrection(tools::Long);
};
-#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
index 6bd08ff4baef..7c894a16a0b3 100644
--- a/cui/source/inc/SignSignatureLineDialog.hxx
+++ b/cui/source/inc/SignSignatureLineDialog.hxx
@@ -6,8 +6,7 @@
* 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
+#pragma once
#include "SignatureLineDialogBase.hxx"
@@ -21,6 +20,8 @@ class SignSignatureLineDialog : public SignatureLineDialogBase
public:
SignSignatureLineDialog(weld::Widget* pParent, css::uno::Reference<css::frame::XModel> xModel);
+ void Apply();
+
private:
std::unique_ptr<weld::Entry> m_xEditName;
std::unique_ptr<weld::TextView> m_xEditComment;
@@ -43,7 +44,6 @@ private:
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);
@@ -51,6 +51,4 @@ private:
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
index fd671acd51fd..e686cb4a4123 100644
--- a/cui/source/inc/SignatureLineDialog.hxx
+++ b/cui/source/inc/SignatureLineDialog.hxx
@@ -6,8 +6,7 @@
* 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
+#pragma once
#include "SignatureLineDialogBase.hxx"
@@ -20,6 +19,8 @@ public:
SignatureLineDialog(weld::Widget* pParent, css::uno::Reference<css::frame::XModel> xModel,
bool bEditExisting);
+ void Apply();
+
private:
std::unique_ptr<weld::Entry> m_xEditName;
std::unique_ptr<weld::Entry> m_xEditTitle;
@@ -30,10 +31,6 @@ private:
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
index 3b065fe87838..4e0a3f298e5b 100644
--- a/cui/source/inc/SignatureLineDialogBase.hxx
+++ b/cui/source/inc/SignatureLineDialogBase.hxx
@@ -6,8 +6,11 @@
* 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
+#pragma once
+
+#include <sal/config.h>
+
+#include <string_view>
#include <vcl/weld.hxx>
@@ -18,16 +21,13 @@ class SignatureLineDialogBase : public weld::GenericDialogController
{
public:
SignatureLineDialogBase(weld::Widget* pParent, css::uno::Reference<css::frame::XModel> xModel,
- const OUString& rUIFile, const OString& rDialogId);
+ const OUString& rUIFile, const OUString& rDialogId);
virtual short run() override;
protected:
css::uno::Reference<css::frame::XModel> m_xModel;
- virtual void Apply() = 0;
- static OUString getCDataString(const OUString& rString);
+ static OUString getCDataString(std::u16string_view 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
index cb23f1004400..81d68e214314 100644
--- a/cui/source/inc/SpellDialog.hxx
+++ b/cui/source/inc/SpellDialog.hxx
@@ -16,8 +16,7 @@
* 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
+#pragma once
#include <sfx2/basedlgs.hxx>
#include <com/sun/star/uno/Reference.hxx>
@@ -47,6 +46,7 @@ struct SpellErrorDescription;
class SentenceEditWindow_Impl : public WeldEditView
{
private:
+ std::unique_ptr<weld::ScrolledWindow> m_xScrolledWindow;
std::set<sal_Int32> m_aIgnoreErrorsAt;
SpellDialog* m_pSpellDialog;
weld::Toolbar* m_pToolbar;
@@ -62,14 +62,21 @@ private:
bool GetErrorDescription(SpellErrorDescription& rSpellErrorDescription, sal_Int32 nPosition);
- DECL_LINK(ToolbarHdl, const OString&, void);
+ DECL_LINK(ScrollHdl, weld::ScrolledWindow&, void);
+ DECL_LINK(EditStatusHdl, EditStatus&, void);
+ DECL_LINK(ToolbarHdl, const OUString&, void);
+
+ void DoScroll();
+ void SetScrollBarRange();
protected:
virtual bool KeyInput( const KeyEvent& rKEvt ) override;
+ virtual void StyleUpdated() override;
public:
- SentenceEditWindow_Impl();
+ SentenceEditWindow_Impl(std::unique_ptr<weld::ScrolledWindow> xScrolledWindow);
virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
+ virtual void EditViewScrollStateChange() override;
void SetSpellDialog(SpellDialog* pDialog) { m_pSpellDialog = pDialog; }
virtual ~SentenceEditWindow_Impl() override;
@@ -111,9 +118,11 @@ public:
void UndoActionStart( sal_uInt16 nId );
void UndoActionEnd();
- void MoveErrorEnd(long nOffset);
+ void MoveErrorEnd(tools::Long nOffset);
void ResetIgnoreErrorsAt() { m_aIgnoreErrorsAt.clear(); }
+
+ void SetDocumentColor(weld::DrawingArea* pDrawingArea);
};
// class SvxSpellDialog ---------------------------------------------
@@ -131,7 +140,7 @@ private:
OUString m_sTitleSpellingGrammar;
Link<SpellUndoAction_Impl&,void> aDialogUndoLink;
-
+ ImplSVEvent * m_pInitHdlEvent;
bool bFocusLocked;
svx::SpellDialogChildWindow& rParent;
@@ -144,7 +153,6 @@ private:
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;
@@ -167,25 +175,26 @@ private:
std::unique_ptr<weld::Button> m_xClosePB;
std::unique_ptr<weld::Toolbar> m_xToolbar;
std::unique_ptr<weld::CustomWeld> m_xSentenceEDWeld;
+ std::shared_ptr<SfxSingleTabDialogController> m_xOptionsDlg;
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(CheckGrammarHdl, weld::Toggleable&, 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(AddToDictSelectHdl, const OUString&, 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 AddToDictionaryExecute(const OUString& rItemId);
void StartSpellOptDlg_Impl();
int InitUserDicts();
void UpdateBoxes_Impl(bool bCallFromSelectHdl = false);
@@ -226,6 +235,4 @@ public:
} //namespace svx
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/SvxConfigPageHelper.hxx b/cui/source/inc/SvxConfigPageHelper.hxx
index 8beed6069be3..025c4aad18c0 100644
--- a/cui/source/inc/SvxConfigPageHelper.hxx
+++ b/cui/source/inc/SvxConfigPageHelper.hxx
@@ -26,64 +26,51 @@
class SvxConfigPageHelper
{
public:
- static void RemoveEntry( SvxEntries* pEntries, SvxConfigEntry const * pChildEntry );
+ 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 OUString replaceSaveInName(const OUString& rMessage, std::u16string_view 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 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();
+ 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 generateCustomURL(SvxEntries* entries);
- static OUString GetModuleName( const OUString& aModuleId );
- static OUString GetUIModuleName(
- const OUString& aModuleId,
- const css::uno::Reference< css::frame::XModuleManager2 >& rModuleManager );
+ static OUString GetModuleName(std::u16string_view 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 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 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 );
+ 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
index 50124e46ab10..36fee041de76 100644
--- a/cui/source/inc/SvxMenuConfigPage.hxx
+++ b/cui/source/inc/SvxMenuConfigPage.hxx
@@ -29,44 +29,41 @@ 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(SelectMenuEntry, weld::TreeView&, void);
+ DECL_LINK(ContentContextMenuHdl, const CommandEvent&, bool);
+ DECL_LINK(FunctionContextMenuHdl, const CommandEvent&, bool);
- DECL_LINK( GearHdl, const OString&, void );
+ DECL_LINK(GearHdl, const OUString&, void);
- DECL_LINK( SelectCategory, weld::ComboBox&, void );
+ DECL_LINK(SelectCategory, weld::ComboBox&, void);
- DECL_LINK( AddCommandHdl, weld::Button&, void );
- DECL_LINK( RemoveCommandHdl, weld::Button&, 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(InsertHdl, const OUString&, void);
+ DECL_LINK(ModifyItemHdl, const OUString&, void);
+ DECL_LINK(ResetMenuHdl, weld::Button&, void);
- DECL_LINK( MenuEntriesSizeAllocHdl, const Size&, 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;
+ void Init() override;
+ void UpdateButtonStates() override;
+ short QueryReset() override;
+ void DeleteSelectedContent() override;
+ void DeleteSelectedTopLevel() override;
- virtual void SelectElement() override;
+ virtual void SelectElement() override;
public:
- SvxMenuConfigPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rItemSet, bool bIsMenuBar = true);
+ 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;
+ 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
index 7e417463ab30..672d2e8299e4 100644
--- a/cui/source/inc/SvxNotebookbarConfigPage.hxx
+++ b/cui/source/inc/SvxNotebookbarConfigPage.hxx
@@ -74,13 +74,19 @@ public:
class SvxNotebookbarEntriesListBox final : public SvxMenuEntriesListBox
{
+ typedef std::unordered_map<OUString, OUString> TooltipMap;
+ TooltipMap m_aTooltipMap;
+
void ChangedVisibility(int nRow);
DECL_LINK(CheckButtonHdl, const weld::TreeView::iter_col&, void);
DECL_LINK(KeyInputHdl, const KeyEvent&, bool);
+ DECL_LINK(QueryTooltip, const weld::TreeIter& rIter, OUString);
public:
SvxNotebookbarEntriesListBox(std::unique_ptr<weld::TreeView> xControl, SvxConfigPage* pPg);
virtual ~SvxNotebookbarEntriesListBox() override;
+
+ TooltipMap& GetTooltipMap() { return m_aTooltipMap; }
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/SvxToolbarConfigPage.hxx b/cui/source/inc/SvxToolbarConfigPage.hxx
index 00672453df1b..28fe658f2cca 100644
--- a/cui/source/inc/SvxToolbarConfigPage.hxx
+++ b/cui/source/inc/SvxToolbarConfigPage.hxx
@@ -29,48 +29,44 @@
class SvxToolbarConfigPage : public SvxConfigPage
{
private:
+ DECL_LINK(SelectToolbarEntry, weld::TreeView&, void);
+ DECL_LINK(MoveHdl, weld::Button&, void);
- DECL_LINK( SelectToolbarEntry, weld::TreeView&, void );
- DECL_LINK( MoveHdl, weld::Button&, void );
+ DECL_LINK(GearHdl, const OUString&, void);
- DECL_LINK( GearHdl, const OString&, void );
+ DECL_LINK(SelectCategory, weld::ComboBox&, void);
- DECL_LINK( SelectCategory, weld::ComboBox&, void );
+ DECL_LINK(ContentContextMenuHdl, const CommandEvent&, bool);
+ DECL_LINK(FunctionContextMenuHdl, const CommandEvent&, bool);
- 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( 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 );
+ DECL_LINK(InsertHdl, const OUString&, void);
+ DECL_LINK(ModifyItemHdl, const OUString&, 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;
+ 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);
+ SvxToolbarConfigPage(weld::Container* pPage, weld::DialogController* pController,
+ const SfxItemSet& rItemSet);
virtual ~SvxToolbarConfigPage() override;
- void AddFunction(int nTarget = -1);
+ void AddFunction(int nTarget = -1);
- void MoveEntry( bool bMoveUp ) override;
+ 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;
+ 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
@@ -81,7 +77,6 @@ class SvxToolbarEntriesListBox final : public SvxMenuEntriesListBox
DECL_LINK(KeyInputHdl, const KeyEvent&, bool);
public:
-
SvxToolbarEntriesListBox(std::unique_ptr<weld::TreeView> xControl, SvxToolbarConfigPage* pPg);
virtual ~SvxToolbarEntriesListBox() override;
};
diff --git a/cui/source/inc/TextColumnsPage.hxx b/cui/source/inc/TextColumnsPage.hxx
new file mode 100644
index 000000000000..af45c23c93ca
--- /dev/null
+++ b/cui/source/inc/TextColumnsPage.hxx
@@ -0,0 +1,40 @@
+/* -*- 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/.
+ */
+
+#pragma once
+
+#include <sal/config.h>
+
+#include <sfx2/tabdlg.hxx>
+
+#include <memory>
+
+/// Tab page for EditEngine columns properties
+class SvxTextColumnsPage : public SfxTabPage
+{
+private:
+ static const WhichRangesContainer pRanges;
+
+ std::unique_ptr<weld::SpinButton> m_xColumnsNumber;
+ std::unique_ptr<weld::MetricSpinButton> m_xColumnsSpacing;
+
+public:
+ SvxTextColumnsPage(weld::Container* pPage, weld::DialogController* pController,
+ const SfxItemSet& rInAttrs);
+ virtual ~SvxTextColumnsPage() override;
+
+ static std::unique_ptr<SfxTabPage>
+ Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet*);
+ static WhichRangesContainer GetRanges() { return pRanges; }
+
+ virtual bool FillItemSet(SfxItemSet*) override;
+ virtual void Reset(const SfxItemSet*) override;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/cui/source/inc/about.hxx b/cui/source/inc/about.hxx
index 37d1710a7f93..42eae5467eab 100644
--- a/cui/source/inc/about.hxx
+++ b/cui/source/inc/about.hxx
@@ -16,10 +16,8 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CUI_SOURCE_INC_ABOUT_HXX
-#define INCLUDED_CUI_SOURCE_INC_ABOUT_HXX
+#pragma once
-#include <vcl/bitmapex.hxx>
#include <vcl/weld.hxx>
class AboutDialog : public weld::GenericDialogController
@@ -40,16 +38,15 @@ private:
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_pAboutLabel;
std::unique_ptr<weld::Label> m_pCopyrightLabel;
static OUString GetVersionString();
static OUString GetBuildString();
- static OUString GetLocaleString();
+ static OUString GetLocaleString(bool bLocalized = true);
static OUString GetMiscString();
static OUString GetCopyrightString();
- static bool IsStringValidGitHash(const OUString& hash);
+ static bool IsStringValidGitHash(std::u16string_view hash);
DECL_LINK(HandleClick, weld::Button&, void);
@@ -58,6 +55,4 @@ public:
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
index aecc923adec2..e9207d5a1add 100644
--- a/cui/source/inc/acccfg.hxx
+++ b/cui/source/inc/acccfg.hxx
@@ -28,9 +28,12 @@
#include <vcl/idle.hxx>
#include <vcl/keycod.hxx>
#include <i18nutil/searchopt.hxx>
+#include <config_features.h>
#include "cfgutil.hxx"
+#if HAVE_FEATURE_SCRIPTING
class SfxMacroInfoItem;
+#endif
class CuiConfigFunctionListBox;
class SfxAcceleratorConfigPage;
class SfxStringItem;
@@ -76,7 +79,9 @@ enum class StartFileDialogType
class SfxAcceleratorConfigPage : public SfxTabPage
{
private:
+#if HAVE_FEATURE_SCRIPTING
const SfxMacroInfoItem* m_pMacroInfoItem;
+#endif
std::unique_ptr<sfx2::FileDialogHelper> m_pFileDlg;
OUString aLoadAccelConfigStr;
@@ -122,7 +127,7 @@ private:
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(RadioHdl, weld::Toggleable&, void);
DECL_LINK(ImplUpdateDataHdl, Timer*, void);
DECL_LINK(FocusOut_Impl, weld::Widget&, void);
DECL_LINK(TimeOut_Impl, Timer*, void);
diff --git a/cui/source/inc/align.hxx b/cui/source/inc/align.hxx
index 43c2fe0ee9eb..caea33e42150 100644
--- a/cui/source/inc/align.hxx
+++ b/cui/source/inc/align.hxx
@@ -16,8 +16,7 @@
* 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
+#pragma once
// list box indexes
#define ALIGNDLG_HORALIGN_STD 0
@@ -41,19 +40,21 @@
#include <svx/frmdirlbox.hxx>
#include <vcl/weld.hxx>
+class SfxEnumItemInterface;
+
namespace svx {
class AlignmentTabPage : public SfxTabPage
{
- static const sal_uInt16 s_pRanges[];
+ static const WhichRangesContainer 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; }
+ static WhichRangesContainer GetRanges() { return s_pRanges; }
virtual bool FillItemSet( SfxItemSet* rSet ) override;
virtual void Reset( const SfxItemSet* rSet ) override;
@@ -63,14 +64,14 @@ private:
void InitVsRefEgde();
void UpdateEnableControls();
- bool HasAlignmentChanged( const SfxItemSet& rNew, sal_uInt16 nWhich ) const;
+ bool HasAlignmentChanged( const SfxItemSet& rNew, TypedWhichId<SfxEnumItemInterface> 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);
+ DECL_LINK(StackedClickHdl, weld::Toggleable&, void);
+ DECL_LINK(AsianModeClickHdl, weld::Toggleable&, void);
+ DECL_LINK(WrapClickHdl, weld::Toggleable&, void);
+ DECL_LINK(HyphenClickHdl, weld::Toggleable&, void);
+ DECL_LINK(ShrinkClickHdl, weld::Toggleable&, void);
private:
weld::TriStateEnabled m_aStackedState;
@@ -93,7 +94,6 @@ private:
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;
@@ -117,6 +117,4 @@ private:
}
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/autocdlg.hxx b/cui/source/inc/autocdlg.hxx
index e0c780fe831e..2677b8535ebe 100644
--- a/cui/source/inc/autocdlg.hxx
+++ b/cui/source/inc/autocdlg.hxx
@@ -16,18 +16,17 @@
* 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
+#pragma once
#include <sfx2/tabdlg.hxx>
#include <svx/langbox.hxx>
-#include <vcl/metric.hxx>
+#include <unotools/collatorwrapper.hxx>
#include <map>
#include <set>
+#include <utility>
class CharClass;
-class CollatorWrapper;
class SmartTagMgr;
namespace editeng { class SortedAutoCompleteStrings; }
@@ -58,6 +57,7 @@ private:
OUString m_sStartCap;
OUString m_sBoldUnderline;
OUString m_sURL;
+ OUString m_sDOI;
OUString m_sNoDblSpaces;
OUString m_sDash;
OUString m_sAccidentalCaps;
@@ -93,9 +93,11 @@ class OfaSwAutoFmtOptionsPage : public SfxTabPage
OUString sNoDblSpaces;
OUString sCorrectCapsLock;
OUString sDetectURL;
+ OUString sDetectDOI;
OUString sDash;
OUString sRightMargin;
OUString sNum;
+ OUString sBulletsAfterSpace;
OUString sBorder;
OUString sTable;
OUString sReplaceTemplates;
@@ -137,6 +139,12 @@ struct DoubleString
OUString sShort;
OUString sLong;
void* pUserData; ///< CheckBox -> form. Text Bool -> selection text
+ DoubleString(OUString aShort, OUString aLong)
+ : sShort(std::move(aShort))
+ , sLong(std::move(aLong))
+ , pUserData(nullptr)
+ {
+ }
};
typedef std::vector<DoubleString> DoubleStringArray;
@@ -161,7 +169,7 @@ private:
std::set<OUString> aFormatText;
std::map<LanguageType, DoubleStringArray>
aDoubleStringTable;
- std::unique_ptr<CollatorWrapper> pCompareClass;
+ CollatorWrapper maCompareClass;
std::unique_ptr<CharClass> pCharClass;
LanguageType eLang;
@@ -222,7 +230,7 @@ class OfaAutocorrExceptPage : public SfxTabPage
{
private:
StringsTable aStringsTable;
- std::unique_ptr<CollatorWrapper> pCompareClass;
+ CollatorWrapper maCompareClass;
LanguageType eLang;
std::unique_ptr<weld::Entry> m_xAbbrevED;
@@ -241,7 +249,7 @@ private:
DECL_LINK(NewDelActionHdl, weld::Entry&, bool);
DECL_LINK(SelectHdl, weld::TreeView&, void);
DECL_LINK(ModifyHdl, weld::Entry&, void);
- void NewDelHdl(const weld::Widget*);
+ bool NewDelHdl(const weld::Widget*);
/// Box filled with new language
void RefillReplaceBoxes(bool bFromReset,
LanguageType eOldLanguage,
@@ -336,7 +344,7 @@ private:
std::unique_ptr<weld::TreeView> m_xLBEntries;
std::unique_ptr<weld::Button> m_xPBEntries;
- DECL_LINK(CheckHdl, weld::ToggleButton&, void);
+ DECL_LINK(CheckHdl, weld::Toggleable&, void);
DECL_LINK(KeyReleaseHdl, const KeyEvent&, bool);
public:
@@ -384,7 +392,7 @@ private:
Enables/disables all controls in the tab page (except from the
check box.
*/
- DECL_LINK(CheckHdl, weld::ToggleButton&, void);
+ DECL_LINK(CheckHdl, weld::Toggleable&, void);
/** Handler for the push button
@@ -412,6 +420,4 @@ public:
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
index 14d30703e745..3d50d69e95f4 100644
--- a/cui/source/inc/backgrnd.hxx
+++ b/cui/source/inc/backgrnd.hxx
@@ -16,8 +16,7 @@
* 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
+#pragma once
#include <memory>
@@ -38,23 +37,28 @@ class SvxBrushItem;
class SvxBkgTabPage : public SvxAreaTabPage
{
- static const sal_uInt16 pPageRanges[];
+ static const WhichRangesContainer pBkgRanges;
std::unique_ptr<weld::ComboBox> m_xTblLBox;
- bool bHighlighting : 1;
- bool bCharBackColor : 1;
- SfxItemSet maSet;
- std::unique_ptr<SfxItemSet> m_pResetSet;
+ bool m_bHighlighting = false;
+ bool m_bCharBackColor = false;
+
+ // m_aAttrSet is used to convert between SvxBrushItem and XFILL item attributes and also to
+ // allow for cell, row, and table backgrounds to be set in one Table dialog opening.
+ SfxItemSet m_aAttrSet;
sal_Int32 m_nActPos = -1;
DECL_LINK(TblDestinationHdl_Impl, weld::ComboBox&, void);
+
+ void SetActiveTableDestinationBrushItem();
+
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 WhichRangesContainer GetRanges() { return pBkgRanges; }
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
virtual bool FillItemSet( SfxItemSet* ) override;
@@ -64,7 +68,5 @@ public:
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
index b25b7cc098da..c18b5b3da4e6 100644
--- a/cui/source/inc/bbdlg.hxx
+++ b/cui/source/inc/bbdlg.hxx
@@ -16,8 +16,7 @@
* 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
+#pragma once
#include <sfx2/tabdlg.hxx>
@@ -33,12 +32,10 @@ public:
bool bEnableSelector,
bool bEnableDrawingLayerFillStyles);
protected:
- virtual void PageCreated(const OString& rPageId, SfxTabPage& rTabPage) override;
+ virtual void PageCreated(const OUString& 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
index 7af464924259..accb555930dc 100644
--- a/cui/source/inc/border.hxx
+++ b/cui/source/inc/border.hxx
@@ -16,8 +16,7 @@
* 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
+#pragma once
#include <editeng/shaditem.hxx>
#include <svtools/ctrlbox.hxx>
@@ -28,6 +27,7 @@
#include <svx/colorbox.hxx>
#include <svx/frmsel.hxx>
#include <svx/flagsdef.hxx>
+#include <unotools/resmgr.hxx>
#include <set>
@@ -76,14 +76,14 @@ private:
class SvxBorderTabPage : public SfxTabPage
{
- static const sal_uInt16 pRanges[];
+ static const WhichRangesContainer 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; }
+ static WhichRangesContainer GetRanges() { return pRanges; }
virtual bool FillItemSet( SfxItemSet* rCoreAttrs ) override;
virtual void Reset( const SfxItemSet* ) override;
@@ -99,7 +99,7 @@ private:
std::vector<Image> m_aShadowImgVec;
std::vector<Image> m_aBorderImgVec;
- long nMinValue; ///< minimum distance
+ tools::Long nMinValue; ///< minimum distance
SwBorderModes nSWMode; ///< table, textframe, paragraph
sal_uInt16 mnBoxSlot;
sal_uInt16 mnShadowSlot;
@@ -128,6 +128,7 @@ private:
std::unique_ptr<SvtLineListBox> m_xLbLineStyle;
std::unique_ptr<ColorListBox> m_xLbLineColor;
+ std::unique_ptr<weld::ComboBox> m_xLineWidthLB;
std::unique_ptr<weld::MetricSpinButton> m_xLineWidthMF;
std::unique_ptr<weld::Container> m_xSpacingFrame;
@@ -153,8 +154,8 @@ private:
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<weld::CheckButton> m_xRemoveAdjacentCellBordersCB;
+ std::unique_ptr<weld::Label> m_xRemoveAdjacentCellBordersFT;
std::unique_ptr<ShadowControlsWrapper> m_xShadowControls;
std::unique_ptr<MarginControlsWrapper> m_xMarginControls;
@@ -165,16 +166,18 @@ private:
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);
+ DECL_LINK(ModifyWidthLBHdl_Impl, weld::ComboBox&, void);
+ DECL_LINK(ModifyWidthMFHdl_Impl, weld::MetricSpinButton&, void);
+ DECL_LINK(SyncHdl_Impl, weld::Toggleable&, void);
+ DECL_LINK(RemoveAdjacentCellBorderHdl_Impl, weld::Toggleable&, void);
sal_uInt16 GetPresetImageId(sal_uInt16 nValueSetIdx) const;
- const char* GetPresetStringId(sal_uInt16 nValueSetIdx) const;
+ TranslateId GetPresetStringId(sal_uInt16 nValueSetIdx) const;
void FillPresetVS();
void FillShadowVS();
void FillValueSets();
+ void SetLineWidth(sal_Int64 nWidth, sal_Int32 nRemovedType = 0);
// Filler
void FillLineListBox_Impl();
@@ -189,6 +192,4 @@ private:
};
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx
index 699434ac04fa..1ae5b23a2999 100644
--- a/cui/source/inc/cfg.hxx
+++ b/cui/source/inc/cfg.hxx
@@ -19,9 +19,9 @@
#pragma once
-#include <vcl/transfer.hxx>
#include <vcl/timer.hxx>
#include <vcl/weld.hxx>
+#include <vcl/weldutils.hxx>
#include <svtools/valueset.hxx>
#include <com/sun/star/container/XIndexContainer.hpp>
@@ -34,28 +34,30 @@
#include <sfx2/tabdlg.hxx>
#include <memory>
+#include <string_view>
#include <vector>
#include "cfgutil.hxx"
#include "CommandCategoryListBox.hxx"
-#define notebookbarTabScope "notebookbarTabScope"
+inline constexpr OUString notebookbarTabScope = u"notebookbarTabScope"_ustr;
-const char ITEM_DESCRIPTOR_COMMANDURL[] = "CommandURL";
-const char ITEM_DESCRIPTOR_CONTAINER[] = "ItemDescriptorContainer";
-const char ITEM_DESCRIPTOR_LABEL[] = "Label";
-const char ITEM_DESCRIPTOR_TYPE[] = "Type";
-const char ITEM_DESCRIPTOR_STYLE[] = "Style";
-const char ITEM_DESCRIPTOR_ISVISIBLE[] = "IsVisible";
-const char ITEM_DESCRIPTOR_RESOURCEURL[] = "ResourceURL";
-const char ITEM_DESCRIPTOR_UINAME[] = "UIName";
+inline constexpr OUString ITEM_DESCRIPTOR_COMMANDURL = u"CommandURL"_ustr;
+inline constexpr OUString ITEM_DESCRIPTOR_CONTAINER = u"ItemDescriptorContainer"_ustr;
+inline constexpr OUString ITEM_DESCRIPTOR_LABEL = u"Label"_ustr;
+inline constexpr OUString ITEM_DESCRIPTOR_TYPE = u"Type"_ustr;
+inline constexpr OUString ITEM_DESCRIPTOR_STYLE = u"Style"_ustr;
+inline constexpr OUString ITEM_DESCRIPTOR_ISVISIBLE = u"IsVisible"_ustr;
+inline constexpr OUString ITEM_DESCRIPTOR_RESOURCEURL = u"ResourceURL"_ustr;
+inline constexpr OUString ITEM_DESCRIPTOR_UINAME = u"UIName"_ustr;
-const char ITEM_MENUBAR_URL[] = "private:resource/menubar/menubar";
-const char ITEM_TOOLBAR_URL[] = "private:resource/toolbar/";
+inline constexpr OUString ITEM_MENUBAR_URL = u"private:resource/menubar/menubar"_ustr;
+inline constexpr OUString ITEM_TOOLBAR_URL = u"private:resource/toolbar/"_ustr;
+inline constexpr OUString ITEM_EVENT_URL = u"private:resource/event/"_ustr;
-const char CUSTOM_TOOLBAR_STR[] = "custom_toolbar_";
+inline constexpr OUString CUSTOM_TOOLBAR_STR = u"custom_toolbar_"_ustr;
-const char aMenuSeparatorStr[] = " | ";
+inline constexpr OUString aMenuSeparatorStr = u" | "_ustr;
class SvxConfigEntry;
class SvxConfigPage;
@@ -67,10 +69,12 @@ class SvxConfigDialog : public SfxTabDialogController
private:
css::uno::Reference< css::frame::XFrame > m_xFrame;
+ virtual void ActivatePage(const OUString& rPage) override;
+
public:
SvxConfigDialog(weld::Window*, const SfxItemSet*);
- virtual void PageCreated(const OString& rId, SfxTabPage &rPage) override;
+ virtual void PageCreated(const OUString& rId, SfxTabPage &rPage) override;
void SetFrame(const css::uno::Reference< css::frame::XFrame >& xFrame);
};
@@ -112,8 +116,8 @@ protected:
public:
SaveInData(
- const css::uno::Reference < css::ui::XUIConfigurationManager >& xCfgMgr,
- const css::uno::Reference < css::ui::XUIConfigurationManager >& xParentCfgMgr,
+ css::uno::Reference < css::ui::XUIConfigurationManager > xCfgMgr,
+ css::uno::Reference < css::ui::XUIConfigurationManager > xParentCfgMgr,
const OUString& aModuleId,
bool docConfig );
@@ -252,8 +256,8 @@ private:
public:
- SvxConfigEntry( const OUString& rDisplayName,
- const OUString& rCommandURL,
+ SvxConfigEntry( OUString aDisplayName,
+ OUString aCommandURL,
bool bPopup,
bool bParentData );
@@ -333,10 +337,6 @@ public:
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) { m_xControl->set_toggle(row, eState); }
void scroll_to_row(int pos) { m_xControl->scroll_to_row(pos); }
@@ -351,17 +351,16 @@ public:
}
DECL_LINK(KeyInputHdl, const KeyEvent&, bool);
+ DECL_LINK(QueryTooltip, const weld::TreeIter& rIter, OUString);
void CreateDropDown();
};
-class SvxConfigPageFunctionDropTarget : public DropTargetHelper
+class SvxConfigPageFunctionDropTarget : public weld::ReorderingDropTarget
{
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:
@@ -413,12 +412,14 @@ protected:
std::unique_ptr<weld::ComboBox> m_xSaveInListBox;
+ std::unique_ptr<weld::Widget> m_xCustomizeBox;
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::Widget> m_xCommandButtons;
std::unique_ptr<weld::Button> m_xAddCommandButton;
std::unique_ptr<weld::Button> m_xRemoveCommandButton;
@@ -450,7 +451,7 @@ protected:
int AppendEntry(SvxConfigEntry* pNewEntryData,
int nTarget);
- void AddSubMenusToUI( const OUString& rBaseTitle,
+ void AddSubMenusToUI( std::u16string_view rBaseTitle,
SvxConfigEntry const * pParentData );
void InsertEntryIntoUI(SvxConfigEntry* pNewEntryData,
@@ -460,20 +461,25 @@ protected:
weld::TreeView& rTreeView, weld::TreeIter& rIter,
bool bMenu = false);
- void InsertEntryIntoNotebookbarTabUI(const OUString& sClassId, const OUString& sUIItemId,
+ void InsertEntryIntoNotebookbarTabUI(std::u16string_view sClassId, const OUString& sUIItemId,
const OUString& sUIItemCommand,
- weld::TreeView& rTreeView, weld::TreeIter& rIter);
+ weld::TreeView& rTreeView, const weld::TreeIter& rIter);
SvxEntries* FindParentForChild( SvxEntries* pParentEntries,
SvxConfigEntry* pChildData );
void ReloadTopLevelListBox( SvxConfigEntry const * pSelection = nullptr );
+ static bool IsCommandInMenuList(const SvxConfigEntry *pEntryData,
+ const SvxEntries *pEntries);
+
+ SvxConfigEntry *CreateCommandFromSelection(const OUString &aURL);
+
public:
virtual ~SvxConfigPage() override;
- static bool CanConfig( const OUString& rModuleId );
+ static bool CanConfig( std::u16string_view rModuleId );
SaveInData* GetSaveInData() { return pCurrentSaveInData; }
const OUString& GetAppName() const { return m_sAppName; }
@@ -496,7 +502,7 @@ public:
SvxConfigEntry* GetTopLevelSelection()
{
- return reinterpret_cast<SvxConfigEntry*>(m_xTopLevelListBox->get_active_id().toInt64());
+ return weld::fromId<SvxConfigEntry*>(m_xTopLevelListBox->get_active_id());
}
/** identifies the module in the given frame. If the frame is <NULL/>, a default
@@ -599,7 +605,6 @@ 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;
@@ -647,8 +652,8 @@ public:
SvxIconSelectorDialog(
weld::Window *pWindow,
- const css::uno::Reference< css::ui::XImageManager >& rXImageManager,
- const css::uno::Reference< css::ui::XImageManager >& rXParentImageManager);
+ css::uno::Reference< css::ui::XImageManager > xImageManager,
+ css::uno::Reference< css::ui::XImageManager > xParentImageManager);
virtual ~SvxIconSelectorDialog() override;
diff --git a/cui/source/inc/cfgutil.hxx b/cui/source/inc/cfgutil.hxx
index b3b7d091b61a..b1f22e4065b9 100644
--- a/cui/source/inc/cfgutil.hxx
+++ b/cui/source/inc/cfgutil.hxx
@@ -16,11 +16,12 @@
* 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
+#pragma once
#include <vector>
#include <memory>
+#include <string_view>
+
#include <rtl/ustring.hxx>
#include <com/sun/star/frame/DispatchInformation.hpp>
@@ -30,10 +31,13 @@
#include <com/sun/star/script/browse/XBrowseNode.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <vcl/weld.hxx>
+#include <config_features.h>
class Button;
class SaveInData;
+#if HAVE_FEATURE_SCRIPTING
class SfxMacroInfoItem;
+#endif
struct SfxStyleInfo_Impl
{
@@ -71,7 +75,7 @@ public:
std::vector< SfxStyleInfo_Impl > getStyleFamilies() const;
std::vector< SfxStyleInfo_Impl > getStyles(const OUString& sFamily);
- static OUString generateCommand(const OUString& sFamily, const OUString& sStyle);
+ static OUString generateCommand(std::u16string_view sFamily, std::u16string_view sStyle);
};
enum class SfxCfgKind
@@ -81,7 +85,8 @@ enum class SfxCfgKind
GROUP_SCRIPTCONTAINER = 3,
FUNCTION_SCRIPT = 4,
GROUP_STYLES = 5,
- GROUP_ALLFUNCTIONS = 6
+ GROUP_ALLFUNCTIONS = 6,
+ GROUP_SIDEBARDECKS = 7
};
struct SfxGroupInfo_Impl
@@ -112,6 +117,7 @@ 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_popup_menu(const Link<const CommandEvent&, bool>& rLink) { m_xTreeView->connect_popup_menu(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(); }
@@ -141,15 +147,9 @@ public:
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
{
@@ -163,8 +163,6 @@ public:
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(); }
@@ -204,11 +202,11 @@ class CuiConfigGroupListBox
static css::uno::Reference< css::uno::XInterface > getDocumentModel(
css::uno::Reference< css::uno::XComponentContext > const & xCtx,
- OUString const & docName);
+ std::u16string_view docName);
- void InitModule();
+ sal_Int32 InitModule();
void FillScriptList(const css::uno::Reference< css::script::browse::XBrowseNode >& xRootNode,
- const weld::TreeIter* pParentEntry, bool bCheapChildrenOnDemand);
+ const weld::TreeIter* pParentEntry);
void FillFunctionsList(const css::uno::Sequence< css::frame::DispatchInformation >& xCommands);
OUString MapCommand2UIName(const OUString& sCommand);
@@ -230,8 +228,9 @@ public:
void SetFunctionListBox( CuiConfigFunctionListBox *pBox )
{ m_pFunctionListBox = pBox; }
void GroupSelected();
+#if HAVE_FEATURE_SCRIPTING
void SelectMacro(const SfxMacroInfoItem*);
- void SelectMacro(const OUString&, const OUString&);
+#endif
void SetStylesInfo(SfxStylesInfo_Impl* pStyles);
};
@@ -244,16 +243,16 @@ class SvxScriptSelectorDialog : public weld::GenericDialogController
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;
+ std::unique_ptr<weld::Frame> m_xDescriptionFrame;
DECL_LINK(ClickHdl, weld::Button&, void);
DECL_LINK(SelectHdl, weld::TreeView&, void);
DECL_LINK(FunctionDoubleClickHdl, weld::TreeView&, bool);
+ DECL_LINK(ContextMenuHdl, const CommandEvent&, bool);
void UpdateUI();
@@ -264,8 +263,8 @@ public:
OUString GetScriptURL() const;
void SetRunLabel();
+ void SaveLastUsedMacro();
+ void LoadLastUsedMacro();
};
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/chardlg.hxx b/cui/source/inc/chardlg.hxx
index e84ea0f162fa..b484c7419b83 100644
--- a/cui/source/inc/chardlg.hxx
+++ b/cui/source/inc/chardlg.hxx
@@ -16,8 +16,7 @@
* 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
+#pragma once
#include <svtools/ctrlbox.hxx>
#include <sfx2/tabdlg.hxx>
@@ -40,7 +39,7 @@ protected:
bool m_bPreviewBackgroundToCharacter;
- SvxCharBasePage(weld::Container* pPage, weld::DialogController* pController, const OUString& rUIXMLDescription, const OString& rID, const SfxItemSet& rAttrSet);
+ SvxCharBasePage(weld::Container* pPage, weld::DialogController* pController, const OUString& rUIXMLDescription, const OUString& rID, const SfxItemSet& rAttrSet);
void SetPrevFontWidthScale( const SfxItemSet& rSet );
void SetPrevFontEscapement( sal_uInt8 nProp, sal_uInt8 nEscProp, short nEsc );
@@ -62,11 +61,11 @@ struct SvxCharNamePage_Impl;
class SvxCharNamePage : public SvxCharBasePage
{
private:
- static const sal_uInt16 pNameRanges[];
+ static const WhichRangesContainer pNameRanges;
std::unique_ptr<SvxCharNamePage_Impl> m_pImpl;
- std::unique_ptr<weld::Widget> m_xWestFrame;
+ std::unique_ptr<weld::Notebook> m_xWestern;
std::unique_ptr<weld::Label> m_xWestFontNameFT;
std::unique_ptr<weld::ComboBox> m_xWestFontNameLB;
std::unique_ptr<weld::Label> m_xWestFontStyleFT;
@@ -75,10 +74,10 @@ private:
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::Label> m_xWestFontTypeFT;
- std::unique_ptr<weld::Widget> m_xEastFrame;
+ std::unique_ptr<weld::Notebook> m_xCJK_CTL;
std::unique_ptr<weld::Label> m_xEastFontNameFT;
std::unique_ptr<weld::ComboBox> m_xEastFontNameLB;
std::unique_ptr<weld::Label> m_xEastFontStyleFT;
@@ -87,10 +86,9 @@ private:
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::Label> m_xEastFontTypeFT;
- 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;
@@ -99,14 +97,18 @@ private:
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;
+ std::unique_ptr<weld::Label> m_xCTLFontTypeFT;
+
+ //for getting FontFeatures
+ ScopedVclPtrInstance<VirtualDevice> m_xVDev;
void Initialize();
const FontList* GetFontList() const;
void UpdatePreview_Impl();
void FillStyleBox_Impl(const weld::Widget& rBox);
void FillSizeBox_Impl(const weld::Widget& rBox);
+ void EnableFeatureButton(const weld::Widget& rNameBox);
enum LanguageGroup
{
@@ -141,7 +143,7 @@ public:
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; }
+ static WhichRangesContainer GetRanges() { return pNameRanges; }
virtual void Reset( const SfxItemSet* rSet ) override;
virtual bool FillItemSet( SfxItemSet* rSet ) override;
@@ -160,12 +162,16 @@ public:
class SvxCharEffectsPage : public SvxCharBasePage
{
private:
- static const sal_uInt16 pEffectsRanges[];
+ static const WhichRangesContainer pEffectsRanges;
bool m_bOrigFontColor;
bool m_bNewFontColor;
bool m_bEnableNoneFontColor;
Color m_aOrigFontColor;
- sal_uInt16 m_nHtmlMode;
+
+ 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;
@@ -197,13 +203,14 @@ private:
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(CbClickHdl_Impl, weld::ToggleButton&, void);
- DECL_LINK(TristClickHdl_Impl, weld::ToggleButton&, void);
+ DECL_LINK(OutlineBtnClickHdl, weld::Toggleable&, void);
+ DECL_LINK(ShadowBtnClickHdl, weld::Toggleable&, void);
+ DECL_LINK(HiddenBtnClickHdl, weld::Toggleable&, void);
+ DECL_LINK(CbClickHdl_Impl, weld::Toggleable&, void);
DECL_LINK(ColorBoxSelectHdl_Impl, ColorListBox&, void);
DECL_LINK(ModifyFontTransparencyHdl_Impl, weld::MetricSpinButton&, void);
@@ -215,7 +222,7 @@ public:
virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
public:
- static const sal_uInt16* GetRanges() { return pEffectsRanges; }
+ static WhichRangesContainer GetRanges() { return pEffectsRanges; }
virtual void Reset( const SfxItemSet* rSet ) override;
virtual bool FillItemSet( SfxItemSet* rSet ) override;
@@ -228,7 +235,7 @@ public:
// class SvxCharPositionPage ---------------------------------------------
class SvxCharPositionPage : public SvxCharBasePage
{
- static const sal_uInt16 pPositionRanges[];
+ static const WhichRangesContainer pPositionRanges;
private:
short m_nSuperEsc;
@@ -262,15 +269,16 @@ private:
std::unique_ptr<weld::MetricSpinButton> m_xKerningMF;
std::unique_ptr<weld::CheckButton> m_xPairKerningBtn;
+ std::unique_ptr<weld::CheckButton> m_xNoHyphenationBtn;
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(PositionHdl_Impl, weld::Toggleable&, void);
+ DECL_LINK(RotationHdl_Impl, weld::Toggleable&, void);
+ DECL_LINK(AutoPositionHdl_Impl, weld::Toggleable&, void);
+ DECL_LINK(FitToLineHdl_Impl, weld::Toggleable&, void);
DECL_LINK(KerningModifyHdl_Impl, weld::MetricSpinButton&, void);
DECL_LINK(ValueChangedHdl_Impl, weld::MetricSpinButton&, void);
DECL_LINK(ScaleWidthModifyHdl_Impl, weld::MetricSpinButton&, void);
@@ -284,7 +292,7 @@ public:
virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
public:
- static const sal_uInt16* GetRanges() { return pPositionRanges; }
+ static WhichRangesContainer GetRanges() { return pPositionRanges; }
virtual void Reset( const SfxItemSet* rSet ) override;
virtual bool FillItemSet( SfxItemSet* rSet ) override;
@@ -298,7 +306,7 @@ public:
class SvxCharTwoLinesPage : public SvxCharBasePage
{
private:
- static const sal_uInt16 pTwoLinesRanges[];
+ static const WhichRangesContainer pTwoLinesRanges;
sal_uInt16 m_nStartBracketPosition;
sal_uInt16 m_nEndBracketPosition;
@@ -312,7 +320,7 @@ private:
void SelectCharacter(weld::TreeView* pBox);
void SetBracket(sal_Unicode cBracket, bool bStart);
- DECL_LINK(TwoLinesHdl_Impl, weld::ToggleButton&, void);
+ DECL_LINK(TwoLinesHdl_Impl, weld::Toggleable&, void);
DECL_LINK(CharacterMapHdl_Impl, weld::TreeView&, void);
public:
@@ -323,13 +331,11 @@ public:
virtual void ActivatePage( const SfxItemSet& rSet ) override;
virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
- static const sal_uInt16* GetRanges() { return pTwoLinesRanges; }
+ static WhichRangesContainer 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/connect.hxx b/cui/source/inc/connect.hxx
index 1b41851476a1..73891d0ff8e6 100644
--- a/cui/source/inc/connect.hxx
+++ b/cui/source/inc/connect.hxx
@@ -16,8 +16,7 @@
* 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
+#pragma once
#include <svx/connctrl.hxx>
#include <sfx2/tabdlg.hxx>
@@ -31,7 +30,7 @@ class SdrView;
class SvxConnectionPage : public SfxTabPage
{
private:
- static const sal_uInt16 pRanges[];
+ static const WhichRangesContainer pRanges;
const SfxItemSet& rOutAttrs;
SfxItemSet aAttrSet;
const SdrView* pView;
@@ -56,13 +55,15 @@ private:
DECL_LINK(ChangeAttrEditHdl_Impl, weld::MetricSpinButton&, void);
DECL_LINK(ChangeAttrListBoxHdl_Impl, weld::ComboBox&, void);
+ template<class T>
+ void SetMetricValueAndSave(const SfxItemSet *rAttrs, weld::MetricSpinButton &rField, TypedWhichId<T> nWhich);
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; }
+ static WhichRangesContainer GetRanges() { return pRanges; }
virtual bool FillItemSet( SfxItemSet* ) override;
virtual void Reset( const SfxItemSet * ) override;
@@ -81,6 +82,4 @@ public:
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
index 42183e6278b4..29484ef8f69c 100644
--- a/cui/source/inc/cuifmsearch.hxx
+++ b/cui/source/inc/cuifmsearch.hxx
@@ -17,8 +17,7 @@
* 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
+#pragma once
#include <com/sun/star/sdbc/XResultSet.hpp>
@@ -27,8 +26,9 @@
#include <tools/link.hxx>
#include <rtl/ustring.hxx>
-namespace svxform {
- class FmSearchConfigItem;
+namespace svxform
+{
+class FmSearchConfigItem;
}
struct FmSearchProgress;
@@ -40,13 +40,14 @@ class FmSearchDialog final : public weld::GenericDialogController
{
friend class FmSearchEngine;
- OUString m_sSearch;
- OUString m_sCancel;
+ 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<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
+ Link<FmSearchContext&, sal_uInt32> m_lnkContextSupplier; ///< for search in contexts
/// memorize the currently selected field for every context
std::vector<OUString> m_arrContextFields;
@@ -54,7 +55,7 @@ class FmSearchDialog final : public weld::GenericDialogController
std::unique_ptr<FmSearchEngine> m_pSearchEngine;
// see EnableSearchUI
- std::unique_ptr<::svxform::FmSearchConfigItem> m_pConfig;
+ std::unique_ptr<::svxform::FmSearchConfigItem> m_pConfig;
// my all Controls
std::unique_ptr<weld::RadioButton> m_prbSearchForText;
@@ -99,8 +100,9 @@ public:
(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);
+ 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;
@@ -112,7 +114,10 @@ public:
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; }
+ 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
@@ -120,12 +125,15 @@ public:
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; }
+ 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);
+ void Init(std::u16string_view strVisibleFields, const OUString& strInitialText);
// only to be used out of the constructors
void OnFound(const css::uno::Any& aCursorPos, sal_Int16 nFieldPos);
@@ -140,23 +148,24 @@ private:
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(OnToggledSearchRadio, weld::Toggleable&, void);
+ DECL_LINK(OnToggledFieldRadios, weld::Toggleable&, void);
+ DECL_LINK(OnClickedSearchAgain, weld::Button&, void);
+ DECL_LINK(OnClickedSpecialSettings, weld::Button&, void);
- DECL_LINK( OnSearchTextModified, weld::ComboBox&, void );
+ DECL_LINK(OnSearchTextModified, weld::ComboBox&, void);
- DECL_LINK( OnPositionSelected, weld::ComboBox&, void );
- DECL_LINK( OnFieldSelected, 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(OnFocusGrabbed, weld::Widget&, void);
+ DECL_LINK(OnCheckBoxToggled, weld::Toggleable&, void);
- DECL_LINK( OnContextSelection, weld::ComboBox&, void );
+ DECL_LINK(OnContextSelection, weld::ComboBox&, void);
- DECL_LINK( OnSearchProgress, const FmSearchProgress*, void );
+ DECL_LINK(OnSearchProgress, const FmSearchProgress*, void);
- void initCommon( const css::uno::Reference< css::sdbc::XResultSet >& _rxCursor );
+ void initCommon(const css::uno::Reference<css::sdbc::XResultSet>& _rxCursor);
};
inline void FmSearchDialog::SetActiveField(const OUString& strField)
@@ -168,6 +177,4 @@ inline void FmSearchDialog::SetActiveField(const OUString& strField)
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
index 0ad85b65401d..cac63d8a6b1e 100644
--- a/cui/source/inc/cuigaldlg.hxx
+++ b/cui/source/inc/cuigaldlg.hxx
@@ -17,8 +17,7 @@
* 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
+#pragma once
#include <sal/config.h>
@@ -31,6 +30,8 @@
#include <com/sun/star/media/XPlayer.hpp>
#include <com/sun/star/ui/dialogs/XFolderPicker2.hpp>
#include <svtools/dialogclosedlistener.hxx>
+
+#include <string_view>
#include <vector>
class GalleryTheme;
@@ -38,7 +39,7 @@ class SearchProgress;
class TakeProgress;
class TPGalleryThemeProperties;
-typedef std::vector< sal_uLong > TokenList_impl;
+typedef std::vector< sal_Int32 > TokenList_impl;
struct FilterEntry
{
@@ -64,7 +65,7 @@ public:
SearchThread(SearchProgress* pProgress,
TPGalleryThemeProperties* pBrowser,
- const INetURLObject& rStartURL);
+ INetURLObject aStartURL);
};
class SearchProgress : public weld::GenericDialogController
@@ -80,7 +81,7 @@ private:
DECL_LINK(ClickCancelBtn, weld::Button&, void);
public:
- SearchProgress(weld::Window* pParent, TPGalleryThemeProperties* pTabPage, const INetURLObject& rStartURL);
+ SearchProgress(weld::Window* pParent, TPGalleryThemeProperties* pTabPage, INetURLObject aStartURL);
void LaunchThread();
virtual ~SearchProgress() override;
@@ -181,7 +182,7 @@ class GalleryThemeProperties : public SfxTabDialogController
{
ExchangeData* pData;
- virtual void PageCreated(const OString& rId, SfxTabPage &rPage) override;
+ virtual void PageCreated(const OUString& rId, SfxTabPage &rPage) override;
public:
GalleryThemeProperties(weld::Widget* pParent, ExchangeData* pData, SfxItemSet const * pItemSet);
@@ -242,7 +243,7 @@ class TPGalleryThemeProperties : public SfxTabPage
virtual void Reset( const SfxItemSet* /*rSet*/ ) override {}
virtual bool FillItemSet( SfxItemSet* /*rSet*/ ) override { return true; }
- static OUString addExtension( const OUString&, const OUString& );
+ static OUString addExtension( const OUString&, std::u16string_view );
void FillFilterList();
void SearchFiles();
@@ -250,7 +251,7 @@ class TPGalleryThemeProperties : public SfxTabPage
void DoPreview();
void EndSearchProgressHdl(sal_Int32 nResult);
- DECL_LINK(ClickPreviewHdl, weld::ToggleButton&, void);
+ DECL_LINK(ClickPreviewHdl, weld::Toggleable&, void);
DECL_LINK(ClickSearchHdl, weld::Button&, void);
DECL_LINK(ClickTakeHdl, weld::Button&, void);
DECL_LINK(ClickTakeAllHdl, weld::Button&, void);
@@ -267,11 +268,9 @@ public:
void SetXChgData( ExchangeData* pData );
const ExchangeData* GetXChgData() const { return pData; }
- void StartSearchFiles( const OUString& _rFolderURL, short _nDlgResult );
+ void StartSearchFiles( std::u16string_view _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
index b5280467334d..075c74c29f42 100644
--- a/cui/source/inc/cuigrfflt.hxx
+++ b/cui/source/inc/cuigrfflt.hxx
@@ -17,8 +17,7 @@
* 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
+#pragma once
#include <vcl/timer.hxx>
#include <svx/dlgctrl.hxx>
@@ -80,7 +79,7 @@ protected:
public:
- GraphicFilterDialog(weld::Window* pParent, const OUString& rUIXMLDescription, const OString& rID, const Graphic& rGraphic);
+ GraphicFilterDialog(weld::Window* pParent, const OUString& rUIXMLDescription, const OUString& rID, const Graphic& rGraphic);
virtual Graphic GetFilteredGraphic(const Graphic& rGraphic, double fScaleX, double fScaleY) = 0;
};
@@ -102,7 +101,7 @@ 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(CheckBoxModifyHdl, weld::Toggleable&, void);
DECL_LINK(EditModifyHdl, weld::MetricSpinButton&, void);
public:
@@ -118,7 +117,7 @@ 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(CheckBoxModifyHdl, weld::Toggleable&, void);
DECL_LINK(EditModifyHdl, weld::MetricSpinButton&, void);
public:
@@ -178,6 +177,4 @@ public:
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
index 702cf6396304..8423d8c49759 100644
--- a/cui/source/inc/cuihyperdlg.hxx
+++ b/cui/source/inc/cuihyperdlg.hxx
@@ -17,12 +17,12 @@
* 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
+#pragma once
#include <sal/config.h>
#include <memory>
+#include <string_view>
#include <svx/hlnkitem.hxx>
#include <sfx2/childwin.hxx>
@@ -49,7 +49,7 @@ public:
SvxHlinkCtrl( sal_uInt16 nId, SfxBindings & rBindings, SvxHpLinkDlg* pDlg);
virtual void dispose() override;
- virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
+ virtual void StateChangedAtToolBoxControl( sal_uInt16 nSID, SfxItemState eState,
const SfxPoolItem* pState ) override;
};
@@ -67,12 +67,14 @@ private:
std::vector< std::unique_ptr<IconChoicePageData> > maPageList;
- OString msCurrentPageId;
+ OUString msCurrentPageId;
+ // tdf#90496 - remember last used view in hyperlink dialog
+ static OUString msRememberedPageId;
const SfxItemSet* pSet;
std::unique_ptr<SfxItemSet> pOutSet;
- SfxItemSet* pExampleSet;
- std::unique_ptr<sal_uInt16[]> pRanges;
+ std::unique_ptr<SfxItemSet> pExampleSet;
+ WhichRangesContainer pRanges;
SvxHlinkCtrl maCtrl; ///< Controller
std::unique_ptr<SfxItemSet> mpItemSet;
@@ -87,23 +89,24 @@ private:
std::unique_ptr<weld::Button> m_xHelpBtn;
std::unique_ptr<weld::Button> m_xResetBtn;
- DECL_LINK( ChosePageHdl_Impl, const OString&, void );
+ DECL_LINK( ChosePageHdl_Impl, const OUString&, void );
- IconChoicePageData* GetPageData ( const OString& rId );
+ IconChoicePageData* GetPageData ( std::u16string_view rId );
- void SwitchPage( const OString& rId );
+ void SwitchPage( const OUString& 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 )
+ IconChoicePage* GetTabPage( std::u16string_view rPageId )
{ return GetPageData(rPageId)->xPage.get(); }
void ActivatePageImpl ();
void DeActivatePageImpl ();
void ResetPageImpl ();
+ void Activate() override;
virtual void Close() override;
void Apply();
@@ -112,20 +115,20 @@ public:
virtual ~SvxHpLinkDlg () override;
// interface
- void AddTabPage(const OString &rId, CreatePage pCreateFunc /* != NULL */);
+ void AddTabPage(const OUString &rId, CreatePage pCreateFunc /* != NULL */);
- void SetCurPageId( const OString& rId ) { msCurrentPageId = rId; SwitchPage(rId ); }
- OString GetCurPageId() const { return msCurrentPageId; }
- void ShowPage( const OString& rId );
+ void SetCurPageId( const OUString& rId ) { msCurrentPageId = rId; SwitchPage(rId ); }
+ const OUString& GetCurPageId() const { return msCurrentPageId; }
+ void ShowPage( const OUString& rId );
/// gives via map converted local slots if applicable
- const sal_uInt16* GetInputRanges( const SfxItemPool& );
+ WhichRangesContainer GetInputRanges( const SfxItemPool& );
void SetInputSet( const SfxItemSet* pInSet );
void Start();
bool QueryClose();
- void PageCreated(const OString& rId, IconChoicePage& rPage);
+ void PageCreated(IconChoicePage& rPage);
void SetPage( SvxHyperlinkItem const * pItem );
void SetReadOnlyMode( bool bReadOnly );
@@ -135,6 +138,4 @@ public:
};
-#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
index b8fcf1053f2c..ccb65bd487eb 100644
--- a/cui/source/inc/cuiimapwnd.hxx
+++ b/cui/source/inc/cuiimapwnd.hxx
@@ -16,8 +16,7 @@
* 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
+#pragma once
#include <vcl/weld.hxx>
#include <sfx2/frame.hxx>
@@ -45,6 +44,4 @@ public:
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
index fa2310d1729d..0ee8cacb6c50 100644
--- a/cui/source/inc/cuioptgenrl.hxx
+++ b/cui/source/inc/cuioptgenrl.hxx
@@ -16,8 +16,7 @@
* 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
+#pragma once
// include ---------------------------------------------------------------
@@ -33,10 +32,16 @@ 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_xUseDataImg;
std::unique_ptr<weld::Widget> m_xCryptoFrame;
std::unique_ptr<weld::ComboBox> m_xSigningKeyLB;
+ std::unique_ptr<weld::Label> m_xSigningKeyFT;
+ std::unique_ptr<weld::Widget> m_xSigningKeyImg;
std::unique_ptr<weld::ComboBox> m_xEncryptionKeyLB;
+ std::unique_ptr<weld::Label> m_xEncryptionKeyFT;
+ std::unique_ptr<weld::Widget> m_xEncryptionKeyImg;
std::unique_ptr<weld::CheckButton> m_xEncryptToSelfCB;
+ std::unique_ptr<weld::Widget> m_xEncryptToSelfImg;
// rows
struct Row;
std::vector<std::shared_ptr<Row> > vRows;
@@ -65,11 +70,11 @@ public:
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet );
+ virtual OUString GetAllStrings() override;
+
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
index fc16a4a10d51..b22b3410296b 100644
--- a/cui/source/inc/cuisrchdlg.hxx
+++ b/cui/source/inc/cuisrchdlg.hxx
@@ -16,8 +16,7 @@
* 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
+#pragma once
#include <i18nutil/transliteration.hxx>
#include <sfx2/basedlgs.hxx>
@@ -39,6 +38,4 @@ public:
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
index 849b009c35df..3e810c5b0dbe 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -16,8 +16,7 @@
* 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
+#pragma once
#include <svtools/valueset.hxx>
#include <svx/dlgctrl.hxx>
@@ -40,8 +39,8 @@ class ButtonBox
{
private:
sal_Int32 mnCurrentButton;
- std::vector<weld::ToggleButton*> maButtonList;
- std::map<weld::ToggleButton*, sal_Int32 > maButtonToPos;
+ std::vector<weld::Toggleable*> maButtonList;
+ std::map<weld::Toggleable*, sal_Int32 > maButtonToPos;
void SelectButtonImpl( sal_Int32 nPos )
{
if(mnCurrentButton != NO_BUTTON_SELECTED)
@@ -56,21 +55,21 @@ class ButtonBox
{
mnCurrentButton = NO_BUTTON_SELECTED;
};
- void AddButton(weld::ToggleButton* pButton)
+ void AddButton(weld::Toggleable* 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)
+ sal_Int32 GetButtonPos(weld::Toggleable* pButton)
{
- std::map<weld::ToggleButton*, sal_Int32>::const_iterator aBtnPos = maButtonToPos.find(pButton);
+ std::map<weld::Toggleable*, sal_Int32>::const_iterator aBtnPos = maButtonToPos.find(pButton);
if(aBtnPos != maButtonToPos.end())
return aBtnPos->second;
else
return -1;
}
- void SelectButton(weld::ToggleButton* pButton)
+ void SelectButton(weld::Toggleable* pButton)
{
sal_Int32 nPos = GetButtonPos(pButton);
if(nPos != -1)
@@ -109,14 +108,15 @@ class SvxAreaTabDialog final : public SfxTabDialogController
ChangeType mnGradientListState;
ChangeType mnHatchingListState;
- virtual void PageCreated(const OString& rId, SfxTabPage &rPage) override;
+ virtual void PageCreated(const OUString& 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);
+ SvxAreaTabDialog(weld::Window* pParent, const SfxItemSet* pAttr, SdrModel* pModel, bool bShadow,
+ bool bSlideBackground);
void SetNewColorList( XColorListRef const & pColorList )
{ mpNewColorList = pColorList; }
@@ -127,7 +127,7 @@ public:
class SvxTransparenceTabPage : public SfxTabPage
{
- static const sal_uInt16 pTransparenceRanges[];
+ static const WhichRangesContainer pTransparenceRanges;
const SfxItemSet& rOutAttrs;
@@ -169,9 +169,12 @@ class SvxTransparenceTabPage : public SfxTabPage
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 );
+ // MCGR: Preserve ColorStops until we have a UI to edit these
+ basegfx::BColorStops maColorStops;
+
+ DECL_LINK(ClickTransOffHdl_Impl, weld::Toggleable&, void);
+ DECL_LINK(ClickTransLinearHdl_Impl, weld::Toggleable&, void);
+ DECL_LINK(ClickTransGradientHdl_Impl, weld::Toggleable&, void );
DECL_LINK(ModifyTransparentHdl_Impl, weld::MetricSpinButton&, void);
DECL_LINK(ModifiedTrgrEditHdl_Impl, weld::MetricSpinButton&, void);
DECL_LINK(ModifiedTrgrListBoxHdl_Impl, weld::ComboBox&, void);
@@ -184,12 +187,15 @@ class SvxTransparenceTabPage : public SfxTabPage
bool InitPreview ( const SfxItemSet& rSet );
void InvalidatePreview (bool bEnable = true );
+ // MCGR: Preserve ColorStops until we have a UI to edit these
+ basegfx::BColorStops createColorStops();
+
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; }
+ static WhichRangesContainer GetRanges() { return pTransparenceRanges; }
virtual bool FillItemSet(SfxItemSet*) override;
virtual void Reset(const SfxItemSet*) override;
@@ -206,7 +212,7 @@ public:
class SvxAreaTabPage : public SfxTabPage
{
- static const sal_uInt16 pAreaRanges[];
+ static const WhichRangesContainer pAreaRanges;
private:
std::unique_ptr<SfxTabPage> m_xFillTabPage;
ButtonBox maBox;
@@ -236,22 +242,22 @@ private:
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;
+ std::unique_ptr<weld::Toggleable> m_xBtnNone;
+ std::unique_ptr<weld::Toggleable> m_xBtnColor;
+ std::unique_ptr<weld::Toggleable> m_xBtnGradient;
+ std::unique_ptr<weld::Toggleable> m_xBtnHatch;
+ std::unique_ptr<weld::Toggleable> m_xBtnBitmap;
+ std::unique_ptr<weld::Toggleable> m_xBtnPattern;
+ std::unique_ptr<weld::Toggleable> m_xBtnUseBackground;
void SetOptimalSize(weld::DialogController* pController);
- void SelectFillType( weld::ToggleButton& rButton, const SfxItemSet* _pSet = nullptr );
- SfxTabPage* GetFillTabPage() { return m_xFillTabPage.get(); }
+ void SelectFillType( weld::Toggleable& rButton, const SfxItemSet* _pSet = nullptr );
bool IsBtnClicked() const { return m_bBtnClicked; }
private:
- DECL_LINK(SelectFillTypeHdl_Impl, weld::ToggleButton&, void);
+ DECL_LINK(SelectFillTypeHdl_Impl, weld::Toggleable&, void);
template< typename TabPage >
bool FillItemSet_Impl( SfxItemSet* );
@@ -261,11 +267,17 @@ private:
DeactivateRC DeactivatePage_Impl( SfxItemSet* pSet );
public:
- SvxAreaTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
+ SvxAreaTabPage(weld::Container* pPage, weld::DialogController* pController,
+ const SfxItemSet& rInAttrs, bool bSlideBackground = false);
virtual ~SvxAreaTabPage() override;
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
- static const sal_uInt16* GetRanges() { return pAreaRanges; }
+ static std::unique_ptr<SfxTabPage>
+ CreateWithSlideBackground(weld::Container* pPage, weld::DialogController* pController,
+ const SfxItemSet*);
+ static WhichRangesContainer GetRanges() { return pAreaRanges; }
+
+ virtual OUString GetAllStrings() override;
virtual bool FillItemSet( SfxItemSet* ) override;
virtual void Reset( const SfxItemSet * ) override;
@@ -280,7 +292,7 @@ public:
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 CreatePage(sal_Int32 nId, SfxTabPage& rTab);
void SetColorChgd( ChangeType* pIn ) { m_pnColorListState = pIn; }
void SetGrdChgd( ChangeType* pIn ) { m_pnGradientListState = pIn; }
void SetHtchChgd( ChangeType* pIn ) { m_pnHatchingListState = pIn; }
@@ -291,7 +303,7 @@ public:
class SvxShadowTabPage : public SvxTabPage
{
- static const sal_uInt16 pShadowRanges[];
+ static const WhichRangesContainer pShadowRanges;
private:
const SfxItemSet& m_rOutAttrs;
@@ -312,10 +324,11 @@ private:
std::unique_ptr<weld::MetricSpinButton> m_xMtrDistance;
std::unique_ptr<ColorListBox> m_xLbShadowColor;
std::unique_ptr<weld::MetricSpinButton> m_xMtrTransparent;
+ std::unique_ptr<weld::MetricSpinButton> m_xLbShadowBlurMetric;
std::unique_ptr<weld::CustomWeld> m_xCtlPosition;
std::unique_ptr<weld::CustomWeld> m_xCtlXRectPreview;
- DECL_LINK(ClickShadowHdl_Impl, weld::ToggleButton&, void);
+ DECL_LINK(ClickShadowHdl_Impl, weld::Toggleable&, void);
DECL_LINK(ModifyShadowHdl_Impl, weld::MetricSpinButton&, void);
DECL_LINK(SelectShadowHdl_Impl, ColorListBox&, void);
@@ -324,7 +337,7 @@ public:
virtual ~SvxShadowTabPage() override;
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
- static const sal_uInt16* GetRanges() { return pShadowRanges; }
+ static WhichRangesContainer GetRanges() { return pShadowRanges; }
virtual bool FillItemSet( SfxItemSet* ) override;
virtual void Reset( const SfxItemSet * ) override;
@@ -355,6 +368,9 @@ private:
XFillAttrSetItem m_aXFillAttr;
SfxItemSet& m_rXFSet;
+ // MCGR: Preserve ColorStops until we have a UI to edit these
+ basegfx::BColorStops m_aColorStops;
+
SvxXRectPreview m_aCtlPreview;
std::unique_ptr<weld::ComboBox> m_xLbGradientType;
std::unique_ptr<weld::Label> m_xFtCenter;
@@ -387,12 +403,15 @@ private:
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( ChangeAutoStepHdl_Impl, weld::Toggleable&, 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);
+ sal_Int32 SearchGradientList(std::u16string_view rGradientName);
+
+ // MCGR: Preserve ColorStops until we have a UI to edit these
+ basegfx::BColorStops createColorStops();
public:
SvxGradientTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
@@ -451,7 +470,7 @@ private:
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( ToggleHatchBackgroundColor_Impl, weld::Toggleable&, void );
DECL_LINK( ModifiedBackgroundHdl_Impl, ColorListBox&, void );
DECL_LINK( ModifiedSliderHdl_Impl, weld::Scale&, void );
void ModifiedHdl_Impl(void const *);
@@ -460,7 +479,7 @@ private:
DECL_LINK( ClickRenameHdl_Impl, SvxPresetListBox*, void );
DECL_LINK( ClickDeleteHdl_Impl, SvxPresetListBox*, void );
- sal_Int32 SearchHatchList(const OUString& rHatchName);
+ sal_Int32 SearchHatchList(std::u16string_view rHatchName);
public:
SvxHatchTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
@@ -487,7 +506,6 @@ public:
class SvxBitmapTabPage : public SfxTabPage
{
- static const sal_uInt16 pBitmapRanges[];
private:
const SfxItemSet& m_rOutAttrs;
@@ -528,7 +546,7 @@ private:
std::unique_ptr<weld::CustomWeld> m_xBitmapLBWin;
DECL_LINK( ModifyBitmapHdl, ValueSet*, void );
- DECL_LINK( ClickScaleHdl, weld::Button&, void );
+ DECL_LINK( ClickScaleHdl, weld::Toggleable&, void );
DECL_LINK( ModifyBitmapStyleHdl, weld::ComboBox&, void );
DECL_LINK( ModifyBitmapSizeHdl, weld::MetricSpinButton&, void );
DECL_LINK( ModifyBitmapPositionHdl, weld::ComboBox&, void );
@@ -539,7 +557,7 @@ private:
DECL_LINK( ClickImportHdl, weld::Button&, void );
void ClickBitmapHdl_Impl();
void CalculateBitmapPresetSize();
- sal_Int32 SearchBitmapList(const OUString& rBitmapName);
+ sal_Int32 SearchBitmapList(std::u16string_view rBitmapName);
sal_Int32 SearchBitmapList(const GraphicObject& rGraphicObject);
public:
@@ -594,7 +612,7 @@ private:
DECL_LINK( ClickRenameHdl_Impl, SvxPresetListBox*, void );
DECL_LINK( ClickDeleteHdl_Impl, SvxPresetListBox*, void );
- sal_Int32 SearchPatternList(const OUString& rPatternName);
+ sal_Int32 SearchPatternList(std::u16string_view rPatternName);
public:
SvxPatternTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
@@ -640,10 +658,8 @@ private:
ColorModel eCM;
- Color aPreviousColor;
- Color aCurrentColor;
-
- css::uno::Reference< css::uno::XComponentContext > m_context;
+ Color m_aPreviousColor;
+ NamedColor m_aCurrentColor;
PaletteManager maPaletteManager;
SvxXRectPreview m_aCtlPreviewOld;
@@ -676,6 +692,7 @@ private:
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::Button> m_xMoreColors;
std::unique_ptr<weld::CustomWeld> m_xCtlPreviewOld;
std::unique_ptr<weld::CustomWeld> m_xCtlPreviewNew;
std::unique_ptr<weld::CustomWeld> m_xValSetColorListWin;
@@ -693,11 +710,12 @@ private:
DECL_LINK(ClickAddHdl_Impl, weld::Button&, void);
DECL_LINK(ClickWorkOnHdl_Impl, weld::Button&, void);
DECL_LINK(ClickDeleteHdl_Impl, weld::Button&, void);
+ DECL_STATIC_LINK(SvxColorTabPage, OnMoreColorsClick, 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);
+ DECL_LINK( SelectColorModeHdl_Impl, weld::Toggleable&, void );
+ void ChangeColor(const NamedColor &rNewColor, bool bUpdatePreset = true);
void SetColorModel(ColorModel eModel);
void ChangeColorModel();
void UpdateColorValues( bool bUpdatePreset = true );
@@ -707,7 +725,7 @@ private:
void UpdateModified();
- static sal_Int32 FindInCustomColors( OUString const & aColorName );
+ static sal_Int32 FindInCustomColors( std::u16string_view aColorName );
sal_Int32 FindInPalette( const Color& rColor );
public:
@@ -729,11 +747,7 @@ public:
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
index 87ae008da36e..1122a2017f00 100644
--- a/cui/source/inc/cuitabline.hxx
+++ b/cui/source/inc/cuitabline.hxx
@@ -17,9 +17,9 @@
* 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
+#pragma once
+#include <memory>
#include <vector>
#include <editeng/brushitem.hxx>
#include <sfx2/tabdlg.hxx>
@@ -54,7 +54,7 @@ class SvxLineTabDialog final : public SfxTabDialogController
sal_Int32 nPosDashLb;
sal_Int32 nPosLineEndLb;
- virtual void PageCreated(const OString& rId, SfxTabPage &rPage) override;
+ virtual void PageCreated(const OUString& rId, SfxTabPage &rPage) override;
virtual short Ok() override;
DECL_LINK(CancelHdlImpl, weld::Button&, void);
@@ -87,7 +87,7 @@ struct SvxBmpItemInfo
class SvxLineTabPage : public SfxTabPage
{
- static const sal_uInt16 pLineRanges[];
+ static const WhichRangesContainer 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.
@@ -96,9 +96,9 @@ private:
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;
+ sal_Int32 m_nSymbolType;
/// attributes for the shown symbols; only necessary if not equal to line properties
- SfxItemSet* m_pSymbolAttr;
+ std::unique_ptr<SfxItemSet> m_xSymbolAttr;
std::vector<OUString> m_aGrfNames;
std::vector< std::unique_ptr<SvxBmpItemInfo> >
@@ -170,19 +170,19 @@ private:
std::unique_ptr<weld::CheckButton> m_xSymbolRatioCB;
// handler for gallery popup menu button + size
- DECL_LINK(GraphicHdl_Impl, const OString&, void);
+ DECL_LINK(GraphicHdl_Impl, const OUString&, void);
DECL_LINK(SizeHdl_Impl, weld::MetricSpinButton&, void);
- DECL_LINK(MenuCreateHdl_Impl, weld::ToggleButton&, void);
- DECL_LINK(RatioHdl_Impl, weld::ToggleButton&, void);
+ DECL_LINK(MenuCreateHdl_Impl, weld::Toggleable&, void);
+ DECL_LINK(RatioHdl_Impl, weld::Toggleable&, void);
DECL_LINK(ClickInvisibleHdl_Impl, weld::ComboBox&, void);
void ClickInvisibleHdl_Impl();
- DECL_LINK(ChangeStartClickHdl_Impl, weld::Button&, void);
+ DECL_LINK(ChangeStartClickHdl_Impl, weld::Toggleable&, 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(ChangeEndClickHdl_Impl, weld::Toggleable&, void);
DECL_LINK(ChangePreviewListBoxHdl_Impl, ColorListBox&, void);
DECL_LINK(ChangePreviewModifyHdl_Impl, weld::MetricSpinButton&, void);
void ChangePreviewHdl_Impl(const weld::MetricSpinButton*);
@@ -206,7 +206,7 @@ public:
void Construct();
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
- static const sal_uInt16* GetRanges() { return pLineRanges; }
+ static WhichRangesContainer GetRanges() { return pLineRanges; }
virtual bool FillItemSet( SfxItemSet* ) override;
virtual void Reset( const SfxItemSet* ) override;
@@ -283,10 +283,10 @@ private:
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(ChangeMetricHdl_Impl, weld::Toggleable&, void);
DECL_LINK(SelectTypeListBoxHdl_Impl, weld::ComboBox&, void);
void SelectTypeHdl_Impl(const weld::ComboBox*);
- void ChangeMetricHdl_Impl(const weld::ToggleButton*);
+ void ChangeMetricHdl_Impl(const weld::Toggleable*);
void CheckChanges_Impl();
@@ -373,6 +373,4 @@ public:
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
index f6e52b094633..f5546f1cdb44 100644
--- a/cui/source/inc/cuitbxform.hxx
+++ b/cui/source/inc/cuitbxform.hxx
@@ -16,8 +16,7 @@
* 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
+#pragma once
#include <vcl/weld.hxx>
@@ -33,6 +32,4 @@ public:
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
index e1bc2f6b1a28..3b26e5190cb0 100644
--- a/cui/source/inc/dbregister.hxx
+++ b/cui/source/inc/dbregister.hxx
@@ -17,10 +17,10 @@
* 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
+#pragma once
#include <rtl/ustring.hxx>
+#include <tools/solar.h>
#include <sfx2/basedlgs.hxx>
#include <sfx2/tabdlg.hxx>
@@ -30,7 +30,7 @@ namespace svx
class DbRegistrationOptionsPage : public SfxTabPage
{
private:
- sal_uLong m_nOldCount;
+ size_t m_nOldCount;
bool m_bModified;
std::unique_ptr<weld::Button> m_xNew;
@@ -73,6 +73,8 @@ namespace svx
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet );
+ virtual OUString GetAllStrings() override;
+
virtual bool FillItemSet( SfxItemSet* rSet ) override;
virtual void Reset( const SfxItemSet* rSet ) override;
virtual void FillUserData() override;
@@ -89,7 +91,7 @@ namespace svx
SfxItemSet m_aRegistrationItems;
protected:
- RegistrationItemSetHolder( const SfxItemSet& _rMasterSet );
+ RegistrationItemSetHolder( SfxItemSet _aMasterSet );
~RegistrationItemSetHolder();
protected:
@@ -106,7 +108,5 @@ namespace svx
};
}
-#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
index 08aa4249754b..1927e0a7f319 100644
--- a/cui/source/inc/defdlgname.hxx
+++ b/cui/source/inc/defdlgname.hxx
@@ -16,8 +16,7 @@
* 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
+#pragma once
// const -----------------------------------------------------------------
@@ -25,6 +24,4 @@
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
index c31fde3a27a3..a26c0b25d32b 100644
--- a/cui/source/inc/dialmgr.hxx
+++ b/cui/source/inc/dialmgr.hxx
@@ -20,7 +20,8 @@
#pragma once
#include <rtl/ustring.hxx>
+#include <unotools/resmgr.hxx>
-OUString CuiResId(const char* pKey);
+OUString CuiResId(TranslateId aKey);
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/dlgname.hxx b/cui/source/inc/dlgname.hxx
deleted file mode 100644
index 8fd754990885..000000000000
--- a/cui/source/inc/dlgname.hxx
+++ /dev/null
@@ -1,125 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#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
deleted file mode 100644
index 3d3c99de1c00..000000000000
--- a/cui/source/inc/dstribut.hxx
+++ /dev/null
@@ -1,72 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#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/fileextcheckdlg.hxx b/cui/source/inc/fileextcheckdlg.hxx
new file mode 100644
index 000000000000..968deae77177
--- /dev/null
+++ b/cui/source/inc/fileextcheckdlg.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/.
+ *
+ * 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 <sal/config.h>
+
+#include <vcl/weld.hxx>
+
+class FileExtCheckDialog : public weld::GenericDialogController
+{
+private:
+ std::unique_ptr<weld::Label> m_pText;
+ std::unique_ptr<weld::CheckButton> m_pPerformCheck;
+ std::unique_ptr<weld::Button> m_pOk;
+
+ DECL_LINK(OnOkClick, weld::Button&, void);
+
+public:
+ FileExtCheckDialog(weld::Window* pWindow, const OUString& sTitle, const OUString& sMsg);
+ virtual ~FileExtCheckDialog() override;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/cui/source/inc/grfpage.hxx b/cui/source/inc/grfpage.hxx
index afdc7cb6ba6f..673062b7593a 100644
--- a/cui/source/inc/grfpage.hxx
+++ b/cui/source/inc/grfpage.hxx
@@ -17,8 +17,7 @@
* 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
+#pragma once
#include <vcl/customweld.hxx>
#include <vcl/graph.hxx>
@@ -38,10 +37,10 @@ public:
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 SetTop( tools::Long nVal ) { m_aTopLeft.setX(nVal); }
+ void SetBottom( tools::Long nVal ) { m_aBottomRight.setX(nVal); }
+ void SetLeft( tools::Long nVal ) { m_aTopLeft.setY(nVal); }
+ void SetRight( tools::Long nVal) { m_aBottomRight.setY(nVal); }
void SetFrameSize( const Size& rSz );
void SetGraphic( const Graphic& rGrf ) { m_aGrf = rGrf; }
};
@@ -50,13 +49,14 @@ class SvxGrfCropPage : public SfxTabPage
{
friend class VclPtr<SvxGrfCropPage>;
- OUString aGraphicName;
- Size aOrigSize;
- Size aOrigPixelSize;
- Size aPageSize;
- long nOldWidth;
- long nOldHeight;
- bool bSetOrigSize;
+ OUString m_aGraphicName;
+ Size m_aOrigSize;
+ Size m_aOrigPixelSize;
+ Size m_aPageSize;
+ tools::Long m_nOldWidth;
+ tools::Long m_nOldHeight;
+ bool m_bSetOrigSize;
+ sal_Int32 m_aPreferredDPI;
SvxCropExample m_aExampleWN;
@@ -80,6 +80,8 @@ class SvxGrfCropPage : public SfxTabPage
std::unique_ptr<weld::Label> m_xOrigSizeFT;
std::unique_ptr<weld::Button> m_xOrigSizePB;
+ std::unique_ptr<weld::Button> m_xUncropPB;
+
// Example
std::unique_ptr<weld::CustomWeld> m_xExampleWN;
@@ -87,13 +89,14 @@ class SvxGrfCropPage : public SfxTabPage
DECL_LINK(SizeHdl, weld::MetricSpinButton&, void);
DECL_LINK(CropModifyHdl, weld::MetricSpinButton&, void);
DECL_LINK(OrigSizeHdl, weld::Button&, void);
+ DECL_LINK(UncropHdl, weld::Button&, void);
void CalcZoom();
void CalcMinMaxBorder();
void GraphicHasChanged(bool bFound);
virtual void ActivatePage(const SfxItemSet& rSet) override;
- static Size GetGrfOrigSize(const Graphic&);
+ Size GetGrfOrigSize(const Graphic& rGraphic);
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 );
@@ -104,6 +107,4 @@ public:
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
index 056aee15977d..57c3284d61b3 100644
--- a/cui/source/inc/hangulhanjadlg.hxx
+++ b/cui/source/inc/hangulhanjadlg.hxx
@@ -16,8 +16,7 @@
* 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
+#pragma once
#include <vcl/customweld.hxx>
#include <vcl/event.hxx>
@@ -97,7 +96,7 @@ namespace svx
bool m_bDocumentMode;
Link<LinkParamNone*,void> m_aOptionsChangedLink;
- Link<weld::ToggleButton&,void> m_aClickByCharacterLink;
+ Link<weld::Toggleable&,void> m_aClickByCharacterLink;
std::unique_ptr<weld::Button> m_xFind;
std::unique_ptr<weld::Button> m_xIgnore;
@@ -119,7 +118,7 @@ namespace svx
std::unique_ptr<weld::CheckButton> m_xHanjaOnly;
std::unique_ptr<weld::CheckButton> m_xReplaceByChar;
public:
- HangulHanjaConversionDialog(weld::Window* pParent);
+ HangulHanjaConversionDialog(weld::Widget* pParent);
virtual ~HangulHanjaConversionDialog() override;
public:
@@ -129,8 +128,8 @@ namespace svx
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 SetClickByCharacterHdl( const Link<weld::Toggleable&,void>& _rHdl );
+ void SetConversionFormatChangedHdl( const Link<weld::Toggleable&,void>& _rHdl );
void SetFindHdl( const Link<weld::Button&,void>& _rHdl );
OUString GetCurrentString( ) const;
@@ -165,8 +164,8 @@ namespace svx
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 );
+ DECL_LINK( OnConversionDirectionClicked, weld::Toggleable&, void );
+ DECL_LINK( ClickByCharacterHdl, weld::Toggleable&, void );
/// fill the suggestion list box with suggestions for the actual input
void FillSuggestions( const css::uno::Sequence< OUString >& _rSuggestions );
@@ -241,7 +240,6 @@ namespace svx
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); }
};
@@ -300,6 +298,4 @@ namespace svx
};
}
-#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
index c4c65feacce0..a87bb1460f76 100644
--- a/cui/source/inc/headertablistbox.hxx
+++ b/cui/source/inc/headertablistbox.hxx
@@ -17,8 +17,7 @@
* 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
+#pragma once
#include <vcl/weld.hxx>
@@ -26,17 +25,13 @@ 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;
- }
+ 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
index 3ae4404c138f..8f9af7fd9570 100644
--- a/cui/source/inc/helpids.h
+++ b/cui/source/inc/helpids.h
@@ -16,31 +16,37 @@
* 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
+#pragma once
-#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"
+#include <rtl/ustring.hxx>
-#endif
+inline constexpr OUString HID_OPTIONS_COLORCONFIG_SAVE_SCHEME
+ = u"CUI_HID_OPTIONS_COLORCONFIG_SAVE_SCHEME"_ustr;
+inline constexpr OUString HID_OFA_FONT_SUBST_CLB = u"CUI_HID_OFA_FONT_SUBST_CLB"_ustr;
+inline constexpr OUString HID_DBPATH_CTL_PATH = u"CUI_HID_DBPATH_CTL_PATH"_ustr;
+#define HID_DBPATH_HEADERBAR "CUI_HID_DBPATH_HEADERBAR"
+inline constexpr OUString HID_OFADLG_TREELISTBOX = u"CUI_HID_OFADLG_TREELISTBOX"_ustr;
+inline constexpr OUString HID_SVX_CONFIG_TOOLBAR = u"CUI_HID_SVX_CONFIG_TOOLBAR"_ustr;
+inline constexpr OUString HID_SVX_CONFIG_TOOLBAR_CONTENTS
+ = u"CUI_HID_SVX_CONFIG_TOOLBAR_CONTENTS"_ustr;
+inline constexpr OUString HID_SVX_CONFIG_NOTEBOOKBAR_CONTENTS
+ = u"CUI_HID_SVX_CONFIG_NOTEBOOKBAR_CONTENTS"_ustr;
+inline constexpr OUString HID_HANGULDLG_SUGGESTIONS_GRID
+ = u"CUI_HID_HANGULDLG_SUGGESTIONS_GRID"_ustr;
+inline constexpr OUString HID_HANGULDLG_SUGGESTIONS_LIST
+ = u"CUI_HID_HANGULDLG_SUGGESTIONS_LIST"_ustr;
+inline constexpr OUString HID_SVX_CONFIG_NAME_SUBMENU = u"CUI_HID_SVX_CONFIG_NAME_SUBMENU"_ustr;
+inline constexpr OUString HID_SVX_CONFIG_RENAME_MENU = u"CUI_HID_SVX_CONFIG_RENAME_MENU"_ustr;
+inline constexpr OUString HID_SVX_CONFIG_RENAME_MENU_ITEM
+ = u"CUI_HID_SVX_CONFIG_RENAME_MENU_ITEM"_ustr;
+inline constexpr OUString HID_SVX_CONFIG_RENAME_TOOLBAR = u"CUI_HID_SVX_CONFIG_RENAME_TOOLBAR"_ustr;
+inline constexpr OUString HID_SVX_CONFIG_RENAME_TOOLBAR_ITEM
+ = u"CUI_HID_SVX_CONFIG_RENAME_TOOLBAR_ITEM"_ustr;
+inline constexpr OUString HID_SVX_UP_TOOLBAR_ITEM = u"CUI_HID_SVX_UP_TOOLBAR_ITEM"_ustr;
+inline constexpr OUString HID_SVX_DOWN_TOOLBAR_ITEM = u"CUI_HID_SVX_DOWN_TOOLBAR_ITEM"_ustr;
+inline constexpr OUString HID_SVX_SAVE_IN = u"CUI_HID_SVX_SAVE_IN"_ustr;
+inline constexpr OUString HID_SVX_TOPLEVELLISTBOX = u"CUI_HID_SVX_TOPLEVELLISTBOX"_ustr;
+inline constexpr OUString HID_SVX_DESCFIELD = u"CUI_HID_SVX_DESCFIELD"_ustr;
+inline constexpr OUString HID_MACRO_HEADERTABLISTBOX = u"CUI_HID_MACRO_HEADERTABLISTBOX"_ustr;
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/hldocntp.hxx b/cui/source/inc/hldocntp.hxx
index 719968853643..68bce1650a00 100644
--- a/cui/source/inc/hldocntp.hxx
+++ b/cui/source/inc/hldocntp.hxx
@@ -16,8 +16,7 @@
* 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
+#pragma once
#include "hltpbase.hxx"
@@ -35,7 +34,7 @@ private:
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;
+ bool ImplGetURLObject( const OUString& rPath, std::u16string_view rBase, INetURLObject& aURLObject ) const;
void FillDocumentList ();
DECL_LINK (ClickNewHdl_Impl, weld::Button&, void );
@@ -43,7 +42,7 @@ private:
protected:
void FillDlgFields(const OUString& rStrURL) override;
- void GetCurentItemData ( OUString& rStrURL, OUString& aStrName,
+ void GetCurrentItemData ( OUString& rStrURL, OUString& aStrName,
OUString& aStrIntName, OUString& aStrFrame,
SvxLinkInsertMode& eMode ) override;
@@ -53,12 +52,9 @@ public:
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
index 9f5f8395f3c1..61005a42d635 100644
--- a/cui/source/inc/hldoctp.hxx
+++ b/cui/source/inc/hldoctp.hxx
@@ -16,8 +16,7 @@
* 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
+#pragma once
#include "hltpbase.hxx"
@@ -50,10 +49,10 @@ private:
DECL_LINK( TimeoutHdl_Impl, Timer *, void ); ///< Handler for timer -timeout
enum class EPathType { Invalid, ExistsFile };
- static EPathType GetPathType ( const OUString& rStrPath );
+ static EPathType GetPathType ( std::u16string_view rStrPath );
void FillDlgFields(const OUString& rStrURL) override;
- void GetCurentItemData ( OUString& rStrURL, OUString& aStrName,
+ void GetCurrentItemData ( OUString& rStrURL, OUString& aStrName,
OUString& aStrIntName, OUString& aStrFrame,
SvxLinkInsertMode& eMode ) override;
virtual bool ShouldOpenMarkWnd () override {return m_bMarkWndOpen;}
@@ -71,6 +70,4 @@ public:
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
index 115e1e428a47..366d8243a8b6 100644
--- a/cui/source/inc/hlinettp.hxx
+++ b/cui/source/inc/hlinettp.hxx
@@ -16,8 +16,11 @@
* 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
+#pragma once
+
+#include <sal/config.h>
+
+#include <string_view>
#include "cuihyperdlg.hxx"
#include "hltpbase.hxx"
@@ -31,47 +34,31 @@
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;
+ void SetScheme(std::u16string_view rScheme);
+ void RemoveImproperProtocol(std::u16string_view rProperScheme);
+ static INetProtocol GetSmartProtocolFromButtons();
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,
+ virtual void GetCurrentItemData ( OUString& rStrURL, OUString& aStrName,
OUString& aStrIntName, OUString& aStrFrame,
SvxLinkInsertMode& eMode ) override;
- virtual bool ShouldOpenMarkWnd () override {return ( m_bMarkWndOpen && m_xRbtLinktypInternet->get_active() );}
+ virtual bool ShouldOpenMarkWnd () override { return false; }
virtual void SetMarkWndShouldOpen (bool bOpen) override {m_bMarkWndOpen=bOpen;}
public:
@@ -86,6 +73,4 @@ public:
};
-#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
index c137a3cf1cfa..b7c76c52cb18 100644
--- a/cui/source/inc/hlmailtp.hxx
+++ b/cui/source/inc/hlmailtp.hxx
@@ -16,8 +16,7 @@
* 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
+#pragma once
#include "hltpbase.hxx"
@@ -32,21 +31,20 @@ 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);
+ void SetScheme(std::u16string_view rScheme);
+ void RemoveImproperProtocol(std::u16string_view aProperScheme);
OUString CreateAbsoluteURL() const;
protected:
virtual void FillDlgFields(const OUString& rStrURL) override;
- virtual void GetCurentItemData ( OUString& rStrURL, OUString& aStrName,
+ virtual void GetCurrentItemData ( OUString& rStrURL, OUString& aStrName,
OUString& aStrIntName, OUString& aStrFrame,
SvxLinkInsertMode& eMode ) override;
@@ -60,6 +58,4 @@ public:
};
-#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
index 9dd566a74a6c..d88dddab208d 100644
--- a/cui/source/inc/hlmarkwn.hxx
+++ b/cui/source/inc/hlmarkwn.hxx
@@ -17,8 +17,7 @@
* 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
+#pragma once
#include <com/sun/star/container/XNameAccess.hpp>
#include <vcl/weld.hxx>
@@ -31,8 +30,6 @@ class SvxHyperlinkTabPageBase;
class SvxHlinkDlgMarkWnd : public weld::GenericDialogController
{
private:
- friend class SvxHlmarkTreeLBox;
-
SvxHyperlinkTabPageBase* mpParent;
sal_uInt16 mnError;
@@ -48,7 +45,7 @@ protected:
bool RefreshFromDoc( const OUString& aURL );
void RestoreLastSelection();
- std::unique_ptr<weld::TreeIter> FindEntry(const OUString& aStrName);
+ std::unique_ptr<weld::TreeIter> FindEntry(std::u16string_view aStrName);
void ClearTree();
int FillTree( const css::uno::Reference< css::container::XNameAccess >& xLinks, const weld::TreeIter* pParentEntry =nullptr );
@@ -62,11 +59,9 @@ public:
void MoveTo(const Point& rNewPos);
void RefreshTree(const OUString& aStrURL);
- bool SelectEntry(const OUString& aStrMark);
+ bool SelectEntry(std::u16string_view 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
index 6caa0c510dd8..34cd741fec77 100644
--- a/cui/source/inc/hlmarkwn_def.hxx
+++ b/cui/source/inc/hlmarkwn_def.hxx
@@ -17,13 +17,10 @@
* 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
+#pragma once
-#define LERR_NOERROR 0
-#define LERR_NOENTRIES 1
-#define LERR_DOCNOTOPEN 2
-
-#endif
+#define LERR_NOERROR 0
+#define LERR_NOENTRIES 1
+#define LERR_DOCNOTOPEN 2
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/hltpbase.hxx b/cui/source/inc/hltpbase.hxx
index 0860fff0e2fc..acb84198ad25 100644
--- a/cui/source/inc/hltpbase.hxx
+++ b/cui/source/inc/hltpbase.hxx
@@ -16,15 +16,14 @@
* 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
+#pragma once
#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 <vcl/locktoplevels.hxx>
#include <com/sun/star/frame/XFrame.hpp>
#include <svx/hlnkitem.hxx>
@@ -76,7 +75,7 @@ protected:
void InitStdControls ();
void FillStandardDlgFields ( const SvxHyperlinkItem* pHyperlinkItem );
virtual void FillDlgFields(const OUString& rStrURL) = 0;
- virtual void GetCurentItemData ( OUString& rStrURL, OUString& aStrName,
+ virtual void GetCurrentItemData ( OUString& rStrURL, OUString& aStrName,
OUString& aStrIntName, OUString& aStrFrame,
SvxLinkInsertMode& eMode ) = 0;
@@ -95,7 +94,7 @@ public:
weld::Container* pParent,
SvxHpLinkDlg* pDlg,
const OUString& rUIXMLDescription,
- const OString& rID,
+ const OUString& rID,
const SfxItemSet* pItemSet
);
virtual ~SvxHyperlinkTabPageBase () override;
@@ -106,7 +105,6 @@ public:
mxDocumentFrame = rxDocumentFrame;
}
- virtual bool AskApply ();
virtual void DoApply ();
virtual void SetInitFocus();
virtual void SetMarkStr ( const OUString& aStrMark );
@@ -133,6 +131,4 @@ protected:
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
index fdf65cd4b201..0b304e9439f9 100644
--- a/cui/source/inc/hyphen.hxx
+++ b/cui/source/inc/hyphen.hxx
@@ -16,8 +16,7 @@
* 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
+#pragma once
#include <memory>
@@ -72,8 +71,8 @@ class SvxHyphenWordDialog : public SfxDialogController
DECL_LINK(CursorChangeHdl_Impl, weld::Entry&, void);
public:
- SvxHyphenWordDialog(const OUString &rWord, LanguageType nLang,
- weld::Window* pParent,
+ SvxHyphenWordDialog(OUString aWord, LanguageType nLang,
+ weld::Widget* pParent,
css::uno::Reference<css::linguistic2::XHyphenator> const &xHyphen,
SvxSpellWrapper* pWrapper);
virtual ~SvxHyphenWordDialog() override;
@@ -83,6 +82,4 @@ public:
bool SelRight();
};
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/iconcdlg.hxx b/cui/source/inc/iconcdlg.hxx
index 230c22be74c2..e31aaa74e0db 100644
--- a/cui/source/inc/iconcdlg.hxx
+++ b/cui/source/inc/iconcdlg.hxx
@@ -16,11 +16,11 @@
* 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
+#pragma once
#include <rtl/ustring.hxx>
#include <sfx2/tabdlg.hxx>
+#include <utility>
// forward-declarations
struct IconChoicePageData;
@@ -32,21 +32,6 @@ 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:
@@ -59,12 +44,12 @@ private:
protected:
- IconChoicePage(weld::Container* pParent, const OUString& rUIXMLDescription, const OString& rID, const SfxItemSet* pItemSet);
+ IconChoicePage(weld::Container* pParent, const OUString& rUIXMLDescription, const OUString& rID, const SfxItemSet* pItemSet);
public:
virtual ~IconChoicePage();
- OString GetHelpId() const { return xContainer->get_help_id(); }
+ OUString GetHelpId() const { return xContainer->get_help_id(); }
const SfxItemSet& GetItemSet() const { return *pSet; }
@@ -79,6 +64,19 @@ public:
virtual bool QueryClose();
};
-#endif // INCLUDED_CUI_SOURCE_INC_ICONCDLG_HXX
+/// Data-structure for pages in dialog
+struct IconChoicePageData
+{
+ OUString sId;
+ std::unique_ptr<IconChoicePage> xPage; ///< the TabPage itself
+ bool bRefresh; ///< Flag: page has to be newly initialized
+
+ // constructor
+ IconChoicePageData(OUString aId, std::unique_ptr<IconChoicePage> xInPage)
+ : sId(std::move(aId))
+ , xPage(std::move(xInPage))
+ , bRefresh(false)
+ {}
+};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/insdlg.hxx b/cui/source/inc/insdlg.hxx
index 7c17022edcde..61c707507087 100644
--- a/cui/source/inc/insdlg.hxx
+++ b/cui/source/inc/insdlg.hxx
@@ -16,8 +16,7 @@
* 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
+#pragma once
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/embed/XEmbeddedObject.hpp>
@@ -37,12 +36,12 @@ protected:
comphelper::EmbeddedObjectContainer aCnt;
InsertObjectDialog_Impl(weld::Window * pParent,
- const OUString& rUIXMLDescription, const OString& rID,
- const css::uno::Reference < css::embed::XStorage >& xStorage);
+ const OUString& rUIXMLDescription, const OUString& rID,
+ 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); }
+ void SetHelpId(const OUString& rHelpId) { m_xDialog->set_help_id(rHelpId); }
virtual bool IsCreateNew() const;
};
@@ -65,7 +64,7 @@ class SvInsertOleDlg : public InsertObjectDialog_Impl
DECL_LINK(DoubleClickHdl, weld::TreeView&, bool);
DECL_LINK(BrowseHdl, weld::Button&, void);
- DECL_LINK(RadioHdl, weld::Button&, void);
+ DECL_LINK(RadioHdl, weld::Toggleable&, void);
bool IsCreateNew() const override { return m_xRbNewObject->get_active(); }
public:
@@ -100,7 +99,7 @@ private:
std::unique_ptr<weld::CheckButton> m_xCBMarginHeightDefault;
DECL_LINK(OpenHdl, weld::Button&, void);
- DECL_LINK(CheckHdl, weld::Button&, void);
+ DECL_LINK(CheckHdl, weld::Toggleable&, void);
void Init();
@@ -112,6 +111,4 @@ public:
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
index ea6428eb3a67..9ab7f0fed466 100644
--- a/cui/source/inc/insrc.hxx
+++ b/cui/source/inc/insrc.hxx
@@ -16,14 +16,13 @@
* 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
+#pragma once
#include <rtl/string.hxx>
#include <svx/svxdlg.hxx>
#include <vcl/weld.hxx>
-class SvxInsRowColDlg : public SvxAbstractInsRowColDlg, public weld::GenericDialogController
+class SvxInsRowColDlg : public weld::GenericDialogController
{
private:
std::unique_ptr<weld::SpinButton> m_xCountEdit;
@@ -31,14 +30,25 @@ private:
std::unique_ptr<weld::RadioButton> m_xAfterBtn;
public:
- SvxInsRowColDlg(weld::Window* pParent, bool bCol, const OString& rHelpId);
+ SvxInsRowColDlg(weld::Window* pParent, bool bCol, const OUString& rHelpId);
- virtual short Execute() override;
+ bool isInsertBefore() const;
+ sal_uInt16 getInsertCount() const;
+};
+
+class SvxAbstractInsRowColDlg_Impl final : public SvxAbstractInsRowColDlg
+{
+ std::shared_ptr<SvxInsRowColDlg> m_xDlg;
+public:
+ explicit SvxAbstractInsRowColDlg_Impl(std::shared_ptr<SvxInsRowColDlg> p)
+ : m_xDlg(std::move(p))
+ {
+ }
+ virtual short Execute() override;
+ virtual bool StartExecuteAsync(AsyncContext& rCtx) 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
index d759df2e6e06..5d7f778d5c38 100644
--- a/cui/source/inc/labdlg.hxx
+++ b/cui/source/inc/labdlg.hxx
@@ -16,8 +16,7 @@
* 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
+#pragma once
#include <svtools/valueset.hxx>
#include <sfx2/tabdlg.hxx>
@@ -35,7 +34,7 @@ const sal_uInt16 CAPTYPE_BITMAPS_COUNT = 3;
class SvxCaptionTabPage : public SfxTabPage
{
private:
- static const sal_uInt16 pCaptionRanges[];
+ static const WhichRangesContainer pCaptionRanges;
Image m_aBmpCapTypes[CAPTYPE_BITMAPS_COUNT];
@@ -74,7 +73,7 @@ private:
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(LineOptHdl_Impl, weld::Toggleable&, void);
DECL_LINK(SelectCaptTypeHdl_Impl, ValueSet*, void);
public:
@@ -82,7 +81,7 @@ public:
virtual ~SvxCaptionTabPage() override;
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
- static const sal_uInt16* GetRanges() { return pCaptionRanges; }
+ static WhichRangesContainer GetRanges() { return pCaptionRanges; }
virtual bool FillItemSet( SfxItemSet* ) override;
virtual void Reset( const SfxItemSet * ) override;
@@ -103,7 +102,7 @@ private:
Link<SvxSwFrameValidation&,void> aValidateLink;
- virtual void PageCreated(const OString& rId, SfxTabPage &rPage) override;
+ virtual void PageCreated(const OUString& rId, SfxTabPage &rPage) override;
public:
SvxCaptionTabDialog(weld::Window* pParent, const SdrView* pView,
@@ -114,6 +113,4 @@ public:
};
-#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
index 90d51aba828e..1e54954ec555 100644
--- a/cui/source/inc/linkdlg.hxx
+++ b/cui/source/inc/linkdlg.hxx
@@ -17,8 +17,7 @@
* 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
+#pragma once
#include <vcl/idle.hxx>
#include <vcl/virdev.hxx>
@@ -28,8 +27,8 @@
*************************************************************************/
namespace sfx2
{
- class LinkManager;
- class SvBaseLink;
+class LinkManager;
+class SvBaseLink;
}
enum class SfxLinkUpdateMode;
@@ -42,7 +41,7 @@ class SvBaseLinksDlg : public weld::GenericDialogController
OUString aStrCloselinkmsg;
OUString aStrCloselinkmsgMulti;
OUString aStrWaitinglink;
- sfx2::LinkManager* pLinkMgr;
+ sfx2::LinkManager* pLinkMgr;
Idle aUpdateIdle;
std::unique_ptr<weld::TreeView> m_xTbLinks;
@@ -57,29 +56,26 @@ class SvBaseLinksDlg : public weld::GenericDialogController
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 );
+ DECL_LINK(LinksSelectHdl, weld::TreeView&, void);
+ DECL_LINK(LinksDoubleClickHdl, weld::TreeView&, bool);
+ DECL_LINK(ToggleHdl, weld::Toggleable&, 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& );
+ 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* );
+ void SetManager(sfx2::LinkManager*);
public:
- SvBaseLinksDlg(weld::Window * pParent, sfx2::LinkManager*, bool bHtml);
+ SvBaseLinksDlg(weld::Window* pParent, sfx2::LinkManager*, bool bHtml);
virtual ~SvBaseLinksDlg() override;
- void SetActLink( sfx2::SvBaseLink const * pLink );
+ 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
index d4403686c237..ba3c1de11717 100644
--- a/cui/source/inc/macroass.hxx
+++ b/cui/source/inc/macroass.hxx
@@ -16,8 +16,7 @@
* 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
+#pragma once
#include <sal/config.h>
@@ -30,6 +29,7 @@
class SfxMacroTabPage_;
class SfxMacroTabPage_Impl;
+class Timer;
class SfxMacroTabPage final : public SfxTabPage
{
@@ -87,6 +87,4 @@ public:
}
};
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/macropg.hxx b/cui/source/inc/macropg.hxx
index 5017aeeabfe8..2f2471bb09eb 100644
--- a/cui/source/inc/macropg.hxx
+++ b/cui/source/inc/macropg.hxx
@@ -16,8 +16,7 @@
* 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
+#pragma once
#include <sfx2/basedlgs.hxx>
#include <sfx2/tabdlg.hxx>
@@ -26,23 +25,24 @@
#include <com/sun/star/util/XModifiable.hpp>
#include <com/sun/star/uno/Reference.hxx>
#include <rtl/ustring.hxx>
+#include <unotools/resmgr.hxx>
#include <unordered_map>
#include <vector>
-typedef std::unordered_map< OUString, std::pair< OUString, OUString > > EventsHash;
+typedef std::pair<OUString, OUString> EventPair;
+typedef std::unordered_map<OUString, EventPair> EventsHash;
struct EventDisplayName
{
const char* pAsciiEventName;
- const char* pEventResourceID;
- EventDisplayName(const char* pAsciiName, const char* pResId)
+ TranslateId pEventResourceID;
+ EventDisplayName(const char* pAsciiName, TranslateId pResId)
: pAsciiEventName(pAsciiName)
, pEventResourceID(pResId)
{
}
};
-typedef std::vector< EventDisplayName > EventDisplayNames;
class SvxMacroTabPage_;
class SvTabListBox;
@@ -55,8 +55,10 @@ 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 );
+ DECL_LINK( DeleteAllHdl_Impl, weld::Button&, void );
- static void GenericHandler_Impl( SvxMacroTabPage_* pThis, const weld::Button* pBtn );
+ void GenericHandler_Impl(const weld::Button* pBtn);
+ const EventPair* LookupEvent(const OUString& rEventName);
css::uno::Reference< css::container::XNameReplace > m_xAppEvents;
protected:
@@ -65,14 +67,15 @@ protected:
css::uno::Reference< css::util::XModifiable > m_xModifiable;
EventsHash m_appEventsHash;
EventsHash m_docEventsHash;
+ int m_nAssignedEvents;
bool bDocModified, bAppEvents, bInitialized;
- EventDisplayNames aDisplayNames;
+ std::vector< EventDisplayName > aDisplayNames;
- SvxMacroTabPage_(weld::Container* pPage, weld::DialogController* pController, const OUString& rUIXMLDescription, const OString& rID, const SfxItemSet& rItemSet);
+ SvxMacroTabPage_(weld::Container* pPage, weld::DialogController* pController, const OUString& rUIXMLDescription, const OUString& 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 );
+ static EventPair GetPairFromAny(const css::uno::Any& aAny);
public:
@@ -103,7 +106,7 @@ public:
// class SvxMacroAssignDlg --------------------------------------------------
-typedef const sal_uInt16* (*GetTabPageRanges)(); // gives international Which-values
+typedef WhichRangesContainer (*GetTabPageRanges)(); // gives international Which-values
class SvxMacroAssignSingleTabDialog : public SfxSingleTabDialogController
{
@@ -126,6 +129,4 @@ public:
);
};
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/measure.hxx b/cui/source/inc/measure.hxx
index 7915fcc381ea..7e18c6485556 100644
--- a/cui/source/inc/measure.hxx
+++ b/cui/source/inc/measure.hxx
@@ -16,8 +16,7 @@
* 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
+#pragma once
#include <sfx2/basedlgs.hxx>
#include <svx/dlgctrl.hxx>
@@ -29,7 +28,7 @@ class SdrView;
class SvxMeasurePage : public SvxTabPage
{
private:
- static const sal_uInt16 pRanges[];
+ static const WhichRangesContainer pRanges;
const SfxItemSet& rOutAttrs;
SfxItemSet aAttrSet;
@@ -58,11 +57,11 @@ private:
void FillUnitLB();
- DECL_LINK(ClickAutoPosHdl_Impl, weld::ToggleButton&, void);
+ DECL_LINK(ClickAutoPosHdl_Impl, weld::Toggleable&, 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);
+ DECL_LINK(ChangeAttrClickHdl_Impl, weld::Toggleable&, void);
void ChangeAttrHdl_Impl(void const *);
public:
@@ -71,7 +70,7 @@ public:
virtual ~SvxMeasurePage() override;
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
- static const sal_uInt16* GetRanges() { return pRanges; }
+ static WhichRangesContainer GetRanges() { return pRanges; }
virtual bool FillItemSet( SfxItemSet* ) override;
virtual void Reset( const SfxItemSet * ) override;
@@ -93,6 +92,4 @@ public:
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
index fcc60bb08693..258e446e80f8 100644
--- a/cui/source/inc/multipat.hxx
+++ b/cui/source/inc/multipat.hxx
@@ -16,21 +16,10 @@
* 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
+#pragma once
#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:
@@ -51,7 +40,7 @@ public:
virtual ~SvxMultiPathDialog() override;
OUString GetPath() const;
- void SetPath(const OUString& rPath);
+ void SetPath(std::u16string_view rPath);
void SetTitle(const OUString& rTitle) { m_xDialog->set_title(rTitle); }
};
@@ -70,10 +59,8 @@ public:
SvxPathSelectDialog(weld::Window* pParent);
OUString GetPath() const;
- void SetPath( const OUString& rPath );
+ void SetPath( std::u16string_view 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
index d0e21293ca52..4a34cb37712c 100644
--- a/cui/source/inc/newtabledlg.hxx
+++ b/cui/source/inc/newtabledlg.hxx
@@ -16,8 +16,7 @@
* 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
+#pragma once
#include <svx/svxdlg.hxx>
#include <vcl/weld.hxx>
@@ -38,7 +37,7 @@ public:
class SvxNewTableDialogWrapper : public SvxAbstractNewTableDialog
{
private:
- std::shared_ptr<weld::DialogController> m_xDlg;
+ std::shared_ptr<SvxNewTableDialog> m_xDlg;
public:
SvxNewTableDialogWrapper(weld::Window* pParent)
@@ -53,23 +52,19 @@ public:
virtual sal_Int32 getRows() const override
{
- SvxNewTableDialog* pDlg = dynamic_cast<SvxNewTableDialog*>(m_xDlg.get());
- if (pDlg)
- return pDlg->getRows();
+ if (m_xDlg)
+ return m_xDlg->getRows();
return 0;
}
virtual sal_Int32 getColumns() const override
{
- SvxNewTableDialog* pDlg = dynamic_cast<SvxNewTableDialog*>(m_xDlg.get());
- if (pDlg)
- return pDlg->getColumns();
+ if (m_xDlg)
+ return m_xDlg->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
index 54796c63b736..13f1a88e9eab 100644
--- a/cui/source/inc/numfmt.hxx
+++ b/cui/source/inc/numfmt.hxx
@@ -16,8 +16,7 @@
* 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
+#pragma once
#include <rtl/ustring.hxx>
@@ -57,7 +56,7 @@ public:
class SvxNumberFormatTabPage : public SfxTabPage
{
- static const sal_uInt16 pRanges[];
+ static const WhichRangesContainer pRanges;
public:
SvxNumberFormatTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs);
@@ -65,7 +64,7 @@ public:
const SfxItemSet* rAttrSet );
virtual ~SvxNumberFormatTabPage() override;
// Returns area information.
- static const sal_uInt16* GetRanges() { return pRanges; }
+ static WhichRangesContainer GetRanges() { return pRanges; }
virtual bool FillItemSet( SfxItemSet* rSet ) override;
virtual void Reset( const SfxItemSet* rSet ) override;
@@ -77,12 +76,13 @@ public:
private:
std::unique_ptr<SvxNumberInfoItem> pNumItem;
std::unique_ptr<SvxNumberFormatShell> pNumFmtShell;
- sal_uLong nInitFormat;
+ sal_uInt32 nInitFormat;
+ short m_nLbFormatSelPosEdComment;
bool bNumItemFlag; ///< for handling with DocShell
bool bOneAreaFlag;
bool bLegacyAutomaticCurrency;
- short nFixedCategory;
+ short nFixedCategory;
OUString sAutomaticLangEntry;
OUString sAutomaticCurrencyEntry;
@@ -125,22 +125,22 @@ private:
void Obstructing();
void EnableBySourceFormat_Impl();
void SetCategory( sal_uInt16 nPos );
- OUString GetExpColorString( Color*& rpPreviewColor, const OUString& aFormatStr, short nTmpCatPos );
+ OUString GetExpColorString( const 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);
+ bool Click_Impl(const 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);
+ DECL_LINK(SelFormatClickHdl_Impl, weld::Toggleable&, 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);
+ DECL_LINK(OptClickHdl_Impl, weld::Toggleable&, void);
void EditHdl_Impl(const weld::Entry*);
void OptHdl_Impl(const weld::Widget*);
@@ -151,6 +151,4 @@ private:
};
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/numpages.hxx b/cui/source/inc/numpages.hxx
index 26ec055e249b..7c34d49fcc62 100644
--- a/cui/source/inc/numpages.hxx
+++ b/cui/source/inc/numpages.hxx
@@ -16,8 +16,7 @@
* 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
+#pragma once
#include <vector>
#include <memory>
@@ -26,9 +25,10 @@
#include <editeng/numdef.hxx>
#include <editeng/svxenum.hxx>
#include <svtools/ctrlbox.hxx>
+#include <svx/numberingpreview.hxx>
#include <vcl/customweld.hxx>
#include <vcl/timer.hxx>
-#include <cui/numberingpreview.hxx>
+#include <svx/dlgutil.hxx>
#define MN_GALLERY_ENTRY 100
@@ -64,8 +64,7 @@ class SvxSingleNumPickTabPage final : public SfxTabPage
sal_uInt16 nActNumLvl;
bool bModified : 1;
bool bPreset : 1;
-
- sal_uInt16 nNumItemId;
+ TypedWhichId<SvxNumBulletItem> nNumItemId;
std::unique_ptr<SvxNumValueSet> m_xExamplesVS;
std::unique_ptr<weld::CustomWeld> m_xExamplesVSWin;
@@ -93,7 +92,7 @@ class SvxBulletPickTabPage final : public SfxTabPage
sal_uInt16 nActNumLvl;
bool bModified : 1;
bool bPreset : 1;
- sal_uInt16 nNumItemId;
+ TypedWhichId<SvxNumBulletItem> nNumItemId;
OUString sBulletCharFormatName;
@@ -130,7 +129,7 @@ class SvxNumPickTabPage final : public SfxTabPage
std::unique_ptr<SvxNumRule> pActNum;
std::unique_ptr<SvxNumRule> pSaveNum;
sal_uInt16 nActNumLvl;
- sal_uInt16 nNumItemId;
+ TypedWhichId<SvxNumBulletItem> nNumItemId;
bool bModified : 1;
bool bPreset : 1;
@@ -165,7 +164,7 @@ class SvxBitmapPickTabPage final : public SfxTabPage
std::unique_ptr<SvxNumRule> pActNum;
std::unique_ptr<SvxNumRule> pSaveNum;
sal_uInt16 nActNumLvl;
- sal_uInt16 nNumItemId;
+ TypedWhichId<SvxNumBulletItem> nNumItemId;
MapUnit eCoreUnit;
bool bModified : 1;
bool bPreset : 1;
@@ -217,9 +216,11 @@ class SvxNumOptionsTabPage : public SfxTabPage
sal_uInt8 nBullet;
sal_uInt16 nActNumLvl;
- sal_uInt16 nNumItemId;
+ TypedWhichId<SvxNumBulletItem> nNumItemId;
MapUnit eCoreUnit;
+ SvxRatioConnector m_aRatioTop;
+ SvxRatioConnector m_aRatioBottom;
SvxNumberingPreview m_aPreviewWIN;
std::unique_ptr<weld::Widget> m_xGrid;
std::unique_ptr<weld::TreeView> m_xLevelLB;
@@ -237,6 +238,7 @@ class SvxNumOptionsTabPage : public SfxTabPage
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::CheckButton> m_xIsLegalCB;
std::unique_ptr<weld::Label> m_xStartFT;
std::unique_ptr<weld::SpinButton> m_xStartED;
std::unique_ptr<weld::Label> m_xBulletFT;
@@ -248,6 +250,9 @@ class SvxNumOptionsTabPage : public SfxTabPage
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::Image> m_xCbxScaleImg;
+ std::unique_ptr<weld::CustomWeld> m_xImgRatioTop;
+ std::unique_ptr<weld::CustomWeld> m_xImgRatioBottom;
std::unique_ptr<weld::Label> m_xOrientFT;
std::unique_ptr<weld::ComboBox> m_xOrientLB;
std::unique_ptr<weld::Widget> m_xAllLevelsFrame;
@@ -266,16 +271,18 @@ class SvxNumOptionsTabPage : public SfxTabPage
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(PopupActivateHdl_Impl, weld::Toggleable&, void);
+ DECL_LINK(GraphicHdl_Impl, const OUString&, void);
DECL_LINK(BulletHdl_Impl, weld::Button&, void);
DECL_LINK(SizeHdl_Impl, weld::MetricSpinButton&, void);
- DECL_LINK(RatioHdl_Impl, weld::ToggleButton&, void);
+ DECL_LINK(RatioHdl_Impl, weld::Toggleable&, 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(IsLegalHdl_Impl, weld::Toggleable&, void);
DECL_LINK(OrientHdl_Impl, weld::ComboBox&, void);
- DECL_LINK(SameLevelHdl_Impl, weld::ToggleButton&, void);
+ DECL_LINK(SameLevelHdl_Impl, weld::Toggleable&, void);
DECL_LINK(BulColorHdl_Impl, ColorListBox&, void);
DECL_LINK(BulRelSizeHdl_Impl, weld::MetricSpinButton&, void);
DECL_LINK(PreviewInvalidateHdl_Impl, Timer*, void);
@@ -312,7 +319,7 @@ class SvxNumPositionTabPage : public SfxTabPage
ImplSVEvent* m_pLevelHdlEvent;
sal_uInt16 nActNumLvl;
- sal_uInt16 nNumItemId;
+ TypedWhichId<SvxNumBulletItem> nNumItemId;
MapUnit eCoreUnit;
bool bModified : 1;
@@ -354,7 +361,7 @@ class SvxNumPositionTabPage : public SfxTabPage
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(RelativeHdl_Impl, weld::Toggleable&, void);
DECL_LINK(StandardHdl_Impl, weld::Button&, void);
void InitPosAndSpaceMode();
@@ -382,6 +389,4 @@ public:
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
index d8febfb7bb60..31a622f7a50d 100644
--- a/cui/source/inc/optasian.hxx
+++ b/cui/source/inc/optasian.hxx
@@ -16,8 +16,7 @@
* 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
+#pragma once
#include <memory>
#include <sfx2/tabdlg.hxx>
@@ -43,19 +42,22 @@ class SvxAsianLayoutPage : public SfxTabPage
std::unique_ptr<weld::Label> m_xHintFT;
DECL_LINK(LanguageHdl, weld::ComboBox&, void);
- DECL_LINK(ChangeStandardHdl, weld::ToggleButton&, void);
+ DECL_LINK(ChangeStandardHdl, weld::Toggleable&, void);
DECL_LINK(ModifyHdl, weld::Entry&, void);
public:
- SvxAsianLayoutPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet );
+ 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;
-};
+ static std::unique_ptr<SfxTabPage>
+ Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet);
+ static WhichRangesContainer GetRanges();
+
+ virtual OUString GetAllStrings() override;
-#endif
+ virtual bool FillItemSet(SfxItemSet* rSet) override;
+ virtual void Reset(const SfxItemSet* rSet) override;
+};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/optdict.hxx b/cui/source/inc/optdict.hxx
index 7d8ffd522c82..8e382cc32e8f 100644
--- a/cui/source/inc/optdict.hxx
+++ b/cui/source/inc/optdict.hxx
@@ -16,8 +16,7 @@
* 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
+#pragma once
#include <vcl/weld.hxx>
#include <com/sun/star/uno/Reference.hxx>
@@ -90,7 +89,6 @@ private:
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 );
@@ -100,13 +98,11 @@ private:
css::linguistic2::XDictionary > const &xDic );
void RemoveDictEntry(int nEntry);
- int GetLBInsertPos(const OUString &rDicWord);
+ int GetLBInsertPos(std::u16string_view rDicWord);
public:
- SvxEditDictionaryDialog(weld::Window* pParent, const OUString& rName);
+ SvxEditDictionaryDialog(weld::Window* pParent, std::u16string_view 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
index 5f64e47c2017..6c5657acf7bd 100644
--- a/cui/source/inc/optlingu.hxx
+++ b/cui/source/inc/optlingu.hxx
@@ -16,13 +16,13 @@
* 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
+#pragma once
#include <sfx2/tabdlg.hxx>
#include <svx/langbox.hxx>
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/configuration/ReadWriteAccess.hpp>
namespace com::sun::star{
namespace beans{
@@ -35,7 +35,6 @@ namespace com::sun::star{
}
}
-class SvTreeListEntry;
class SvxLinguData_Impl;
// define ----------------------------------------------------------------
@@ -62,12 +61,15 @@ class SvxEditModulesDlg : public weld::GenericDialogController
std::unique_ptr<weld::Button> m_xClosePB;
std::unique_ptr<SvxLanguageBox> m_xLanguageLB;
+ css::uno::Reference< css::configuration::XReadWriteAccess> m_xReadWriteAccess;
+
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 );
DECL_LINK( BoxCheckButtonHdl_Impl, const weld::TreeView::iter_col&, void );
+ DECL_STATIC_LINK( SvxEditModulesDlg, OnLinkClick, weld::LinkButton&, bool);
void LangSelectHdl_Impl(const SvxLanguageBox* pBox);
public:
@@ -85,6 +87,8 @@ private:
OUString sWordsWithDigits;
OUString sSpellSpecial;
OUString sSpellAuto;
+ OUString sSpellClosedCompound;
+ OUString sSpellHyphenatedCompound;
OUString sGrammarAuto;
OUString sNumMinWordlen;
OUString sNumPreBreak;
@@ -119,6 +123,7 @@ private:
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::Box> m_xMoreDictsBox;
std::unique_ptr<weld::LinkButton> m_xMoreDictsLink;
void AddDicBoxEntry( const css::uno::Reference< css::linguistic2::XDictionary > &rxDic, sal_uInt16 nIdx );
@@ -130,6 +135,7 @@ private:
DECL_LINK( ModulesBoxCheckButtonHdl_Impl, const weld::TreeView::iter_col&, void );
DECL_LINK( DicsBoxCheckButtonHdl_Impl, const weld::TreeView::iter_col&, void );
DECL_LINK( PostDblClickHdl_Impl, void *, void);
+ DECL_STATIC_LINK( SvxLinguTabPage, OnLinkClick, weld::LinkButton&, bool);
void UpdateModulesBox_Impl();
void UpdateDicBox_Impl();
@@ -139,12 +145,12 @@ public:
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet );
virtual ~SvxLinguTabPage() override;
+ virtual OUString GetAllStrings() 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
index cc3d67b42a05..ccfeb70e0072 100644
--- a/cui/source/inc/optpath.hxx
+++ b/cui/source/inc/optpath.hxx
@@ -16,14 +16,14 @@
* 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
+#pragma once
#include <memory>
#include <sfx2/tabdlg.hxx>
#include <com/sun/star/ui/dialogs/XFolderPicker2.hpp>
#include <svtools/dialogclosedlistener.hxx>
+#include <unotools/pathoptions.hxx>
// forward ---------------------------------------------------------------
struct OptPath_Impl;
@@ -49,23 +49,24 @@ private:
DECL_LINK(StandardHdl_Impl, weld::Button&, void);
DECL_LINK(PathSelect_Impl, weld::TreeView&, void);
+ DECL_LINK(HeaderBarClick, int, void);
DECL_LINK(DialogClosedHdl, css::ui::dialogs::DialogClosedEvent*, void);
- void GetPathList( sal_uInt16 _nPathHandle, OUString& _rInternalPath,
+ void GetPathList( SvtPathOptions::Paths _nPathHandle, OUString& _rInternalPath,
OUString& _rUserPath, OUString& _rWritablePath, bool& _rReadOnly );
- void SetPathList( sal_uInt16 _nPathHandle,
- const OUString& _rUserPath, const OUString& _rWritablePath );
+ void SetPathList( SvtPathOptions::Paths _nPathHandle,
+ std::u16string_view _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 OUString GetAllStrings() 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
index 1019a9fbc214..151569ac4634 100644
--- a/cui/source/inc/page.hxx
+++ b/cui/source/inc/page.hxx
@@ -16,8 +16,7 @@
* 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
+#pragma once
#include <sfx2/tabdlg.hxx>
#include <svx/pagectrl.hxx>
@@ -26,6 +25,7 @@
#include <svx/frmdirlbox.hxx>
#include <i18nutil/paper.hxx>
#include <svx/flagsdef.hxx>
+#include <vcl/print.hxx>
// class SvxPageDescPage -------------------------------------------------
/*
@@ -38,7 +38,6 @@
<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>
@@ -64,17 +63,17 @@ typedef sal_uInt16 MarginPosition;
class SvxPageDescPage : public SfxTabPage
{
- static const sal_uInt16 pRanges[];
+ static const WhichRangesContainer pRanges;
private:
OUString sStandardRegister;
- long nFirstLeftMargin;
- long nFirstRightMargin;
- long nFirstTopMargin;
- long nFirstBottomMargin;
- long nLastLeftMargin;
- long nLastRightMargin;
- long nLastTopMargin;
- long nLastBottomMargin;
+ tools::Long nFirstLeftMargin;
+ tools::Long nFirstRightMargin;
+ tools::Long nFirstTopMargin;
+ tools::Long nFirstBottomMargin;
+ tools::Long nLastLeftMargin;
+ tools::Long nLastRightMargin;
+ tools::Long nLastTopMargin;
+ tools::Long nLastBottomMargin;
bool bLandscape;
bool bBorderModified;
@@ -93,7 +92,6 @@ private:
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;
@@ -106,6 +104,8 @@ private:
std::unique_ptr<weld::MetricSpinButton> m_xRightMarginEdit;
std::unique_ptr<weld::MetricSpinButton> m_xTopMarginEdit;
std::unique_ptr<weld::MetricSpinButton> m_xBottomMarginEdit;
+ std::unique_ptr<weld::Label> m_xGutterMarginLbl;
+ std::unique_ptr<weld::MetricSpinButton> m_xGutterMarginEdit;
// layout settings
std::unique_ptr<weld::Label> m_xPageText;
std::unique_ptr<weld::ComboBox> m_xLayoutBox;
@@ -121,6 +121,10 @@ private:
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_xGutterPositionFT;
+ std::unique_ptr<weld::ComboBox> m_xGutterPositionLB;
+ std::unique_ptr<weld::CheckButton> m_xRtlGutterCB;
+ std::unique_ptr<weld::CheckButton> m_xBackgroundFullSizeCB;
std::unique_ptr<weld::Label> m_xInsideLbl;
std::unique_ptr<weld::Label> m_xOutsideLbl;
std::unique_ptr<weld::Label> m_xPrintRangeQueryText;
@@ -128,12 +132,13 @@ private:
void Init_Impl();
DECL_LINK(LayoutHdl_Impl, weld::ComboBox&, void);
+ DECL_LINK(GutterPositionHdl_Impl, weld::ComboBox&, void);
DECL_LINK(PaperBinHdl_Impl, weld::Widget&, void);
- DECL_LINK(SwapOrientation_Impl, weld::Button&, void);
+ DECL_LINK(SwapOrientation_Impl, weld::Toggleable&, 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);
+ DECL_LINK(CenterHdl_Impl, weld::Toggleable&, void);
void UpdateExample_Impl( bool bResetbackground = false );
DECL_LINK(PaperSizeSelect_Impl, weld::ComboBox&, void );
@@ -146,14 +151,14 @@ private:
void RangeHdl_Impl();
void CalcMargin_Impl();
- DECL_LINK(RegisterModify, weld::ToggleButton&, void);
+ DECL_LINK(RegisterModify, weld::Toggleable&, 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);
+ bool IsPrinterRangeOverflow(weld::MetricSpinButton& rField, tools::Long nFirstMargin,
+ tools::Long nLastMargin, MarginPosition nPos);
void CheckMarginEdits( bool _bClear );
bool IsMarginOutOfRange() const;
@@ -167,7 +172,7 @@ public:
virtual ~SvxPageDescPage() override;
// returns the range of the Which values
- static const sal_uInt16* GetRanges() { return pRanges; }
+ static WhichRangesContainer GetRanges() { return pRanges; }
virtual bool FillItemSet( SfxItemSet* rOutSet ) override;
virtual void Reset( const SfxItemSet* rSet ) override;
@@ -180,6 +185,4 @@ public:
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
index b57199d91551..b35111f43b33 100644
--- a/cui/source/inc/paragrph.hxx
+++ b/cui/source/inc/paragrph.hxx
@@ -16,8 +16,7 @@
* 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
+#pragma once
#include <sfx2/tabdlg.hxx>
#include <svx/relfld.hxx>
@@ -41,40 +40,39 @@ class SvxLineSpacingItem;
class SvxStdParagraphTabPage: public SfxTabPage
{
- static const sal_uInt16 pStdRanges[];
+ static const WhichRangesContainer pStdRanges;
private:
- long nWidth;
- long nMinFixDist;
+ tools::Long nWidth;
+ tools::Long nMinFixDist;
bool bRelativeMode;
- OUString sAbsDist;
SvxParaPrevWindow m_aExampleWin;
- // indention
- std::unique_ptr<SvxRelativeField> m_xLeftIndent;
+ // indentation
+ bool m_bSplitLRSpace = false; ///< which items to use?
+ SvxRelativeField m_aLeftIndent;
- std::unique_ptr<weld::Label> m_xRightLabel;
- std::unique_ptr<SvxRelativeField> m_xRightIndent;
+ SvxRelativeField m_aRightIndent;
std::unique_ptr<weld::Label> m_xFLineLabel;
- std::unique_ptr<SvxRelativeField> m_xFLineIndent;
+ SvxRelativeField m_aFLineIndent;
std::unique_ptr<weld::CheckButton> m_xAutoCB;
// distance
- std::unique_ptr<SvxRelativeField> m_xTopDist;
- std::unique_ptr<SvxRelativeField> m_xBottomDist;
+ SvxRelativeField m_aTopDist;
+ SvxRelativeField m_aBottomDist;
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::MetricSpinButton> m_xLineDistAtPlaceHolderBox;
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
@@ -88,7 +86,7 @@ private:
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);
+ DECL_LINK(AutoHdl_Impl, weld::Toggleable&, void);
bool m_bLineDistToggled = false;
@@ -104,7 +102,7 @@ public:
DECL_LINK(ELRLoseFocusHdl, weld::MetricSpinButton&, void);
- static const sal_uInt16* GetRanges() { return pStdRanges; }
+ static WhichRangesContainer GetRanges() { return pStdRanges; }
virtual bool FillItemSet( SfxItemSet* rSet ) override;
virtual void Reset( const SfxItemSet* rSet ) override;
@@ -114,7 +112,6 @@ public:
void EnableRegisterMode();
void EnableContextualMode();
void EnableAutoFirstLine();
- void EnableAbsLineDist(long nMinTwip);
void EnableNegativeMode();
virtual void PageCreated(const SfxAllItemSet& aSet) override;
};
@@ -123,7 +120,9 @@ public:
class SvxParaAlignTabPage : public SfxTabPage
{
- static const sal_uInt16 pAlignRanges[];
+ static const WhichRangesContainer pAlignRanges, pSdrAlignRanges;
+
+ bool m_bSdrVertAlign;
SvxParaPrevWindow m_aExampleWin;
@@ -146,11 +145,12 @@ class SvxParaAlignTabPage : public SfxTabPage
//vertical alignment
std::unique_ptr<weld::Widget> m_xVertAlignFL;
std::unique_ptr<weld::ComboBox> m_xVertAlignLB;
+ std::unique_ptr<weld::Label> m_xVertAlign;
+ std::unique_ptr<weld::Label> m_xVertAlignSdr;
- std::unique_ptr<weld::Widget> m_xPropertiesFL;
std::unique_ptr<svx::FrameDirectionListBox> m_xTextDirectionLB;
- DECL_LINK(AlignHdl_Impl, weld::ToggleButton&, void);
+ DECL_LINK(AlignHdl_Impl, weld::Toggleable&, void);
DECL_LINK(LastLineHdl_Impl, weld::ComboBox&, void);
DECL_LINK(TextDirectionHdl_Impl, weld::ComboBox&, void);
@@ -165,13 +165,15 @@ public:
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; }
+ static WhichRangesContainer GetRanges() { return pAlignRanges; }
+ static WhichRangesContainer GetSdrRanges() { return pSdrAlignRanges; }
virtual bool FillItemSet( SfxItemSet* rSet ) override;
virtual void Reset( const SfxItemSet* rSet ) override;
virtual void ChangesApplied() override;
void EnableJustifyExt();
+ void EnableSdrVertAlign();
virtual void PageCreated(const SfxAllItemSet& aSet) override;
};
@@ -191,7 +193,7 @@ public:
class SvxExtParagraphTabPage: public SfxTabPage
{
- static const sal_uInt16 pExtRanges[];
+ static const WhichRangesContainer pExtRanges;
public:
SvxExtParagraphTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
@@ -199,7 +201,7 @@ public:
const SfxItemSet* rSet );
virtual ~SvxExtParagraphTabPage() override;
- static const sal_uInt16* GetRanges() { return pExtRanges; }
+ static WhichRangesContainer GetRanges() { return pExtRanges; }
virtual bool FillItemSet( SfxItemSet* rSet ) override;
virtual void Reset( const SfxItemSet* rSet ) override;
@@ -215,10 +217,13 @@ private:
weld::TriStateEnabled aPageBreakState;
weld::TriStateEnabled aApplyCollState;
weld::TriStateEnabled aPageNumState;
- weld::TriStateEnabled aKeepTogetherState;
+ weld::TriStateEnabled aAllowSplitState;
weld::TriStateEnabled aKeepParaState;
weld::TriStateEnabled aOrphanState;
weld::TriStateEnabled aWidowState;
+ weld::TriStateEnabled aAcrossColumnState;
+ weld::TriStateEnabled aAcrossPageState;
+ weld::TriStateEnabled aAcrossSpreadState;
bool bPageBreak;
bool bHtmlMode;
@@ -227,12 +232,19 @@ private:
// hyphenation
std::unique_ptr<weld::CheckButton> m_xHyphenBox;
std::unique_ptr<weld::CheckButton> m_xHyphenNoCapsBox;
+ std::unique_ptr<weld::CheckButton> m_xHyphenNoLastWordBox;
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_xCompoundBeforeText;
+ std::unique_ptr<weld::SpinButton> m_xExtCompoundHyphenBeforeBox;
std::unique_ptr<weld::Label> m_xMaxHyphenLabel;
std::unique_ptr<weld::SpinButton> m_xMaxHyphenEdit;
+ std::unique_ptr<weld::Label> m_xMinWordLabel;
+ std::unique_ptr<weld::SpinButton> m_xMinWordLength;
+ std::unique_ptr<weld::Label> m_xHyphenZoneLabel;
+ SvxRelativeField m_aHyphenZone;
// pagebreak
std::unique_ptr<weld::CheckButton> m_xPageBreakBox;
@@ -246,7 +258,7 @@ private:
std::unique_ptr<weld::SpinButton> m_xPagenumEdit;
// paragraph division
- std::unique_ptr<weld::CheckButton> m_xKeepTogetherBox;
+ std::unique_ptr<weld::CheckButton> m_xAllowSplitBox;
std::unique_ptr<weld::CheckButton> m_xKeepParaBox;
// orphan/widow
@@ -258,24 +270,33 @@ private:
std::unique_ptr<weld::SpinButton> m_xWidowRowNo;
std::unique_ptr<weld::Label> m_xWidowRowLabel;
+ // avoid hyphenation across
+ std::unique_ptr<weld::Label> m_xAcrossText;
+ std::unique_ptr<weld::CheckButton> m_xAcrossColumnBox;
+ std::unique_ptr<weld::CheckButton> m_xAcrossPageBox;
+ std::unique_ptr<weld::CheckButton> m_xAcrossSpreadBox;
+
void HyphenClickHdl();
void PageNumBoxClickHdl();
void ApplyCollClickHdl();
void PageBreakHdl();
- void KeepTogetherHdl();
+ void AllowSplitHdl();
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(PageBreakHdl_Impl, weld::Toggleable&, void);
+ DECL_LINK(AllowSplitHdl_Impl, weld::Toggleable&, void);
+ DECL_LINK(WidowHdl_Impl, weld::Toggleable&, void);
+ DECL_LINK(OrphanHdl_Impl, weld::Toggleable&, void);
+ DECL_LINK(HyphenClickHdl_Impl, weld::Toggleable&, void);
+ DECL_LINK(ApplyCollClickHdl_Impl, weld::Toggleable&, 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);
+ DECL_LINK(PageNumBoxClickHdl_Impl, weld::Toggleable&, void);
+ DECL_LINK(KeepParaBoxClickHdl_Impl, weld::Toggleable&, void);
+ DECL_LINK(AcrossColumnHdl_Impl, weld::Toggleable&, void);
+ DECL_LINK(AcrossPageHdl_Impl, weld::Toggleable&, void);
+ DECL_LINK(AcrossSpreadHdl_Impl, weld::Toggleable&, void);
virtual void PageCreated(const SfxAllItemSet& aSet) override;
};
@@ -291,14 +312,12 @@ public:
static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet);
virtual ~SvxAsianTabPage() override;
- static const sal_uInt16* GetRanges();
+ static WhichRangesContainer 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
index 0f25fa27df18..1077195f7a85 100644
--- a/cui/source/inc/passwdomdlg.hxx
+++ b/cui/source/inc/passwdomdlg.hxx
@@ -16,8 +16,7 @@
* 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
+#pragma once
#include <sfx2/basedlgs.hxx>
#include <memory>
@@ -26,6 +25,7 @@ class PasswordToOpenModifyDialog : public SfxDialogController
{
std::unique_ptr<weld::Entry> m_xPasswdToOpenED;
std::unique_ptr<weld::Label> m_xPasswdToOpenInd;
+ std::unique_ptr<weld::LevelBar> m_xPasswdToOpenBar;
std::unique_ptr<weld::Entry> m_xReenterPasswdToOpenED;
std::unique_ptr<weld::Label> m_xReenterPasswdToOpenInd;
std::unique_ptr<weld::Expander> m_xOptionsExpander;
@@ -34,21 +34,25 @@ class PasswordToOpenModifyDialog : public SfxDialogController
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::LevelBar> m_xPasswdToModifyBar;
std::unique_ptr<weld::Label> m_xReenterPasswdToModifyFT;
std::unique_ptr<weld::Entry> m_xReenterPasswdToModifyED;
std::unique_ptr<weld::Label> m_xReenterPasswdToModifyInd;
+ std::shared_ptr<weld::MessageDialog> m_xErrorBox;
OUString m_aOneMismatch;
OUString m_aTwoMismatch;
OUString m_aInvalidStateForOkButton;
OUString m_aInvalidStateForOkButton_v2;
+ std::optional<OUString> m_oPasswordPolicy;
int m_nMaxPasswdLen;
bool m_bIsPasswordToModify;
+ bool m_bAllowEmpty;
DECL_LINK(OkBtnClickHdl, weld::Button&, void);
- DECL_LINK(ReadonlyOnOffHdl, weld::Button&, void);
+ DECL_LINK(ReadonlyOnOffHdl, weld::Toggleable&, void);
DECL_LINK(ChangeHdl, weld::Entry&, void);
PasswordToOpenModifyDialog( const PasswordToOpenModifyDialog & ) = delete;
@@ -58,13 +62,13 @@ public:
PasswordToOpenModifyDialog(weld::Window* pParent,
sal_uInt16 nMaxPasswdLen /* 0 -> no max len enforced */,
bool bIsPasswordToModify );
+ ~PasswordToOpenModifyDialog();
// AbstractPasswordToOpenModifyDialog
OUString GetPasswordToOpen() const;
OUString GetPasswordToModify() const;
bool IsRecommendToOpenReadonly() const;
+ void AllowEmpty();
};
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/pastedlg.hxx b/cui/source/inc/pastedlg.hxx
index a9a691b4f8f8..72f7911f2c77 100644
--- a/cui/source/inc/pastedlg.hxx
+++ b/cui/source/inc/pastedlg.hxx
@@ -17,8 +17,7 @@
* 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
+#pragma once
#include <map>
#include <sot/formats.hxx>
@@ -71,6 +70,4 @@ public:
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
index 62a3379b9289..66fd07af6255 100644
--- a/cui/source/inc/postdlg.hxx
+++ b/cui/source/inc/postdlg.hxx
@@ -16,8 +16,11 @@
* 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
+#pragma once
+
+#include <sal/config.h>
+
+#include <string_view>
#include <sfx2/basedlgs.hxx>
@@ -41,7 +44,7 @@ public:
bool bPrevNext);
virtual ~SvxPostItDialog() override;
- static const sal_uInt16* GetRanges();
+ static WhichRangesContainer GetRanges();
const SfxItemSet* GetOutputItemSet() const { return m_xOutSet.get(); }
void SetPrevHdl( const Link<SvxPostItDialog&,void>& rLink )
@@ -58,7 +61,7 @@ public:
{
m_xEditED->set_text(rTxt);
}
- void ShowLastAuthor(const OUString& rAuthor, const OUString& rDate);
+ void ShowLastAuthor(std::u16string_view rAuthor, std::u16string_view rDate);
void DontChangeAuthor()
{
m_xAuthorBtn->set_sensitive(false);
@@ -98,6 +101,4 @@ private:
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
index 94972219dc9f..1e41810a09aa 100644
--- a/cui/source/inc/screenshotannotationdlg.hxx
+++ b/cui/source/inc/screenshotannotationdlg.hxx
@@ -16,8 +16,7 @@
* 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
+#pragma once
#include <vcl/weld.hxx>
#include <memory>
@@ -27,16 +26,14 @@ class ScreenshotAnnotationDlg_Impl;
class ScreenshotAnnotationDlg : public weld::GenericDialogController
{
private:
- std::unique_ptr< ScreenshotAnnotationDlg_Impl > m_pImpl;
+ std::unique_ptr<ScreenshotAnnotationDlg_Impl> m_pImpl;
- ScreenshotAnnotationDlg(const ScreenshotAnnotationDlg &) = delete;
- ScreenshotAnnotationDlg& operator=(const ScreenshotAnnotationDlg &) = delete;
+ 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
index 8e66fed69a04..b1b014771dae 100644
--- a/cui/source/inc/scriptdlg.hxx
+++ b/cui/source/inc/scriptdlg.hxx
@@ -17,12 +17,10 @@
* 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
+#pragma once
#include <memory>
#include <sfx2/basedlgs.hxx>
-#include <vcl/abstdlg.hxx>
#include <vcl/weld.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
@@ -78,7 +76,7 @@ public:
class SvxScriptOrgDialog : public SfxDialogController
{
-protected:
+ weld::Window* m_pParent;
OUString m_sLanguage;
static Selection_hash m_lastSelection;
const OUString m_delErrStr;
@@ -108,24 +106,24 @@ protected:
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 createEntry(const weld::TreeIter& rEntry);
void renameEntry(const weld::TreeIter& rEntry);
- void deleteEntry(weld::TreeIter& rEntry);
+ void deleteEntry(const 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 Init(std::u16string_view language);
void delUserData(const weld::TreeIter& rIter);
- void deleteTree(weld::TreeIter& rIter);
+ void deleteTree(const 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);
+ std::u16string_view factoryURL, bool bSelect);
void insertEntry(OUString const & rText, OUString const & rBitmap,
const weld::TreeIter* pParent,
bool bChildrenOnDemand,
@@ -137,14 +135,14 @@ protected:
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 );
+ getLangNodeFromRootNode( css::uno::Reference< css::script::browse::XBrowseNode > const & root, std::u16string_view language );
- static css::uno::Reference< css::uno::XInterface > getDocumentModel( css::uno::Reference< css::uno::XComponentContext > const & xCtx, OUString const & docName );
+ static css::uno::Reference< css::uno::XInterface > getDocumentModel( css::uno::Reference< css::uno::XComponentContext > const & xCtx, std::u16string_view docName );
public:
// prob need another arg in the ctor
// to specify the language or provider
- SvxScriptOrgDialog(weld::Window* pParent, const OUString& language);
+ SvxScriptOrgDialog(weld::Window* pParent, OUString language);
virtual ~SvxScriptOrgDialog() override;
virtual short run() override;
@@ -165,6 +163,4 @@ public:
static void ShowAsyncErrorDialog( weld::Window* pParent, css::uno::Any const & aException );
};
-#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
index 50ab4b39ac70..46f34c0dae28 100644
--- a/cui/source/inc/sdrcelldlg.hxx
+++ b/cui/source/inc/sdrcelldlg.hxx
@@ -17,12 +17,12 @@
* 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
+#pragma once
#include <sfx2/tabdlg.hxx>
#include <svx/xtable.hxx>
+#include <svx/tabarea.hxx>
class SdrModel;
class SvxFormatCellsDialog : public SfxTabDialogController
@@ -31,19 +31,18 @@ private:
const SfxItemSet& mrOutAttrs;
XColorListRef mpColorTab;
+ ChangeType mnColorTabState;
XGradientListRef mpGradientList;
XHatchListRef mpHatchingList;
XBitmapListRef mpBitmapList;
XPatternListRef mpPatternList;
public:
- SvxFormatCellsDialog(weld::Window* pParent, const SfxItemSet* pAttr, const SdrModel& rModel);
+ SvxFormatCellsDialog(weld::Window* pParent, const SfxItemSet& rAttr, const SdrModel& rModel, bool bStyle);
- virtual void PageCreated(const OString& rId, SfxTabPage &rPage) override;
+ virtual void PageCreated(const OUString& rId, SfxTabPage &rPage) override;
};
-#endif // INCLUDED_CUI_SOURCE_INC_SDRCELLDLG_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/securityoptions.hxx b/cui/source/inc/securityoptions.hxx
new file mode 100644
index 000000000000..a86b4f0c605a
--- /dev/null
+++ b/cui/source/inc/securityoptions.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 .
+ */
+#pragma once
+
+#include <vcl/weld.hxx>
+
+namespace svx
+{
+ class SecurityOptionsDialog : public weld::GenericDialogController
+ {
+ private:
+ std::unique_ptr<weld::CheckButton> m_xSaveOrSendDocsCB;
+ std::unique_ptr<weld::Widget> m_xSaveOrSendDocsImg;
+ std::unique_ptr<weld::CheckButton> m_xSignDocsCB;
+ std::unique_ptr<weld::Widget> m_xSignDocsImg;
+ std::unique_ptr<weld::CheckButton> m_xPrintDocsCB;
+ std::unique_ptr<weld::Widget> m_xPrintDocsImg;
+ std::unique_ptr<weld::CheckButton> m_xCreatePdfCB;
+ std::unique_ptr<weld::Widget> m_xCreatePdfImg;
+
+ std::unique_ptr<weld::CheckButton> m_xRemovePersInfoCB;
+ std::unique_ptr<weld::Widget> m_xRemovePersInfoImg;
+ std::unique_ptr<weld::CheckButton> m_xRecommPasswdCB;
+ std::unique_ptr<weld::Widget> m_xRecommPasswdImg;
+ std::unique_ptr<weld::CheckButton> m_xCtrlHyperlinkCB;
+ std::unique_ptr<weld::Widget> m_xCtrlHyperlinkImg;
+ std::unique_ptr<weld::CheckButton> m_xBlockUntrustedRefererLinksCB;
+ std::unique_ptr<weld::Widget> m_xBlockUntrustedRefererLinksImg;
+ std::unique_ptr<weld::CheckButton> m_xDisableActiveContentCB;
+ std::unique_ptr<weld::Widget> m_xDisableActiveContentImg;
+
+ std::unique_ptr<weld::CheckButton> m_xRedlineinfoCB;
+ std::unique_ptr<weld::Widget> m_xRedlineinfoImg;
+ std::unique_ptr<weld::CheckButton> m_xDocPropertiesCB;
+ std::unique_ptr<weld::Widget> m_xDocPropertiesImg;
+ std::unique_ptr<weld::CheckButton> m_xNoteAuthorCB;
+ std::unique_ptr<weld::Widget> m_xNoteAuthorImg;
+ std::unique_ptr<weld::CheckButton> m_xDocumentVersionCB;
+ std::unique_ptr<weld::Widget> m_xDocumentVersionImg;
+ std::unique_ptr<weld::CheckButton> m_xPrinterSettingsCB;
+ std::unique_ptr<weld::Widget> m_xPrinterSettingsImg;
+
+ public:
+ SecurityOptionsDialog(weld::Window* pParent);
+
+ void init();
+
+ bool IsSaveOrSendDocsChecked() const { return m_xSaveOrSendDocsCB->get_active(); }
+ bool IsSignDocsChecked() const { return m_xSignDocsCB->get_active(); }
+ bool IsPrintDocsChecked() const { return m_xPrintDocsCB->get_active(); }
+ bool IsCreatePdfChecked() const { return m_xCreatePdfCB->get_active(); }
+ bool IsRemovePersInfoChecked() const { return m_xRemovePersInfoCB->get_active(); }
+ bool IsRemoveRedlineInfoChecked() const { return m_xRedlineinfoCB->get_active(); }
+ bool IsRemoveDocUserInfoChecked() const { return m_xDocPropertiesCB->get_active(); }
+ bool IsRemoveNoteAuthorInfoChecked() const { return m_xNoteAuthorCB->get_active(); }
+ bool IsRemoveDocVersionInfoChecked() const { return m_xDocumentVersionCB->get_active(); }
+ bool IsKeepPrinterSettingsChecked() const { return m_xPrinterSettingsCB->get_active(); }
+ bool IsRecommPasswdChecked() const { return m_xRecommPasswdCB->get_active(); }
+ bool IsCtrlHyperlinkChecked() const { return m_xCtrlHyperlinkCB->get_active(); }
+ bool IsBlockUntrustedRefererLinksChecked() const { return m_xBlockUntrustedRefererLinksCB->get_active(); }
+ bool IsDisableActiveContentChecked() const { return m_xDisableActiveContentCB->get_active(); }
+
+ DECL_LINK(ShowPersonalInfosToggle, weld::Toggleable&, void);
+
+ bool SetSecurityOptions();
+ void changeKeepSecurityInfosEnabled();
+ };
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/showcols.hxx b/cui/source/inc/showcols.hxx
index 3b15abfd33bb..e378c5e197ec 100644
--- a/cui/source/inc/showcols.hxx
+++ b/cui/source/inc/showcols.hxx
@@ -17,8 +17,7 @@
* 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
+#pragma once
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/container/XIndexContainer.hpp>
@@ -43,6 +42,4 @@ 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
index b0c2fddae3c7..ce14e0714a3e 100644
--- a/cui/source/inc/splitcelldlg.hxx
+++ b/cui/source/inc/splitcelldlg.hxx
@@ -16,13 +16,12 @@
* 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
+#pragma once
#include <svx/svxdlg.hxx>
#include <vcl/weld.hxx>
-class SvxSplitTableDlg : public SvxAbstractSplitTableDialog, public weld::GenericDialogController
+class SvxSplitTableDlg : public weld::GenericDialogController
{
private:
std::unique_ptr<weld::SpinButton> m_xCountEdit;
@@ -30,22 +29,36 @@ private:
std::unique_ptr<weld::RadioButton> m_xVertBox;
std::unique_ptr<weld::CheckButton> m_xPropCB;
- long mnMaxVertical;
- long mnMaxHorizontal;
+ tools::Long mnMaxVertical;
+ tools::Long mnMaxHorizontal;
public:
- SvxSplitTableDlg(weld::Window *pParent, bool bIsTableVertical, long nMaxVertical, long nMaxHorizontal);
+ SvxSplitTableDlg(weld::Window *pParent, bool bIsTableVertical, tools::Long nMaxVertical, tools::Long nMaxHorizontal);
- DECL_LINK(ClickHdl, weld::Button&, void);
+ DECL_LINK(ToggleHdl, weld::Toggleable&, void);
+
+ bool IsHorizontal() const;
+ bool IsProportional() const;
+ tools::Long GetCount() const;
+
+ void SetSplitVerticalByDefault();
+};
+
+class SvxAbstractSplitTableDialog_Impl : public SvxAbstractSplitTableDialog
+{
+ std::shared_ptr<SvxSplitTableDlg> m_xDlg;
+
+public:
+ SvxAbstractSplitTableDialog_Impl(std::shared_ptr<SvxSplitTableDlg> pDlg) : m_xDlg(std::move(pDlg)) {}
virtual bool IsHorizontal() const override;
virtual bool IsProportional() const override;
- virtual long GetCount() const override;
+ virtual tools::Long GetCount() const override;
- virtual short Execute() override;
virtual void SetSplitVerticalByDefault() override;
-};
-#endif
+ virtual short Execute() override;
+ virtual bool StartExecuteAsync(AsyncContext& rContext) override;
+};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/srchxtra.hxx b/cui/source/inc/srchxtra.hxx
index 5513ae236a46..712abc8b55bc 100644
--- a/cui/source/inc/srchxtra.hxx
+++ b/cui/source/inc/srchxtra.hxx
@@ -16,8 +16,7 @@
* 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
+#pragma once
#include <sfx2/tabdlg.hxx>
#include <svtools/ctrltool.hxx>
@@ -31,7 +30,7 @@ public:
virtual ~SvxSearchFormatDialog() override;
protected:
- virtual void PageCreated(const OString& rId, SfxTabPage &rPage) override;
+ virtual void PageCreated(const OUString& rId, SfxTabPage &rPage) override;
private:
std::unique_ptr<FontList> m_pFontList;
@@ -43,7 +42,7 @@ class SvxSearchAttributeDialog : public weld::GenericDialogController
{
public:
SvxSearchAttributeDialog(weld::Window* pParent, SearchAttrItemList& rLst,
- const sal_uInt16* pWhRanges);
+ const WhichRangesContainer& pWhRanges);
virtual ~SvxSearchAttributeDialog() override;
private:
@@ -79,6 +78,4 @@ public:
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
index 1fe926566073..2e5a15fbebbb 100644
--- a/cui/source/inc/swpossizetabpage.hxx
+++ b/cui/source/inc/swpossizetabpage.hxx
@@ -16,12 +16,12 @@
* 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
+#pragma once
#include <sfx2/tabdlg.hxx>
#include <svx/swframeexample.hxx>
#include <vcl/weld.hxx>
+#include <svx/dlgutil.hxx>
// SvxSwPosSizeTabPage - position and size page for Writer drawing objects
struct FrmMap;
@@ -56,10 +56,15 @@ class SvxSwPosSizeTabPage : public SfxTabPage
TriState m_nProtectSizeState;
SwFrameExample m_aExampleWN;
+ SvxRatioConnector m_aRatioTop;
+ SvxRatioConnector m_aRatioBottom;
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::Image> m_xCbxScaleImg;
+ std::unique_ptr<weld::CustomWeld> m_xImgRatioTop;
+ std::unique_ptr<weld::CustomWeld> m_xImgRatioBottom;
std::unique_ptr<weld::RadioButton> m_xToPageRB;
std::unique_ptr<weld::RadioButton> m_xToParaRB;
std::unique_ptr<weld::RadioButton> m_xToCharRB;
@@ -85,17 +90,18 @@ class SvxSwPosSizeTabPage : public SfxTabPage
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(RangeModifyClickHdl, weld::Toggleable&, void);
+ DECL_LINK(AnchorTypeHdl, weld::Toggleable&, void);
DECL_LINK(PosHdl, weld::ComboBox&, void);
DECL_LINK(RelHdl, weld::ComboBox&, void);
- DECL_LINK(MirrorHdl, weld::ToggleButton&, void);
+ DECL_LINK(MirrorHdl, weld::Toggleable&, void);
DECL_LINK(ModifyHdl, weld::MetricSpinButton&, void);
- DECL_LINK(ProtectHdl, weld::ToggleButton&, void);
+ DECL_LINK(ProtectHdl, weld::Toggleable&, void);
+ DECL_LINK(RatioHdl_Impl, weld::Toggleable&, void);
void InitPos(RndStdIds nAnchorType, sal_uInt16 nH, sal_uInt16 nHRel,
sal_uInt16 nV, sal_uInt16 nVRel,
- long nX, long nY);
+ tools::Long nX, tools::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);
@@ -113,7 +119,7 @@ public:
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
virtual ~SvxSwPosSizeTabPage() override;
- static const sal_uInt16* GetRanges();
+ static WhichRangesContainer GetRanges();
virtual bool FillItemSet( SfxItemSet* ) override;
virtual void Reset( const SfxItemSet * ) override;
@@ -128,6 +134,4 @@ public:
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
index 6c9e63b109b8..207b8b70503d 100644
--- a/cui/source/inc/tabstpge.hxx
+++ b/cui/source/inc/tabstpge.hxx
@@ -16,8 +16,7 @@
* 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
+#pragma once
#include <vcl/customweld.hxx>
#include <vcl/weld.hxx>
@@ -59,14 +58,14 @@ public:
class SvxTabulatorTabPage : public SfxTabPage
{
- static const sal_uInt16 pRanges[];
+ static const WhichRangesContainer 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; }
+ static WhichRangesContainer GetRanges() { return pRanges; }
virtual bool FillItemSet( SfxItemSet* rSet ) override;
virtual void Reset( const SfxItemSet* rSet ) override;
@@ -80,7 +79,7 @@ private:
// local variables, internal functions
SvxTabStop aCurrentTab;
std::unique_ptr<SvxTabStopItem> aNewTabs;
- long nDefDist;
+ tools::Long nDefDist;
TabWin_Impl m_aLeftWin;
TabWin_Impl m_aRightWin;
@@ -130,8 +129,8 @@ private:
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(FillTypeCheckHdl_Impl, weld::Toggleable&, void);
+ DECL_LINK(TabTypeCheckHdl_Impl, weld::Toggleable&, void);
DECL_LINK(SelectHdl_Impl, weld::TreeView&, bool);
DECL_LINK(ModifyHdl_Impl, weld::ComboBox&, void);
@@ -144,6 +143,4 @@ private:
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
index 3ae2452b0c0f..010d3954716c 100644
--- a/cui/source/inc/textanim.hxx
+++ b/cui/source/inc/textanim.hxx
@@ -16,8 +16,7 @@
* 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
+#pragma once
#include <sfx2/tabdlg.hxx>
#include <svx/sdtakitm.hxx>
@@ -35,7 +34,7 @@ class SdrView;
class SvxTextAnimationPage : public SfxTabPage
{
private:
- static const sal_uInt16 pRanges[];
+ static const WhichRangesContainer pRanges;
SdrTextAniKind eAniKind;
FieldUnit eFUnit;
@@ -68,9 +67,9 @@ private:
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( ClickEndlessHdl_Impl, weld::Toggleable&, void );
+ DECL_LINK( ClickAutoHdl_Impl, weld::Toggleable&, void );
+ DECL_LINK( ClickPixelHdl_Impl, weld::Toggleable&, void );
DECL_LINK( ClickDirectionHdl_Impl, weld::Button&, void );
void SelectDirection( SdrTextAniDirection nValue );
@@ -81,7 +80,7 @@ public:
virtual ~SvxTextAnimationPage() override;
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
- static const sal_uInt16* GetRanges() { return pRanges; }
+ static WhichRangesContainer GetRanges() { return pRanges; }
virtual bool FillItemSet( SfxItemSet* ) override;
virtual void Reset( const SfxItemSet * ) override;
@@ -97,12 +96,10 @@ class SvxTextTabDialog : public SfxTabDialogController
private:
const SdrView* pView;
- virtual void PageCreated(const OString& rId, SfxTabPage &rPage) override;
+ virtual void PageCreated(const OUString& 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
index 392794de9543..a6a7f2bd6f46 100644
--- a/cui/source/inc/textattr.hxx
+++ b/cui/source/inc/textattr.hxx
@@ -16,11 +16,10 @@
* 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
+#pragma once
#include <svx/dlgctrl.hxx>
-#include <svx/svdobj.hxx>
+#include <svx/svdobjkind.hxx>
class SdrView;
@@ -33,7 +32,7 @@ class SdrView;
class SvxTextAttrPage : public SvxTabPage
{
private:
- static const sal_uInt16 pRanges[];
+ static const WhichRangesContainer pRanges;
const SfxItemSet& rOutAttrs;
SdrObjKind m_eObjKind;
@@ -64,8 +63,8 @@ private:
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);
+ DECL_LINK(ClickFullWidthHdl_Impl, weld::Toggleable&, void);
+ DECL_LINK(ClickHdl_Impl, weld::Toggleable&, void);
/** Return whether the text direction is from left to right (</sal_True>) or
top to bottom (</sal_False>).
@@ -78,7 +77,7 @@ public:
virtual ~SvxTextAttrPage() override;
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
- static const sal_uInt16* GetRanges() { return pRanges; }
+ static WhichRangesContainer GetRanges() { return pRanges; }
virtual bool FillItemSet( SfxItemSet* ) override;
virtual void Reset( const SfxItemSet * ) override;
@@ -90,6 +89,4 @@ public:
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
index 65c4050cc4d3..05865d68d92f 100644
--- a/cui/source/inc/thesdlg.hxx
+++ b/cui/source/inc/thesdlg.hxx
@@ -16,8 +16,7 @@
* 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
+#pragma once
#include <com/sun/star/linguistic2/XThesaurus.hpp>
@@ -27,6 +26,8 @@
#include <memory>
#include <stack>
+struct ImplSVEvent;
+
class SvxThesaurusDialog : public SfxDialogController
{
Idle m_aModifyIdle;
@@ -44,6 +45,7 @@ class SvxThesaurusDialog : public SfxDialogController
std::unique_ptr<weld::Entry> m_xReplaceEdit;
std::unique_ptr<weld::ComboBox> m_xLangLB;
std::unique_ptr<weld::Button> m_xReplaceBtn;
+ ImplSVEvent* m_nSelectFirstEvent;
public:
virtual ~SvxThesaurusDialog() override;
@@ -70,13 +72,11 @@ public:
void LookUp_Impl();
public:
- SvxThesaurusDialog(weld::Window* pParent,
+ SvxThesaurusDialog(weld::Widget* 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
index 425805af6fad..1f86d1bf238c 100644
--- a/cui/source/inc/tipofthedaydlg.hxx
+++ b/cui/source/inc/tipofthedaydlg.hxx
@@ -16,24 +16,26 @@
* 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
+#pragma once
#include <vcl/weld.hxx>
+#include "cuigrfflt.hxx"
+
+class VclWindowEvent;
class TipOfTheDayDialog : public weld::GenericDialogController
{
private:
- std::unique_ptr<weld::Image> m_pImage;
+ CuiGraphicPreviewWindow m_aPreview;
+ css::uno::Reference<css::awt::XWindow> m_xParent;
+
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;
+ std::unique_ptr<weld::CustomWeld> m_pPreview;
- sal_Int32 nCurrentTip;
- sal_Int32 nNumberOfTips;
- sal_Int32 nDay;
- OUString aLink;
+ sal_Int32 m_nCurrentTip;
void UpdateTip();
DECL_LINK(OnNextClick, weld::Button&, void);
DECL_LINK(OnLinkClick, weld::LinkButton&, bool);
@@ -41,8 +43,8 @@ private:
public:
TipOfTheDayDialog(weld::Window* pWindow);
virtual ~TipOfTheDayDialog() override;
-};
-#endif // INCLUDED_CUI_SOURCE_INC_TIPOFTHEDAYDLG_HXX
+ DECL_LINK(Terminated, VclWindowEvent&, void);
+};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/toolbarmodedlg.hxx b/cui/source/inc/toolbarmodedlg.hxx
new file mode 100644
index 000000000000..5965aa7598d6
--- /dev/null
+++ b/cui/source/inc/toolbarmodedlg.hxx
@@ -0,0 +1,37 @@
+/* -*- 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/.
+ */
+
+#pragma once
+
+#include <sal/config.h>
+
+#include <string_view>
+
+#include <vcl/weld.hxx>
+
+class ToolbarmodeDialog : public weld::GenericDialogController
+{
+public:
+ ToolbarmodeDialog(weld::Window* pWindow);
+ virtual ~ToolbarmodeDialog() override;
+
+private:
+ std::unique_ptr<weld::Image> m_pImage;
+ std::unique_ptr<weld::Button> m_pApply;
+ std::unique_ptr<weld::Button> m_pApplyAll;
+ std::unique_ptr<weld::RadioButton> m_pRadioButtons[9];
+ std::unique_ptr<weld::Label> m_pInfoLabel;
+
+ void UpdateImage(std::u16string_view sFileName);
+ int GetActiveRadioButton();
+ DECL_LINK(SelectToolbarmode, weld::Toggleable&, void);
+ DECL_LINK(OnApplyClick, weld::Button&, void);
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/cui/source/inc/transfrm.hxx b/cui/source/inc/transfrm.hxx
index 2c27a19fb69b..78ffd84e2794 100644
--- a/cui/source/inc/transfrm.hxx
+++ b/cui/source/inc/transfrm.hxx
@@ -16,10 +16,10 @@
* 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
+#pragma once
#include <svx/dlgctrl.hxx>
+#include <svx/dlgutil.hxx>
#include <svx/dialcontrol.hxx>
#include <svx/anchorid.hxx>
#include <basegfx/range/b2drange.hxx>
@@ -42,7 +42,7 @@ private:
SvxAnchorIds nAnchorCtrls;
Link<SvxSwFrameValidation&,void> aValidateLink;
- virtual void PageCreated(const OString& rId, SfxTabPage &rPage) override;
+ virtual void PageCreated(const OUString& rId, SfxTabPage &rPage) override;
public:
SvxTransformTabDialog(weld::Window* pParent, const SfxItemSet* pAttr,
@@ -61,7 +61,7 @@ public:
class SvxPositionSizeTabPage : public SvxTabPage
{
- static const sal_uInt16 pPosSizeRanges[];
+ static const WhichRangesContainer pPosSizeRanges;
private:
const SfxItemSet& mrOutAttrs;
@@ -92,6 +92,9 @@ private:
SvxRectCtl m_aCtlPos;
SvxRectCtl m_aCtlSize;
+ SvxRatioConnector m_aRatioTop;
+ SvxRatioConnector m_aRatioBottom;
+
// position
std::unique_ptr<weld::Widget> m_xFlPosition;
std::unique_ptr<weld::MetricSpinButton> m_xMtrPosX;
@@ -105,6 +108,9 @@ private:
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::Image> m_xCbxScaleImg;
+ std::unique_ptr<weld::CustomWeld> m_xImgRatioTop;
+ std::unique_ptr<weld::CustomWeld> m_xImgRatioBottom;
std::unique_ptr<weld::CustomWeld> m_xCtlSize;
// protect
@@ -117,23 +123,23 @@ private:
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);
+ DECL_LINK(ChangePosProtectHdl, weld::Toggleable&, void);
+ DECL_LINK(ChangeSizeProtectHdl, weld::Toggleable&, 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 );
+ DECL_LINK( ClickSizeProtectHdl, weld::Toggleable&, void );
+ DECL_LINK( ClickAutoHdl, weld::Toggleable&, 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; }
+ static WhichRangesContainer GetRanges() { return pPosSizeRanges; }
virtual bool FillItemSet( SfxItemSet* ) override;
virtual void Reset( const SfxItemSet * ) override;
@@ -161,7 +167,7 @@ public:
\************************************************************************/
class SvxAngleTabPage : public SvxTabPage
{
- static const sal_uInt16 pAngleRanges[];
+ static const WhichRangesContainer pAngleRanges;
private:
const SdrView* pView;
@@ -189,7 +195,7 @@ public:
virtual ~SvxAngleTabPage() override;
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
- static const sal_uInt16* GetRanges() { return pAngleRanges; }
+ static WhichRangesContainer GetRanges() { return pAngleRanges; }
virtual bool FillItemSet( SfxItemSet* ) override;
virtual void Reset( const SfxItemSet * ) override;
@@ -210,7 +216,7 @@ public:
\************************************************************************/
class SvxSlantTabPage : public SfxTabPage
{
- static const sal_uInt16 pSlantRanges[];
+ static const WhichRangesContainer pSlantRanges;
private:
const SdrView* pView;
@@ -233,7 +239,7 @@ public:
virtual ~SvxSlantTabPage() override;
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
- static const sal_uInt16* GetRanges() { return pSlantRanges; }
+ static WhichRangesContainer GetRanges() { return pSlantRanges; }
virtual bool FillItemSet( SfxItemSet* ) override;
virtual void Reset( const SfxItemSet * ) override;
@@ -246,6 +252,4 @@ public:
};
-#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
index c2aac20ee6f6..6d07d0981d5a 100644
--- a/cui/source/inc/treeopt.hxx
+++ b/cui/source/inc/treeopt.hxx
@@ -17,8 +17,7 @@
* 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
+#pragma once
#include <sal/config.h>
@@ -26,6 +25,9 @@
#include <sfx2/basedlgs.hxx>
#include <svtools/restartdialog.hxx>
+#include <utility>
+#include <i18nutil/searchopt.hxx>
+#include <vcl/timer.hxx>
class SfxModule;
class SfxShell;
@@ -37,8 +39,8 @@ struct OrderedEntry
sal_Int32 m_nIndex;
OUString m_sId;
- OrderedEntry( sal_Int32 nIndex, const OUString& rId ) :
- m_nIndex( nIndex ), m_sId( rId ) {}
+ OrderedEntry( sal_Int32 nIndex, OUString aId ) :
+ m_nIndex( nIndex ), m_sId(std::move( aId )) {}
};
@@ -62,15 +64,15 @@ struct OptionsLeaf
OUString m_sGroupId;
sal_Int32 m_nGroupIndex;
- OptionsLeaf( const OUString& rLabel,
- const OUString& rPageURL,
- const OUString& rEventHdl,
- const OUString& rGroupId,
+ OptionsLeaf( OUString aLabel,
+ OUString aPageURL,
+ OUString aEventHdl,
+ OUString aGroupId,
sal_Int32 nGroupIndex ) :
- m_sLabel( rLabel ),
- m_sPageURL( rPageURL ),
- m_sEventHdl( rEventHdl ),
- m_sGroupId( rGroupId ),
+ m_sLabel(std::move( aLabel )),
+ m_sPageURL(std::move( aPageURL )),
+ m_sEventHdl(std::move( aEventHdl )),
+ m_sGroupId(std::move( aGroupId )),
m_nGroupIndex( nGroupIndex ) {}
};
@@ -85,11 +87,11 @@ struct OptionsNode
std::vector< std::vector< std::unique_ptr<OptionsLeaf> > >
m_aGroupedLeaves;
- OptionsNode( const OUString& rId,
- const OUString& rLabel,
+ OptionsNode( OUString aId,
+ OUString aLabel,
bool bAllModules ) :
- m_sId( rId ),
- m_sLabel( rLabel ),
+ m_sId(std::move( aId )),
+ m_sLabel(std::move( aLabel )),
m_bAllModules( bAllModules ) {}
};
@@ -113,6 +115,8 @@ struct OptionsPageInfo;
struct Module;
class ExtensionsTabPage;
class SvxColorTabPage;
+struct OptionsGroupInfo;
+struct OptionsPageIdInfo;
class OfaTreeOptionsDialog final: public SfxOkDialogController
{
@@ -123,11 +127,38 @@ private:
std::unique_ptr<weld::TreeView> xTreeLB;
std::unique_ptr<weld::Container> xTabBox;
+ std::unique_ptr<weld::Entry> m_xSearchEdit;
weld::Window* m_pParent;
std::unique_ptr<weld::TreeIter> xCurrentPageEntry;
+ // For search
+ Timer m_aUpdateDataTimer;
+ i18nutil::SearchOptions2 m_options;
+
+ bool bIsFirtsInitialize;
+ std::vector<OptionsPageIdInfo*> m_aTreePageIds;
+ typedef std::vector<std::pair<sal_uInt16, std::vector<sal_uInt16>>> VectorOfMatchedIds;
+
+ void generalOptions(const std::vector<sal_uInt16>& vPageId = {}); // SID_GENERAL_OPTIONS
+ void loadAndSaveOptions(const std::vector<sal_uInt16>& vPageId = {}); // SID_FILTER_DLG
+ void languageOptions(const std::vector<sal_uInt16>& vPageId = {}); // SID_LANGUAGE_OPTIONS
+ void writerOptions(const std::vector<sal_uInt16>& vPageId = {}); // SID_SW_EDITOPTIONS
+ void writerWebOptions(const std::vector<sal_uInt16>& vPageId = {}); // SID_SW_ONLINEOPTIONS
+ void calcOptions(const std::vector<sal_uInt16>& vPageId = {}); // SID_SC_EDITOPTIONS
+ void impressOptions(const std::vector<sal_uInt16>& vPageId = {}); // SID_SD_EDITOPTIONS
+ void drawOptions(const std::vector<sal_uInt16>& vPageId = {}); // SID_SD_GRAPHIC_OPTIONS
+ void mathOptions(const std::vector<sal_uInt16>& vPageId = {}); // SID_SM_EDITOPTIONS
+ void databaseOptions(const std::vector<sal_uInt16>& vPageId = {}); // SID_SB_STARBASEOPTIONS
+ void chartOptions(const std::vector<sal_uInt16>& vPageId = {}); // SID_SCH_EDITOPTIONS
+ void internetOptions(const std::vector<sal_uInt16>& vPageId = {}); // SID_INET_DLG
+
+ void clearOptionsDialog();
+ void selectFirstEntry();
+ void storeOptionsTree();
+ void showDialog(VectorOfMatchedIds& pSearchIds);
+
OUString sTitle;
bool bForgetSelection;
@@ -141,41 +172,54 @@ private:
css::uno::Reference < css::awt::XContainerWindowProvider >
m_xContainerWinProvider;
+ css::uno::Reference<css::frame::XFrame> m_xFrame;
static LastPageSaver* pLastPageSaver;
- std::unique_ptr<SfxItemSet> CreateItemSet( sal_uInt16 nId );
+ std::optional<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 );
+ void LoadExtensionOptions( std::u16string_view 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 );
+ static std::unique_ptr<Module> LoadModule( std::u16string_view rModuleIdentifier );
+ static VectorOfNodes LoadNodes( Module* pModule, std::u16string_view rExtensionId );
void InsertNodes( const VectorOfNodes& rNodeList );
- void ApplyOptions( bool deactivate );
+ void ApplyOptions();
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);
+ DECL_LINK(SearchUpdateHdl, weld::Entry&, void);
+ DECL_LINK(ImplUpdateDataHdl, Timer*, void);
+ DECL_LINK(FocusOut_Impl, weld::Widget&, void);
+ void ResetCurrentPageFromConfig();
void SelectHdl_Impl();
+ void initializeCurrentDialog(OptionsPageInfo*& pPageInfo,
+ std::unique_ptr<weld::TreeIter>& xEntry);
+
+ void InitItemSets(OptionsGroupInfo& rGroupInfo);
virtual short run() override;
virtual weld::Button& GetOKButton() const override { return *xOkPB; }
virtual const SfxItemSet* GetExampleSet() const override { return nullptr; }
+ int applySearchFilter(const OUString& rSearchTerm);
+
+ void ImplDestroy();
+
+ // Common initialization
+ OfaTreeOptionsDialog(weld::Window* pParent, bool fromExtensionManager);
+
public:
OfaTreeOptionsDialog(weld::Window* pParent,
const css::uno::Reference< css::frame::XFrame >& _xFrame,
bool bActivateLastSelection);
- OfaTreeOptionsDialog(weld::Window* pParent, const OUString& rExtensionId);
+ OfaTreeOptionsDialog(weld::Window* pParent, std::u16string_view rExtensionId);
virtual ~OfaTreeOptionsDialog() override;
OptionsPageInfo* AddTabPage( sal_uInt16 nId, const OUString& rPageName, sal_uInt16 nGroup );
@@ -187,8 +231,12 @@ public:
void ActivatePage( const OUString& rPageURL );
void ApplyItemSets();
- // helper functions to call the language settings TabPage from the SpellDialog
+ // default value initializes all dialogs
+ void initializeFirstNDialog(sal_Int16 nNumberOfNode = -1);
+
+ // helper functions to call the Languages and Locales TabPage from the SpellDialog
static void ApplyLanguageOptions(const SfxItemSet& rSet);
+ static OUString getCurrentFactory_Impl( const css::uno::Reference< css::frame::XFrame >& _xFrame );
void SetNeedsRestart( svtools::RestartReason eReason );
};
@@ -217,7 +265,7 @@ private:
public:
ExtensionsTabPage(
weld::Container* pParent,
- const OUString& rPageURL, const OUString& rEvtHdl,
+ OUString rPageURL, OUString aEvtHdl,
const css::uno::Reference<
css::awt::XContainerWindowProvider >& rProvider );
@@ -233,6 +281,13 @@ public:
void SavePage();
};
-#endif
+// class TreeOptHelper ---------------------------------------------------
+
+class TreeOptHelper
+{
+public:
+ static void storeStringsOfDialog(sal_uInt16 nPageId, const OUString& sPageStrings);
+ static OUString getStringsFromDialog(sal_uInt16 nPageId);
+};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/whatsnew.hxx b/cui/source/inc/whatsnew.hxx
new file mode 100644
index 000000000000..979fff919df2
--- /dev/null
+++ b/cui/source/inc/whatsnew.hxx
@@ -0,0 +1,79 @@
+/* -*- 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/.
+ */
+
+#pragma once
+
+#include <vcl/customweld.hxx>
+#include <vcl/weld.hxx>
+#include "cuigrfflt.hxx"
+
+class WhatsNewImg : public weld::CustomWidgetController
+{
+ OUString m_sImage;
+ OUString m_sText;
+ virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) override;
+
+public:
+ WhatsNewImg() {}
+ void Update(const OUString& sImage, const OUString& sText)
+ {
+ m_sImage = sImage;
+ m_sText = sText;
+ SetAccessibleName(m_sText);
+ Invalidate();
+ }
+};
+
+class WhatsNewProgress : public weld::CustomWidgetController
+{
+ sal_Int32 m_nTotal;
+ sal_Int32 m_nCurrent;
+ virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) override;
+
+public:
+ WhatsNewProgress()
+ : m_nTotal(0)
+ , m_nCurrent(0)
+ {
+ }
+ void Update(const sal_Int32 nCurrent, const sal_Int32 nTotal)
+ {
+ m_nTotal = nTotal;
+ m_nCurrent = nCurrent;
+ Invalidate();
+ }
+};
+
+class WhatsNewDialog : public weld::GenericDialogController
+{
+private:
+ const bool m_bWelcome;
+
+ WhatsNewImg m_aPreview;
+ WhatsNewProgress m_aProgress;
+
+ std::unique_ptr<weld::Button> m_pPrevBtn;
+ std::unique_ptr<weld::Button> m_pNextBtn;
+ std::unique_ptr<weld::CustomWeld> m_pProgress;
+ std::unique_ptr<weld::CustomWeld> m_pImage;
+
+ DECL_LINK(OnPrevClick, weld::Button&, void);
+ DECL_LINK(OnNextClick, weld::Button&, void);
+
+ void LoadImage(); // loads WHATSNEW_STRINGARRAY[m_nCurrentNews]
+
+ sal_Int32 m_nNumberOfNews;
+ sal_Int32 m_nCurrentNews;
+
+public:
+ WhatsNewDialog(weld::Window* pParent, const bool bWelcome);
+ virtual ~WhatsNewDialog() override;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/cui/source/inc/zoom.hxx b/cui/source/inc/zoom.hxx
index f35a7bfba16a..f44998378d73 100644
--- a/cui/source/inc/zoom.hxx
+++ b/cui/source/inc/zoom.hxx
@@ -16,8 +16,7 @@
* 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
+#pragma once
#include <memory>
#include <sfx2/basedlgs.hxx>
@@ -46,11 +45,11 @@ private:
std::unique_ptr<weld::CheckButton> m_xBookModeChk;
std::unique_ptr<weld::Button> m_xOKBtn;
- DECL_LINK(UserHdl, weld::ToggleButton&, void);
+ DECL_LINK(UserHdl, weld::Toggleable&, void);
DECL_LINK(SpinHdl, weld::MetricSpinButton&, void);
- DECL_LINK(ViewLayoutUserHdl, weld::ToggleButton&, void);
+ DECL_LINK(ViewLayoutUserHdl, weld::Toggleable&, void);
DECL_LINK(ViewLayoutSpinHdl, weld::SpinButton&, void);
- DECL_LINK(ViewLayoutCheckHdl, weld::ToggleButton&, void);
+ DECL_LINK(ViewLayoutCheckHdl, weld::Toggleable&, void);
DECL_LINK(OKHdl, weld::Button&, void);
public:
@@ -65,6 +64,4 @@ public:
void SetLimits(sal_uInt16 nMin, sal_uInt16 nMax);
};
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */