bin/find-can-be-private-symbols.functions.results         |    1 
 chart2/source/model/main/ChartModel.cxx                   |   21 
 chart2/source/model/main/Diagram.cxx                      |    4 
 chart2/source/view/charttypes/CandleStickChart.cxx        |    4 
 connectivity/source/manager/mdrivermanager.cxx            |    4 
 dbaccess/source/ui/misc/UITools.cxx                       |   45 
 dbaccess/source/ui/misc/WCopyTable.cxx                    |    1 
 dbaccess/source/ui/tabledesign/TableController.cxx        |    4 
 desktop/source/deployment/registry/package/dp_package.cxx |   17 
 distro-configs/LibreOfficeFlatpak.conf                    |    2 
 extras/source/templates/presnt/Beehive/styles.xml         |    4 
 extras/source/templates/presnt/Blue_Curve/styles.xml      |    4 
 extras/source/templates/presnt/Blueprint_Plans/styles.xml |    4 
 extras/source/templates/presnt/DNA/styles.xml             |    4 
 extras/source/templates/presnt/Focus/styles.xml           |    4 
 extras/source/templates/presnt/Forestbird/styles.xml      |    4 
 extras/source/templates/presnt/Grey_Elegant/styles.xml    |    4 
 extras/source/templates/presnt/Growing_Liberty/styles.xml |    4 
 extras/source/templates/presnt/Inspiration/styles.xml     |    4 
 extras/source/templates/presnt/Lights/styles.xml          |    4 
 extras/source/templates/presnt/Midnightblue/styles.xml    |    4 
 extras/source/templates/presnt/Pencil/styles.xml          |    4 
 extras/source/templates/presnt/Piano/styles.xml           |    4 
 extras/source/templates/presnt/Portfolio/styles.xml       |    4 
 extras/source/templates/presnt/Progress/styles.xml        |    4 
 extras/source/templates/presnt/Sunset/styles.xml          |    4 
 extras/source/templates/presnt/Vivid/styles.xml           |    4 
 extras/source/templates/presnt/Yellow_Idea/styles.xml     |    4 
 formula/inc/core_resource.hrc                             |   30 
 formula/source/core/api/FormulaCompiler.cxx               |    3 
 framework/source/services/frame.cxx                       |   18 
 i18npool/source/localedata/data/bg_BG.xml                 |   18 
 include/formula/compiler.hxx                              |    9 
 include/formula/opcode.hxx                                |   10 
 include/oox/helper/refvector.hxx                          |    6 
 include/svl/numformat.hxx                                 |    4 
 include/vcl/idletask.hxx                                  |    6 
 include/vcl/task.hxx                                      |    5 
 oox/source/core/filterbase.cxx                            |    2 
 oox/source/ole/vbaproject.cxx                             |    4 
 sc/README.md                                              |    5 
 sc/inc/document.hxx                                       |    2 
 sc/inc/globstr.hrc                                        |    2 
 sc/inc/helpids.h                                          |    5 
 sc/inc/queryiter.hxx                                      |   71 
 sc/inc/scfuncs.hrc                                        |   70 
 sc/inc/scmatrix.hxx                                       |    2 
 sc/inc/sortparam.hxx                                      |  176 
 sc/inc/table.hxx                                          |    1 
 sc/qa/extras/scfunctionlistobj.cxx                        |    2 
 sc/qa/unit/data/functions/spreadsheet/fods/filter.fods    | 5061 ++++++++++++
 sc/qa/unit/data/functions/spreadsheet/fods/sort.fods      | 5816 ++++++++++++++
 sc/qa/unit/data/functions/spreadsheet/fods/sortby.fods    | 5743 +++++++++++++
 sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods   | 5216 ++++++++++++
 sc/qa/unit/data/functions/spreadsheet/fods/xmatch.fods    | 3753 +++++++++
 sc/qa/unit/data/ods/tdf160369_groupshape.ods              |binary
 sc/qa/unit/scshapetest.cxx                                |   68 
 sc/qa/unit/ucalc.cxx                                      |    5 
 sc/qa/unit/ucalc_formula.cxx                              |    2 
 sc/qa/unit/ucalc_sort.cxx                                 |    4 
 sc/source/core/data/clipcontext.cxx                       |    2 
 sc/source/core/data/column.cxx                            |    8 
 sc/source/core/data/column2.cxx                           |   10 
 sc/source/core/data/column3.cxx                           |    4 
 sc/source/core/data/dbdocutl.cxx                          |    2 
 sc/source/core/data/documen2.cxx                          |   10 
 sc/source/core/data/documen8.cxx                          |    4 
 sc/source/core/data/documen9.cxx                          |    9 
 sc/source/core/data/drwlayer.cxx                          |    4 
 sc/source/core/data/formulacell.cxx                       |    2 
 sc/source/core/data/funcdesc.cxx                          |    7 
 sc/source/core/data/patattr.cxx                           |    4 
 sc/source/core/data/queryiter.cxx                         |  237 
 sc/source/core/data/sortparam.cxx                         |    9 
 sc/source/core/data/stlpool.cxx                           |    2 
 sc/source/core/data/table1.cxx                            |   16 
 sc/source/core/data/table2.cxx                            |    2 
 sc/source/core/data/table3.cxx                            |  189 
 sc/source/core/data/validat.cxx                           |    2 
 sc/source/core/inc/interpre.hxx                           |   88 
 sc/source/core/tool/compiler.cxx                          |   35 
 sc/source/core/tool/interpr1.cxx                          | 1867 +++-
 sc/source/core/tool/interpr3.cxx                          |  432 +
 sc/source/core/tool/interpr4.cxx                          |    6 
 sc/source/core/tool/parclass.cxx                          |    5 
 sc/source/core/tool/scmatrix.cxx                          |   35 
 sc/source/core/tool/token.cxx                             |    5 
 sc/source/filter/excel/xlformula.cxx                      |   17 
 sc/source/filter/oox/formulabase.cxx                      |   19 
 sc/source/filter/xml/xmlexprt.cxx                         |   41 
 sc/source/ui/docshell/docsh5.cxx                          |   12 
 sc/source/ui/inc/docsh.hxx                                |    2 
 sc/source/ui/view/output2.cxx                             |   14 
 sc/source/ui/view/viewfun2.cxx                            |   56 
 sd/source/ui/dlg/navigatr.cxx                             |    4 
 solenv/flatpak-manifest.in                                |   16 
 svgio/CppunitTest_svgio.mk                                |    1 
 svgio/CppunitTest_svgio_tools.mk                          |    1 
 svgio/Library_svgio.mk                                    |    2 
 svgio/inc/svgdocument.hxx                                 |    6 
 svgio/inc/svgnode.hxx                                     |    7 
 svgio/inc/svgswitchnode.hxx                               |   55 
 svgio/inc/svgtoken.hxx                                    |    1 
 svgio/qa/cppunit/SvgImportTest.cxx                        |   23 
 svgio/qa/cppunit/data/tdf160386.svg                       |   16 
 svgio/source/svgreader/svgdocumenthandler.cxx             |    9 
 svgio/source/svgreader/svgnode.cxx                        |   44 
 svgio/source/svgreader/svgswitchnode.cxx                  |  129 
 svgio/source/svgreader/svgtoken.cxx                       |    1 
 svl/source/numbers/zforlist.cxx                           |    6 
 svx/source/form/fmpage.cxx                                |   31 
 sw/inc/IDocumentSettingAccess.hxx                         |    1 
 sw/qa/core/layout/data/bad-split-section.odt              |binary
 sw/qa/core/layout/layact.cxx                              |   22 
 sw/qa/core/text/data/A011-charheight.rtf                  |   27 
 sw/qa/core/text/itrform2.cxx                              |   18 
 sw/qa/extras/layout/data/tdf160526.fodt                   |   47 
 sw/qa/extras/layout/data/tdf160549.fodt                   |   60 
 sw/qa/extras/layout/layout3.cxx                           |   21 
 sw/qa/extras/uiwriter/data/pagebreak-source.fodt          |  131 
 sw/qa/extras/uiwriter/data/pagebreak-target.fodt          |  137 
 sw/qa/extras/uiwriter/uiwriter.cxx                        |  121 
 sw/qa/extras/uiwriter/uiwriter2.cxx                       |    6 
 sw/qa/extras/uiwriter/uiwriter3.cxx                       |    3 
 sw/source/core/doc/DocumentContentOperationsManager.cxx   |   73 
 sw/source/core/doc/DocumentSettingManager.cxx             |   11 
 sw/source/core/docnode/nodes.cxx                          |    2 
 sw/source/core/edit/edglss.cxx                            |    8 
 sw/source/core/fields/expfld.cxx                          |    2 
 sw/source/core/frmedt/fecopy.cxx                          |   15 
 sw/source/core/inc/DocumentSettingManager.hxx             |    1 
 sw/source/core/inc/sectfrm.hxx                            |    2 
 sw/source/core/layout/layact.cxx                          |    4 
 sw/source/core/layout/pagechg.cxx                         |    6 
 sw/source/core/layout/tabfrm.cxx                          |    3 
 sw/source/core/text/frmform.cxx                           |  101 
 sw/source/core/text/itrform2.cxx                          |   13 
 sw/source/core/undo/untblk.cxx                            |    6 
 sw/source/core/unocore/unotext.cxx                        |    6 
 sw/source/filter/ww8/ww8par.cxx                           |    1 
 sw/source/filter/xml/xmlimp.cxx                           |   10 
 sw/source/ui/fldui/fldref.cxx                             |    2 
 sw/source/uibase/uno/SwXDocumentSettings.cxx              |   18 
 ucb/source/core/ucbstore.cxx                              |    2 
 vcl/inc/font/LogicalFontInstance.hxx                      |    3 
 vcl/inc/impfontcache.hxx                                  |    8 
 vcl/inc/impglyphitem.hxx                                  |    6 
 vcl/inc/jsdialog/jsdialogbuilder.hxx                      |    6 
 vcl/qa/cppunit/logicalfontinstance.cxx                    |   68 
 vcl/quartz/cgutils.mm                                     |   10 
 vcl/skia/osx/gdiimpl.cxx                                  |   21 
 vcl/source/font/LogicalFontInstance.cxx                   |   53 
 vcl/source/font/fontcache.cxx                             |    4 
 vcl/source/gdi/CommonSalLayout.cxx                        |    6 
 vcl/source/gdi/pdfwriter_impl.cxx                         |    4 
 vcl/source/gdi/sallayout.cxx                              |   44 
 vcl/source/helper/idletask.cxx                            |    4 
 vcl/source/outdev/font.cxx                                |    4 
 vcl/workben/listglyphs.cxx                                |    2 
 writerfilter/source/dmapper/DomainMapperTableHandler.cxx  |    5 
 writerfilter/source/dmapper/DomainMapper_Impl.cxx         |   22 
 writerfilter/source/filter/WriterFilter.cxx               |    1 
 writerfilter/source/ooxml/OOXMLDocumentImpl.cxx           |    8 
 xmlhelp/source/cxxhelp/provider/databases.cxx             |    3 
 164 files changed, 30030 insertions(+), 935 deletions(-)

New commits:
commit 2bae6eaf65d7ffb17f8a14e80268eb0eaf313669
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Mon Apr 8 06:36:37 2024 +0200
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Mon Apr 15 12:37:30 2024 +0200

    tdf#160067 sw floattable: fix missing move bwd of paras in split section 
frame
    
    The last (5th) paragraph in the index was on page 2, even if page 1
    still had space for it.
    
    This is a regression from commit
    397d72e582c725d162c7e0b819dc6c0bb62e42b0 (Related: tdf#158986 sw
    floattable: fix unexpected page break with sections, 2024-02-23), in
    case SwLayAction::FormatLayout() doesn't calc its lower content frames
    then this bugdoc is good, but the old bugdoc moves its floating table to
    the next page, which would be bad.
    
    Fix the problem by making the condition for this "calc lower in
    FormatLayout()" action more strict: only do this for content frames
    which are in sections, followed by sections.
    
    Note that probably a cleaner way would be to completely stop calculating
    content frames in SwLayAction::FormatLayout() and only do that in
    FormatContent(), but then it's not clear how to re-fix tdf#158986, and
    at least this resolves the regression.
    
    Change-Id: Id671b3b68d8af8ad1cca3399a9aa028de58df3a0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165878
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>
    Tested-by: Jenkins
    (cherry picked from commit 607fcac441c7f3a7d3c169c19039e581d707f2bb)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165841
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

diff --git a/sw/qa/core/layout/data/bad-split-section.odt 
b/sw/qa/core/layout/data/bad-split-section.odt
new file mode 100644
index 000000000000..6dbd07802dfd
Binary files /dev/null and b/sw/qa/core/layout/data/bad-split-section.odt differ
diff --git a/sw/qa/core/layout/layact.cxx b/sw/qa/core/layout/layact.cxx
index 8923d6b0e89a..9de0c9ebfa43 100644
--- a/sw/qa/core/layout/layact.cxx
+++ b/sw/qa/core/layout/layact.cxx
@@ -21,6 +21,7 @@
 #include <sortedobjs.hxx>
 #include <tabfrm.hxx>
 #include <wrtsh.hxx>
+#include <sectfrm.hxx>
 
 namespace
 {
@@ -108,6 +109,27 @@ CPPUNIT_TEST_FIXTURE(Test, testSplitFlyInSection)
     CPPUNIT_ASSERT(pPage2);
     CPPUNIT_ASSERT(!pPage2->GetSortedObjs());
 }
+
+CPPUNIT_TEST_FIXTURE(Test, testBadSplitSection)
+{
+    // Given a document with a section, containing 5 paragraphs:
+    createSwDoc("bad-split-section.odt");
+
+    // When laying out that document:
+    SwDoc* pDoc = getSwDoc();
+    SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+
+    // Then make sure the entire section is on page 1:
+    auto pPage = pLayout->Lower()->DynCastPageFrame();
+    CPPUNIT_ASSERT(pPage);
+    auto pBody = pPage->FindBodyCont();
+    CPPUNIT_ASSERT(pBody);
+    auto pSection = dynamic_cast<SwSectionFrame*>(pBody->GetLastLower());
+    CPPUNIT_ASSERT(pSection);
+    // Without the fix in place, it would have failed, the section was split 
between page 1 and page
+    // 2.
+    CPPUNIT_ASSERT(!pSection->GetFollow());
+}
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/sectfrm.hxx b/sw/source/core/inc/sectfrm.hxx
index 69158b335863..3debf367f05a 100644
--- a/sw/source/core/inc/sectfrm.hxx
+++ b/sw/source/core/inc/sectfrm.hxx
@@ -46,7 +46,7 @@ namespace o3tl {
     template<> struct typed_flags<SwSectionFrameInvFlags> : 
is_typed_flags<SwSectionFrameInvFlags, 0x0011> {};
 }
 
-class SwSectionFrame final: public SwLayoutFrame, public SwFlowFrame
+class SW_DLLPUBLIC SwSectionFrame final: public SwLayoutFrame, public 
SwFlowFrame
     , public SvtListener // TODO?
 {
     SwSection* m_pSection;
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index 1a0a1260a135..ad437f98527f 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -1439,9 +1439,9 @@ bool SwLayAction::FormatLayout( OutputDevice 
*pRenderContext, SwLayoutFrame *pLa
                 PopFormatLayout();
             }
         }
-        else if (pLay->IsSctFrame() && pLow->IsTextFrame() && pLow == 
pLay->GetLastLower())
+        else if (pLay->IsSctFrame() && pLay->GetNext() && 
pLay->GetNext()->IsSctFrame() && pLow->IsTextFrame() && pLow == 
pLay->GetLastLower())
         {
-            // else: only calc the last text lower of sections
+            // else: only calc the last text lower of sections, followed by 
sections
             pLow->OptCalc();
         }
 
commit 7cfabd3419fd360778ede2f7dd40e94adda07a2e
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Sun Jan 28 20:17:57 2024 +0000
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Mon Apr 15 12:37:30 2024 +0200

    reserve a TaskPriority for testtool IdleTask
    
    Change-Id: I1fbd77cdeb643123afbb8bbdbd1ca38949e1b547
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162671
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    (cherry picked from commit 0f9847270c8dc606f70e59ec4a4b512283014078)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162626
    Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>

diff --git a/include/vcl/idletask.hxx b/include/vcl/idletask.hxx
index fd5b17c61bec..1b8e33b7b181 100644
--- a/include/vcl/idletask.hxx
+++ b/include/vcl/idletask.hxx
@@ -20,9 +20,9 @@ public:
     bool GetFlag() const;
     IdleTask();
 
-    // Launch an Idle at TaskPriority::LOWEST and wait until it completes. Can
-    // be used to wait until pending Idles at higher TaskPriority::DEFAULT_IDLE
-    // have completed.
+    // Launch an Idle at reserved lowest priority of 
TaskPriority::TOOLKIT_DEBUG
+    // and wait until it completes. Can be used to wait until pending Idles at
+    // higher TaskPriority have completed.
     static void waitUntilIdleDispatched();
 
 private:
diff --git a/include/vcl/task.hxx b/include/vcl/task.hxx
index 5ed8cde7ff21..41c73bf39644 100644
--- a/include/vcl/task.hxx
+++ b/include/vcl/task.hxx
@@ -34,10 +34,11 @@ enum class TaskPriority
     REPAINT,       ///< All repaint events should go in here
     POST_PAINT,    ///< Everything running directly after painting
     DEFAULT_IDLE,  ///< Default idle priority
-    LOWEST         ///< Low, very idle cleanup tasks
+    LOWEST,        ///< Low, very idle cleanup tasks
+    TOOLKIT_DEBUG  ///< Do not use. Solely for 
IdleTask::waitUntilIdleDispatched
 };
 
