summaryrefslogtreecommitdiff
path: root/xmloff/source/text/XMLChangeImportContext.cxx
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-12-08 22:46:54 +0100
committerMichael Stahl <mstahl@redhat.com>2016-12-09 11:41:38 +0100
commitff3d175eef06d67133ba686ff8b2ea9261de2c2b (patch)
treeb2d6e97ba96adbf1b57986a0623bb673de7365f5 /xmloff/source/text/XMLChangeImportContext.cxx
parenta547b2559c9dd25e03ab78a22eb9c06a38e9b574 (diff)
xmloff: XMLChangeImportContext: replace boolean pair with proper enum
Change-Id: I82ec75058a2309b8bcf0f8e78d8ef0db367014b0
Diffstat (limited to 'xmloff/source/text/XMLChangeImportContext.cxx')
-rw-r--r--xmloff/source/text/XMLChangeImportContext.cxx25
1 files changed, 11 insertions, 14 deletions
diff --git a/xmloff/source/text/XMLChangeImportContext.cxx b/xmloff/source/text/XMLChangeImportContext.cxx
index f8b863a952b2..54c8bea9db53 100644
--- a/xmloff/source/text/XMLChangeImportContext.cxx
+++ b/xmloff/source/text/XMLChangeImportContext.cxx
@@ -34,15 +34,12 @@ XMLChangeImportContext::XMLChangeImportContext(
SvXMLImport& rImport,
sal_Int16 nPrefix,
const OUString& rLocalName,
- bool bStart,
- bool bEnd,
- bool bOutsideOfParagraph) :
- SvXMLImportContext(rImport, nPrefix, rLocalName),
- bIsStart(bStart),
- bIsEnd(bEnd),
- bIsOutsideOfParagraph(bOutsideOfParagraph)
+ Element const eElement,
+ bool bOutsideOfParagraph)
+ : SvXMLImportContext(rImport, nPrefix, rLocalName)
+ , m_Element(eElement)
+ , m_bIsOutsideOfParagraph(bOutsideOfParagraph)
{
- DBG_ASSERT(bStart || bEnd, "Must be either start, end, or both!");
}
XMLChangeImportContext::~XMLChangeImportContext()
@@ -69,14 +66,14 @@ void XMLChangeImportContext::StartElement(
GetImport().GetTextImport();
OUString sID = xAttrList->getValueByIndex(nAttr);
- // call for bStart and bEnd (may both be true)
- if (bIsStart)
- rHelper->RedlineSetCursor(sID, true, bIsOutsideOfParagraph);
- if (bIsEnd)
- rHelper->RedlineSetCursor(sID, false, bIsOutsideOfParagraph);
+ // <text:change> is both start and end
+ if (Element::START == m_Element || Element::POINT == m_Element)
+ rHelper->RedlineSetCursor(sID, true, m_bIsOutsideOfParagraph);
+ if (Element::END == m_Element || Element::POINT == m_Element)
+ rHelper->RedlineSetCursor(sID, false, m_bIsOutsideOfParagraph);
// outside of paragraph and still open? set open redline ID
- if (bIsOutsideOfParagraph)
+ if (m_bIsOutsideOfParagraph)
{
rHelper->SetOpenRedlineId(sID);
}