summaryrefslogtreecommitdiffstats
path: root/desktop/inc
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:06:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:06:44 +0000
commited5640d8b587fbcfed7dd7967f3de04b37a76f26 (patch)
tree7a5f7c6c9d02226d7471cb3cc8fbbf631b415303 /desktop/inc
parentInitial commit. (diff)
downloadlibreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.tar.xz
libreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.zip
Adding upstream version 4:7.4.7.upstream/4%7.4.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'desktop/inc')
-rw-r--r--desktop/inc/app.hxx180
-rw-r--r--desktop/inc/bitmaps.hlst17
-rw-r--r--desktop/inc/dp_misc.h147
-rw-r--r--desktop/inc/dp_shared.hxx27
-rw-r--r--desktop/inc/lib/init.hxx276
-rw-r--r--desktop/inc/migration.hxx31
-rw-r--r--desktop/inc/pch/precompiled_deployment.cxx12
-rw-r--r--desktop/inc/pch/precompiled_deployment.hxx94
-rw-r--r--desktop/inc/pch/precompiled_deploymentgui.cxx12
-rw-r--r--desktop/inc/pch/precompiled_deploymentgui.hxx110
-rw-r--r--desktop/inc/pch/precompiled_deploymentmisc.cxx12
-rw-r--r--desktop/inc/pch/precompiled_deploymentmisc.hxx86
-rw-r--r--desktop/inc/pch/precompiled_sofficeapp.cxx12
-rw-r--r--desktop/inc/pch/precompiled_sofficeapp.hxx198
-rw-r--r--desktop/inc/strings.hrc191
-rw-r--r--desktop/inc/strings.hxx16
16 files changed, 1421 insertions, 0 deletions
diff --git a/desktop/inc/app.hxx b/desktop/inc/app.hxx
new file mode 100644
index 000000000..3372e751d
--- /dev/null
+++ b/desktop/inc/app.hxx
@@ -0,0 +1,180 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <optional>
+#include <sal/log.hxx>
+#include <vcl/svapp.hxx>
+#include <vcl/timer.hxx>
+#include <unotools/bootstrap.hxx>
+#include <com/sun/star/frame/XDesktop2.hpp>
+#include <com/sun/star/task/XStatusIndicator.hpp>
+#include <com/sun/star/uno/Reference.h>
+
+#include <memory>
+#include <string_view>
+#include <thread>
+
+namespace com::sun::star::uno { class XComponentContext; }
+
+namespace desktop
+{
+
+/*--------------------------------------------------------------------
+ Description: Application-class
+ --------------------------------------------------------------------*/
+class CommandLineArgs;
+class Lockfile;
+struct ConvertData;
+class Desktop final : public Application
+{
+ int doShutdown();
+
+ public:
+ enum BootstrapError
+ {
+ BE_OK,
+ BE_UNO_SERVICEMANAGER,
+ BE_UNO_SERVICE_CONFIG_MISSING,
+ BE_PATHINFO_MISSING,
+ BE_USERINSTALL_FAILED,
+ BE_LANGUAGE_MISSING,
+ BE_USERINSTALL_NOTENOUGHDISKSPACE,
+ BE_USERINSTALL_NOWRITEACCESS,
+ BE_OFFICECONFIG_BROKEN
+ };
+ enum BootstrapStatus
+ {
+ BS_OK,
+ BS_TERMINATE
+ };
+
+ Desktop();
+ virtual ~Desktop() override;
+ virtual int Main( ) override;
+ virtual void Init() override;
+ virtual void InitFinished() override;
+ virtual void DeInit() override;
+ virtual bool QueryExit() override;
+ virtual void Shutdown() override;
+ virtual void Exception(ExceptionCategory nCategory) override;
+ virtual void OverrideSystemSettings( AllSettings& rSettings ) override;
+ virtual void AppEvent( const ApplicationEvent& rAppEvent ) override;
+
+ DECL_LINK( OpenClients_Impl, void*, void );
+
+ static void OpenClients();
+ static void OpenDefault();
+ static void CheckOpenCLCompute(const css::uno::Reference<css::frame::XDesktop2> &);
+
+ DECL_STATIC_LINK( Desktop, EnableAcceptors_Impl, void*, void);
+
+ static void HandleAppEvent( const ApplicationEvent& rAppEvent );
+ static CommandLineArgs& GetCommandLineArgs();
+
+ static void HandleBootstrapErrors(
+ BootstrapError nError, OUString const & aMessage );
+ void SetBootstrapError(
+ BootstrapError nError, OUString const & aMessage )
+ {
+ if ( m_aBootstrapError == BE_OK )
+ {
+ SAL_INFO("desktop.app", "SetBootstrapError: " << nError << " '" << aMessage << "'");
+ m_aBootstrapError = nError;
+ m_aBootstrapErrorMessage = aMessage;
+ }
+ }
+
+ void SetBootstrapStatus( BootstrapStatus nStatus )
+ {
+ m_aBootstrapStatus = nStatus;
+ }
+ BootstrapStatus GetBootstrapStatus() const
+ {
+ return m_aBootstrapStatus;
+ }
+
+ // first-start (ever) related methods
+ static bool CheckExtensionDependencies();
+
+ static void SynchronizeExtensionRepositories(bool bCleanedExtensionCache, Desktop* pDesktop = nullptr);
+ void SetSplashScreenText( const OUString& rText );
+ void SetSplashScreenProgress( sal_Int32 );
+
+ // Bootstrap methods
+ static void InitApplicationServiceManager();
+ // throws an exception upon failure
+
+ private:
+ void RegisterServices();
+ static void DeregisterServices();
+
+ public:
+ static void CreateTemporaryDirectory();
+ static void RemoveTemporaryDirectory();
+
+ private:
+ static bool InitializeConfiguration();
+ static void FlushConfiguration();
+ static bool InitializeQuickstartMode( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
+
+ static void HandleBootstrapPathErrors( ::utl::Bootstrap::Status, std::u16string_view aMsg );
+
+ // Create an error message depending on bootstrap failure code and an optional file url
+ static OUString CreateErrorMsgString( utl::Bootstrap::FailureCode nFailureCode,
+ const OUString& aFileURL );
+
+ css::uno::Reference<css::task::XStatusIndicator> m_rSplashScreen;
+ void OpenSplashScreen();
+ void CloseSplashScreen();
+
+ DECL_STATIC_LINK( Desktop, ImplInitFilterHdl, ::ConvertData&, bool );
+ DECL_STATIC_LINK( Desktop, AsyncInitFirstRun, Timer*, void );
+ /** checks if the office is run the first time
+ <p>If so, <method>DoFirstRunInitializations</method> is called (asynchronously and delayed) and the
+ respective flag in the configuration is reset.</p>
+ */
+ void CheckFirstRun( );
+
+ static void ShowBackingComponent(Desktop * progress);
+
+ // on-demand acceptors
+ static void createAcceptor(const OUString& aDescription);
+ static void destroyAcceptor(const OUString& aDescription);
+
+ bool m_bCleanedExtensionCache;
+ bool m_bServicesRegistered;
+ BootstrapError m_aBootstrapError;
+ OUString m_aBootstrapErrorMessage;
+ BootstrapStatus m_aBootstrapStatus;
+
+ std::unique_ptr<Lockfile> m_xLockfile;
+ Timer m_firstRunTimer;
+ std::thread m_aUpdateThread;
+};
+
+OUString GetURL_Impl(
+ const OUString& rName, std::optional< OUString > const & cwdUrl );
+
+OUString ReplaceStringHookProc(const OUString& rStr);
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/inc/bitmaps.hlst b/desktop/inc/bitmaps.hlst
new file mode 100644
index 000000000..69005c522
--- /dev/null
+++ b/desktop/inc/bitmaps.hlst
@@ -0,0 +1,17 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#pragma once
+
+inline constexpr OUStringLiteral RID_BMP_WARNING = u"desktop/res/caution_16.png";
+inline constexpr OUStringLiteral RID_BMP_LOCKED = u"desktop/res/lock_16.png";
+inline constexpr OUStringLiteral RID_BMP_SHARED = u"desktop/res/shared_16.png";
+inline constexpr OUStringLiteral RID_BMP_EXTENSION = u"desktop/res/extension_32.png";
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/desktop/inc/dp_misc.h b/desktop/inc/dp_misc.h
new file mode 100644
index 000000000..f4c222a94
--- /dev/null
+++ b/desktop/inc/dp_misc.h
@@ -0,0 +1,147 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <sal/config.h>
+
+#include <string_view>
+
+#include <osl/process.h>
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <com/sun/star/lang/XComponent.hpp>
+#include <com/sun/star/ucb/XCommandEnvironment.hpp>
+#include <dp_misc_api.hxx>
+
+namespace dp_misc {
+
+const char CR = 0x0d;
+const char LF = 0x0a;
+
+
+inline void try_dispose( css::uno::Reference< css::uno::XInterface> const & x )
+{
+ css::uno::Reference< css::lang::XComponent> xComp( x, css::uno::UNO_QUERY );
+ if (xComp.is())
+ xComp->dispose();
+}
+
+
+
+
+DESKTOP_DEPLOYMENTMISC_DLLPUBLIC
+OUString expandUnoRcTerm( OUString const & term );
+
+DESKTOP_DEPLOYMENTMISC_DLLPUBLIC
+OUString makeRcTerm( OUString const & url );
+
+
+DESKTOP_DEPLOYMENTMISC_DLLPUBLIC
+OUString expandUnoRcUrl( OUString const & url );
+
+
+
+/** appends a relative path to a url.
+
+ The relative path must already be correctly encoded for use in a URL.
+ If the URL starts with vnd.sun.star.expand then the relative path will
+ be again encoded for use in an "expand" URL.
+ */
+DESKTOP_DEPLOYMENTMISC_DLLPUBLIC OUString makeURL(
+ OUString const & baseURL, OUString const & relPath );
+
+
+/** appends a relative path to a url.
+
+ This is the same as makeURL, but the relative Path must me a segment
+ of an system path.
+ */
+DESKTOP_DEPLOYMENTMISC_DLLPUBLIC OUString makeURLAppendSysPathSegment(
+ OUString const & baseURL, OUString const & relPath );
+
+
+DESKTOP_DEPLOYMENTMISC_DLLPUBLIC OUString generateRandomPipeId();
+
+class AbortChannel;
+
+DESKTOP_DEPLOYMENTMISC_DLLPUBLIC
+css::uno::Reference< css::uno::XInterface> resolveUnoURL(
+ OUString const & connectString,
+ css::uno::Reference< css::uno::XComponentContext> const & xLocalContext,
+ AbortChannel const * abortChannel = nullptr );
+
+
+DESKTOP_DEPLOYMENTMISC_DLLPUBLIC bool office_is_running();
+
+
+DESKTOP_DEPLOYMENTMISC_DLLPUBLIC
+oslProcess raiseProcess( OUString const & appURL,
+ css::uno::Sequence< OUString > const & args );
+
+
+
+/** writes the argument string to the console.
+ It converts the UTF16 string to an ANSI string using osl_getThreadTextEncoding()
+ as target encoding.
+*/
+DESKTOP_DEPLOYMENTMISC_DLLPUBLIC
+void writeConsole(std::u16string_view sText);
+
+/** writes the argument to the console using the error stream.
+ Otherwise the same as writeConsole.
+*/
+DESKTOP_DEPLOYMENTMISC_DLLPUBLIC
+void writeConsoleError(std::u16string_view sText);
+
+
+/** reads from the console.
+ It uses fgets to read char values and converts them to OUString using
+ osl_getThreadTextEncoding as target encoding. The returned string has a maximum size of
+ 1024 and does NOT include leading and trailing white space(applied OUString::trim())
+*/
+DESKTOP_DEPLOYMENTMISC_DLLPUBLIC
+OUString readConsole();
+
+/** print the text to the console in a debug build.
+ The argument is forwarded to writeConsole. The function does not add new line.
+ The code is only executed if OSL_DEBUG_LEVEL > 1
+*/
+DESKTOP_DEPLOYMENTMISC_DLLPUBLIC
+void TRACE(OUString const & sText);
+
+/** registers or revokes shared or bundled extensions which have been
+ recently added or removed.
+*/
+DESKTOP_DEPLOYMENTMISC_DLLPUBLIC
+void syncRepositories(
+ bool force,
+ css::uno::Reference<
+ css::ucb::XCommandEnvironment> const & xCmdEnv);
+
+/** workaround: for some reason the bridge threads which communicate with the
+ uno.exe process are not released on time
+*/
+DESKTOP_DEPLOYMENTMISC_DLLPUBLIC
+void disposeBridges(
+ css::uno::Reference< css::uno::XComponentContext >
+ const & ctx);
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/inc/dp_shared.hxx b/desktop/inc/dp_shared.hxx
new file mode 100644
index 000000000..dbd695c31
--- /dev/null
+++ b/desktop/inc/dp_shared.hxx
@@ -0,0 +1,27 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <unotools/resmgr.hxx>
+#include <dp_misc_api.hxx>
+
+DESKTOP_DEPLOYMENTMISC_DLLPUBLIC OUString DpResId(TranslateId aId);
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/inc/lib/init.hxx b/desktop/inc/lib/init.hxx
new file mode 100644
index 000000000..c5dcea03d
--- /dev/null
+++ b/desktop/inc/lib/init.hxx
@@ -0,0 +1,276 @@
+/* -*- 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 <map>
+#include <unordered_map>
+#include <memory>
+#include <mutex>
+#include <string_view>
+
+#include <boost/property_tree/ptree.hpp>
+#include <boost/variant.hpp>
+#include <boost/container/flat_map.hpp>
+
+#include <osl/thread.h>
+#include <rtl/ref.hxx>
+#include <vcl/idle.hxx>
+#include <LibreOfficeKit/LibreOfficeKit.h>
+#include <LibreOfficeKit/LibreOfficeKitEnums.h>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/lang/XComponent.hpp>
+#include <tools/gen.hxx>
+#include <sfx2/lokcallback.hxx>
+#include <sfx2/lokhelper.hxx>
+
+#include <desktop/dllapi.h>
+
+class LOKInteractionHandler;
+
+namespace desktop {
+
+ /// Represents an invalidated rectangle inside a given document part.
+ struct RectangleAndPart
+ {
+ tools::Rectangle m_aRectangle;
+ int m_nPart;
+
+ // This is the "EMPTY" rectangle, which somewhat confusingly actually means
+ // to drop all rectangles (see LOK_CALLBACK_INVALIDATE_TILES documentation),
+ // and so it is actually an infinite rectangle and not an empty one.
+ constexpr static tools::Rectangle emptyAllRectangle = {0, 0, SfxLokHelper::MaxTwips, SfxLokHelper::MaxTwips};
+
+ RectangleAndPart()
+ : m_nPart(INT_MIN) // -1 is reserved to mean "all parts".
+ {
+ }
+
+ RectangleAndPart(const tools::Rectangle* pRect, int nPart)
+ : m_aRectangle( pRect ? SanitizedRectangle(*pRect) : emptyAllRectangle)
+ , m_nPart(nPart)
+ {
+ }
+
+ OString toString() const
+ {
+ if (m_nPart >= -1)
+ return (isInfinite() ? "EMPTY" : m_aRectangle.toString())
+ + ", " + OString::number(m_nPart);
+ else
+ return (isInfinite() ? "EMPTY" : m_aRectangle.toString());
+ }
+
+ /// Infinite Rectangle is both sides are
+ /// equal or longer than SfxLokHelper::MaxTwips.
+ bool isInfinite() const
+ {
+ return m_aRectangle.GetWidth() >= SfxLokHelper::MaxTwips &&
+ m_aRectangle.GetHeight() >= SfxLokHelper::MaxTwips;
+ }
+
+ /// Empty Rectangle is when it has zero dimensions.
+ bool isEmpty() const
+ {
+ return m_aRectangle.IsEmpty();
+ }
+
+ static RectangleAndPart Create(const std::string& rPayload);
+ /// Makes sure a rectangle is valid (apparently some code does not like negative coordinates for example).
+ static tools::Rectangle SanitizedRectangle(tools::Long nLeft, tools::Long nTop, tools::Long nWidth, tools::Long nHeight);
+ static tools::Rectangle SanitizedRectangle(const tools::Rectangle& rect);
+ };
+
+ /// One instance of this per view, handles flushing callbacks
+ class DESKTOP_DLLPUBLIC CallbackFlushHandler final : public Idle, public SfxLokCallbackInterface
+ {
+ public:
+ explicit CallbackFlushHandler(LibreOfficeKitDocument* pDocument, LibreOfficeKitCallback pCallback, void* pData);
+ virtual ~CallbackFlushHandler() override;
+ virtual void Invoke() override;
+ // TODO This should be dropped and the binary libreOfficeKitViewCallback() variants should be called?
+ void queue(const int type, const char* data);
+
+ /// Disables callbacks on this handler. Must match with identical count
+ /// of enableCallbacks. Used during painting and changing views.
+ void disableCallbacks() { ++m_nDisableCallbacks; }
+ /// Enables callbacks on this handler. Must match with identical count
+ /// of disableCallbacks. Used during painting and changing views.
+ void enableCallbacks() { --m_nDisableCallbacks; }
+ /// Returns true iff callbacks are disabled.
+ bool callbacksDisabled() const { return m_nDisableCallbacks != 0; }
+
+ void addViewStates(int viewId);
+ void removeViewStates(int viewId);
+
+ void setViewId( int viewId ) { m_viewId = viewId; }
+
+ // SfxLockCallbackInterface
+ virtual void libreOfficeKitViewCallback(int nType, const char* pPayload) override;
+ virtual void libreOfficeKitViewCallbackWithViewId(int nType, const char* pPayload, int nViewId) override;
+ virtual void libreOfficeKitViewInvalidateTilesCallback(const tools::Rectangle* pRect, int nPart) override;
+ virtual void libreOfficeKitViewUpdatedCallback(int nType) override;
+ virtual void libreOfficeKitViewUpdatedCallbackPerViewId(int nType, int nViewId, int nSourceViewId) override;
+
+ private:
+ struct CallbackData
+ {
+ CallbackData(const char* payload)
+ : PayloadString(payload ? payload : "(nil)")
+ {
+ }
+
+ CallbackData(const char* payload, int viewId)
+ : PayloadString(payload ? payload : "(nil)")
+ , PayloadObject(viewId)
+ {
+ }
+
+ CallbackData(const tools::Rectangle* pRect, int viewId)
+ : PayloadObject(RectangleAndPart(pRect, viewId))
+ { // PayloadString will be done on demand
+ }
+
+ const std::string& getPayload() const;
+ /// Update a RectangleAndPart object and update PayloadString if necessary.
+ void updateRectangleAndPart(const RectangleAndPart& rRectAndPart);
+ /// Return the parsed RectangleAndPart instance.
+ const RectangleAndPart& getRectangleAndPart() const;
+ /// Parse and set the JSON object and return it. Clobbers PayloadString.
+ boost::property_tree::ptree& setJson(const std::string& payload);
+ /// Set a Json object and update PayloadString.
+ void setJson(const boost::property_tree::ptree& rTree);
+ /// Return the parsed JSON instance.
+ const boost::property_tree::ptree& getJson() const;
+
+ int getViewId() const;
+
+ bool isEmpty() const
+ {
+ return PayloadString.empty() && PayloadObject.which() == 0;
+ }
+ void clear()
+ {
+ PayloadString.clear();
+ PayloadObject = boost::blank();
+ }
+
+ /// Validate that the payload and parsed object match.
+ bool validate() const;
+
+ /// Returns true iff there is cached data.
+ bool isCached() const { return PayloadObject.which() != 0; }
+
+ private:
+ mutable std::string PayloadString;
+
+ /// The parsed payload cache. Update validate() when changing this.
+ mutable boost::variant<boost::blank, RectangleAndPart, boost::property_tree::ptree, int> PayloadObject;
+ };
+
+ typedef std::vector<int> queue_type1;
+ typedef std::vector<CallbackData> queue_type2;
+
+ void startTimer();
+ bool removeAll(int type);
+ bool removeAll(int type, const std::function<bool (const CallbackData&)>& rTestFunc);
+ bool processInvalidateTilesEvent(int type, CallbackData& aCallbackData);
+ bool processWindowEvent(int type, CallbackData& aCallbackData);
+ queue_type2::iterator toQueue2(queue_type1::iterator);
+ queue_type2::reverse_iterator toQueue2(queue_type1::reverse_iterator);
+ void queue(const int type, CallbackData& data);
+ void enqueueUpdatedTypes();
+ void enqueueUpdatedType( int type, const SfxViewShell* sourceViewShell, int viewId );
+
+ /** we frequently want to scan the queue, and mostly when we do so, we only care about the element type
+ so we split the queue in 2 to make the scanning cache friendly. */
+ queue_type1 m_queue1;
+ queue_type2 m_queue2;
+ std::map<int, std::string> m_states;
+ std::unordered_map<std::string, std::string> m_lastStateChange;
+ std::unordered_map<int, std::unordered_map<int, std::string>> m_viewStates;
+
+ // For some types only the last message matters (see isUpdatedType()) or only the last message
+ // per each viewId value matters (see isUpdatedTypePerViewId()), so instead of using push model
+ // where we'd get flooded by repeated messages (which might be costly to generate and process),
+ // the preferred way is that libreOfficeKitViewUpdatedCallback()
+ // or libreOfficeKitViewUpdatedCallbackPerViewId() get called to notify about such a message being
+ // needed, and we'll set a flag here to fetch the actual message before flushing.
+ void setUpdatedType( int nType, bool value );
+ void setUpdatedTypePerViewId( int nType, int nViewId, int nSourceViewId, bool value );
+ void resetUpdatedType( int nType);
+ void resetUpdatedTypePerViewId( int nType, int nViewId );
+ std::vector<bool> m_updatedTypes; // index is type, value is if set
+ struct PerViewIdData
+ {
+ bool set = false; // value is if set
+ int sourceViewId;
+ };
+ // Flat_map is used in preference to unordered_map because the map is accessed very often.
+ boost::container::flat_map<int, std::vector<PerViewIdData>> m_updatedTypesPerViewId; // key is view, index is type
+
+ LibreOfficeKitDocument* m_pDocument;
+ int m_viewId = -1; // view id of the associated SfxViewShell
+ LibreOfficeKitCallback m_pCallback;
+ void *m_pData;
+ int m_nDisableCallbacks;
+ std::recursive_mutex m_mutex;
+ class TimeoutIdle : public Timer
+ {
+ public:
+ TimeoutIdle( CallbackFlushHandler* handler );
+ virtual void Invoke() override;
+ private:
+ CallbackFlushHandler* mHandler;
+ };
+ TimeoutIdle m_TimeoutIdle;
+ };
+
+ struct DESKTOP_DLLPUBLIC LibLODocument_Impl : public _LibreOfficeKitDocument
+ {
+ css::uno::Reference<css::lang::XComponent> mxComponent;
+ std::shared_ptr< LibreOfficeKitDocumentClass > m_pDocumentClass;
+ std::map<size_t, std::shared_ptr<CallbackFlushHandler>> mpCallbackFlushHandlers;
+ const int mnDocumentId;
+
+ explicit LibLODocument_Impl(css::uno::Reference<css::lang::XComponent> xComponent,
+ int nDocumentId);
+ ~LibLODocument_Impl();
+ };
+
+ struct DESKTOP_DLLPUBLIC LibLibreOffice_Impl : public _LibreOfficeKit
+ {
+ OUString maLastExceptionMsg;
+ std::shared_ptr< LibreOfficeKitClass > m_pOfficeClass;
+ oslThread maThread;
+ LibreOfficeKitCallback mpCallback;
+ void *mpCallbackData;
+ int64_t mOptionalFeatures;
+ std::map<OString, rtl::Reference<LOKInteractionHandler>> mInteractionMap;
+
+ LibLibreOffice_Impl();
+ ~LibLibreOffice_Impl();
+
+ bool hasOptionalFeature(LibreOfficeKitOptionalFeatures const feature)
+ {
+ return (mOptionalFeatures & feature) != 0;
+ }
+ };
+
+ /// Helper function to extract the value from parameters delimited by
+ /// comma, like: Name1=Value1,Name2=Value2,Name3=Value3.
+ /// @param rOptions When extracted, the Param=Value is removed from it.
+ DESKTOP_DLLPUBLIC OUString extractParameter(OUString& aOptions, std::u16string_view rName);
+
+ /// Helper function to convert JSON to a vector of PropertyValues.
+ /// Public to be unit-test-able.
+ DESKTOP_DLLPUBLIC std::vector<com::sun::star::beans::PropertyValue> jsonToPropertyValuesVector(const char* pJSON);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/inc/migration.hxx b/desktop/inc/migration.hxx
new file mode 100644
index 000000000..bbe420f0c
--- /dev/null
+++ b/desktop/inc/migration.hxx
@@ -0,0 +1,31 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+namespace desktop
+{
+class Migration
+{
+public:
+ static void migrateSettingsIfNecessary();
+};
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/inc/pch/precompiled_deployment.cxx b/desktop/inc/pch/precompiled_deployment.cxx
new file mode 100644
index 000000000..4a35415df
--- /dev/null
+++ b/desktop/inc/pch/precompiled_deployment.cxx
@@ -0,0 +1,12 @@
+/* -*- 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/.
+ */
+
+#include "precompiled_deployment.hxx"
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/inc/pch/precompiled_deployment.hxx b/desktop/inc/pch/precompiled_deployment.hxx
new file mode 100644
index 000000000..f4e8cf931
--- /dev/null
+++ b/desktop/inc/pch/precompiled_deployment.hxx
@@ -0,0 +1,94 @@
+/* -*- 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 has been autogenerated by update_pch.sh. It is possible to edit it
+ manually (such as when an include file has been moved/renamed/removed). All such
+ manual changes will be rewritten by the next run of update_pch.sh (which presumably
+ also fixes all possible problems, so it's usually better to use it).
+
+ Generated on 2021-03-08 13:13:30 using:
+ ./bin/update_pch desktop deployment --cutoff=3 --exclude:system --exclude:module --exclude:local
+
+ If after updating build fails, use the following command to locate conflicting headers:
+ ./bin/update_pch_bisect ./desktop/inc/pch/precompiled_deployment.hxx "make desktop.build" --find-conflicts
+*/
+
+#include <sal/config.h>
+#if PCH_LEVEL >= 1
+#include <algorithm>
+#include <cstddef>
+#include <memory>
+#include <optional>
+#include <ostream>
+#include <string_view>
+#include <unordered_map>
+#include <vector>
+#endif // PCH_LEVEL >= 1
+#if PCH_LEVEL >= 2
+#include <osl/diagnose.h>
+#include <osl/file.hxx>
+#include <osl/security.hxx>
+#include <rtl/bootstrap.hxx>
+#include <rtl/byteseq.hxx>
+#include <rtl/strbuf.hxx>
+#include <rtl/string.hxx>
+#include <rtl/textenc.h>
+#include <rtl/uri.hxx>
+#include <rtl/ustrbuf.hxx>
+#include <rtl/ustring.hxx>
+#include <sal/log.hxx>
+#endif // PCH_LEVEL >= 2
+#if PCH_LEVEL >= 3
+#include <com/sun/star/deployment/DeploymentException.hpp>
+#include <com/sun/star/deployment/ExtensionRemovedException.hpp>
+#include <com/sun/star/io/XInputStream.hpp>
+#include <com/sun/star/lang/IllegalArgumentException.hpp>
+#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/sdbc/XResultSet.hpp>
+#include <com/sun/star/sdbc/XRow.hpp>
+#include <com/sun/star/task/XInteractionApprove.hpp>
+#include <com/sun/star/ucb/CommandAbortedException.hpp>
+#include <com/sun/star/ucb/CommandFailedException.hpp>
+#include <com/sun/star/ucb/ContentCreationException.hpp>
+#include <com/sun/star/ucb/NameClash.hpp>
+#include <com/sun/star/ucb/XCommandEnvironment.hpp>
+#include <com/sun/star/uno/Any.hxx>
+#include <com/sun/star/uno/Reference.h>
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/RuntimeException.hpp>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <com/sun/star/uno/XInterface.hpp>
+#include <com/sun/star/util/XUpdatable.hpp>
+#include <comphelper/comphelperdllapi.h>
+#include <comphelper/sequence.hxx>
+#include <cppu/cppudllapi.h>
+#include <cppuhelper/compbase.hxx>
+#include <cppuhelper/exc_hlp.hxx>
+#include <cppuhelper/implbase.hxx>
+#include <cppuhelper/supportsservice.hxx>
+#include <svl/inettype.hxx>
+#include <tools/diagnose_ex.h>
+#include <ucbhelper/content.hxx>
+#include <unotools/unotoolsdllapi.h>
+#include <xmlscript/xml_helper.hxx>
+#endif // PCH_LEVEL >= 3
+#if PCH_LEVEL >= 4
+#include <dp_backend.h>
+#include <dp_descriptioninfoset.hxx>
+#include <dp_identifier.hxx>
+#include <dp_interact.h>
+#include <dp_misc_api.hxx>
+#include <dp_platform.hxx>
+#include <dp_ucb.h>
+#endif // PCH_LEVEL >= 4
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/inc/pch/precompiled_deploymentgui.cxx b/desktop/inc/pch/precompiled_deploymentgui.cxx
new file mode 100644
index 000000000..6a5ec88eb
--- /dev/null
+++ b/desktop/inc/pch/precompiled_deploymentgui.cxx
@@ -0,0 +1,12 @@
+/* -*- 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/.
+ */
+
+#include "precompiled_deploymentgui.hxx"
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/inc/pch/precompiled_deploymentgui.hxx b/desktop/inc/pch/precompiled_deploymentgui.hxx
new file mode 100644
index 000000000..fe7d402e7
--- /dev/null
+++ b/desktop/inc/pch/precompiled_deploymentgui.hxx
@@ -0,0 +1,110 @@
+/* -*- 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 has been autogenerated by update_pch.sh. It is possible to edit it
+ manually (such as when an include file has been moved/renamed/removed). All such
+ manual changes will be rewritten by the next run of update_pch.sh (which presumably
+ also fixes all possible problems, so it's usually better to use it).
+
+ Generated on 2021-03-08 13:13:39 using:
+ ./bin/update_pch desktop deploymentgui --cutoff=3 --exclude:system --exclude:module --exclude:local
+
+ If after updating build fails, use the following command to locate conflicting headers:
+ ./bin/update_pch_bisect ./desktop/inc/pch/precompiled_deploymentgui.hxx "make desktop.build" --find-conflicts
+*/
+
+#include <sal/config.h>
+#if PCH_LEVEL >= 1
+#include <algorithm>
+#include <cassert>
+#include <cstddef>
+#include <cstdlib>
+#include <initializer_list>
+#include <iomanip>
+#include <limits.h>
+#include <memory>
+#include <new>
+#include <optional>
+#include <ostream>
+#include <sstream>
+#include <stddef.h>
+#include <string>
+#include <string_view>
+#include <utility>
+#include <vector>
+#endif // PCH_LEVEL >= 1
+#if PCH_LEVEL >= 2
+#include <osl/conditn.hxx>
+#include <osl/diagnose.h>
+#include <osl/file.hxx>
+#include <osl/interlck.h>
+#include <osl/mutex.hxx>
+#include <osl/time.h>
+#include <rtl/alloc.h>
+#include <rtl/locale.h>
+#include <rtl/ref.hxx>
+#include <rtl/ustrbuf.hxx>
+#include <rtl/ustring.hxx>
+#include <sal/detail/log.h>
+#include <sal/log.hxx>
+#include <sal/macros.h>
+#include <sal/saldllapi.h>
+#include <sal/types.h>
+#include <sal/typesizes.h>
+#include <vcl/dllapi.h>
+#include <vcl/svapp.hxx>
+#include <vcl/weld.hxx>
+#endif // PCH_LEVEL >= 2
+#if PCH_LEVEL >= 3
+#include <com/sun/star/beans/NamedValue.hpp>
+#include <com/sun/star/deployment/DeploymentException.hpp>
+#include <com/sun/star/deployment/ExtensionManager.hpp>
+#include <com/sun/star/lang/IllegalArgumentException.hpp>
+#include <com/sun/star/ucb/CommandFailedException.hpp>
+#include <com/sun/star/ucb/XCommandEnvironment.hpp>
+#include <com/sun/star/uno/Any.h>
+#include <com/sun/star/uno/Any.hxx>
+#include <com/sun/star/uno/Reference.h>
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/RuntimeException.hpp>
+#include <com/sun/star/uno/Sequence.h>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/uno/Type.h>
+#include <com/sun/star/uno/Type.hxx>
+#include <com/sun/star/uno/XInterface.hpp>
+#include <com/sun/star/uno/genfunc.hxx>
+#include <comphelper/anytostring.hxx>
+#include <comphelper/processfactory.hxx>
+#include <cppu/cppudllapi.h>
+#include <cppu/unotype.hxx>
+#include <cppuhelper/exc_hlp.hxx>
+#include <cppuhelper/implbase.hxx>
+#include <cppuhelper/supportsservice.hxx>
+#include <o3tl/typed_flags_set.hxx>
+#include <salhelper/thread.hxx>
+#include <tools/degree.hxx>
+#include <tools/gen.hxx>
+#include <tools/link.hxx>
+#include <tools/long.hxx>
+#include <tools/solar.h>
+#include <tools/toolsdllapi.h>
+#include <typelib/typedescription.h>
+#include <uno/data.h>
+#include <uno/sequence2.h>
+#include <unotools/configmgr.hxx>
+#endif // PCH_LEVEL >= 3
+#if PCH_LEVEL >= 4
+#include <dp_dependencies.hxx>
+#include <dp_identifier.hxx>
+#include <dp_misc_api.hxx>
+#include <dp_update.hxx>
+#endif // PCH_LEVEL >= 4
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/inc/pch/precompiled_deploymentmisc.cxx b/desktop/inc/pch/precompiled_deploymentmisc.cxx
new file mode 100644
index 000000000..1a2225a93
--- /dev/null
+++ b/desktop/inc/pch/precompiled_deploymentmisc.cxx
@@ -0,0 +1,12 @@
+/* -*- 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/.
+ */
+
+#include "precompiled_deploymentmisc.hxx"
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/inc/pch/precompiled_deploymentmisc.hxx b/desktop/inc/pch/precompiled_deploymentmisc.hxx
new file mode 100644
index 000000000..4732ac572
--- /dev/null
+++ b/desktop/inc/pch/precompiled_deploymentmisc.hxx
@@ -0,0 +1,86 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+/*
+ This file has been autogenerated by update_pch.sh. It is possible to edit it
+ manually (such as when an include file has been moved/renamed/removed). All such
+ manual changes will be rewritten by the next run of update_pch.sh (which presumably
+ also fixes all possible problems, so it's usually better to use it).
+
+ Generated on 2021-04-11 19:47:50 using:
+ ./bin/update_pch desktop deploymentmisc --cutoff=3 --exclude:system --exclude:module --exclude:local
+
+ If after updating build fails, use the following command to locate conflicting headers:
+ ./bin/update_pch_bisect ./desktop/inc/pch/precompiled_deploymentmisc.hxx "make desktop.build" --find-conflicts
+*/
+
+#include <sal/config.h>
+#if PCH_LEVEL >= 1
+#include <cassert>
+#include <cstddef>
+#include <cstdlib>
+#include <memory>
+#include <sstream>
+#include <string>
+#include <string_view>
+#include <utility>
+#include <vector>
+#endif // PCH_LEVEL >= 1
+#if PCH_LEVEL >= 2
+#include <osl/diagnose.h>
+#include <osl/doublecheckedlocking.h>
+#include <osl/getglobalmutex.hxx>
+#include <osl/interlck.h>
+#include <osl/pipe.hxx>
+#include <osl/security.hxx>
+#include <osl/thread.hxx>
+#include <osl/time.h>
+#include <rtl/alloc.h>
+#include <rtl/bootstrap.hxx>
+#include <rtl/digest.h>
+#include <rtl/instance.hxx>
+#include <rtl/locale.h>
+#include <rtl/random.h>
+#include <rtl/ref.hxx>
+#include <rtl/uri.hxx>
+#include <rtl/ustrbuf.hxx>
+#include <rtl/ustring.hxx>
+#include <sal/detail/log.h>
+#include <sal/log.hxx>
+#include <sal/saldllapi.h>
+#include <sal/types.h>
+#endif // PCH_LEVEL >= 2
+#if PCH_LEVEL >= 3
+#include <com/sun/star/lang/XTypeProvider.hpp>
+#include <com/sun/star/ucb/XCommandEnvironment.hpp>
+#include <com/sun/star/uno/Any.h>
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/Sequence.h>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/uno/Type.h>
+#include <com/sun/star/uno/XWeak.hpp>
+#include <com/sun/star/uno/genfunc.hxx>
+#include <comphelper/comphelperdllapi.h>
+#include <comphelper/processfactory.hxx>
+#include <cppu/unotype.hxx>
+#include <cppuhelper/cppuhelperdllapi.h>
+#include <cppuhelper/implbase.hxx>
+#include <cppuhelper/implbase_ex.hxx>
+#include <cppuhelper/weak.hxx>
+#include <salhelper/linkhelper.hxx>
+#include <typelib/typedescription.h>
+#include <uno/data.h>
+#endif // PCH_LEVEL >= 3
+#if PCH_LEVEL >= 4
+#include <dp_descriptioninfoset.hxx>
+#include <dp_misc_api.hxx>
+#include <dp_version.hxx>
+#endif // PCH_LEVEL >= 4
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/inc/pch/precompiled_sofficeapp.cxx b/desktop/inc/pch/precompiled_sofficeapp.cxx
new file mode 100644
index 000000000..4ac33f45e
--- /dev/null
+++ b/desktop/inc/pch/precompiled_sofficeapp.cxx
@@ -0,0 +1,12 @@
+/* -*- 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/.
+ */
+
+#include "precompiled_sofficeapp.hxx"
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/inc/pch/precompiled_sofficeapp.hxx b/desktop/inc/pch/precompiled_sofficeapp.hxx
new file mode 100644
index 000000000..58efb5dc3
--- /dev/null
+++ b/desktop/inc/pch/precompiled_sofficeapp.hxx
@@ -0,0 +1,198 @@
+/* -*- 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 has been autogenerated by update_pch.sh. It is possible to edit it
+ manually (such as when an include file has been moved/renamed/removed). All such
+ manual changes will be rewritten by the next run of update_pch.sh (which presumably
+ also fixes all possible problems, so it's usually better to use it).
+
+ Generated on 2021-04-08 13:55:49 using:
+ ./bin/update_pch desktop sofficeapp --cutoff=6 --exclude:system --include:module --include:local
+
+ If after updating build fails, use the following command to locate conflicting headers:
+ ./bin/update_pch_bisect ./desktop/inc/pch/precompiled_sofficeapp.hxx "make desktop.build" --find-conflicts
+*/
+
+#include <sal/config.h>
+#if PCH_LEVEL >= 1
+#include <algorithm>
+#include <cassert>
+#include <chrono>
+#include <cmath>
+#include <cstddef>
+#include <cstdlib>
+#include <cstring>
+#include <deque>
+#include <float.h>
+#include <functional>
+#include <initializer_list>
+#include <iomanip>
+#include <limits.h>
+#include <limits>
+#include <map>
+#include <math.h>
+#include <memory>
+#include <new>
+#include <optional>
+#include <ostream>
+#include <stddef.h>
+#include <string.h>
+#include <string>
+#include <string_view>
+#include <type_traits>
+#include <utility>
+#include <vector>
+#include <boost/property_tree/ptree_fwd.hpp>
+#endif // PCH_LEVEL >= 1
+#if PCH_LEVEL >= 2
+#include <osl/conditn.hxx>
+#include <osl/diagnose.h>
+#include <osl/doublecheckedlocking.h>
+#include <osl/endian.h>
+#include <osl/file.hxx>
+#include <osl/getglobalmutex.hxx>
+#include <osl/interlck.h>
+#include <osl/mutex.h>
+#include <osl/mutex.hxx>
+#include <osl/pipe.h>
+#include <osl/pipe.hxx>
+#include <osl/security.h>
+#include <osl/security.hxx>
+#include <osl/thread.h>
+#include <osl/time.h>
+#include <rtl/alloc.h>
+#include <rtl/bootstrap.hxx>
+#include <rtl/byteseq.hxx>
+#include <rtl/character.hxx>
+#include <rtl/digest.h>
+#include <rtl/instance.hxx>
+#include <rtl/math.h>
+#include <rtl/process.h>
+#include <rtl/ref.hxx>
+#include <rtl/strbuf.hxx>
+#include <rtl/string.h>
+#include <rtl/string.hxx>
+#include <rtl/stringconcat.hxx>
+#include <rtl/stringutils.hxx>
+#include <rtl/textcvt.h>
+#include <rtl/textenc.h>
+#include <rtl/uri.hxx>
+#include <rtl/ustrbuf.h>
+#include <rtl/ustrbuf.hxx>
+#include <rtl/ustring.h>
+#include <rtl/ustring.hxx>
+#include <sal/backtrace.hxx>
+#include <sal/detail/log.h>
+#include <sal/log.hxx>
+#include <sal/macros.h>
+#include <sal/saldllapi.h>
+#include <sal/types.h>
+#include <sal/typesizes.h>
+#include <vcl/Scanline.hxx>
+#include <vcl/alpha.hxx>
+#include <vcl/bitmap.hxx>
+#include <vcl/bitmap/BitmapTypes.hxx>
+#include <vcl/bitmapex.hxx>
+#include <vcl/checksum.hxx>
+#include <vcl/dllapi.h>
+#include <vcl/errcode.hxx>
+#include <vcl/fntstyle.hxx>
+#include <vcl/font.hxx>
+#include <vcl/mapmod.hxx>
+#include <vcl/region.hxx>
+#include <vcl/scopedbitmapaccess.hxx>
+#include <vcl/vclenum.hxx>
+#include <vcl/vclptr.hxx>
+#endif // PCH_LEVEL >= 2
+#if PCH_LEVEL >= 3
+#include <basegfx/basegfxdllapi.h>
+#include <basegfx/color/bcolor.hxx>
+#include <basegfx/numeric/ftools.hxx>
+#include <basegfx/point/b2dpoint.hxx>
+#include <basegfx/point/b2ipoint.hxx>
+#include <basegfx/polygon/b2dpolygon.hxx>
+#include <basegfx/polygon/b2dpolypolygon.hxx>
+#include <basegfx/range/b2drange.hxx>
+#include <basegfx/range/basicrange.hxx>
+#include <basegfx/tuple/b2dtuple.hxx>
+#include <basegfx/tuple/b2ituple.hxx>
+#include <basegfx/tuple/b3dtuple.hxx>
+#include <basegfx/utils/common.hxx>
+#include <basegfx/vector/b2dvector.hxx>
+#include <basegfx/vector/b2enums.hxx>
+#include <basegfx/vector/b2ivector.hxx>
+#include <basic/basicdllapi.h>
+#include <basic/sbxcore.hxx>
+#include <basic/sbxdef.hxx>
+#include <com/sun/star/lang/DisposedException.hpp>
+#include <com/sun/star/lang/EventObject.hpp>
+#include <com/sun/star/lang/XTypeProvider.hpp>
+#include <com/sun/star/uno/Any.h>
+#include <com/sun/star/uno/Any.hxx>
+#include <com/sun/star/uno/Reference.h>
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/RuntimeException.hpp>
+#include <com/sun/star/uno/Sequence.h>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/uno/Type.h>
+#include <com/sun/star/uno/Type.hxx>
+#include <com/sun/star/uno/TypeClass.hdl>
+#include <com/sun/star/uno/XInterface.hpp>
+#include <com/sun/star/uno/XWeak.hpp>
+#include <com/sun/star/uno/genfunc.h>
+#include <com/sun/star/uno/genfunc.hxx>
+#include <comphelper/comphelperdllapi.h>
+#include <comphelper/processfactory.hxx>
+#include <cppu/cppudllapi.h>
+#include <cppu/unotype.hxx>
+#include <cppuhelper/cppuhelperdllapi.h>
+#include <cppuhelper/implbase.hxx>
+#include <cppuhelper/implbase_ex.hxx>
+#include <cppuhelper/implbase_ex_post.hxx>
+#include <cppuhelper/implbase_ex_pre.hxx>
+#include <cppuhelper/weak.hxx>
+#include <i18nlangtag/lang.h>
+#include <o3tl/cow_wrapper.hxx>
+#include <o3tl/strong_int.hxx>
+#include <o3tl/typed_flags_set.hxx>
+#include <o3tl/underlyingenumvalue.hxx>
+#include <salhelper/thread.hxx>
+#include <sfx2/dllapi.h>
+#include <svl/hint.hxx>
+#include <svl/poolitem.hxx>
+#include <svl/svldllapi.h>
+#include <svl/typedwhich.hxx>
+#include <svtools/svtdllapi.h>
+#include <tools/color.hxx>
+#include <tools/degree.hxx>
+#include <tools/diagnose_ex.h>
+#include <tools/fontenum.hxx>
+#include <tools/gen.hxx>
+#include <tools/link.hxx>
+#include <tools/long.hxx>
+#include <tools/mapunit.hxx>
+#include <tools/poly.hxx>
+#include <tools/ref.hxx>
+#include <tools/solar.h>
+#include <tools/toolsdllapi.h>
+#include <typelib/typeclass.h>
+#include <typelib/typedescription.h>
+#include <typelib/uik.h>
+#include <uno/any2.h>
+#include <uno/data.h>
+#include <uno/sequence2.h>
+#include <unotools/options.hxx>
+#include <unotools/unotoolsdllapi.h>
+#endif // PCH_LEVEL >= 3
+#if PCH_LEVEL >= 4
+#include <app.hxx>
+#endif // PCH_LEVEL >= 4
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/inc/strings.hrc b/desktop/inc/strings.hrc
new file mode 100644
index 000000000..b18117bb5
--- /dev/null
+++ b/desktop/inc/strings.hrc
@@ -0,0 +1,191 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
+
+#define RID_STR_COPYING_PACKAGE NC_("RID_STR_COPYING_PACKAGE", "Copying: ")
+#define RID_STR_ERROR_WHILE_ADDING NC_("RID_STR_ERROR_WHILE_ADDING", "Error while adding: ")
+#define RID_STR_ERROR_WHILE_REMOVING NC_("RID_STR_ERROR_WHILE_REMOVING", "Error while removing: ")
+#define RID_STR_PACKAGE_ALREADY_ADDED NC_("RID_STR_PACKAGE_ALREADY_ADDED", "Extension has already been added: ")
+#define RID_STR_NO_SUCH_PACKAGE NC_("RID_STR_NO_SUCH_PACKAGE", "There is no such extension deployed: ")
+#define RID_STR_SYNCHRONIZING_REPOSITORY NC_("RID_STR_SYNCHRONIZING_REPOSITORY", "Synchronizing repository for %NAME extensions")
+
+#define RID_STR_REGISTERING_PACKAGE NC_("RID_STR_REGISTERING_PACKAGE", "Enabling: ")
+#define RID_STR_REVOKING_PACKAGE NC_("RID_STR_REVOKING_PACKAGE", "Disabling: ")
+#define RID_STR_CANNOT_DETECT_MEDIA_TYPE NC_("RID_STR_CANNOT_DETECT_MEDIA_TYPE", "Cannot detect media-type: ")
+#define RID_STR_UNSUPPORTED_MEDIA_TYPE NC_("RID_STR_UNSUPPORTED_MEDIA_TYPE", "This media-type is not supported: ")
+#define RID_STR_ERROR_WHILE_REGISTERING NC_("RID_STR_ERROR_WHILE_REGISTERING", "An error occurred while enabling: ")
+#define RID_STR_ERROR_WHILE_REVOKING NC_("RID_STR_ERROR_WHILE_REVOKING", "An error occurred while disabling: ")
+
+#define RID_STR_CONF_SCHEMA NC_("RID_STR_CONF_SCHEMA", "Configuration Schema")
+#define RID_STR_CONF_DATA NC_("RID_STR_CONF_DATA", "Configuration Data")
+
+#define RID_STR_BASIC_LIB NC_("RID_STR_BASIC_LIB", "Basic Library")
+#define RID_STR_DIALOG_LIB NC_("RID_STR_DIALOG_LIB", "Dialog Library")
+#define RID_STR_CANNOT_DETERMINE_LIBNAME NC_("RID_STR_CANNOT_DETERMINE_LIBNAME", "The library name could not be determined.")
+
+#define RID_STR_PACKAGE_BUNDLE NC_("RID_STR_PACKAGE_BUNDLE", "Extension")
+#define RID_STR_ALL_SUPPORTED NC_("RID_STR_PACKAGE_BUNDLE", "All supported files")
+
+#define RID_STR_DYN_COMPONENT NC_("RID_STR_DYN_COMPONENT", "UNO Dynamic Library Component")
+#define RID_STR_JAVA_COMPONENT NC_("RID_STR_JAVA_COMPONENT", "UNO Java Component")
+#define RID_STR_PYTHON_COMPONENT NC_("RID_STR_PYTHON_COMPONENT", "UNO Python Component")
+#define RID_STR_COMPONENTS NC_("RID_STR_COMPONENTS", "UNO Components")
+#define RID_STR_RDB_TYPELIB NC_("RID_STR_RDB_TYPELIB", "UNO RDB Type Library")
+#define RID_STR_JAVA_TYPELIB NC_("RID_STR_JAVA_TYPELIB", "UNO Java Type Library")
+
+#define RID_STR_SFWK_LIB NC_("RID_STR_SFWK_LIB", "%MACROLANG Library")
+
+#define RID_STR_HELP NC_("RID_STR_HELP", "Help")
+#define RID_STR_HELPPROCESSING_GENERAL_ERROR NC_("RID_STR_HELPPROCESSING_GENERAL_ERROR", "The extension cannot be installed because:\n")
+#define RID_STR_HELPPROCESSING_XMLPARSING_ERROR NC_("RID_STR_HELPPROCESSING_XMLPARSING_ERROR", "The extension will not be installed because an error occurred in the Help files:\n")
+
+#define RID_STR_ADD_PACKAGES NC_("RID_STR_ADD_PACKAGES", "Add Extension(s)")
+#define RID_CTX_ITEM_REMOVE NC_("RID_CTX_ITEM_REMOVE", "~Remove")
+#define RID_CTX_ITEM_ENABLE NC_("RID_CTX_ITEM_ENABLE", "~Enable")
+#define RID_CTX_ITEM_DISABLE NC_("RID_CTX_ITEM_DISABLE", "~Disable")
+#define RID_CTX_ITEM_CHECK_UPDATE NC_("RID_CTX_ITEM_CHECK_UPDATE", "~Update...")
+#define RID_STR_ADDING_PACKAGES NC_("RID_STR_ADDING_PACKAGES", "Adding %EXTENSION_NAME")
+#define RID_STR_REMOVING_PACKAGES NC_("RID_STR_REMOVING_PACKAGES", "Removing %EXTENSION_NAME")
+#define RID_STR_ENABLING_PACKAGES NC_("RID_STR_ENABLING_PACKAGES", "Enabling %EXTENSION_NAME")
+#define RID_STR_DISABLING_PACKAGES NC_("RID_STR_DISABLING_PACKAGES", "Disabling %EXTENSION_NAME")
+#define RID_STR_ACCEPT_LICENSE NC_("RID_STR_ACCEPT_LICENSE", "Accept license for %EXTENSION_NAME")
+#define RID_STR_ERROR_UNKNOWN_STATUS NC_("RID_STR_ERROR_UNKNOWN_STATUS", "Error: The status of this extension is unknown")
+#define RID_STR_CLOSE_BTN NC_("RID_STR_CLOSE_BTN", "Close")
+#define RID_STR_EXIT_BTN NC_("RID_STR_EXIT_BTN", "Quit")
+#define RID_STR_NO_ADMIN_PRIVILEGE NC_("RID_STR_NO_ADMIN_PRIVILEGE", "%PRODUCTNAME has been updated to a new version. " \
+ "Some shared %PRODUCTNAME extensions are not compatible with this version and need to be updated before %PRODUCTNAME can be started.\n\n" \
+ "Updating of shared extension requires administrator privileges. Contact your system administrator to update the following shared extensions:")
+#define RID_STR_ERROR_MISSING_DEPENDENCIES NC_("RID_STR_ERROR_MISSING_DEPENDENCIES", "The extension cannot be enabled as the following system dependencies are not fulfilled:")
+#define RID_STR_ERROR_MISSING_LICENSE NC_("RID_STR_ERROR_MISSING_LICENSE", "This extension is disabled because you haven't accepted the license yet.\n")
+#define RID_STR_SHOW_LICENSE_CMD NC_("RID_STR_SHOW_LICENSE_CMD", "Show license")
+#define RID_STR_WARNING_INSTALL_EXTENSION NC_("RID_STR_WARNING_INSTALL_EXTENSION", "You are about to install the extension '%NAME'.\n" \
+ "Click 'OK' to proceed with the installation.\n" \
+ "Click 'Cancel' to stop the installation.")
+#define RID_STR_WARNING_INSTALL_EXTENSION_DISABLED NC_("RID_STR_WARNING_INSTALL_EXTENSION_DISABLED", "Extension installation is currently disabled. " \
+ "Please consult your system administrator for more information.")
+#define RID_STR_WARNING_REMOVE_EXTENSION_DISABLED NC_("RID_STR_WARNING_REMOVE_EXTENSION_DISABLED", "Extension removal is currently disabled. " \
+ "Please consult your system administrator for more information.")
+#define RID_STR_WARNING_REMOVE_EXTENSION NC_("RID_STR_WARNING_REMOVE_EXTENSION", "You are about to remove the extension '%NAME'.\n" \
+ "Click 'OK' to remove the extension.\n" \
+ "Click 'Cancel' to stop removing the extension.")
+#define RID_STR_WARNING_REMOVE_SHARED_EXTENSION NC_("RID_STR_WARNING_REMOVE_SHARED_EXTENSION", "Make sure that no further users are working with the same " \
+ "%PRODUCTNAME, when changing shared extensions in a multi user environment.\n" \
+ "Click 'OK' to remove the extension.\n" \
+ "Click 'Cancel' to stop removing the extension.")
+#define RID_STR_WARNING_ENABLE_SHARED_EXTENSION NC_("RID_STR_WARNING_ENABLE_SHARED_EXTENSION", "Make sure that no further users are working with the same " \
+ "%PRODUCTNAME, when changing shared extensions in a multi user environment.\n" \
+ "Click 'OK' to enable the extension.\n" \
+ "Click 'Cancel' to stop enabling the extension.")
+#define RID_STR_WARNING_DISABLE_SHARED_EXTENSION NC_("RID_STR_WARNING_DISABLE_SHARED_EXTENSION", "Make sure that no further users are working with the same " \
+ "%PRODUCTNAME, when changing shared extensions in a multi user environment.\n" \
+ "Click 'OK' to disable the extension.\n" \
+ "Click 'Cancel' to stop disabling the extension.")
+#define RID_STR_UNSUPPORTED_PLATFORM NC_("RID_STR_UNSUPPORTED_PLATFORM", "The extension '%Name' does not work on this computer.")
+
+#define RID_DLG_UPDATE_INSTALL_INSTALLING NC_("RID_DLG_UPDATE_INSTALL_INSTALLING", "Installing extensions...")
+#define RID_DLG_UPDATE_INSTALL_FINISHED NC_("RID_DLG_UPDATE_INSTALL_FINISHED", "Installation finished")
+#define RID_DLG_UPDATE_INSTALL_NO_ERRORS NC_("RID_DLG_UPDATE_INSTALL_NO_ERRORS", "No errors.")
+#define RID_DLG_UPDATE_INSTALL_ERROR_DOWNLOAD NC_("RID_DLG_UPDATE_INSTALL_ERROR_DOWNLOAD", "Error while downloading extension %NAME. ")
+#define RID_DLG_UPDATE_INSTALL_THIS_ERROR_OCCURRED NC_("RID_DLG_UPDATE_INSTALL_THIS_ERROR_OCCURRED", "The error message is: ")
+#define RID_DLG_UPDATE_INSTALL_ERROR_INSTALLATION NC_("RID_DLG_UPDATE_INSTALL_ERROR_INSTALLATION", "Error while installing extension %NAME. ")
+#define RID_DLG_UPDATE_INSTALL_ERROR_LIC_DECLINED NC_("RID_DLG_UPDATE_INSTALL_ERROR_LIC_DECLINED", "The license agreement for extension %NAME was refused. ")
+#define RID_DLG_UPDATE_INSTALL_EXTENSION_NOINSTALL NC_("RID_DLG_UPDATE_INSTALL_EXTENSION_NOINSTALL", "The extension will not be installed.")
+
+#define RID_DEPLOYMENT_DEPENDENCIES_UNKNOWN NC_("RID_DEPLOYMENT_DEPENDENCIES_UNKNOWN", "Unknown")
+#define RID_DEPLOYMENT_DEPENDENCIES_OOO_MIN NC_("RID_DEPLOYMENT_DEPENDENCIES_OOO_MIN", "Extension requires at least OpenOffice.org reference version %VERSION")
+#define RID_DEPLOYMENT_DEPENDENCIES_OOO_MAX NC_("RID_DEPLOYMENT_DEPENDENCIES_OOO_MAX", "Extension does not support OpenOffice.org reference versions greater than %VERSION")
+#define RID_DEPLOYMENT_DEPENDENCIES_LO_MIN NC_("RID_DEPLOYMENT_DEPENDENCIES_LO_MIN", "Extension requires at least %PRODUCTNAME version %VERSION")
+#define RID_DEPLOYMENT_DEPENDENCIES_LO_MAX NC_("RID_DEPLOYMENT_DEPENDENCIES_LO_MAX", "Extension does not support %PRODUCTNAME versions greater than %VERSION")
+
+#define RID_STR_WARNING_VERSION_LESS NC_("RID_STR_WARNING_VERSION_LESS", "You are about to install version $NEW of the extension '$NAME'.\n" \
+ "The newer version $DEPLOYED is already installed.\n"\
+ "Click 'OK' to replace the installed extension.\n"\
+ "Click 'Cancel' to stop the installation.")
+#define RID_STR_WARNINGBOX_VERSION_LESS_DIFFERENT_NAMES NC_("RID_STR_WARNINGBOX_VERSION_LESS_DIFFERENT_NAMES", "You are about to install version $NEW of the extension '$NAME'.\n" \
+ "The newer version $DEPLOYED, named '$OLDNAME', is already installed.\n" \
+ "Click 'OK' to replace the installed extension.\n" \
+ "Click 'Cancel' to stop the installation.")
+#define RID_STR_WARNING_VERSION_EQUAL NC_("RID_STR_WARNING_VERSION_EQUAL", "You are about to install version $NEW of the extension '$NAME'.\n" \
+ "That version is already installed.\n" \
+ "Click 'OK' to replace the installed extension.\n" \
+ "Click 'Cancel' to stop the installation.")
+#define RID_STR_WARNINGBOX_VERSION_EQUAL_DIFFERENT_NAMES NC_("RID_STR_WARNINGBOX_VERSION_EQUAL_DIFFERENT_NAMES", "You are about to install version $NEW of the extension '$NAME'.\n" \
+ "That version, named '$OLDNAME', is already installed.\n" \
+ "Click 'OK' to replace the installed extension.\n" \
+ "Click 'Cancel' to stop the installation.")
+#define RID_STR_WARNING_VERSION_GREATER NC_("RID_STR_WARNING_VERSION_GREATER", "You are about to install version $NEW of the extension '$NAME'.\n" \
+ "The older version $DEPLOYED is already installed.\n" \
+ "Click 'OK' to replace the installed extension.\n" \
+ "Click 'Cancel' to stop the installation.")
+#define RID_STR_WARNINGBOX_VERSION_GREATER_DIFFERENT_NAMES NC_("RID_STR_WARNINGBOX_VERSION_GREATER_DIFFERENT_NAMES", "You are about to install version $NEW of the extension '$NAME'.\n" \
+ "The older version $DEPLOYED, named '$OLDNAME', is already installed.\n" \
+ "Click 'OK' to replace the installed extension.\n" \
+ "Click 'Cancel' to stop the installation.")
+
+#define RID_DLG_UPDATE_NONE NC_("RID_DLG_UPDATE_NONE", "No new updates are available.")
+#define RID_DLG_UPDATE_NOINSTALLABLE NC_("RID_DLG_UPDATE_NOINSTALLABLE", "No installable updates are available. To see ignored or disabled updates, mark the check box 'Show all updates'.")
+#define RID_DLG_UPDATE_FAILURE NC_("RID_DLG_UPDATE_FAILURE", "An error occurred:")
+#define RID_DLG_UPDATE_UNKNOWNERROR NC_("RID_DLG_UPDATE_UNKNOWNERROR", "Unknown error.")
+#define RID_DLG_UPDATE_NODESCRIPTION NC_("RID_DLG_UPDATE_NODESCRIPTION", "No more details are available for this update.")
+#define RID_DLG_UPDATE_NOINSTALL NC_("RID_DLG_UPDATE_NOINSTALL", "The extension cannot be updated because:")
+#define RID_DLG_UPDATE_NODEPENDENCY NC_("RID_DLG_UPDATE_NODEPENDENCY", "Required %PRODUCTNAME version doesn't match:")
+#define RID_DLG_UPDATE_NODEPENDENCY_CUR_VER NC_("RID_DLG_UPDATE_NODEPENDENCY_CUR_VER", "You have %PRODUCTNAME %VERSION")
+#define RID_DLG_UPDATE_BROWSERBASED NC_("RID_DLG_UPDATE_BROWSERBASED", "browser based update")
+#define RID_DLG_UPDATE_VERSION NC_("RID_DLG_UPDATE_VERSION", "Version")
+#define RID_DLG_UPDATE_IGNORED_UPDATE NC_("RID_DLG_UPDATE_IGNORED_UPDATE", "This update will be ignored.\n")
+
+#define STR_BOOTSTRAP_ERR_CANNOT_START NC_("STR_BOOTSTRAP_ERR_CANNOT_START", "The application cannot be started. ")
+#define STR_BOOTSTRAP_ERR_DIR_MISSING NC_("STR_BOOTSTRAP_ERR_DIR_MISSING", "The configuration directory \"$1\" could not be found.")
+#define STR_BOOTSTRAP_ERR_PATH_INVALID NC_("STR_BOOTSTRAP_ERR_PATH_INVALID", "The installation path is invalid.")
+#define STR_BOOTSTRAP_ERR_INTERNAL NC_("STR_BOOTSTRAP_ERR_INTERNAL", "An internal error occurred.")
+#define STR_BOOTSTRAP_ERR_FILE_CORRUPT NC_("STR_BOOTSTRAP_ERR_FILE_CORRUPT", "The configuration file \"$1\" is corrupt.")
+#define STR_BOOTSTRAP_ERR_FILE_MISSING NC_("STR_BOOTSTRAP_ERR_FILE_MISSING", "The configuration file \"$1\" was not found.")
+#define STR_BOOTSTRAP_ERR_NO_SUPPORT NC_("STR_BOOTSTRAP_ERR_NO_SUPPORT", "The configuration file \"$1\" does not support the current version.")
+#define STR_BOOTSTRAP_ERR_LANGUAGE_MISSING NC_("STR_BOOTSTRAP_ERR_LANGUAGE_MISSING", "The user interface language cannot be determined.")
+#define STR_BOOTSTRAP_ERR_USERINSTALL_FAILED NC_("STR_BOOTSTRAP_ERR_USERINSTALL_FAILED", "User installation could not be completed. ")
+#define STR_BOOTSTRAP_ERR_NO_CFG_SERVICE NC_("STR_BOOTSTRAP_ERR_NO_CFG_SERVICE", "The configuration service is not available.")
+#define STR_ASK_START_SETUP_MANUALLY NC_("STR_ASK_START_SETUP_MANUALLY", "Start the setup application to repair the installation from the CD or the folder containing the installation packages.")
+#define STR_CONFIG_ERR_ACCESS_GENERAL NC_("STR_CONFIG_ERR_ACCESS_GENERAL", "A general error occurred while accessing your central configuration. ")
+#define STR_LO_MUST_BE_RESTARTED NC_("STR_LO_MUST_BE_RESTARTED", "%PRODUCTNAME must unfortunately be manually restarted once after installation or update." )
+#define STR_QUERY_USERDATALOCKED NC_("STR_QUERY_USERDATALOCKED", "Either another instance of %PRODUCTNAME is accessing your personal settings or your personal settings are locked.\nSimultaneous access can lead to inconsistencies in your personal settings. Before continuing, you should make sure user '$u' closes %PRODUCTNAME on host '$h'.\n\nDo you really want to continue?")
+#define STR_TITLE_USERDATALOCKED NC_("STR_TITLE_USERDATALOCKED", "%PRODUCTNAME %PRODUCTVERSION")
+#define STR_ERR_PRINTDISABLED NC_("STR_ERR_PRINTDISABLED", "Printing is disabled. No documents can be printed.")
+#define STR_BOOTSTRAP_ERR_NO_PATHSET_SERVICE NC_("STR_BOOTSTRAP_ERR_NO_PATHSET_SERVICE", "The path manager is not available.\n")
+#define STR_BOOTSTRAP_ERR_NOTENOUGHDISKSPACE NC_("STR_BOOTSTRAP_ERR_NOTENOUGHDISKSPACE", "%PRODUCTNAME user installation could not be completed due to insufficient free disk space. Please free more disc space at the following location and restart %PRODUCTNAME:\n\n")
+#define STR_BOOTSTRAP_ERR_NOACCESSRIGHTS NC_("STR_BOOTSTRAP_ERR_NOACCESSRIGHTS", "%PRODUCTNAME user installation could not be processed due to missing access rights. Please make sure that you have sufficient access rights for the following location and restart %PRODUCTNAME:\n\n")
+
+#define RID_STR_UNOPKG_ACCEPT_LIC_1 NC_("RID_STR_UNOPKG_ACCEPT_LIC_1", "Extension Software License Agreement of $NAME:")
+#define RID_STR_UNOPKG_ACCEPT_LIC_2 NC_("RID_STR_UNOPKG_ACCEPT_LIC_2", "Read the complete License Agreement displayed above. " \
+ "Accept the License Agreement by typing \"yes\" on the console " \
+ "then press the Return key. Type \"no\" to decline and to abort the " \
+ "extension setup.")
+#define RID_STR_UNOPKG_ACCEPT_LIC_3 NC_("RID_STR_UNOPKG_ACCEPT_LIC_3", "[Enter \"yes\" or \"no\"]:")
+#define RID_STR_UNOPKG_ACCEPT_LIC_4 NC_("RID_STR_UNOPKG_ACCEPT_LIC_4", "Your input was not correct. Please enter \"yes\" or \"no\":")
+#define RID_STR_UNOPKG_ACCEPT_LIC_YES NC_("RID_STR_UNOPKG_ACCEPT_LIC_YES", "YES")
+#define RID_STR_UNOPKG_ACCEPT_LIC_Y NC_("RID_STR_UNOPKG_ACCEPT_LIC_Y", "Y")
+#define RID_STR_UNOPKG_ACCEPT_LIC_NO NC_("RID_STR_UNOPKG_ACCEPT_LIC_NO", "NO")
+#define RID_STR_UNOPKG_ACCEPT_LIC_N NC_("RID_STR_UNOPKG_ACCEPT_LIC_N", "N")
+#define RID_STR_CONCURRENTINSTANCE NC_("RID_STR_CONCURRENTINSTANCE", "unopkg cannot be started. The lock file indicates it is already running. " \
+ "If this does not apply, delete the lock file at:")
+#define RID_STR_UNOPKG_ERROR NC_("RID_STR_UNOPKG_ERROR", "ERROR: ")
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/inc/strings.hxx b/desktop/inc/strings.hxx
new file mode 100644
index 000000000..9b086b526
--- /dev/null
+++ b/desktop/inc/strings.hxx
@@ -0,0 +1,16 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#pragma once
+
+#include <rtl/ustring.hxx>
+
+inline constexpr OUStringLiteral RID_APPTITLE = u"%PRODUCTNAME %PRODUCTVERSION%PRODUCTEXTENSION";
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */