desktop/source/lib/init.cxx | 7 ++++++- sc/source/ui/docshell/docsh.cxx | 29 ++++++++++++++++++----------- sfx2/source/view/viewsh.cxx | 1 + 3 files changed, 25 insertions(+), 12 deletions(-)
New commits: commit 422fd364934d93ea02a614e8f431bfc1126b5a2d Author: Mert Tumer <mert.tu...@collabora.com> AuthorDate: Wed Dec 29 16:34:38 2021 +0300 Commit: Mert Tumer <mert.tu...@collabora.com> CommitDate: Mon Mar 14 11:52:33 2022 +0100 LOK android: Fix csv sheet name becomes temp name Signed-off-by: Mert Tumer <mert.tu...@collabora.com> Change-Id: If43d7a995a5e53734fc7ecdcbf9b750b4886dc45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127684 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Andras Timar <andras.ti...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131516 diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index 4179a0ba5acf..8c64e3a8416f 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -137,6 +137,8 @@ #include <memory> #include <vector> +#include <comphelper/lok.hxx> + using namespace com::sun::star; using ::com::sun::star::uno::Reference; using ::com::sun::star::lang::XMultiServiceFactory; @@ -1286,17 +1288,22 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) sc::SetFormulaDirtyContext aCxt; m_aDocument.SetAllFormulasDirty(aCxt); - // The same resulting name has to be handled in - // ScExternalRefCache::initializeDoc() and related, hence - // pass 'true' for RenameTab()'s bExternalDocument for a - // composed name so ValidTabName() will not be checked, - // which could veto the rename in case it contained - // characters that Excel does not handle. If we wanted to - // change that then it needed to be handled in all - // corresponding places of the external references - // manager/cache. Likely then we'd also need a method to - // compose a name excluding such characters. - m_aDocument.RenameTab( 0, INetURLObject( rMedium.GetName()).GetBase(), true/*bExternalDocument*/); + bool bIsMobile = comphelper::LibreOfficeKit::isActive() && SfxViewShell::Current() + && SfxViewShell::Current()->isLOKMobilePhone(); + // for mobile case, we use a copy of the original document and give it a temporary name before editing + // Therefore, the sheet name becomes ugly, long and nonsensical. + if (!bIsMobile) + // The same resulting name has to be handled in + // ScExternalRefCache::initializeDoc() and related, hence + // pass 'true' for RenameTab()'s bExternalDocument for a + // composed name so ValidTabName() will not be checked, + // which could veto the rename in case it contained + // characters that Excel does not handle. If we wanted to + // change that then it needed to be handled in all + // corresponding places of the external references + // manager/cache. Likely then we'd also need a method to + // compose a name excluding such characters. + m_aDocument.RenameTab( 0, INetURLObject( rMedium.GetName()).GetBase(), true/*bExternalDocument*/); bOverflowRow = aImpEx.IsOverflowRow(); bOverflowCol = aImpEx.IsOverflowCol(); commit 2df5a083a83f6e83ac45465d4b65887421ac945d Author: Mert Tumer <mert.tu...@collabora.com> AuthorDate: Mon Jan 10 13:23:03 2022 +0300 Commit: Mert Tumer <mert.tu...@collabora.com> CommitDate: Mon Mar 14 11:52:20 2022 +0100 lok: Fix freshly added comments are not displayed Signed-off-by: Mert Tumer <mert.tu...@collabora.com> Change-Id: Ice772eff8b9f8ae8c23ec1e66675e33a80492028 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128217 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Szymon Kłos <szymon.k...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131515 Tested-by: Jenkins diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index b5db7f8cb1e6..0e1c47e9b5dc 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -1479,13 +1479,18 @@ void CallbackFlushHandler::queue(const int type, CallbackData& aCallbackData) SAL_INFO("lok", "Queue: [" << type << "]: [" << aCallbackData.getPayload() << "] on " << m_queue1.size() << " entries."); bool bIsChartActive = false; + bool bIsComment = false; if (type == LOK_CALLBACK_GRAPHIC_SELECTION) { LokChartHelper aChartHelper(SfxViewShell::Current()); bIsChartActive = aChartHelper.GetWindow() != nullptr; } + else if (type == LOK_CALLBACK_COMMENT) + { + bIsComment = true; + } - if (callbacksDisabled() && !bIsChartActive) + if (callbacksDisabled() && !bIsChartActive && !bIsComment) { // We drop notifications when this is set, except for important ones. // When we issue a complex command (such as .uno:InsertAnnotation) diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index ad16d0ccc463..e1f82e36a11d 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -1446,6 +1446,7 @@ static bool ignoreLibreOfficeKitViewCallback(int nType, const SfxViewShell_Impl* { case LOK_CALLBACK_FORM_FIELD_BUTTON: case LOK_CALLBACK_TEXT_SELECTION: + case LOK_CALLBACK_COMMENT: break; default: // Reject e.g. invalidate during paint.