lok: unit test GetControlState
Change-Id: I7187fe787aaed33d85ad76b612725741e9f586d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91383 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Henry Castro <hcastro@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91579 Tested-by: Jenkins
This commit is contained in:
parent
cb1a0ee587
commit
d652baae2f
1 changed files with 16 additions and 0 deletions
|
@ -49,6 +49,7 @@
|
|||
#include <config_mpl.h>
|
||||
|
||||
#include <lib/init.hxx>
|
||||
#include <svx/svxids.hrc>
|
||||
|
||||
using namespace com::sun::star;
|
||||
using namespace desktop;
|
||||
|
@ -170,6 +171,7 @@ public:
|
|||
void testShowHideDialog();
|
||||
void testDialogInput();
|
||||
void testCalcSaveAs();
|
||||
void testControlState();
|
||||
void testABI();
|
||||
|
||||
CPPUNIT_TEST_SUITE(DesktopLOKTest);
|
||||
|
@ -229,6 +231,7 @@ public:
|
|||
CPPUNIT_TEST(testShowHideDialog);
|
||||
CPPUNIT_TEST(testDialogInput);
|
||||
CPPUNIT_TEST(testCalcSaveAs);
|
||||
CPPUNIT_TEST(testControlState);
|
||||
CPPUNIT_TEST(testABI);
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
|
@ -2807,6 +2810,19 @@ void DesktopLOKTest::testSpellcheckerMultiView()
|
|||
CPPUNIT_ASSERT_EQUAL(1, pDocument->m_pDocumentClass->getViewsCount(pDocument));
|
||||
}
|
||||
|
||||
void DesktopLOKTest::testControlState()
|
||||
{
|
||||
LibLODocument_Impl* pDocument = loadDoc("search.ods");
|
||||
pDocument->pClass->postUnoCommand(pDocument, ".uno:StarShapes", nullptr, false);
|
||||
Scheduler::ProcessEventsToIdle();
|
||||
|
||||
boost::property_tree::ptree aState;
|
||||
SfxViewShell* pViewShell = SfxViewShell::Current();
|
||||
pViewShell->GetViewFrame()->GetBindings().Update();
|
||||
pViewShell->GetViewFrame()->GetBindings().QueryControlState(SID_ATTR_TRANSFORM_WIDTH, aState);
|
||||
CPPUNIT_ASSERT(!aState.empty());
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
constexpr size_t classOffset(int i)
|
||||
|
|
Loading…
Reference in a new issue