comphelper/source/misc/lok.cxx                                      |   19 +++
 cui/uiconfig/ui/toolbarmodedialog.ui                                |    2 
 desktop/qa/desktop_lib/test_desktop_lib.cxx                         |    4 
 desktop/source/lib/init.cxx                                         |   49 
++++++++++
 icon-themes/colibre/sw/res/page-shadow-mask.png                     |binary
 include/LibreOfficeKit/LibreOfficeKit.h                             |    3 
 include/LibreOfficeKit/LibreOfficeKit.hxx                           |   11 ++
 include/comphelper/lok.hxx                                          |    3 
 include/sfx2/lokhelper.hxx                                          |   11 ++
 include/sfx2/viewsh.hxx                                             |   17 +++
 instsetoo_native/inc_common/windows/msi_templates/Binary/Banner.bmp |binary
 instsetoo_native/inc_common/windows/msi_templates/Binary/Image.bmp  |binary
 sc/source/ui/view/viewfun6.cxx                                      |   19 +++
 setup_native/source/packinfo/osxdndinstall.png                      |binary
 sfx2/source/view/lokhelper.cxx                                      |   42 
++++++++
 sfx2/source/view/viewsh.cxx                                         |    4 
 sw/inc/doc.hxx                                                      |    2 
 sw/source/core/doc/doc.cxx                                          |   24 ++++
 sw/source/core/inc/rolbck.hxx                                       |    2 
 sw/source/core/undo/unattr.cxx                                      |   26 
+++++
 sw/source/uibase/utlui/content.cxx                                  |   32 
++++++
 sw/uiconfig/swriter/ui/navigatorcontextmenu.ui                      |   10 +-
 vcl/jsdialog/enabled.cxx                                            |    1 
 23 files changed, 276 insertions(+), 5 deletions(-)

New commits:
commit 28e71a755f6562ab0c720932cadc50c9afa1de41
Author:     Gökay Şatır <[email protected]>
AuthorDate: Fri Jan 20 12:06:47 2023 +0300
Commit:     Andras Timar <[email protected]>
CommitDate: Sat Jan 28 20:14:46 2023 +0100

    Add dropdownfielddialog.ui to JSON dialogues.
    
    Signed-off-by: Gökay Şatır <[email protected]>
    Change-Id: I4cfc792f0b1269936723285cc5ff1324bc22c161
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145871
    Reviewed-by: Szymon Kłos <[email protected]>
    Tested-by: Jenkins CollaboraOffice <[email protected]>

diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx
index 2dff20b7263d..e0791954d5f8 100644
--- a/vcl/jsdialog/enabled.cxx
+++ b/vcl/jsdialog/enabled.cxx
@@ -78,6 +78,7 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool 
bMobile)
         || rUIFile == u"modules/swriter/ui/splittable.ui"
         || rUIFile == u"modules/swriter/ui/translationdialog.ui"
         || rUIFile == u"modules/swriter/ui/pagenumberdlg.ui"
+        || rUIFile == u"modules/swriter/ui/dropdownfielddialog.ui"
         // sfx
         || rUIFile == u"sfx/ui/cmisinfopage.ui"
         || rUIFile == u"sfx/ui/custominfopage.ui"
commit 8cd0f07f30cc3a61e954add02868636f492bf6eb
Author:     Ashod Nakashian <[email protected]>
AuthorDate: Fri Dec 23 13:02:57 2022 -0500
Commit:     Andras Timar <[email protected]>
CommitDate: Sat Jan 28 20:11:55 2023 +0100

    lok: support per-user timezone
    
    This adds support for user-specific timezone.
    
    When none is provided during loading, the
    system default is used.
    
    Signed-off-by: Ashod Nakashian <[email protected]>
    Change-Id: Ie863450687eb82bc475268a09c9112e9fd50020f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144816
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Jan Holesovsky <[email protected]>
    (cherry picked from commit abaf8c0af1c6c7fe01276fdf2ae62419c7b0f654)

diff --git a/comphelper/source/misc/lok.cxx b/comphelper/source/misc/lok.cxx
index b11bf4e83582..1f07cd2614eb 100644
--- a/comphelper/source/misc/lok.cxx
+++ b/comphelper/source/misc/lok.cxx
@@ -8,6 +8,7 @@
  */
 
 #include <comphelper/lok.hxx>
+#include <osl/process.h>
 #include <i18nlangtag/languagetag.hxx>
 #include <sal/log.hxx>
 
@@ -255,6 +256,24 @@ bool isAllowlistedLanguage(const OUString& lang)
 #endif
 }
 
