diff options
author | Tor Lillqvist <tml@collabora.com> | 2020-03-24 09:12:07 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2020-03-24 10:10:04 +0100 |
commit | 8a30ff491d562129097ff231267729316fda5b7a (patch) | |
tree | e0963264f42b8ee69621a44635d95f091b8417fe /include/comphelper | |
parent | Resolves: tdf#131507 createCairoSurface returns nullptr on failure (diff) | |
download | core-8a30ff491d562129097ff231267729316fda5b7a.tar.gz core-8a30ff491d562129097ff231267729316fda5b7a.zip |
Simplify the LibreOfficeKit mobile phone and tablet API
There is not need to ever change the kind of device a view is for, so
why bother with the bool parameter to setMobilePhone() and
setTablet(). Also, make sure just either of them is called, at most
once, for a view.
Change-Id: I9ac872f0ab4772e4a7c40c49f62b32fa7b1e47f6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90968
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'include/comphelper')
-rw-r--r-- | include/comphelper/lok.hxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/include/comphelper/lok.hxx b/include/comphelper/lok.hxx index 43191db90ec0..09d4f682341e 100644 --- a/include/comphelper/lok.hxx +++ b/include/comphelper/lok.hxx @@ -29,16 +29,15 @@ namespace LibreOfficeKit COMPHELPER_DLLPUBLIC void setActive(bool bActive = true); -// Note that currently it is undefined behaviour to call both setMobilePhone() and setTablet(). This -// will be remedied in the future. For now, just make sure you call just either for a view, and just -// once, with the bool parameter as true. In the future, this will probably be changed into using an -// enum for the kind of the view, that can be DESKTOP, MOBILEPHONE, or TABLET. +// Call either setMobilePhone() or setTablet() for a view, and at most once. (If neither is called, +// the view is assumed to be on a desktop browser.) In the future, this will possibly be changed +// into using an enum for the kind of the view, that can be DESKTOP, MOBILEPHONE, or TABLET. // Tell that LOK view is on a mobile phone (regardless what its pixel resolution is, whether its form factor is "phablet" or not) -COMPHELPER_DLLPUBLIC void setMobilePhone(int nViewId, bool bIsMobilePhone); +COMPHELPER_DLLPUBLIC void setMobilePhone(int nViewId); // Tell that LOK view is on a tablet -COMPHELPER_DLLPUBLIC void setTablet(int nViewId, bool bIsTablet); +COMPHELPER_DLLPUBLIC void setTablet(int nViewId); enum class statusIndicatorCallbackType { Start, SetValue, Finish }; |