sw/qa/core/doc/doc.cxx |    9 +++++++++
 1 file changed, 9 insertions(+)

New commits:
commit 680e0aa1eb746a623bad40237232b094cec922d7
Author:     Bjoern Michaelsen <bjoern.michael...@libreoffice.org>
AuthorDate: Sat Jul 27 01:11:51 2024 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Wed Aug 21 12:27:48 2024 +0200

    tdf#158504: add unit test
    
    Change-Id: Ie0b11ea04e3ad50206dfa219ebe7f138c00861e9
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171089
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>
    (cherry picked from commit 9ed09fb1327e6cd10febe45c7f76ee1e46d99b5f)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172130
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sw/qa/core/doc/doc.cxx b/sw/qa/core/doc/doc.cxx
index 5ffbdd113908..56f52d82df61 100644
--- a/sw/qa/core/doc/doc.cxx
+++ b/sw/qa/core/doc/doc.cxx
@@ -632,6 +632,15 @@ CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testVirtPageNumReset)
     CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(1), nVirt);
 }
 
+CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testDefaultPageDescUsed)
+{
+    createSwDoc();
+    auto pDoc = getSwDocShell()->GetDoc();
+    CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pDoc->GetPageDescCnt());
+    const SwPageDesc& rPageDesc = pDoc->GetPageDesc(0);
+    CPPUNIT_ASSERT(rPageDesc.IsUsed());
+}
+
 CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testTextBoxWordWrap)
 {
     // Given a document with a shape in the header that extends horizontally 
when there is enough

Reply via email to