+void setTimezone(bool isSet, const OUString& rTimezone)
+{
+    if (isSet)
+    {
+        // Set the given timezone, even if empty.
+        osl_setEnvironment(OUString("TZ").pData, rTimezone.pData);
+    }
+    else
+    {
+        // Unset and empty aren't the same.
+        // When unset, it means default to the system configured timezone.
+        osl_clearEnvironment(OUString("TZ").pData);
+    }
+
+    // Update the timezone data.
+    ::tzset();
+}
+
 static void (*pStatusIndicatorCallback)(void *data, 
statusIndicatorCallbackType type, int percent, const char* pText)(nullptr);
 static void *pStatusIndicatorCallbackData(nullptr);
 
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx 
b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index c8fe6e733008..3908829f1918 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -3629,10 +3629,12 @@ void DesktopLOKTest::testABI()
     CPPUNIT_ASSERT_EQUAL(documentClassOffset(65), offsetof(struct 
_LibreOfficeKitDocumentClass, getSelectionTypeAndText));
     CPPUNIT_ASSERT_EQUAL(documentClassOffset(66), offsetof(struct 
_LibreOfficeKitDocumentClass, getDataArea));
     CPPUNIT_ASSERT_EQUAL(documentClassOffset(67), offsetof(struct 
_LibreOfficeKitDocumentClass, getEditMode));
+    CPPUNIT_ASSERT_EQUAL(documentClassOffset(68),
+                         offsetof(struct _LibreOfficeKitDocumentClass, 
setViewTimezone));
 
     // Extending is fine, update this, and add new assert for the offsetof the
     // new method
-    CPPUNIT_ASSERT_EQUAL(documentClassOffset(68), sizeof(struct 
_LibreOfficeKitDocumentClass));
+    CPPUNIT_ASSERT_EQUAL(documentClassOffset(69), sizeof(struct 
_LibreOfficeKitDocumentClass));
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(DesktopLOKTest);
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 6b54438f573a..13fe2c779890 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -7,6 +7,7 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#include "sfx2/lokhelper.hxx"
 #include <config_buildconfig.h>
 #include <config_features.h>
 
@@ -1200,6 +1201,8 @@ static bool 
doc_renderSearchResult(LibreOfficeKitDocument* pThis,
 
 static void doc_sendContentControlEvent(LibreOfficeKitDocument* pThis, const 
char* pArguments);
 
+static void doc_setViewTimezone(LibreOfficeKitDocument* pThis, int nId, const 
char* timezone);
+
 } // extern "C"
 
 namespace {
@@ -1350,6 +1353,8 @@ LibLODocument_Impl::LibLODocument_Impl(uno::Reference 
<css::lang::XComponent> xC
 
         m_pDocumentClass->sendContentControlEvent = 
doc_sendContentControlEvent;
 
+        m_pDocumentClass->setViewTimezone = doc_setViewTimezone;
+
         gDocumentClass = m_pDocumentClass;
     }
     pClass = m_pDocumentClass.get();
@@ -2597,6 +2602,27 @@ static LibreOfficeKitDocument* 
lo_documentLoadWithOptions(LibreOfficeKit* pThis,
             SvNumberFormatter::resetTheCurrencyTable();
         }
 
+        // Set the timezone, if not empty.
+        const OUString aTimezone = extractParameter(aOptions, u"Timezone");
+        if (!aTimezone.isEmpty())
+        {
+            SfxLokHelper::setDefaultTimezone(true, aTimezone);
+        }
+        else
+        {
+            // Default to the TZ envar, if set.
+            const char* tz = ::getenv("TZ");
+            if (tz)
+            {
+                SfxLokHelper::setDefaultTimezone(true,
+                                                 OStringToOUString(tz, 
RTL_TEXTENCODING_UTF8));
+            }
+            else
+            {
+                SfxLokHelper::setDefaultTimezone(false, OUString());
+            }
+        }
+
         const OUString aDeviceFormFactor = extractParameter(aOptions, 
u"DeviceFormFactor");
         SfxLokHelper::setDeviceFormFactor(aDeviceFormFactor);
 
@@ -6621,6 +6647,22 @@ static void 
doc_sendContentControlEvent(LibreOfficeKitDocument* pThis, const cha
     pDoc->executeContentControlEvent(aMap);
 }
 
+static void doc_setViewTimezone(SAL_UNUSED_PARAMETER LibreOfficeKitDocument* 
/*pThis*/, int nId,
+                                const char* pTimezone)
+{
+    comphelper::ProfileZone aZone("doc_setViewTimezone");
+
+    SolarMutexGuard aGuard;
+    SetLastExceptionMsg();
+
+    // Leave the default if we get a null timezone.
+    if (pTimezone)
+    {
+        OUString sTimezone = OStringToOUString(pTimezone, 
RTL_TEXTENCODING_UTF8);
+        SfxLokHelper::setViewTimezone(nId, true, sTimezone);
+    }
+}
+
 static char* lo_getError (LibreOfficeKit *pThis)
 {
     comphelper::ProfileZone aZone("lo_getError");
@@ -7121,8 +7163,15 @@ static int lo_initialize(LibreOfficeKit* pThis, const 
char* pAppPath, const char
     comphelper::ProfileZone aZone("lok-init");
 
     if (eStage == PRE_INIT)
+    {
         rtl_alloc_preInit(true);
 
+        // Set the default timezone to the TZ envar, if set.
+        const char* tz = ::getenv("TZ");
+        SfxLokHelper::setDefaultTimezone(!!tz, tz ? OStringToOUString(tz, 
RTL_TEXTENCODING_UTF8)
+                                                  : OUString());
+    }
+
     if (eStage != SECOND_INIT)
         comphelper::LibreOfficeKit::setActive();
 
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h 
b/include/LibreOfficeKit/LibreOfficeKit.h
index 61a68f632209..74c2100ab18c 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -493,6 +493,9 @@ struct _LibreOfficeKitDocumentClass
     /// @see lok::Document::getEditMode().
     int (*getEditMode) (LibreOfficeKitDocument* pThis);
 
+    /// @see lok::Document::setViewTimezone().
+    void (*setViewTimezone) (LibreOfficeKitDocument* pThis, int nId, const 
char* timezone);
+
 #endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY
 };
 
diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx 
b/include/LibreOfficeKit/LibreOfficeKit.hxx
index d70e4eb44d39..2ac398edd497 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -875,6 +875,17 @@ public:
         mpDoc->pClass->sendContentControlEvent(mpDoc, pArguments);
     }
 
+    /**
+     * Set the timezone of the window with the specified nId.
+     *
+     * @param nId a view ID, returned by createView().
+     * @param timezone a timezone in the tzfile(5) format (e.g. 
Pacific/Auckland).
+     */
+    void setViewTimezone(int nId, const char* timezone)
+    {
+        mpDoc->pClass->setViewTimezone(mpDoc, nId, timezone);
+    }
+
 #endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY
 };
 
