void SfxHintPoster::Post(std::unique_ptr<SfxRequest> pHintToPost)
{ if (comphelper::LibreOfficeKit::isActive())
{ // Store the LOK view at the time of posting, so we can restore it later. if (SfxLokHelper::isSettingView())
{ // This would be bad, setView() should not trigger new posted hints, otherwise this will // never end if the view doesn't match when we execute the posted hint.
SAL_WARN("sfx.notify", "SfxHintPoster::Post: posting new hint during setting a view");
}
IMPL_LINK(SfxHintPoster, DoEvent_Impl, void*, pPostedHint, void)
{ auto pRequest = static_cast<SfxRequest*>(pPostedHint); if (m_Link)
{ bool bSetView = false; int nOldId = -1; if (comphelper::LibreOfficeKit::isActive())
{ int nNewId = pRequest->GetLokViewId();
nOldId = SfxLokHelper::getView(); if (nNewId != -1 && nNewId != nOldId)
{ // The current view ID is not the one that was active when posting the hint, switch // to it.
SfxLokHelper::setView(nNewId);
bSetView = true;
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.