summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2012-07-15 23:46:05 +0900
committerCédric Bosdonnat <cedric.bosdonnat@free.fr>2012-08-14 11:48:58 +0200
commit89587e6cf1182095e52f6c5a3ddab35c783fca2e (patch)
treedbfa2484cc5b6a611ca627be97f983678167b7dc /sw
parent690078182aa82ba41e7da849d0fef271bb55c847 (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.cxx10
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
{