diff --git a/include/comphelper/lok.hxx b/include/comphelper/lok.hxx
index 66784e8e4892..4cfdb70a09d3 100644
--- a/include/comphelper/lok.hxx
+++ b/include/comphelper/lok.hxx
@@ -102,6 +102,9 @@ COMPHELPER_DLLPUBLIC const LanguageTag& getLanguageTag();
 /// If the language name should be used for this LOK instance.
 COMPHELPER_DLLPUBLIC bool isAllowlistedLanguage(const OUString& lang);
 
+/// Update the current LOK's timezone.
+COMPHELPER_DLLPUBLIC void setTimezone(bool isSet, const OUString& rTimezone);
+
 // Status indicator handling. Even if in theory there could be several status 
indicators active at
 // the same time, in practice there is only one at a time, so we don't handle 
any identification of
 // status indicator in this API.
diff --git a/include/sfx2/lokhelper.hxx b/include/sfx2/lokhelper.hxx
index c3b05b7927e5..90ddd52d01a4 100644
--- a/include/sfx2/lokhelper.hxx
+++ b/include/sfx2/lokhelper.hxx
@@ -91,6 +91,17 @@ public:
     /// Set the device form factor that should be used for a new view.
     static void setDeviceFormFactor(std::u16string_view rDeviceFormFactor);
 
+    /// Set timezone of the given view.
+    /// @isSet true to use @rTimezone, even if it's empty. Otherwise, no 
timezone.
+    /// @rTimezone the value to set (which could be empty).
+    static void setDefaultTimezone(bool isSet, const OUString& rTimezone);
+    /// Get timezone of the given view. See @setDefaultTimezone.
+    static std::pair<bool, OUString> getDefaultTimezone();
+    /// Set the timezone of the given view.
+    static void setViewTimezone(int nId, bool isSet, const OUString& 
rTimezone);
+    /// Get the timezone of the given view.
+    static std::pair<bool, OUString> getViewTimezone(int nId);
+
     /// Iterate over any view shell, except pThisViewShell, passing it to the 
f function.
     template<typename ViewShellType, typename FunctionType>
     static void forEachOtherView(ViewShellType* pThisViewShell, FunctionType 
f);
diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx
index c57a6fab7046..b2d83a499db6 100644
--- a/include/sfx2/viewsh.hxx
+++ b/include/sfx2/viewsh.hxx
@@ -170,6 +170,8 @@ friend class SfxPrinterController;
     LanguageTag                 maLOKLocale;
     LOKDeviceFormFactor         maLOKDeviceFormFactor;
     std::unordered_set<OUString>    mvLOKBlockedCommandList;
+    OUString maLOKTimezone;
+    bool maLOKIsTimezoneSet;
 
     /// Used to set the DocId at construction time. See SetCurrentDocId.
     static ViewShellDocId       mnCurrentDocId;
@@ -402,6 +404,21 @@ public:
     /// Get the LibreOfficeKit language of this view.
     const LanguageTag& GetLOKLanguageTag() const { return maLOKLanguageTag; }
 
