summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMuhammet Kara <muhammet.kara@collabora.com>2020-02-24 17:03:12 +0300
committerMichael Meeks <michael.meeks@collabora.com>2020-05-27 22:14:06 +0100
commit5677b442a2385c21e747eaaf337f1a64d7b59076 (patch)
tree9ecc0039084b28a33f9a055cf34ac04d769f0e9c
parent4d9bd71951bbcff9f5a5b5107898c86e23e0247d (diff)
lok: Set default text for new text box on mobile
Change-Id: I0b6056e9dbf5fb81d092092cc183b05120b95d70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89352 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89710 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
-rw-r--r--sd/inc/strings.hrc1
-rw-r--r--sd/source/ui/func/futext.cxx3
2 files changed, 4 insertions, 0 deletions
diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc
index 1e9d0214afe6..245e2159b700 100644
--- a/sd/inc/strings.hrc
+++ b/sd/inc/strings.hrc
@@ -313,6 +313,7 @@
#define STR_PRESOBJ_TITLE_MOBILE NC_("STR_PRESOBJ_TITLE_MOBILE", "Double-tap to add Title" )
#define STR_PRESOBJ_OUTLINE_MOBILE NC_("STR_PRESOBJ_OUTLINE_MOBILE", "Double-tap to add Text" )
#define STR_PRESOBJ_TEXT_MOBILE NC_("STR_PRESOBJ_TEXT_MOBILE", "Double-tap to add Text" )
+#define STR_PRESOBJ_TEXT_EDIT_MOBILE NC_("STR_PRESOBJ_TEXT_MOBILE", "Tap to edit text" )
#define STR_PRESOBJ_NOTESTEXT_MOBILE NC_("STR_PRESOBJ_NOTESTEXT_MOBILE", "Double-tap to add Notes" )
#define STR_PRESOBJ_GRAPHIC NC_("STR_PRESOBJ_GRAPHIC", "Double-click to add an Image" )
#define STR_PRESOBJ_OBJECT NC_("STR_PRESOBJ_OBJECT", "Double-click to add an Object" )
diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx
index 75a1867a6574..1f693e7356cb 100644
--- a/sd/source/ui/func/futext.cxx
+++ b/sd/source/ui/func/futext.cxx
@@ -36,6 +36,7 @@
#include <sfx2/viewfrm.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/bindings.hxx>
+#include <sfx2/lokhelper.hxx>
#include <sfx2/request.hxx>
#include <editeng/editeng.hxx>
#include <svx/svdoutl.hxx>
@@ -523,6 +524,8 @@ void FuText::ImpSetAttributesForNewTextObject(SdrTextObj* pTxtObj)
pTxtObj->AdjustTextFrameWidthAndHeight();
aSet.Put(makeSdrTextMaxFrameHeightItem(pTxtObj->GetLogicRect().GetSize().Height()));
pTxtObj->SetMergedItemSet(aSet);
+ if (comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView()))
+ pTxtObj->SetText(SdResId(STR_PRESOBJ_TEXT_EDIT_MOBILE));
}
else if( nSlotId == SID_ATTR_CHAR_VERTICAL )
{