diff options
author | Jan Holesovsky <kendy@collabora.com> | 2020-02-21 18:45:20 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2020-02-28 14:03:45 +0100 |
commit | e701ab6945e62bb958a435aaef7cb67ca6ffa9ed (patch) | |
tree | 86c34b814f83e4f3fc82c82b10b412bdd9e0e7a4 /sd | |
parent | 0aa27161cefed6f139d6945a3785ee6587e4c9ec (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.hrc | 4 | ||||
-rw-r--r-- | sd/source/core/sdpage.cxx | 42 |
2 files changed, 34 insertions, 12 deletions
diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc index 08481d170398..e4a1ed418524 100644 --- a/sd/inc/strings.hrc +++ b/sd/inc/strings.hrc @@ -290,6 +290,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" ) @@ -298,6 +300,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 7c280cfc1f7f..31bc4cec27d1 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -2600,24 +2600,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()) -#ifdef IOS - || (true) -#endif - ) + else if (isMobile) aString = SdResId(STR_PRESOBJ_TITLE_MOBILE); else aString = SdResId(STR_PRESOBJ_TITLE); @@ -2625,8 +2633,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); @@ -2634,15 +2647,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); |