+    /// Get the LibreOfficeKit timezone of this view. See @SetLOKTimezone.
+    std::pair<bool, OUString> GetLOKTimezone() const
+    {
+        return { maLOKIsTimezoneSet, maLOKTimezone };
+    }
+
+    /// Set the LibreOfficeKit timezone of this view.
+    /// @isSet true to use @rTimezone, even if it's empty. Otherwise, no 
timezone.
+    /// @rTimezone the value to set (which could be empty).
+    void SetLOKTimezone(bool isSet, const OUString& rTimezone)
+    {
+        maLOKIsTimezoneSet = isSet;
+        maLOKTimezone = rTimezone;
+    }
+
     /// Set the LibreOfficeKit locale of this view.
     void SetLOKLocale(const OUString& rBcp47LanguageTag);
     /// Get the LibreOfficeKit locale of this view.
diff --git a/sc/source/ui/view/viewfun6.cxx b/sc/source/ui/view/viewfun6.cxx
index 160ee6ce5882..6f60041c795e 100644
--- a/sc/source/ui/view/viewfun6.cxx
+++ b/sc/source/ui/view/viewfun6.cxx
@@ -21,6 +21,7 @@
 #include <svx/svdocapt.hxx>
 #include <sfx2/bindings.hxx>
 #include <sfx2/dispatch.hxx>
+#include "sfx2/lokhelper.hxx"
 #include <svl/stritem.hxx>
 #include <svl/numformat.hxx>
 #include <svl/zforlist.hxx>
@@ -47,6 +48,7 @@
 #include <tabvwsh.hxx>
 #include <scmod.hxx>
 #include <postit.hxx>
+#include <comphelper/scopeguard.hxx>
 
 #include <vector>
 
@@ -286,6 +288,23 @@ void ScViewFunc::InsertCurrentTime(SvNumFormatType 
nReqFmt, const OUString& rUnd
     const SvNumFormatType nCurNumFormatType = (pCurNumFormatEntry ?
             pCurNumFormatEntry->GetMaskedType() : SvNumFormatType::UNDEFINED);
 
+    const int nView(comphelper::LibreOfficeKit::isActive() ? 
SfxLokHelper::getView() : -1);
+    if (nView >= 0)
+    {
+        const auto [isTimezoneSet, aTimezone] = 
SfxLokHelper::getViewTimezone(nView);
+        comphelper::LibreOfficeKit::setTimezone(isTimezoneSet, aTimezone);
+    }
+
+    comphelper::ScopeGuard aAutoUserTimezone(
+        [nView]()
+        {
+            if (nView >= 0)
+            {
+                const auto [isTimezoneSet, aTimezone] = 
SfxLokHelper::getDefaultTimezone();
+                comphelper::LibreOfficeKit::setTimezone(isTimezoneSet, 
aTimezone);
+            }
+        });
+
     if (bInputMode)
     {
         double fVal = 0.0;
diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx
index 794dcc00b300..53c2abace8b5 100644
--- a/sfx2/source/view/lokhelper.cxx
+++ b/sfx2/source/view/lokhelper.cxx
@@ -76,6 +76,8 @@ namespace
 LanguageTag g_defaultLanguageTag("en-US", true);
 LanguageTag g_loadLanguageTag("en-US", true); //< The language used to load.
 LOKDeviceFormFactor g_deviceFormFactor = LOKDeviceFormFactor::UNKNOWN;
+bool g_isDefaultTimezoneSet = false;
+OUString g_DefaultTimezone;
 }
 
 int SfxLokHelper::createView(SfxViewFrame* pViewFrame, ViewShellDocId docId)
@@ -339,6 +341,46 @@ void SfxLokHelper::setDeviceFormFactor(std::u16string_view 
rDeviceFormFactor)
         g_deviceFormFactor = LOKDeviceFormFactor::UNKNOWN;
 }
 
