sw/source/ui/misc/pggrid.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+)
New commits: commit 89587e6cf1182095e52f6c5a3ddab35c783fca2e Author: Takeshi Abe <t...@fixedpoint.jp> Date: Sun Jul 15 23:46:05 2012 +0900 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 diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx index 86f7a2f..5be1e57 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 { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits