summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/comphelper/configuration.hxx22
-rw-r--r--include/comphelper/interfacecontainer3.hxx8
-rw-r--r--include/comphelper/interfacecontainer4.hxx6
-rw-r--r--include/sfx2/sfxdlg.hxx2
-rw-r--r--include/sfx2/sfxsids.hrc1
-rw-r--r--include/svtools/htmlkywd.hxx1
-rw-r--r--include/svtools/htmltokn.h1
-rw-r--r--include/svx/DocumentColorHelper.hxx41
-rw-r--r--include/svx/svdpagv.hxx10
-rw-r--r--include/svx/svxdlg.hxx2
-rw-r--r--include/unotest/macros_test.hxx6
-rw-r--r--include/vcl/abstdlg.hxx8
-rw-r--r--include/vcl/print.hxx1
13 files changed, 81 insertions, 28 deletions
diff --git a/include/comphelper/configuration.hxx b/include/comphelper/configuration.hxx
index 652e9afaa6..51106a0a12 100644
--- a/include/comphelper/configuration.hxx
+++ b/include/comphelper/configuration.hxx
@@ -12,16 +12,15 @@
#include <sal/config.h>
+#include <optional>
+#include <string_view>
+
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Reference.h>
#include <comphelper/comphelperdllapi.h>
#include <comphelper/processfactory.hxx>
#include <sal/types.h>
#include <memory>
-#include <mutex>
-#include <optional>
-#include <string_view>
-#include <unordered_map>
namespace com::sun::star {
namespace configuration { class XReadWriteAccess; }
@@ -32,10 +31,6 @@ namespace com::sun::star {
class XNameContainer;
}
namespace uno { class XComponentContext; }
- namespace util {
- class XChangesListener;
- class XChangesNotifier;
- }
}
namespace comphelper {
@@ -85,17 +80,14 @@ private:
namespace detail {
-class ConfigurationChangesListener;
-
/// @internal
class COMPHELPER_DLLPUBLIC ConfigurationWrapper {
-friend class ConfigurationChangesListener;
public:
static ConfigurationWrapper const & get();
bool isReadOnly(OUString const & path) const;
- css::uno::Any getPropertyValue(OUString const & path) const;
+ css::uno::Any getPropertyValue(std::u16string_view path) const;
static void setPropertyValue(
std::shared_ptr< ConfigurationChanges > const & batch,
@@ -143,12 +135,6 @@ private:
// css.beans.XHierarchicalPropertySetInfo), but then
// configmgr::Access::asProperty() would report all properties as
// READONLY, so isReadOnly() would not work
-
- mutable std::mutex maMutex;
- bool mbDisposed;
- mutable std::unordered_map<OUString, css::uno::Any> maPropertyCache;
- css::uno::Reference< css::util::XChangesNotifier > maNotifier;
- css::uno::Reference< css::util::XChangesListener > maListener;
};
/// @internal
diff --git a/include/comphelper/interfacecontainer3.hxx b/include/comphelper/interfacecontainer3.hxx
index 02f96658dc..be140d3228 100644
--- a/include/comphelper/interfacecontainer3.hxx
+++ b/include/comphelper/interfacecontainer3.hxx
@@ -266,7 +266,11 @@ template <class T>
template <typename FuncT>
inline void OInterfaceContainerHelper3<T>::forEach(FuncT const& func)
{
+ osl::ClearableMutexGuard aGuard(mrMutex);
+ if (std::as_const(maData)->empty())
+ return;
OInterfaceIteratorHelper3<T> iter(*this);
+ aGuard.clear();
while (iter.hasMoreElements())
{
auto xListener = iter.next();
@@ -314,7 +318,7 @@ OInterfaceContainerHelper3<ListenerT>::addInterface(const css::uno::Reference<Li
osl::MutexGuard aGuard(mrMutex);
maData->push_back(rListener);
- return maData->size();
+ return std::as_const(maData)->size();
}
template <class ListenerT>
@@ -337,7 +341,7 @@ sal_Int32 OInterfaceContainerHelper3<ListenerT>::removeInterface(
if (it != maData->end())
maData->erase(it);
- return maData->size();
+ return std::as_const(maData)->size();
}
template <class ListenerT>
diff --git a/include/comphelper/interfacecontainer4.hxx b/include/comphelper/interfacecontainer4.hxx
index 1362ee1df7..e4a41e3067 100644
--- a/include/comphelper/interfacecontainer4.hxx
+++ b/include/comphelper/interfacecontainer4.hxx
@@ -288,7 +288,7 @@ inline void OInterfaceContainerHelper4<T>::forEach(std::unique_lock<std::mutex>&
FuncT const& func) const
{
assert(rGuard.owns_lock());
- if (std::as_const(maData)->size() == 0)
+ if (std::as_const(maData)->empty())
{
return;
}
@@ -353,7 +353,7 @@ OInterfaceContainerHelper4<ListenerT>::addInterface(std::unique_lock<std::mutex>
(void)rGuard;
assert(rListener.is());
maData->push_back(rListener);
- return maData->size();
+ return std::as_const(maData)->size();
}
template <class ListenerT>
@@ -377,7 +377,7 @@ sal_Int32 OInterfaceContainerHelper4<ListenerT>::removeInterface(
if (it != maData->end())
maData->erase(it);
- return maData->size();
+ return std::as_const(maData)->size();
}
template <class ListenerT>
diff --git a/include/sfx2/sfxdlg.hxx b/include/sfx2/sfxdlg.hxx
index 2513bbbb00..31bd0c3108 100644
--- a/include/sfx2/sfxdlg.hxx
+++ b/include/sfx2/sfxdlg.hxx
@@ -135,6 +135,8 @@ public:
virtual VclPtr<SfxAbstractLinksDialog> CreateLinksDialog(weld::Window* pParent, sfx2::LinkManager* pMgr, bool bHTML=false, sfx2::SvBaseLink* p=nullptr) = 0;
virtual VclPtr<VclAbstractDialog> CreateSvxScriptOrgDialog(weld::Window* pParent, const OUString& rLanguage) = 0;
+ virtual VclPtr<AbstractSecurityOptionsDialog> CreateSvxSecurityOptionsDialog(weld::Window* pParent) = 0;
+
virtual VclPtr<AbstractScriptSelectorDialog> CreateScriptSelectorDialog(weld::Window* pParent,
const css::uno::Reference< css::frame::XFrame >& rxFrame) = 0;
diff --git a/include/sfx2/sfxsids.hrc b/include/sfx2/sfxsids.hrc
index 3e1775788d..c5479d8368 100644
--- a/include/sfx2/sfxsids.hrc
+++ b/include/sfx2/sfxsids.hrc
@@ -670,6 +670,7 @@ class SvxZoomItem;
#define SID_BASICIDE_WATCH TypedWhichId<SfxBoolItem>( SID_BASICIDE_START + 55 )
#define SID_BASICIDE_STACK TypedWhichId<SfxBoolItem>( SID_BASICIDE_START + 56 )
#define SID_OPTIONS_TREEDIALOG ( SID_BASICIDE_START + 862)
+#define SID_OPTIONS_SECURITY ( SID_BASICIDE_START + 863)
// SlotIds for Apps --------------------------------------------------------
#define FN_PARAM (SID_SW_START + 1100)
diff --git a/include/svtools/htmlkywd.hxx b/include/svtools/htmlkywd.hxx
index 00c8260749..23e836ea7c 100644
--- a/include/svtools/htmlkywd.hxx
+++ b/include/svtools/htmlkywd.hxx
@@ -445,6 +445,7 @@
#define OOO_STRING_SVTOOLS_HTML_O_title "title"
#define OOO_STRING_SVTOOLS_HTML_O_value "value"
#define OOO_STRING_SVTOOLS_HTML_O_SDval "sdval"
+#define OOO_STRING_SVTOOLS_HTML_O_DSval "data-sheets-value"
#define OOO_STRING_SVTOOLS_HTML_O_SDnum "sdnum"
#define OOO_STRING_SVTOOLS_HTML_O_sdlibrary "sdlibrary"
#define OOO_STRING_SVTOOLS_HTML_O_sdmodule "sdmodule"
diff --git a/include/svtools/htmltokn.h b/include/svtools/htmltokn.h
index 4a333ee2f6..27370e5cb8 100644
--- a/include/svtools/htmltokn.h
+++ b/include/svtools/htmltokn.h
@@ -344,6 +344,7 @@ STRING_START = BOOL_END,
TITLE,
VALUE,
SDVAL, // StarDiv NumberValue
+ DSVAL,
SDNUM, // StarDiv NumberFormat
SDLIBRARY,
SDMODULE,
diff --git a/include/svx/DocumentColorHelper.hxx b/include/svx/DocumentColorHelper.hxx
new file mode 100644
index 0000000000..9388b7cba8
--- /dev/null
+++ b/include/svx/DocumentColorHelper.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/.
+ *
+ */
+
+#pragma once
+
+#include <editeng/brushitem.hxx>
+#include <editeng/colritem.hxx>
+#include <set>
+#include <svl/itempool.hxx>
+
+namespace svx
+{
+namespace DocumentColorHelper
+{
+inline Color getColorFromItem(const SvxColorItem* pItem) { return pItem->GetValue(); }
+
+inline Color getColorFromItem(const SvxBrushItem* pItem) { return pItem->GetColor(); }
+
+template <class T>
+void queryColors(const sal_uInt16 nAttrib, const SfxItemPool* pPool, std::set<Color>& rOutput)
+{
+ for (const SfxPoolItem* pItem : pPool->GetItemSurrogates(nAttrib))
+ {
+ auto pColorItem = static_cast<const T*>(pItem);
+ Color aColor(getColorFromItem(pColorItem));
+ if (COL_AUTO != aColor)
+ rOutput.insert(aColor);
+ }
+}
+}
+
+} // end of namespace svx
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdpagv.hxx b/include/svx/svdpagv.hxx
index 777ca7d9b1..58354a3d8d 100644
--- a/include/svx/svdpagv.hxx
+++ b/include/svx/svdpagv.hxx
@@ -102,7 +102,8 @@ public:
private:
void ImpInvalidateHelpLineArea(sal_uInt16 nNum) const;
- void SetLayer(const OUString& rName, SdrLayerIDSet& rBS, bool bJa);
+ // return true if changed, false if unchanged
+ bool SetLayer(const OUString& rName, SdrLayerIDSet& rBS, bool bJa);
bool IsLayer(const OUString& rName, const SdrLayerIDSet& rBS) const;
/// Let's see if the current Group (pCurrentGroup) is still inserted
@@ -182,10 +183,13 @@ public:
tools::Rectangle& MarkBound() { return aMarkBound; }
tools::Rectangle& MarkSnap() { return aMarkSnap; }
- void SetLayerVisible(const OUString& rName, bool bShow) {
- SetLayer(rName, aLayerVisi, bShow);
+ bool SetLayerVisible(const OUString& rName, bool bShow) {
+ const bool bChanged = SetLayer(rName, aLayerVisi, bShow);
+ if (!bChanged)
+ return false;
if(!bShow) AdjHdl();
InvalidateAllWin();
+ return true;
}
bool IsLayerVisible(const OUString& rName) const { return IsLayer(rName, aLayerVisi); }
diff --git a/include/svx/svxdlg.hxx b/include/svx/svxdlg.hxx
index 41158ef2a4..2e6c7d672f 100644
--- a/include/svx/svxdlg.hxx
+++ b/include/svx/svxdlg.hxx
@@ -425,6 +425,8 @@ public:
virtual DialogGetRanges GetDialogGetRangesFunc() = 0;
+ virtual VclPtr<AbstractSecurityOptionsDialog> CreateSvxSecurityOptionsDialog(weld::Window* pParent) override = 0;
+
virtual VclPtr<AbstractScriptSelectorDialog> CreateScriptSelectorDialog(weld::Window* pParent,
const css::uno::Reference< css::frame::XFrame >& rxFrame) override = 0;
diff --git a/include/unotest/macros_test.hxx b/include/unotest/macros_test.hxx
index c960ff76ea..cf667125e8 100644
--- a/include/unotest/macros_test.hxx
+++ b/include/unotest/macros_test.hxx
@@ -96,8 +96,10 @@ public:
static std::unique_ptr<SvStream> parseExportStream(const OUString& url,
const OUString& rStreamName);
- void setUpNssGpg(const test::Directories& rDirectories, const OUString& rTestName);
- void tearDownNssGpg();
+ // note: there is no tearDownX509
+ void setUpX509(const test::Directories& rDirectories, const OUString& rTestName);
+ void setUpGpg(const test::Directories& rDirectories, const OUString& rTestName);
+ void tearDownGpg();
static bool IsValid(const css::uno::Reference<css::security::XCertificate>& cert,
const css::uno::Reference<css::xml::crypto::XSecurityEnvironment>& env);
diff --git a/include/vcl/abstdlg.hxx b/include/vcl/abstdlg.hxx
index 793d8cdd36..137117866d 100644
--- a/include/vcl/abstdlg.hxx
+++ b/include/vcl/abstdlg.hxx
@@ -103,6 +103,14 @@ public:
virtual void AllowEmpty() = 0;
};
+class VCL_DLLPUBLIC AbstractSecurityOptionsDialog : public VclAbstractDialog
+{
+protected:
+ virtual ~AbstractSecurityOptionsDialog() override = default;
+public:
+ virtual bool SetSecurityOptions() = 0;
+};
+
class VCL_DLLPUBLIC AbstractScreenshotAnnotationDlg : public VclAbstractDialog
{
protected:
diff --git a/include/vcl/print.hxx b/include/vcl/print.hxx
index d6ce7728f9..e23cf8d0af 100644
--- a/include/vcl/print.hxx
+++ b/include/vcl/print.hxx
@@ -227,6 +227,7 @@ public:
bool SetPaperBin( sal_uInt16 nPaperBin );
sal_uInt16 GetPaperBin() const;
+ sal_uInt16 GetPaperBinBySourceIndex(sal_uInt16 nPaperSource) const;
void SetPaper( Paper ePaper );
bool SetPaperSizeUser( const Size& rSize );
/** @return The paper format of the printer's current "jobsetup". Note that if PAPER_USER the actual size can be anything. */