From 940b4d1848e8c70ab7642901a68594e8016caffc Mon Sep 17 00:00:00 2001
From: Daniel Baumann
Date: Sat, 27 Apr 2024 18:51:28 +0200
Subject: Adding upstream version 1:7.0.4.
Signed-off-by: Daniel Baumann
---
include/sfx2/AccessibilityCheck.hxx | 40 ++
include/sfx2/AccessibilityIssue.hxx | 62 ++
include/sfx2/DocumentMetadataAccess.hxx | 152 ++++
include/sfx2/DocumentSigner.hxx | 47 ++
include/sfx2/Metadatable.hxx | 170 +++++
include/sfx2/QuerySaveDocument.hxx | 38 +
include/sfx2/StyleManager.hxx | 50 ++
include/sfx2/StylePreviewRenderer.hxx | 57 ++
include/sfx2/XmlIdRegistry.hxx | 66 ++
include/sfx2/app.hxx | 235 +++++++
include/sfx2/basedlgs.hxx | 137 ++++
include/sfx2/bindings.hxx | 197 ++++++
include/sfx2/brokenpackageint.hxx | 58 ++
include/sfx2/chalign.hxx | 55 ++
include/sfx2/charmappopup.hxx | 45 ++
include/sfx2/charwin.hxx | 75 ++
include/sfx2/childwin.hxx | 312 +++++++++
include/sfx2/classificationhelper.hxx | 227 ++++++
include/sfx2/ctrlitem.hxx | 91 +++
include/sfx2/dialoghelper.hxx | 41 ++
include/sfx2/dinfdlg.hxx | 565 +++++++++++++++
include/sfx2/dispatch.hxx | 179 +++++
include/sfx2/dllapi.h | 36 +
include/sfx2/docfac.hxx | 96 +++
include/sfx2/docfile.hxx | 295 ++++++++
include/sfx2/docfilt.hxx | 124 ++++
include/sfx2/docinf.hxx | 75 ++
include/sfx2/docinsert.hxx | 77 ++
include/sfx2/dockwin.hxx | 131 ++++
include/sfx2/docmacromode.hxx | 302 ++++++++
include/sfx2/docstoragemodifylistener.hxx | 82 +++
include/sfx2/doctempl.hxx | 113 +++
include/sfx2/emojipopup.hxx | 44 ++
include/sfx2/event.hxx | 268 +++++++
include/sfx2/evntconf.hxx | 102 +++
include/sfx2/fcontnr.hxx | 119 ++++
include/sfx2/filedlghelper.hxx | 264 +++++++
include/sfx2/flatpak.hxx | 34 +
include/sfx2/frame.hxx | 213 ++++++
include/sfx2/frmdescr.hxx | 102 +++
include/sfx2/frmhtml.hxx | 39 ++
include/sfx2/frmhtmlw.hxx | 76 ++
include/sfx2/groupid.hxx | 74 ++
include/sfx2/htmlmode.hxx | 30 +
include/sfx2/infobar.hxx | 124 ++++
include/sfx2/inputdlg.hxx | 32 +
include/sfx2/ipclient.hxx | 94 +++
include/sfx2/linkmgr.hxx | 185 +++++
include/sfx2/linksrc.hxx | 118 ++++
include/sfx2/lnkbase.hxx | 177 +++++
include/sfx2/lokcharthelper.hxx | 61 ++
include/sfx2/lokhelper.hxx | 130 ++++
include/sfx2/mailmodelapi.hxx | 103 +++
include/sfx2/mieclip.hxx | 44 ++
include/sfx2/minfitem.hxx | 67 ++
include/sfx2/module.hxx | 105 +++
include/sfx2/msg.hxx | 264 +++++++
include/sfx2/msgpool.hxx | 75 ++
include/sfx2/navigat.hxx | 54 ++
include/sfx2/new.hxx | 108 +++
include/sfx2/newstyle.hxx | 52 ++
include/sfx2/notebookbar/SfxNotebookBar.hxx | 68 ++
include/sfx2/objface.hxx | 121 ++++
include/sfx2/objitem.hxx | 45 ++
include/sfx2/objsh.hxx | 897 ++++++++++++++++++++++++
include/sfx2/opengrf.hxx | 72 ++
include/sfx2/pageids.hxx | 70 ++
include/sfx2/passwd.hxx | 132 ++++
include/sfx2/printer.hxx | 62 ++
include/sfx2/printopt.hxx | 87 +++
include/sfx2/progress.hxx | 63 ++
include/sfx2/request.hxx | 126 ++++
include/sfx2/safemode.hxx | 74 ++
include/sfx2/sfxbasecontroller.hxx | 218 ++++++
include/sfx2/sfxbasemodel.hxx | 749 ++++++++++++++++++++
include/sfx2/sfxdlg.hxx | 150 ++++
include/sfx2/sfxhelp.hxx | 59 ++
include/sfx2/sfxhtml.hxx | 113 +++
include/sfx2/sfxmodelfactory.hxx | 77 ++
include/sfx2/sfxresid.hxx | 29 +
include/sfx2/sfxsids.hrc | 710 +++++++++++++++++++
include/sfx2/sfxstatuslistener.hxx | 75 ++
include/sfx2/sfxuno.hxx | 50 ++
include/sfx2/shell.hxx | 591 ++++++++++++++++
include/sfx2/sidebar/AsynchronousCall.hxx | 55 ++
include/sfx2/sidebar/Context.hxx | 61 ++
include/sfx2/sidebar/ControllerItem.hxx | 82 +++
include/sfx2/sidebar/Deck.hxx | 111 +++
include/sfx2/sidebar/FocusManager.hxx | 149 ++++
include/sfx2/sidebar/IContextChangeReceiver.hxx | 42 ++
include/sfx2/sidebar/ILayoutableWindow.hxx | 45 ++
include/sfx2/sidebar/Panel.hxx | 94 +++
include/sfx2/sidebar/PanelLayout.hxx | 48 ++
include/sfx2/sidebar/ResourceManager.hxx | 135 ++++
include/sfx2/sidebar/Sidebar.hxx | 66 ++
include/sfx2/sidebar/SidebarChildWindow.hxx | 49 ++
include/sfx2/sidebar/SidebarController.hxx | 295 ++++++++
include/sfx2/sidebar/SidebarDockingWindow.hxx | 79 +++
include/sfx2/sidebar/SidebarModelUpdate.hxx | 31 +
include/sfx2/sidebar/SidebarPanelBase.hxx | 102 +++
include/sfx2/sidebar/SidebarToolBox.hxx | 86 +++
include/sfx2/sidebar/TabBar.hxx | 129 ++++
include/sfx2/sidebar/Theme.hxx | 245 +++++++
include/sfx2/signaturestate.hxx | 54 ++
include/sfx2/stbitem.hxx | 133 ++++
include/sfx2/strings.hrc | 352 ++++++++++
include/sfx2/styfitem.hxx | 61 ++
include/sfx2/styledlg.hxx | 52 ++
include/sfx2/tabdlg.hxx | 246 +++++++
include/sfx2/tbxctrl.hxx | 140 ++++
include/sfx2/templatedlg.hxx | 209 ++++++
include/sfx2/templatelocalview.hxx | 257 +++++++
include/sfx2/templateproperties.hxx | 29 +
include/sfx2/templdlg.hxx | 46 ++
include/sfx2/thumbnailview.hxx | 468 +++++++++++++
include/sfx2/titledockwin.hxx | 106 +++
include/sfx2/toolbarids.hxx | 77 ++
include/sfx2/tplpitem.hxx | 50 ++
include/sfx2/userinputinterception.hxx | 82 +++
include/sfx2/viewfac.hxx | 60 ++
include/sfx2/viewfrm.hxx | 270 +++++++
include/sfx2/viewsh.hxx | 390 +++++++++++
include/sfx2/watermarkitem.hxx | 47 ++
include/sfx2/weldutils.hxx | 66 ++
include/sfx2/zoomitem.hxx | 81 +++
125 files changed, 17206 insertions(+)
create mode 100644 include/sfx2/AccessibilityCheck.hxx
create mode 100644 include/sfx2/AccessibilityIssue.hxx
create mode 100644 include/sfx2/DocumentMetadataAccess.hxx
create mode 100644 include/sfx2/DocumentSigner.hxx
create mode 100644 include/sfx2/Metadatable.hxx
create mode 100644 include/sfx2/QuerySaveDocument.hxx
create mode 100644 include/sfx2/StyleManager.hxx
create mode 100644 include/sfx2/StylePreviewRenderer.hxx
create mode 100644 include/sfx2/XmlIdRegistry.hxx
create mode 100644 include/sfx2/app.hxx
create mode 100644 include/sfx2/basedlgs.hxx
create mode 100644 include/sfx2/bindings.hxx
create mode 100644 include/sfx2/brokenpackageint.hxx
create mode 100644 include/sfx2/chalign.hxx
create mode 100644 include/sfx2/charmappopup.hxx
create mode 100644 include/sfx2/charwin.hxx
create mode 100644 include/sfx2/childwin.hxx
create mode 100644 include/sfx2/classificationhelper.hxx
create mode 100644 include/sfx2/ctrlitem.hxx
create mode 100644 include/sfx2/dialoghelper.hxx
create mode 100644 include/sfx2/dinfdlg.hxx
create mode 100644 include/sfx2/dispatch.hxx
create mode 100644 include/sfx2/dllapi.h
create mode 100644 include/sfx2/docfac.hxx
create mode 100644 include/sfx2/docfile.hxx
create mode 100644 include/sfx2/docfilt.hxx
create mode 100644 include/sfx2/docinf.hxx
create mode 100644 include/sfx2/docinsert.hxx
create mode 100644 include/sfx2/dockwin.hxx
create mode 100644 include/sfx2/docmacromode.hxx
create mode 100644 include/sfx2/docstoragemodifylistener.hxx
create mode 100644 include/sfx2/doctempl.hxx
create mode 100644 include/sfx2/emojipopup.hxx
create mode 100644 include/sfx2/event.hxx
create mode 100644 include/sfx2/evntconf.hxx
create mode 100644 include/sfx2/fcontnr.hxx
create mode 100644 include/sfx2/filedlghelper.hxx
create mode 100644 include/sfx2/flatpak.hxx
create mode 100644 include/sfx2/frame.hxx
create mode 100644 include/sfx2/frmdescr.hxx
create mode 100644 include/sfx2/frmhtml.hxx
create mode 100644 include/sfx2/frmhtmlw.hxx
create mode 100644 include/sfx2/groupid.hxx
create mode 100644 include/sfx2/htmlmode.hxx
create mode 100644 include/sfx2/infobar.hxx
create mode 100644 include/sfx2/inputdlg.hxx
create mode 100644 include/sfx2/ipclient.hxx
create mode 100644 include/sfx2/linkmgr.hxx
create mode 100644 include/sfx2/linksrc.hxx
create mode 100644 include/sfx2/lnkbase.hxx
create mode 100644 include/sfx2/lokcharthelper.hxx
create mode 100644 include/sfx2/lokhelper.hxx
create mode 100644 include/sfx2/mailmodelapi.hxx
create mode 100644 include/sfx2/mieclip.hxx
create mode 100644 include/sfx2/minfitem.hxx
create mode 100644 include/sfx2/module.hxx
create mode 100644 include/sfx2/msg.hxx
create mode 100644 include/sfx2/msgpool.hxx
create mode 100644 include/sfx2/navigat.hxx
create mode 100644 include/sfx2/new.hxx
create mode 100644 include/sfx2/newstyle.hxx
create mode 100644 include/sfx2/notebookbar/SfxNotebookBar.hxx
create mode 100644 include/sfx2/objface.hxx
create mode 100644 include/sfx2/objitem.hxx
create mode 100644 include/sfx2/objsh.hxx
create mode 100644 include/sfx2/opengrf.hxx
create mode 100644 include/sfx2/pageids.hxx
create mode 100644 include/sfx2/passwd.hxx
create mode 100644 include/sfx2/printer.hxx
create mode 100644 include/sfx2/printopt.hxx
create mode 100644 include/sfx2/progress.hxx
create mode 100644 include/sfx2/request.hxx
create mode 100644 include/sfx2/safemode.hxx
create mode 100644 include/sfx2/sfxbasecontroller.hxx
create mode 100644 include/sfx2/sfxbasemodel.hxx
create mode 100644 include/sfx2/sfxdlg.hxx
create mode 100644 include/sfx2/sfxhelp.hxx
create mode 100644 include/sfx2/sfxhtml.hxx
create mode 100644 include/sfx2/sfxmodelfactory.hxx
create mode 100644 include/sfx2/sfxresid.hxx
create mode 100644 include/sfx2/sfxsids.hrc
create mode 100644 include/sfx2/sfxstatuslistener.hxx
create mode 100644 include/sfx2/sfxuno.hxx
create mode 100644 include/sfx2/shell.hxx
create mode 100644 include/sfx2/sidebar/AsynchronousCall.hxx
create mode 100644 include/sfx2/sidebar/Context.hxx
create mode 100644 include/sfx2/sidebar/ControllerItem.hxx
create mode 100644 include/sfx2/sidebar/Deck.hxx
create mode 100644 include/sfx2/sidebar/FocusManager.hxx
create mode 100644 include/sfx2/sidebar/IContextChangeReceiver.hxx
create mode 100644 include/sfx2/sidebar/ILayoutableWindow.hxx
create mode 100644 include/sfx2/sidebar/Panel.hxx
create mode 100644 include/sfx2/sidebar/PanelLayout.hxx
create mode 100644 include/sfx2/sidebar/ResourceManager.hxx
create mode 100644 include/sfx2/sidebar/Sidebar.hxx
create mode 100644 include/sfx2/sidebar/SidebarChildWindow.hxx
create mode 100644 include/sfx2/sidebar/SidebarController.hxx
create mode 100644 include/sfx2/sidebar/SidebarDockingWindow.hxx
create mode 100644 include/sfx2/sidebar/SidebarModelUpdate.hxx
create mode 100644 include/sfx2/sidebar/SidebarPanelBase.hxx
create mode 100644 include/sfx2/sidebar/SidebarToolBox.hxx
create mode 100644 include/sfx2/sidebar/TabBar.hxx
create mode 100644 include/sfx2/sidebar/Theme.hxx
create mode 100644 include/sfx2/signaturestate.hxx
create mode 100644 include/sfx2/stbitem.hxx
create mode 100644 include/sfx2/strings.hrc
create mode 100644 include/sfx2/styfitem.hxx
create mode 100644 include/sfx2/styledlg.hxx
create mode 100644 include/sfx2/tabdlg.hxx
create mode 100644 include/sfx2/tbxctrl.hxx
create mode 100644 include/sfx2/templatedlg.hxx
create mode 100644 include/sfx2/templatelocalview.hxx
create mode 100644 include/sfx2/templateproperties.hxx
create mode 100644 include/sfx2/templdlg.hxx
create mode 100644 include/sfx2/thumbnailview.hxx
create mode 100644 include/sfx2/titledockwin.hxx
create mode 100644 include/sfx2/toolbarids.hxx
create mode 100644 include/sfx2/tplpitem.hxx
create mode 100644 include/sfx2/userinputinterception.hxx
create mode 100644 include/sfx2/viewfac.hxx
create mode 100644 include/sfx2/viewfrm.hxx
create mode 100644 include/sfx2/viewsh.hxx
create mode 100644 include/sfx2/watermarkitem.hxx
create mode 100644 include/sfx2/weldutils.hxx
create mode 100644 include/sfx2/zoomitem.hxx
(limited to 'include/sfx2')
diff --git a/include/sfx2/AccessibilityCheck.hxx b/include/sfx2/AccessibilityCheck.hxx
new file mode 100644
index 000000000..6de1069e5
--- /dev/null
+++ b/include/sfx2/AccessibilityCheck.hxx
@@ -0,0 +1,40 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#ifndef INCLUDED_SFX2_ACCESSIBILITYCHECKDIALOG_HXX
+#define INCLUDED_SFX2_ACCESSIBILITYCHECKDIALOG_HXX
+
+#include
+#include
+#include
+#include
+#include
+
+namespace sfx
+{
+class SFX2_DLLPUBLIC AccessibilityCheck
+{
+protected:
+ AccessibilityIssueCollection m_aIssueCollection;
+
+public:
+ AccessibilityCheck() = default;
+ virtual ~AccessibilityCheck();
+
+ virtual void check() = 0;
+
+ AccessibilityIssueCollection& getIssueCollecton();
+};
+
+} // end sfx namespace
+
+#endif // INCLUDED_SFX2_ACCESSIBILITYCHECKDIALOG_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/sfx2/AccessibilityIssue.hxx b/include/sfx2/AccessibilityIssue.hxx
new file mode 100644
index 000000000..32522ff63
--- /dev/null
+++ b/include/sfx2/AccessibilityIssue.hxx
@@ -0,0 +1,62 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#ifndef INCLUDED_SFX2_ACCESSIBILITYISSUE_HXX
+#define INCLUDED_SFX2_ACCESSIBILITYISSUE_HXX
+
+#include
+#include
+#include
+#include
+
+namespace sfx
+{
+enum class AccessibilityIssueID
+{
+ UNSPECIFIED, // TODO: remove - temporary
+ DOCUMENT_TITLE,
+ DOCUMENT_LANGUAGE,
+ STYLE_LANGUAGE,
+ NO_ALT_OLE,
+ NO_ALT_GRAPHIC,
+ NO_ALT_SHAPE,
+ TABLE_MERGE_SPLIT,
+ TEXT_FORMATTING,
+};
+
+class SFX2_DLLPUBLIC AccessibilityIssue
+{
+public:
+ AccessibilityIssue(AccessibilityIssueID eIssueID = AccessibilityIssueID::UNSPECIFIED);
+ virtual ~AccessibilityIssue();
+
+ virtual bool canGotoIssue() const = 0;
+ virtual void gotoIssue() const = 0;
+
+ AccessibilityIssueID m_eIssueID;
+ OUString m_aIssueText;
+};
+
+class SFX2_DLLPUBLIC AccessibilityIssueCollection
+{
+private:
+ std::vector> m_aIssues;
+
+public:
+ AccessibilityIssueCollection() = default;
+
+ std::vector>& getIssues();
+};
+
+} // end sfx namespace
+
+#endif // INCLUDED_SFX2_ACCESSIBILITYISSUE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/sfx2/DocumentMetadataAccess.hxx b/include/sfx2/DocumentMetadataAccess.hxx
new file mode 100644
index 000000000..196676671
--- /dev/null
+++ b/include/sfx2/DocumentMetadataAccess.hxx
@@ -0,0 +1,152 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SFX2_DOCUMENTMETADATAACCESS_HXX
+#define INCLUDED_SFX2_DOCUMENTMETADATAACCESS_HXX
+
+#include
+
+#include
+
+#include
+
+#include
+
+#include
+
+
+/** Implementation of the interface com.sun.star.rdf.XDocumentMetadataAccess
+
+ This is not a service only because it needs some kind of XML ID registry
+ from the document, and i do not like defining an API for that.
+ Also, the implementation does _no_ locking, so make sure access is
+ protected externally.
+ */
+
+namespace com::sun::star::embed {
+ class XStorage;
+}
+namespace com::sun::star::frame {
+ class XModel;
+}
+
+namespace com::sun::star::uno { class XComponentContext; }
+
+class SfxObjectShell;
+
+namespace sfx2 {
+
+
+/** create a base URI for loading metadata from an ODF (sub)document.
+
+ @param i_xContext component context
+ @param i_xModel model of the document (required if no URI is provided)
+ @param i_rPkgURI the URI for the package
+ @param i_rSubDocument (optional) path of the subdocument in package
+
+ @return a base URI suitable for XDocumentMetadataAccess::loadFromStorage
+ */
+css::uno::Reference< css::rdf::XURI> SFX2_DLLPUBLIC
+createBaseURI(
+ css::uno::Reference const & i_xContext,
+ css::uno::Reference const & i_xModel,
+ OUString const & i_rPkgURI,
+ OUString const & i_rSubDocument = OUString());
+
+
+struct DocumentMetadataAccess_Impl;
+
+class DocumentMetadataAccess final :
+ public cppu::WeakImplHelper
+{
+ DocumentMetadataAccess(const DocumentMetadataAccess&) = delete;
+ DocumentMetadataAccess& operator=( const DocumentMetadataAccess& ) = delete;
+public:
+ explicit DocumentMetadataAccess(css::uno::Reference< css::uno::XComponentContext > const & i_xContext,
+ SfxObjectShell const & i_rRegistrySupplier,
+ OUString const & i_rBaseURI);
+ // N.B.: in contrast to previous, this constructor does _not_ initialize!
+ // caller must immediately call loadFromStorage/Medium!
+ explicit DocumentMetadataAccess(css::uno::Reference< css::uno::XComponentContext > const & i_xContext,
+ SfxObjectShell const & i_rRegistrySupplier);
+ virtual ~DocumentMetadataAccess() override;
+
+ // css::rdf::XNode:
+ virtual OUString SAL_CALL getStringValue() override;
+
+ // css::rdf::XURI:
+ virtual OUString SAL_CALL getNamespace() override;
+ virtual OUString SAL_CALL getLocalName() override;
+
+ // css::rdf::XRepositorySupplier:
+ virtual css::uno::Reference<
+ css::rdf::XRepository > SAL_CALL getRDFRepository() override;
+
+ // css::rdf::XDocumentMetadataAccess:
+ virtual css::uno::Reference<
+ css::rdf::XMetadatable > SAL_CALL
+ getElementByMetadataReference(
+ const css::beans::StringPair & i_rReference) override;
+ virtual css::uno::Reference< css::rdf::XMetadatable > SAL_CALL
+ getElementByURI(const css::uno::Reference< css::rdf::XURI > & i_xURI) override;
+ virtual css::uno::Sequence< css::uno::Reference< css::rdf::XURI > > SAL_CALL getMetadataGraphsWithType(
+ const css::uno::Reference< css::rdf::XURI > & i_xType) override;
+ virtual css::uno::Reference< css::rdf::XURI> SAL_CALL
+ addMetadataFile(const OUString & i_rFileName,
+ const css::uno::Sequence< css::uno::Reference< css::rdf::XURI > > & i_rTypes) override;
+ virtual css::uno::Reference< css::rdf::XURI> SAL_CALL
+ importMetadataFile(::sal_Int16 i_Format,
+ const css::uno::Reference< css::io::XInputStream > & i_xInStream,
+ const OUString & i_rFileName,
+ const css::uno::Reference< css::rdf::XURI > & i_xBaseURI,
+ const css::uno::Sequence< css::uno::Reference< css::rdf::XURI > > & i_rTypes) override;
+ virtual void SAL_CALL removeMetadataFile(
+ const css::uno::Reference<
+ css::rdf::XURI > & i_xGraphName) override;
+ virtual void SAL_CALL addContentOrStylesFile(
+ const OUString & i_rFileName) override;
+ virtual void SAL_CALL removeContentOrStylesFile(
+ const OUString & i_rFileName) override;
+
+ virtual void SAL_CALL loadMetadataFromStorage(
+ const css::uno::Reference<
+ css::embed::XStorage > & i_xStorage,
+ const css::uno::Reference<
+ css::rdf::XURI > & i_xBaseURI,
+ const css::uno::Reference<
+ css::task::XInteractionHandler> & i_xHandler) override;
+ virtual void SAL_CALL storeMetadataToStorage(
+ const css::uno::Reference<
+ css::embed::XStorage > & i_xStorage) override;
+ virtual void SAL_CALL loadMetadataFromMedium(
+ const css::uno::Sequence<
+ css::beans::PropertyValue > & i_rMedium) override;
+ virtual void SAL_CALL storeMetadataToMedium(
+ const css::uno::Sequence<
+ css::beans::PropertyValue > & i_rMedium) override;
+
+private:
+ std::unique_ptr m_pImpl;
+};
+
+} // namespace sfx2
+
+#endif // INCLUDED_SFX2_DOCUMENTMETADATAACCESS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/sfx2/DocumentSigner.hxx b/include/sfx2/DocumentSigner.hxx
new file mode 100644
index 000000000..8059cb9cb
--- /dev/null
+++ b/include/sfx2/DocumentSigner.hxx
@@ -0,0 +1,47 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#ifndef INCLUDED_SFX2_DOCUMENTSIGNER_HXX
+#define INCLUDED_SFX2_DOCUMENTSIGNER_HXX
+
+#include
+#include
+#include
+
+namespace com::sun::star::security
+{
+class XCertificate;
+}
+namespace com::sun::star::uno
+{
+template class Reference;
+}
+
+namespace sfx2
+{
+class SFX2_DLLPUBLIC DocumentSigner
+{
+private:
+ OUString m_aUrl;
+
+public:
+ DocumentSigner(OUString const& rUrl)
+ : m_aUrl(rUrl)
+ {
+ }
+
+ bool signDocument(css::uno::Reference const& rxCertificate);
+};
+
+} // namespace sfx2
+
+#endif // INCLUDED_SFX2_DOCUMENTSIGNER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/sfx2/Metadatable.hxx b/include/sfx2/Metadatable.hxx
new file mode 100644
index 000000000..a84bddb89
--- /dev/null
+++ b/include/sfx2/Metadatable.hxx
@@ -0,0 +1,170 @@
+/* -*- 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_SFX2_METADATABLE_HXX
+#define INCLUDED_SFX2_METADATABLE_HXX
+
+#include
+
+#include
+
+#include
+#include
+
+#include
+
+
+namespace com::sun::star {
+ namespace frame { class XModel; }
+}
+
+namespace sfx2 {
+ class IXmlIdRegistry;
+}
+
+namespace sfx2 {
+
+class XmlIdRegistry;
+class MetadatableUndo;
+
+
+// XML ID handling ---------------------------------------------------
+
+
+/// create a sfx2::XmlIdRegistryDocument or a sfx2::XmlIdRegistryClipboard
+SFX2_DLLPUBLIC ::sfx2::IXmlIdRegistry *
+createXmlIdRegistry(const bool i_DocIsClipboard);
+
+
+/** base class for core objects that may have xml:id.
+
+ The interface of this class consists of 3 parts:
+
- implementations that are used by the MetadatableMixin
+ below
+ - hooks to be called by the sw core whenever actions that are
+ relevant to the uniqueness of xml:ids are taken (copying,
+ splitting, merging, deletion, undo, etc.)
+ - abstract methods that are called by the implementation of the
+ previous hooks
+
+ */
+class SFX2_DLLPUBLIC Metadatable
+{
+public:
+ Metadatable() : m_pReg(nullptr) {}
+
+ // destructor calls RemoveMetadataReference
+ virtual ~Metadatable();
+
+ // for MetadatableMixin ----------------------------------------------
+
+ css::beans::StringPair GetMetadataReference() const;
+ void SetMetadataReference( const css::beans::StringPair & i_rReference);
+ void EnsureMetadataReference();
+
+ // hooks -------------------------------------------------------------
+
+ // called from dtor!
+ void RemoveMetadataReference();
+
+ /** register this as a copy of i_rSource */
+ void RegisterAsCopyOf(Metadatable const & i_rSource,
+ const bool i_bCopyPrecedesSource = false);
+
+ /** create an Undo Metadatable, which remembers this' reference */
+ std::shared_ptr CreateUndo() const;
+ std::shared_ptr CreateUndoForDelete();
+
+ /** restore this from Undo Metadatable */
+ void RestoreMetadata(std::shared_ptr const& i_pUndo);
+
+ /** merge this and i_rOther into this */
+ void JoinMetadatable(Metadatable const & i_rOther,
+ const bool i_isMergedEmpty, const bool i_isOtherEmpty);
+
+ // abstract methods --------------------------------------------------
+
+ /** get the registry from the SwDoc */
+ virtual ::sfx2::IXmlIdRegistry& GetRegistry() = 0;
+
+ /** is this in a clipboard document? */
+ virtual bool IsInClipboard() const = 0;
+
+ /** is this in undo array? */
+ virtual bool IsInUndo() const = 0;
+
+ /** which stream is this in? true: content.xml; false: styles.xml */
+ virtual bool IsInContent() const = 0;
+
+ /** create XMetadatable from this.
+ note: if IsInUndo or IsInClipboard return true,
+ MakeUnoObject must not be called!
+ */
+ virtual css::uno::Reference< css::rdf::XMetadatable > MakeUnoObject() = 0;
+
+private:
+ Metadatable(const Metadatable&) = delete;
+ Metadatable& operator=(const Metadatable&) = delete;
+
+ friend class MetadatableClipboard;
+ friend class MetadatableUndo;
+
+ // note that Reg may be a XmlIdRegistryDocument or a XmlIdRegistryClipboard
+ XmlIdRegistry* m_pReg; // null => no XmlId
+};
+
+
+/** base class for UNO objects that implement XMetadatable.
+
+ An instance of this base class is associated with an instance of
+ Metadatable.
+ */
+class SFX2_DLLPUBLIC MetadatableMixin :
+ public cppu::WeakImplHelper
+{
+
+public:
+ MetadatableMixin() {};
+
+ // css::rdf::XNode:
+ virtual OUString SAL_CALL getStringValue() override;
+
+ // css::rdf::XURI:
+ virtual OUString SAL_CALL getLocalName() override;
+ virtual OUString SAL_CALL getNamespace() override;
+
+ // css::rdf::XMetadatable:
+ virtual css::beans::StringPair SAL_CALL getMetadataReference() override;
+ virtual void SAL_CALL setMetadataReference(
+ const css::beans::StringPair & i_rReference) override;
+ virtual void SAL_CALL ensureMetadataReference() override;
+
+protected:
+ /// get the core object corresponding to this UNO object.
+ virtual Metadatable * GetCoreObject() = 0;
+ /// get the XModel for the document
+ virtual css::uno::Reference< css::frame::XModel >
+ GetModel() = 0;
+
+};
+
+} // namespace sfx2
+
+#endif // INCLUDED_SFX2_METADATABLE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/sfx2/QuerySaveDocument.hxx b/include/sfx2/QuerySaveDocument.hxx
new file mode 100644
index 000000000..00aecfeae
--- /dev/null
+++ b/include/sfx2/QuerySaveDocument.hxx
@@ -0,0 +1,38 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SFX2_QUERYSAVEDOCUMENT_HXX
+#define INCLUDED_SFX2_QUERYSAVEDOCUMENT_HXX
+
+#include
+#include
+
+namespace weld { class Widget; }
+
+/** Opens the general query save document dialog.
+ @param _pParent
+ The parent window.
+ @_rTitle
+ The title of the document.
+*/
+SFX2_DLLPUBLIC short ExecuteQuerySaveDocument(
+ weld::Widget* _pParent, const OUString& _rTitle);
+
+#endif // INCLUDED_SFX2_QUERYSAVEDOCUMENT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/sfx2/StyleManager.hxx b/include/sfx2/StyleManager.hxx
new file mode 100644
index 000000000..625c9350b
--- /dev/null
+++ b/include/sfx2/StyleManager.hxx
@@ -0,0 +1,50 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_SFX2_STYLEMANAGER_HXX
+#define INCLUDED_SFX2_STYLEMANAGER_HXX
+
+#include
+
+#include
+
+#include
+
+class OutputDevice;
+class SfxObjectShell;
+namespace sfx2 { class StylePreviewRenderer; }
+
+namespace sfx2
+{
+
+class SFX2_DLLPUBLIC StyleManager
+{
+protected:
+ SfxObjectShell& mrShell;
+
+public:
+ StyleManager(SfxObjectShell& rShell)
+ : mrShell(rShell)
+ {}
+
+ virtual ~StyleManager()
+ {}
+
+ SfxStyleSheetBase* Search(const OUString& rStyleName, SfxStyleFamily eFamily);
+
+ virtual std::unique_ptr CreateStylePreviewRenderer(
+ OutputDevice& rOutputDev, SfxStyleSheetBase* pStyle,
+ long nMaxHeight) = 0;
+};
+
+} // end namespace sfx2
+
+#endif //INCLUDED_SFX2_STYLEMANAGER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/sfx2/StylePreviewRenderer.hxx b/include/sfx2/StylePreviewRenderer.hxx
new file mode 100644
index 000000000..3065c8b31
--- /dev/null
+++ b/include/sfx2/StylePreviewRenderer.hxx
@@ -0,0 +1,57 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_SFX2_STYLEPREVIEWRENDERER_HXX
+#define INCLUDED_SFX2_STYLEPREVIEWRENDERER_HXX
+
+#include
+#include
+
+class OutputDevice;
+class SfxStyleSheetBase;
+
+namespace sfx2
+{
+
+class SFX2_DLLPUBLIC StylePreviewRenderer
+{
+protected:
+ const SfxObjectShell& mrShell;
+ OutputDevice& mrOutputDev;
+ SfxStyleSheetBase* mpStyle;
+ long mnMaxHeight;
+
+public:
+ enum class RenderAlign
+ {
+ TOP, CENTER
+ };
+
+ StylePreviewRenderer(const SfxObjectShell& rShell,
+ OutputDevice& rOutputDev,
+ SfxStyleSheetBase* pStyle,
+ long nMaxHeight)
+ : mrShell(rShell)
+ , mrOutputDev(rOutputDev)
+ , mpStyle(pStyle)
+ , mnMaxHeight(nMaxHeight)
+ {}
+
+ virtual ~StylePreviewRenderer()
+ {}
+
+ virtual bool recalculate() = 0;
+ virtual bool render(const tools::Rectangle& aRectangle, RenderAlign eRenderAlign = RenderAlign::CENTER) = 0;
+};
+
+} // end namespace sfx2
+
+#endif // INCLUDED_SVX_STYLEPREVIEWRENDERER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/sfx2/XmlIdRegistry.hxx b/include/sfx2/XmlIdRegistry.hxx
new file mode 100644
index 000000000..7cae9df1e
--- /dev/null
+++ b/include/sfx2/XmlIdRegistry.hxx
@@ -0,0 +1,66 @@
+/* -*- 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_SFX2_XMLIDREGISTRY_HXX
+#define INCLUDED_SFX2_XMLIDREGISTRY_HXX
+
+#include
+
+#include
+#include
+
+namespace com::sun::star::beans { struct StringPair; }
+namespace com::sun::star::uno { template class Reference; }
+
+namespace com::sun::star::rdf {
+ class XMetadatable;
+}
+
+namespace sfx2 {
+
+// XML ID utilities --------------------------------------------------
+
+/** is i_rIdref a valid NCName ? */
+bool SFX2_DLLPUBLIC isValidNCName(OUString const & i_rIdref);
+
+bool SFX2_DLLPUBLIC isValidXmlId(OUString const & i_rStreamName,
+ OUString const & i_rIdref);
+
+// XML ID handling ---------------------------------------------------
+
+/** interface for getElementByMetadataReference;
+ for use by sfx2::DocumentMetadataAccess
+ */
+class SFX2_DLLPUBLIC IXmlIdRegistry
+{
+
+public:
+ virtual ~IXmlIdRegistry() { }
+
+ virtual css::uno::Reference< css::rdf::XMetadatable >
+ GetElementByMetadataReference(
+ const css::beans::StringPair & i_rXmlId) const = 0;
+
+};
+
+} // namespace sfx2
+
+#endif // INCLUDED_SFX2_XMLIDREGISTRY_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx
new file mode 100644
index 000000000..f08855ee8
--- /dev/null
+++ b/include/sfx2/app.hxx
@@ -0,0 +1,235 @@
+/* -*- 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_SFX2_APP_HXX
+#define INCLUDED_SFX2_APP_HXX
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+
+namespace com::sun::star::script { class XLibraryContainer; }
+
+namespace weld { class Window; }
+
+class BasicManager;
+class DdeService;
+struct SfxChildWinContextFactory;
+class SfxAppData_Impl;
+class SfxChildWinFactArr_Impl;
+class SfxDispatcher;
+class SfxEventHint;
+class SfxItemSet;
+class SfxObjectShell;
+class SfxObjectShellArr_Impl;
+class SfxObjectShellLock;
+class SfxProgress;
+class SfxSlotPool;
+class SfxStbCtrlFactArr_Impl;
+class SfxTbxCtrlFactArr_Impl;
+class SfxViewFrame;
+class SfxViewFrameArr_Impl;
+class SfxViewShellArr_Impl;
+class StarBASIC;
+class SfxWorkWindow;
+class SfxFilterMatcher;
+class SfxModule;
+namespace vcl { class Window; }
+struct SfxChildWinFactory;
+struct SfxStbCtrlFactory;
+struct SfxTbxCtrlFactory;
+class SbxArray;
+class SbxValue;
+
+namespace sfx2
+{
+ namespace sidebar {
+ class Theme;
+ }
+}
+
+enum class SfxToolsModule
+{
+ Math = 0,
+ Calc = 1,
+ Draw = 2,
+ Writer = 3,
+ Basic = 4,
+ LAST = Basic
+};
+
+class SFX2_DLLPUBLIC SfxLinkItem final : public SfxPoolItem
+{
+ Link aLink;
+public:
+ SfxLinkItem( sal_uInt16 nWhichId, const Link& rValue ) : SfxPoolItem( nWhichId )
+ { aLink = rValue; }
+
+ virtual SfxLinkItem* Clone( SfxItemPool* = nullptr ) const override
+ { return new SfxLinkItem( *this ); }
+ virtual bool operator==( const SfxPoolItem& rL) const override
+ { return static_cast(rL).aLink == aLink; }
+ const Link&
+ GetValue() const { return aLink; }
+};
+
+// This is a singleton class. Sad that there apparently is no other
+// way than a comment like this to indicate that to the code reader.
+class SFX2_DLLPUBLIC SfxApplication final : public SfxShell
+{
+ std::unique_ptr pImpl;
+
+ DECL_DLLPRIVATE_STATIC_LINK( SfxApplication, GlobalBasicErrorHdl_Impl, StarBASIC*, bool );
+
+ void Deinitialize();
+
+public:
+ SFX_DECL_INTERFACE(SFX_INTERFACE_SFXAPP)
+
+private:
+ /// SfxInterface initializer.
+ static void InitInterface_Impl();
+ SfxApplication();
+
+public:
+ virtual ~SfxApplication() override;
+ static SfxApplication* GetOrCreate();
+ static SfxApplication* Get();
+
+ // DDE
+#if defined(_WIN32)
+ static long DdeExecute( const OUString& rCmd );
+#endif
+ bool InitializeDde();
+ const DdeService* GetDdeService() const;
+ DdeService* GetDdeService();
+#if defined(_WIN32)
+ void AddDdeTopic( SfxObjectShell* );
+#endif
+ void RemoveDdeTopic( SfxObjectShell const * );
+
+ // "static" methods
+ /**
+ * @param pArgs Takes ownership
+ */
+ ErrCode LoadTemplate( SfxObjectShellLock& xDoc, const OUString& rFileName, std::unique_ptr pArgs );
+ vcl::Window* GetTopWindow() const;
+
+ // members
+ SfxFilterMatcher& GetFilterMatcher();
+ SfxProgress* GetProgress() const;
+ sal_uInt16 GetFreeIndex();
+ void ReleaseIndex(sal_uInt16 i);
+
+ // Basic/Scripting
+ static bool IsXScriptURL( const OUString& rScriptURL );
+ static OUString ChooseScript(weld::Window *pParent);
+ static void MacroOrganizer(weld::Window* pParent, sal_Int16 nTabId);
+ static ErrCode CallBasic( const OUString&, BasicManager*, SbxArray *pArgs, SbxValue *pRet );
+ static ErrCode CallAppBasic( const OUString& i_macroName )
+ { return CallBasic( i_macroName, SfxApplication::GetBasicManager(), nullptr, nullptr ); }
+ static BasicManager* GetBasicManager();
+ css::script::XLibraryContainer * GetDialogContainer();
+ css::script::XLibraryContainer * GetBasicContainer();
+ static StarBASIC* GetBasic();
+ void SaveBasicAndDialogContainer() const;
+
+ // misc.
+ void GetOptions(SfxItemSet &);
+ void SetOptions(const SfxItemSet &);
+ virtual void Invalidate(sal_uInt16 nId = 0) override;
+ void NotifyEvent(const SfxEventHint& rEvent, bool bSynchron = true );
+ bool IsDowning() const;
+ void ResetLastDir();
+
+ SAL_DLLPRIVATE SfxDispatcher* GetAppDispatcher_Impl();
+ SAL_DLLPRIVATE SfxDispatcher* GetDispatcher_Impl();
+
+ SAL_DLLPRIVATE void SetOptions_Impl(const SfxItemSet &);
+ SAL_DLLPRIVATE void Initialize_Impl();
+
+ SAL_DLLPRIVATE SfxAppData_Impl* Get_Impl() const { return pImpl.get(); }
+
+ // Object-Factories/global arrays
+ SAL_DLLPRIVATE void RegisterChildWindow_Impl(SfxModule*, std::unique_ptr);
+ SAL_DLLPRIVATE void RegisterChildWindowContext_Impl(SfxModule*, sal_uInt16, std::unique_ptr);
+ SAL_DLLPRIVATE void RegisterStatusBarControl_Impl(SfxModule*, const SfxStbCtrlFactory&);
+ SAL_DLLPRIVATE void RegisterToolBoxControl_Impl( SfxModule*, const SfxTbxCtrlFactory&);
+ SAL_DLLPRIVATE SfxTbxCtrlFactArr_Impl& GetTbxCtrlFactories_Impl() const;
+ SAL_DLLPRIVATE SfxStbCtrlFactArr_Impl& GetStbCtrlFactories_Impl() const;
+ SAL_DLLPRIVATE SfxChildWinFactArr_Impl& GetChildWinFactories_Impl() const;
+ SAL_DLLPRIVATE SfxViewFrameArr_Impl& GetViewFrames_Impl() const;
+ SAL_DLLPRIVATE SfxViewShellArr_Impl& GetViewShells_Impl() const;
+ SAL_DLLPRIVATE SfxObjectShellArr_Impl& GetObjectShells_Impl() const;
+ SAL_DLLPRIVATE void SetViewFrame_Impl(SfxViewFrame *pViewFrame);
+
+ // Slot Methods
+ // TODO/CLEANUP: still needed?
+ SAL_DLLPRIVATE void NewDocDirectExec_Impl(SfxRequest &);
+ SAL_DLLPRIVATE void NewDocExec_Impl(SfxRequest &);
+ SAL_DLLPRIVATE void OpenDocExec_Impl(SfxRequest &);
+ SAL_DLLPRIVATE void OpenRemoteExec_Impl(SfxRequest &);
+ SAL_DLLPRIVATE void SignPDFExec_Impl(SfxRequest&);
+ SAL_DLLPRIVATE void MiscExec_Impl(SfxRequest &);
+ SAL_DLLPRIVATE void MiscState_Impl(SfxItemSet &);
+ SAL_DLLPRIVATE static void PropExec_Impl(SfxRequest const &);
+ SAL_DLLPRIVATE static void PropState_Impl(SfxItemSet &);
+ SAL_DLLPRIVATE void OfaExec_Impl(SfxRequest &);
+ SAL_DLLPRIVATE static void OfaState_Impl(SfxItemSet &);
+
+ SAL_DLLPRIVATE void SetProgress_Impl(SfxProgress *);
+ SAL_DLLPRIVATE const OUString& GetLastDir_Impl() const;
+ SAL_DLLPRIVATE void SetLastDir_Impl( const OUString & );
+
+ SAL_DLLPRIVATE static void Registrations_Impl();
+ SAL_DLLPRIVATE SfxWorkWindow* GetWorkWindow_Impl(const SfxViewFrame *pFrame) const;
+
+ // TODO/CLEANUP: still needed? -- unclear whether this comment
+ // refers to the GetDisabledSlotList_Impl() method which was
+ // already removed, or the below methods?
+ SAL_DLLPRIVATE SfxSlotPool& GetAppSlotPool_Impl() const;
+ SAL_DLLPRIVATE static SfxModule* GetModule_Impl();
+
+ static void SetModule(SfxToolsModule nSharedLib, std::unique_ptr pModule);
+ static SfxModule* GetModule(SfxToolsModule nSharedLib);
+
+ static bool loadBrandSvg(const char *pName, BitmapEx &rBitmap, int nWidth);
+
+ /** loads the application logo as used in the impress slideshow pause screen */
+ static BitmapEx GetApplicationLogo(long nWidth);
+
+ /** this Theme contains Images so must be deleted before DeInitVCL */
+ sfx2::sidebar::Theme & GetSidebarTheme();
+};
+
+inline SfxApplication* SfxGetpApp()
+{
+ return SfxApplication::Get();
+}
+
+#endif
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/sfx2/basedlgs.hxx b/include/sfx2/basedlgs.hxx
new file mode 100644
index 000000000..92da31ed1
--- /dev/null
+++ b/include/sfx2/basedlgs.hxx
@@ -0,0 +1,137 @@
+/* -*- 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_SFX2_BASEDLGS_HXX
+#define INCLUDED_SFX2_BASEDLGS_HXX
+
+#include
+#include
+#include
+#include
+#include
+
+class SfxTabPage;
+class SfxBindings;
+class SfxChildWindow;
+struct SfxChildWinInfo;
+class SfxItemSet;
+class Timer;
+
+class SFX2_DLLPUBLIC SfxDialogController : public weld::GenericDialogController
+{
+private:
+ DECL_DLLPRIVATE_STATIC_LINK(SfxDialogController, InstallLOKNotifierHdl, void*, vcl::ILibreOfficeKitNotifier*);
+
+ DECL_DLLPRIVATE_LINK(FocusChangeHdl, weld::Widget&, void);
+
+public:
+ SfxDialogController(weld::Widget* pParent, const OUString& rUIFile, const OString& rDialogId);
+ // dialog gets focus
+ virtual void Activate() {}
+ // dialog loses focus
+ virtual void Deactivate() {}
+
+ // when the dialog has an associated SfxChildWin, typically for Modeless interaction
+ virtual void ChildWinDispose() {} // called from the associated SfxChildWin dtor
+ virtual void Close() {} // called by the SfxChildWin when the dialog is closed
+ virtual void EndDialog(); // called by the SfxChildWin to close the dialog
+};
+
+class SfxModelessDialog_Impl;
+
+class SFX2_DLLPUBLIC SfxModelessDialogController : public SfxDialogController
+{
+ SfxBindings* m_pBindings;
+ std::unique_ptr m_xImpl;
+
+ SfxModelessDialogController(SfxModelessDialogController&) = delete;
+ void operator =(SfxModelessDialogController&) = delete;
+
+ void Init(SfxBindings *pBindinx, SfxChildWindow *pCW);
+
+protected:
+ SfxModelessDialogController(SfxBindings*, SfxChildWindow* pChildWin,
+ weld::Window* pParent, const OUString& rUIXMLDescription, const OString& rID);
+
+public:
+ virtual ~SfxModelessDialogController() override;
+
+ void Initialize (SfxChildWinInfo const * pInfo);
+ bool IsClosing() const;
+ virtual void Close() override;
+ virtual void EndDialog() override;
+ virtual void Activate() override;
+ virtual void Deactivate() override;
+ virtual void ChildWinDispose() override;
+ virtual void FillInfo(SfxChildWinInfo&) const;
+ SfxBindings& GetBindings() const { return *m_pBindings; }
+};
+
+typedef const sal_uInt16* (*GetTabPageRanges)(); // provides international Which values
+
+class SFX2_DLLPUBLIC SfxOkDialogController : public SfxDialogController
+{
+public:
+ SfxOkDialogController(weld::Widget* pParent, const OUString& rUIXMLDescription,
+ const OString& rID)
+ : SfxDialogController(pParent, rUIXMLDescription, rID)
+ {
+ }
+
+ virtual weld::Button& GetOKButton() const = 0;
+ virtual const SfxItemSet* GetExampleSet() const = 0;
+};
+
+class SFX2_DLLPUBLIC SfxSingleTabDialogController : public SfxOkDialogController
+{
+private:
+ std::unique_ptr m_xOutputSet;
+ const SfxItemSet* m_pInputSet;
+
+public:
+ SfxSingleTabDialogController(weld::Widget* pParent, const SfxItemSet* pOptionsSet,
+ const OUString& rUIXMLDescription = OUString("sfx/ui/singletabdialog.ui"),
+ const OString& rID = OString("SingleTabDialog"));
+
+ weld::Container* get_content_area() { return m_xContainer.get(); }
+
+ virtual ~SfxSingleTabDialogController() override;
+
+ void SetTabPage(std::unique_ptr xTabPage);
+ SfxTabPage* GetTabPage() const { return m_xSfxPage.get(); }
+
+ virtual weld::Button& GetOKButton() const override { return *m_xOKBtn; }
+ virtual const SfxItemSet* GetExampleSet() const override { return nullptr; }
+
+ const SfxItemSet* GetOutputItemSet() const { return m_xOutputSet.get(); }
+ const SfxItemSet* GetInputItemSet() const { return m_pInputSet; }
+
+protected:
+ std::unique_ptr m_xSfxPage;
+ std::unique_ptr m_xContainer;
+ std::unique_ptr m_xOKBtn;
+ std::unique_ptr m_xHelpBtn;
+
+ void CreateOutputItemSet(const SfxItemSet& rInput);
+ void SetInputSet(const SfxItemSet* pInSet) { m_pInputSet = pInSet; }
+ DECL_DLLPRIVATE_LINK(OKHdl_Impl, weld::Button&, void);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/sfx2/bindings.hxx b/include/sfx2/bindings.hxx
new file mode 100644
index 000000000..28b4d5248
--- /dev/null
+++ b/include/sfx2/bindings.hxx
@@ -0,0 +1,197 @@
+/* -*- 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_SFX2_BINDINGS_HXX
+#define INCLUDED_SFX2_BINDINGS_HXX
+
+#include
+
+#include
+#include
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+namespace com::sun::star::frame { class XDispatch; }
+namespace com::sun::star::frame { class XDispatchProvider; }
+namespace com::sun::star::frame { class XDispatchRecorder; }
+namespace com::sun::star::frame { class XFrame; }
+namespace com::sun::star::util { struct URL; }
+
+class SfxSlot;
+class SfxSlotServer;
+class SfxControllerItem;
+class SfxStateCache;
+class SfxItemSet;
+class SfxDispatcher;
+class SfxBindings_Impl;
+class Timer;
+class SfxWorkWindow;
+struct SfxFoundCache_Impl;
+class SfxFoundCacheArr_Impl;
+
+enum class SfxCallMode : sal_uInt16
+{
+ SLOT = 0x00, // sync/async from Slot
+ SYNCHRON = 0x01, // synchronously in the same Stackframe
+ ASYNCHRON = 0x02, // asynchronously via AppEvent
+ RECORD = 0x04, // take into account while recording
+ API = 0x08 // API call (silent)
+};
+
+namespace o3tl {
+
+template<> struct typed_flags: is_typed_flags
+{};
+
+}
+
+class SFX2_DLLPUBLIC SfxBindings: public SfxBroadcaster
+
+/* [Description]
+
+ In each SFx application one instance of the SfxBindings-Class will
+ exists from until .
+ This instance is automatically created and destroyed by SfxApplication.
+ However these instances will be handled by the Macro
+ or the associated .
+
+ The SfxBindings manages all of its Slot-Ids bound by the registered
+ controllers and keeps a cache of the respectively.
+ (it is what we call the combination of SfxShell instance and SfxSlot).
+ In the SfxBindings it is stored, if and in this case which controllers
+ that are dirty and which Slot-Server-Caches are dirty respectively.
+ It summarizes status queries (calls to the status methods specified
+ in the IDL) that are served by the same state methods, and handles
+ the simulation of .
+*/
+
+{
+friend class SfxApplication;
+friend class SfxShell;
+friend class SfxBindings_Impl;
+
+ std::unique_ptr< SfxBindings_Impl> pImpl; // Data of the Bindings instance
+ SfxDispatcher* pDispatcher; // Dispatcher, to be used
+ sal_uInt16 nRegLevel; // Lock-Level while Reconfig
+
+private:
+ SAL_DLLPRIVATE const SfxPoolItem* Execute_Impl( sal_uInt16 nSlot, const SfxPoolItem **pArgs, sal_uInt16 nModi,
+ SfxCallMode nCall, const SfxPoolItem **pInternalArgs, bool bGlobalOnly=false);
+ SAL_DLLPRIVATE void SetSubBindings_Impl( SfxBindings* );
+ SAL_DLLPRIVATE void UpdateSlotServer_Impl(); // Update SlotServer
+ SAL_DLLPRIVATE std::unique_ptr CreateSet_Impl(SfxStateCache& rCache, const SfxSlot* &pRealSlot,
+ const SfxSlotServer**, SfxFoundCacheArr_Impl&);
+ SAL_DLLPRIVATE std::size_t GetSlotPos( sal_uInt16 nId, std::size_t nStartSearchAt = 0 );
+ SAL_DLLPRIVATE void Update_Impl(SfxStateCache& rCache);
+ static SAL_DLLPRIVATE void UpdateControllers_Impl(
+ const SfxFoundCache_Impl& rFound,
+ const SfxPoolItem *pItem,
+ SfxItemState eItemState );
+ SAL_DLLPRIVATE SfxStateCache* GetStateCache( sal_uInt16 nId, std::size_t * pPos);
+ DECL_DLLPRIVATE_LINK( NextJob, Timer *, void );
+ SAL_DLLPRIVATE bool NextJob_Impl(Timer const * pTimer);
+
+public:
+ SfxBindings();
+ virtual ~SfxBindings() override;
+
+ void HidePopups( bool bHide = true );
+
+ void SetDispatcher(SfxDispatcher *pDisp);
+
+ void Update( sal_uInt16 nId ); // For example, from Menu::Activate
+ void Update();
+ SAL_DLLPRIVATE void StartUpdate_Impl(bool bComplete=false);
+ void Invalidate( sal_uInt16 nId );
+ void Invalidate( const sal_uInt16* pIds );
+ void InvalidateShell( const SfxShell &rSh, bool bDeep = false );
+ void InvalidateAll( bool bWithMsg );
+ void SetState( const SfxItemSet &rSet );
+ void SetState( const SfxPoolItem &rItem );
+ void Invalidate( sal_uInt16 nId, bool bWithItem, bool bWithMsg=false);
+ bool IsInUpdate() const;
+ void SetVisibleState( sal_uInt16 nId, bool bShow );
+
+ SfxStateCache* GetStateCache( sal_uInt16 nId);
+ SAL_DLLPRIVATE SfxStateCache* GetAnyStateCache_Impl( sal_uInt16 nId );
+ /**
+ * @param rpState the caller has to delete the pointer
+ */
+ SfxItemState QueryState( sal_uInt16 nSID, std::unique_ptr &rpState );
+
+ void QueryControlState ( sal_uInt16 nSID, boost::property_tree::ptree& rState );
+
+ const SfxPoolItem* ExecuteSynchron( sal_uInt16 nSlot,
+ const SfxPoolItem **pArgs = nullptr);
+ bool Execute( sal_uInt16 nSlot,
+ const SfxPoolItem **pArgs = nullptr,
+ SfxCallMode nCall = SfxCallMode::SLOT);
+
+ SAL_DLLPRIVATE void SetDispatchProvider_Impl( const css::uno::Reference< css::frame::XDispatchProvider > & rFrame );
+ void SetActiveFrame( const css::uno::Reference< css::frame::XFrame > & rFrame );
+ css::uno::Reference< css::frame::XFrame > GetActiveFrame() const;
+ // Reconfig
+ sal_uInt16 EnterRegistrations(const char *pFile = nullptr, int nLine = 0);
+ void LeaveRegistrations( const char *pFile = nullptr, int nLine = 0 );
+ void Register( SfxControllerItem& rBinding );
+ void Release( SfxControllerItem& rBinding );
+ SfxDispatcher* GetDispatcher() const
+ { return pDispatcher; }
+ const css::uno::Reference< css::frame::XDispatchRecorder >& GetRecorder() const;
+ css::uno::Reference < css::frame::XDispatch >
+ GetDispatch( const SfxSlot*, const css::util::URL& aURL, bool bMasterCommand );
+ SAL_DLLPRIVATE void ContextChanged_Impl();
+ SAL_DLLPRIVATE void Execute_Impl( SfxRequest& rReq, const SfxSlot* pSlot, SfxShell* pShell );
+ SAL_DLLPRIVATE void DeleteControllers_Impl();
+ SAL_DLLPRIVATE SfxDispatcher* GetDispatcher_Impl() { return pDispatcher; }
+ SAL_DLLPRIVATE void ClearCache_Impl( sal_uInt16 nSlotId );
+ SAL_DLLPRIVATE void RegisterInternal_Impl( SfxControllerItem& rBinding );
+ SAL_DLLPRIVATE void Register_Impl( SfxControllerItem& rBinding, bool );
+ SAL_DLLPRIVATE SfxWorkWindow* GetWorkWindow_Impl() const;
+ SAL_DLLPRIVATE void SetWorkWindow_Impl( SfxWorkWindow* );
+ SAL_DLLPRIVATE SfxBindings* GetSubBindings_Impl() const;
+ SAL_DLLPRIVATE void SetRecorder_Impl( css::uno::Reference< css::frame::XDispatchRecorder > const & );
+ SAL_DLLPRIVATE void InvalidateSlotsInMap_Impl();
+ SAL_DLLPRIVATE void AddSlotToInvalidateSlotsMap_Impl( sal_uInt16 nId );
+};
+
+#ifdef DBG_UTIL
+#define ENTERREGISTRATIONS() EnterRegistrations(__FILE__, __LINE__)
+#define LEAVEREGISTRATIONS() LeaveRegistrations(__FILE__, __LINE__)
+#define DENTERREGISTRATIONS() \
+ EnterRegistrations( OStringBuffer(__FILE__).append('(').append(reinterpret_cast(this)).append(')').getStr(), __LINE__ )
+#define DLEAVEREGISTRATIONS( ) \
+ LeaveRegistrations( OStringBuffer(__FILE__).append('(').append(reinterpret_cast(this)).append(')').getStr(), __LINE__ )
+#else
+#define ENTERREGISTRATIONS() EnterRegistrations()
+#define LEAVEREGISTRATIONS() LeaveRegistrations()
+#define DENTERREGISTRATIONS() EnterRegistrations()
+#define DLEAVEREGISTRATIONS() LeaveRegistrations()
+#endif
+
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/sfx2/brokenpackageint.hxx b/include/sfx2/brokenpackageint.hxx
new file mode 100644
index 000000000..8f6b4a580
--- /dev/null
+++ b/include/sfx2/brokenpackageint.hxx
@@ -0,0 +1,58 @@
+/* -*- 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_SFX2_BROKENPACKAGEINT_HXX
+#define INCLUDED_SFX2_BROKENPACKAGEINT_HXX
+
+#include
+#include
+#include
+
+#include
+
+namespace com::sun::star::task { class XInteractionRequest; }
+
+class RequestPackageReparation_Impl;
+class SFX2_DLLPUBLIC RequestPackageReparation
+{
+ rtl::Reference mxImpl;
+public:
+ RequestPackageReparation( const OUString& aName );
+ ~RequestPackageReparation();
+ RequestPackageReparation( const RequestPackageReparation&) = delete;
+ RequestPackageReparation& operator=( const RequestPackageReparation&) = delete;
+ bool isApproved() const;
+ css::uno::Reference < css::task::XInteractionRequest > GetRequest();
+};
+
+class NotifyBrokenPackage_Impl;
+class SFX2_DLLPUBLIC NotifyBrokenPackage
+{
+ rtl::Reference mxImpl;
+public:
+ NotifyBrokenPackage( const OUString& aName );
+ ~NotifyBrokenPackage();
+ NotifyBrokenPackage( const NotifyBrokenPackage&) = delete;
+ NotifyBrokenPackage& operator=( const NotifyBrokenPackage&) = delete;
+ css::uno::Reference < css::task::XInteractionRequest > GetRequest();
+};
+
+#endif // INCLUDED_SFX2_BROKENPACKAGEINT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/sfx2/chalign.hxx b/include/sfx2/chalign.hxx
new file mode 100644
index 000000000..d63646ea1
--- /dev/null
+++ b/include/sfx2/chalign.hxx
@@ -0,0 +1,55 @@
+/* -*- 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_SFX2_CHALIGN_HXX
+#define INCLUDED_SFX2_CHALIGN_HXX
+
+// New order: first, navigation bar, then vertically docked child windows
+// (Explorer!), then horizontally docked child windows (Browser!),
+// then the format bar, status bar, and at the end of the toolbar.
+
+enum class SfxChildAlignment
+{
+ HIGHESTTOP, // for example Navigation bar
+ LOWESTBOTTOM,
+ FIRSTLEFT,
+ LASTRIGHT,
+ LEFT, // for example SplitWindow
+ RIGHT,
+ LASTLEFT,
+ FIRSTRIGHT,
+ TOP, // for example Hyperlink-Builder, SplitWindow
+ BOTTOM, // for example SplitWindow
+ TOOLBOXTOP, // for example Object bar
+ TOOLBOXBOTTOM,
+ LOWESTTOP, // for example Calc bar
+ HIGHESTBOTTOM, // for example Status bar
+ TOOLBOXLEFT, // for example Tool bar
+ TOOLBOXRIGHT,
+ NOALIGNMENT // all FloatingWindows
+};
+
+// Verifies that a valid alignment is used
+inline bool SfxChildAlignValid( SfxChildAlignment eAlign )
+{
+ return ( eAlign >= SfxChildAlignment::HIGHESTTOP && eAlign <= SfxChildAlignment::NOALIGNMENT );
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/sfx2/charmappopup.hxx b/include/sfx2/charmappopup.hxx
new file mode 100644
index 000000000..e9bb6244b
--- /dev/null
+++ b/include/sfx2/charmappopup.hxx
@@ -0,0 +1,45 @@
+/* -*- 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_SFX2_INC_CHARMAPPOPUP_HXX
+#define INCLUDED_SFX2_INC_CHARMAPPOPUP_HXX
+
+#include
+#include
+
+class CharmapPopup final : public svt::PopupWindowController
+{
+public:
+ CharmapPopup(const css::uno::Reference& rContext);
+ virtual ~CharmapPopup() override;
+
+ virtual VclPtr createVclPopupWindow( vcl::Window* pParent ) override;
+ virtual std::unique_ptr weldPopupWindow() override;
+
+ // XServiceInfo
+ virtual OUString SAL_CALL getImplementationName() override;
+ virtual css::uno::Sequence SAL_CALL getSupportedServiceNames() override;
+
+ // XInitialization
+ virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& rArguments ) override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/sfx2/charwin.hxx b/include/sfx2/charwin.hxx
new file mode 100644
index 000000000..26337be09
--- /dev/null
+++ b/include/sfx2/charwin.hxx
@@ -0,0 +1,75 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SFX2_INC_CHARWIN_HXX
+#define INCLUDED_SFX2_INC_CHARWIN_HXX
+
+#include
+#include
+#include
+#include
+
+class SFX2_DLLPUBLIC SvxCharView final : public weld::CustomWidgetController
+{
+private:
+ VclPtr mxVirDev;
+ long mnY;
+ Point maPosition;
+ vcl::Font maFont;
+ bool maHasInsert;
+ OUString m_sText;
+
+ Link maMouseClickHdl;
+ Link maClearClickHdl;
+ Link maClearAllClickHdl;
+
+ virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
+ virtual void Resize() override;
+ virtual bool MouseButtonDown(const MouseEvent&) override;
+ virtual void GetFocus() override;
+ virtual void LoseFocus() override;
+ virtual bool KeyInput(const KeyEvent&) override;
+ virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
+public:
+ SvxCharView(const VclPtr& rVirDev);
+
+ void SetFont( const vcl::Font& rFont );
+ vcl::Font const & GetFont() const { return maFont; }
+ void SetText( const OUString& rText );
+ OUString const & GetText() const { return m_sText; }
+ void SetHasInsert( bool bInsert );
+ void InsertCharToDoc();
+
+ void createContextMenu();
+
+ Size get_preferred_size() const { return GetDrawingArea()->get_preferred_size(); }
+
+ void connect_focus_in(const Link& rLink);
+ void connect_focus_out(const Link& rLink);
+
+ void setMouseClickHdl(const Link &rLink);
+ void setClearClickHdl(const Link &rLink);
+ void setClearAllClickHdl(const Link &rLink);
+
+ void ContextMenuSelect(const OString& rIdent);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/include/sfx2/childwin.hxx b/include/sfx2/childwin.hxx
new file mode 100644
index 000000000..3a945b47b
--- /dev/null
+++ b/include/sfx2/childwin.hxx
@@ -0,0 +1,312 @@
+/* -*- 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_SFX2_CHILDWIN_HXX
+#define INCLUDED_SFX2_CHILDWIN_HXX
+
+#include
+#include
+
+#include
+#include
+#include
+#include
+
+#include
+#include
+
+namespace com::sun::star::frame { class XFrame; }
+
+class SfxWorkWindow;
+class SfxModule;
+class SfxChildWindow;
+class SfxChildWindowContext;
+class SfxBindings;
+class SfxModelessDialogController;
+
+enum class SfxChildWindowFlags
+{
+ NONE = 0x000,
+ FORCEDOCK = 0x004, // Float forbidden
+ TASK = 0x010, // ChildWindow inside the Task
+ CANTGETFOCUS = 0x020, // ChildWindow can not get focus
+ ALWAYSAVAILABLE = 0x040, // ChildWindow is never disabled
+ NEVERHIDE = 0x080, // ChildWindow is always visible
+ NEVERCLONE = 0x100, // ChildWindow is not recreated in new view
+};
+
+namespace o3tl
+{
+ template<> struct typed_flags : is_typed_flags {};
+}
+
+
+#define CHILDWIN_NOPOS USHRT_MAX
+
+// ChildWindow Configuration
+struct SAL_DLLPUBLIC_RTTI SfxChildWinInfo
+{
+ bool bVisible;
+ Point aPos;
+ Size aSize;
+ SfxChildWindowFlags nFlags;
+ OUString aExtraString;
+ OUString aModule;
+ OString aWinState;
+
+ SfxChildWinInfo()
+ {
+ bVisible = false;
+ nFlags = SfxChildWindowFlags::NONE;
+ }
+ bool GetExtraData_Impl( SfxChildAlignment *pAlign ) const;
+};
+
+// ChildWindow factory methods
+typedef std::unique_ptr (*SfxChildWinCtor)( vcl::Window *pParentWindow,
+ sal_uInt16 nId,
+ SfxBindings *pBindings,
+ SfxChildWinInfo *pInfo);
+
+// ChildWindowsContexts factory methods
+typedef std::unique_ptr (*SfxChildWinContextCtor)( vcl::Window *pParentWindow,
+ SfxBindings *pBindings,
+ SfxChildWinInfo *pInfo);
+struct SfxChildWinContextFactory
+{
+ SfxChildWinContextCtor pCtor; // Factory method
+ sal_uInt16 nContextId; // Identifier for SfxInterface
+
+ SfxChildWinContextFactory( SfxChildWinContextCtor pTheCtor, sal_uInt16 nID )
+ : pCtor(pTheCtor)
+ , nContextId(nID)
+ {}
+};
+
+class SfxChildWinContextArr_Impl;
+
+struct SFX2_DLLPUBLIC SfxChildWinFactory
+{
+ SfxChildWinCtor pCtor; // Factory method
+ sal_uInt16 nId; // ChildWindow-Id ( SlotId )
+ SfxChildWinInfo aInfo; // Configuration
+ sal_uInt16 nPos; // Position in UI
+ std::unique_ptr pArr; // Array for Contexts
+
+ SfxChildWinFactory( SfxChildWinCtor pTheCtor, sal_uInt16 nID, sal_uInt16 n );
+ ~SfxChildWinFactory();
+};
+
+class FloatingWindow;
+struct SfxChildWindow_Impl;
+class SFX2_DLLPUBLIC SfxChildWindowContext
+{
+friend class SfxChildWindow;
+ VclPtr pWindow;
+ sal_uInt16 nContextId;
+
+protected:
+ SfxChildWindowContext( sal_uInt16 nId );
+
+public:
+ virtual ~SfxChildWindowContext();
+
+ void SetWindow( vcl::Window* pWin )
+ { pWindow=pWin; }
+ vcl::Window* GetWindow() const
+ { return pWindow; }
+ sal_uInt16 GetContextId() const
+ { return nContextId; }
+
+ static FloatingWindow* GetFloatingWindow(vcl::Window *pParent);
+
+ static void RegisterChildWindowContext(SfxModule*, sal_uInt16, std::unique_ptr);
+};
+
+class SFX2_DLLPUBLIC SfxChildWindow
+{
+ VclPtr pParent; // parent window ( Topwindow )
+ sal_uInt16 nType; // ChildWindow-Id
+ VclPtr pWindow; // actual contents
+ std::shared_ptr xController; // actual contents
+ SfxChildAlignment eChildAlignment; // Current css::drawing::Alignment
+ std::unique_ptr< SfxChildWindow_Impl> pImpl; // Implementation data
+ std::unique_ptr pContext; // With context-sensitive ChildWindows:
+ // Another window in pWindow
+ SAL_DLLPRIVATE void ClearWorkwin();
+
+protected:
+ void SetWindow(const VclPtr& p) { pWindow = p; }
+ SfxChildWindow(vcl::Window *pParentWindow, sal_uInt16 nId);
+
+public:
+ virtual ~SfxChildWindow();
+ void Destroy();
+ vcl::Window* GetWindow() const
+ { return pWindow; }
+ void SetController(std::shared_ptr controller) { xController = controller; }
+ void ClearController() { xController.reset(); }
+ std::shared_ptr& GetController() { return xController; }
+ const std::shared_ptr& GetController() const { return xController; }
+ vcl::Window* GetParent() const
+ { return pParent; }
+ SfxChildAlignment GetAlignment() const
+ { return eChildAlignment; }
+ void SetAlignment(SfxChildAlignment eAlign);
+ virtual void Hide();
+ virtual void Show( ShowFlags nFlags );
+ sal_uInt16 GetPosition() const;
+ sal_uInt16 GetType() const
+ { return nType; }
+
+ void CreateContext( sal_uInt16 nContextId, SfxBindings& );
+ sal_uInt16 GetContextId() const
+ { return pContext ? pContext->GetContextId(): 0; }
+
+ vcl::Window* GetContextWindow() const
+ { return pContext ? pContext->GetWindow(): nullptr; }
+
+ vcl::Window* GetContextWindow( SfxModule const *pModule ) const;
+
+ virtual SfxChildWinInfo GetInfo() const;
+ void SaveStatus(const SfxChildWinInfo& rInfo);
+
+ static void RegisterChildWindow(SfxModule*, std::unique_ptr);
+
+ static std::unique_ptr CreateChildWindow( sal_uInt16, vcl::Window*, SfxBindings*, SfxChildWinInfo const &);
+ void SetHideNotDelete( bool bOn );
+ bool IsHideNotDelete() const;
+ bool IsVisible() const;
+ void SetWantsFocus( bool );
+ bool WantsFocus() const;
+
+ virtual bool QueryClose();
+ const css::uno::Reference< css::frame::XFrame >& GetFrame() const;
+ void SetFrame( const css::uno::Reference< css::frame::XFrame > & );
+
+ SAL_DLLPRIVATE static void InitializeChildWinFactory_Impl(sal_uInt16, SfxChildWinInfo&);
+ void SetVisible_Impl( bool bVis );
+ SAL_DLLPRIVATE void SetWorkWindow_Impl( SfxWorkWindow* );
+ SAL_DLLPRIVATE void Activate_Impl();
+
+ SAL_DLLPRIVATE SfxChildWindowContext*
+ GetContext_Impl() const
+ { return pContext.get(); }
+ SAL_DLLPRIVATE void SetFactory_Impl( SfxChildWinFactory* );
+};
+
+
+//! The Macro of the future ...
+#define SFX_DECL_CHILDWINDOWCONTEXT(Class) \
+ static std::unique_ptr CreateImpl(vcl::Window *pParent, \
+ SfxBindings *pBindings, SfxChildWinInfo* pInfo ); \
+ static void RegisterChildWindowContext(sal_uInt16, SfxModule *pMod=nullptr); \
+
+//! The Macro of the future ...
+// As a parameter and because of ContextId, CreateImpl must be handed the
+// factory. As long as Id is set to 0 and patched in
+// SfxChildWindow::CreateContext
+#define SFX_IMPL_CHILDWINDOWCONTEXT(Class, MyID) \
+ std::unique_ptr Class::CreateImpl( vcl::Window *pParent, \
+ SfxBindings *pBindings, SfxChildWinInfo* pInfo ) \
+ { \
+ return std::make_unique(pParent,0,pBindings,pInfo);\
+ } \
+ void Class::RegisterChildWindowContext(sal_uInt16 nId, SfxModule* pMod) \
+ { \
+ auto pFact = std::make_unique( \
+ Class::CreateImpl, nId ); \
+ SfxChildWindowContext::RegisterChildWindowContext(pMod, MyID, std::move(pFact)); \
+ }
+
+#define SFX_DECL_CHILDWINDOW(Class) \
+ public : \
+ static std::unique_ptr CreateImpl(vcl::Window *pParent, sal_uInt16 nId, \
+ SfxBindings *pBindings, SfxChildWinInfo* pInfo ); \
+ static void RegisterChildWindow (bool bVisible=false, SfxModule *pMod=nullptr, SfxChildWindowFlags nFlags=SfxChildWindowFlags::NONE); \
+ virtual SfxChildWinInfo GetInfo() const override
+
+#define SFX_DECL_CHILDWINDOW_WITHID(Class) \
+ SFX_DECL_CHILDWINDOW(Class); \
+ static sal_uInt16 GetChildWindowId ()\
+
+#define SFX_IMPL_CHILDWINDOW(Class, MyID) \
+ SFX_IMPL_POS_CHILDWINDOW(Class, MyID, CHILDWIN_NOPOS)
+
+#define SFX_IMPL_CHILDWINDOW_WITHID(Class, MyID) \
+ SFX_IMPL_POS_CHILDWINDOW_WITHID(Class, MyID, CHILDWIN_NOPOS)
+
+#define SFX_IMPL_POS_CHILDWINDOW(Class, MyID, Pos) \
+ std::unique_ptr Class::CreateImpl( vcl::Window *pParent, \
+ sal_uInt16 nId, SfxBindings *pBindings, SfxChildWinInfo* pInfo ) \
+ { \
+ return std::make_unique(pParent, nId, pBindings, pInfo);\
+ } \
+ void Class::RegisterChildWindow (bool bVis, SfxModule *pMod, SfxChildWindowFlags nFlags) \
+ { \
+ auto pFact = std::make_unique( \
+ Class::CreateImpl, MyID, Pos ); \
+ pFact->aInfo.nFlags |= nFlags; \
+ pFact->aInfo.bVisible = bVis; \
+ SfxChildWindow::RegisterChildWindow(pMod, std::move(pFact)); \
+ }
+
+#define SFX_IMPL_POS_CHILDWINDOW_WITHID(Class, MyID, Pos) \
+ SFX_IMPL_POS_CHILDWINDOW(Class, MyID, Pos) \
+ sal_uInt16 Class::GetChildWindowId () \
+ { return MyID; } \
+
+#define SFX_IMPL_MODELESSDIALOGCONTOLLER(Class, MyID) \
+ SFX_IMPL_CHILDWINDOW(Class, MyID) \
+ SfxChildWinInfo Class::GetInfo() const \
+ { \
+ SfxChildWinInfo aInfo = SfxChildWindow::GetInfo(); \
+ static_cast(GetController().get())->FillInfo( aInfo ); \
+ return aInfo; }
+
+#define SFX_IMPL_MODELESSDIALOGCONTOLLER_WITHID(Class, MyID) \
+ SFX_IMPL_CHILDWINDOW_WITHID(Class, MyID) \
+ SfxChildWinInfo Class::GetInfo() const \
+ { \
+ SfxChildWinInfo aInfo = SfxChildWindow::GetInfo(); \
+ static_cast(GetController().get())->FillInfo( aInfo ); \
+ return aInfo; }
+
+#define SFX_IMPL_DOCKINGWINDOW(Class, MyID) \
+ SFX_IMPL_CHILDWINDOW(Class, MyID) \
+ SfxChildWinInfo Class::GetInfo() const \
+ { \
+ SfxChildWinInfo aInfo = SfxChildWindow::GetInfo(); \
+ static_cast(GetWindow())->FillInfo( aInfo ); \
+ return aInfo; }
+
+#define SFX_IMPL_DOCKINGWINDOW_WITHID(Class, MyID) \
+ SFX_IMPL_CHILDWINDOW_WITHID(Class, MyID) \
+ SfxChildWinInfo Class::GetInfo() const \
+ { \
+ SfxChildWinInfo aInfo = SfxChildWindow::GetInfo(); \
+ static_cast(GetWindow())->FillInfo( aInfo ); \
+ return aInfo; }
+
+bool GetPosSizeFromString( const OUString& rStr, Point& rPos, Size& rSize );
+
+bool GetSplitSizeFromString( const OUString& rStr, Size& rSize );
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/sfx2/classificationhelper.hxx b/include/sfx2/classificationhelper.hxx
new file mode 100644
index 000000000..777001fd9
--- /dev/null
+++ b/include/sfx2/classificationhelper.hxx
@@ -0,0 +1,227 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_SFX2_CLASSIFICATIONHELPER_HXX
+#define INCLUDED_SFX2_CLASSIFICATIONHELPER_HXX
+
+#include
+#include
+
+#include
+#include
+#include
+
+namespace com::sun::star::beans { class XPropertyContainer; }
+namespace com::sun::star::document { class XDocumentProperties; }
+
+class SfxViewFrame;
+
+/// Return code of SfxClassificationHelper::CheckPaste().
+enum class SfxClassificationCheckPasteResult
+{
+ None = 1,
+ TargetDocNotClassified = 2,
+ DocClassificationTooLow = 3
+};
+
+/// Specifies a policy type, to be used with SetBACName(). Getters always use IntellectualProperty for now.
+enum class SfxClassificationPolicyType
+{
+ ExportControl = 1,
+ NationalSecurity = 2,
+ IntellectualProperty = 3
+};
+
+/// Shared code to handle Business Authorization Identification and Labeling Scheme (BAILS) properties.
+class SFX2_DLLPUBLIC SfxClassificationHelper
+{
+ class SAL_DLLPRIVATE Impl;
+ std::unique_ptr m_pImpl;
+
+public:
+ /// Does the document have any BAILS properties?
+ static bool IsClassified(const css::uno::Reference& xDocumentProperties);
+ /// Checks if pasting from xSource to xDestination would leak information.
+ static SfxClassificationCheckPasteResult CheckPaste(const css::uno::Reference& xSource,
+ const css::uno::Reference& xDestination);
+ /// Wrapper around CheckPaste(): informs the user if necessary and finds out if the paste can be continued or not.
+ static bool ShowPasteInfo(SfxClassificationCheckPasteResult eResult);
+
+ SfxClassificationHelper(const css::uno::Reference& xDocumentProperties, bool bUseLocalizedPolicy = true);
+ ~SfxClassificationHelper();
+ /// Get the currently selected category for eType.
+ const OUString& GetBACName(SfxClassificationPolicyType eType) const;
+ /// Return all possible valid category names, based on the policy.
+ std::vector GetBACNames();
+ /// Return all possible valid category identifiers, based on the policy.
+ std::vector GetBACIdentifiers();
+ /// Get the currently selected category abbreviation for eType. Returns full name if no abbreviation defined.
+ const OUString& GetAbbreviatedBACName(const OUString& sFullName);
+ /// Get the currently selected category for the identifier.
+ OUString GetBACNameForIdentifier(const OUString& sIdentifier);
+ /// Return all possible valid abbreviated category names, based on the policy.
+ std::vector GetAbbreviatedBACNames();
+ /// Setting this sets all the other properties, based on the policy.
+ void SetBACName(const OUString& rName, SfxClassificationPolicyType eType);
+ /// Returns the class with the higher priority (based on sensitivity).
+ OUString GetHigherClass(const OUString& first, const OUString& second);
+ /// If GetImpactScale() and GetImpactLevel*() will return something meaningful.
+ bool HasImpactLevel();
+ InfobarType GetImpactLevelType();
+ /// Larger value means more confidential.
+ sal_Int32 GetImpactLevel();
+ /// Comparing the GetImpactLevel() result is only meaningful when the impact scale is the same.
+ OUString GetImpactScale();
+ OUString GetDocumentWatermark();
+ /// The selected category has some content for the document header.
+ bool HasDocumentHeader();
+ /// The selected category has some content for the document footer.
+ bool HasDocumentFooter();
+ void UpdateInfobar(SfxViewFrame& rViewFrame);
+
+ std::vector const & GetMarkings() const;
+ std::vector const & GetIntellectualPropertyParts() const;
+ std::vector const & GetIntellectualPropertyPartNumbers() const;
+
+ /// Does a best-effort conversion of rType to SfxClassificationPolicyType.
+ static SfxClassificationPolicyType stringToPolicyType(const OUString& rType);
+ /// Returns the string representation of a SfxClassificationPolicyType element.
+ static const OUString& policyTypeToString(SfxClassificationPolicyType eType);
+
+ /// Brief text located at the top of each document's pages.
+ static const OUString& PROP_DOCHEADER();
+ /// Brief text located at the bottom of each document's pages.
+ static const OUString& PROP_DOCFOOTER();
+ /// Brief text formatted as a watermark on each document's page.
+ static const OUString& PROP_DOCWATERMARK();
+ /// Get the property prefix for the IntellectualProperty policy type.
+ static const OUString& PROP_PREFIX_INTELLECTUALPROPERTY();
+
+ static SfxClassificationPolicyType getPolicyType();
+};
+
+namespace sfx
+{
+
+/// Specifies the origin: either defined by the BAF policy or manual via. the advanced classification dialog
+enum class ClassificationCreationOrigin
+{
+ NONE,
+ BAF_POLICY,
+ MANUAL
+};
+
+class ClassificationKeyCreator
+{
+private:
+ const SfxClassificationPolicyType m_ePolicyType;
+ const OUString m_sPolicy;
+ sal_Int32 m_nTextNumber;
+ sal_Int32 m_nIPPartNumber;
+ sal_Int32 m_nMarkingNumber;
+
+ OUString const & getPolicyKey() const
+ {
+ return m_sPolicy;
+ }
+public:
+ ClassificationKeyCreator(SfxClassificationPolicyType ePolicyType)
+ : m_ePolicyType(ePolicyType)
+ , m_sPolicy(SfxClassificationHelper::policyTypeToString(m_ePolicyType))
+ , m_nTextNumber(1)
+ , m_nIPPartNumber(1)
+ , m_nMarkingNumber(1)
+ {}
+
+ OUString makeTextKey() const
+ {
+ return getPolicyKey() + "Custom:Text";
+ }
+
+ OUString makeNumberedTextKey()
+ {
+ return makeTextKey() + ":n" + OUString::number(m_nTextNumber++);
+ }
+
+ bool isMarkingTextKey(OUString const & aKey) const
+ {
+ return aKey.startsWith(makeTextKey());
+ }
+
+ OUString makeCategoryNameKey() const
+ {
+ return getPolicyKey() + "BusinessAuthorizationCategory:Name";
+ }
+
+ bool isCategoryNameKey(OUString const & aKey) const
+ {
+ return aKey.startsWith(makeCategoryNameKey());
+ }
+
+ OUString makeCategoryIdentifierKey() const
+ {
+ return getPolicyKey() + "BusinessAuthorizationCategory:Identifier";
+ }
+
+ bool isCategoryIdentifierKey(OUString const & aKey) const
+ {
+ return aKey.startsWith(makeCategoryIdentifierKey());
+ }
+
+ OUString makeMarkingKey() const
+ {
+ return getPolicyKey() + "Custom:Marking";
+ }
+
+ OUString makeNumberedMarkingKey()
+ {
+ return makeMarkingKey() + ":n" + OUString::number(m_nMarkingNumber++);
+ }
+
+ bool isMarkingKey(OUString const & aKey) const
+ {
+ return aKey.startsWith(makeMarkingKey());
+ }
+
+ OUString makeIntellectualPropertyPartKey() const
+ {
+ return getPolicyKey() + "Custom:IntellectualPropertyPart";
+ }
+
+ OUString makeNumberedIntellectualPropertyPartKey()
+ {
+ return makeIntellectualPropertyPartKey() + ":n" + OUString::number(m_nIPPartNumber++);
+ }
+
+ bool isIntellectualPropertyPartKey(OUString const & aKey) const
+ {
+ return aKey.startsWith(makeIntellectualPropertyPartKey());
+ }
+
+ OUString makeFullTextualRepresentationKey() const
+ {
+ return getPolicyKey() + "Custom:FullTexturalRepresentation";
+ }
+
+ /// Classification creation origin key
+ OUString makeCreationOriginKey() const
+ {
+ return getPolicyKey() + "CreationOrigin";
+ }
+};
+
+SFX2_DLLPUBLIC sfx::ClassificationCreationOrigin getCreationOriginProperty(
+ css::uno::Reference const & rxPropertyContainer,
+ sfx::ClassificationKeyCreator const & rKeyCreator);
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/sfx2/ctrlitem.hxx b/include/sfx2/ctrlitem.hxx
new file mode 100644
index 000000000..489fdb946
--- /dev/null
+++ b/include/sfx2/ctrlitem.hxx
@@ -0,0 +1,91 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SFX2_CTRLITEM_HXX
+#define INCLUDED_SFX2_CTRLITEM_HXX
+
+#include
+#include
+#include
+#include
+#include
+
+class SfxBindings;
+
+class SFX2_DLLPUBLIC SfxControllerItem
+{
+private:
+ sal_uInt16 nId;
+ SfxControllerItem* pNext; // to notify next ControllerItem
+ SfxBindings* pBindings;
+
+public:
+ SfxBindings & GetBindings() {
+ DBG_ASSERT(pBindings, "no Bindings");
+ return *pBindings;
+ }
+ const SfxBindings & GetBindings() const {
+ DBG_ASSERT(pBindings, "no Bindings");
+ return *pBindings;
+ }
+
+ SfxControllerItem(); // for arrays
+ SfxControllerItem( sal_uInt16 nId, SfxBindings & );
+ virtual ~SfxControllerItem();
+ virtual void dispose();
+
+ void Bind( sal_uInt16 nNewId, SfxBindings *); // Register in SfxBindings
+ void UnBind();
+ void ReBind();
+ bool IsBound() const;
+ void ClearCache();
+
+ SfxControllerItem* GetItemLink();
+ SfxControllerItem* ChangeItemLink( SfxControllerItem* pNewLink );
+
+ void SetId( sal_uInt16 nItemId );
+ sal_uInt16 GetId() const { return nId; }
+
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
+ const SfxPoolItem* pState );
+
+ virtual void GetControlState( sal_uInt16 nSID, boost::property_tree::ptree& );
+
+ MapUnit GetCoreMetric() const;
+
+ static SfxItemState GetItemState( const SfxPoolItem* pState );
+
+ SAL_DLLPRIVATE void BindInternal_Impl( sal_uInt16 nNewId, SfxBindings* );
+};
+
+
+class SFX2_DLLPUBLIC SfxStatusForwarder final : public SfxControllerItem
+{
+ SfxControllerItem* pMaster;
+
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
+ const SfxPoolItem* pState ) override;
+
+public:
+ SfxStatusForwarder( sal_uInt16 nSlotId,
+ SfxControllerItem&rMaster );
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/sfx2/dialoghelper.hxx b/include/sfx2/dialoghelper.hxx
new file mode 100644
index 000000000..c18545a75
--- /dev/null
+++ b/include/sfx2/dialoghelper.hxx
@@ -0,0 +1,41 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_SFX2_DIALOGHELPER_HXX
+#define INCLUDED_SFX2_DIALOGHELPER_HXX
+
+#include
+#include
+#include
+
+class DateTime;
+class LocaleDataWrapper;
+namespace vcl { class Window; }
+class OutputDevice;
+
+//when two tab pages both have the same basic layout with a preview on the
+//right, get both of their non-preview areas to request the same size so that
+//the preview appears in the same place in each one so flipping between tabs
+//isn't distracting as it jumps around
+
+Size SFX2_DLLPUBLIC getParagraphPreviewOptimalSize(const OutputDevice& rReference);
+
+Size SFX2_DLLPUBLIC getDrawPreviewOptimalSize(const OutputDevice& rReference);
+
+Size SFX2_DLLPUBLIC getPreviewStripSize(const OutputDevice& rReference);
+
+Size SFX2_DLLPUBLIC getPreviewOptionsSize(const OutputDevice& rReference);
+
+OUString SFX2_DLLPUBLIC getWidestTime(const LocaleDataWrapper& rWrapper);
+
+OUString SFX2_DLLPUBLIC formatTime(const DateTime& rDateTime, const LocaleDataWrapper& rWrapper);
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
new file mode 100644
index 000000000..09e2473b9
--- /dev/null
+++ b/include/sfx2/dinfdlg.hxx
@@ -0,0 +1,565 @@
+/* -*- 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_SFX2_DINFDLG_HXX
+#define INCLUDED_SFX2_DINFDLG_HXX
+
+#include
+#include
+#include
+
+#include
+#include
+#include
+#include
+
+#include
+#include
+
+#include
+
+#include
+
+#include
+#include
+
+namespace com::sun::star::beans { struct PropertyValue; }
+
+namespace com::sun::star {
+ namespace document {
+ class XDocumentProperties;
+ }
+}
+
+struct CustomProperty;
+class SvtCalendarBox;
+
+// class SfxDocumentInfoItem ---------------------------------------------
+
+class UNLESS_MERGELIBS(SFX2_DLLPUBLIC) SfxDocumentInfoItem final : public SfxStringItem
+{
+private:
+ sal_Int32 m_AutoloadDelay;
+ OUString m_AutoloadURL;
+ bool m_isAutoloadEnabled;
+ OUString m_DefaultTarget;
+ OUString m_TemplateName;
+ OUString m_Author;
+ css::util::DateTime m_CreationDate;
+ OUString m_ModifiedBy;
+ css::util::DateTime m_ModificationDate;
+ OUString m_PrintedBy;
+ css::util::DateTime m_PrintDate;
+ sal_Int16 m_EditingCycles;
+ sal_Int32 m_EditingDuration;
+ OUString m_Description;
+ OUString m_Keywords;
+ OUString m_Subject;
+ OUString m_Title;
+ bool m_bHasTemplate;
+ bool m_bDeleteUserData;
+ bool m_bUseUserData;
+ bool m_bUseThumbnailSave;
+ std::vector< std::unique_ptr > m_aCustomProperties;
+ css::uno::Sequence< css::document::CmisProperty > m_aCmisProperties;
+
+public:
+ static SfxPoolItem* CreateDefault();
+ SfxDocumentInfoItem();
+ SfxDocumentInfoItem( const OUString &rFileName,
+ const css::uno::Reference< css::document::XDocumentProperties> & i_xDocProps,
+ const css::uno::Sequence< css::document::CmisProperty> & i_cmisProps,
+ bool bUseUserData, bool bUseThumbnailSave );
+ SfxDocumentInfoItem( const SfxDocumentInfoItem& );
+ virtual ~SfxDocumentInfoItem() override;
+
+ /// update i_xDocProps with the data in this object
+ void UpdateDocumentInfo(
+ const css::uno::Reference< css::document::XDocumentProperties> & i_xDocProps,
+ bool i_bDoNotUpdateUserDefined = false)
+ const;
+ bool isCmisDocument() const { return m_aCmisProperties.hasElements();}
+
+ bool isAutoloadEnabled() const { return m_isAutoloadEnabled; }
+ sal_Int32 getAutoloadDelay() const { return m_AutoloadDelay; }
+ const OUString& getAutoloadURL() const { return m_AutoloadURL; }
+ const OUString& getDefaultTarget() const { return m_DefaultTarget; }
+ const OUString& getTemplateName() const { return m_TemplateName; }
+ const OUString& getAuthor() const { return m_Author; }
+
+ const css::util::DateTime&
+ getCreationDate() const { return m_CreationDate; }
+ const OUString& getModifiedBy() const { return m_ModifiedBy; }
+
+ const css::util::DateTime&
+ getModificationDate() const { return m_ModificationDate; }
+ const OUString& getPrintedBy() const { return m_PrintedBy; }
+ const css::util::DateTime&
+ getPrintDate() const { return m_PrintDate; }
+ sal_Int16 getEditingCycles() const { return m_EditingCycles; }
+ sal_Int32 getEditingDuration() const { return m_EditingDuration; }
+ const OUString& getDescription() const { return m_Description; }
+ void setDescription(const OUString& i_val) { m_Description = i_val; }
+ const OUString& getKeywords() const { return m_Keywords; }
+ void setKeywords(const OUString& i_val) { m_Keywords = i_val; }
+ const OUString& getSubject() const { return m_Subject; }
+ void setSubject(const OUString& i_val) { m_Subject = i_val; }
+ const OUString& getTitle() const { return m_Title; }
+ void setTitle(const OUString& i_val) { m_Title = i_val; }
+
+ /// reset user-specific data (author, modified-by, ...)
+ void resetUserData(const OUString & i_rAuthor);
+
+ void SetTemplate( bool b ) { m_bHasTemplate = b; }
+ bool HasTemplate() const { return m_bHasTemplate; }
+ void SetDeleteUserData( bool bSet );
+ void SetUseUserData( bool bSet );
+ void SetUseThumbnailSave( bool bSet );
+ bool IsUseUserData() const { return m_bUseUserData;}
+ bool IsUseThumbnailSave() const { return m_bUseThumbnailSave;}
+
+
+ std::vector< std::unique_ptr > GetCustomProperties() const;
+ void ClearCustomProperties();
+ void AddCustomProperty( const OUString& sName,
+ const css::uno::Any& rValue );
+
+ const css::uno::Sequence< css::document::CmisProperty >&
+ GetCmisProperties() const { return m_aCmisProperties;}
+
+ void SetCmisProperties(const css::uno::Sequence< css::document::CmisProperty >& cmisProps );
+ virtual SfxDocumentInfoItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+ virtual bool operator==( const SfxPoolItem& ) const override;
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+};
+
+// class SfxDocumentPage -------------------------------------------------
+
+class SfxDocumentPage final : public SfxTabPage
+{
+private:
+ OUString m_aUnknownSize;
+ OUString m_aMultiSignedStr;
+
+ bool bEnableUseUserData : 1,
+ bHandleDelete : 1;
+
+ std::unique_ptr m_xBmp;
+ std::unique_ptr m_xNameED;
+ std::unique_ptr m_xChangePassBtn;
+
+ std::unique_ptr m_xShowTypeFT;
+ std::unique_ptr m_xFileValEd;
+ std::unique_ptr m_xShowSizeFT;
+
+ std::unique_ptr m_xCreateValFt;
+ std::unique_ptr m_xChangeValFt;
+ std::unique_ptr m_xSignedValFt;
+ std::unique_ptr m_xSignatureBtn;
+ std::unique_ptr m_xPrintValFt;
+ std::unique_ptr m_xTimeLogValFt;
+ std::unique_ptr m_xDocNoValFt;
+
+ std::unique_ptr m_xUseUserDataCB;
+ std::unique_ptr m_xDeleteBtn;
+ std::unique_ptr m_xUseThumbnailSaveCB;
+
+ std::unique_ptr m_xTemplFt;
+ std::unique_ptr m_xTemplValFt;
+
+ DECL_LINK(DeleteHdl, weld::Button&, void);
+ DECL_LINK(SignatureHdl, weld::Button&, void);
+ DECL_LINK(ChangePassHdl, weld::Button&, void);
+ void ImplUpdateSignatures();
+ void ImplCheckPasswordState();
+
+ virtual bool FillItemSet( SfxItemSet* ) override;
+ virtual void Reset( const SfxItemSet* ) override;
+
+public:
+ SfxDocumentPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet&);
+ static std::unique_ptr Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
+ virtual ~SfxDocumentPage() override;
+
+ void EnableUseUserData();
+};
+
+// class SfxDocumentDescPage ---------------------------------------------
+
+class SfxDocumentDescPage final : public SfxTabPage
+{
+private:
+ SfxDocumentInfoItem* m_pInfoItem;
+ std::unique_ptr m_xTitleEd;
+ std::unique_ptr m_xThemaEd;
+ std::unique_ptr m_xKeywordsEd;
+ std::unique_ptr m_xCommentEd;
+
+ virtual bool FillItemSet( SfxItemSet* ) override;
+ virtual void Reset( const SfxItemSet* ) override;
+
+public:
+ SfxDocumentDescPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet&);
+ virtual ~SfxDocumentDescPage() override;
+ static std::unique_ptr Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
+};
+
+// class SfxDocumentInfoDialog -------------------------------------------
+
+class SFX2_DLLPUBLIC SfxDocumentInfoDialog final : public SfxTabDialogController
+{
+ virtual void PageCreated(const OString& rId, SfxTabPage& rPage) override;
+
+public:
+ SfxDocumentInfoDialog(weld::Window* pParent, const SfxItemSet&);
+ void AddFontTabPage();
+};
+
+// class CustomPropertiesRemoveButton ------------------------------------
+struct CustomPropertyLine;
+
+class CustomPropertiesDateField
+{
+private:
+ std::unique_ptr m_xDateField;
+public:
+ ::std::optional m_TZ;
+
+ CustomPropertiesDateField(SvtCalendarBox* pDateField);
+ void set_visible(bool bVisible);
+ Date get_date() const;
+ void set_date(const Date& rDate);
+ ~CustomPropertiesDateField();
+};
+
+class CustomPropertiesTimeField
+{
+public:
+ std::unique_ptr m_xTimeField;
+ bool m_isUTC;
+
+ CustomPropertiesTimeField(std::unique_ptr xTimeField);
+ void set_visible(bool bVisible) { m_xTimeField->set_visible(bVisible); }
+ tools::Time get_value() const { return m_xTimeField->get_value(); }
+ void set_value(const tools::Time& rTime) { m_xTimeField->set_value(rTime); }
+ ~CustomPropertiesTimeField();
+};
+
+class CustomPropertiesDurationField
+{
+ css::util::Duration m_aDuration;
+ std::unique_ptr m_xEntry;
+ std::unique_ptr m_xEditButton;
+
+ DECL_LINK(ClickHdl, weld::Button&, void);
+public:
+ CustomPropertiesDurationField(std::unique_ptr xEntry,
+ std::unique_ptr xEditButton);
+
+ void SetDuration( const css::util::Duration& rDuration );
+ const css::util::Duration& GetDuration() const { return m_aDuration; }
+
+ void set_visible(bool bVisible);
+};
+
+class CustomPropertiesYesNoButton
+{
+private:
+ std::unique_ptr m_xTopLevel;
+ std::unique_ptr m_xYesButton;
+ std::unique_ptr m_xNoButton;
+
+public:
+ CustomPropertiesYesNoButton(std::unique_ptr,
+ std::unique_ptr xYesButton,
+ std::unique_ptr xNoButton);
+ ~CustomPropertiesYesNoButton();
+
+ void CheckYes() { m_xYesButton->set_active(true); }
+ void CheckNo() { m_xNoButton->set_active(true); }
+ bool IsYesChecked() const { return m_xYesButton->get_active(); }
+ void set_visible(bool bVisible) { m_xTopLevel->set_visible(bVisible); }
+};
+
+class CustomPropertiesWindow;
+
+// struct CustomPropertyLine ---------------------------------------------
+struct CustomPropertyLine
+{
+ CustomPropertiesWindow* m_pParent;
+
+ std::unique_ptr m_xBuilder;
+ std::unique_ptr m_xLine;
+ std::unique_ptr m_xNameBox;
+ std::unique_ptr m_xTypeBox;
+ std::unique_ptr m_xValueEdit;
+ std::unique_ptr m_xDateTimeBox;
+ std::unique_ptr m_xDateField;
+ std::unique_ptr m_xTimeField;
+ std::unique_ptr m_xDurationBox;
+ std::unique_ptr m_xDurationField;
+ std::unique_ptr m_xYesNoButton;
+ std::unique_ptr m_xRemoveButton;
+
+ bool m_bTypeLostFocus;
+
+ CustomPropertyLine(CustomPropertiesWindow* pParent, weld::Widget* pContainer);
+ DECL_LINK(TypeHdl, weld::ComboBox&, void);
+ DECL_LINK(RemoveHdl, weld::Button&, void);
+ DECL_LINK(EditLoseFocusHdl, weld::Widget&, void);
+ DECL_LINK(BoxLoseFocusHdl, weld::Widget&, void);
+
+ void DoTypeHdl(const weld::ComboBox& rBox);
+
+ void Clear();
+ void Hide();
+};
+
+// class CustomPropertiesWindow ------------------------------------------
+
+class CustomPropertiesWindow
+{
+private:
+ sal_Int32 m_nHeight;
+ sal_Int32 m_nLineHeight;
+ sal_Int32 m_nScrollPos;
+ std::vector> m_aCustomProperties;
+ std::vector> m_aCustomPropertiesLines;
+ CustomPropertyLine* m_pCurrentLine;
+ SvNumberFormatter m_aNumberFormatter;
+ Idle m_aEditLoseFocusIdle;
+ Idle m_aBoxLoseFocusIdle;
+ Link m_aRemovedHdl;
+
+ weld::Container& m_rBody;
+ weld::Label& m_rHeaderAccName;
+ weld::Label& m_rHeaderAccType;
+ weld::Label& m_rHeaderAccValue;
+
+ DECL_LINK(EditTimeoutHdl, Timer *, void);
+ DECL_LINK(BoxTimeoutHdl, Timer *, void);
+
+ bool IsLineValid( CustomPropertyLine* pLine ) const;
+ void ValidateLine( CustomPropertyLine* pLine, bool bIsFromTypeBox );
+ void CreateNewLine();
+ void StoreCustomProperties();
+ sal_uInt32 GetCurrentDataModelPosition() const { return -1 * m_nScrollPos / m_nLineHeight; }
+
+public:
+ CustomPropertiesWindow(weld::Container& rParent, weld::Label& rHeaderAccName,
+ weld::Label& rHeaderAccType, weld::Label& rHeaderAccValue);
+ ~CustomPropertiesWindow();
+
+ sal_uInt16 GetExistingLineCount() const { return m_aCustomPropertiesLines.size(); }
+ sal_uInt16 GetTotalLineCount() const { return m_aCustomProperties.size(); }
+ void SetVisibleLineCount(sal_uInt32 nCount);
+ sal_Int32 GetHeight() const { return m_nHeight; }
+ void SetHeight(int nHeight) { m_nHeight = nHeight; }
+ sal_Int32 GetLineHeight() const { return m_nLineHeight; }
+ void SetLineHeight(sal_Int32 nLineHeight) { m_nLineHeight = nLineHeight; }
+ void AddLine( const OUString& sName, css::uno::Any const & rAny );
+ bool AreAllLinesValid() const;
+ void ClearAllLines();
+ void DoScroll( sal_Int32 nNewPos );
+ void ReloadLinesContent();
+
+ css::uno::Sequence< css::beans::PropertyValue >
+ GetCustomProperties();
+ void SetCustomProperties(std::vector< std::unique_ptr >&& rProperties);
+ void SetRemovedHdl( const Link& rLink ) { m_aRemovedHdl = rLink; }
+
+ void BoxLoseFocus(CustomPropertyLine* pLine);
+ void EditLoseFocus(CustomPropertyLine* pLine);
+ void Remove(const CustomPropertyLine* pLine);
+};
+
+// class CustomPropertiesControl -----------------------------------------
+
+class CustomPropertiesControl
+{
+private:
+ sal_Int32 m_nThumbPos;
+
+ std::unique_ptr m_xBox;
+ std::unique_ptr m_xBody;
+ std::unique_ptr m_xVertScroll;
+ std::unique_ptr m_xPropertiesWin;
+ std::unique_ptr m_xName;
+ std::unique_ptr m_xType;
+ std::unique_ptr m_xValue;
+
+ DECL_LINK( ResizeHdl, const Size&, void );
+ DECL_LINK( ScrollHdl, weld::ScrolledWindow&, void );
+ DECL_LINK( RemovedHdl, void*, void );
+
+public:
+ CustomPropertiesControl();
+ ~CustomPropertiesControl();
+
+ void AddLine(css::uno::Any const & rAny);
+
+ bool AreAllLinesValid() const { return m_xPropertiesWin->AreAllLinesValid(); }
+ void ClearAllLines() { m_xPropertiesWin->ClearAllLines(); }
+
+ css::uno::Sequence
+ GetCustomProperties() const
+ { return m_xPropertiesWin->GetCustomProperties(); }
+ void SetCustomProperties(std::vector< std::unique_ptr >&& rProperties);
+
+ void Init(weld::Builder& rParent);
+};
+
+// class SfxCustomPropertiesPage -----------------------------------------
+
+class SfxCustomPropertiesPage final : public SfxTabPage
+{
+private:
+ DECL_LINK(AddHdl, weld::Button&, void);
+
+ std::unique_ptr m_xPropertiesCtrl;
+ std::unique_ptr m_xAdd;
+
+ virtual bool FillItemSet( SfxItemSet* ) override;
+ virtual void Reset( const SfxItemSet* ) override;
+ virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
+
+public:
+ SfxCustomPropertiesPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet&);
+ static std::unique_ptr Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
+ virtual ~SfxCustomPropertiesPage() override;
+};
+
+struct CmisValue
+{
+ std::unique_ptr m_xBuilder;
+ std::unique_ptr m_xFrame;
+ std::unique_ptr m_xValueEdit;
+
+ CmisValue(weld::Widget* pParent, const OUString& rStr);
+};
+
+struct CmisDateTime
+{
+ std::unique_ptr m_xBuilder;
+ std::unique_ptr m_xFrame;
+ std::unique_ptr m_xDateField;
+ std::unique_ptr m_xTimeField;
+
+ CmisDateTime(weld::Widget* pParent, const css::util::DateTime& rDateTime);
+};
+
+struct CmisYesNo
+{
+ std::unique_ptr m_xBuilder;
+ std::unique_ptr m_xFrame;
+ std::unique_ptr m_xYesButton;
+ std::unique_ptr m_xNoButton;
+
+ CmisYesNo(weld::Widget* pParent, bool bValue);
+};
+
+// struct CmisPropertyLine ---------------------------------------------
+
+struct CmisPropertyLine
+{
+ std::unique_ptr m_xBuilder;
+ OUString m_sId;
+ OUString m_sType;
+ bool m_bUpdatable;
+ bool m_bRequired;
+ bool m_bMultiValued;
+ bool m_bOpenChoice;
+ std::unique_ptr m_xFrame;
+ std::unique_ptr m_xName;
+ std::unique_ptr