summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2023-05-09 11:18:49 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2023-05-09 17:48:18 +0200
commit9af57871fc153ca0145dd40e48f577564395ab73 (patch)
treeac4aa320464910010e71da1c9d54e002ad623566
parent4adf6852cc3fd0eddf53c2ab4f66efed0668b699 (diff)
tdf#154282: sw_uiwriter3: Add unittest
Change-Id: I48b0dd636f50bf0b4d08ee0d43593f6142babd3b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151566 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r--sw/qa/extras/uiwriter/uiwriter3.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/sw/qa/extras/uiwriter/uiwriter3.cxx b/sw/qa/extras/uiwriter/uiwriter3.cxx
index c1a8faef373a..ef6de9c8e660 100644
--- a/sw/qa/extras/uiwriter/uiwriter3.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter3.cxx
@@ -1780,6 +1780,21 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf134253)
CPPUNIT_ASSERT_EQUAL(6, getPages());
}
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testNotebookBar)
+{
+ createSwDoc();
+
+ //tdf#154282: Without the fix in place, this test would have crashed
+ dispatchCommand(mxComponent, ".uno:ToolbarMode?Mode:string=notebookbar.ui", {});
+ dispatchCommand(mxComponent, ".uno:ToolbarMode?Mode:string=Single", {});
+ dispatchCommand(mxComponent, ".uno:ToolbarMode?Mode:string=Sidebar", {});
+ dispatchCommand(mxComponent, ".uno:ToolbarMode?Mode:string=notebookbar_compact.ui", {});
+ dispatchCommand(mxComponent, ".uno:ToolbarMode?Mode:string=notebookbar_groupedbar_compact.ui",
+ {});
+ dispatchCommand(mxComponent, ".uno:ToolbarMode?Mode:string=notebookbar_single.ui", {});
+ dispatchCommand(mxComponent, ".uno:ToolbarMode?Mode:string=Default", {});
+}
+
CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, TestAsCharTextBox)
{
// Related tickets: