summaryrefslogtreecommitdiffstats
path: root/xmloff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-23 15:13:14 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-05-24 06:54:31 +0000
commit2a16ad7e4a2646fb9df447bc0aab195af5ea770f (patch)
tree494e56c7ccf162b227aba6a231c91752b0ece1e9 /xmloff
parentConvert XmlReader::Text to scoped enum (diff)
downloadcore-2a16ad7e4a2646fb9df447bc0aab195af5ea770f.tar.gz
core-2a16ad7e4a2646fb9df447bc0aab195af5ea770f.zip
Convert XMLTextType to scoped enum
Change-Id: Iac147e57784e11d29f2b34e60dc3c624d6090c8b Reviewed-on: https://gerrit.libreoffice.org/25367 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/draw/ximpshap.cxx2
-rw-r--r--xmloff/source/text/XMLChangeElementImportContext.cxx2
-rw-r--r--xmloff/source/text/XMLFootnoteBodyImportContext.cxx2
-rw-r--r--xmloff/source/text/XMLIndexBodyContext.cxx2
-rw-r--r--xmloff/source/text/XMLSectionImportContext.cxx2
-rw-r--r--xmloff/source/text/XMLTextFrameContext.cxx2
-rw-r--r--xmloff/source/text/XMLTextHeaderFooterContext.cxx2
-rw-r--r--xmloff/source/text/txtimp.cxx58
8 files changed, 36 insertions, 36 deletions
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index b3109c915c3f..cde2c15710e4 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -237,7 +237,7 @@ SvXMLImportContext *SdXMLShapeContext::CreateChildContext( sal_uInt16 p_nPrefix,
{
pContext = GetImport().GetTextImport()->CreateTextChildContext(
GetImport(), p_nPrefix, rLocalName, xAttrList,
- ( mbTextBox ? XML_TEXT_TYPE_TEXTBOX : XML_TEXT_TYPE_SHAPE ) );
+ ( mbTextBox ? XMLTextType::TextBox : XMLTextType::Shape ) );
}
}
diff --git a/xmloff/source/text/XMLChangeElementImportContext.cxx b/xmloff/source/text/XMLChangeElementImportContext.cxx
index f0d22b79173f..93bba391b0a9 100644
--- a/xmloff/source/text/XMLChangeElementImportContext.cxx
+++ b/xmloff/source/text/XMLChangeElementImportContext.cxx
@@ -64,7 +64,7 @@ SvXMLImportContext* XMLChangeElementImportContext::CreateChildContext(
pContext = GetImport().GetTextImport()->CreateTextChildContext(
GetImport(), nPrefix, rLocalName, xAttrList,
- XML_TEXT_TYPE_CHANGED_REGION);
+ XMLTextType::ChangedRegion);
if (nullptr == pContext)
{
diff --git a/xmloff/source/text/XMLFootnoteBodyImportContext.cxx b/xmloff/source/text/XMLFootnoteBodyImportContext.cxx
index 40bc564005d8..192bbe85d53e 100644
--- a/xmloff/source/text/XMLFootnoteBodyImportContext.cxx
+++ b/xmloff/source/text/XMLFootnoteBodyImportContext.cxx
@@ -49,7 +49,7 @@ SvXMLImportContext* XMLFootnoteBodyImportContext::CreateChildContext(
nPrefix,
rLocalName,
xAttrList,
- XML_TEXT_TYPE_FOOTNOTE);
+ XMLTextType::Footnote);
if( !pContext )
pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
diff --git a/xmloff/source/text/XMLIndexBodyContext.cxx b/xmloff/source/text/XMLIndexBodyContext.cxx
index 23529f632e4d..53b3e52f6545 100644
--- a/xmloff/source/text/XMLIndexBodyContext.cxx
+++ b/xmloff/source/text/XMLIndexBodyContext.cxx
@@ -49,7 +49,7 @@ SvXMLImportContext* XMLIndexBodyContext::CreateChildContext(
// return text content (if possible)
pContext = GetImport().GetTextImport()->CreateTextChildContext(
- GetImport(), nPrefix, rLocalName, xAttrList, XML_TEXT_TYPE_SECTION );
+ GetImport(), nPrefix, rLocalName, xAttrList, XMLTextType::Section );
if (nullptr == pContext)
{
pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
diff --git a/xmloff/source/text/XMLSectionImportContext.cxx b/xmloff/source/text/XMLSectionImportContext.cxx
index 43f6d247ba0c..83e96d390a13 100644
--- a/xmloff/source/text/XMLSectionImportContext.cxx
+++ b/xmloff/source/text/XMLSectionImportContext.cxx
@@ -367,7 +367,7 @@ SvXMLImportContext* XMLSectionImportContext::CreateChildContext(
// otherwise: text context
pContext = GetImport().GetTextImport()->CreateTextChildContext(
GetImport(), nPrefix, rLocalName, xAttrList,
- XML_TEXT_TYPE_SECTION );
+ XMLTextType::Section );
// if that fails, default context
if (nullptr == pContext)
diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx
index 8e46ae6df704..d0cc7c1b9ab0 100644
--- a/xmloff/source/text/XMLTextFrameContext.cxx
+++ b/xmloff/source/text/XMLTextFrameContext.cxx
@@ -1180,7 +1180,7 @@ SvXMLImportContext *XMLTextFrameContext_Impl::CreateChildContext(
if( !pContext && xOldTextCursor.is() ) // text-box
pContext = GetImport().GetTextImport()->CreateTextChildContext(
GetImport(), nPrefix, rLocalName, xAttrList,
- XML_TEXT_TYPE_TEXTBOX );
+ XMLTextType::TextBox );
if( !pContext )
pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
diff --git a/xmloff/source/text/XMLTextHeaderFooterContext.cxx b/xmloff/source/text/XMLTextHeaderFooterContext.cxx
index 907449125fc3..efa42e333cbf 100644
--- a/xmloff/source/text/XMLTextHeaderFooterContext.cxx
+++ b/xmloff/source/text/XMLTextHeaderFooterContext.cxx
@@ -174,7 +174,7 @@ SvXMLImportContext *XMLTextHeaderFooterContext::CreateChildContext(
pContext =
GetImport().GetTextImport()->CreateTextChildContext(
GetImport(), nPrefix, rLocalName, xAttrList,
- XML_TEXT_TYPE_HEADER_FOOTER );
+ XMLTextType::HeaderFooter );
}
if( !pContext )
pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx
index e35e6c316149..3da0e8b9bc10 100644
--- a/xmloff/source/text/txtimp.cxx
+++ b/xmloff/source/text/txtimp.cxx
@@ -2155,7 +2155,7 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext(
pContext = new XMLParaContext( rImport,
nPrefix, rLocalName,
xAttrList, bHeading );
- if (m_xImpl->m_bProgress && XML_TEXT_TYPE_SHAPE != eType)
+ if (m_xImpl->m_bProgress && XMLTextType::Shape != eType)
{
rImport.GetProgressBarHelper()->Increment();
}
@@ -2170,18 +2170,18 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext(
xAttrList );
break;
case XML_TOK_TABLE_TABLE:
- if( XML_TEXT_TYPE_BODY == eType ||
- XML_TEXT_TYPE_TEXTBOX == eType ||
- XML_TEXT_TYPE_SECTION == eType ||
- XML_TEXT_TYPE_HEADER_FOOTER == eType ||
- XML_TEXT_TYPE_CHANGED_REGION == eType ||
- XML_TEXT_TYPE_CELL == eType )
+ if( XMLTextType::Body == eType ||
+ XMLTextType::TextBox == eType ||
+ XMLTextType::Section == eType ||
+ XMLTextType::HeaderFooter == eType ||
+ XMLTextType::ChangedRegion == eType ||
+ XMLTextType::Cell == eType )
pContext = CreateTableChildContext( rImport, nPrefix, rLocalName,
xAttrList );
break;
case XML_TOK_TEXT_SEQUENCE_DECLS:
- if ((XML_TEXT_TYPE_BODY == eType && m_xImpl->m_bBodyContentStarted) ||
- XML_TEXT_TYPE_HEADER_FOOTER == eType )
+ if ((XMLTextType::Body == eType && m_xImpl->m_bBodyContentStarted) ||
+ XMLTextType::HeaderFooter == eType )
{
pContext = new XMLVariableDeclsImportContext(
rImport, *this, nPrefix, rLocalName, VarTypeSequence);
@@ -2190,8 +2190,8 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext(
break;
case XML_TOK_TEXT_VARFIELD_DECLS:
- if ((XML_TEXT_TYPE_BODY == eType && m_xImpl->m_bBodyContentStarted) ||
- XML_TEXT_TYPE_HEADER_FOOTER == eType )
+ if ((XMLTextType::Body == eType && m_xImpl->m_bBodyContentStarted) ||
+ XMLTextType::HeaderFooter == eType )
{
pContext = new XMLVariableDeclsImportContext(
rImport, *this, nPrefix, rLocalName, VarTypeSimple);
@@ -2200,8 +2200,8 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext(
break;
case XML_TOK_TEXT_USERFIELD_DECLS:
- if ((XML_TEXT_TYPE_BODY == eType && m_xImpl->m_bBodyContentStarted)||
- XML_TEXT_TYPE_HEADER_FOOTER == eType )
+ if ((XMLTextType::Body == eType && m_xImpl->m_bBodyContentStarted)||
+ XMLTextType::HeaderFooter == eType )
{
pContext = new XMLVariableDeclsImportContext(
rImport, *this, nPrefix, rLocalName, VarTypeUserField);
@@ -2210,8 +2210,8 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext(
break;
case XML_TOK_TEXT_DDE_DECLS:
- if ((XML_TEXT_TYPE_BODY == eType && m_xImpl->m_bBodyContentStarted) ||
- XML_TEXT_TYPE_HEADER_FOOTER == eType )
+ if ((XMLTextType::Body == eType && m_xImpl->m_bBodyContentStarted) ||
+ XMLTextType::HeaderFooter == eType )
{
pContext = new XMLDdeFieldDeclsImportContext(
rImport, nPrefix, rLocalName);
@@ -2220,12 +2220,12 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext(
break;
case XML_TOK_TEXT_FRAME_PAGE:
- if ((XML_TEXT_TYPE_BODY == eType && m_xImpl->m_bBodyContentStarted) ||
- XML_TEXT_TYPE_TEXTBOX == eType ||
- XML_TEXT_TYPE_CHANGED_REGION == eType )
+ if ((XMLTextType::Body == eType && m_xImpl->m_bBodyContentStarted) ||
+ XMLTextType::TextBox == eType ||
+ XMLTextType::ChangedRegion == eType )
{
TextContentAnchorType eAnchorType =
- XML_TEXT_TYPE_TEXTBOX == eType ? TextContentAnchorType_AT_FRAME
+ XMLTextType::TextBox == eType ? TextContentAnchorType_AT_FRAME
: TextContentAnchorType_AT_PAGE;
pContext = new XMLTextFrameContext( rImport, nPrefix,
rLocalName, xAttrList,
@@ -2235,12 +2235,12 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext(
break;
case XML_TOK_DRAW_A_PAGE:
- if ((XML_TEXT_TYPE_BODY == eType && m_xImpl->m_bBodyContentStarted) ||
- XML_TEXT_TYPE_TEXTBOX == eType ||
- XML_TEXT_TYPE_CHANGED_REGION == eType)
+ if ((XMLTextType::Body == eType && m_xImpl->m_bBodyContentStarted) ||
+ XMLTextType::TextBox == eType ||
+ XMLTextType::ChangedRegion == eType)
{
TextContentAnchorType eAnchorType =
- XML_TEXT_TYPE_TEXTBOX == eType ? TextContentAnchorType_AT_FRAME
+ XMLTextType::TextBox == eType ? TextContentAnchorType_AT_FRAME
: TextContentAnchorType_AT_PAGE;
pContext = new XMLTextFrameHyperlinkContext( rImport, nPrefix,
rLocalName, xAttrList,
@@ -2261,7 +2261,7 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext(
case XML_TOK_TEXT_USER_INDEX:
case XML_TOK_TEXT_ALPHABETICAL_INDEX:
case XML_TOK_TEXT_BIBLIOGRAPHY_INDEX:
- if( XML_TEXT_TYPE_SHAPE != eType )
+ if( XMLTextType::Shape != eType )
pContext = new XMLIndexTOCContext( rImport, nPrefix, rLocalName );
break;
@@ -2287,7 +2287,7 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext(
break;
case XML_TOK_TEXT_AUTOMARK:
- if( XML_TEXT_TYPE_BODY == eType )
+ if( XMLTextType::Body == eType )
{
pContext = new XMLAutoMarkFileContext(rImport, nPrefix,rLocalName);
}
@@ -2300,9 +2300,9 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext(
break;
default:
- if ((XML_TEXT_TYPE_BODY == eType && m_xImpl->m_bBodyContentStarted) ||
- XML_TEXT_TYPE_TEXTBOX == eType ||
- XML_TEXT_TYPE_CHANGED_REGION == eType )
+ if ((XMLTextType::Body == eType && m_xImpl->m_bBodyContentStarted) ||
+ XMLTextType::TextBox == eType ||
+ XMLTextType::ChangedRegion == eType )
{
Reference < XShapes > xShapes;
pContext = rImport.GetShapeImport()->CreateGroupChildContext(
@@ -2319,7 +2319,7 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext(
// ResetOpenRedlineId();
}
- if( XML_TEXT_TYPE_BODY == eType && bContent )
+ if( XMLTextType::Body == eType && bContent )
{
m_xImpl->m_bBodyContentStarted = false;
}