diff options
-rw-r--r-- | sw/qa/extras/uiwriter/uiwriter.cxx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index bf04bd037749..69da76acdc92 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -52,6 +52,8 @@ #include <editeng/wghtitem.hxx> #include "UndoManager.hxx" +#include <textsh.hxx> +#include <frmmgr.hxx> #include <com/sun/star/lang/Locale.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> @@ -145,6 +147,7 @@ public: void testDde(); void testTdf89954(); void testTdf89720(); + void testTdf88986(); CPPUNIT_TEST_SUITE(SwUiWriterTest); CPPUNIT_TEST(testReplaceForward); @@ -209,6 +212,7 @@ public: CPPUNIT_TEST(testDde); CPPUNIT_TEST(testTdf89954); CPPUNIT_TEST(testTdf89720); + CPPUNIT_TEST(testTdf88986); CPPUNIT_TEST_SUITE_END(); private: @@ -2146,6 +2150,22 @@ void SwUiWriterTest::testTdf89720() } } +void SwUiWriterTest::testTdf88986() +{ + // Create a text shell. + SwDoc* pDoc = createDoc(); + SwView* pView = pDoc->GetDocShell()->GetView(); + SwTextShell aShell(*pView); + + // Create the item set that is normally passed to the insert frame dialog. + SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); + SwFlyFrmAttrMgr aMgr(true, pWrtShell, FRMMGR_TYPE_TEXT); + SfxItemSet aSet = aShell.CreateInsertFrameItemSet(aMgr); + + // This was missing along with the gradient and other tables. + CPPUNIT_ASSERT(aSet.HasItem(SID_COLOR_TABLE)); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SwUiWriterTest); CPPUNIT_PLUGIN_IMPLEMENT(); |