-#define PRIO_COUNT (static_cast<int>(TaskPriority::LOWEST) + 1)
+#define PRIO_COUNT (static_cast<int>(TaskPriority::TOOLKIT_DEBUG) + 1)
 
 class VCL_DLLPUBLIC Task
 {
diff --git a/vcl/source/helper/idletask.cxx b/vcl/source/helper/idletask.cxx
index 7df0514912db..2865d8d0367a 100644
--- a/vcl/source/helper/idletask.cxx
+++ b/vcl/source/helper/idletask.cxx
@@ -14,8 +14,8 @@
 IdleTask::IdleTask()
     : flag(false)
 {
-    //setting the Priority of Idle task to LOW, LOWEST
-    maIdle.SetPriority(TaskPriority::LOWEST);
+    //setting the Priority of Idle task to TOOLKIT_DEBUG
+    maIdle.SetPriority(TaskPriority::TOOLKIT_DEBUG);
     //set idle for callback
     maIdle.SetInvokeHandler(LINK(this, IdleTask, FlipFlag));
     //starting the idle
commit ea851f8aec9252c04d8993ed61e71dad09acd427
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Wed Mar 20 17:22:46 2024 +0000
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Mon Apr 15 12:37:21 2024 +0200

    Related: tdf#160056 this can be be a local function
    
    Change-Id: I0ffebd5a1f871b86507d0c1b3946b32993d76365
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165106
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    (cherry picked from commit e8d01d2447b3350f1bd24e07580402c4c699756c)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165747
    Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>

diff --git a/bin/find-can-be-private-symbols.functions.results 
b/bin/find-can-be-private-symbols.functions.results
index 075c73e10125..c3a75e5aede0 100644
--- a/bin/find-can-be-private-symbols.functions.results
+++ b/bin/find-can-be-private-symbols.functions.results
@@ -9405,7 +9405,6 @@ SvNumberFormatter::GetTimeFormat(double, 
o3tl::strong_int<unsigned short, Langua
 SvNumberFormatter::GetTransliteration() const
 SvNumberFormatter::GetUserDefColor(unsigned short)
 SvNumberFormatter::ImpLookupCurrencyEntryLoopBody(NfCurrencyEntry const*&, 
bool&, NfCurrencyEntry const*, unsigned short, std::basic_string_view<char16_t, 
std::char_traits<char16_t> >)
-SvNumberFormatter::ImpPosToken(rtl::OUStringBuffer const&, char16_t, int) const
 SvNumberFormatter::ImpSubstituteEntry(SvNumberformat*, unsigned int*)
 SvNumberFormatter::InvalidateDateAcceptancePatterns()
 SvNumberFormatter::IsDecimalSep(std::basic_string_view<char16_t, 
std::char_traits<char16_t> >) const
diff --git a/include/svl/numformat.hxx b/include/svl/numformat.hxx
index 6a007d1bd057..91d8b798e2e2 100644
--- a/include/svl/numformat.hxx
+++ b/include/svl/numformat.hxx
@@ -676,10 +676,6 @@ private:
     // link to be set at 
<method>SvtSysLocaleOptions::SetCurrencyChangeLink()</method>
     DECL_DLLPRIVATE_STATIC_LINK(SvNumberFormatter, CurrencyChangeLink, 
LinkParamNone*, void);
 
-    // return position of a special character
-    sal_Int32 ImpPosToken(const OUStringBuffer& sFormat, sal_Unicode token,
-                          sal_Int32 nStartPos = 0) const;
-
     // Substitute a format during GetFormatEntry(), i.e. system formats.
     SvNumberformat* ImpSubstituteEntry(SvNumberformat* pFormat, sal_uInt32* 
o_pRealKey = nullptr);
 
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index 8d2d28b90b3f..87126032fe75 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -3107,8 +3107,10 @@ void SvNumberFormatter::ImpGenerateAdditionalFormats( 
sal_uInt32 CLOffset,
     pStdFormat->SetLastInsertKey( static_cast<sal_uInt16>(nPos - CLOffset), 
SvNumberformat::FormatterPrivateAccess() );
 }
 
+namespace {
 
-sal_Int32 SvNumberFormatter::ImpPosToken ( const OUStringBuffer & sFormat, 
sal_Unicode token, sal_Int32 nStartPos /* = 0*/ ) const
+// return position of a special character
+sal_Int32 ImpPosToken(const OUStringBuffer & sFormat, sal_Unicode token, 
sal_Int32 nStartPos = 0)
 {
     sal_Int32 nLength = sFormat.getLength();
     for ( sal_Int32 i=nStartPos; i<nLength && i>=0 ; i++ )
@@ -3141,6 +3143,8 @@ sal_Int32 SvNumberFormatter::ImpPosToken ( const 
OUStringBuffer & sFormat, sal_U
     return -2;
 }
 
+}
+
 OUString SvNumberFormatter::GenerateFormat(sal_uInt32 nIndex,
                                            LanguageType eLnge,
                                            bool bThousand,
commit 97f857a65faae0143af118b060316aa99d99852d
Author:     Michael Stahl <michael.st...@allotropia.de>
AuthorDate: Thu Apr 11 16:37:12 2024 +0200
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Mon Apr 15 12:37:13 2024 +0200

    sw: workaround crash in IsAllHiddenRow()
    
    Not sure why but somehow still crashes in the code added in commit
    ab7893544dc6be6dc192dffefd57cd5ddd421c35
    
    
https://crashreport.libreoffice.org/stats/crash_details/912e7417-5e04-4279-bbaf-380234f4cd33
    
    Change-Id: I23b7ecdd83009cfe6584866ed72102d8f2179f86
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166010
    Tested-by: Michael Stahl <michael.st...@allotropia.de>
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>
    (cherry picked from commit 44ff9907eb1f2851b3b9087e7ec5e5dfae5a00c6)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165940
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index fe3a5232356e..adffbba17715 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -1523,7 +1523,8 @@ namespace
                 }
             }
         }
-        if (rTab.IsCollapsingBorders() && !rCell.Lower()->IsRowFrame())
+        assert(rCell.Lower());
+        if (rTab.IsCollapsingBorders() && rCell.Lower() && 
!rCell.Lower()->IsRowFrame())
         {
             if (rRow.GetTopMarginForLowers() != 0
                 || rRow.GetBottomMarginForLowers() != 0)
commit 1c1e45fc51ce2f90a3a49caaba81e87614d93ccd
Author:     Eike Rathke <er...@redhat.com>
AuthorDate: Sun Apr 14 16:03:39 2024 +0200
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Mon Apr 15 12:37:13 2024 +0200

    Correct {bg-BG} formats with group separator
    
    The leading # digit before the separator was omitted. This never
    worked as intended.
    
    Change-Id: Idf8a6cf246b8db4e6d5361bc1c5f66c1c0c057c5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166072
    Reviewed-by: Eike Rathke <er...@redhat.com>
    Tested-by: Jenkins
    (cherry picked from commit afa957aeb9f0afd8179f02a4b4281c77b737300b)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165949
    Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>

diff --git a/i18npool/source/localedata/data/bg_BG.xml 
b/i18npool/source/localedata/data/bg_BG.xml
index 8813942ff893..55c63049089f 100644
--- a/i18npool/source/localedata/data/bg_BG.xml
+++ b/i18npool/source/localedata/data/bg_BG.xml
@@ -67,13 +67,13 @@
       <FormatCode>0,00</FormatCode>
     </FormatElement>
     <FormatElement msgid="FixedFormatskey4" default="false" type="short" 
usage="FIXED_NUMBER" formatindex="3">
-      <FormatCode> ##0</FormatCode>
+      <FormatCode># ##0</FormatCode>
     </FormatElement>
     <FormatElement msgid="FixedFormatskey5" default="false" type="medium" 
usage="FIXED_NUMBER" formatindex="4">
-      <FormatCode> ##0,00</FormatCode>
+      <FormatCode># ##0,00</FormatCode>
     </FormatElement>
     <FormatElement msgid="FixedFormatskey6" default="false" type="medium" 
usage="FIXED_NUMBER" formatindex="5">
-      <FormatCode> ###,00</FormatCode>
+      <FormatCode># ###,00</FormatCode>
     </FormatElement>
     <FormatElement msgid="FixedFormatskey9" default="false" type="medium" 
usage="FIXED_NUMBER" formatindex="101">
       <FormatCode>[NatNum12 cardinal]0</FormatCode>
@@ -100,22 +100,22 @@
       <FormatCode>0,00%</FormatCode>
     </FormatElement>
     <FormatElement msgid="CurrencyFormatskey1" default="true" type="short" 
usage="CURRENCY" formatindex="12">
-      <FormatCode> ##0 [CURRENCY];- ##0 [CURRENCY]</FormatCode>
+      <FormatCode># ##0 [CURRENCY];-# ##0 [CURRENCY]</FormatCode>
     </FormatElement>
     <FormatElement msgid="CurrencyFormatskey2" default="false" type="medium" 
usage="CURRENCY" formatindex="13">
-      <FormatCode> ##0,00 [CURRENCY];- ##0,00 [CURRENCY]</FormatCode>
+      <FormatCode># ##0,00 [CURRENCY];-# ##0,00 [CURRENCY]</FormatCode>
     </FormatElement>
     <FormatElement msgid="CurrencyFormatskey3" default="false" type="medium" 
usage="CURRENCY" formatindex="14">
-      <FormatCode> ##0 [CURRENCY];[RED]- ##0 [CURRENCY]</FormatCode>
+      <FormatCode># ##0 [CURRENCY];[RED]-# ##0 [CURRENCY]</FormatCode>
     </FormatElement>
     <FormatElement msgid="CurrencyFormatskey4" default="true" type="medium" 
usage="CURRENCY" formatindex="15">
-      <FormatCode> ##0,00 [CURRENCY];[RED]- ##0,00 [CURRENCY]</FormatCode>
+      <FormatCode># ##0,00 [CURRENCY];[RED]-# ##0,00 [CURRENCY]</FormatCode>
     </FormatElement>
     <FormatElement msgid="CurrencyFormatskey5" default="false" type="medium" 
usage="CURRENCY" formatindex="16">
-      <FormatCode> ##0,00 CCC</FormatCode>
+      <FormatCode># ##0,00 CCC</FormatCode>
     </FormatElement>
     <FormatElement msgid="CurrencyFormatskey6" default="false" type="medium" 
usage="CURRENCY" formatindex="17">
-      <FormatCode> ##0,-- [CURRENCY];[RED]- ##0,-- [CURRENCY]</FormatCode>
+      <FormatCode># ##0,-- [CURRENCY];[RED]-# ##0,-- [CURRENCY]</FormatCode>
     </FormatElement>
     <FormatElement msgid="CurrencyFormatskey9" default="false" type="medium" 
usage="CURRENCY" formatindex="105">
       <FormatCode>[NatNum12 CURRENCY]0</FormatCode>
commit 05301ca7714aa9936922026f1565787304a19952
Author:     Patrick Luby <guibmac...@gmail.com>
AuthorDate: Wed Apr 10 08:04:57 2024 -0400
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Mon Apr 15 12:37:12 2024 +0200

    tdf#160590 Disable Metal with Intel HD Graphics 6000
    
    Releasing a Metal buffer resource hangs when fetching pixels from a
    Skia surface on this Intel MacBook Air built-in GPU.
    
    Change-Id: Ic3028bf8eb45ebb9f6d71879bf5d96f0401a95c8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165927
    Tested-by: Jenkins
    Reviewed-by: Patrick Luby <guibomac...@gmail.com>
    (cherry picked from commit fe3a4bdf48f7b2d4f6da31b4392ac5979653cf9c)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165945
    Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>

diff --git a/vcl/quartz/cgutils.mm b/vcl/quartz/cgutils.mm
index 0d611bec11d1..50b7fcd6540c 100644
--- a/vcl/quartz/cgutils.mm
+++ b/vcl/quartz/cgutils.mm
@@ -122,6 +122,16 @@ bool DefaultMTLDeviceIsSupported()
            bRet = false;
     }
 
+    if (bRet)
+    {
+        // tdf#160590 Disable Metal with Intel HD Graphics 6000
+        // Releasing a Metal buffer resource hangs when fetching pixels from a
+        // Skia surface on this Intel MacBook Air built-in GPU.
+       static NSString* pIntelHDGraphics6000Prefix = @"Intel(R) Iris(TM) 
Graphics 6000";
+       if ([pMetalDevice.name hasPrefix:pIntelHDGraphics6000Prefix])
+           bRet = false;
+    }
+
     [pMetalDevice release];
     return bRet;
 }
commit 249b68b37bb331604b2de9f1ebbf6eb656f65144
Author:     Laurent Balland <laurent.ball...@mailo.fr>
AuthorDate: Sat Apr 13 11:06:34 2024 +0200
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Mon Apr 15 12:37:12 2024 +0200

    tdf#160567 Replace duplicate style A4 with A0
    
    Style A4 was defined twice and A0 was missing. Rename second A4 with A0
    and change size to 48pt
    
    Change-Id: I529b4fab5223269908867531873d36d3e878e7e7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166045
    Tested-by: Jenkins
    Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>
    (cherry picked from commit 838d2666e85fc27cdcfc66198b6d7a983eec1ea6)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165944

diff --git a/extras/source/templates/presnt/Beehive/styles.xml 
b/extras/source/templates/presnt/Beehive/styles.xml
index 74f40446049b..29843493f876 100644
--- a/extras/source/templates/presnt/Beehive/styles.xml
+++ b/extras/source/templates/presnt/Beehive/styles.xml
@@ -87,9 +87,9 @@
     <style:style style:name="Text_20_A4" style:display-name="Text A4" 
style:family="graphic" style:parent-style-name="A4">
       <style:graphic-properties draw:stroke="none"/>
     </style:style>
-    <style:style style:name="A4" style:family="graphic" 
style:parent-style-name="Text">
+    <style:style style:name="A0" style:family="graphic" 
style:parent-style-name="Text">
       <style:graphic-properties draw:fill="none"/>
-      <style:text-properties fo:font-size="18pt" style:font-size-asian="18pt" 
style:font-size-complex="18pt"/>
+      <style:text-properties fo:font-size="48pt" style:font-size-asian="48pt" 
style:font-size-complex="48pt"/>
     </style:style>
     <style:style style:name="Title_20_A0" style:display-name="Title A0" 
style:family="graphic" style:parent-style-name="A0">
       <style:graphic-properties draw:stroke="none"/>
diff --git a/extras/source/templates/presnt/Blue_Curve/styles.xml 
b/extras/source/templates/presnt/Blue_Curve/styles.xml
index bc0420e28577..9e3863fedfc5 100644
--- a/extras/source/templates/presnt/Blue_Curve/styles.xml
+++ b/extras/source/templates/presnt/Blue_Curve/styles.xml
@@ -97,9 +97,9 @@
     <style:style style:name="Text_20_A4" style:display-name="Text A4" 
style:family="graphic" style:parent-style-name="A4">
       <style:graphic-properties draw:stroke="none"/>
     </style:style>
-    <style:style style:name="A4" style:family="graphic" 
style:parent-style-name="Text">
+    <style:style style:name="A0" style:family="graphic" 
style:parent-style-name="Text">
       <style:graphic-properties draw:fill="none"/>
-      <style:text-properties fo:font-size="18pt" style:font-size-asian="18pt" 
style:font-size-complex="18pt"/>
+      <style:text-properties fo:font-size="48pt" style:font-size-asian="48pt" 
style:font-size-complex="48pt"/>
     </style:style>
     <style:style style:name="Title_20_A0" style:display-name="Title A0" 
style:family="graphic" style:parent-style-name="A0">
       <style:graphic-properties draw:stroke="none"/>
diff --git a/extras/source/templates/presnt/Blueprint_Plans/styles.xml 
b/extras/source/templates/presnt/Blueprint_Plans/styles.xml
index bd1b430c6cae..00d8310d25fb 100644
--- a/extras/source/templates/presnt/Blueprint_Plans/styles.xml
+++ b/extras/source/templates/presnt/Blueprint_Plans/styles.xml
@@ -100,9 +100,9 @@
     <style:style style:name="Text_20_A4" style:display-name="Text A4" 
style:family="graphic" style:parent-style-name="A4">
       <style:graphic-properties draw:stroke="none"/>
     </style:style>
-    <style:style style:name="A4" style:family="graphic" 
style:parent-style-name="Text">
+    <style:style style:name="A0" style:family="graphic" 
style:parent-style-name="Text">
       <style:graphic-properties draw:fill="none"/>
-      <style:text-properties fo:font-size="18pt" style:font-size-asian="18pt" 
style:font-size-complex="18pt"/>
+      <style:text-properties fo:font-size="48pt" style:font-size-asian="48pt" 
style:font-size-complex="48pt"/>
     </style:style>
     <style:style style:name="Title_20_A0" style:display-name="Title A0" 
style:family="graphic" style:parent-style-name="A0">
       <style:graphic-properties draw:stroke="none"/>
diff --git a/extras/source/templates/presnt/DNA/styles.xml 
b/extras/source/templates/presnt/DNA/styles.xml
index ac5a9da4739d..42422332ddee 100644
--- a/extras/source/templates/presnt/DNA/styles.xml
+++ b/extras/source/templates/presnt/DNA/styles.xml
@@ -95,9 +95,9 @@
     <style:style style:name="Text_20_A4" style:display-name="Text A4" 
style:family="graphic" style:parent-style-name="A4">
       <style:graphic-properties draw:stroke="none"/>
     </style:style>
-    <style:style style:name="A4" style:family="graphic" 
style:parent-style-name="Text">
+    <style:style style:name="A0" style:family="graphic" 
style:parent-style-name="Text">
       <style:graphic-properties draw:fill="none"/>
-      <style:text-properties fo:font-size="18pt" style:font-size-asian="18pt" 
style:font-size-complex="18pt"/>
+      <style:text-properties fo:font-size="48pt" style:font-size-asian="48pt" 
style:font-size-complex="48pt"/>
     </style:style>
     <style:style style:name="Title_20_A0" style:display-name="Title A0" 
style:family="graphic" style:parent-style-name="A0">
       <style:graphic-properties draw:stroke="none"/>
diff --git a/extras/source/templates/presnt/Focus/styles.xml 
b/extras/source/templates/presnt/Focus/styles.xml
index 4d5464c0d1ad..a563575e2fd3 100644
--- a/extras/source/templates/presnt/Focus/styles.xml
+++ b/extras/source/templates/presnt/Focus/styles.xml
@@ -99,9 +99,9 @@
     <style:style style:name="Text_20_A4" style:display-name="Text A4" 
style:family="graphic" style:parent-style-name="A4">
       <style:graphic-properties draw:stroke="none"/>
     </style:style>
-    <style:style style:name="A4" style:family="graphic" 
style:parent-style-name="Text">
+    <style:style style:name="A0" style:family="graphic" 
style:parent-style-name="Text">
       <style:graphic-properties draw:fill="none"/>
-      <style:text-properties fo:font-size="18pt" style:font-size-asian="18pt" 
style:font-size-complex="18pt"/>
+      <style:text-properties fo:font-size="48pt" style:font-size-asian="48pt" 
style:font-size-complex="48pt"/>
     </style:style>
     <style:style style:name="Title_20_A0" style:display-name="Title A0" 
style:family="graphic" style:parent-style-name="A0">
       <style:graphic-properties draw:stroke="none"/>
diff --git a/extras/source/templates/presnt/Forestbird/styles.xml 
b/extras/source/templates/presnt/Forestbird/styles.xml
index 37f2285c8d03..c59cef8d8dec 100644
--- a/extras/source/templates/presnt/Forestbird/styles.xml
+++ b/extras/source/templates/presnt/Forestbird/styles.xml
@@ -96,9 +96,9 @@
     <style:style style:name="Text_20_A4" style:display-name="Text A4" 
style:family="graphic" style:parent-style-name="A4">
       <style:graphic-properties draw:stroke="none"/>
     </style:style>
-    <style:style style:name="A4" style:family="graphic" 
style:parent-style-name="Text">
+    <style:style style:name="A0" style:family="graphic" 
style:parent-style-name="Text">
       <style:graphic-properties draw:fill="none"/>
-      <style:text-properties fo:font-size="18pt" style:font-size-asian="18pt" 
style:font-size-complex="18pt"/>
+      <style:text-properties fo:font-size="48pt" style:font-size-asian="48pt" 
style:font-size-complex="48pt"/>
     </style:style>
     <style:style style:name="Title_20_A0" style:display-name="Title A0" 
style:family="graphic" style:parent-style-name="A0">
       <style:graphic-properties draw:stroke="none"/>
diff --git a/extras/source/templates/presnt/Grey_Elegant/styles.xml 
b/extras/source/templates/presnt/Grey_Elegant/styles.xml
index e7990759f3ea..f68bef1597b1 100644
--- a/extras/source/templates/presnt/Grey_Elegant/styles.xml
+++ b/extras/source/templates/presnt/Grey_Elegant/styles.xml
@@ -145,9 +145,9 @@
     <style:style style:name="Text_20_A4" style:display-name="Text A4" 
style:family="graphic" style:parent-style-name="A4">
       <style:graphic-properties draw:stroke="none"/>
     </style:style>
-    <style:style style:name="A4" style:family="graphic" 
style:parent-style-name="Text">
+    <style:style style:name="A0" style:family="graphic" 
style:parent-style-name="Text">
       <style:graphic-properties draw:fill="none"/>
-      <style:text-properties fo:font-size="18pt"/>
+      <style:text-properties fo:font-size="48pt"/>
     </style:style>
     <style:style style:name="Title_20_A0" style:display-name="Title A0" 
style:family="graphic" style:parent-style-name="A0">
       <style:graphic-properties draw:stroke="none"/>
diff --git a/extras/source/templates/presnt/Growing_Liberty/styles.xml 
b/extras/source/templates/presnt/Growing_Liberty/styles.xml
index 15715b0a9474..cea97722d541 100644
--- a/extras/source/templates/presnt/Growing_Liberty/styles.xml
+++ b/extras/source/templates/presnt/Growing_Liberty/styles.xml
@@ -112,9 +112,9 @@
     <style:style style:name="Text_20_A4" style:display-name="Text A4" 
style:family="graphic" style:parent-style-name="A4">
       <style:graphic-properties draw:stroke="none"/>
     </style:style>
-    <style:style style:name="A4" style:family="graphic" 
style:parent-style-name="Text">
+    <style:style style:name="A0" style:family="graphic" 
style:parent-style-name="Text">
       <style:graphic-properties draw:fill="none"/>
-      <style:text-properties fo:font-size="18pt"/>
+      <style:text-properties fo:font-size="48pt"/>
     </style:style>
     <style:style style:name="Title_20_A0" style:display-name="Title A0" 
style:family="graphic" style:parent-style-name="A0">
       <style:graphic-properties draw:stroke="none"/>
diff --git a/extras/source/templates/presnt/Inspiration/styles.xml 
b/extras/source/templates/presnt/Inspiration/styles.xml
index 765df9ccb090..aa439052f9cd 100644
--- a/extras/source/templates/presnt/Inspiration/styles.xml
+++ b/extras/source/templates/presnt/Inspiration/styles.xml
@@ -94,9 +94,9 @@
     <style:style style:name="Text_20_A4" style:display-name="Text A4" 
style:family="graphic" style:parent-style-name="A4">
       <style:graphic-properties draw:stroke="none"/>
     </style:style>
-    <style:style style:name="A4" style:family="graphic" 
style:parent-style-name="Text">
+    <style:style style:name="A0" style:family="graphic" 
style:parent-style-name="Text">
       <style:graphic-properties draw:fill="none"/>
-      <style:text-properties fo:font-size="18pt" style:font-size-asian="18pt" 
style:font-size-complex="18pt"/>
+      <style:text-properties fo:font-size="48pt" style:font-size-asian="48pt" 
style:font-size-complex="48pt"/>
     </style:style>
     <style:style style:name="Title_20_A0" style:display-name="Title A0" 
style:family="graphic" style:parent-style-name="A0">
       <style:graphic-properties draw:stroke="none"/>
diff --git a/extras/source/templates/presnt/Lights/styles.xml 
b/extras/source/templates/presnt/Lights/styles.xml
index 8f6ffdc72e13..173e6a718499 100644
--- a/extras/source/templates/presnt/Lights/styles.xml
+++ b/extras/source/templates/presnt/Lights/styles.xml
@@ -98,9 +98,9 @@
     <style:style style:name="Text_20_A4" style:display-name="Text A4" 
style:family="graphic" style:parent-style-name="A4">
       <style:graphic-properties draw:stroke="none"/>
     </style:style>
-    <style:style style:name="A4" style:family="graphic" 
style:parent-style-name="Text">
+    <style:style style:name="A0" style:family="graphic" 
style:parent-style-name="Text">
       <style:graphic-properties draw:fill="none"/>
-      <style:text-properties fo:font-size="18pt" style:font-size-asian="18pt" 
style:font-size-complex="18pt"/>
+      <style:text-properties fo:font-size="48pt" style:font-size-asian="48pt" 
style:font-size-complex="48pt"/>
     </style:style>
     <style:style style:name="Title_20_A0" style:display-name="Title A0" 
style:family="graphic" style:parent-style-name="A0">
       <style:graphic-properties draw:stroke="none"/>
diff --git a/extras/source/templates/presnt/Midnightblue/styles.xml 
b/extras/source/templates/presnt/Midnightblue/styles.xml
index cb6f0f02a4a5..eaa876cba5ed 100644
--- a/extras/source/templates/presnt/Midnightblue/styles.xml
+++ b/extras/source/templates/presnt/Midnightblue/styles.xml
@@ -106,9 +106,9 @@
     <style:style style:name="Text_20_A4" style:display-name="Text A4" 
style:family="graphic" style:parent-style-name="A4">
       <style:graphic-properties draw:stroke="none"/>
     </style:style>
-    <style:style style:name="A4" style:family="graphic" 
style:parent-style-name="Text">
+    <style:style style:name="A0" style:family="graphic" 
style:parent-style-name="Text">
       <style:graphic-properties draw:fill="none"/>
-      <style:text-properties fo:font-size="18pt" style:font-size-asian="18pt" 
style:font-size-complex="18pt"/>
+      <style:text-properties fo:font-size="48pt" style:font-size-asian="48pt" 
style:font-size-complex="48pt"/>
     </style:style>
     <style:style style:name="Title_20_A0" style:display-name="Title A0" 
style:family="graphic" style:parent-style-name="A0">
       <style:graphic-properties draw:stroke="none"/>
diff --git a/extras/source/templates/presnt/Pencil/styles.xml 
b/extras/source/templates/presnt/Pencil/styles.xml
index f33b488c5a0a..6dac926e2706 100644
--- a/extras/source/templates/presnt/Pencil/styles.xml
+++ b/extras/source/templates/presnt/Pencil/styles.xml
@@ -94,9 +94,9 @@
     <style:style style:name="Text_20_A4" style:display-name="Text A4" 
style:family="graphic" style:parent-style-name="A4">
       <style:graphic-properties draw:stroke="none"/>
     </style:style>
-    <style:style style:name="A4" style:family="graphic" 
style:parent-style-name="Text">
+    <style:style style:name="A0" style:family="graphic" 
style:parent-style-name="Text">
       <style:graphic-properties draw:fill="none"/>
-      <style:text-properties fo:font-size="18pt" style:font-size-asian="18pt" 
style:font-size-complex="18pt"/>
+      <style:text-properties fo:font-size="48pt" style:font-size-asian="48pt" 
style:font-size-complex="48pt"/>
     </style:style>
     <style:style style:name="Title_20_A0" style:display-name="Title A0" 
style:family="graphic" style:parent-style-name="A0">
       <style:graphic-properties draw:stroke="none"/>
diff --git a/extras/source/templates/presnt/Piano/styles.xml 
b/extras/source/templates/presnt/Piano/styles.xml
index 560b8cdd56c8..28655a9e3d01 100644
--- a/extras/source/templates/presnt/Piano/styles.xml
+++ b/extras/source/templates/presnt/Piano/styles.xml
@@ -96,9 +96,9 @@
     <style:style style:name="Text_20_A4" style:display-name="Text A4" 
style:family="graphic" style:parent-style-name="A4">
       <style:graphic-properties draw:stroke="none"/>
     </style:style>
-    <style:style style:name="A4" style:family="graphic" 
style:parent-style-name="Text">
+    <style:style style:name="A0" style:family="graphic" 
style:parent-style-name="Text">
       <style:graphic-properties draw:fill="none"/>
-      <style:text-properties fo:font-size="18pt" style:font-size-asian="18pt" 
style:font-size-complex="18pt"/>
+      <style:text-properties fo:font-size="48pt" style:font-size-asian="48pt" 
style:font-size-complex="48pt"/>
     </style:style>
     <style:style style:name="Title_20_A0" style:display-name="Title A0" 
style:family="graphic" style:parent-style-name="A0">
       <style:graphic-properties draw:stroke="none"/>
diff --git a/extras/source/templates/presnt/Portfolio/styles.xml 
b/extras/source/templates/presnt/Portfolio/styles.xml
index 67b1af38f106..d20caf9da7da 100644
--- a/extras/source/templates/presnt/Portfolio/styles.xml
+++ b/extras/source/templates/presnt/Portfolio/styles.xml
@@ -102,9 +102,9 @@
     <style:style style:name="Text_20_A4" style:display-name="Text A4" 
style:family="graphic" style:parent-style-name="A4">
       <style:graphic-properties draw:stroke="none"/>
     </style:style>
-    <style:style style:name="A4" style:family="graphic" 
style:parent-style-name="Text">
+    <style:style style:name="A0" style:family="graphic" 
style:parent-style-name="Text">
       <style:graphic-properties draw:fill="none"/>
-      <style:text-properties fo:font-size="18pt" style:font-size-asian="18pt" 
style:font-size-complex="18pt"/>
+      <style:text-properties fo:font-size="48pt" style:font-size-asian="48pt" 
style:font-size-complex="48pt"/>
     </style:style>
     <style:style style:name="Title_20_A0" style:display-name="Title A0" 
style:family="graphic" style:parent-style-name="A0">
       <style:graphic-properties draw:stroke="none"/>
diff --git a/extras/source/templates/presnt/Progress/styles.xml 
b/extras/source/templates/presnt/Progress/styles.xml
index 65bf07a771cc..49562966699b 100644
--- a/extras/source/templates/presnt/Progress/styles.xml
+++ b/extras/source/templates/presnt/Progress/styles.xml
@@ -99,9 +99,9 @@
     <style:style style:name="Text_20_A4" style:display-name="Text A4" 
style:family="graphic" style:parent-style-name="A4">
       <style:graphic-properties draw:stroke="none"/>
     </style:style>
-    <style:style style:name="A4" style:family="graphic" 
style:parent-style-name="Text">
+    <style:style style:name="A0" style:family="graphic" 
style:parent-style-name="Text">
       <style:graphic-properties draw:fill="none"/>
-      <style:text-properties fo:font-size="18pt" style:font-size-asian="18pt" 
style:font-size-complex="18pt"/>
+      <style:text-properties fo:font-size="48pt" style:font-size-asian="48pt" 
style:font-size-complex="48pt"/>
     </style:style>
     <style:style style:name="Title_20_A0" style:display-name="Title A0" 
style:family="graphic" style:parent-style-name="A0">
       <style:graphic-properties draw:stroke="none"/>
diff --git a/extras/source/templates/presnt/Sunset/styles.xml 
b/extras/source/templates/presnt/Sunset/styles.xml
index c135737d278e..7881ed513c68 100644
--- a/extras/source/templates/presnt/Sunset/styles.xml
+++ b/extras/source/templates/presnt/Sunset/styles.xml
@@ -99,9 +99,9 @@
     <style:style style:name="Text_20_A4" style:display-name="Text A4" 
style:family="graphic" style:parent-style-name="A4">
       <style:graphic-properties draw:stroke="none"/>
     </style:style>
-    <style:style style:name="A4" style:family="graphic" 
style:parent-style-name="Text">
+    <style:style style:name="A0" style:family="graphic" 
style:parent-style-name="Text">
       <style:graphic-properties draw:fill="none"/>
-      <style:text-properties fo:font-size="18pt" style:font-size-asian="18pt" 
style:font-size-complex="18pt"/>
+      <style:text-properties fo:font-size="48pt" style:font-size-asian="48pt" 
style:font-size-complex="48pt"/>
     </style:style>
     <style:style style:name="Title_20_A0" style:display-name="Title A0" 
style:family="graphic" style:parent-style-name="A0">
       <style:graphic-properties draw:stroke="none"/>
diff --git a/extras/source/templates/presnt/Vivid/styles.xml 
b/extras/source/templates/presnt/Vivid/styles.xml
index 1a22b994d6f7..56760b6dc5e8 100644
--- a/extras/source/templates/presnt/Vivid/styles.xml
+++ b/extras/source/templates/presnt/Vivid/styles.xml
@@ -99,9 +99,9 @@
     <style:style style:name="Text_20_A4" style:display-name="Text A4" 
style:family="graphic" style:parent-style-name="A4">
       <style:graphic-properties draw:stroke="none"/>
     </style:style>
-    <style:style style:name="A4" style:family="graphic" 
style:parent-style-name="Text">
+    <style:style style:name="A0" style:family="graphic" 
style:parent-style-name="Text">
       <style:graphic-properties draw:fill="none"/>
-      <style:text-properties fo:font-size="18pt"/>
+      <style:text-properties fo:font-size="48pt"/>
     </style:style>
     <style:style style:name="Title_20_A0" style:display-name="Title A0" 
style:family="graphic" style:parent-style-name="A0">
       <style:graphic-properties draw:stroke="none"/>
diff --git a/extras/source/templates/presnt/Yellow_Idea/styles.xml 
b/extras/source/templates/presnt/Yellow_Idea/styles.xml
index 276ae95d5ce5..aa8cfab8ab73 100644
--- a/extras/source/templates/presnt/Yellow_Idea/styles.xml
+++ b/extras/source/templates/presnt/Yellow_Idea/styles.xml
@@ -111,9 +111,9 @@
     <style:style style:name="Text_20_A4" style:display-name="Text A4" 
style:family="graphic" style:parent-style-name="A4">
       <style:graphic-properties draw:stroke="none"/>
     </style:style>
-    <style:style style:name="A4" style:family="graphic" 
style:parent-style-name="Text">
+    <style:style style:name="A0" style:family="graphic" 
style:parent-style-name="Text">
       <style:graphic-properties draw:fill="none"/>
-      <style:text-properties fo:font-size="18pt"/>
+      <style:text-properties fo:font-size="48pt"/>
     </style:style>
     <style:style style:name="Title_20_A0" style:display-name="Title A0" 
style:family="graphic" style:parent-style-name="A0">
       <style:graphic-properties draw:stroke="none"/>
commit fd46a34cac46d951ccff6708820e8d8012b030b3
Author:     Jim Raykowski <rayk...@gmail.com>
AuthorDate: Wed Apr 3 11:27:21 2024 -0800
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Mon Apr 15 12:37:12 2024 +0200

    Resolves tdf#157403 sidebar SdNavigator does not show new slide/page
    
    after file reload
    
    Change-Id: I8ba7ffac3c098cf388a67e3454c5986b5a8b1f3f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165767
    Tested-by: Jenkins
    Reviewed-by: Jim Raykowski <rayk...@gmail.com>
    (cherry picked from commit 1dbe90cb078bddaf8bbd333823762744158c92bb)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165934
    Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>

diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index f1a4a66c1e5f..8741a2c913b4 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -662,7 +662,7 @@ void SdNavigatorWin::RefreshDocumentLB( const OUString* 
pDocName )
 
         ::sd::DrawDocShell* pCurrentDocShell =
               dynamic_cast< ::sd::DrawDocShell *>( SfxObjectShell::Current() );
-        SfxObjectShell* pSfxDocShell = SfxObjectShell::GetFirst([](const 
SfxObjectShell*){return true;}, false);
+        SfxObjectShell* pSfxDocShell = SfxObjectShell::GetFirst();
         while( pSfxDocShell )
         {
             ::sd::DrawDocShell* pDocShell = dynamic_cast< ::sd::DrawDocShell 
*>( pSfxDocShell );
@@ -691,7 +691,7 @@ void SdNavigatorWin::RefreshDocumentLB( const OUString* 
pDocName )
 
                 maDocList.push_back( aInfo );
             }
-            pSfxDocShell = SfxObjectShell::GetNext( *pSfxDocShell, [](const 
SfxObjectShell*){return true;}, false );
+            pSfxDocShell = SfxObjectShell::GetNext(*pSfxDocShell);
         }
     }
     mxLbDocs->set_active(nPos);
commit e32d77dbc515a6347508e022aef2ea65be84e549
Author:     Michael Stahl <michael.st...@allotropia.de>
AuthorDate: Wed Mar 13 09:38:00 2024 +0100
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Mon Apr 15 12:36:24 2024 +0200

    sw: layout: use page style set on hidden paragraph
    
    SwPageFrame::FindPageDesc() now ignores paragraphs hidden for any
    reason, but to maintain layout compatibility it should only ignore
    paragraphs in a hidden section, not paragraphs hidden by fields.
    
    (regression from commit 0c96119895b347f8eb5bb89f393351bd3c02b9f1)
    
    Change-Id: Iad5e76f5cc437d35b4ae9bde6bc9b73dbe32bf3d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164761
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>
    (cherry picked from commit 7335babda93974104a39202c434e9499b8086f3a)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164742
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sw/qa/extras/uiwriter/data/pagebreak-source.fodt 
b/sw/qa/extras/uiwriter/data/pagebreak-source.fodt
index e09c1b447cfd..cb72fea62a85 100644
--- a/sw/qa/extras/uiwriter/data/pagebreak-source.fodt
+++ b/sw/qa/extras/uiwriter/data/pagebreak-source.fodt
@@ -85,7 +85,7 @@
   <style:style style:name="P2" style:family="paragraph" 
