diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-08-25 19:38:50 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-08-26 00:39:48 +0200 |
commit | e73c3942de474004b04c1d538c89354183d44ae9 (patch) | |
tree | 0eb10a4d35f1e83fde4331cd3e26f582547dea77 /sw | |
parent | 15a15c2eb07d5c0b521a03297cdb27e645063161 (diff) |
tdf#144089: Revert "tdf#137737 i18n search: don't expand start/end with regex ^ or $"
This reverts commit a511bffd67a9cebfdc878766581ac08c79d7ff51.
Reason for revert: See https://gerrit.libreoffice.org/c/core/+/120981
Change-Id: If8a445448976a9963f76623d3d968b8d5e3d74dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120990
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/uiwriter/data/tdf137737_FindReplace.docx | bin | 6541 -> 0 bytes | |||
-rw-r--r-- | sw/qa/extras/uiwriter/uiwriter2.cxx | 32 |
2 files changed, 0 insertions, 32 deletions
diff --git a/sw/qa/extras/uiwriter/data/tdf137737_FindReplace.docx b/sw/qa/extras/uiwriter/data/tdf137737_FindReplace.docx Binary files differdeleted file mode 100644 index 42914ce3feaa..000000000000 --- a/sw/qa/extras/uiwriter/data/tdf137737_FindReplace.docx +++ /dev/null diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx b/sw/qa/extras/uiwriter/uiwriter2.cxx index c3ad147713bf..70d63e36871a 100644 --- a/sw/qa/extras/uiwriter/uiwriter2.cxx +++ b/sw/qa/extras/uiwriter/uiwriter2.cxx @@ -48,7 +48,6 @@ #include <xmloff/odffields.hxx> #include <sfx2/viewfrm.hxx> #include <sfx2/dispatch.hxx> -#include <svl/srchitem.hxx> #include <svl/stritem.hxx> #include <comphelper/lok.hxx> #include <comphelper/scopeguard.hxx> @@ -4002,37 +4001,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf118311) assertXPath(pXmlDoc, "//page[1]//body/tab", 0); } -CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf137737_FindReplace) -{ - createSwDoc(DATA_DIRECTORY, "tdf137737_FindReplace.docx"); - - // Replace straight quotes with something (opening quotes in real life, but X is adequate here) - uno::Sequence<beans::PropertyValue> aArgs(comphelper::InitPropertySequence({ - { "SearchItem.SearchString", uno::makeAny(OUString("^\"")) }, - { "SearchItem.ReplaceString", uno::makeAny(OUString("X")) }, - { "SearchItem.Command", uno::makeAny(static_cast<sal_Int16>(SvxSearchCmd::REPLACE)) }, - { "SearchItem.AlgorithmType", uno::makeAny(static_cast<sal_Int16>(1)) }, //REGEX - { "SearchItem.AlgorithmType2", uno::makeAny(static_cast<sal_Int16>(2)) }, //REGEX - })); - // Find the first match. - dispatchCommand(mxComponent, ".uno:ExecuteSearch", aArgs); - // Replace the first match. - dispatchCommand(mxComponent, ".uno:ExecuteSearch", aArgs); - - // Replace straight quotes with something (closing quotes in real life) - aArgs[0].Value <<= OUString("\"$"); - dispatchCommand(mxComponent, ".uno:ExecuteSearch", aArgs); - dispatchCommand(mxComponent, ".uno:ExecuteSearch", aArgs); - - //Finding the searched string via XReplaceable - uno::Reference<util::XReplaceable> xReplace(mxComponent, uno::UNO_QUERY); - uno::Reference<util::XReplaceDescriptor> xReplaceDes = xReplace->createReplaceDescriptor(); - xReplaceDes->setSearchString("\""); - //There should not be any straight quotes left. - uno::Reference<container::XIndexAccess> xIndex(xReplace->findAll(xReplaceDes)); - CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndex->getCount()); -} - CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testRedlineTableRowDeletion) { // load a 1-row table, and delete the row with enabled change tracking: |