[Libreoffice-commits] core.git: 3 commits - configmgr/source cppuhelper/source include/xmloff include/xmlreader sw/source unotools/source vcl/opengl vcl/source xmloff/source xmlreader/source
Noel Grandin
noel at peralex.com
Tue May 24 06:55:08 UTC 2016
configmgr/source/valueparser.cxx | 6 -
configmgr/source/xcdparser.cxx | 2
cppuhelper/source/servicemanager.cxx | 2
include/xmloff/txtimp.hxx | 18 ++---
include/xmlreader/xmlreader.hxx | 2
sw/source/filter/xml/xmltbli.cxx | 2
sw/source/filter/xml/xmltext.cxx | 2
sw/source/uibase/envelp/labelcfg.cxx | 16 ++---
unotools/source/config/options.cxx | 5 -
vcl/opengl/win/blocklist_parser.cxx | 6 -
vcl/source/window/builder.cxx | 36 +++++------
xmloff/source/draw/ximpshap.cxx | 2
xmloff/source/text/XMLChangeElementImportContext.cxx | 2
xmloff/source/text/XMLFootnoteBodyImportContext.cxx | 2
xmloff/source/text/XMLIndexBodyContext.cxx | 2
xmloff/source/text/XMLSectionImportContext.cxx | 2
xmloff/source/text/XMLTextFrameContext.cxx | 2
xmloff/source/text/XMLTextHeaderFooterContext.cxx | 2
xmloff/source/text/txtimp.cxx | 58 +++++++++----------
xmlreader/source/xmlreader.cxx | 6 -
20 files changed, 87 insertions(+), 88 deletions(-)
New commits:
commit 3a077c0c3f41575cdce7e7e2f65916b0e8eb85dd
Author: Noel Grandin <noel at peralex.com>
Date: Mon May 23 15:16:01 2016 +0200
tdf#99973 - Crash when changing Locale Setting in options
regression from commit 0f672545 "clang-tidy modernize-loop-convert in
toolkit to uui", probably because the list is being modified while the
loop is executing
Change-Id: I18cd21001aee132e06d577c469aed5eb46a16a7f
Reviewed-on: https://gerrit.libreoffice.org/25368
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/unotools/source/config/options.cxx b/unotools/source/config/options.cxx
index e336775..435a453 100644
--- a/unotools/source/config/options.cxx
+++ b/unotools/source/config/options.cxx
@@ -68,9 +68,8 @@ void ConfigurationBroadcaster::NotifyListeners( sal_uInt32 nHint )
nHint |= m_nBlockedHint;
m_nBlockedHint = 0;
if ( mpList ) {
- for (ConfigurationListener* n : *mpList) {
- n->ConfigurationChanged( this, nHint );
- }
+ for ( size_t n = 0; n < mpList->size(); n++ )
+ (*mpList)[ n ]->ConfigurationChanged( this, nHint );
}
}
}
commit 2a16ad7e4a2646fb9df447bc0aab195af5ea770f
Author: Noel Grandin <noel at peralex.com>
Date: Mon May 23 15:13:14 2016 +0200
Convert XMLTextType to scoped enum
Change-Id: Iac147e57784e11d29f2b34e60dc3c624d6090c8b
Reviewed-on: https://gerrit.libreoffice.org/25367
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/include/xmloff/txtimp.hxx b/include/xmloff/txtimp.hxx
index 92f2bf9..8bc38d6 100644
--- a/include/xmloff/txtimp.hxx
+++ b/include/xmloff/txtimp.hxx
@@ -352,14 +352,14 @@ enum XMLTextContourAttrTokens
};
enum XMLTextType
{
- XML_TEXT_TYPE_BODY,
- XML_TEXT_TYPE_CELL,
- XML_TEXT_TYPE_SHAPE,
- XML_TEXT_TYPE_TEXTBOX,
- XML_TEXT_TYPE_HEADER_FOOTER,
- XML_TEXT_TYPE_SECTION,
- XML_TEXT_TYPE_FOOTNOTE,
- XML_TEXT_TYPE_CHANGED_REGION
+ Body,
+ Cell,
+ Shape,
+ TextBox,
+ HeaderFooter,
+ Section,
+ Footnote,
+ ChangedRegion
};
/// variable type (for XMLSetVarFieldImportContext)
@@ -422,7 +422,7 @@ public:
SvXMLImport& rImport,
sal_uInt16 nPrefix, const OUString& rLocalName,
const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList,
- XMLTextType eType = XML_TEXT_TYPE_SHAPE );
+ XMLTextType eType = XMLTextType::Shape );
SvXMLTokenMap const& GetTextElemTokenMap();
SvXMLTokenMap const& GetTextPElemTokenMap();
diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index 0e65d2f..d8f0d8d 100644
--- a/sw/source/filter/xml/xmltbli.cxx
+++ b/sw/source/filter/xml/xmltbli.cxx
@@ -666,7 +666,7 @@ SvXMLImportContext *SwXMLTableCellContext_Impl::CreateChildContext(
{
pContext = GetImport().GetTextImport()->CreateTextChildContext(
GetImport(), nPrefix, rLocalName, xAttrList,
- XML_TEXT_TYPE_CELL );
+ XMLTextType::Cell );
}
}
diff --git a/sw/source/filter/xml/xmltext.cxx b/sw/source/filter/xml/xmltext.cxx
index 084d5c9..58fea1d 100644
--- a/sw/source/filter/xml/xmltext.cxx
+++ b/sw/source/filter/xml/xmltext.cxx
@@ -60,7 +60,7 @@ SvXMLImportContext *SwXMLBodyContentContext_Impl::CreateChildContext(
pContext = GetSwImport().GetTextImport()->CreateTextChildContext(
GetImport(), nPrefix, rLocalName, xAttrList,
- XML_TEXT_TYPE_BODY );
+ XMLTextType::Body );
if( !pContext )
pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index b3109c9..cde2c157 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 f0d22b79..93bba39 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 40bc564..192bbe8 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 23529f6..53b3e52 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 43f6d24..83e96d3 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 8e46ae6d..d0cc7c1 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 9074491..efa42e3 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 e35e6c3..3da0e8b 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;
}
commit 6bda2bf6fe8afba0b47ad89033ea3dbf6dc8b797
Author: Noel Grandin <noel at peralex.com>
Date: Mon May 23 14:51:43 2016 +0200
Convert XmlReader::Text to scoped enum
Change-Id: I4741b13fcf887a95b85886cb41f8236e128e81a2
Reviewed-on: https://gerrit.libreoffice.org/25364
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/configmgr/source/valueparser.cxx b/configmgr/source/valueparser.cxx
index f8d98dd..e732e8d 100644
--- a/configmgr/source/valueparser.cxx
+++ b/configmgr/source/valueparser.cxx
@@ -265,13 +265,13 @@ xmlreader::XmlReader::Text ValueParser::getTextMode() const {
return
(type_ == TYPE_STRING || type_ == TYPE_STRING_LIST ||
!separator_.isEmpty())
- ? xmlreader::XmlReader::TEXT_RAW
- : xmlreader::XmlReader::TEXT_NORMALIZED;
+ ? xmlreader::XmlReader::Text::Raw
+ : xmlreader::XmlReader::Text::Normalized;
default:
break;
}
}
- return xmlreader::XmlReader::TEXT_NONE;
+ return xmlreader::XmlReader::Text::NONE;
}
bool ValueParser::startElement(
diff --git a/configmgr/source/xcdparser.cxx b/configmgr/source/xcdparser.cxx
index 0bfe298..553087a 100644
--- a/configmgr/source/xcdparser.cxx
+++ b/configmgr/source/xcdparser.cxx
@@ -47,7 +47,7 @@ XcdParser::~XcdParser() {}
xmlreader::XmlReader::Text XcdParser::getTextMode() {
return nestedParser_.is()
- ? nestedParser_->getTextMode() : xmlreader::XmlReader::TEXT_NONE;
+ ? nestedParser_->getTextMode() : xmlreader::XmlReader::Text::NONE;
}
bool XcdParser::startElement(
diff --git a/cppuhelper/source/servicemanager.cxx b/cppuhelper/source/servicemanager.cxx
index 9e2a9a0..2785920 100644
--- a/cppuhelper/source/servicemanager.cxx
+++ b/cppuhelper/source/servicemanager.cxx
@@ -153,7 +153,7 @@ Parser::Parser(
xmlreader::Span name;
int nsId;
xmlreader::XmlReader::Result res = reader_.nextItem(
- xmlreader::XmlReader::TEXT_NONE, &name, &nsId);
+ xmlreader::XmlReader::Text::NONE, &name, &nsId);
switch (state) {
case STATE_BEGIN:
if (res == xmlreader::XmlReader::RESULT_BEGIN && nsId == ucNsId
diff --git a/include/xmlreader/xmlreader.hxx b/include/xmlreader/xmlreader.hxx
index 5d46b1c..c464211 100644
--- a/include/xmlreader/xmlreader.hxx
+++ b/include/xmlreader/xmlreader.hxx
@@ -46,7 +46,7 @@ public:
enum { NAMESPACE_NONE = -2, NAMESPACE_UNKNOWN = -1, NAMESPACE_XML = 0 };
- enum Text { TEXT_NONE, TEXT_RAW, TEXT_NORMALIZED };
+ enum class Text { NONE, Raw, Normalized };
enum Result { RESULT_BEGIN, RESULT_END, RESULT_TEXT, RESULT_DONE };
diff --git a/sw/source/uibase/envelp/labelcfg.cxx b/sw/source/uibase/envelp/labelcfg.cxx
index 72b22f2..8cdd881 100644
--- a/sw/source/uibase/envelp/labelcfg.cxx
+++ b/sw/source/uibase/envelp/labelcfg.cxx
@@ -38,7 +38,7 @@ static inline void lcl_assertEndingItem(xmlreader::XmlReader& reader)
int nsId;
xmlreader::Span name;
xmlreader::XmlReader::Result res;
- res = reader.nextItem(xmlreader::XmlReader::TEXT_NONE, &name, &nsId);
+ res = reader.nextItem(xmlreader::XmlReader::Text::NONE, &name, &nsId);
assert(res == xmlreader::XmlReader::RESULT_END);
(void) res;
}
@@ -49,9 +49,9 @@ static inline OUString lcl_getValue(xmlreader::XmlReader& reader,
int nsId;
xmlreader::Span name;
xmlreader::XmlReader::Result res;
- res = reader.nextItem(xmlreader::XmlReader::TEXT_NONE, &name, &nsId);
+ res = reader.nextItem(xmlreader::XmlReader::Text::NONE, &name, &nsId);
assert(res == xmlreader::XmlReader::RESULT_BEGIN && name.equals(span));
- res = reader.nextItem(xmlreader::XmlReader::TEXT_RAW, &name, &nsId);
+ res = reader.nextItem(xmlreader::XmlReader::Text::Raw, &name, &nsId);
assert(res == xmlreader::XmlReader::RESULT_TEXT);
(void) res; (void) span;
OUString sTmp = name.convertFromUtf8();
@@ -86,12 +86,12 @@ SwLabelConfig::SwLabelConfig() :
// fill m_aLabels and m_aManufacturers with the predefined labels
res = reader.nextItem(
- xmlreader::XmlReader::TEXT_NONE, &name, &nsId);
+ xmlreader::XmlReader::Text::NONE, &name, &nsId);
assert(
res == xmlreader::XmlReader::RESULT_BEGIN
&& name.equals("manufacturers"));
res = reader.nextItem(
- xmlreader::XmlReader::TEXT_NONE, &name, &nsId);
+ xmlreader::XmlReader::Text::NONE, &name, &nsId);
while (res != xmlreader::XmlReader::RESULT_END)
{
// Opening manufacturer
@@ -108,7 +108,7 @@ SwLabelConfig::SwLabelConfig() :
for(;;) {
// Opening label or ending manufacturer
res = reader.nextItem(
- xmlreader::XmlReader::TEXT_NONE, &name, &nsId);
+ xmlreader::XmlReader::Text::NONE, &name, &nsId);
if (res == xmlreader::XmlReader::RESULT_END)
break;
assert(
@@ -127,10 +127,10 @@ SwLabelConfig::SwLabelConfig() :
}
// Get next manufacturer or end
res = reader.nextItem(
- xmlreader::XmlReader::TEXT_NONE, &name, &nsId);
+ xmlreader::XmlReader::Text::NONE, &name, &nsId);
};
res = reader.nextItem(
- xmlreader::XmlReader::TEXT_NONE, &name, &nsId);
+ xmlreader::XmlReader::Text::NONE, &name, &nsId);
assert(res == xmlreader::XmlReader::RESULT_DONE);
// add to m_aLabels and m_aManufacturers the custom labels
diff --git a/vcl/opengl/win/blocklist_parser.cxx b/vcl/opengl/win/blocklist_parser.cxx
index 652bb29..e7e17f3 100644
--- a/vcl/opengl/win/blocklist_parser.cxx
+++ b/vcl/opengl/win/blocklist_parser.cxx
@@ -162,7 +162,7 @@ void WinBlocklistParser::handleDevices(wgl::DriverInfo& rDriver, xmlreader::XmlR
int nsId;
xmlreader::XmlReader::Result res = rReader.nextItem(
- xmlreader::XmlReader::TEXT_NORMALIZED, &name, &nsId);
+ xmlreader::XmlReader::Text::Normalized, &name, &nsId);
if (res == xmlreader::XmlReader::RESULT_BEGIN)
{
@@ -282,7 +282,7 @@ void WinBlocklistParser::handleList(xmlreader::XmlReader& rReader)
while (true)
{
xmlreader::XmlReader::Result res = rReader.nextItem(
- xmlreader::XmlReader::TEXT_NONE, &name, &nsId);
+ xmlreader::XmlReader::Text::NONE, &name, &nsId);
if (res == xmlreader::XmlReader::RESULT_BEGIN)
{
@@ -318,7 +318,7 @@ void WinBlocklistParser::handleContent(xmlreader::XmlReader& rReader)
int nsId;
xmlreader::XmlReader::Result res = rReader.nextItem(
- xmlreader::XmlReader::TEXT_NONE, &name, &nsId);
+ xmlreader::XmlReader::Text::NONE, &name, &nsId);
if (res == xmlreader::XmlReader::RESULT_BEGIN)
{
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 74f1c77..2a466ad 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -546,7 +546,7 @@ void VclBuilder::handleTranslations(xmlreader::XmlReader &reader)
while(true)
{
xmlreader::XmlReader::Result res = reader.nextItem(
- xmlreader::XmlReader::TEXT_RAW, &name, &nsId);
+ xmlreader::XmlReader::Text::Raw, &name, &nsId);
if (res == xmlreader::XmlReader::RESULT_BEGIN)
{
@@ -1900,7 +1900,7 @@ void VclBuilder::handleTabChild(vcl::Window *pParent, xmlreader::XmlReader &read
int nsId;
xmlreader::XmlReader::Result res = reader.nextItem(
- xmlreader::XmlReader::TEXT_NONE, &name, &nsId);
+ xmlreader::XmlReader::Text::NONE, &name, &nsId);
if (res == xmlreader::XmlReader::RESULT_BEGIN)
{
@@ -2052,7 +2052,7 @@ void VclBuilder::handleChild(vcl::Window *pParent, xmlreader::XmlReader &reader)
while(true)
{
xmlreader::XmlReader::Result res = reader.nextItem(
- xmlreader::XmlReader::TEXT_NONE, &name, &nsId);
+ xmlreader::XmlReader::Text::NONE, &name, &nsId);
if (res == xmlreader::XmlReader::RESULT_BEGIN)
{
@@ -2234,7 +2234,7 @@ void VclBuilder::handleRow(xmlreader::XmlReader &reader, const OString &rID, sal
int nsId;
xmlreader::XmlReader::Result res = reader.nextItem(
- xmlreader::XmlReader::TEXT_NONE, &name, &nsId);
+ xmlreader::XmlReader::Text::NONE, &name, &nsId);
if (res == xmlreader::XmlReader::RESULT_DONE)
break;
@@ -2263,7 +2263,7 @@ void VclBuilder::handleRow(xmlreader::XmlReader &reader, const OString &rID, sal
}
reader.nextItem(
- xmlreader::XmlReader::TEXT_RAW, &name, &nsId);
+ xmlreader::XmlReader::Text::Raw, &name, &nsId);
if (!bTranslated)
sValue = OString(name.begin, name.length);
@@ -2297,7 +2297,7 @@ void VclBuilder::handleListStore(xmlreader::XmlReader &reader, const OString &rI
int nsId;
xmlreader::XmlReader::Result res = reader.nextItem(
- xmlreader::XmlReader::TEXT_NONE, &name, &nsId);
+ xmlreader::XmlReader::Text::NONE, &name, &nsId);
if (res == xmlreader::XmlReader::RESULT_DONE)
break;
@@ -2334,7 +2334,7 @@ void VclBuilder::handleAtkObject(xmlreader::XmlReader &reader, const OString &rI
int nsId;
xmlreader::XmlReader::Result res = reader.nextItem(
- xmlreader::XmlReader::TEXT_NONE, &name, &nsId);
+ xmlreader::XmlReader::Text::NONE, &name, &nsId);
if (res == xmlreader::XmlReader::RESULT_DONE)
break;
@@ -2380,7 +2380,7 @@ std::vector<OString> VclBuilder::handleItems(xmlreader::XmlReader &reader, const
int nsId;
xmlreader::XmlReader::Result res = reader.nextItem(
- xmlreader::XmlReader::TEXT_NONE, &name, &nsId);
+ xmlreader::XmlReader::Text::NONE, &name, &nsId);
if (res == xmlreader::XmlReader::RESULT_DONE)
break;
@@ -2403,7 +2403,7 @@ std::vector<OString> VclBuilder::handleItems(xmlreader::XmlReader &reader, const
}
reader.nextItem(
- xmlreader::XmlReader::TEXT_RAW, &name, &nsId);
+ xmlreader::XmlReader::Text::Raw, &name, &nsId);
if (!bTranslated)
sValue = OString(name.begin, name.length);
@@ -2445,7 +2445,7 @@ void VclBuilder::handleMenu(xmlreader::XmlReader &reader, const OString &rID)
int nsId;
xmlreader::XmlReader::Result res = reader.nextItem(
- xmlreader::XmlReader::TEXT_NONE, &name, &nsId);
+ xmlreader::XmlReader::Text::NONE, &name, &nsId);
if (res == xmlreader::XmlReader::RESULT_DONE)
break;
@@ -2485,7 +2485,7 @@ void VclBuilder::handleMenuChild(PopupMenu *pParent, xmlreader::XmlReader &reade
while(true)
{
xmlreader::XmlReader::Result res = reader.nextItem(
- xmlreader::XmlReader::TEXT_NONE, &name, &nsId);
+ xmlreader::XmlReader::Text::NONE, &name, &nsId);
if (res == xmlreader::XmlReader::RESULT_BEGIN)
{
@@ -2547,7 +2547,7 @@ void VclBuilder::handleMenuObject(PopupMenu *pParent, xmlreader::XmlReader &read
while(true)
{
xmlreader::XmlReader::Result res = reader.nextItem(
- xmlreader::XmlReader::TEXT_NONE, &name, &nsId);
+ xmlreader::XmlReader::Text::NONE, &name, &nsId);
if (res == xmlreader::XmlReader::RESULT_DONE)
break;
@@ -2586,7 +2586,7 @@ void VclBuilder::handleSizeGroup(xmlreader::XmlReader &reader, const OString &rI
int nsId;
xmlreader::XmlReader::Result res = reader.nextItem(
- xmlreader::XmlReader::TEXT_NONE, &name, &nsId);
+ xmlreader::XmlReader::Text::NONE, &name, &nsId);
if (res == xmlreader::XmlReader::RESULT_DONE)
break;
@@ -2799,7 +2799,7 @@ VclPtr<vcl::Window> VclBuilder::handleObject(vcl::Window *pParent, xmlreader::Xm
while(true)
{
xmlreader::XmlReader::Result res = reader.nextItem(
- xmlreader::XmlReader::TEXT_NONE, &name, &nsId);
+ xmlreader::XmlReader::Text::NONE, &name, &nsId);
if (res == xmlreader::XmlReader::RESULT_DONE)
break;
@@ -2877,7 +2877,7 @@ void VclBuilder::handlePacking(vcl::Window *pCurrent, vcl::Window *pParent, xmlr
while(true)
{
xmlreader::XmlReader::Result res = reader.nextItem(
- xmlreader::XmlReader::TEXT_NONE, &name, &nsId);
+ xmlreader::XmlReader::Text::NONE, &name, &nsId);
if (res == xmlreader::XmlReader::RESULT_DONE)
break;
@@ -2933,7 +2933,7 @@ void VclBuilder::applyPackingProperty(vcl::Window *pCurrent,
OString sKey(name.begin, name.length);
sKey = sKey.replace('_', '-');
reader.nextItem(
- xmlreader::XmlReader::TEXT_RAW, &name, &nsId);
+ xmlreader::XmlReader::Text::Raw, &name, &nsId);
OString sValue(name.begin, name.length);
if (sKey == "expand")
@@ -3041,7 +3041,7 @@ void VclBuilder::collectProperty(xmlreader::XmlReader &reader, const OString &rI
}
- reader.nextItem(xmlreader::XmlReader::TEXT_RAW, &name, &nsId);
+ reader.nextItem(xmlreader::XmlReader::Text::Raw, &name, &nsId);
if (!bTranslated)
sValue = OString(name.begin, name.length);
@@ -3076,7 +3076,7 @@ void VclBuilder::handleActionWidget(xmlreader::XmlReader &reader)
}
}
- reader.nextItem(xmlreader::XmlReader::TEXT_RAW, &name, &nsId);
+ reader.nextItem(xmlreader::XmlReader::Text::Raw, &name, &nsId);
OString sID = OString(name.begin, name.length);
sal_Int32 nDelim = sID.indexOf(':');
if (nDelim != -1)
diff --git a/xmlreader/source/xmlreader.cxx b/xmlreader/source/xmlreader.cxx
index 5f4e506..41310f6 100644
--- a/xmlreader/source/xmlreader.cxx
+++ b/xmlreader/source/xmlreader.cxx
@@ -144,11 +144,11 @@ XmlReader::Result XmlReader::nextItem(Text reportText, Span * data, int * nsId)
switch (state_) {
case STATE_CONTENT:
switch (reportText) {
- case TEXT_NONE:
+ case Text::NONE:
return handleSkippedText(data, nsId);
- case TEXT_RAW:
+ case Text::Raw:
return handleRawText(data);
- case TEXT_NORMALIZED:
+ case Text::Normalized:
return handleNormalizedText(data);
}
case STATE_START_TAG:
More information about the Libreoffice-commits
mailing list