summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/basegfx/range/b2drange.hxx9
-rw-r--r--include/desktop/dllapi.h5
-rw-r--r--include/rtl/stringconcat.hxx11
-rw-r--r--include/svl/ondemand.hxx18
-rw-r--r--include/svx/svdobj.hxx4
-rw-r--r--include/svx/svdpage.hxx2
-rw-r--r--include/unotools/intlwrapper.hxx4
-rw-r--r--include/unotools/localedatawrapper.hxx9
-rw-r--r--include/vcl/i18nhelp.hxx4
-rw-r--r--include/vcl/jsdialog/executor.hxx2
-rw-r--r--include/xmloff/xmlnumfe.hxx2
11 files changed, 40 insertions, 30 deletions
diff --git a/include/basegfx/range/b2drange.hxx b/include/basegfx/range/b2drange.hxx
index b0f726ac0e36..9a0aecbdae4c 100644
--- a/include/basegfx/range/b2drange.hxx
+++ b/include/basegfx/range/b2drange.hxx
@@ -114,6 +114,15 @@ namespace basegfx
/** Transform Range by given transformation matrix. */
BASEGFX_DLLPUBLIC void transform(const B2DHomMatrix& rMatrix);
+ /** Translate Range (ie. move).
+ Much faster equivalent of transform(createTranslateB2DHomMatrix(xx)). */
+ BASEGFX_DLLPUBLIC void translate(double fTranslateX, double fTranslateY);
+
+ inline void translate(const B2DTuple& rTranslate)
+ {
+ translate(rTranslate.getX(), rTranslate.getY());
+ }
+
/** Transform Range by given transformation matrix.
This operation transforms the Range by transforming all four possible
diff --git a/include/desktop/dllapi.h b/include/desktop/dllapi.h
index 5cf948ce08a4..46b5c3af41be 100644
--- a/include/desktop/dllapi.h
+++ b/include/desktop/dllapi.h
@@ -7,8 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#ifndef INCLUDED_DESKTOP_SOURCE_INC_DESKTOPDLLAPI_H
-#define INCLUDED_DESKTOP_SOURCE_INC_DESKTOPDLLAPI_H
+#pragma once
#include <sal/config.h>
#include <sal/types.h>
@@ -25,6 +24,4 @@
#define CRASHREPORT_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
#endif
-#endif
-
/* vim: set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/rtl/stringconcat.hxx b/include/rtl/stringconcat.hxx
index 0bed28ac810c..216670e0d635 100644
--- a/include/rtl/stringconcat.hxx
+++ b/include/rtl/stringconcat.hxx
@@ -16,6 +16,7 @@
#include "rtl/string.h"
#include "rtl/ustring.h"
+#include <algorithm>
#include <cassert>
#include <cstddef>
#include <memory>
@@ -82,14 +83,6 @@ C* addDataHelper( C* buffer, const C* data, std::size_t length )
return buffer + length;
}
-inline
-sal_Unicode* addDataLiteral( sal_Unicode* buffer, const char* data, std::size_t length )
-{
- for( std::size_t i = 0; i != length; ++i )
- *buffer++ = *data++;
- return buffer;
-}
-
template <typename C> inline
C* addDataString( C* buffer, const C* str )
{
@@ -126,7 +119,7 @@ struct ToStringHelper< const char[ N ] >
{
static std::size_t length( const char str[ N ] ) { (void)str; assert( strlen( str ) == N - 1 ); return N - 1; }
char* operator()( char* buffer, const char str[ N ] ) const { return addDataHelper( buffer, str, N - 1 ); }
- sal_Unicode* operator()( sal_Unicode* buffer, const char str[ N ] ) const { return addDataLiteral( buffer, str, N - 1 ); }
+ sal_Unicode* operator()( sal_Unicode* buffer, const char str[ N ] ) const { return std::copy_n( str, N - 1, buffer ); }
};
template<>
diff --git a/include/svl/ondemand.hxx b/include/svl/ondemand.hxx
index 691fd6fc8099..200958b2d99c 100644
--- a/include/svl/ondemand.hxx
+++ b/include/svl/ondemand.hxx
@@ -55,8 +55,8 @@ class OnDemandLocaleDataWrapper
SvtSysLocale aSysLocale;
LanguageType eCurrentLanguage;
LanguageType eLastAnyLanguage;
- std::optional<LocaleDataWrapper> moEnglish;
- std::optional<LocaleDataWrapper> moAny;
+ const LocaleDataWrapper* mpEnglish{ nullptr };
+ const LocaleDataWrapper* mpAny{ nullptr };
int nCurrent; // 0 == system, 1 == english, 2 == any
bool bInitialized;
@@ -86,20 +86,20 @@ public:
nCurrent = 0;
else if (eLang == LANGUAGE_ENGLISH_US)
{
- if (!moEnglish)
- moEnglish.emplace(m_xContext, rLanguageTag);
+ if (!mpEnglish)
+ mpEnglish = LocaleDataWrapper::get(rLanguageTag);
nCurrent = 1;
}
else
{
- if (!moAny)
+ if (!mpAny)
{
- moAny.emplace(m_xContext, rLanguageTag);
+ mpAny = LocaleDataWrapper::get(rLanguageTag);
eLastAnyLanguage = eLang;
}
else if (eLastAnyLanguage != eLang)
{
- moAny.emplace(m_xContext, rLanguageTag);
+ mpAny = LocaleDataWrapper::get(rLanguageTag);
eLastAnyLanguage = eLang;
}
nCurrent = 2;
@@ -116,9 +116,9 @@ public:
case 0:
return &aSysLocale.GetLocaleData();
case 1:
- return &*moEnglish;
+ return mpEnglish;
case 2:
- return &*moAny;
+ return mpAny;
default:
assert(false);
return nullptr;
diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index f5ee902d7778..297ee9530a61 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -31,6 +31,7 @@
#include <svx/svdtypes.hxx>
#include <svx/svdobjkind.hxx>
#include <svx/svxdllapi.h>
+#include <tools/UniqueID.hxx>
#include <tools/link.hxx>
#include <tools/gen.hxx>
#include <unotools/resmgr.hxx>
@@ -268,6 +269,8 @@ public:
virtual void SAL_CALL acquire() noexcept override final;
virtual void SAL_CALL release() noexcept override final;
+ sal_uInt64 GetUniqueID() const { return maUniqueID.getID(); }
+
// SdrModel/SdrPage access on SdrObject level
SdrPage* getSdrPageFromSdrObject() const;
SdrModel& getSdrModelFromSdrObject() const;
@@ -949,6 +952,7 @@ private:
std::unique_ptr<Impl> mpImpl;
SdrObjList* mpParentOfSdrObject; // list that includes this object
sal_uInt32 m_nOrdNum; // order number of the object in the list
+ class UniqueID maUniqueID;
std::unique_ptr<SfxGrabBagItem> m_pGrabBagItem; // holds the GrabBagItem property
// Position in the navigation order. SAL_MAX_UINT32 when not used.
sal_uInt32 mnNavigationPosition;
diff --git a/include/svx/svdpage.hxx b/include/svx/svdpage.hxx
index 0ad088889206..3d9c60401544 100644
--- a/include/svx/svdpage.hxx
+++ b/include/svx/svdpage.hxx
@@ -124,7 +124,7 @@ public:
void SetSdrObjListRectsDirty();
- SAL_DLLPRIVATE const tools::Rectangle& GetAllObjSnapRect() const;
+ const tools::Rectangle& GetAllObjSnapRect() const;
const tools::Rectangle& GetAllObjBoundRect() const;
/// reformat all text objects, e.g. when changing printer
diff --git a/include/unotools/intlwrapper.hxx b/include/unotools/intlwrapper.hxx
index 0c473cc4293f..6df48a9e8f12 100644
--- a/include/unotools/intlwrapper.hxx
+++ b/include/unotools/intlwrapper.hxx
@@ -54,7 +54,7 @@ private:
LanguageTag maLanguageTag;
css::uno::Reference< css::uno::XComponentContext > m_xContext;
- std::unique_ptr<LocaleDataWrapper> pLocaleData;
+ const LocaleDataWrapper* pLocaleData { nullptr };
std::optional<CollatorWrapper> moCollator;
std::optional<CollatorWrapper> moCaseCollator;
@@ -69,7 +69,7 @@ public:
{
if ( !pLocaleData )
ImplNewLocaleData();
- return pLocaleData.get();
+ return pLocaleData;
}
/// case insensitive collator, simple IGNORE_CASE
const CollatorWrapper* getCollator() const
diff --git a/include/unotools/localedatawrapper.hxx b/include/unotools/localedatawrapper.hxx
index 22fd3e07035c..9125a7e2716b 100644
--- a/include/unotools/localedatawrapper.hxx
+++ b/include/unotools/localedatawrapper.hxx
@@ -118,11 +118,18 @@ class UNOTOOLS_DLLPUBLIC LocaleDataWrapper
SAL_DLLPRIVATE void loadDigitGrouping();
-public:
LocaleDataWrapper(
const css::uno::Reference< css::uno::XComponentContext > & rxContext,
LanguageTag aLanguageTag
);
+
+public:
+
+ /**
+ * retrieve a cached LocaleDataWrapper
+ */
+ static const LocaleDataWrapper* get(const LanguageTag& aLanguageTag);
+
/**
@param rOverrideDateAcceptancePatterns Override locale's date acceptance patterns.
An empty sequence resets the patterns to the locale's pattern sequence.
diff --git a/include/vcl/i18nhelp.hxx b/include/vcl/i18nhelp.hxx
index 9f6e43bb6a54..8179f7c3bc00 100644
--- a/include/vcl/i18nhelp.hxx
+++ b/include/vcl/i18nhelp.hxx
@@ -45,7 +45,7 @@ class VCL_DLLPUBLIC I18nHelper
LanguageTag maLanguageTag;
css::uno::Reference< css::uno::XComponentContext > m_xContext;
- std::unique_ptr<LocaleDataWrapper> mpLocaleDataWrapper;
+ const LocaleDataWrapper* mpLocaleDataWrapper { nullptr };
std::unique_ptr<utl::TransliterationWrapper> mpTransliterationWrapper;
bool mbTransliterateIgnoreCase;
@@ -53,7 +53,7 @@ class VCL_DLLPUBLIC I18nHelper
SAL_DLLPRIVATE void ImplDestroyWrappers();
SAL_DLLPRIVATE utl::TransliterationWrapper& ImplGetTransliterationWrapper() const;
- SAL_DLLPRIVATE LocaleDataWrapper& ImplGetLocaleDataWrapper() const;
+ SAL_DLLPRIVATE const LocaleDataWrapper& ImplGetLocaleDataWrapper() const;
public:
diff --git a/include/vcl/jsdialog/executor.hxx b/include/vcl/jsdialog/executor.hxx
index 957d7c864bb4..f6816c3a4eca 100644
--- a/include/vcl/jsdialog/executor.hxx
+++ b/include/vcl/jsdialog/executor.hxx
@@ -150,7 +150,7 @@ typedef std::unordered_map<OString, OUString> ActionDataMap;
/// execute action on a widget
VCL_DLLPUBLIC bool ExecuteAction(const OUString& nWindowId, const OUString& rWidget,
- StringMap& rData);
+ const StringMap& rData);
/// send full update message to the client
VCL_DLLPUBLIC void SendFullUpdate(const OUString& nWindowId, const OUString& rWidget);
/// send action message to the client
diff --git a/include/xmloff/xmlnumfe.hxx b/include/xmloff/xmlnumfe.hxx
index 9ac4e755f99c..24b397519389 100644
--- a/include/xmloff/xmlnumfe.hxx
+++ b/include/xmloff/xmlnumfe.hxx
@@ -54,7 +54,7 @@ private:
OUStringBuffer m_sBlankWidthString;
bool m_bHasText;
std::unique_ptr<SvXMLNumUsedList_Impl> m_pUsedList;
- std::unique_ptr<LocaleDataWrapper> m_pLocaleData;
+ const LocaleDataWrapper* m_pLocaleData { nullptr };
SAL_DLLPRIVATE void AddCalendarAttr_Impl( const OUString& rCalendar );
SAL_DLLPRIVATE void AddStyleAttr_Impl( bool bLong );