[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - sd/inc sd/source

Jan Holesovsky (via logerrit) logerrit at kemper.freedesktop.org
Fri Feb 21 19:02:17 UTC 2020


 sd/inc/strings.hrc        |    4 ++++
 sd/source/core/sdpage.cxx |   42 ++++++++++++++++++++++++++++++------------
 2 files changed, 34 insertions(+), 12 deletions(-)

New commits:
commit b7fe29c1ca06416837e57055610ef3767628bca2
Author:     Jan Holesovsky <kendy at collabora.com>
AuthorDate: Fri Feb 21 18:45:20 2020 +0100
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Fri Feb 21 20:01:48 2020 +0100

    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 at collabora.com>
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>

diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc
index 1869a8509e51..1ee48b01f221 100644
--- a/sd/inc/strings.hrc
+++ b/sd/inc/strings.hrc
@@ -291,6 +291,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" )
@@ -299,6 +301,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 cc590e35aafc..c3c81c926906 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -2608,24 +2608,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);
@@ -2633,8 +2641,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);
@@ -2642,15 +2655,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);


More information about the Libreoffice-commits mailing list