style:parent-style-name="Standard">
    <style:text-properties/>
   </style:style>
-  <style:style style:name="P3" style:family="paragraph" 
style:parent-style-name="Standard" style:master-page-name="Standard">
+  <style:style style:name="P3" style:family="paragraph" 
style:parent-style-name="Standard" style:master-page-name="WithMargin">
    <style:paragraph-properties style:page-number="auto"/>
   </style:style>
   <style:style style:name="Sect1" style:family="section">
@@ -101,9 +101,17 @@
    <style:header-style/>
    <style:footer-style/>
   </style:page-layout>
+  <style:page-layout style:name="pm2">
+   <style:page-layout-properties fo:page-width="21.001cm" 
fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" 
fo:margin-top="10cm" fo:margin-bottom="2cm" fo:margin-left="2cm" 
fo:margin-right="2cm" style:writing-mode="lr-tb" 
style:layout-grid-color="#c0c0c0" style:layout-grid-lines="20" 
style:layout-grid-base-height="0.706cm" style:layout-grid-ruby-height="0.353cm" 
style:layout-grid-mode="none" style:layout-grid-ruby-below="false" 
style:layout-grid-print="false" style:layout-grid-display="false" 
style:footnote-max-height="0cm">
+    <style:footnote-sep style:width="0.018cm" 
style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" 
style:line-style="solid" style:adjustment="left" style:rel-width="25%" 
style:color="#000000"/>
+   </style:page-layout-properties>
+   <style:header-style/>
+   <style:footer-style/>
+  </style:page-layout>
  </office:automatic-styles>
  <office:master-styles>
   <style:master-page style:name="Standard" style:page-layout-name="pm1"/>
+  <style:master-page style:name="WithMargin" style:page-layout-name="pm2"/>
  </office:master-styles>
  <office:body>
   <office:text>
@@ -120,4 +128,4 @@
    </text:section>
   </office:text>
  </office:body>
-</office:document>
\ No newline at end of file
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/pagebreak-target.fodt 
b/sw/qa/extras/uiwriter/data/pagebreak-target.fodt
index f059e33f1514..1219cdd95e25 100644
--- a/sw/qa/extras/uiwriter/data/pagebreak-target.fodt
+++ b/sw/qa/extras/uiwriter/data/pagebreak-target.fodt
@@ -86,7 +86,7 @@
   <text:linenumbering-configuration text:number-lines="false" 
text:offset="0.499cm" style:num-format="1" text:number-position="left" 
text:increment="5"/>
  </office:styles>
  <office:automatic-styles>
-  <style:style style:name="P1" style:family="paragraph" 
style:parent-style-name="Standard" style:master-page-name="Standard">
+  <style:style style:name="P1" style:family="paragraph" 
style:parent-style-name="Standard" style:master-page-name="WithMargin">
    <style:paragraph-properties style:page-number="auto"/>
   </style:style>
   <style:style style:name="fr1" style:family="graphic" 
style:parent-style-name="Frame">
@@ -104,9 +104,17 @@
    <style:header-style/>
    <style:footer-style/>
   </style:page-layout>
+  <style:page-layout style:name="pm2">
+   <style:page-layout-properties fo:page-width="21.001cm" 
fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" 
fo:margin-top="10cm" fo:margin-bottom="2cm" fo:margin-left="2cm" 
fo:margin-right="2cm" style:writing-mode="lr-tb" 
style:footnote-max-height="0cm">
+    <style:footnote-sep style:width="0.018cm" 
style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" 
style:line-style="solid" style:adjustment="left" style:rel-width="25%" 
style:color="#000000"/>
+   </style:page-layout-properties>
+   <style:header-style/>
+   <style:footer-style/>
+  </style:page-layout>
  </office:automatic-styles>
  <office:master-styles>
   <style:master-page style:name="Standard" style:page-layout-name="pm1"/>
+  <style:master-page style:name="WithMargin" style:page-layout-name="pm2"/>
  </office:master-styles>
  <office:body>
   <office:text>
@@ -126,4 +134,4 @@
    </text:section>
   </office:text>
  </office:body>
-</office:document>
\ No newline at end of file
+</office:document>
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx 
b/sw/qa/extras/uiwriter/uiwriter.cxx
index 1fd0ac7cf713..b6913d4f6b53 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -383,6 +383,8 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testCopyPastePageBreak)
         SwDoc* pDoc = getSwDoc();
 
         SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+        CPPUNIT_ASSERT_EQUAL(tools::Long(5669), 
pWrtShell->GetLayout()->GetLower()->getFramePrintArea().Top());
+
         pWrtShell->SelAll();
         dispatchCommand(mxComponent, ".uno:Copy", {});
 
@@ -395,36 +397,46 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, 
testCopyPastePageBreak)
     SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
 
     CPPUNIT_ASSERT_EQUAL(1, getParagraphs());
-    CPPUNIT_ASSERT_EQUAL(OUString("Standard"), 
getProperty<OUString>(getParagraph(1), "PageDescName"));
+    CPPUNIT_ASSERT_EQUAL(OUString("WithMargin"), 
getProperty<OUString>(getParagraph(1), "PageDescName"));
     CPPUNIT_ASSERT_EQUAL(OUString("TargetSection"), 
pWrtShell->GetCurrSection()->GetSectionName());
+    // page style WithMargin is used
+    CPPUNIT_ASSERT_EQUAL(tools::Long(5669), 
pWrtShell->GetLayout()->GetLower()->getFramePrintArea().Top());
 
     dispatchCommand(mxComponent, ".uno:Paste", {});
 
     CPPUNIT_ASSERT_EQUAL(2, getParagraphs());
-    CPPUNIT_ASSERT_EQUAL(OUString("Standard"), 
getProperty<OUString>(getParagraph(1), "PageDescName"));
+    CPPUNIT_ASSERT_EQUAL(OUString("WithMargin"), 
getProperty<OUString>(getParagraph(1), "PageDescName"));
     CPPUNIT_ASSERT_EQUAL(size_t(2), pDoc->GetSections().size());
     CPPUNIT_ASSERT_EQUAL(OUString("SourceSection"), 
pWrtShell->GetCurrSection()->GetSectionName());
     // the problem was that there was a page break now
     CPPUNIT_ASSERT_EQUAL(1, getPages());
+    // page style WithMargin is used
+    CPPUNIT_ASSERT_EQUAL(tools::Long(5669), 
pWrtShell->GetLayout()->GetLower()->getFramePrintArea().Top());
 
     pWrtShell->Undo();
     CPPUNIT_ASSERT_EQUAL(1, getParagraphs());
-    CPPUNIT_ASSERT_EQUAL(OUString("Standard"), 
getProperty<OUString>(getParagraph(1), "PageDescName"));
+    CPPUNIT_ASSERT_EQUAL(OUString("WithMargin"), 
getProperty<OUString>(getParagraph(1), "PageDescName"));
     CPPUNIT_ASSERT_EQUAL(OUString("TargetSection"), 
pWrtShell->GetCurrSection()->GetSectionName());
     CPPUNIT_ASSERT_EQUAL(1, getPages());
+    // page style WithMargin is used
+    CPPUNIT_ASSERT_EQUAL(tools::Long(5669), 
pWrtShell->GetLayout()->GetLower()->getFramePrintArea().Top());
 
     pWrtShell->Redo();
     CPPUNIT_ASSERT_EQUAL(2, getParagraphs());
-    CPPUNIT_ASSERT_EQUAL(OUString("Standard"), 
getProperty<OUString>(getParagraph(1), "PageDescName"));
+    CPPUNIT_ASSERT_EQUAL(OUString("WithMargin"), 
getProperty<OUString>(getParagraph(1), "PageDescName"));
     CPPUNIT_ASSERT_EQUAL(size_t(2), pDoc->GetSections().size());
     CPPUNIT_ASSERT_EQUAL(OUString("SourceSection"), 
pWrtShell->GetCurrSection()->GetSectionName());
     CPPUNIT_ASSERT_EQUAL(1, getPages());
+    // page style WithMargin is used
+    CPPUNIT_ASSERT_EQUAL(tools::Long(5669), 
pWrtShell->GetLayout()->GetLower()->getFramePrintArea().Top());
 
     pWrtShell->Undo();
     CPPUNIT_ASSERT_EQUAL(1, getParagraphs());
-    CPPUNIT_ASSERT_EQUAL(OUString("Standard"), 
getProperty<OUString>(getParagraph(1), "PageDescName"));
+    CPPUNIT_ASSERT_EQUAL(OUString("WithMargin"), 
getProperty<OUString>(getParagraph(1), "PageDescName"));
     CPPUNIT_ASSERT_EQUAL(OUString("TargetSection"), 
pWrtShell->GetCurrSection()->GetSectionName());
     CPPUNIT_ASSERT_EQUAL(1, getPages());
+    // page style WithMargin is used
+    CPPUNIT_ASSERT_EQUAL(tools::Long(5669), 
pWrtShell->GetLayout()->GetLower()->getFramePrintArea().Top());
 }
 
 CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testBookmarkCopy)
diff --git a/sw/source/core/layout/pagechg.cxx 
b/sw/source/core/layout/pagechg.cxx
index f8c029ea12cd..6aad283273fc 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -56,6 +56,7 @@
 #include <tabfrm.hxx>
 #include <txtfrm.hxx>
 #include <notxtfrm.hxx>
+#include <sectfrm.hxx>
 #include <layact.hxx>
 #include <flyfrms.hxx>
 #include <htmltbl.hxx>
@@ -790,8 +791,11 @@ SwPageDesc *SwPageFrame::FindPageDesc()
     }
 
     SwContentFrame* pFirstContent = FindFirstBodyContent();
-    while (pFirstContent && pFirstContent->IsHiddenNow())
+    while (pFirstContent && pFirstContent->IsInSct()
+            && pFirstContent->FindSctFrame()->IsHiddenNow())
+    {
         pFirstContent = pFirstContent->GetNextContentFrame();
+    }
     SwFrame* pFlow = pFirstContent;
     if ( pFlow && pFlow->IsInTab() )
         pFlow = pFlow->FindTabFrame();
commit 74fb5db0c704752a75572efc85df6f7ef003fb8b
Author:     Michael Stahl <michael.st...@allotropia.de>
AuthorDate: Mon Mar 4 15:45:07 2024 +0100
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Mon Apr 15 12:36:24 2024 +0200

    sw: SelectAll of section with RES_PAGEDESC corner-case
    
    The main problem here is that if a document has a RES_PAGEDESC on its
    first body text node, and you paste a section whose first text node also
    has a RES_PAGEDESC, the result inevitably has a page break that wasn't
    there before, and which is unwanted.
    
    SwEditShell::CopySelToDoc() needs a change to include the end node of a
    section at the start, so it is copied.
    
    Change CopyImplImpl() to insert a non-textnode *before* a text node at
    the insert position, instead of after it.  This simplifies the
    implementation: only SwFEShell::Paste() needs to care about removing an
    empty trailing paragraph, but SwEditShell::CopySelToDoc() needs no
    changes; both functions would need to delete the empty paragraph when
    inserting after.
    
    Several tests such as CppunitTest_sw_ooxmlexport3 testCrashWhileSave
    fail because of this, which can be solved by removing the DelFullPara()
    call in SwXText::copyText() that is now unnecessary.
    
    Generalise and simplify the "bAfterTable" code in CopyImplImpl(): it
    doesn't really matter what is before the insert position, what matters
    is if the pasted text starts with a table or section.
    
    Also, the fly-anchor-correction code (both here and in
    SwUndoInserts::RedoImpl()) needs to move to the first text node also in
    case a section was inserted (but the equal-looking code *before*
    inserting remains as is!), in the situation where the last node will be
    deleted.
    
    Now there are some test failures:
    
      unowriter.cxx:430:Assertion
      Test name: (anonymous 
namespace)::testSectionAnchorCopyTableAtStart::TestBody
      equality assertion failed
      - Expected: quux
      foo
      bar
      - Actual  : quux
      foo
    
    This is because the end position was created from SwNodeIndex aInsPos
    only, it needs to take also the aDestIdx from the "if (pEndTextNd)"
    branch.
    
      testTdf134250::TestBody finished in: 867ms
      uiwriter2.cxx:462:Assertion
      Test name: testTdf134250::TestBody
      equality assertion failed
      - Expected: 1
      - Actual  : 2
    
    The section is pasted now, so there are 2.
    
      uiwriter3.cxx:1519:Assertion
      Test name: testTdf135733::TestBody
      equality assertion failed
      - Expected: 1
      - Actual  : 2
    
    Table is now inserted before the first paragraph, which has a
    RES_PAGEDESC.
    
    (presumably regression from commit 9667e5ffd18d6167344e102b89a393bc981644ec)
    
    Change-Id: I820e381113fee90a81249afbc2280bfc3ddb7647
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164401
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>
    (cherry picked from commit fcd4222d36e1864452163e5c94976eea353bbaf0)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164741
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sw/qa/extras/uiwriter/data/pagebreak-source.fodt 
b/sw/qa/extras/uiwriter/data/pagebreak-source.fodt
new file mode 100644
index 000000000000..e09c1b447cfd
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/pagebreak-source.fodt
@@ -0,0 +1,123 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<office:document xmlns:officeooo="http://openoffice.org/2009/office"; 
xmlns:css3t="http://www.w3.org/TR/css3-text/"; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#"; 
xmlns:xhtml="http://www.w3.org/1999/xhtml"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" 
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:xlink="http://www.w3.org/1999/xlink"; 
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:dc="http://purl.org/dc/eleme
 nts/1.1/" xmlns:ooo="http://openoffice.org/2004/office"; 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0"
 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 xmlns:drawooo="http://openoffice.org/2010/draw"; 
xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" 
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:ooow="http://openoffice.org/2004/writer"; 
xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:tableooo="http://openoffice.org/2009/table"; 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" 
xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0
 " xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:xforms="http://www.w3.org/2002/xforms"; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.text">
+ 
<office:meta><meta:creation-date>2024-03-05T16:51:41.526594818</meta:creation-date><dc:date>2024-03-05T17:24:50.151189313</dc:date><meta:editing-duration>PT24M14S</meta:editing-duration><meta:editing-cycles>5</meta:editing-cycles><meta:generator>CIB_OfficeDev/6.4.0.24$Linux_X86_64
 
LibreOffice_project/2b8ce275a2d1aae9319dfc266e677412b611101d</meta:generator><meta:document-statistic
 meta:table-count="0" meta:image-count="0" meta:object-count="0" 
meta:page-count="1" meta:paragraph-count="0" meta:word-count="0" 
meta:character-count="0" meta:non-whitespace-character-count="0"/></office:meta>
+ <office:font-face-decls>
+  <style:font-face style:name="Liberation Serif" svg:font-family="'Liberation 
Serif'" style:font-family-generic="roman" style:font-pitch="variable"/>
+  <style:font-face style:name="Noto Sans Devanagari" svg:font-family="'Noto 
Sans Devanagari'" style:font-family-generic="system" 
style:font-pitch="variable"/>
+  <style:font-face style:name="Noto Serif CJK SC" svg:font-family="'Noto Serif 
CJK SC'" style:font-family-generic="system" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+  <style:default-style style:family="graphic">
+   <style:graphic-properties svg:stroke-color="#3465a4" 
draw:fill-color="#729fcf" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" 
draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" 
draw:start-line-spacing-vertical="0.283cm" 
draw:end-line-spacing-horizontal="0.283cm" 
draw:end-line-spacing-vertical="0.283cm" style:flow-with-text="false"/>
+   <style:paragraph-properties style:text-autospace="ideograph-alpha" 
style:line-break="strict" style:font-independent-line-spacing="false">
+    <style:tab-stops/>
+   </style:paragraph-properties>
+   <style:text-properties style:use-window-font-color="true" 
style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="de" 
fo:country="DE" style:letter-kerning="true" style:font-name-asian="Noto Serif 
CJK SC" style:font-size-asian="10.5pt" style:language-asian="zh" 
style:country-asian="CN" style:font-name-complex="Noto Sans Devanagari" 
style:font-size-complex="12pt" style:language-complex="hi" 
style:country-complex="IN"/>
+  </style:default-style>
+  <style:default-style style:family="paragraph">
+   <style:paragraph-properties fo:orphans="2" fo:widows="2" 
fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" 
style:punctuation-wrap="hanging" style:line-break="strict" 
style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+   <style:text-properties style:use-window-font-color="true" 
style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="de" 
fo:country="DE" style:letter-kerning="true" style:font-name-asian="Noto Serif 
CJK SC" style:font-size-asian="10.5pt" style:language-asian="zh" 
style:country-asian="CN" style:font-name-complex="Noto Sans Devanagari" 
style:font-size-complex="12pt" style:language-complex="hi" 
style:country-complex="IN" fo:hyphenate="false" 
fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" 
loext:hyphenation-no-caps="false"/>
+  </style:default-style>
+  <style:default-style style:family="table">
+   <style:table-properties table:border-model="collapsing"/>
+  </style:default-style>
+  <style:default-style style:family="table-row">
+   <style:table-row-properties fo:keep-together="auto"/>
+  </style:default-style>
+  <style:style style:name="Standard" style:family="paragraph" 
style:class="text"/>
+  <text:outline-style style:name="Outline">
+   <text:outline-level-style text:level="1" style:num-format="">
+    <style:list-level-properties 
text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab"/>
+    </style:list-level-properties>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="2" style:num-format="">
+    <style:list-level-properties 
text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab"/>
+    </style:list-level-properties>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="3" style:num-format="">
+    <style:list-level-properties 
text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab"/>
+    </style:list-level-properties>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="4" style:num-format="">
+    <style:list-level-properties 
text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab"/>
+    </style:list-level-properties>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="5" style:num-format="">
+    <style:list-level-properties 
text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab"/>
+    </style:list-level-properties>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="6" style:num-format="">
+    <style:list-level-properties 
text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab"/>
+    </style:list-level-properties>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="7" style:num-format="">
+    <style:list-level-properties 
text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab"/>
+    </style:list-level-properties>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="8" style:num-format="">
+    <style:list-level-properties 
text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab"/>
+    </style:list-level-properties>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="9" style:num-format="">
+    <style:list-level-properties 
text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab"/>
+    </style:list-level-properties>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="10" style:num-format="">
+    <style:list-level-properties 
text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab"/>
+    </style:list-level-properties>
+   </text:outline-level-style>
+  </text:outline-style>
+  <text:notes-configuration text:note-class="footnote" style:num-format="1" 
text:start-value="0" text:footnotes-position="page" 
text:start-numbering-at="document"/>
+  <text:notes-configuration text:note-class="endnote" style:num-format="i" 
text:start-value="0"/>
+  <text:linenumbering-configuration text:number-lines="false" 
text:offset="0.499cm" style:num-format="1" text:number-position="left" 
text:increment="5"/>
+ </office:styles>
+ <office:automatic-styles>
+  <style:style style:name="P2" style:family="paragraph" 
style:parent-style-name="Standard">
+   <style:text-properties/>
+  </style:style>
+  <style:style style:name="P3" style:family="paragraph" 
style:parent-style-name="Standard" style:master-page-name="Standard">
+   <style:paragraph-properties style:page-number="auto"/>
+  </style:style>
+  <style:style style:name="Sect1" style:family="section">
+   <style:section-properties fo:background-color="transparent" 
style:editable="false">
+    <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+    <style:background-image/>
+   </style:section-properties>
+  </style:style>
+  <style:page-layout style:name="pm1">
+   <style:page-layout-properties fo:page-width="21.001cm" 
fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" 
fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" 
fo:margin-right="2cm" style:writing-mode="lr-tb" 
style:layout-grid-color="#c0c0c0" style:layout-grid-lines="20" 
style:layout-grid-base-height="0.706cm" style:layout-grid-ruby-height="0.353cm" 
style:layout-grid-mode="none" style:layout-grid-ruby-below="false" 
style:layout-grid-print="false" style:layout-grid-display="false" 
style:footnote-max-height="0cm">
+    <style:footnote-sep style:width="0.018cm" 
style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" 
style:line-style="solid" style:adjustment="left" style:rel-width="25%" 
style:color="#000000"/>
+   </style:page-layout-properties>
+   <style:header-style/>
+   <style:footer-style/>
+  </style:page-layout>
+ </office:automatic-styles>
+ <office:master-styles>
+  <style:master-page style:name="Standard" style:page-layout-name="pm1"/>
+ </office:master-styles>
+ <office:body>
+  <office:text>
+   <text:sequence-decls>
+    <text:sequence-decl text:display-outline-level="0" 
text:name="Illustration"/>
+    <text:sequence-decl text:display-outline-level="0" text:name="Table"/>
+    <text:sequence-decl text:display-outline-level="0" text:name="Text"/>
+    <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
+    <text:sequence-decl text:display-outline-level="0" text:name="Figure"/>
+   </text:sequence-decls>
+   <text:section text:style-name="Sect1" text:name="SourceSection">
+    <text:p text:style-name="P3"><text:hidden-paragraph 
text:condition="ooow:TRUE" text:is-hidden="true"/></text:p>
+    <text:p text:style-name="P2"/>
+   </text:section>
+  </office:text>
+ </office:body>
+</office:document>
\ No newline at end of file
diff --git a/sw/qa/extras/uiwriter/data/pagebreak-target.fodt 
b/sw/qa/extras/uiwriter/data/pagebreak-target.fodt
new file mode 100644
index 000000000000..f059e33f1514
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/pagebreak-target.fodt
@@ -0,0 +1,129 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<office:document xmlns:officeooo="http://openoffice.org/2009/office"; 
xmlns:css3t="http://www.w3.org/TR/css3-text/"; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#"; 
xmlns:xhtml="http://www.w3.org/1999/xhtml"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" 
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:xlink="http://www.w3.org/1999/xlink"; 
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:dc="http://purl.org/dc/eleme
 nts/1.1/" xmlns:ooo="http://openoffice.org/2004/office"; 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0"
 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 xmlns:drawooo="http://openoffice.org/2010/draw"; 
xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" 
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:ooow="http://openoffice.org/2004/writer"; 
xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:tableooo="http://openoffice.org/2009/table"; 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" 
xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0
 " xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:xforms="http://www.w3.org/2002/xforms"; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.text">
+ 
<office:meta><meta:creation-date>2024-03-05T16:57:01.179149401</meta:creation-date><dc:date>2024-03-05T16:58:35.972978544</dc:date><meta:editing-duration>PT1M35S</meta:editing-duration><meta:editing-cycles>2</meta:editing-cycles><meta:generator>CIB_OfficeDev/6.4.0.24$Linux_X86_64
 
LibreOffice_project/2b8ce275a2d1aae9319dfc266e677412b611101d</meta:generator><meta:document-statistic
 meta:table-count="0" meta:image-count="0" meta:object-count="0" 
