[Libreoffice-commits] core.git: 2 commits - sd/qa sd/source
Miklos Vajna
vmiklos at collabora.co.uk
Wed May 27 05:31:23 PDT 2015
sd/qa/unit/tiledrendering/tiledrendering.cxx | 15 ++++++++++++++-
sd/source/ui/view/Outliner.cxx | 8 ++++++++
2 files changed, 22 insertions(+), 1 deletion(-)
New commits:
commit 436b4451c6f36ca23c966e2391cfcf94091b6db7
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Wed May 27 14:10:00 2015 +0200
CppunitTest_sd_tiledrendering: add search-not-found testcase
Fails without commit c0cc9a8622a2cd0e3ba07e15a79dd65ca910b233 (sd LOKit
callback for search not found, 2015-05-27).
Change-Id: I26ce4eab3d0bf3abc4a59d0dd21d5f2f5de78017
diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index 9889015..b41c427 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -74,13 +74,15 @@ private:
#if !defined(WNT) && !defined(MACOSX)
Rectangle m_aInvalidation;
std::vector<Rectangle> m_aSelection;
+ bool m_bFound;
sal_Int32 m_nPart;
#endif
};
SdTiledRenderingTest::SdTiledRenderingTest()
#if !defined(WNT) && !defined(MACOSX)
- : m_nPart(0)
+ : m_bFound(true),
+ m_nPart(0)
#endif
{
}
@@ -167,6 +169,11 @@ void SdTiledRenderingTest::callbackImpl(int nType, const char* pPayload)
}
}
break;
+ case LOK_CALLBACK_SEARCH_NOT_FOUND:
+ {
+ m_bFound = false;
+ }
+ break;
case LOK_CALLBACK_SET_PART:
{
OUString aPayload = OUString::createFromAscii(pPayload);
@@ -353,6 +360,12 @@ void SdTiledRenderingTest::testSearch()
// Search for something on the second slide, and make sure that the set-part callback fired.
lcl_search("bbb");
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), m_nPart);
+ CPPUNIT_ASSERT_EQUAL(true, m_bFound);
+
+ // This should trigger the not-found callback.
+ Application::EnableHeadlessMode(false);
+ lcl_search("ccc");
+ CPPUNIT_ASSERT_EQUAL(false, m_bFound);
}
#endif
commit 9328df9598286a94f0cf097462045a3c0a5721fc
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Wed May 27 14:09:18 2015 +0200
sd tiled rendering: avoid showing wrap around dialog
Change-Id: Id977c3a17f5e34d086ee3b68fa9ad2969f9d24c2
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index 24031ef..60873d0 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -1098,6 +1098,14 @@ bool Outliner::ShowWrapArroundDialog()
// Spell checking needs the dialog, too.
bShowDialog = (meMode == SPELL);
+ boost::shared_ptr<ViewShell> pViewShell(mpWeakViewShell.lock());
+ if (pViewShell && pViewShell->GetDoc()->isTiledRendering())
+ {
+ // Wrap around without asking anything.
+ bShowDialog = false;
+ bDoWrapArround = true;
+ }
+
if (bShowDialog)
{
// The question text depends on the search direction.
More information about the Libreoffice-commits
mailing list