configure.ac                                        |    2 -
 dev/null                                            |binary
 download.lst                                        |    8 ++---
 external/more_fonts/ExternalPackage_reem.mk         |    1 
 framework/source/uielement/subtoolbarcontroller.cxx |   28 +++++++++++---------
 oox/source/drawingml/fillproperties.cxx             |    5 ++-
 postprocess/signing/signing.pl                      |    3 +-
 sfx2/source/dialog/recfloat.cxx                     |   15 ++++++++--
 sfx2/source/inc/recfloat.hxx                        |    4 ++
 sw/qa/extras/ooxmlexport/ooxmlexport6.cxx           |   10 -------
 sw/source/core/txtnode/txtatr2.cxx                  |   15 ++--------
 vcl/qa/cppunit/pdfexport/data/tdf66597-1.odt        |binary
 vcl/qa/cppunit/pdfexport/pdfexport.cxx              |   18 ++++++------
 13 files changed, 56 insertions(+), 53 deletions(-)

New commits:
commit 71210659bdfbde77507836eb39ed53c68d102d41
Author:     Andras Timar <[email protected]>
AuthorDate: Thu Aug 4 19:21:26 2022 +0200
Commit:     Andras Timar <[email protected]>
CommitDate: Thu Aug 4 19:21:26 2022 +0200

    Bump version to 22.05.5.2
    
    Change-Id: I7cab891b04c9e11fc8d8a1635b9a62baf55d9160

diff --git a/configure.ac b/configure.ac
index 4e6a80ace4f6..274ebd124902 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
 # several non-alphanumeric characters, those are split off and used only for 
the
 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no 
idea.
 
