diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2012-07-15 23:46:05 +0900 |
---|---|---|
committer | Cédric Bosdonnat <cedric.bosdonnat@free.fr> | 2012-08-14 11:48:58 +0200 |
commit | 89587e6cf1182095e52f6c5a3ddab35c783fca2e (patch) | |
tree | dbfa2484cc5b6a611ca627be97f983678167b7dc /sw | |
parent | 690078182aa82ba41e7da849d0fef271bb55c847 (diff) |
fdo#50941: "Characters per line" will not change when changing "Max base text size"
max characters per line follows max base text size in the squared mode of text grid
Change-Id: I47f8cd0db1ece5c940f31aada7d51d40058c7513
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/misc/pggrid.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx index 86f7a2f50c1f..5be1e5732d6d 100644 --- a/sw/source/ui/misc/pggrid.cxx +++ b/sw/source/ui/misc/pggrid.cxx @@ -453,6 +453,16 @@ IMPL_LINK(SwTextGridPage, TextSizeChangedHdl, SpinField*, pField) if (&aTextSizeMF == pField) { m_bRubyUserValue = sal_False; + + // fdo#50941: set maximum characters per line + sal_Int32 nTextSize = static_cast< sal_Int32 >(aTextSizeMF.Denormalize(aTextSizeMF.GetValue(FUNIT_TWIP))); + if (nTextSize > 0) + { + sal_Int32 nMaxChars = m_aPageSize.Width() / nTextSize; + aCharsPerLineNF.SetValue(nMaxChars); + aCharsPerLineNF.SetMax(nMaxChars); + SetLinesOrCharsRanges( aCharsRangeFT , aCharsPerLineNF.GetMax() ); + } } //set maximum line per page { |