[Libreoffice-commits] core.git: compilerplugins/clang sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Nov 22 06:37:40 UTC 2018
compilerplugins/clang/unusedenumconstants.untouched.results | 2 -
sw/source/filter/html/htmlgrin.cxx | 4 +-
sw/source/filter/html/htmlsect.cxx | 8 ++--
sw/source/filter/html/htmltab.cxx | 4 +-
sw/source/filter/html/swhtml.cxx | 22 ++++++------
sw/source/filter/html/swhtml.hxx | 4 +-
6 files changed, 21 insertions(+), 23 deletions(-)
New commits:
commit 4d60a038c936011674564e517929de7f9c1080d0
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Wed Nov 21 14:50:27 2018 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Nov 22 07:37:12 2018 +0100
convert JumpToMarks to scoped enum
and remove unused JUMPTO_FRAME
Change-Id: Ic12350c66612a7be5f930d1cddd0481b397f3c53
Reviewed-on: https://gerrit.libreoffice.org/63746
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/compilerplugins/clang/unusedenumconstants.untouched.results b/compilerplugins/clang/unusedenumconstants.untouched.results
index d9f149e6cca0..1ad1d3e44b2f 100644
--- a/compilerplugins/clang/unusedenumconstants.untouched.results
+++ b/compilerplugins/clang/unusedenumconstants.untouched.results
@@ -472,8 +472,6 @@ sw/source/core/inc/txtfly.hxx:42
enum PAGESIDE LEFT_SIDE
sw/source/core/inc/txtfly.hxx:42
enum PAGESIDE DONTKNOW_SIDE
-sw/source/filter/html/swhtml.hxx:408
- enum SwHTMLParser::JumpToMarks JUMPTO_FRAME
sw/source/filter/ww8/ww8scan.hxx:388
enum ePLCFT SEP
sw/source/filter/ww8/ww8struc.hxx:944
diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx
index 9527271c2f11..2972d1bc9e59 100644
--- a/sw/source/filter/html/htmlgrin.cxx
+++ b/sw/source/filter/html/htmlgrin.cxx
@@ -798,10 +798,10 @@ IMAGE_SETEVENT:
pFlyFormat->SetName( sHTMLGrfName );
// maybe jump to graphic
- if( JUMPTO_GRAPHIC == m_eJumpTo && sHTMLGrfName == m_sJmpMark )
+ if( JumpToMarks::Graphic == m_eJumpTo && sHTMLGrfName == m_sJmpMark )
{
m_bChkJumpMark = true;
- m_eJumpTo = JUMPTO_NONE;
+ m_eJumpTo = JumpToMarks::NONE;
}
}
diff --git a/sw/source/filter/html/htmlsect.cxx b/sw/source/filter/html/htmlsect.cxx
index 5ce635e6aa7c..786e637a1b71 100644
--- a/sw/source/filter/html/htmlsect.cxx
+++ b/sw/source/filter/html/htmlsect.cxx
@@ -338,10 +338,10 @@ void SwHTMLParser::NewDivision( HtmlTokenId nToken )
m_xDoc->InsertSwSection( *m_pPam, aSection, nullptr, &aFrameItemSet, false );
// maybe jump to section
- if( JUMPTO_REGION == m_eJumpTo && aName == m_sJmpMark )
+ if( JumpToMarks::Region == m_eJumpTo && aName == m_sJmpMark )
{
m_bChkJumpMark = true;
- m_eJumpTo = JUMPTO_NONE;
+ m_eJumpTo = JumpToMarks::NONE;
}
SwTextNode* pOldTextNd =
@@ -724,10 +724,10 @@ void SwHTMLParser::NewMultiCol( sal_uInt16 columnsFromCss )
m_xDoc->InsertSwSection( *m_pPam, aSection, nullptr, &aFrameItemSet, false );
// Jump to section, if this is requested.
- if( JUMPTO_REGION == m_eJumpTo && aName == m_sJmpMark )
+ if( JumpToMarks::Region == m_eJumpTo && aName == m_sJmpMark )
{
m_bChkJumpMark = true;
- m_eJumpTo = JUMPTO_NONE;
+ m_eJumpTo = JumpToMarks::NONE;
}
SwTextNode* pOldTextNd =
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index 955bc98e1e67..b293885853b8 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -5219,11 +5219,11 @@ std::shared_ptr<HTMLTable> SwHTMLParser::BuildTable(SvxAdjust eParentAdjust,
m_nParaCnt = m_nParaCnt - std::min(m_nParaCnt, nTableBoxSize);
// Jump to a table if needed
- if( JUMPTO_TABLE == m_eJumpTo && m_xTable->GetSwTable() &&
+ if( JumpToMarks::Table == m_eJumpTo && m_xTable->GetSwTable() &&
m_xTable->GetSwTable()->GetFrameFormat()->GetName() == m_sJmpMark )
{
m_bChkJumpMark = true;
- m_eJumpTo = JUMPTO_NONE;
+ m_eJumpTo = JumpToMarks::NONE;
}
// If the import was canceled, don't call Show again here since
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index ce6a79f8e0dd..f984100ab9a4 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -281,7 +281,7 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, SwPaM& rCursor, SvStream& rIn,
m_nContextStAttrMin( 0 ),
m_nSelectEntryCnt( 0 ),
m_nOpenParaToken( HtmlTokenId::NONE ),
- m_eJumpTo( JUMPTO_NONE ),
+ m_eJumpTo( JumpToMarks::NONE ),
#ifdef DBG_UTIL
m_nContinue( 0 ),
#endif
@@ -382,7 +382,7 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, SwPaM& rCursor, SvStream& rIn,
m_sJmpMark = pMed->GetURLObject().GetMark();
if( !m_sJmpMark.isEmpty() )
{
- m_eJumpTo = JUMPTO_MARK;
+ m_eJumpTo = JumpToMarks::Mark;
sal_Int32 nLastPos = m_sJmpMark.lastIndexOf( cMarkSeparator );
sal_Int32 nPos = nLastPos != -1 ? nLastPos : 0;
@@ -396,15 +396,15 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, SwPaM& rCursor, SvStream& rIn,
{
sCmp = sCmp.toAsciiLowerCase();
if( sCmp == "region" )
- m_eJumpTo = JUMPTO_REGION;
+ m_eJumpTo = JumpToMarks::Region;
else if( sCmp == "table" )
- m_eJumpTo = JUMPTO_TABLE;
+ m_eJumpTo = JumpToMarks::Table;
else if( sCmp == "graphic" )
- m_eJumpTo = JUMPTO_GRAPHIC;
+ m_eJumpTo = JumpToMarks::Graphic;
else if( sCmp == "outline" ||
sCmp == "text" ||
sCmp == "frame" )
- m_eJumpTo = JUMPTO_NONE; // this is nothing valid!
+ m_eJumpTo = JumpToMarks::NONE; // this is nothing valid!
else
// otherwise this is a normal (book)mark
nPos = -1;
@@ -415,7 +415,7 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, SwPaM& rCursor, SvStream& rIn,
if( nPos != -1 )
m_sJmpMark = m_sJmpMark.copy( 0, nPos );
if( m_sJmpMark.isEmpty() )
- m_eJumpTo = JUMPTO_NONE;
+ m_eJumpTo = JumpToMarks::NONE;
}
}
}
@@ -2862,10 +2862,10 @@ void SwHTMLParser::SetAttr_( bool bChkEnd, bool bBeforeTable,
::sw::mark::InsertMode::New);
// jump to bookmark
- if( JUMPTO_MARK == m_eJumpTo && pNewMark->GetName() == m_sJmpMark )
+ if( JumpToMarks::Mark == m_eJumpTo && pNewMark->GetName() == m_sJmpMark )
{
m_bChkJumpMark = true;
- m_eJumpTo = JUMPTO_NONE;
+ m_eJumpTo = JumpToMarks::NONE;
}
}
break;
@@ -2921,11 +2921,11 @@ void SwHTMLParser::SetAttr_( bool bChkEnd, bool bBeforeTable,
// maybe jump to a bookmark
if( RES_TXTATR_INETFMT == nWhich &&
- JUMPTO_MARK == m_eJumpTo &&
+ JumpToMarks::Mark == m_eJumpTo &&
m_sJmpMark == static_cast<SwFormatINetFormat*>(pAttr->m_pItem.get())->GetName() )
{
m_bChkJumpMark = true;
- m_eJumpTo = JUMPTO_NONE;
+ m_eJumpTo = JumpToMarks::NONE;
}
m_xDoc->getIDocumentContentOperations().InsertPoolItem( *pAttrPam, *pAttr->m_pItem, SetAttrMode::DONTREPLACE );
diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx
index 5c633f326964..fb357c6d573a 100644
--- a/sw/source/filter/html/swhtml.hxx
+++ b/sw/source/filter/html/swhtml.hxx
@@ -405,8 +405,8 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient
sal_uInt16 m_nSelectEntryCnt; // Number of entries in the actual listbox
HtmlTokenId m_nOpenParaToken; // opened paragraph element
- enum JumpToMarks { JUMPTO_NONE, JUMPTO_MARK, JUMPTO_TABLE, JUMPTO_FRAME,
- JUMPTO_REGION, JUMPTO_GRAPHIC } m_eJumpTo;
+ enum class JumpToMarks { NONE, Mark, Table, Region, Graphic };
+ JumpToMarks m_eJumpTo;
#ifdef DBG_UTIL
sal_uInt16 m_nContinue; // depth of Continue calls
More information about the Libreoffice-commits
mailing list