summaryrefslogtreecommitdiff
path: root/lotuswordpro/source/filter/lwpfrib.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'lotuswordpro/source/filter/lwpfrib.cxx')
-rw-r--r--lotuswordpro/source/filter/lwpfrib.cxx40
1 files changed, 20 insertions, 20 deletions
diff --git a/lotuswordpro/source/filter/lwpfrib.cxx b/lotuswordpro/source/filter/lwpfrib.cxx
index cb14d3a4324d..37684d7d703e 100644
--- a/lotuswordpro/source/filter/lwpfrib.cxx
+++ b/lotuswordpro/source/filter/lwpfrib.cxx
@@ -291,29 +291,29 @@ void LwpFrib::RegisterStyle(LwpFoundry* pFoundry)
}
}
- if (m_pModifiers->HasHighlight)
+ if (!m_pModifiers->HasHighlight)
+ return;
+
+ XFColor aColor = GetHighlightColor();//right yellow
+ if (pStyle)//change the style directly
+ pStyle->GetFont()->SetBackColor(aColor);
+ else //register a new style
{
- XFColor aColor = GetHighlightColor();//right yellow
- if (pStyle)//change the style directly
- pStyle->GetFont()->SetBackColor(aColor);
- else //register a new style
- {
- std::unique_ptr<XFTextStyle> pNewStyle(new XFTextStyle());
+ std::unique_ptr<XFTextStyle> pNewStyle(new XFTextStyle());
- if (!m_StyleName.isEmpty())
- {
- XFTextStyle* pOldStyle = pXFStyleManager->FindTextStyle(m_StyleName);
- *pNewStyle = *pOldStyle;
- pNewStyle->GetFont()->SetBackColor(aColor);
- }
- else
- {
- pFont = new XFFont;
- pFont->SetBackColor(aColor);
- pNewStyle->SetFont(pFont);
- }
- m_StyleName = pXFStyleManager->AddStyle(std::move(pNewStyle)).m_pStyle->GetStyleName();
+ if (!m_StyleName.isEmpty())
+ {
+ XFTextStyle* pOldStyle = pXFStyleManager->FindTextStyle(m_StyleName);
+ *pNewStyle = *pOldStyle;
+ pNewStyle->GetFont()->SetBackColor(aColor);
+ }
+ else
+ {
+ pFont = new XFFont;
+ pFont->SetBackColor(aColor);
+ pNewStyle->SetFont(pFont);
}
+ m_StyleName = pXFStyleManager->AddStyle(std::move(pNewStyle)).m_pStyle->GetStyleName();
}
}