+void SfxLokHelper::setDefaultTimezone(bool isSet, const OUString& rTimezone)
+{
+    g_isDefaultTimezoneSet = isSet;
+    g_DefaultTimezone = rTimezone;
+}
+
+std::pair<bool, OUString> SfxLokHelper::getDefaultTimezone()
+{
+    return { g_isDefaultTimezoneSet, g_DefaultTimezone };
+}
+
+void SfxLokHelper::setViewTimezone(int nId, bool isSet, const OUString& 
rTimezone)
+{
+    std::vector<SfxViewShell*>& rViewArr = SfxGetpApp()->GetViewShells_Impl();
+
+    for (SfxViewShell* pViewShell : rViewArr)
+    {
+        if (pViewShell->GetViewShellId() == ViewShellId(nId))
+        {
+            pViewShell->SetLOKTimezone(isSet, rTimezone);
+            return;
+        }
+    }
+}
+
+std::pair<bool, OUString> SfxLokHelper::getViewTimezone(int nId)
+{
+    std::vector<SfxViewShell*>& rViewArr = SfxGetpApp()->GetViewShells_Impl();
+
+    for (SfxViewShell* pViewShell : rViewArr)
+    {
+        if (pViewShell->GetViewShellId() == ViewShellId(nId))
+        {
+            return pViewShell->GetLOKTimezone();
+        }
+    }
+
+    return {};
+}
+
 /*
 * Used for putting a whole JSON string into a string value
 * e.g { key: "{JSON}" }
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 108574d410e2..3657ac318178 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -1082,6 +1082,10 @@ SfxViewShell::SfxViewShell
         maLOKLanguageTag = SfxLokHelper::getDefaultLanguage();
         maLOKLocale = SfxLokHelper::getDefaultLanguage();
 
+        const auto [isTimezoneSet, aTimezone] = 
SfxLokHelper::getDefaultTimezone();
+        maLOKIsTimezoneSet = isTimezoneSet;
+        maLOKTimezone = aTimezone;
+
         maLOKDeviceFormFactor = SfxLokHelper::getDeviceFormFactor();
 
         vcl::Window* pFrameWin = pViewFrame->GetWindow().GetFrameWindow();
commit 0637fa53caef301169f7bd659d8a9232350f5602
Author:     Pedro Pinto Silva <[email protected]>
AuthorDate: Fri Jul 1 15:33:22 2022 +0200
Commit:     Andras Timar <[email protected]>
CommitDate: Sat Jan 28 20:07:41 2023 +0100

    [cp] Rename UI Variant from Standard Toolbar to Compact
    
    To be more in-tune with COnline options
    
    Signed-off-by: Pedro Pinto Silva <[email protected]>
    Change-Id: I38c4d1639dbf7d726fb8c3d784a298cd01a97201
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136743
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Andras Timar <[email protected]>

diff --git a/cui/uiconfig/ui/toolbarmodedialog.ui 
b/cui/uiconfig/ui/toolbarmodedialog.ui
index f3f00446d16f..66e548f2e483 100644
--- a/cui/uiconfig/ui/toolbarmodedialog.ui
+++ b/cui/uiconfig/ui/toolbarmodedialog.ui
@@ -108,7 +108,7 @@
                     <property name="spacing">3</property>
                     <child>
                       <object class="GtkRadioButton" id="rbButton1">
-                        <property name="label" translatable="yes" 
context="ToolbarmodeDialog|radiobutton1">Standard Toolbar</property>
+                        <property name="label" translatable="yes" 
context="ToolbarmodeDialog|radiobutton1">Compact</property>
                         <property name="visible">True</property>
                         <property name="can-focus">True</property>
                         <property name="receives-default">False</property>
commit 0e6acf6e093c6f207b39604eeff8fe1c9a11adc8
Author:     Pedro Pinto Silva <[email protected]>
AuthorDate: Wed Apr 27 12:36:44 2022 +0200
Commit:     Andras Timar <[email protected]>
CommitDate: Sat Jan 28 20:05:34 2023 +0100

    [cp] Update brand colors: win installers
    
    Signed-off-by: Pedro Pinto Silva <[email protected]>
    Change-Id: I4e6d3ba089ef8679c598535971f5417796a6adad
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133501
    Tested-by: Andras Timar <[email protected]>
    Reviewed-by: Andras Timar <[email protected]>

diff --git 
a/instsetoo_native/inc_common/windows/msi_templates/Binary/Banner.bmp 
b/instsetoo_native/inc_common/windows/msi_templates/Binary/Banner.bmp
index 5f8be18fd7a0..19e748e2e547 100644
Binary files 
a/instsetoo_native/inc_common/windows/msi_templates/Binary/Banner.bmp and 
b/instsetoo_native/inc_common/windows/msi_templates/Binary/Banner.bmp differ
diff --git a/instsetoo_native/inc_common/windows/msi_templates/Binary/Image.bmp 
b/instsetoo_native/inc_common/windows/msi_templates/Binary/Image.bmp
index 0fc8f7fb6c72..23a79c2a822d 100644
Binary files 
a/instsetoo_native/inc_common/windows/msi_templates/Binary/Image.bmp and 
b/instsetoo_native/inc_common/windows/msi_templates/Binary/Image.bmp differ
commit 15cc035ab9d118a875c1af0c4a0fdd685f400270
Author:     Pedro Pinto Silva <[email protected]>
AuthorDate: Wed Apr 27 11:22:32 2022 +0200
Commit:     Andras Timar <[email protected]>
CommitDate: Sat Jan 28 20:05:13 2023 +0100

    [cp] Update brand colors: mac installer
    
    Signed-off-by: Pedro Pinto Silva <[email protected]>
    Change-Id: Iaa5620207577ccc45418cc0137af12d4848e268d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133498
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Andras Timar <[email protected]>

diff --git a/setup_native/source/packinfo/osxdndinstall.png 
b/setup_native/source/packinfo/osxdndinstall.png
index eb90a85c6028..4998aa8ce9b2 100644
Binary files a/setup_native/source/packinfo/osxdndinstall.png and 
b/setup_native/source/packinfo/osxdndinstall.png differ
commit 66f66207b38fa7dd289ef8317e003a60a67e733a
Author:     Pedro Pinto Silva <[email protected]>
AuthorDate: Thu Mar 10 10:47:00 2022 +0100
Commit:     Andras Timar <[email protected]>
CommitDate: Sat Jan 28 20:04:28 2023 +0100

    [cp] Decrease page outline prominence
    
    Make the page border less prominent so user can focus more in the
    page's content and less in the page's surroundings
    
    Signed-off-by: Pedro Pinto Silva <[email protected]>
    Change-Id: I54fd21bd9515c9c826ea369fb934dfe9343cf5dc
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131308
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Szymon Kłos <[email protected]>

diff --git a/icon-themes/colibre/sw/res/page-shadow-mask.png 
b/icon-themes/colibre/sw/res/page-shadow-mask.png
index 107f37d84982..6b0e64697786 100644
Binary files a/icon-themes/colibre/sw/res/page-shadow-mask.png and 
b/icon-themes/colibre/sw/res/page-shadow-mask.png differ
commit 6da80acdadb314bab54f9aab5cd071545284fee8
Author:     Pedro Pinto Silva <[email protected]>
AuthorDate: Fri Oct 15 18:06:26 2021 +0200
Commit:     Andras Timar <[email protected]>
CommitDate: Sat Jan 28 20:03:50 2023 +0100

    [cp] Restore light document border for writer part2
    
    - Make shadow not so harsh
    - Add border radius
    
    fixes https://github.com/CollaboraOnline/online/issues/3403
    
    Signed-off-by: Pedro Pinto Silva <[email protected]>
    Change-Id: I5a46915ca4db7b484d5e816985e834b2777a9786
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123672
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Szymon Kłos <[email protected]>

diff --git a/icon-themes/colibre/sw/res/page-shadow-mask.png 
b/icon-themes/colibre/sw/res/page-shadow-mask.png
index 77b430c997a9..107f37d84982 100644
Binary files a/icon-themes/colibre/sw/res/page-shadow-mask.png and 
b/icon-themes/colibre/sw/res/page-shadow-mask.png differ
commit a6baeb9cf0a59c8c6be78f8edb37a752d2b8c0ea
Author:     Jim Raykowski <[email protected]>
AuthorDate: Sat Dec 17 00:21:28 2022 -0900
Commit:     Andras Timar <[email protected]>
CommitDate: Sat Jan 28 19:57:36 2023 +0100

    tdf#140666 Make delete reference possible from the Navigator
    
    This patch makes it possible to delete a reference without having to do
    the steps given in the help.
    
    "References are fields. To remove a reference, delete the field. If you
    set a longer text as a reference and you do not want to re-enter it
    after deleting the reference, select the text and copy it to the
    clipboard. You can then reinsert it as "unformatted text" at the same
    position using the command Edit - Paste special. The text remains
    intact while the reference is deleted."
    
    Change-Id: If363340288de25aacbc28acd5858ce275f309af6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144406
    Tested-by: Jenkins
    Reviewed-by: Jim Raykowski <[email protected]>

diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 4a399b839896..dd2973fb7447 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -1313,6 +1313,8 @@ public:
      If array pointer is 0 return only whether a RefMark is set in document. */
     sal_uInt16 GetRefMarks( std::vector<OUString>* = nullptr ) const;
 