meta:page-count="1" meta:paragraph-count="0" meta:word-count="0" 
meta:character-count="0" meta:non-whitespace-character-count="0"/></office:meta>
+ <office:font-face-decls>
+  <style:font-face style:name="Liberation Serif" svg:font-family="'Liberation 
Serif'" style:font-family-generic="roman" style:font-pitch="variable"/>
+  <style:font-face style:name="Noto Sans Devanagari" svg:font-family="'Noto 
Sans Devanagari'" style:font-family-generic="system" 
style:font-pitch="variable"/>
+  <style:font-face style:name="Noto Serif CJK SC" svg:font-family="'Noto Serif 
CJK SC'" style:font-family-generic="system" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+  <style:default-style style:family="graphic">
+   <style:graphic-properties svg:stroke-color="#3465a4" 
draw:fill-color="#729fcf" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" 
draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" 
draw:start-line-spacing-vertical="0.283cm" 
draw:end-line-spacing-horizontal="0.283cm" 
draw:end-line-spacing-vertical="0.283cm" style:flow-with-text="false"/>
+   <style:paragraph-properties style:text-autospace="ideograph-alpha" 
style:line-break="strict" style:writing-mode="lr-tb" 
style:font-independent-line-spacing="false">
+    <style:tab-stops/>
+   </style:paragraph-properties>
+   <style:text-properties style:use-window-font-color="true" 
style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="de" 
fo:country="DE" style:letter-kerning="true" style:font-name-asian="Noto Serif 
CJK SC" style:font-size-asian="10.5pt" style:language-asian="zh" 
style:country-asian="CN" style:font-name-complex="Noto Sans Devanagari" 
style:font-size-complex="12pt" style:language-complex="hi" 
style:country-complex="IN"/>
+  </style:default-style>
+  <style:default-style style:family="paragraph">
+   <style:paragraph-properties fo:orphans="2" fo:widows="2" 
fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" 
style:punctuation-wrap="hanging" style:line-break="strict" 
style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+   <style:text-properties style:use-window-font-color="true" 
style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="de" 
fo:country="DE" style:letter-kerning="true" style:font-name-asian="Noto Serif 
CJK SC" style:font-size-asian="10.5pt" style:language-asian="zh" 
style:country-asian="CN" style:font-name-complex="Noto Sans Devanagari" 
style:font-size-complex="12pt" style:language-complex="hi" 
style:country-complex="IN" fo:hyphenate="false" 
fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" 
loext:hyphenation-no-caps="false"/>
+  </style:default-style>
+  <style:default-style style:family="table">
+   <style:table-properties table:border-model="collapsing"/>
+  </style:default-style>
+  <style:default-style style:family="table-row">
+   <style:table-row-properties fo:keep-together="auto"/>
+  </style:default-style>
+  <style:style style:name="Standard" style:family="paragraph" 
style:class="text"/>
+  <style:style style:name="Frame_20_contents" style:display-name="Frame 
contents" style:family="paragraph" style:parent-style-name="Standard" 
style:class="extra"/>
+  <style:style style:name="Frame" style:family="graphic">
+   <style:graphic-properties text:anchor-type="paragraph" svg:x="0cm" 
svg:y="0cm" fo:margin-left="0.201cm" fo:margin-right="0.201cm" 
fo:margin-top="0.201cm" fo:margin-bottom="0.201cm" style:wrap="parallel" 
style:number-wrapped-paragraphs="no-limit" style:wrap-contour="false" 
style:vertical-pos="top" style:vertical-rel="paragraph-content" 
style:horizontal-pos="center" style:horizontal-rel="paragraph-content" 
fo:padding="0.15cm" fo:border="0.06pt solid #000000"/>
+  </style:style>
+  <text:outline-style style:name="Outline">
+   <text:outline-level-style text:level="1" style:num-format="">
+    <style:list-level-properties 
text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab"/>
+    </style:list-level-properties>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="2" style:num-format="">
+    <style:list-level-properties 
text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab"/>
+    </style:list-level-properties>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="3" style:num-format="">
+    <style:list-level-properties 
text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab"/>
+    </style:list-level-properties>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="4" style:num-format="">
+    <style:list-level-properties 
text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab"/>
+    </style:list-level-properties>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="5" style:num-format="">
+    <style:list-level-properties 
text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab"/>
+    </style:list-level-properties>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="6" style:num-format="">
+    <style:list-level-properties 
text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab"/>
+    </style:list-level-properties>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="7" style:num-format="">
+    <style:list-level-properties 
text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab"/>
+    </style:list-level-properties>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="8" style:num-format="">
+    <style:list-level-properties 
text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab"/>
+    </style:list-level-properties>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="9" style:num-format="">
+    <style:list-level-properties 
text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab"/>
+    </style:list-level-properties>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="10" style:num-format="">
+    <style:list-level-properties 
text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab"/>
+    </style:list-level-properties>
+   </text:outline-level-style>
+  </text:outline-style>
+  <text:notes-configuration text:note-class="footnote" style:num-format="1" 
text:start-value="0" text:footnotes-position="page" 
text:start-numbering-at="document"/>
+  <text:notes-configuration text:note-class="endnote" style:num-format="i" 
text:start-value="0"/>
+  <text:linenumbering-configuration text:number-lines="false" 
text:offset="0.499cm" style:num-format="1" text:number-position="left" 
text:increment="5"/>
+ </office:styles>
+ <office:automatic-styles>
+  <style:style style:name="P1" style:family="paragraph" 
style:parent-style-name="Standard" style:master-page-name="Standard">
+   <style:paragraph-properties style:page-number="auto"/>
+  </style:style>
+  <style:style style:name="fr1" style:family="graphic" 
style:parent-style-name="Frame">
+   <style:graphic-properties style:vertical-pos="top" 
style:vertical-rel="page-content" style:horizontal-pos="center" 
style:horizontal-rel="page"/>
+  </style:style>
+  <style:style style:name="Sect1" style:family="section">
+   <style:section-properties style:editable="false">
+    <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+   </style:section-properties>
+  </style:style>
+  <style:page-layout style:name="pm1">
+   <style:page-layout-properties fo:page-width="21.001cm" 
fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" 
fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" 
fo:margin-right="2cm" style:writing-mode="lr-tb" 
style:footnote-max-height="0cm">
+    <style:footnote-sep style:width="0.018cm" 
style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" 
style:line-style="solid" style:adjustment="left" style:rel-width="25%" 
style:color="#000000"/>
+   </style:page-layout-properties>
+   <style:header-style/>
+   <style:footer-style/>
+  </style:page-layout>
+ </office:automatic-styles>
+ <office:master-styles>
+  <style:master-page style:name="Standard" style:page-layout-name="pm1"/>
+ </office:master-styles>
+ <office:body>
+  <office:text>
+   <text:sequence-decls>
+    <text:sequence-decl text:display-outline-level="0" 
text:name="Illustration"/>
+    <text:sequence-decl text:display-outline-level="0" text:name="Table"/>
+    <text:sequence-decl text:display-outline-level="0" text:name="Text"/>
+    <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
+    <text:sequence-decl text:display-outline-level="0" text:name="Figure"/>
+   </text:sequence-decls><draw:frame draw:style-name="fr1" draw:name="Frame1" 
text:anchor-type="page" text:anchor-page-number="1" svg:width="2cm" 
draw:z-index="0">
+    <draw:text-box fo:min-height="0.499cm">
+     <text:p text:style-name="Frame_20_contents"/>
+    </draw:text-box>
+   </draw:frame>
+   <text:section text:style-name="Sect1" text:name="TargetSection">
+    <text:p text:style-name="P1"/>
+   </text:section>
+  </office:text>
+ </office:body>
+</office:document>
\ No newline at end of file
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx 
b/sw/qa/extras/uiwriter/uiwriter.cxx
index 21b7358c3df8..1fd0ac7cf713 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -318,6 +318,115 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTdf149548)
     dispatchCommand(mxComponent, ".uno:Paste", {});
 }
 
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testPasteTableAtFlyAnchor)
+{
+    createSwDoc();
+    SwDoc* pDoc = getSwDoc();
+    SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+    SwFormatAnchor anchor(RndStdIds::FLY_AT_CHAR);
+    anchor.SetAnchor(pWrtShell->GetCursor()->GetPoint());
+    SfxItemSet flySet(pDoc->GetAttrPool(), svl::Items<RES_ANCHOR, RES_ANCHOR>);
+    flySet.Put(anchor);
+    SwFlyFrameFormat const* pFly = dynamic_cast<SwFlyFrameFormat const*>(
+            pWrtShell->NewFlyFrame(flySet, /*bAnchValid=*/true));
+    CPPUNIT_ASSERT(pFly != nullptr);
+    CPPUNIT_ASSERT(pFly->GetFrame() != nullptr);
+    pWrtShell->SelFlyGrabCursor();
+    pWrtShell->GetDrawView()->UnmarkAll();
+    CPPUNIT_ASSERT(pWrtShell->GetCurrFlyFrame() != nullptr);
+
+    // insert table in fly
+    SwInsertTableOptions tableOpt(SwInsertTableFlags::DefaultBorder, 0);
+    pWrtShell->InsertTable(tableOpt, 2, 2);
+
+    // select table
+    pWrtShell->SelAll();
+
+    dispatchCommand(mxComponent, ".uno:Copy", {});
+
+    // move cursor back to body
+    pWrtShell->ClearMark();
+    pWrtShell->SttEndDoc(/*bStt=*/true);
+    CPPUNIT_ASSERT(!pWrtShell->GetCurrFlyFrame());
+
+    dispatchCommand(mxComponent, ".uno:Paste", {});
+
+    pWrtShell->SttEndDoc(/*bStt=*/true);
+    CPPUNIT_ASSERT(pWrtShell->IsCursorInTable());
+    
CPPUNIT_ASSERT(!pFly->GetAnchor().GetContentAnchor()->GetNode().FindTableNode());
+
+    pWrtShell->Undo();
+
+    pWrtShell->SttEndDoc(/*bStt=*/true);
+    CPPUNIT_ASSERT(!pWrtShell->IsCursorInTable());
+    
CPPUNIT_ASSERT(!pFly->GetAnchor().GetContentAnchor()->GetNode().FindTableNode());
+
+    // the problem was that Redo moved the fly anchor into the first table cell
+    pWrtShell->Redo();
+
+    pWrtShell->SttEndDoc(/*bStt=*/true);
+    CPPUNIT_ASSERT(pWrtShell->IsCursorInTable());
+    
CPPUNIT_ASSERT(!pFly->GetAnchor().GetContentAnchor()->GetNode().FindTableNode());
+
+    pWrtShell->Undo();
+
+    pWrtShell->SttEndDoc(/*bStt=*/true);
+    CPPUNIT_ASSERT(!pWrtShell->IsCursorInTable());
+    
CPPUNIT_ASSERT(!pFly->GetAnchor().GetContentAnchor()->GetNode().FindTableNode());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testCopyPastePageBreak)
+{
+    {
+        createSwDoc("pagebreak-source.fodt");
+        SwDoc* pDoc = getSwDoc();
+
+        SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+        pWrtShell->SelAll();
+        dispatchCommand(mxComponent, ".uno:Copy", {});
+
+        mxComponent->dispose();
+        mxComponent.clear();
+    }
+
+    createSwDoc("pagebreak-target.fodt");
+    SwDoc* pDoc = getSwDoc();
+    SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+    CPPUNIT_ASSERT_EQUAL(1, getParagraphs());
+    CPPUNIT_ASSERT_EQUAL(OUString("Standard"), 
getProperty<OUString>(getParagraph(1), "PageDescName"));
+    CPPUNIT_ASSERT_EQUAL(OUString("TargetSection"), 
pWrtShell->GetCurrSection()->GetSectionName());
+
+    dispatchCommand(mxComponent, ".uno:Paste", {});
+
+    CPPUNIT_ASSERT_EQUAL(2, getParagraphs());
+    CPPUNIT_ASSERT_EQUAL(OUString("Standard"), 
getProperty<OUString>(getParagraph(1), "PageDescName"));
+    CPPUNIT_ASSERT_EQUAL(size_t(2), pDoc->GetSections().size());
+    CPPUNIT_ASSERT_EQUAL(OUString("SourceSection"), 
pWrtShell->GetCurrSection()->GetSectionName());
+    // the problem was that there was a page break now
+    CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+    pWrtShell->Undo();
+    CPPUNIT_ASSERT_EQUAL(1, getParagraphs());
+    CPPUNIT_ASSERT_EQUAL(OUString("Standard"), 
getProperty<OUString>(getParagraph(1), "PageDescName"));
+    CPPUNIT_ASSERT_EQUAL(OUString("TargetSection"), 
pWrtShell->GetCurrSection()->GetSectionName());
+    CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+    pWrtShell->Redo();
+    CPPUNIT_ASSERT_EQUAL(2, getParagraphs());
+    CPPUNIT_ASSERT_EQUAL(OUString("Standard"), 
getProperty<OUString>(getParagraph(1), "PageDescName"));
+    CPPUNIT_ASSERT_EQUAL(size_t(2), pDoc->GetSections().size());
+    CPPUNIT_ASSERT_EQUAL(OUString("SourceSection"), 
pWrtShell->GetCurrSection()->GetSectionName());
+    CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+    pWrtShell->Undo();
+    CPPUNIT_ASSERT_EQUAL(1, getParagraphs());
+    CPPUNIT_ASSERT_EQUAL(OUString("Standard"), 
getProperty<OUString>(getParagraph(1), "PageDescName"));
+    CPPUNIT_ASSERT_EQUAL(OUString("TargetSection"), 
pWrtShell->GetCurrSection()->GetSectionName());
+    CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
 CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testBookmarkCopy)
 {
     createSwDoc();
diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx 
b/sw/qa/extras/uiwriter/uiwriter2.cxx
index af519544877e..15852718f463 100644
--- a/sw/qa/extras/uiwriter/uiwriter2.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter2.cxx
@@ -459,7 +459,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf134250)
     dispatchCommand(mxComponent, ".uno:Paste", {});
 
     CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
-    CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSections->getCount());
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xSections->getCount());
 
     // this would crash in 2 different ways
     dispatchCommand(mxComponent, ".uno:Undo", {});
@@ -474,7 +474,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf134250)
     dispatchCommand(mxComponent, ".uno:Redo", {});
 
     CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
-    CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSections->getCount());
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xSections->getCount());
 
     dispatchCommand(mxComponent, ".uno:Undo", {});
 
@@ -486,7 +486,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf134250)
     dispatchCommand(mxComponent, ".uno:Redo", {});
 
     CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
-    CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSections->getCount());
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xSections->getCount());
 }
 
 CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf134436)
diff --git a/sw/qa/extras/uiwriter/uiwriter3.cxx 
b/sw/qa/extras/uiwriter/uiwriter3.cxx
index 3027c65855ed..f705e881f1dd 100644
--- a/sw/qa/extras/uiwriter/uiwriter3.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter3.cxx
@@ -1516,7 +1516,8 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf135733)
     dispatchCommand(mxComponent, ".uno:Paste", {});
 
     CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xIndexAccess->getCount());
-    CPPUNIT_ASSERT_EQUAL(1, getPages());
+    // the table is inserted before the first paragraph, which has a pagedesc
+    CPPUNIT_ASSERT_EQUAL(2, getPages());
     CPPUNIT_ASSERT_EQUAL(2, getShapes());
 
     dispatchCommand(mxComponent, ".uno:Undo", {});
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx 
b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index 57b8e58310d9..000f5b4c39af 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -29,6 +29,7 @@
 #include <IDocumentSettingAccess.hxx>
 #include <UndoManager.hxx>
 #include <docary.hxx>
+#include <pamtyp.hxx>
 #include <textboxhelper.hxx>
 #include <dcontact.hxx>
 #include <grfatr.hxx>
@@ -5065,16 +5066,14 @@ bool 
DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo
     // Move the PaM one node back from the insert position, so that
     // the position doesn't get moved
     pCopyPam->SetMark();
