summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2014-03-23 23:07:35 +0100
committerMatteo Casalin <matteo.casalin@yahoo.com>2014-03-24 23:22:12 +0100
commitee84eb9678c1743d3e7387359158e2509adeb87f (patch)
tree2c51c24b82d49ab58f80664c40ceca48dc5c0454 /sw
parentd6fea2034f25b68de46a2734b9d03d1b2ecd2622 (diff)
Do not compare the same OUString twice
Change-Id: Id915a41e3cc50720d36955da9aa2c7efa6c9034c
Diffstat (limited to 'sw')
-rw-r--r--sw/source/ui/index/cnttab.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 3433bef8c211..658b00425f20 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -2448,8 +2448,9 @@ IMPL_LINK(SwTOXEntryTabPage, StyleSelectHdl, ListBox*, pBox)
{
OUString sEntry = pBox->GetSelectEntry();
const sal_uInt16 nId = (sal_uInt16)(sal_IntPtr)pBox->GetEntryData(pBox->GetSelectEntryPos());
- m_pEditStylePB->Enable(sEntry != sNoCharStyle);
- if(sEntry == sNoCharStyle)
+ const bool bEqualsNoCharStyle = sEntry == sNoCharStyle;
+ m_pEditStylePB->Enable(!bEqualsNoCharStyle);
+ if (bEqualsNoCharStyle)
sEntry = "";
Control* pCtrl = m_pTokenWIN->GetActiveControl();
OSL_ENSURE(pCtrl, "no active control?");