summaryrefslogtreecommitdiffstats
path: root/xmloff/source/text
diff options
context:
space:
mode:
authorRosemary Sebastian <rosemary.seb8@gmail.com>2016-07-13 13:53:30 +0530
committerRosemary Sebastian <rosemary.seb8@gmail.com>2016-07-13 13:53:30 +0530
commita6bc6c2b7138b7de5dcd45944eb5321fbd16d53b (patch)
tree87d16d48e9cff75599dc2d632fa6e2edcd44f979 /xmloff/source/text
parentAccess aRedlineMap when parsing content.xml (diff)
downloadcore-a6bc6c2b7138b7de5dcd45944eb5321fbd16d53b.tar.gz
core-a6bc6c2b7138b7de5dcd45944eb5321fbd16d53b.zip
WIP Insert redline into document
Change-Id: I98857e98503176c812b0fb70a41cb8e79637da78
Diffstat (limited to 'xmloff/source/text')
-rw-r--r--xmloff/source/text/txtimp.cxx8
-rw-r--r--xmloff/source/text/txtparai.cxx5
-rw-r--r--xmloff/source/text/txtparai.hxx3
3 files changed, 12 insertions, 4 deletions
diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx
index e97901da7ba3..1e7c58e7c953 100644
--- a/xmloff/source/text/txtimp.cxx
+++ b/xmloff/source/text/txtimp.cxx
@@ -2161,7 +2161,7 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext(
}
pContext = new XMLParaContext( rImport,
nPrefix, rLocalName,
- xAttrList, bHeading, bInsertRedline );
+ xAttrList, bHeading, bInsertRedline, sParaIdx );
if (m_xImpl->m_bProgress && XML_TEXT_TYPE_SHAPE != eType)
{
rImport.GetProgressBarHelper()->Increment();
@@ -2758,11 +2758,15 @@ Reference<XTextCursor> XMLTextImportHelper::RedlineCreateText(
}
bool XMLTextImportHelper::CheckRedlineExists(
- const OUString& /*rId*/)
+ const OUString& /*rStartParaPos*/)
{
return true;
}
+void XMLTextImportHelper::InsertRedlinesWithinParagraph(const OUString& /*rStartParaPos*/, bool /*bStart*/, bool /*bIsOutsideOfParagraph*/)
+{
+}
+
void XMLTextImportHelper::RedlineSetCursor(
const OUString& /*rParaPos*/,
const OUString& /*rTextPos*/,
diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx
index 86c5736a9071..f3c3c5800d03 100644
--- a/xmloff/source/text/txtparai.cxx
+++ b/xmloff/source/text/txtparai.cxx
@@ -1820,7 +1820,8 @@ XMLParaContext::XMLParaContext(
const OUString& rLName,
const Reference< xml::sax::XAttributeList > & xAttrList,
bool bHead,
- bool bInsertRedln) :
+ bool bInsertRedln,
+ const OUString& rStartParaPos) :
SvXMLImportContext( rImport, nPrfx, rLName ),
xStart( rImport.GetTextImport()->GetCursorAsRange()->getStart() ),
m_bHaveAbout(false),
@@ -1831,6 +1832,7 @@ XMLParaContext::XMLParaContext(
bIgnoreLeadingSpace( true ),
bHeading( bHead ),
bInsertRedline( bInsertRedln ),
+ sStartParaPos(rStartParaPos),
bIsListHeader( false ),
bIsRestart (false),
nStartValue(0),
@@ -2232,6 +2234,7 @@ void XMLParaContext::Characters( const OUString& rChars )
if(bInsertRedline)
{
GetImport().GetTextImport()->InsertString( sChars, bIgnoreLeadingSpace );
+ GetImport().GetTextImport()->InsertRedlinesWithinParagraph(sStartParaPos, true, false);
}
else
GetImport().GetTextImport()->InsertString( sChars, bIgnoreLeadingSpace );
diff --git a/xmloff/source/text/txtparai.hxx b/xmloff/source/text/txtparai.hxx
index 812480613518..e6fd5dcd4f7a 100644
--- a/xmloff/source/text/txtparai.hxx
+++ b/xmloff/source/text/txtparai.hxx
@@ -50,6 +50,7 @@ class XMLParaContext : public SvXMLImportContext
bool bIgnoreLeadingSpace;
bool bHeading;
bool bInsertRedline;
+ OUString sStartParaPos;
bool bIsListHeader;
bool bIsRestart;
sal_Int16 nStartValue;
@@ -63,7 +64,7 @@ public:
const OUString& rLName,
const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList,
bool bHeading,
- bool bInsertRedln = false );
+ bool bInsertRedln = false, const OUString& rStartParaPos = OUString() );
virtual ~XMLParaContext();