summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMert Tumer <mert.tumer@collabora.com>2022-03-21 14:07:13 +0300
committerSzymon Kłos <szymon.klos@collabora.com>2022-03-22 12:44:43 +0100
commit69deb41027783a8ca43aaf76816446234bc3a0a7 (patch)
tree41ec30cf7b9ef1f90318482715e9c3e3210ab598
parentBump version to 21.06.22.1 (diff)
downloadcore-69deb41027783a8ca43aaf76816446234bc3a0a7.tar.gz
core-69deb41027783a8ca43aaf76816446234bc3a0a7.zip
android: Fix tab name on CSV still becomes tempfile name
Unfortunately, in order for isLOKMObilePhone to work we need to send deviceFormFactor on document load but at this stage the document is still not loaded and the control does not work here Signed-off-by: Mert Tumer <mert.tumer@collabora.com> Change-Id: I5388cf4a049dbf007a1fd79abefb64bed580eea1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131900 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
-rw-r--r--sc/source/ui/docshell/docsh.cxx30
1 files changed, 15 insertions, 15 deletions
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index f8258883a98b..cad8403477d9 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+ #include <sal/config.h>
+
#include <docsh.hxx>
#include <config_features.h>
@@ -1288,23 +1290,21 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
sc::SetFormulaDirtyContext aCxt;
m_aDocument.SetAllFormulasDirty(aCxt);
- 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*/);
-
+#if !(defined ANDROID)
+ // 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*/);
+#endif
bOverflowRow = aImpEx.IsOverflowRow();
bOverflowCol = aImpEx.IsOverflowCol();
bOverflowCell = aImpEx.IsOverflowCell();