summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-01-14 10:08:08 +0000
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2019-01-14 16:33:10 +0100
commita3db8a7ec8c28053c6bd3ca3e5e30bd2cedf7d57 (patch)
tree9bec4142a0b8880304ce3b72166fdb71c2b97763 /cui
parent3b10c732a83122198886ec16986110d5ad668a1e (diff)
Resolves: tdf#122627 be explicit about what column to check
Change-Id: Icdd1cef6b0bc9d8dd61c309dc9de66021fc9422d Reviewed-on: https://gerrit.libreoffice.org/66287 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/tabpages/autocdlg.cxx24
1 files changed, 12 insertions, 12 deletions
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 0c76a85333c5..6f9f82a0eb62 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -245,6 +245,10 @@ void OfaAutocorrOptionsPage::InsertEntry(const OUString& rTxt)
m_xCheckLB->set_text(nRow, rTxt, 1);
}
+#define CBCOL_FIRST 0
+#define CBCOL_SECOND 1
+#define CBCOL_BOTH 2
+
void OfaAutocorrOptionsPage::Reset( const SfxItemSet* )
{
SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect();
@@ -263,14 +267,14 @@ void OfaAutocorrOptionsPage::Reset( const SfxItemSet* )
InsertEntry(m_sAccidentalCaps);
int nPos = 0;
- m_xCheckLB->set_toggle( nPos++, bool(nFlags & ACFlags::Autocorrect) );
- m_xCheckLB->set_toggle( nPos++, bool(nFlags & ACFlags::CapitalStartWord) );
- m_xCheckLB->set_toggle( nPos++, bool(nFlags & ACFlags::CapitalStartSentence) );
- m_xCheckLB->set_toggle( nPos++, bool(nFlags & ACFlags::ChgWeightUnderl) );
- m_xCheckLB->set_toggle( nPos++, bool(nFlags & ACFlags::SetINetAttr) );
- m_xCheckLB->set_toggle( nPos++, bool(nFlags & ACFlags::ChgToEnEmDash) );
- m_xCheckLB->set_toggle( nPos++, bool(nFlags & ACFlags::IgnoreDoubleSpace) );
- m_xCheckLB->set_toggle( nPos++, bool(nFlags & ACFlags::CorrectCapsLock) );
+ m_xCheckLB->set_toggle( nPos++, bool(nFlags & ACFlags::Autocorrect), CBCOL_FIRST );
+ m_xCheckLB->set_toggle( nPos++, bool(nFlags & ACFlags::CapitalStartWord), CBCOL_FIRST );
+ m_xCheckLB->set_toggle( nPos++, bool(nFlags & ACFlags::CapitalStartSentence), CBCOL_FIRST );
+ m_xCheckLB->set_toggle( nPos++, bool(nFlags & ACFlags::ChgWeightUnderl), CBCOL_FIRST );
+ m_xCheckLB->set_toggle( nPos++, bool(nFlags & ACFlags::SetINetAttr), CBCOL_FIRST );
+ m_xCheckLB->set_toggle( nPos++, bool(nFlags & ACFlags::ChgToEnEmDash), CBCOL_FIRST );
+ m_xCheckLB->set_toggle( nPos++, bool(nFlags & ACFlags::IgnoreDoubleSpace), CBCOL_FIRST );
+ m_xCheckLB->set_toggle( nPos++, bool(nFlags & ACFlags::CorrectCapsLock), CBCOL_FIRST );
m_xCheckLB->thaw();
}
@@ -319,10 +323,6 @@ public:
/* */
/*********************************************************************/
-#define CBCOL_FIRST 0
-#define CBCOL_SECOND 1
-#define CBCOL_BOTH 2
-
enum OfaAutoFmtOptions
{
USE_REPLACE_TABLE,