diff options
author | Justin Luth <justin.luth@collabora.com> | 2019-11-15 20:32:29 +0300 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-05-13 08:59:45 +0200 |
commit | 69708eeced1d27f79b230405b21ef40e0e5bd765 (patch) | |
tree | 0489811846aeac847ba25194c86a68c715feeea5 | |
parent | 47c81498c63ae71a351f43ec2f073ba92d99fc1d (diff) |
NFC sw: cleanup and make RES_POOLTABSTYLE_DEFAULT consistent
It was introduced in 2016, and shortly thereafter many other
styles were added using the full word TABLE. So make this one
consistent since the eye just glances over the difference.
In fact, in one place a comment even referred it it as
_TABLESTYLE_DEFAULT.
At first I was going to limit the change to just the one
term, but the number of reference for everything was fairly
small, so I just made everything consistent.
Change-Id: I57cc0d081c4bbd5bcea872259065af483c94a334
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/82997
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | sw/inc/poolfmt.hxx | 8 | ||||
-rw-r--r-- | sw/source/core/doc/DocumentStylePoolManager.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/doc/SwStyleNameMapper.cxx | 8 | ||||
-rw-r--r-- | sw/source/core/doc/tblafmt.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/html/htmltab.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/docvw/edtwin.cxx | 2 |
6 files changed, 13 insertions, 13 deletions
diff --git a/sw/inc/poolfmt.hxx b/sw/inc/poolfmt.hxx index f23589032b9b..44d9214fe0f2 100644 --- a/sw/inc/poolfmt.hxx +++ b/sw/inc/poolfmt.hxx @@ -200,10 +200,10 @@ RES_POOLNUMRULE_END }; // IDs for table styles. -enum RES_POOL_TABSTYLE_TYPE +enum RES_POOL_TABLESTYLE_TYPE { -RES_POOLTABSTYLE_BEGIN = POOLGRP_TABSTYLE, -RES_POOLTABSTYLE_DEFAULT = RES_POOLTABSTYLE_BEGIN, +RES_POOLTABLESTYLE_BEGIN = POOLGRP_TABSTYLE, +RES_POOLTABLESTYLE_DEFAULT = RES_POOLTABLESTYLE_BEGIN, // 16 old styles RES_POOLTABLESTYLE_3D, RES_POOLTABLESTYLE_BLACK1, @@ -232,7 +232,7 @@ RES_POOLTABLESTYLE_LO6_FINANCIAL, RES_POOLTABLESTYLE_LO6_SIMPLE_GRID_COLUMNS, RES_POOLTABLESTYLE_LO6_SIMPLE_GRID_ROWS, RES_POOLTABLESTYLE_LO6_SIMPLE_LIST_SHADED, -RES_POOLTABSTYLE_END +RES_POOLTABLESTYLE_END }; enum RES_POOL_CELLSTYLE_TYPE diff --git a/sw/source/core/doc/DocumentStylePoolManager.cxx b/sw/source/core/doc/DocumentStylePoolManager.cxx index 6dcc7e4cd902..b3ccc8913ebb 100644 --- a/sw/source/core/doc/DocumentStylePoolManager.cxx +++ b/sw/source/core/doc/DocumentStylePoolManager.cxx @@ -527,7 +527,7 @@ static const char* STR_POOLNUMRULE_NUM_ARY[] = // XXX MUST match the entries of TableStyleProgNameTable in // sw/source/core/doc/SwStyleNameMapper.cxx and MUST match the order of -// RES_POOL_TABSTYLE_TYPE in sw/inc/poolfmt.hxx +// RES_POOL_TABLESTYLE_TYPE in sw/inc/poolfmt.hxx static const char* STR_TABSTYLE_ARY[] = { // XXX MUST be in order, Writer first, then Svx old, then Svx new diff --git a/sw/source/core/doc/SwStyleNameMapper.cxx b/sw/source/core/doc/SwStyleNameMapper.cxx index 17c14e7eb925..9f2f88c6d1cc 100644 --- a/sw/source/core/doc/SwStyleNameMapper.cxx +++ b/sw/source/core/doc/SwStyleNameMapper.cxx @@ -153,7 +153,7 @@ NameToIdHash GetNumRuleMap(bool bProgName) NameToIdHash GetTableStyleMap(bool bProgName) { return HashFromRange(0, - RES_POOLTABSTYLE_BEGIN, RES_POOLTABSTYLE_END, bProgName ? &SwStyleNameMapper::GetTableStyleProgNameArray : &SwStyleNameMapper::GetTableStyleUINameArray + RES_POOLTABLESTYLE_BEGIN, RES_POOLTABLESTYLE_END, bProgName ? &SwStyleNameMapper::GetTableStyleProgNameArray : &SwStyleNameMapper::GetTableStyleUINameArray ); }; @@ -389,10 +389,10 @@ const OUString& SwStyleNameMapper::getNameFromId( } break; case POOLGRP_TABSTYLE: - if( RES_POOLTABSTYLE_BEGIN <= nId && nId < RES_POOLTABSTYLE_END ) + if( RES_POOLTABLESTYLE_BEGIN <= nId && nId < RES_POOLTABLESTYLE_END ) { pStrArr = bProgName ? &GetTableStyleProgNameArray() : &GetTableStyleUINameArray(); - nStt = RES_POOLTABSTYLE_BEGIN; + nStt = RES_POOLTABLESTYLE_BEGIN; } break; } @@ -717,7 +717,7 @@ const std::vector<OUString>& SwStyleNameMapper::GetTableStyleProgNameArray() { // XXX MUST match the entries of STR_TABSTYLE_ARY in // sw/source/core/doc/DocumentStylePoolManager.cxx and MUST match the order of - // RES_POOL_TABSTYLE_TYPE in sw/inc/poolfmt.hxx + // RES_POOL_TABLESTYLE_TYPE in sw/inc/poolfmt.hxx static const std::vector<OUString> s_aTableStyleProgNameArray = { "Default Style", // RES_POOLTABLESTYLE_DEFAULT "3D", // RES_POOLTABLESTYLE_3D diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx index 474a7a7bfd09..293e87898cdb 100644 --- a/sw/source/core/doc/tblafmt.cxx +++ b/sw/source/core/doc/tblafmt.cxx @@ -763,7 +763,7 @@ bool SwTableAutoFormat::Load( SvStream& rStream, const SwAfVersions& rVersions ) { rStream.ReadUInt16( m_nStrResId ); // start from 3d because default is added via constructor - if( m_nStrResId < RES_POOLTABSTYLE_END - RES_POOLTABLESTYLE_3D ) + if( m_nStrResId < RES_POOLTABLESTYLE_END - RES_POOLTABLESTYLE_3D ) { m_aName = SwStyleNameMapper::GetUIName(RES_POOLTABLESTYLE_3D + m_nStrResId, m_aName); } @@ -1012,7 +1012,7 @@ SwTableAutoFormatTable::SwTableAutoFormatTable() : m_pImpl(new Impl) { std::unique_ptr<SwTableAutoFormat> pNew(new SwTableAutoFormat( - SwStyleNameMapper::GetUIName(RES_POOLTABSTYLE_DEFAULT, OUString()))); + SwStyleNameMapper::GetUIName(RES_POOLTABLESTYLE_DEFAULT, OUString()))); sal_uInt8 i; diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx index 30ca53a3fc9e..c42bc5eedfd2 100644 --- a/sw/source/filter/html/htmltab.cxx +++ b/sw/source/filter/html/htmltab.cxx @@ -1484,7 +1484,7 @@ void HTMLTable::FixFrameFormat( SwTableBox *pBox, // the same. SwTableAutoFormatTable& rTable = m_pParser->GetDoc()->GetTableStyles(); SwTableAutoFormat* pTableFormat = rTable.FindAutoFormat( - SwStyleNameMapper::GetUIName(RES_POOLTABSTYLE_DEFAULT, OUString())); + SwStyleNameMapper::GetUIName(RES_POOLTABLESTYLE_DEFAULT, OUString())); if (pTableFormat) { sal_uInt8 nPos = SwTableAutoFormat::CountPos(nCol, m_nCols, nRow, m_nRows); diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index bdabfc6def76..88d45a8141bc 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -151,7 +151,7 @@ static bool g_bInputLanguageSwitched = false; // not currently being pulled open. Unfortunately in MouseButtonDown there // is being selected at double/triple click. That selection is completely // finished in the Handler and thus can't be distinguished in the Up. -// To resolve this g_bHoldSelection is set in Down at evaluated in Up. +// To resolve this g_bHoldSelection is set in Down and evaluated in Up. static bool g_bHoldSelection = false; bool g_bFrameDrag = false; |