+    void DeleteFormatRefMark(const SwFormatRefMark* pFormatRefMark);
+
     // Insert label. If a FlyFormat is created, return it.
     SwFlyFrameFormat* InsertLabel( const SwLabelType eType, const OUString 
&rText, const OUString& rSeparator,
                     const OUString& rNumberingSeparator,
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index 0c00640cc10c..07f54882fbdd 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -68,6 +68,8 @@
 #include <pam.hxx>
 #include <ndtxt.hxx>
 #include <swundo.hxx>
+#include <rolbck.hxx>
+#include <UndoAttribute.hxx>
 #include <UndoCore.hxx>
 #include <UndoTable.hxx>
 #include <pagedesc.hxx>
@@ -1115,6 +1117,28 @@ sal_uInt16 SwDoc::GetRefMarks( std::vector<OUString>* 
pNames ) const
     return nCount;
 }
 
+void SwDoc::DeleteFormatRefMark(const SwFormatRefMark* pFormatRefMark)
+{
+    const SwTextRefMark* pTextRefMark = pFormatRefMark->GetTextRefMark();
+    SwTextNode& rTextNd = const_cast<SwTextNode&>(pTextRefMark->GetTextNode());
+    std::unique_ptr<SwRegHistory> aRegHistory;
+    if (GetIDocumentUndoRedo().DoesUndo())
+    {
+        SwUndoResetAttr* pUndo = new SwUndoResetAttr(SwPosition(rTextNd, 
pTextRefMark->GetStart()),
+                                                     RES_TXTATR_REFMARK);
+        GetIDocumentUndoRedo().AppendUndo(std::unique_ptr<SwUndo>(pUndo));
+        aRegHistory.reset(new SwRegHistory(rTextNd, &pUndo->GetHistory()));
+        rTextNd.GetpSwpHints()->Register(aRegHistory.get());
+    }
+    rTextNd.DeleteAttribute(const_cast<SwTextRefMark*>(pTextRefMark));
+    if (GetIDocumentUndoRedo().DoesUndo())
+    {
+        if (rTextNd.GetpSwpHints())
+            rTextNd.GetpSwpHints()->DeRegister();
+    }
+    getIDocumentState().SetModified();
+}
+
 static bool lcl_SpellAndGrammarAgain( SwNode* pNd, void* pArgs )
 {
     SwTextNode *pTextNode = pNd->GetTextNode();
diff --git a/sw/source/core/inc/rolbck.hxx b/sw/source/core/inc/rolbck.hxx
index 1497da7e7b89..3d3b224d03a5 100644
--- a/sw/source/core/inc/rolbck.hxx
+++ b/sw/source/core/inc/rolbck.hxx
@@ -159,7 +159,7 @@ class SwHistorySetRefMark final : public SwHistoryHint
 public:
     SwHistorySetRefMark( const SwTextRefMark* pTextHt, SwNodeOffset nNode );
     virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet ) override;
