summaryrefslogtreecommitdiff
path: root/sfx2/source/view/viewsh.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/view/viewsh.cxx')
-rw-r--r--sfx2/source/view/viewsh.cxx42
1 files changed, 38 insertions, 4 deletions
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index cbb3749ec737..28b133174aef 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -1083,6 +1083,10 @@ SfxViewShell::SfxViewShell
maLOKLanguageTag = SfxLokHelper::getDefaultLanguage();
maLOKLocale = SfxLokHelper::getDefaultLanguage();
+ const auto [isTimezoneSet, aTimezone] = SfxLokHelper::getDefaultTimezone();
+ maLOKIsTimezoneSet = isTimezoneSet;
+ maLOKTimezone = aTimezone;
+
maLOKDeviceFormFactor = SfxLokHelper::getDeviceFormFactor();
vcl::Window* pFrameWin = pViewFrame->GetWindow().GetFrameWindow();
@@ -1418,7 +1422,6 @@ bool SfxViewShell::ExecKey_Impl(const KeyEvent& aKey)
void SfxViewShell::setLibreOfficeKitViewCallback(SfxLokCallbackInterface* pCallback)
{
- pImpl->m_pLibreOfficeKitViewCallback = nullptr;
pImpl->m_pLibreOfficeKitViewCallback = pCallback;
afterCallbackRegistered();
@@ -1436,6 +1439,17 @@ void SfxViewShell::setLibreOfficeKitViewCallback(SfxLokCallbackInterface* pCallb
}
}
+SfxLokCallbackInterface* SfxViewShell::getLibreOfficeKitViewCallback() const
+{
+ return pImpl->m_pLibreOfficeKitViewCallback;
+}
+
+void SfxViewShell::dumpLibreOfficeKitViewState(rtl::OStringBuffer &rState)
+{
+ if (pImpl->m_pLibreOfficeKitViewCallback)
+ pImpl->m_pLibreOfficeKitViewCallback->dumpState(rState);
+}
+
static bool ignoreLibreOfficeKitViewCallback(int nType, const SfxViewShell_Impl* pImpl)
{
if (!comphelper::LibreOfficeKit::isActive())
@@ -1472,12 +1486,12 @@ static bool ignoreLibreOfficeKitViewCallback(int nType, const SfxViewShell_Impl*
return false;
}
-void SfxViewShell::libreOfficeKitViewInvalidateTilesCallback(const tools::Rectangle* pRect, int nPart) const
+void SfxViewShell::libreOfficeKitViewInvalidateTilesCallback(const tools::Rectangle* pRect, int nPart, int nMode) const
{
if (ignoreLibreOfficeKitViewCallback(LOK_CALLBACK_INVALIDATE_TILES, pImpl.get()))
return;
if (pImpl->m_pLibreOfficeKitViewCallback)
- pImpl->m_pLibreOfficeKitViewCallback->libreOfficeKitViewInvalidateTilesCallback(pRect, nPart);
+ pImpl->m_pLibreOfficeKitViewCallback->libreOfficeKitViewInvalidateTilesCallback(pRect, nPart, nMode);
else
SAL_INFO(
"sfx.view",
@@ -1536,6 +1550,16 @@ void SfxViewShell::libreOfficeKitViewUpdatedCallbackPerViewId(int nType, int nVi
<< lokCallbackTypeToString(nType));
}
+void SfxViewShell::libreOfficeKitViewAddPendingInvalidateTiles()
+{
+ if (pImpl->m_pLibreOfficeKitViewCallback)
+ pImpl->m_pLibreOfficeKitViewCallback->libreOfficeKitViewAddPendingInvalidateTiles();
+ else
+ SAL_INFO(
+ "sfx.view",
+ "SfxViewShell::libreOfficeKitViewAddPendingInvalidateTiles no callback set!");
+}
+
void SfxViewShell::afterCallbackRegistered()
{
}
@@ -1545,7 +1569,7 @@ void SfxViewShell::flushPendingLOKInvalidateTiles()
// SfxViewShell itself does not delay any tile invalidations.
}
-OString SfxViewShell::getLOKPayload(int nType, int /*nViewId*/, bool* /*ignore*/) const
+std::optional<OString> SfxViewShell::getLOKPayload(int nType, int /*nViewId*/) const
{
// SfxViewShell itself currently doesn't handle any updated-payload types.
SAL_WARN("sfx.view", "SfxViewShell::getLOKPayload unhandled type " << lokCallbackTypeToString(nType));
@@ -1597,6 +1621,11 @@ int SfxViewShell::getPart() const
return 0;
}
+int SfxViewShell::getEditMode() const
+{
+ return 0;
+}
+
ViewShellId SfxViewShell::GetViewShellId() const
{
return pImpl->m_nViewShellId;
@@ -1613,6 +1642,11 @@ ViewShellDocId SfxViewShell::GetDocId() const
return pImpl->m_nDocId;
}
+void SfxViewShell::notifyInvalidation(tools::Rectangle const* pRect) const
+{
+ SfxLokHelper::notifyInvalidation(this, pRect);
+}
+
void SfxViewShell::NotifyOtherViews(int nType, const OString& rKey, const OString& rPayload)
{
SfxLokHelper::notifyOtherViews(this, nType, rKey, rPayload);