-    bool bCanMoveBack = pCopyPam->Move(fnMoveBackward, GoInContent);
-    // If the position was shifted from more than one node, an end node has 
been skipped
-    bool bAfterTable = false;
-    if ((rPos.GetNodeIndex() - pCopyPam->GetPoint()->GetNodeIndex()) > 
SwNodeOffset(1))
+    bool bCanMoveBack = false;
+    // First check if it will be able to move *to* first copied node.
+    // Note this doesn't just check IsStartNode() because SwDoc::AppendDoc()
+    // intentionally sets it to the body start node, perhaps it should just
+    // call SplitNode instead?
+    if (!pStt->GetNode().IsSectionNode() && !pStt->GetNode().IsTableNode())
     {
-        // First go back to the original place
-        *(pCopyPam->GetPoint()) = rPos;
-
-        bCanMoveBack = false;
-        bAfterTable = true;
+        bCanMoveBack = pCopyPam->Move(fnMoveBackward, GoInContent);
     }
     if( !bCanMoveBack )
     {
@@ -5084,6 +5083,7 @@ bool 
DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo
 
     SwNodeRange aRg( pStt->GetNode(), pEnd->GetNode() );
     SwNodeIndex aInsPos( rPos.GetNode() );
+    ::std::optional<SwContentIndex> oInsContentIndex;
     const bool bOneNode = pStt->GetNode() == pEnd->GetNode();
     SwTextNode* pSttTextNd = pStt->GetNode().GetTextNode();
     SwTextNode* pEndTextNd = pEnd->GetNode().GetTextNode();
@@ -5236,8 +5236,8 @@ bool 
DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo
             // We have to set the correct PaM for Undo, if this PaM starts in 
a textnode,
             // the undo operation will try to merge this node after removing 
the table.
             // If we didn't split a textnode, the PaM should start at the 
inserted table node
-            if( rPos.GetContentIndex() == pDestTextNd->Len() )
-            {    // Insertion at the last position of a textnode (empty or not)
+            if (pDestTextNd->Len() && rPos.GetContentIndex() == 
pDestTextNd->Len())
+            {   // Insertion at the last position of a textnode
                 ++aInsPos; // The table will be inserted behind the text node
             }
             else if( rPos.GetContentIndex() )
@@ -5269,27 +5269,18 @@ bool 
DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo
                     --aRg.aEnd;
                 }
             }
-            else if( bCanMoveBack )
-            {   // Insertion at the first position of a text node. It will not 
be split, the table
-                // will be inserted before the text node.
-                // See below, before the SetInsertRange function of the undo 
object will be called,
-                // the CpyPam would be moved to the next content position. 
This has to be avoided
-                // We want to be moved to the table node itself thus we have 
to set bCanMoveBack
-                // and to manipulate pCopyPam.
-                bCanMoveBack = false;
-                pCopyPam->GetPoint()->Adjust(SwNodeOffset(-1));
-            }
+            assert(!bCanMoveBack);
         }
 
         pDestTextNd = aInsPos.GetNode().GetTextNode();
         if (pEndTextNd)
         {
-            SwContentIndex aDestIdx( aInsPos.GetNode().GetContentNode(), 
rPos.GetContentIndex() );
+            oInsContentIndex.emplace(aInsPos.GetNode().GetContentNode(), 
rPos.GetContentIndex());
             if( !pDestTextNd )
             {
                 pDestTextNd = rDoc.GetNodes().MakeTextNode( aInsPos.GetNode(),
                             
rDoc.getIDocumentStylePoolAccess().GetTextCollFromPool(RES_POOLCOLL_STANDARD));
-                aDestIdx.Assign( pDestTextNd, 0  );
+                oInsContentIndex->Assign(pDestTextNd, 0);
                 --aInsPos;
 
                 // if we have to insert an extra text node
@@ -5307,8 +5298,8 @@ bool 
DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo
                 PUSH_NUMRULE_STATE
             }
 
-            pEndTextNd->CopyText( pDestTextNd, aDestIdx, SwContentIndex( 
pEndTextNd ),
-                            pEnd->GetContentIndex() );
+            pEndTextNd->CopyText(pDestTextNd, *oInsContentIndex,
+                    SwContentIndex(pEndTextNd), pEnd->GetContentIndex());
 
             // Also copy all format templates
             if( bCopyCollFormat && ( bOneNode || bEmptyDestNd ))
@@ -5360,20 +5351,29 @@ bool 
DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo
             bCopyBookmarks = false;
         }
 
+
+        // init *again* - because CopyWithFlyInFly moved startPos
+        SwPosition startPos(pCopyPam->GetPoint()->GetNode(), SwNodeOffset(+1));
         // at-char anchors post SplitNode are on index 0 of 2nd node and will
         // remain there - move them back to the start (end would also work?)
         // ... also for at-para anchors; here start is preferable because
         // it's consistent with SplitNode from SwUndoInserts::RedoImpl()
-        if (pFlysAtInsPos)
+        if (pFlysAtInsPos
+            && (bCanMoveBack
+                || startPos.GetNode().IsTextNode()
+                || (pCopyPam->GetPoint()->GetNode().IsStartNode()
+                     && startPos.GetNode().IsSectionNode()))) // not into table
         {
-            // init *again* - because CopyWithFlyInFly moved startPos
-            SwPosition startPos(pCopyPam->GetPoint()->GetNode(), 
SwNodeOffset(+1));
             if (bCanMoveBack)
             {   // pCopyPam is actually 1 before the copy range so move it fwd
                 SwPaM temp(*pCopyPam->GetPoint());
                 temp.Move(fnMoveForward, GoInContent);
                 startPos = *temp.GetPoint();
             }
+            else if (startPos.GetNode().IsSectionNode())
+            {   // probably on top-level start node, so no CheckNodesRange 
here;
+                GoNextPos(&startPos, false); // SwFEShell::Paste() deletes node
+            }
             assert(startPos.GetNode().IsContentNode());
             SwPosition startPosAtPara(startPos);
             startPosAtPara.nContent.Assign(nullptr, 0);
@@ -5456,26 +5456,31 @@ bool 
DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo
         }
         else // incremented in (!pSttTextNd && pDestTextNd) above
         {
-            pCopyPam->GetMark()->Assign(aInsPos);
+            // assign also content index in this case, see 
testSectionAnchorCopyTableAtStart
+            assert(oInsContentIndex);
+            assert(oInsContentIndex->GetContentNode() == &aInsPos.GetNode());
+            pCopyPam->GetMark()->Assign(aInsPos, oInsContentIndex->GetIndex());
         }
         rPos = *pCopyPam->GetMark();
     }
     else
         *pCopyPam->GetMark() = rPos;
 
-    if ( !bAfterTable )
-        pCopyPam->Move( fnMoveForward, bCanMoveBack ? GoInContent : GoInNode );
+    if (bCanMoveBack)
+    {
+        pCopyPam->Move(fnMoveForward, GoInContent);
+    }
     else
     {
         // Reset the offset to 0 as it was before the insertion
         pCopyPam->GetPoint()->Adjust(SwNodeOffset(+1));
 
-        // If the next node is a start node, then step back: the start node
-        // has been copied and needs to be in the selection for the undo
+        // If the next node is a start node, then step back: SetInsertRange()
+        // will add 1 in this case, but that is too much...
         if (pCopyPam->GetPoint()->GetNode().IsStartNode())
             pCopyPam->GetPoint()->Adjust(SwNodeOffset(-1));
-
     }
+    oInsContentIndex.reset();
     pCopyPam->Exchange();
 
     // Also copy all bookmarks
diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx
index 3506dff2300b..850dc5a82708 100644
--- a/sw/source/core/docnode/nodes.cxx
+++ b/sw/source/core/docnode/nodes.cxx
@@ -1862,7 +1862,7 @@ void SwNodes::CopyNodes( const SwNodeRange& rRange,
             // If the end of the section is outside the copy range,
             // the section node will skipped, not copied!
             // If someone want to change this behaviour, he has to adjust the 
function
-            // lcl_NonCopyCount(..) in ndcopy.cxx which relies on it.
+            // lcl_NonCopyCount() which relies on it.
             if( pCurrentNode->EndOfSectionIndex() < aRg.aEnd.GetIndex() )
             {
                 // copy of the whole section, so create a new SectionNode
diff --git a/sw/source/core/edit/edglss.cxx b/sw/source/core/edit/edglss.cxx
index 80310bab4f47..b5dc871a6ed2 100644
--- a/sw/source/core/edit/edglss.cxx
+++ b/sw/source/core/edit/edglss.cxx
@@ -229,6 +229,14 @@ bool SwEditShell::CopySelToDoc( SwDoc& rInsDoc )
                         // but we want to copy the table and the start node 
before
                         // the first cell as well.
                         aPaM.Start()->Assign(*oSelectAll->first);
+                        if (SwSectionNode const* pSection = 
oSelectAll->first->GetSectionNode())
+                        {
+                            if (aPaM.End()->GetNodeIndex() < 
pSection->EndOfSectionIndex())
+                            {
+                                // include section end so that section is 
copied
+                                
aPaM.End()->Assign(*oSelectAll->first->GetNodes()[pSection->EndOfSectionIndex() 
+ 1]);
+                            }
+                        }
                     }
                     bRet = 
GetDoc()->getIDocumentContentOperations().CopyRange( aPaM, aPos, 
SwCopyFlags::CheckPosInFly)
                         || bRet;
diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx
index 1d8b0ef68065..69fae8bf0ae0 100644
--- a/sw/source/core/frmedt/fecopy.cxx
+++ b/sw/source/core/frmedt/fecopy.cxx
@@ -1088,9 +1088,24 @@ bool SwFEShell::Paste(SwDoc& rClpDoc, bool bNestedTable)
 
                     --aIndexBefore;
 
+                    // copying to the clipboard, the section is inserted
+                    // at the start of the nodes, followed by empty text node
+                    bool const 
isSourceSection(aCpyPam.Start()->GetNode().IsSectionNode()
+                        && aCpyPam.End()->GetNodeIndex() == 
aCpyPam.Start()->GetNode().EndOfSectionIndex() + 1
+                        && aCpyPam.End()->GetNode().IsTextNode()
+                        && aCpyPam.End()->GetNode().GetTextNode()->Len() == 0);
+
                     rClpDoc.getIDocumentContentOperations().CopyRange(aCpyPam, 
rInsPos, SwCopyFlags::CheckPosInFly);
                     // Note: aCpyPam is invalid now
 
+                    if (isSourceSection
+                        && aIndexBefore.GetNode().IsStartNode()
+                        && rInsPos.GetNode().GetTextNode()->Len() == 0)
+                    {   // if there is an empty text node at the start, it
+                        // should be *replaced* by the section, so delete it
+                        
GetDoc()->getIDocumentContentOperations().DelFullPara(rPaM);
+                    }
+
                     ++aIndexBefore;
                     SwPaM aPaM(aIndexBefore.GetNode(), rInsPos.GetNode());
 
diff --git a/sw/source/core/undo/untblk.cxx b/sw/source/core/undo/untblk.cxx
index fd5c3239c042..c8967178c29a 100644
--- a/sw/source/core/undo/untblk.cxx
+++ b/sw/source/core/undo/untblk.cxx
@@ -390,6 +390,10 @@ void SwUndoInserts::RedoImpl(::sw::UndoRedoContext & 
rContext)
             rPam.GetPoint()->GetNodeIndex()));
 
         ::std::optional<SwNodeIndex> oMvBkwrd = MovePtBackward(rPam);
+        bool const isMoveFlyAnchors(!oMvBkwrd // equivalent to bCanMoveBack
+            || m_oUndoNodeIndex->GetNode().IsTextNode()
+            || (oMvBkwrd->GetNode().IsStartNode()
+                && m_oUndoNodeIndex->GetNode().IsSectionNode()));
 
         // re-insert content again (first detach m_oUndoNodeIndex!)
         SwNodeOffset const nMvNd = m_oUndoNodeIndex->GetIndex();
@@ -403,7 +407,7 @@ void SwUndoInserts::RedoImpl(::sw::UndoRedoContext & 
rContext)
 
         // at-char anchors post SplitNode are on index 0 of 2nd node and will
         // remain there - move them back to the start (end would also work?)
-        if (pFlysAtInsPos)
+        if (pFlysAtInsPos && isMoveFlyAnchors)
         {
             for (SwFrameFormat * pFly : *pFlysAtInsPos)
             {
diff --git a/sw/source/core/unocore/unotext.cxx 
b/sw/source/core/unocore/unotext.cxx
index 93603d6d407d..3f720e452f15 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -2337,12 +2337,6 @@ SwXText::copyText(
         // us, even if we have only a single paragraph.
         m_pImpl->m_pDoc->getIDocumentContentOperations().CopyRange(temp, rPos, 
SwCopyFlags::CheckPosInFly);
     }
-    if (!pFirstNode)
-    {   // the node at rPos was split; get rid of the first empty one so
-        // that the pasted table is first
-        auto 
pDelCursor(m_pImpl->m_pDoc->CreateUnoCursor(SwPosition(*GetStartNode(), 
SwNodeOffset(1))));
-        
m_pImpl->m_pDoc->getIDocumentContentOperations().DelFullPara(*pDelCursor);
-    }
 }
 
 SwXBodyText::SwXBodyText(SwDoc *const pDoc)
commit d48ba233d076a7a4f2ed3c3d0017adffc15e266a
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Thu Apr 11 11:02:41 2024 +0200
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Mon Apr 15 12:36:24 2024 +0200

    tdf#160176 svx: Reset help text when form control has none
    
    In `FmFormPage::RequestHelp`, also call
    `Help::ShowQuickHelp`/`Help::ShowBalloon` when
    the help text is empty, as that is the way to
    unset the help text/remove the tooltip again,
    see `ImplShowHelpWindow` in `vcl/source/app/help.cxx`:
    
    For the case of non-native tooltips (e.g. the
    gen VCL plugin on Linux), the `bRemoveHelp = true`
    code path is relevant.
    For qt5/qt6/kf5/kf6 which use native tooltips,
    the call to
    
        pParent->ImplGetFrame()->ShowTooltip(rHelpText, rHelpArea)
    
-e 
... etc. - the rest is truncated

Reply via email to