diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-07-30 10:39:15 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-07-30 20:18:57 +0200 |
commit | 4209d94b46cdd96898c02344b11700369ae88784 (patch) | |
tree | 02fedf63092cb7d00cd3b4c4a6b5a35eff952f41 /sw/source/ui/dialog/ascfldlg.cxx | |
parent | 30562669909def344c529e9c899c03248bc11149 (diff) |
loplugin:flatten in sw/ui/dialog..sw/ui/table
Change-Id: I2350c1d3f5fab727b0d47b6f3684804b77e68122
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99805
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/ui/dialog/ascfldlg.cxx')
-rw-r--r-- | sw/source/ui/dialog/ascfldlg.cxx | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/sw/source/ui/dialog/ascfldlg.cxx b/sw/source/ui/dialog/ascfldlg.cxx index 327c5573e67a..e05e881e45cb 100644 --- a/sw/source/ui/dialog/ascfldlg.cxx +++ b/sw/source/ui/dialog/ascfldlg.cxx @@ -276,22 +276,22 @@ void SwAsciiFilterDlg::FillOptions( SwAsciiOptions& rOptions ) // save the user settings OUString sData; rOptions.WriteUserData( sData ); - if (!sData.isEmpty()) + if (sData.isEmpty()) + return; + + const OUString sFindNm = OUString::createFromAscii( + m_xFontLB->get_visible() ? sDialogImpExtraData + : sDialogExpExtraData); + sal_Int32 nEnd, nStt = m_sExtraData.indexOf( sFindNm ); + if( -1 != nStt ) { - const OUString sFindNm = OUString::createFromAscii( - m_xFontLB->get_visible() ? sDialogImpExtraData - : sDialogExpExtraData); - sal_Int32 nEnd, nStt = m_sExtraData.indexOf( sFindNm ); - if( -1 != nStt ) - { - // called twice, so remove "old" settings - nEnd = m_sExtraData.indexOf( cDialogExtraDataClose, - nStt + nDialogExtraDataLen ); - if( -1 != nEnd ) - m_sExtraData = m_sExtraData.replaceAt( nStt, nEnd - nStt + 1, "" ); - } - m_sExtraData += sFindNm + sData + OUStringChar(cDialogExtraDataClose); + // called twice, so remove "old" settings + nEnd = m_sExtraData.indexOf( cDialogExtraDataClose, + nStt + nDialogExtraDataLen ); + if( -1 != nEnd ) + m_sExtraData = m_sExtraData.replaceAt( nStt, nEnd - nStt + 1, "" ); } + m_sExtraData += sFindNm + sData + OUStringChar(cDialogExtraDataClose); } void SwAsciiFilterDlg::SetCRLF( LineEnd eEnd ) @@ -334,18 +334,18 @@ bool SwAsciiFilterDlg::GetIncludeBOM() const void SwAsciiFilterDlg::UpdateIncludeBOMSensitiveState() { - if (m_xIncludeBOM_CB->get_visible()) + if (!m_xIncludeBOM_CB->get_visible()) + return; + + switch (m_xCharSetLB->GetSelectTextEncoding()) { - switch (m_xCharSetLB->GetSelectTextEncoding()) - { - case RTL_TEXTENCODING_UTF8: - case RTL_TEXTENCODING_UCS2: - m_xIncludeBOM_CB->set_sensitive(true); - break; - default: - m_xIncludeBOM_CB->set_sensitive(false); - break; - } + case RTL_TEXTENCODING_UTF8: + case RTL_TEXTENCODING_UCS2: + m_xIncludeBOM_CB->set_sensitive(true); + break; + default: + m_xIncludeBOM_CB->set_sensitive(false); + break; } } |