summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2017-07-07 16:22:47 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-07-11 17:44:32 +0200
commitd778119b867b67241b54fd7a9698c839e9bc00f5 (patch)
tree8bec557c3b826e9d5c892ccf3e061ea4f5d49a10 /include
parentfcb7465df1fed433e795c1635e07f529897f2496 (diff)
tdf#108925: Too small bullet size confuses the user
Add a constraint for bullet relative size to avoid too small bullets which are hardly recognizable. Use the same 25% lower limit what MSO uses. Change-Id: Id956ecf3ec831c569188b944be58da03bf30a55e Reviewed-on: https://gerrit.libreoffice.org/39696 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit 11652be4071ef6d1d89b2c397aa1a32476e03bf6) Reviewed-on: https://gerrit.libreoffice.org/39707 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r--include/editeng/numitem.hxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/editeng/numitem.hxx b/include/editeng/numitem.hxx
index 16d418de7f7b..1e72154b43b2 100644
--- a/include/editeng/numitem.hxx
+++ b/include/editeng/numitem.hxx
@@ -34,6 +34,7 @@
#include <editeng/editengdllapi.h>
#include <o3tl/typed_flags_set.hxx>
#include <memory>
+#include <algorithm>
class SvxBrushItem;
namespace vcl { class Font; }
@@ -48,6 +49,8 @@ namespace com{namespace sun{ namespace star{
#define SVX_NO_NUM 200 // Marker for no numbering
#define SVX_NO_NUMLEVEL 0x20
+#define SVX_NUM_REL_SIZE_MIN 25 // Lower limit for numbering relative size
+
#define LINK_TOKEN 0x80 //indicate linked bitmaps - for use in dialog only
class EDITENG_DLLPUBLIC SvxNumberType
@@ -168,7 +171,7 @@ public:
const vcl::Font* GetBulletFont() const {return pBulletFont;}
void SetBulletChar(sal_Unicode cSet){cBullet = cSet;}
sal_Unicode GetBulletChar()const {return cBullet;}
- void SetBulletRelSize(sal_uInt16 nSet) {nBulletRelSize = nSet;}
+ void SetBulletRelSize(sal_uInt16 nSet) {nBulletRelSize = std::max(nSet,sal_uInt16(SVX_NUM_REL_SIZE_MIN));}
sal_uInt16 GetBulletRelSize() const { return nBulletRelSize;}
void SetBulletColor(Color nSet){nBulletColor = nSet;}
const Color& GetBulletColor()const {return nBulletColor;}