summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2020-02-21 18:45:20 +0100
committerMichael Meeks <michael.meeks@collabora.com>2020-05-27 22:13:16 +0100
commit83bee181d933b2c1ce0f186808365c78dbe25e65 (patch)
treea13cd470357278c194d3d19309a6fc919c421698 /sd
parent1b8bc87f89d7fc67bb7906ab4f0a6622121b65a6 (diff)
android: Hardcode the 'double-tap' in case of the native app.
We know we are mobile, so why bother... We could go even further, and do that directly in the comphelper, but that would need more testing I guess. Change-Id: Ia371d42fe0e31b5c6f17313fbf6baad4c256cbe9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89236 Tested-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89695 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/inc/strings.hrc4
-rw-r--r--sd/source/core/sdpage.cxx38
2 files changed, 34 insertions, 8 deletions
diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc
index 9d7bdfd5b58f..1e9d0214afe6 100644
--- a/sd/inc/strings.hrc
+++ b/sd/inc/strings.hrc
@@ -294,6 +294,8 @@
#define STR_HANDOUT NC_("STR_HANDOUT", "Handouts" )
#define STR_PRESOBJ_MPTITLE NC_("STR_PRESOBJ_MPTITLE", "Click to edit the title text format" )
#define STR_PRESOBJ_MPOUTLINE NC_("STR_PRESOBJ_MPOUTLINE", "Click to edit the outline text format" )
+#define STR_PRESOBJ_MPTITLE_MOBILE NC_("STR_PRESOBJ_MPTITLE_MOBILE", "Double-tap to edit the title text format" )
+#define STR_PRESOBJ_MPOUTLINE_MOBILE NC_("STR_PRESOBJ_MPOUTLINE_MOBILE", "Double-tap to edit the outline text format" )
#define STR_PRESOBJ_MPOUTLLAYER2 NC_("STR_PRESOBJ_MPOUTLLAYER2", "Second Outline Level" )
#define STR_PRESOBJ_MPOUTLLAYER3 NC_("STR_PRESOBJ_MPOUTLLAYER3", "Third Outline Level" )
#define STR_PRESOBJ_MPOUTLLAYER4 NC_("STR_PRESOBJ_MPOUTLLAYER4", "Fourth Outline Level" )
@@ -302,6 +304,8 @@
#define STR_PRESOBJ_MPOUTLLAYER7 NC_("STR_PRESOBJ_MPOUTLLAYER7", "Seventh Outline Level" )
#define STR_PRESOBJ_MPNOTESTITLE NC_("STR_PRESOBJ_MPNOTESTITLE", "Click to move the slide" )
#define STR_PRESOBJ_MPNOTESTEXT NC_("STR_PRESOBJ_MPNOTESTEXT", "Click to edit the notes format" )
+#define STR_PRESOBJ_MPNOTESTITLE_MOBILE NC_("STR_PRESOBJ_MPNOTESTITLE_MOBILE", "Double-tap to move the slide" )
+#define STR_PRESOBJ_MPNOTESTEXT_MOBILE NC_("STR_PRESOBJ_MPNOTESTEXT_MOBILE", "Double-tap to edit the notes format" )
#define STR_PRESOBJ_TITLE NC_("STR_PRESOBJ_TITLE", "Click to add Title" )
#define STR_PRESOBJ_OUTLINE NC_("STR_PRESOBJ_OUTLINE", "Click to add Text" )
#define STR_PRESOBJ_TEXT NC_("STR_PRESOBJ_TEXT", "Click to add Text" )
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 622a21949f4c..6c9cbe0d9e42 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -2591,20 +2591,32 @@ OUString SdPage::GetPresObjText(PresObjKind eObjKind) const
{
OUString aString;
+#if defined(IOS) || defined(ANDROID)
+ bool isMobile = true;
+#else
+ bool isMobile = comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView());
+#endif
+
if (eObjKind == PRESOBJ_TITLE)
{
if (mbMaster)
{
if (mePageKind != PageKind::Notes)
{
- aString = SdResId( STR_PRESOBJ_MPTITLE );
+ if (isMobile)
+ aString = SdResId(STR_PRESOBJ_MPTITLE_MOBILE);
+ else
+ aString = SdResId(STR_PRESOBJ_MPTITLE);
}
else
{
- aString = SdResId( STR_PRESOBJ_MPNOTESTITLE );
+ if (isMobile)
+ aString = SdResId(STR_PRESOBJ_MPNOTESTITLE_MOBILE);
+ else
+ aString = SdResId(STR_PRESOBJ_MPNOTESTITLE);
}
}
- else if (comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView()))
+ else if (isMobile)
aString = SdResId(STR_PRESOBJ_TITLE_MOBILE);
else
aString = SdResId(STR_PRESOBJ_TITLE);
@@ -2612,8 +2624,13 @@ OUString SdPage::GetPresObjText(PresObjKind eObjKind) const
else if (eObjKind == PRESOBJ_OUTLINE)
{
if (mbMaster)
- aString = SdResId(STR_PRESOBJ_MPOUTLINE);
- else if (comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView()))
+ {
+ if (isMobile)
+ aString = SdResId(STR_PRESOBJ_MPOUTLINE_MOBILE);
+ else
+ aString = SdResId(STR_PRESOBJ_MPOUTLINE);
+ }
+ else if (isMobile)
aString = SdResId(STR_PRESOBJ_OUTLINE_MOBILE);
else
aString = SdResId(STR_PRESOBJ_OUTLINE);
@@ -2621,15 +2638,20 @@ OUString SdPage::GetPresObjText(PresObjKind eObjKind) const
else if (eObjKind == PRESOBJ_NOTES)
{
if (mbMaster)
- aString = SdResId(STR_PRESOBJ_MPNOTESTEXT);
- else if (comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView()))
+ {
+ if (isMobile)
+ aString = SdResId(STR_PRESOBJ_MPNOTESTEXT_MOBILE);
+ else
+ aString = SdResId(STR_PRESOBJ_MPNOTESTEXT);
+ }
+ else if (isMobile)
aString = SdResId(STR_PRESOBJ_NOTESTEXT_MOBILE);
else
aString = SdResId(STR_PRESOBJ_NOTESTEXT);
}
else if (eObjKind == PRESOBJ_TEXT)
{
- if (comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView()))
+ if (isMobile)
aString = SdResId(STR_PRESOBJ_TEXT_MOBILE);
else
aString = SdResId(STR_PRESOBJ_TEXT);