dev/null |binary sw/qa/extras/tiledrendering/tiledrendering.cxx | 16 ---------------- sw/source/uibase/uno/unotxdoc.cxx | 16 +--------------- 3 files changed, 1 insertion(+), 31 deletions(-)
New commits: commit ffb5c5e771f46d7bad9e39b547d40de7dca825ce Author: Aron Budea <aron.bu...@collabora.com> AuthorDate: Fri Jan 13 01:43:29 2023 +0100 Commit: Aron Budea <aron.bu...@collabora.com> CommitDate: Fri Jan 13 03:00:17 2023 +0000 Revert "sw: lok: use redline author for saved author fields" Causes unit test failures in online: unit-wopi-lock, unit-crash, unit-wopi-fail-upload, unit-wopi-save-on-exit, unit-wopi-documentconflict. This reverts commit c33e60dd5d5aa8dd585afc9498f87d17ab22fb27. Change-Id: Ib2a29ded0d3f7c2c2ba4ba4d192a3a0099b8023c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145424 Tested-by: Aron Budea <aron.bu...@collabora.com> Reviewed-by: Aron Budea <aron.bu...@collabora.com> diff --git a/sw/qa/extras/tiledrendering/data/savedauthorfield.odt b/sw/qa/extras/tiledrendering/data/savedauthorfield.odt deleted file mode 100644 index a060c5892f12..000000000000 Binary files a/sw/qa/extras/tiledrendering/data/savedauthorfield.odt and /dev/null differ diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx b/sw/qa/extras/tiledrendering/tiledrendering.cxx index 3330e419dc8b..88b4dcc95d7f 100644 --- a/sw/qa/extras/tiledrendering/tiledrendering.cxx +++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx @@ -3791,22 +3791,6 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testAuthorField) assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/Special[1]", "rText", sAuthor); } -CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testSavedAuthorField) -{ - SwXTextDocument* pXTextDocument = createDoc("savedauthorfield.odt"); - const OUString sAuthor("XYZ ABCD"); - uno::Sequence<beans::PropertyValue> aPropertyValues1(comphelper::InitPropertySequence( - { - {".uno:Author", uno::makeAny(sAuthor)}, - })); - pXTextDocument->initializeForTiledRendering(aPropertyValues1); - - Scheduler::ProcessEventsToIdle(); - - xmlDocUniquePtr pXmlDoc = parseLayoutDump(); - assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/Special[1]", "rText", sAuthor); -} - CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index 05bddd1f5747..f91fe5626f1b 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -3570,9 +3570,6 @@ void SwXTextDocument::initializeForTiledRendering(const css::uno::Sequence<css:: // Disable field shadings: the result would depend on the cursor position. SwViewOption::SetAppearanceFlag(ViewOptFlags::FieldShadings, false); - OUString sOrigAuthor = SW_MOD()->GetRedlineAuthor(SW_MOD()->GetRedlineAuthor()); - OUString sAuthor; - for (const beans::PropertyValue& rValue : rArguments) { if (rValue.Name == ".uno:HideWhitespace" && rValue.Value.has<bool>()) @@ -3581,9 +3578,8 @@ void SwXTextDocument::initializeForTiledRendering(const css::uno::Sequence<css:: SwViewOption::SetAppearanceFlag(ViewOptFlags::Shadow , rValue.Value.get<bool>()); else if (rValue.Name == ".uno:Author" && rValue.Value.has<OUString>()) { - sAuthor = rValue.Value.get<OUString>(); // Store the author name in the view. - pView->SetRedlineAuthor(sAuthor); + pView->SetRedlineAuthor(rValue.Value.get<OUString>()); // Let the actual author name pick up the value from the current // view, which would normally happen only during the next view // switch. @@ -3593,16 +3589,6 @@ void SwXTextDocument::initializeForTiledRendering(const css::uno::Sequence<css:: aViewOption.SetOnlineSpell(rValue.Value.get<bool>()); } - if (!sAuthor.isEmpty() && sAuthor != sOrigAuthor) - { - SwView* pFirstView = static_cast<SwView*>(SfxViewShell::GetFirst()); - if (pFirstView && SfxViewShell::GetNext(*pFirstView) == nullptr) - { - if (SwViewShell* pShell = &pFirstView->GetWrtShell()) - pShell->UpdateFields(true); - } - } - // Set the initial zoom value to 1; usually it is set in setClientZoom and // SwViewShell::PaintTile; zoom value is used for chart in place // editing, see postMouseEvent and setGraphicSelection methods.