summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sd/qa/unit/tiledrendering/data/test.ppsxbin0 -> 32452 bytes
-rw-r--r--sd/qa/unit/tiledrendering/tiledrendering.cxx21
-rw-r--r--sd/source/ui/view/ViewShellBase.cxx6
3 files changed, 27 insertions, 0 deletions
diff --git a/sd/qa/unit/tiledrendering/data/test.ppsx b/sd/qa/unit/tiledrendering/data/test.ppsx
new file mode 100644
index 000000000000..2b955adeca97
--- /dev/null
+++ b/sd/qa/unit/tiledrendering/data/test.ppsx
Binary files differ
diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index 31d61c1fb1a0..e9a3f0f81e38 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -778,6 +778,7 @@ public:
bool m_bViewLock;
bool m_bTilesInvalidated;
std::vector<tools::Rectangle> m_aInvalidations;
+ std::vector<std::string> m_aStateChanged;
std::map<int, bool> m_aViewCursorInvalidations;
std::map<int, bool> m_aViewCursorVisibilities;
bool m_bViewSelectionSet;
@@ -895,6 +896,13 @@ public:
m_aCommentCallbackResult = m_aCommentCallbackResult.get_child("comment");
}
break;
+ case LOK_CALLBACK_STATE_CHANGED:
+ {
+ std::stringstream aStream(pPayload);
+
+ m_aStateChanged.push_back(aStream.str());
+ }
+ break;
}
}
};
@@ -2942,6 +2950,19 @@ CPPUNIT_TEST_FIXTURE(SdTiledRenderingTest, testShapeEditInMultipleViews)
}
}
+CPPUNIT_TEST_FIXTURE(SdTiledRenderingTest, testStartPresentation)
+{
+ SdXImpressDocument* pXImpressDocument = createDoc("test.ppsx");
+ ViewCallback aView1;
+ CPPUNIT_ASSERT(pXImpressDocument->GetDoc()->IsStartWithPresentation());
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT(aView1.m_aStateChanged.size() >= 1);
+
+ CPPUNIT_ASSERT(std::find(aView1.m_aStateChanged.begin(),
+ aView1.m_aStateChanged.end(), ".uno:StartWithPresentation=true") != aView1.m_aStateChanged.end());
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx
index 70691ce1133e..b308ad108b0a 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -1023,6 +1023,12 @@ void ViewShellBase::afterCallbackRegistered()
std::set<Color> aDocumentColors = pDocShell->GetDocColors();
svx::theme::notifyLOK(pThemeColors, aDocumentColors);
}
+
+ if (mpDocument && mpDocument->IsStartWithPresentation())
+ {
+ this->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED,
+ ".uno:StartWithPresentation=true"_ostr);
+ }
}
void ViewShellBase::NotifyCursor(SfxViewShell* pOtherShell) const