-
+    const OUString& GetRefName() {return m_RefName;}
 };
 
 class SwHistorySetTOXMark final : public SwHistoryHint
diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx
index 2d238fea3dca..60df048d22b3 100644
--- a/sw/source/core/undo/unattr.cxx
+++ b/sw/source/core/undo/unattr.cxx
@@ -55,6 +55,7 @@
 #include <charfmt.hxx>
 #include <calbck.hxx>
 #include <frameformats.hxx>
+#include <editsh.hxx>
 
 SwUndoFormatAttrHelper::SwUndoFormatAttrHelper(SwFormat& rFormat, bool 
bSvDrwPt)
     : SwClient(&rFormat)
@@ -571,6 +572,10 @@ void SwUndoResetAttr::UndoImpl(::sw::UndoRedoContext & 
rContext)
         if( pTNd )
             pTNd->DontExpandFormat( m_nSttContent, false );
     }
+    else if (m_nFormatId == RES_TXTATR_REFMARK)
+    {
+        rDoc.GetEditShell()->SwViewShell::UpdateFields();
+    }
 
     AddUndoRedoPaM(rContext);
 }
@@ -621,6 +626,27 @@ void SwUndoResetAttr::RedoImpl(::sw::UndoRedoContext & 
rContext)
         }
     }
     break;
+    case RES_TXTATR_REFMARK:
+    {
+        SfxItemPool::Item2Range aRange = 
rDoc.GetAttrPool().GetItemSurrogates(RES_TXTATR_REFMARK);
+        SwHistoryHint* pHistoryHint = GetHistory()[0];
+        if (pHistoryHint && HSTRY_SETREFMARKHNT == pHistoryHint->Which())
+        {
+            for (const SfxPoolItem* pItem : aRange)
+            {
+                assert(dynamic_cast<const SwFormatRefMark*>(pItem));
+                const auto pFormatRefMark = static_cast<const 
SwFormatRefMark*>(pItem);
+                if 
(static_cast<SwHistorySetRefMark*>(pHistoryHint)->GetRefName() ==
+                        pFormatRefMark->GetRefName())
+                {
+                    rDoc.DeleteFormatRefMark(pFormatRefMark);
+                    rDoc.GetEditShell()->SwViewShell::UpdateFields();
+                    break;
+                }
+            }
+        }
+    }
+    break;
     }
 }
 
diff --git a/sw/source/uibase/utlui/content.cxx 
b/sw/source/uibase/utlui/content.cxx
index d3fda99dfc05..d0d05db0a346 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -380,7 +380,7 @@ SwContentType::SwContentType(SwWrtShell* pShell, 
ContentTypeId nType, sal_uInt8
         break;
         case ContentTypeId::REFERENCE:
             m_bEdit = false;
-            m_bDelete = false;
+            m_bDelete = true;
         break;
         case ContentTypeId::URLFIELD:
             m_bEdit = true;
@@ -1906,6 +1906,7 @@ IMPL_LINK(SwContentTree, CommandHdl, const CommandEvent&, 
rCEvt, bool)
          bRemoveDeleteOLEObjectEntry = true,
          bRemoveDeleteBookmarkEntry = true,
          bRemoveDeleteHyperlinkEntry = true,
+         bRemoveDeleteReferenceEntry = true,
          bRemoveDeleteIndexEntry= true,
          bRemoveDeleteCommentEntry = true,
          bRemoveDeleteDrawingObjectEntry = true,
@@ -2063,6 +2064,9 @@ IMPL_LINK(SwContentTree, CommandHdl, const CommandEvent&, 
rCEvt, bool)
                     case ContentTypeId::URLFIELD:
                         bRemoveDeleteHyperlinkEntry = false;
                     break;
+                    case ContentTypeId::REFERENCE:
+                        bRemoveDeleteReferenceEntry = false;
+                    break;
                     case ContentTypeId::INDEX:
                         bRemoveDeleteIndexEntry = false;
                     break;
@@ -2204,6 +2208,8 @@ IMPL_LINK(SwContentTree, CommandHdl, const CommandEvent&, 
rCEvt, bool)
         xPop->remove("deletebookmark");
     if (bRemoveDeleteHyperlinkEntry)
         xPop->remove("deletehyperlink");
+    if (bRemoveDeleteReferenceEntry)
+        xPop->remove("deletereference");
     if (bRemoveDeleteIndexEntry)
         xPop->remove("deleteindex");
     if (bRemoveDeleteCommentEntry)
@@ -2221,6 +2227,7 @@ IMPL_LINK(SwContentTree, CommandHdl, const CommandEvent&, 
rCEvt, bool)
             bRemoveDeleteOLEObjectEntry &&
             bRemoveDeleteBookmarkEntry &&
             bRemoveDeleteHyperlinkEntry &&
+            bRemoveDeleteReferenceEntry &&
             bRemoveDeleteIndexEntry &&
             bRemoveDeleteCommentEntry &&
             bRemoveDeleteDrawingObjectEntry &&
@@ -4866,6 +4873,7 @@ void SwContentTree::ExecuteContextMenuAction(const 
OString& rSelectedPopupEntry)
              rSelectedPopupEntry == "deleteoleobject" ||
              rSelectedPopupEntry == "deletebookmark" ||
              rSelectedPopupEntry == "deletehyperlink" ||
+             rSelectedPopupEntry == "deletereference" ||
              rSelectedPopupEntry == "deleteindex" ||
              rSelectedPopupEntry == "deletecomment" ||
              rSelectedPopupEntry == "deletedrawingobject" ||
@@ -5396,6 +5404,28 @@ void SwContentTree::EditEntry(const weld::TreeIter& 
rEntry, EditEntryMode nMode)
                 nSlot = SID_EDIT_HYPERLINK;
         break;
         case ContentTypeId::REFERENCE:
+        {
+            if(nMode == EditEntryMode::DELETE)
+            {
+                const OUString& rName = pCnt->GetName();
+                for (SfxPoolItem* pItem :
+                     
m_pActiveShell->GetDoc()->GetAttrPool().GetItemSurrogates(RES_TXTATR_REFMARK))
+                {
+                    assert(dynamic_cast<const SwFormatRefMark*>(pItem));
+                    const auto pFormatRefMark = static_cast<const 
SwFormatRefMark*>(pItem);
+                    if (!pFormatRefMark)
+                        continue;
+                    const SwTextRefMark* pTextRef = 
pFormatRefMark->GetTextRefMark();
+                    if (pTextRef && &pTextRef->GetTextNode().GetNodes() ==
+                            &m_pActiveShell->GetNodes() && rName == 
pFormatRefMark->GetRefName())
+                    {
+                        
m_pActiveShell->GetDoc()->DeleteFormatRefMark(pFormatRefMark);
+                        m_pActiveShell->SwViewShell::UpdateFields();
+                        break;
+                    }
+                }
+            }
+        }
         break;
         case ContentTypeId::TEXTFIELD:
         {
diff --git a/sw/uiconfig/swriter/ui/navigatorcontextmenu.ui 
b/sw/uiconfig/swriter/ui/navigatorcontextmenu.ui
index 09e844553f24..519104ba5fdb 100644
--- a/sw/uiconfig/swriter/ui/navigatorcontextmenu.ui
+++ b/sw/uiconfig/swriter/ui/navigatorcontextmenu.ui
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.38.2 -->
+<!-- Generated with glade 3.40.0 -->
 <interface domain="sw">
   <requires lib="gtk+" version="3.20"/>
   <object class="GtkMenu" id="navmenu">
@@ -192,6 +192,14 @@
         <accelerator key="Delete" signal="activate"/>
       </object>
     </child>
+    <child>
+      <object class="GtkMenuItem" id="deletereference">
+        <property name="visible">True</property>
+        <property name="can-focus">False</property>
+        <property name="label" translatable="yes" 
context="navigatorcontextmenu|STR_DELETE_REFERENCE">Delete Reference</property>
+        <accelerator key="Delete" signal="activate"/>
+      </object>
+    </child>
     <child>
       <object class="GtkMenuItem" id="deleteindex">
         <property name="visible">True</property>

Reply via email to