diff options
Diffstat (limited to 'sw/source/ui/config/optload.cxx')
-rw-r--r-- | sw/source/ui/config/optload.cxx | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx index 558ea5dc5796..92e754113aff 100644 --- a/sw/source/ui/config/optload.cxx +++ b/sw/source/ui/config/optload.cxx @@ -154,18 +154,27 @@ OUString SwLoadOptPage::GetAllStrings() "tablabel", "label4", "label7", "labelstandardpages" }; for (const auto& label : labels) - sAllStrings += m_xBuilder->weld_label(label)->get_label() + " "; + { + if (const auto& pString = m_xBuilder->weld_label(label)) + sAllStrings += pString->get_label() + " "; + } OUString checkButton[] = { "updatefields", "updatecharts", "usecharunit", "squaremode", "standardizedpageshow" }; for (const auto& check : checkButton) - sAllStrings += m_xBuilder->weld_check_button(check)->get_label() + " "; + { + if (const auto& pString = m_xBuilder->weld_check_button(check)) + sAllStrings += pString->get_label() + " "; + } OUString radioButton[] = { "always", "onrequest", "never" }; for (const auto& radio : radioButton) - sAllStrings += m_xBuilder->weld_radio_button(radio)->get_label() + " "; + { + if (const auto& pString = m_xBuilder->weld_radio_button(radio)) + sAllStrings += pString->get_label() + " "; + } return sAllStrings.replaceAll("_", ""); } @@ -572,9 +581,13 @@ OUString SwCaptionOptPage::GetAllStrings() "label6", "label10", "label3" }; for (const auto& label : labels) - sAllStrings += m_xBuilder->weld_label(label)->get_label() + " "; + { + if (const auto& pString = m_xBuilder->weld_label(label)) + sAllStrings += pString->get_label() + " "; + } - sAllStrings += m_xBuilder->weld_check_button("applyborder")->get_label() + " "; + if (const auto& pString = m_xBuilder->weld_check_button("applyborder")) + sAllStrings += pString->get_label() + " "; return sAllStrings.replaceAll("_", ""); } |