-AC_INIT([Collabora Office],[22.05.5.1],[],[],[https://collaboraoffice.com/])
+AC_INIT([Collabora Office],[22.05.5.2],[],[],[https://collaboraoffice.com/])
 
 dnl libnumbertext needs autoconf 2.68, but that can pick up autoconf268 just 
fine if it is installed
 dnl whereas aclocal (as run by autogen.sh) insists on using autoconf and fails 
hard
commit 8d43e3bd3ee403600a1edf1c9624eb75ce3f3021
Author:     Caolán McNamara <[email protected]>
AuthorDate: Thu Aug 4 11:45:47 2022 +0100
Commit:     Andras Timar <[email protected]>
CommitDate: Thu Aug 4 19:20:35 2022 +0200

    tdf#150249 close of popover not detected
    
    the popover listened to here isn't the one that ends up getting actually
    used, its contents are transferred to another one, so the
    OnPopoverClosed wasn't called, its sufficient to just use the
    SubToolbarControl dtor to detect what is wanted here
    
    Change-Id: I3f4a038acfc183b863457919bf89d600517ddc01
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137732
    Reviewed-by: Michael Stahl <[email protected]>
    Tested-by: Jenkins

diff --git a/framework/source/uielement/subtoolbarcontroller.cxx 
b/framework/source/uielement/subtoolbarcontroller.cxx
index e02e4631bd6b..8731f311b7b0 100644
--- a/framework/source/uielement/subtoolbarcontroller.cxx
+++ b/framework/source/uielement/subtoolbarcontroller.cxx
@@ -46,7 +46,6 @@ namespace {
 
 class SubToolBarController : public ToolBarBase
 {
-    DECL_LINK(OnPopoverClose, weld::Popover&, void);
     OUString m_aSubTbName;
     OUString m_aLastCommand;
     css::uno::Reference< css::ui::XUIElement > m_xUIElement;
@@ -56,6 +55,8 @@ public:
                                    const css::uno::Sequence< css::uno::Any >& 
rxArgs );
     virtual ~SubToolBarController() override;
 
+    void PopoverDestroyed();
+
     // XInitialization
     virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any 
>& rxArgs ) override;
 
@@ -209,22 +210,24 @@ namespace {
 class SubToolbarControl final : public WeldToolbarPopup
 {
 public:
-    explicit SubToolbarControl(css::uno::Reference< css::frame::XFrame > 
xFrame,
-                               weld::Widget* pParent);
+    explicit SubToolbarControl(SubToolBarController& rController, 
weld::Widget* pParent);
+    virtual ~SubToolbarControl() override;
 
     virtual void GrabFocus() override;
 
     weld::Container* GetContainer() { return m_xTargetContainer.get(); }
 
 private:
+    SubToolBarController& m_rController;
     std::unique_ptr<weld::Container> m_xTargetContainer;
 };
 }
 
-SubToolbarControl::SubToolbarControl(css::uno::Reference< css::frame::XFrame > 
xFrame,
+SubToolbarControl::SubToolbarControl(SubToolBarController& rController,
                                      weld::Widget* pParent)
-: WeldToolbarPopup(xFrame, pParent, "svt/ui/subtoolbar.ui", "subtoolbar")
-, m_xTargetContainer(m_xBuilder->weld_container("container"))
+    : WeldToolbarPopup(rController.getFrameInterface(), pParent, 
"svt/ui/subtoolbar.ui", "subtoolbar")
+    , m_rController(rController)
+    , m_xTargetContainer(m_xBuilder->weld_container("container"))
 {
 }
 
@@ -233,11 +236,16 @@ void SubToolbarControl::GrabFocus()
     // TODO
 }
 
+SubToolbarControl::~SubToolbarControl()
+{
+    m_rController.PopoverDestroyed();
+}
+
 std::unique_ptr<WeldToolbarPopup> SubToolBarController::weldPopupWindow()
 {
     SolarMutexGuard aGuard;
 
-    auto pPopup = std::make_unique<SubToolbarControl>(getFrameInterface(), 
m_pToolbar);
+    auto pPopup = std::make_unique<SubToolbarControl>(*this, m_pToolbar);
 
     css::uno::Reference< css::frame::XFrame > xFrame ( getFrameInterface() );
 
@@ -268,10 +276,6 @@ std::unique_ptr<WeldToolbarPopup> 
SubToolBarController::weldPopupWindow()
     catch ( css::lang::IllegalArgumentException& )
     {}
 
-    weld::Popover* pPopover = 
dynamic_cast<weld::Popover*>(pPopup->getTopLevel());
-    if (pPopover)
-        pPopover->connect_closed(LINK(this, SubToolBarController, 
OnPopoverClose));
-
     return pPopup;
 }
 
@@ -501,7 +505,7 @@ void SubToolBarController::initialize( const 
css::uno::Sequence< css::uno::Any >
     updateImage();
 }
 
-IMPL_LINK_NOARG(SubToolBarController, OnPopoverClose, weld::Popover&, void)
+void SubToolBarController::PopoverDestroyed()
 {
     disposeUIElement();
     m_xUIElement = nullptr;
commit e7c016e42b6c33774b28c3b10d0cc424137db9f7
Author:     Caolán McNamara <[email protected]>
AuthorDate: Thu Jul 28 15:49:32 2022 +0100
Commit:     Andras Timar <[email protected]>
CommitDate: Thu Aug 4 19:20:35 2022 +0200

    Resolves: tdf#147782 restore focus to launching frame asynchronously
    
    Change-Id: I7ebde70e4e1aae861f6ac7d70a91741596cb2cc5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137526
    Reviewed-by: Michael Stahl <[email protected]>
    Tested-by: Jenkins

diff --git a/sfx2/source/dialog/recfloat.cxx b/sfx2/source/dialog/recfloat.cxx
index 6a6fc17dbd9a..1dcbb2f7c416 100644
--- a/sfx2/source/dialog/recfloat.cxx
+++ b/sfx2/source/dialog/recfloat.cxx
@@ -102,6 +102,7 @@ SfxRecordingFloat_Impl::SfxRecordingFloat_Impl(SfxBindings* 
pBind, SfxChildWindo
                                   "FloatingRecord")
     , m_xToolbar(m_xBuilder->weld_toolbar("toolbar"))
     , m_xDispatcher(new ToolbarUnoDispatcher(*m_xToolbar, *m_xBuilder, 
pBind->GetActiveFrame()))
+    , mnPostUserEventId(nullptr)
     , m_bFirstActivate(true)
 {
     // start recording
@@ -110,6 +111,14 @@ 
SfxRecordingFloat_Impl::SfxRecordingFloat_Impl(SfxBindings* pBind, SfxChildWindo
             SfxCallMode::SYNCHRON, { &aItem });
 }
 
+IMPL_LINK_NOARG(SfxRecordingFloat_Impl, PresentParentFrame, void*, void)
+{
+    mnPostUserEventId = nullptr;
+    css::uno::Reference<css::awt::XTopWindow> 
xTopWindow(m_xDispatcher->GetFrame()->getContainerWindow(), 
css::uno::UNO_QUERY);
+    if (xTopWindow.is())
+        xTopWindow->toFront();
+}
+
 void SfxRecordingFloat_Impl::Activate()
 {
     SfxModelessDialogController::Activate();
@@ -117,13 +126,13 @@ void SfxRecordingFloat_Impl::Activate()
         return;
     // tdf#147782 retain focus in launching frame on the first activate on 
automatically gaining focus on getting launched
     m_bFirstActivate = false;
-    css::uno::Reference<css::awt::XTopWindow> 
xTopWindow(m_xDispatcher->GetFrame()->getContainerWindow(), 
css::uno::UNO_QUERY);
-    if (xTopWindow.is())
-        xTopWindow->toFront();
+    mnPostUserEventId = Application::PostUserEvent(LINK(this, 
SfxRecordingFloat_Impl, PresentParentFrame));
 }
 
 SfxRecordingFloat_Impl::~SfxRecordingFloat_Impl()
 {
+    if (mnPostUserEventId)
+        Application::RemoveUserEvent(mnPostUserEventId);
     m_xDispatcher->dispose();
 }
 
diff --git a/sfx2/source/inc/recfloat.hxx b/sfx2/source/inc/recfloat.hxx
index b7a4882cd72e..e5720e155cd6 100644
--- a/sfx2/source/inc/recfloat.hxx
+++ b/sfx2/source/inc/recfloat.hxx
@@ -42,7 +42,11 @@ class SfxRecordingFloat_Impl final : public 
SfxModelessDialogController
 {
     std::unique_ptr<weld::Toolbar> m_xToolbar;
     std::unique_ptr<ToolbarUnoDispatcher> m_xDispatcher;
+    ImplSVEvent *mnPostUserEventId;
     bool m_bFirstActivate;
+
+    DECL_LINK(PresentParentFrame, void*, void);
+
 public:
     SfxRecordingFloat_Impl(SfxBindings* pBindings,
                            SfxChildWindow* pChildWin,
commit 94209549d3aba6f8e73c1f3e73b1ef453be6e488
Author:     Christian Lohmaier <[email protected]>
AuthorDate: Wed Aug 3 10:02:46 2022 +0200
Commit:     Andras Timar <[email protected]>
CommitDate: Thu Aug 4 19:20:35 2022 +0200

    windows signing: use sha256 (instead of the default sha1)
    
    will be enforced in e.g. microsoft store later this year...
    
    Change-Id: Ifa7f98d5c72bd7c7f602dc54ba8e16f7470dc3d4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137738
    Tested-by: Jenkins
    Reviewed-by: Christian Lohmaier <[email protected]>
    (cherry picked from commit ae434ccb4878ed49f19be578e4935f50196b6b78)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137721
    Reviewed-by: Thorsten Behrens <[email protected]>

diff --git a/postprocess/signing/signing.pl b/postprocess/signing/signing.pl
index a443984a2a7b..13e6e940c385 100644
--- a/postprocess/signing/signing.pl
+++ b/postprocess/signing/signing.pl
@@ -148,9 +148,10 @@ sub sign_files      #09.07.2007 10:36
     }
     $signtool .= " -v" if ($opt_verbose);
     $commandline_base = $signtool;
+    $commandline_base .= " -fd sha256 -td sha256";
     $commandline_base .= " -f $opt_pfxfile" if ($opt_pfxfile ne "");
     $commandline_base .= " -p $opt_pass" if ($opt_pass ne "");
-    $commandline_base .= " -t $opt_timestamp_url" if ($opt_timestamp_url ne 
"");
+    $commandline_base .= " -tr $opt_timestamp_url" if ($opt_timestamp_url ne 
"");
     $commandline_base .= " -d \"$opt_desc\"" if ($opt_desc ne "");
 
     # Here switch between:
commit 9f9b82331ff2d79f71f2cd7bd91417d2697f06c1
Author:     Khaled Hosny <[email protected]>
AuthorDate: Sun Jul 31 23:50:18 2022 +0200
Commit:     Andras Timar <[email protected]>
CommitDate: Thu Aug 4 19:20:35 2022 +0200

    more_fonts: Update Reem Kufi
    
    Also update test expectation due to changed glyph order.
    
    Change-Id: I8f6d1a057077cb6de5e5d7fce4bec29929edb8b9
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137663
    Tested-by: Jenkins
    Reviewed-by: Heiko Tietze <[email protected]>
    (cherry picked from commit f1540e05327873a73c0bbb232689d2be5c0072b7)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137610
    Reviewed-by: خالد حسني <[email protected]>
    Reviewed-by: Adolfo Jayme Barrientos <[email protected]>
    (cherry picked from commit 15da0f9b805e090e61b2eb82913130d7a77d16c6)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137714

diff --git a/download.lst b/download.lst
index 807ca5f0eb9a..4ec74570bd2c 100644
--- a/download.lst
+++ b/download.lst
@@ -110,8 +110,8 @@ export FONT_AMIRI_SHA256SUM := 
9c4e768893e0023a0ad6f488d5c84bd5add6565d3dcadb838
 export FONT_AMIRI_TARBALL := Amiri-0.117.zip
 export FONT_KACST_SHA256SUM := 
dca00f5e655f2f217a766faa73a81f542c5c204aa3a47017c3c2be0b31d00a56
 export FONT_KACST_TARBALL := ttf-kacst_2.01+mry.tar.gz
-export FONT_REEM_SHA256SUM := 
f60c6508d209ce4236d2d7324256c2ffddd480be7e3d6023770b93dc391a605f
-export FONT_REEM_TARBALL := ReemKufi-0.7.zip
+export FONT_REEM_SHA256SUM := 
c4fd68a23c0ea471cc084ae7efe888da372b925cb208eeb0322c26792d2ef413
+export FONT_REEM_TARBALL := ReemKufi-1.2.zip
 export FONT_SCHEHERAZADE_SHA256SUM := 
251c8817ceb87d9b661ce1d5b49e732a0116add10abc046be4b8ba5196e149b5
 export FONT_SCHEHERAZADE_TARBALL := Scheherazade-2.100.zip
 export FONT_OPENDYSLEXIC_SHA256SUM := 
b92d7fcb9409f2bcfd23b65ac71647256eb49c429f4fbb1cc870381fc93eb486
diff --git a/external/more_fonts/ExternalPackage_reem.mk 
b/external/more_fonts/ExternalPackage_reem.mk
index 9a40652b55cc..bc26cecc7dfe 100644
--- a/external/more_fonts/ExternalPackage_reem.mk
+++ b/external/more_fonts/ExternalPackage_reem.mk
@@ -11,6 +11,7 @@ $(eval $(call 
gb_ExternalPackage_ExternalPackage,fonts_reem,font_reem))
 
 $(eval $(call 
gb_ExternalPackage_add_unpacked_files,fonts_reem,$(LIBO_SHARE_FOLDER)/fonts/truetype,\
        ttf/ReemKufi-Regular.ttf \
+       ttf/ReemKufi-Bold.ttf \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index 7a89d4200574..353377681cd3 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -1329,8 +1329,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf66597_2)
                           "<05> <0647>\n"
                           "<06> <062F>\n"
                           "<08> <062C>\n"
-                          "<09> <0628>\n"
-                          "<0B> <0623>\n"
+                          "<0A> <0628>\n"
+                          "<0C> <0623>\n"
                           "endbfchar");
         std::string aData(static_cast<const char*>(aObjectStream.GetData()),
                           aObjectStream.GetSize());
commit 2ab9b6da2a3ec042c35cdafaf7a6919e7cd70827
Author:     Khaled Hosny <[email protected]>
AuthorDate: Sun Jul 31 23:42:41 2022 +0200
Commit:     Andras Timar <[email protected]>
CommitDate: Thu Aug 4 19:20:34 2022 +0200

    more_fonts: Update Amiri
    
    Update PDF export test that depends on a mapping the font no longer has,
    and use different characters that meet the test criteria.
    
    Change-Id: I0f89297a52ffcef3513e0a788ec3bab645cc354b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137661
    Tested-by: Jenkins
    Reviewed-by: Heiko Tietze <[email protected]>
    (cherry picked from commit 660c14d12592fdc1bd566398d272e0e8b1affe89)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137611
    Reviewed-by: خالد حسني <[email protected]>
    Reviewed-by: Adolfo Jayme Barrientos <[email protected]>
    (cherry picked from commit ab355fde048052ace3a37e9b499ef321e0835546)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137715

diff --git a/download.lst b/download.lst
index 8968baafb9c3..807ca5f0eb9a 100644
--- a/download.lst
+++ b/download.lst
@@ -106,8 +106,8 @@ export FONT_LIBRE_HEBREW_SHA256SUM := 
f596257c1db706ce35795b18d7f66a4db99d427725
 export FONT_LIBRE_HEBREW_TARBALL := libre-hebrew-1.0.tar.gz
 export FONT_ALEF_SHA256SUM := 
b98b67602a2c8880a1770f0b9e37c190f29a7e2ade5616784f0b89fbdb75bf52
 export FONT_ALEF_TARBALL := alef-1.001.tar.gz
-export FONT_AMIRI_SHA256SUM := 
1fbfccced6348b5db2c1c21d5b319cd488e14d055702fa817a0f6cb83d882166
-export FONT_AMIRI_TARBALL := Amiri-0.111.zip
+export FONT_AMIRI_SHA256SUM := 
9c4e768893e0023a0ad6f488d5c84bd5add6565d3dcadb838ba5b20e75fcc9a7
+export FONT_AMIRI_TARBALL := Amiri-0.117.zip
 export FONT_KACST_SHA256SUM := 
dca00f5e655f2f217a766faa73a81f542c5c204aa3a47017c3c2be0b31d00a56
 export FONT_KACST_TARBALL := ttf-kacst_2.01+mry.tar.gz
 export FONT_REEM_SHA256SUM := 
f60c6508d209ce4236d2d7324256c2ffddd480be7e3d6023770b93dc391a605f
diff --git a/vcl/qa/cppunit/pdfexport/data/tdf66597-1.odt 
b/vcl/qa/cppunit/pdfexport/data/tdf66597-1.odt
index 7fecc55c6386..e5cc9bc0b3cc 100644
Binary files a/vcl/qa/cppunit/pdfexport/data/tdf66597-1.odt and 
b/vcl/qa/cppunit/pdfexport/data/tdf66597-1.odt differ
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index 89f23d338acf..7a89d4200574 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -1225,13 +1225,13 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf66597_1)
         aZCodec.Decompress(pStream->GetMemory(), aObjectStream);
         CPPUNIT_ASSERT(aZCodec.EndCompression());
         aObjectStream.Seek(0);
-        // The <01> is glyph id, <0020> is code point.
-        // The document has three characters <space><nbspace><space>, but the 
font
-        // reuses the same glyph for space and nbspace so we should have a 
single
-        // CMAP entry for the space, and nbspace will be handled with 
ActualText
-        // (tested above).
+        // The <01> is glyph id, <2044> is code point.
+        // The document has two characters <2044><2215><2044>, but the font
+        // reuses the same glyph for U+2044 and U+2215 so we should have a 
single
+        // CMAP entry for the U+2044, and U+2215 will be handled with 
ActualText
+        // (tested below).
         std::string aCmap("1 beginbfchar\n"
-                          "<01> <0020>\n"
+                          "<01> <2044>\n"
                           "endbfchar");
         std::string aData(static_cast<const char*>(aObjectStream.GetData()),
                           aObjectStream.GetSize());
@@ -1272,7 +1272,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf66597_1)
         CPPUNIT_ASSERT_EQUAL_MESSAGE("The should be one ActualText entry!", 
static_cast<size_t>(1),
                                      nCount);
 
-        aActualText = "/Span<</ActualText<FEFF00A0>>>";
+        aActualText = "/Span<</ActualText<FEFF2215>>>";
         nPos = aData.find(aActualText);
         CPPUNIT_ASSERT_MESSAGE("ActualText not found!", nPos != 
std::string::npos);
     }
commit bbf9b48f5231d75e8c84bd113773682aa14379fb
Author:     Justin Luth <[email protected]>
AuthorDate: Thu Jul 28 16:45:41 2022 -0400
Commit:     Andras Timar <[email protected]>
CommitDate: Thu Aug 4 19:20:34 2022 +0200

    Revert "tdf#141652 partial revert "Reset ShapeProperty priority..."
    
    This reverts 7.4 commit 18cc1240565e697859dd7d17058f91d5e01df929.
    
    Someone backported it to 7.3 as well.
    
    Reverting fixes regression report tdf#150061.
    
    
    Change-Id: Ie04595e11dd9d2e15fa940b8ada71714bd434f6a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137581
    Tested-by: Jenkins
    Reviewed-by: Justin Luth <[email protected]>
    (cherry picked from commit 84b719e41c3a5f1e3dba112508721d69c1b3185e)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137530
    Reviewed-by: Xisco Fauli <[email protected]>
    (cherry picked from commit aaf6070682dd99bed9e172a6f27a9801237b9c3e)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137532
    Reviewed-by: Michael Stahl <[email protected]>

diff --git a/oox/source/drawingml/fillproperties.cxx 
b/oox/source/drawingml/fillproperties.cxx
index a678524035b9..0ef86bc75f5c 100644
--- a/oox/source/drawingml/fillproperties.cxx
+++ b/oox/source/drawingml/fillproperties.cxx
@@ -805,7 +805,10 @@ void FillProperties::pushToPropMap( ShapePropertyMap& 
rPropMap,
                             if(bIsCustomShape && bHasCropValues && bNeedCrop)
                             {
                                 xGraphic = lclCropGraphic(xGraphic, 
CropQuotientsFromFillRect(aFillRect));
-                                
rPropMap.setProperty(ShapeProperty::FillBitmap, xGraphic);
+                                if 
(rPropMap.supportsProperty(ShapeProperty::FillBitmapName))
+                                    
rPropMap.setProperty(ShapeProperty::FillBitmapName, xGraphic);
+                                else
+                                    
rPropMap.setProperty(ShapeProperty::FillBitmap, xGraphic);
                             }
                         }
                     }
diff --git a/sw/qa/extras/ooxmlexport/data/tdf141652_fillBitmapName.docx 
b/sw/qa/extras/ooxmlexport/data/tdf141652_fillBitmapName.docx
deleted file mode 100644
index 4a47a544d6bb..000000000000
Binary files a/sw/qa/extras/ooxmlexport/data/tdf141652_fillBitmapName.docx and 
/dev/null differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
index 4429aa58a70d..61372e9e803e 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
@@ -282,16 +282,6 @@ DECLARE_OOXMLEXPORT_TEST(testDMLShapeFillBitmapCrop, 
"dml-shape-fillbitmapcrop.d
 
 }
 
-DECLARE_OOXMLEXPORT_TEST(test141652_fillBitmapName, 
"tdf141652_fillBitmapName.docx")
-{
-    text::GraphicCrop aGraphicCropStruct = 
getProperty<text::GraphicCrop>(getShape(1), "GraphicCrop");
-    CPPUNIT_ASSERT_DOUBLES_EQUAL( sal_Int32(-769), aGraphicCropStruct.Right, 
10);
-
-    CPPUNIT_ASSERT_EQUAL( sal_Int32( 0 ), aGraphicCropStruct.Left );
-    CPPUNIT_ASSERT_EQUAL( sal_Int32( 0 ), aGraphicCropStruct.Top );
-    CPPUNIT_ASSERT_EQUAL( sal_Int32( 0 ), aGraphicCropStruct.Bottom );
-}
-
 DECLARE_OOXMLEXPORT_TEST(testDMLShapeFillPattern, "dml-shape-fillpattern.docx")
 {
     // Hatching was ignored by the export.
commit 65c9075fcbf0f661cd2b7777c6f78f34b904a45f
Author:     Jim Raykowski <[email protected]>
AuthorDate: Mon Jun 13 08:31:33 2022 -0800
Commit:     Andras Timar <[email protected]>
CommitDate: Thu Aug 4 19:20:34 2022 +0200

    tdf#149467 fix re-entrance crash
    
    This crash is caused by an odd re-entrance happening. In this case
    re-entrance to SwContentTree::UpdateTracking happens when
    SfxHintId::DocChanged is broadcast from SwDocShell::SetModified when
    GetContentAtPos is called from SwContentTree::UpdateTracking which
    eventually causes a stack crash.
    
    Getting model position for view point when getting content at
    position (GetContentAtPos call to GetModelPositionForViewPoint)
    shouldn't set the document modification state. Which is what happens
    using the steps to repro this crash.
    
    This patch disallows setting document modification state during the
    DocumentStylePoolManager::GetFormatFromPool call from
    SwTextINetFormat::GetCharFormat.
    
    backtrace of last 100 levels before crash:
    
    1   SwTextFrame::GetModelPositionForViewPoint_          frmcrsr.cxx
    551  0x7fffbddbde96
    2   SwTextFrame::GetModelPositionForViewPoint           frmcrsr.cxx
    665  0x7fffbddbe891
    3   SwLayoutFrame::GetModelPositionForViewPoint         trvlfrm.cxx
    168  0x7fffbdcf6c08
    4   SwLayoutFrame::GetModelPositionForViewPoint         trvlfrm.cxx
    168  0x7fffbdcf6c08
    5   SwPageFrame::GetModelPositionForViewPoint           trvlfrm.cxx
    211  0x7fffbdcf6f2f
    6   SwRootFrame::GetModelPositionForViewPoint           trvlfrm.cxx
    452  0x7fffbdcf7fa0
    7   SwCursorShell::GetContentAtPos                      crstrvl.cxx
    1370 0x7fffbd581050
    8   SwContentTree::UpdateTracking                       content.cxx
    3700 0x7fffbe9864a0
    9   SwContentTree::TimerUpdate                          content.cxx
    3589 0x7fffbe985474
    10  SwContentTree::Notify                               content.cxx
    3047 0x7fffbe9811ad
    11  SfxBroadcaster::Broadcast
    SfxBroadcaster.cxx           40   0x7ffff4180f32
    12  SwDocShell::SetModified                             docsh2.cxx
    1446 0x7fffbe53b663
    13  SwDocShell::Ole2ModifiedHdl                         docsh.cxx
    1150 0x7fffbe52d660
    14  SwDocShell::LinkStubOle2ModifiedHdl                 docsh.cxx
    1131 0x7fffbe52d597
    15  Link<bool, void>::Call                              link.hxx
    111  0x7fffbd8889f5
    16  sw::DocumentStateManager::SetModified
    DocumentStateManager.cxx     50   0x7fffbd888729
    17  SwDoc::MakeCharFormat                               docfmt.cxx
    861  0x7fffbd6ef2b8
    18  SwDoc::MakeCharFormat_                              docfmt.cxx
    883  0x7fffbd6ef43a
    19  sw::DocumentStylePoolManager::GetFormatFromPool
    DocumentStylePoolManager.cxx 1514 0x7fffbd89132c
    20  sw::DocumentStylePoolManager::GetCharFormatFromPool
    DocumentStylePoolManager.cxx 1718 0x7fffbd892d86
    21  SwTextINetFormat::GetCharFormat                     txtatr2.cxx
    144  0x7fffbdfa1a03
    22  SwTextINetFormat::GetCharFormat                     txtinet.hxx
    52   0x7fffbddb4f4e
    23  CharFormat::GetItemSet                              atrstck.cxx
    145  0x7fffbddb07e5
    24  SwAttrHandler::PushAndChg                           atrstck.cxx
    345  0x7fffbddb1047
    25  SwAttrIter::Chg                                     itratr.cxx
    102  0x7fffbddf02db
    26  SwAttrIter::SeekFwd                                 itratr.cxx
    296  0x7fffbddf1104
    27  SwAttrIter::Seek                                    itratr.cxx
    419  0x7fffbddf17b3
    28  SwAttrIter::SeekAndChgAttrIter                      itratr.cxx
    158  0x7fffbddf06e2
    29  SwTextIter::SeekAndChg                              itrtxt.hxx
    313  0x7fffbde01791
    30  SwTextCursor::GetModelPositionForViewPoint          itrcrsr.cxx
    1658 0x7fffbddff83f
    31  SwTextFrame::GetModelPositionForViewPoint_          frmcrsr.cxx
    604  0x7fffbddbe337
    32  SwTextFrame::GetModelPositionForViewPoint           frmcrsr.cxx
    665  0x7fffbddbe891
    33  SwLayoutFrame::GetModelPositionForViewPoint         trvlfrm.cxx
    168  0x7fffbdcf6c08
    34  SwLayoutFrame::GetModelPositionForViewPoint         trvlfrm.cxx
    168  0x7fffbdcf6c08
    35  SwPageFrame::GetModelPositionForViewPoint           trvlfrm.cxx
    211  0x7fffbdcf6f2f
    36  SwRootFrame::GetModelPositionForViewPoint           trvlfrm.cxx
    452  0x7fffbdcf7fa0
    37  SwCursorShell::GetContentAtPos                      crstrvl.cxx
    1370 0x7fffbd581050
    38  SwContentTree::UpdateTracking                       content.cxx
    3700 0x7fffbe9864a0
    39  SwContentTree::TimerUpdate                          content.cxx
    3589 0x7fffbe985474
    40  SwContentTree::Notify                               content.cxx
    3047 0x7fffbe9811ad
    41  SfxBroadcaster::Broadcast
    SfxBroadcaster.cxx           40   0x7ffff4180f32
    42  SwDocShell::SetModified                             docsh2.cxx
    1446 0x7fffbe53b663
    43  SwDocShell::Ole2ModifiedHdl                         docsh.cxx
    1150 0x7fffbe52d660
    44  SwDocShell::LinkStubOle2ModifiedHdl                 docsh.cxx
    1131 0x7fffbe52d597
    45  Link<bool, void>::Call                              link.hxx
    111  0x7fffbd8889f5
    46  sw::DocumentStateManager::SetModified
    DocumentStateManager.cxx     50   0x7fffbd888729
    47  SwDoc::MakeCharFormat                               docfmt.cxx
    861  0x7fffbd6ef2b8
    48  SwDoc::MakeCharFormat_                              docfmt.cxx
    883  0x7fffbd6ef43a
    49  sw::DocumentStylePoolManager::GetFormatFromPool
    DocumentStylePoolManager.cxx 1514 0x7fffbd89132c
    50  sw::DocumentStylePoolManager::GetCharFormatFromPool
    DocumentStylePoolManager.cxx 1718 0x7fffbd892d86
    51  SwTextINetFormat::GetCharFormat                     txtatr2.cxx
    144  0x7fffbdfa1a03
    52  SwTextINetFormat::GetCharFormat                     txtinet.hxx
    52   0x7fffbddb4f4e
    53  CharFormat::GetItemSet                              atrstck.cxx
    145  0x7fffbddb07e5
    54  SwAttrHandler::PushAndChg                           atrstck.cxx
    345  0x7fffbddb1047
    55  SwAttrIter::Chg                                     itratr.cxx
    102  0x7fffbddf02db
    56  SwAttrIter::SeekFwd                                 itratr.cxx
    296  0x7fffbddf1104
    57  SwAttrIter::Seek                                    itratr.cxx
    419  0x7fffbddf17b3
    58  SwAttrIter::SeekAndChgAttrIter                      itratr.cxx
    158  0x7fffbddf06e2
    59  SwTextIter::SeekAndChg                              itrtxt.hxx
    313  0x7fffbde01791
    60  SwTextCursor::GetModelPositionForViewPoint          itrcrsr.cxx
    1658 0x7fffbddff83f
    61  SwTextFrame::GetModelPositionForViewPoint_          frmcrsr.cxx
    604  0x7fffbddbe337
    62  SwTextFrame::GetModelPositionForViewPoint           frmcrsr.cxx
    665  0x7fffbddbe891
    63  SwLayoutFrame::GetModelPositionForViewPoint         trvlfrm.cxx
    168  0x7fffbdcf6c08
    64  SwLayoutFrame::GetModelPositionForViewPoint         trvlfrm.cxx
    168  0x7fffbdcf6c08
    65  SwPageFrame::GetModelPositionForViewPoint           trvlfrm.cxx
    211  0x7fffbdcf6f2f
    66  SwRootFrame::GetModelPositionForViewPoint           trvlfrm.cxx
    452  0x7fffbdcf7fa0
    67  SwCursorShell::GetContentAtPos                      crstrvl.cxx
    1370 0x7fffbd581050
    68  SwContentTree::UpdateTracking                       content.cxx
    3700 0x7fffbe9864a0
    69  SwContentTree::TimerUpdate                          content.cxx
    3589 0x7fffbe985474
    70  SwContentTree::Notify                               content.cxx
    3047 0x7fffbe9811ad
    71  SfxBroadcaster::Broadcast
    SfxBroadcaster.cxx           40   0x7ffff4180f32
    72  SwDocShell::SetModified                             docsh2.cxx
    1446 0x7fffbe53b663
    73  SwDocShell::Ole2ModifiedHdl                         docsh.cxx
    1150 0x7fffbe52d660
    74  SwDocShell::LinkStubOle2ModifiedHdl                 docsh.cxx
    1131 0x7fffbe52d597
    75  Link<bool, void>::Call                              link.hxx
    111  0x7fffbd8889f5
    76  sw::DocumentStateManager::SetModified
    DocumentStateManager.cxx     50   0x7fffbd888729
    77  SwDoc::MakeCharFormat                               docfmt.cxx
    861  0x7fffbd6ef2b8
    78  SwDoc::MakeCharFormat_                              docfmt.cxx
    883  0x7fffbd6ef43a
    79  sw::DocumentStylePoolManager::GetFormatFromPool
    DocumentStylePoolManager.cxx 1514 0x7fffbd89132c
    80  sw::DocumentStylePoolManager::GetCharFormatFromPool
    DocumentStylePoolManager.cxx 1718 0x7fffbd892d86
    81  SwTextINetFormat::GetCharFormat                     txtatr2.cxx
    144  0x7fffbdfa1a03
    82  SwTextINetFormat::GetCharFormat                     txtinet.hxx
    52   0x7fffbddb4f4e
    83  CharFormat::GetItemSet                              atrstck.cxx
    145  0x7fffbddb07e5
    84  SwAttrHandler::PushAndChg                           atrstck.cxx
    345  0x7fffbddb1047
    85  SwAttrIter::Chg                                     itratr.cxx
    102  0x7fffbddf02db
    86  SwAttrIter::SeekFwd                                 itratr.cxx
    296  0x7fffbddf1104
    87  SwAttrIter::Seek                                    itratr.cxx
    419  0x7fffbddf17b3
    88  SwAttrIter::SeekAndChgAttrIter                      itratr.cxx
    158  0x7fffbddf06e2
    89  SwTextIter::SeekAndChg                              itrtxt.hxx
    313  0x7fffbde01791
    90  SwTextCursor::GetModelPositionForViewPoint          itrcrsr.cxx
    1658 0x7fffbddff83f
    91  SwTextFrame::GetModelPositionForViewPoint_          frmcrsr.cxx
    604  0x7fffbddbe337
    92  SwTextFrame::GetModelPositionForViewPoint           frmcrsr.cxx
    665  0x7fffbddbe891
    93  SwLayoutFrame::GetModelPositionForViewPoint         trvlfrm.cxx
    168  0x7fffbdcf6c08
    94  SwLayoutFrame::GetModelPositionForViewPoint         trvlfrm.cxx
    168  0x7fffbdcf6c08
    95  SwPageFrame::GetModelPositionForViewPoint           trvlfrm.cxx
    211  0x7fffbdcf6f2f
    96  SwRootFrame::GetModelPositionForViewPoint           trvlfrm.cxx
    452  0x7fffbdcf7fa0
    97  SwCursorShell::GetContentAtPos                      crstrvl.cxx
    1370 0x7fffbd581050
    98  SwContentTree::UpdateTracking                       content.cxx
    3700 0x7fffbe9864a0
    99  SwContentTree::TimerUpdate                          content.cxx
    3589 0x7fffbe985474
    100 SwContentTree::Notify                               content.cxx
    3047 0x7fffbe9811ad
    
    Change-Id: I7e0814cf3a42dc876dd60c926d4b2245a036cc3c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135802
    Tested-by: Jenkins
    Reviewed-by: Jim Raykowski <[email protected]>
    (cherry picked from commit 45312369331688bde9d1b8c97ad883a69e5982d7)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137605
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/sw/source/core/txtnode/txtatr2.cxx 
b/sw/source/core/txtnode/txtatr2.cxx
index 96c905bb4d76..2b51b45ffbec 100644
--- a/sw/source/core/txtnode/txtatr2.cxx
+++ b/sw/source/core/txtnode/txtatr2.cxx
@@ -131,23 +131,14 @@ SwCharFormat* SwTextINetFormat::GetCharFormat()
 
         // JP 10.02.2000, Bug 72806: don't modify the doc for getting the
         //      correct charstyle.
-        bool bResetMod = !rDoc.getIDocumentState().IsModified();
-        Link<bool,void> aOle2Lnk;
-        if ( bResetMod )
-        {
-            aOle2Lnk = rDoc.GetOle2Link();
-            rDoc.SetOle2Link( Link<bool,void>() );
-        }
+        bool bModifiedEnabled = rDoc.getIDocumentState().IsEnableSetModified();
+        rDoc.getIDocumentState().SetEnableSetModified(false);
 
         pRet = IsPoolUserFormat( nId )
                ? rDoc.FindCharFormatByName( rStr )
                : rDoc.getIDocumentStylePoolAccess().GetCharFormatFromPool( nId 
);
 
-        if ( bResetMod )
-        {
-            rDoc.getIDocumentState().ResetModified();
-            rDoc.SetOle2Link( aOle2Lnk );
-        }
+        rDoc.getIDocumentState().SetEnableSetModified(bModifiedEnabled);
     }
 
     if ( pRet )

Reply via email to