[Libreoffice-commits] .: Branch 'libreoffice-3-4' - sw/source
Caolán McNamara
caolan at kemper.freedesktop.org
Wed Aug 24 08:52:48 PDT 2011
sw/source/ui/config/optpage.cxx | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
New commits:
commit ab04c2969ab134ed5131f5777b05d8e5fe9a4d18
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date: Wed Aug 24 16:33:04 2011 +0100
fdo#40341: hide 'math baseline alignment' unless available
Signed-off-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 4602efe..d941013 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -1456,9 +1456,11 @@ sal_Bool SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet& rSet )
bRet = sal_True;
}
- m_pWrtShell->GetDoc()->set( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT,
- m_aMathBaselineAlignmentCB.IsChecked() );
- bRet |= m_aMathBaselineAlignmentCB.IsChecked() != m_aMathBaselineAlignmentCB.GetSavedValue();
+ if (m_pWrtShell) {
+ m_pWrtShell->GetDoc()->set( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT,
+ m_aMathBaselineAlignmentCB.IsChecked() );
+ bRet |= m_aMathBaselineAlignmentCB.IsChecked() != m_aMathBaselineAlignmentCB.GetSavedValue();
+ }
if( aCrsrInProtCB.IsChecked() != aCrsrInProtCB.GetSavedValue())
{
@@ -1505,8 +1507,12 @@ void SwShdwCrsrOptionsTabPage::Reset( const SfxItemSet& rSet )
aFillTabRB.Check( FILL_TAB == eMode );
aFillSpaceRB.Check( FILL_SPACE == eMode );
- m_aMathBaselineAlignmentCB.Check( m_pWrtShell->GetDoc()->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT ) );
- m_aMathBaselineAlignmentCB.SaveValue();
+ if (m_pWrtShell) {
+ m_aMathBaselineAlignmentCB.Check( m_pWrtShell->GetDoc()->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT ) );
+ m_aMathBaselineAlignmentCB.SaveValue();
+ } else {
+ m_aMathBaselineAlignmentCB.Hide();
+ }
if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_CRSR_IN_PROTECTED, sal_False, &pItem ))
aCrsrInProtCB.Check(((const SfxBoolItem*)pItem)->GetValue());
More information about the Libreoffice-commits
mailing list