summaryrefslogtreecommitdiff
path: root/sw/source/uibase/config
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2022-10-27 22:12:35 +0200
committerTomaž Vajngerl <quikee@gmail.com>2022-11-17 14:54:28 +0100
commit8c56abfa64be106c44b2d878968b9b019e126c40 (patch)
treed68c7d339a03ac7e16305e5649c423256eaccfa1 /sw/source/uibase/config
parent21c4749d0205d1ba90494edc2527ff9d11f86f87 (diff)
sw: convert ViewOptFlags1 from bitflags to struct of bools
Much easier to deal with - let compiler do the bit setting. Change-Id: I9412e1a2f15e41c9ebf502af57b127c283fc1fa6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142214 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'sw/source/uibase/config')
-rw-r--r--sw/source/uibase/config/viewopt.cxx25
1 files changed, 2 insertions, 23 deletions
diff --git a/sw/source/uibase/config/viewopt.cxx b/sw/source/uibase/config/viewopt.cxx
index c5e6f3e56b9e..54bbe0636274 100644
--- a/sw/source/uibase/config/viewopt.cxx
+++ b/sw/source/uibase/config/viewopt.cxx
@@ -98,12 +98,12 @@ bool SwViewOption::IsEqualFlags( const SwViewOption &rOpt ) const
bool SwViewOption::IsShowOutlineContentVisibilityButton() const
{
- return static_cast<bool>(m_nCoreOptions & ViewOptFlags1::ShowOutlineContentVisibilityButton);
+ return m_nCoreOptions.bShowOutlineContentVisibilityButton;
}
bool SwViewOption::IsTreatSubOutlineLevelsAsContent() const
{
- return static_cast<bool>(m_nCoreOptions & ViewOptFlags1::TreatSubOutlineLevelsAsContent);
+ return m_nCoreOptions.bTreatSubOutlineLevelsAsContent;
}
void SwViewOption::DrawRect( OutputDevice *pOut,
@@ -178,19 +178,6 @@ SwViewOption::SwViewOption() :
m_eZoom( SvxZoomType::PERCENT ),
m_nTableDestination(TBL_DEST_CELL)
{
- // Initialisation is a little simpler now
- // all Bits to 0
- m_nCoreOptions =
- ViewOptFlags1::HardBlank |
- ViewOptFlags1::SoftHyph |
- ViewOptFlags1::Ref |
- ViewOptFlags1::Graphic |
- ViewOptFlags1::Table |
- ViewOptFlags1::Draw |
- ViewOptFlags1::Control |
- ViewOptFlags1::Pageback |
- ViewOptFlags1::Postits;
-
m_nCore2Options =
ViewOptCoreFlags2::BlackFont |
ViewOptCoreFlags2::HiddenPara;
@@ -334,14 +321,6 @@ bool SwViewOption::IsAutoCompleteWords()
return rFlags.bAutoCmpltCollectWords;
}
-void SwViewOption::SetOnlineSpell(bool b)
-{
- if (b)
- m_nCoreOptions |= ViewOptFlags1::OnlineSpell;
- else
- m_nCoreOptions &= ~ViewOptFlags1::OnlineSpell;
-}
-
AuthorCharAttr::AuthorCharAttr() :
m_nItemId (SID_ATTR_CHAR_UNDERLINE),
m_nAttr (LINESTYLE_SINGLE),