[Libreoffice-commits] .: sw/source
Cédric Bosdonnat
cbosdo at kemper.freedesktop.org
Tue Aug 14 02:50:58 PDT 2012
sw/source/ui/misc/pggrid.cxx | 10 ++++++++++
1 file changed, 10 insertions(+)
New commits:
commit 89587e6cf1182095e52f6c5a3ddab35c783fca2e
Author: Takeshi Abe <tabe at 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
{
More information about the Libreoffice-commits
mailing list