[Libreoffice-commits] core.git: cui/source
Joren De Cuyper
jorendc at libreoffice.org
Tue Aug 12 01:20:26 PDT 2014
cui/source/tabpages/paragrph.cxx | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
New commits:
commit ff12ec8ea00530768d5e07dcc9ab200ce7f54ef6
Author: Joren De Cuyper <jorendc at libreoffice.org>
Date: Thu Jul 31 12:28:33 2014 +0200
fdo#41350 "Expand Single Word" only shown active for "Last line: Justified"
Change-Id: Ibe90d041f15fd007026676ea626c672a9805b263
Reviewed-on: https://gerrit.libreoffice.org/10656
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index 21dc407..db62e93 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -1171,9 +1171,7 @@ void SvxParaAlignTabPage::Reset( const SfxItemSet* rSet )
bool bEnable = m_pJustify->IsChecked();
m_pLastLineFT->Enable(bEnable);
m_pLastLineLB->Enable(bEnable);
- m_pExpandCB->Enable(bEnable);
- m_pExpandCB->Check(SVX_ADJUST_BLOCK == rAdj.GetOneWord());
switch(rAdj.GetLastBlock())
{
case SVX_ADJUST_LEFT: nLBSelect = 0; break;
@@ -1183,6 +1181,8 @@ void SvxParaAlignTabPage::Reset( const SfxItemSet* rSet )
case SVX_ADJUST_BLOCK: nLBSelect = 2; break;
default: ; //prevent warning
}
+ m_pExpandCB->Enable(bEnable && nLBSelect == 2);
+ m_pExpandCB->Check(SVX_ADJUST_BLOCK == rAdj.GetOneWord());
}
else
{
@@ -1249,13 +1249,17 @@ IMPL_LINK_NOARG(SvxParaAlignTabPage, AlignHdl_Impl)
bool bJustify = m_pJustify->IsChecked();
m_pLastLineFT->Enable(bJustify);
m_pLastLineLB->Enable(bJustify);
- m_pExpandCB->Enable(bJustify);
+ bool bLastLineIsBlock = m_pLastLineLB->GetSelectEntryPos() == 2;
+ m_pExpandCB->Enable(bJustify && bLastLineIsBlock);
UpdateExample_Impl(false);
return 0;
}
IMPL_LINK_NOARG(SvxParaAlignTabPage, LastLineHdl_Impl)
{
+ //fdo#41350 only enable 'Expand last word' if last line is also justified
+ bool bLastLineIsBlock = m_pLastLineLB->GetSelectEntryPos() == 2;
+ m_pExpandCB->Enable(bLastLineIsBlock);
UpdateExample_Impl(false);
return 0;
}
More information about the Libreoffice-commits
mailing list