summaryrefslogtreecommitdiff
path: root/sc/qa/unit/tiledrendering/tiledrendering.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/qa/unit/tiledrendering/tiledrendering.cxx')
-rw-r--r--sc/qa/unit/tiledrendering/tiledrendering.cxx66
1 files changed, 0 insertions, 66 deletions
diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index 8a722c2b8a29..ed35b29e7a63 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -47,7 +47,6 @@
#include <document.hxx>
#include <docuno.hxx>
#include <drwlayer.hxx>
-#include <editutil.hxx>
using namespace css;
@@ -114,7 +113,6 @@ public:
void testSpellOnlineRenderParameter();
void testPasteIntoWrapTextCell();
void testSortAscendingDescending();
- void testAutoInputExactMatch();
void testMoveShapeHandle();
void testEditCursorBounds();
void testTextSelectionBounds();
@@ -166,7 +164,6 @@ public:
CPPUNIT_TEST(testSpellOnlineRenderParameter);
CPPUNIT_TEST(testPasteIntoWrapTextCell);
CPPUNIT_TEST(testSortAscendingDescending);
- CPPUNIT_TEST(testAutoInputExactMatch);
CPPUNIT_TEST(testMoveShapeHandle);
CPPUNIT_TEST(testEditCursorBounds);
CPPUNIT_TEST(testTextSelectionBounds);
@@ -2634,69 +2631,6 @@ void ScTiledRenderingTest::testSortAscendingDescending()
CPPUNIT_ASSERT_EQUAL(OString("rows"), aView.m_sInvalidateSheetGeometry);
}
-void lcl_typeCharsInCell(const std::string& aStr, SCCOL nCol, SCROW nRow, ScTabViewShell* pView, ScModelObj* pModelObj)
-{
- pView->SetCursor(nCol, nRow);
- for (const char& cChar : aStr)
- {
- pModelObj->postKeyEvent(LOK_KEYEVENT_KEYINPUT, cChar, 0);
- pModelObj->postKeyEvent(LOK_KEYEVENT_KEYUP, cChar, 0);
- Scheduler::ProcessEventsToIdle();
- }
- pModelObj->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, awt::Key::RETURN);
- pModelObj->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, awt::Key::RETURN);
- Scheduler::ProcessEventsToIdle();
-}
-
-void ScTiledRenderingTest::testAutoInputExactMatch()
-{
- comphelper::LibreOfficeKit::setActive();
-
- ScModelObj* pModelObj = createDoc("empty.ods");
- CPPUNIT_ASSERT(pModelObj);
- ScTabViewShell* pView = dynamic_cast<ScTabViewShell*>(SfxViewShell::Current());
- CPPUNIT_ASSERT(pView);
- ScDocument* pDoc = pModelObj->GetDocument();
-
- pDoc->SetString(ScAddress(0, 1, 0), "Simple"); // A2
- pDoc->SetString(ScAddress(0, 2, 0), "Simple"); // A3
- pDoc->SetString(ScAddress(0, 3, 0), "Sing"); // A4
- ScFieldEditEngine& rEE = pDoc->GetEditEngine();
- rEE.SetText("Case");
- pDoc->SetEditText(ScAddress(0, 4, 0), rEE.CreateTextObject()); // A5
- pDoc->SetString(ScAddress(0, 5, 0), "Time"); // A6
- pDoc->SetString(ScAddress(0, 6, 0), "Castle"); // A7
-
- ScAddress aA8(0, 7, 0);
- lcl_typeCharsInCell("S", aA8.Col(), aA8.Row(), pView, pModelObj); // Type "S" in A8
- // Should not autocomplete as there are multiple matches starting with "S".
- CPPUNIT_ASSERT_EQUAL_MESSAGE("1: A8 should have just S (should not autocomplete)", OUString("S"), pDoc->GetString(aA8));
-
- lcl_typeCharsInCell("Si", aA8.Col(), aA8.Row(), pView, pModelObj); // Type "Si" in A8
- // Should not autocomplete as there are multiple matches starting with "Si".
- CPPUNIT_ASSERT_EQUAL_MESSAGE("2: A8 should not autocomplete", OUString("Si"), pDoc->GetString(aA8));
-
- lcl_typeCharsInCell("Sim", aA8.Col(), aA8.Row(), pView, pModelObj); // Type "Sim" in A8
- // Should autocomplete to "Simple" which is the only match.
- CPPUNIT_ASSERT_EQUAL_MESSAGE("3: A8 should autocomplete", OUString("Simple"), pDoc->GetString(aA8));
-
- lcl_typeCharsInCell("Sin", aA8.Col(), aA8.Row(), pView, pModelObj); // Type "Sin" in A8
- // Should autocomplete to "Sing" which is the only match.
- CPPUNIT_ASSERT_EQUAL_MESSAGE("4: A8 should autocomplete", OUString("Sing"), pDoc->GetString(aA8));
-
- lcl_typeCharsInCell("Cas", aA8.Col(), aA8.Row(), pView, pModelObj); // Type "Cas" in A8
- // Should not autocomplete as there are multiple matches starting with "Cas".
- CPPUNIT_ASSERT_EQUAL_MESSAGE("5: A8 should not autocomplete", OUString("Cas"), pDoc->GetString(aA8));
-
- lcl_typeCharsInCell("Cast", aA8.Col(), aA8.Row(), pView, pModelObj); // Type "Cast" in A8
- // Should autocomplete to "Castle" which is the only match.
- CPPUNIT_ASSERT_EQUAL_MESSAGE("6: A8 should autocomplete", OUString("Castle"), pDoc->GetString(aA8));
-
- lcl_typeCharsInCell("T", aA8.Col(), aA8.Row(), pView, pModelObj); // Type "T" in A8
- // Should autocomplete to "Time" which is the only match.
- CPPUNIT_ASSERT_EQUAL_MESSAGE("7: A8 should autocomplete", OUString("Time"), pDoc->GetString(aA8));
-}
-
void ScTiledRenderingTest::testEditCursorBounds()
{
comphelper::LibreOfficeKit::setActive();