summaryrefslogtreecommitdiff
path: root/sw/source/ui/config
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/config')
-rw-r--r--sw/source/ui/config/optload.cxx47
-rw-r--r--sw/source/ui/config/optpage.cxx37
2 files changed, 43 insertions, 41 deletions
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index 1824dc7ab7ac..544aa7e7fe20 100644
--- a/sw/source/ui/config/optload.cxx
+++ b/sw/source/ui/config/optload.cxx
@@ -807,30 +807,31 @@ IMPL_LINK_NOARG(SwCaptionOptPage, SaveEntryHdl, SvTreeListBox*, void)
void SwCaptionOptPage::SaveEntry(SvTreeListEntry const * pEntry)
{
- if (pEntry)
- {
- InsCaptionOpt* pOpt = static_cast<InsCaptionOpt*>(pEntry->GetUserData());
+ if (!pEntry)
+ return;
+
+ InsCaptionOpt* pOpt = static_cast<InsCaptionOpt*>(pEntry->GetUserData());
+
+ pOpt->UseCaption() = m_pCheckLB->IsChecked(m_pCheckLB->GetModel()->GetAbsPos(pEntry));
+ const OUString aName( m_pCategoryBox->GetText() );
+ if (aName == m_sNone)
+ pOpt->SetCategory("");
+ else
+ pOpt->SetCategory(comphelper::string::strip(aName, ' '));
+ pOpt->SetNumType((sal_uInt16)reinterpret_cast<sal_uLong>(m_pFormatBox->GetSelectedEntryData()));
+ pOpt->SetCaption(m_pTextEdit->IsEnabled() ? m_pTextEdit->GetText() : OUString() );
+ pOpt->SetPos(m_pPosBox->GetSelectedEntryPos());
+ sal_Int32 nPos = m_pLbLevel->GetSelectedEntryPos();
+ sal_Int32 nLevel = ( nPos > 0 && nPos != LISTBOX_ENTRY_NOTFOUND ) ? nPos - 1 : MAXLEVEL;
+ pOpt->SetLevel(nLevel);
+ pOpt->SetSeparator(m_pEdDelim->GetText());
+ pOpt->SetNumSeparator( m_pNumberingSeparatorED->GetText());
+ if(!m_pCharStyleLB->GetSelectedEntryPos())
+ pOpt->SetCharacterStyle("");
+ else
+ pOpt->SetCharacterStyle(m_pCharStyleLB->GetSelectedEntry());
+ pOpt->CopyAttributes() = m_pApplyBorderCB->IsChecked();
- pOpt->UseCaption() = m_pCheckLB->IsChecked(m_pCheckLB->GetModel()->GetAbsPos(pEntry));
- const OUString aName( m_pCategoryBox->GetText() );
- if (aName == m_sNone)
- pOpt->SetCategory("");
- else
- pOpt->SetCategory(comphelper::string::strip(aName, ' '));
- pOpt->SetNumType((sal_uInt16)reinterpret_cast<sal_uLong>(m_pFormatBox->GetSelectedEntryData()));
- pOpt->SetCaption(m_pTextEdit->IsEnabled() ? m_pTextEdit->GetText() : OUString() );
- pOpt->SetPos(m_pPosBox->GetSelectedEntryPos());
- sal_Int32 nPos = m_pLbLevel->GetSelectedEntryPos();
- sal_Int32 nLevel = ( nPos > 0 && nPos != LISTBOX_ENTRY_NOTFOUND ) ? nPos - 1 : MAXLEVEL;
- pOpt->SetLevel(nLevel);
- pOpt->SetSeparator(m_pEdDelim->GetText());
- pOpt->SetNumSeparator( m_pNumberingSeparatorED->GetText());
- if(!m_pCharStyleLB->GetSelectedEntryPos())
- pOpt->SetCharacterStyle("");
- else
- pOpt->SetCharacterStyle(m_pCharStyleLB->GetSelectedEntry());
- pOpt->CopyAttributes() = m_pApplyBorderCB->IsChecked();
- }
}
IMPL_LINK_NOARG(SwCaptionOptPage, ModifyHdl, Edit&, void)
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index a603ef992b81..b30f1bc72127 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -1356,25 +1356,26 @@ SwShdwCursorOptionsTabPage::SwShdwCursorOptionsTabPage( vcl::Window* pParent,
m_pFillSpaceRB->Check( FILL_SPACE == eMode );
m_pFillTabAndSpaceRB->Check( FILL_TAB_SPACE == eMode );
- if(SfxItemState::SET == rSet.GetItemState(SID_HTML_MODE, false, &pItem )
- && static_cast<const SfxUInt16Item*>(pItem)->GetValue() & HTMLMODE_ON)
- {
- m_pTabCB->Hide();
- m_pCharHiddenCB->Hide();
- m_pFieldHiddenCB->Hide();
- m_pFieldHiddenParaCB->Hide();
+ if(SfxItemState::SET != rSet.GetItemState(SID_HTML_MODE, false, &pItem )
+ || !(static_cast<const SfxUInt16Item*>(pItem)->GetValue() & HTMLMODE_ON))
+ return;
+
+ m_pTabCB->Hide();
+ m_pCharHiddenCB->Hide();
+ m_pFieldHiddenCB->Hide();
+ m_pFieldHiddenParaCB->Hide();
+
+ m_pDirectCursorFrame->Hide();
+ m_pOnOffCB->Hide();
+ m_pFillMarginRB->Hide();
+ m_pFillIndentRB->Hide();
+ m_pFillTabRB->Hide();
+ m_pFillSpaceRB->Hide();
+ m_pFillTabAndSpaceRB->Hide();
+
+ m_pCursorProtFrame->Hide();
+ m_pCursorInProtCB->Hide();
- m_pDirectCursorFrame->Hide();
- m_pOnOffCB->Hide();
- m_pFillMarginRB->Hide();
- m_pFillIndentRB->Hide();
- m_pFillTabRB->Hide();
- m_pFillSpaceRB->Hide();
- m_pFillTabAndSpaceRB->Hide();
-
- m_pCursorProtFrame->Hide();
- m_pCursorInProtCB->Hide();
- }
}
SwShdwCursorOptionsTabPage::~SwShdwCursorOptionsTabPage()