[Libreoffice-commits] core.git: Branch 'private/Rosemary/change-tracking' - sw/source xmloff/source
Rosemary Sebastian
rosemaryseb8 at gmail.com
Thu Jun 16 11:25:56 UTC 2016
sw/source/core/unocore/unoredline.cxx | 2 --
xmloff/source/text/XMLRedlineExport.cxx | 12 ++++++------
2 files changed, 6 insertions(+), 8 deletions(-)
New commits:
commit 8554bcbecdeeb709554712a711d75d69e4b5ec6e
Author: Rosemary Sebastian <rosemaryseb8 at gmail.com>
Date: Thu Jun 16 16:49:17 2016 +0530
WIP Get start and end positions of redline
Change-Id: I23550fb065eb36fd1be91826397e5d9d0034b0c7
diff --git a/sw/source/core/unocore/unoredline.cxx b/sw/source/core/unocore/unoredline.cxx
index 896da83..367cd9a 100644
--- a/sw/source/core/unocore/unoredline.cxx
+++ b/sw/source/core/unocore/unoredline.cxx
@@ -311,9 +311,7 @@ uno::Any SwXRedlinePortion::GetPropertyValue( const OUString& rPropertyName, co
}
else if (rPropertyName == UNO_NAME_START || rPropertyName == UNO_NAME_END)
{
- SwNodeIndex* pNodeIdx = rRedline.GetContentIdx();
sal_Int32 nStart(COMPLETE_STRING), nEnd(COMPLETE_STRING);
- rRedline.CalcStartEnd(pNodeIdx->GetNode().GetIndex(), nStart, nEnd);
if(rPropertyName == UNO_NAME_START)
aRet <<= nStart;
else
diff --git a/xmloff/source/text/XMLRedlineExport.cxx b/xmloff/source/text/XMLRedlineExport.cxx
index b4451fd..1e3ad9f 100644
--- a/xmloff/source/text/XMLRedlineExport.cxx
+++ b/xmloff/source/text/XMLRedlineExport.cxx
@@ -335,19 +335,19 @@ void XMLRedlineExport::ExportChangedRegion(
OUString sType;
aAny >>= sType;
XMLTokenEnum eChangeType = XML_PARAGRAPH;
- OUString sParagraphIdx = "2", sCharStart, sCharEnd;
- rPropSet->getPropertyValue("Start") >>= sCharStart;
- rPropSet->getPropertyValue("End") >>= sCharEnd;
+ sal_uInt16 nParagraphIdx = 2, nCharStart, nCharEnd;
+ rPropSet->getPropertyValue("Start") >>= nCharStart;
+ rPropSet->getPropertyValue("End") >>= nCharEnd;
if(eChangeType == XML_PARAGRAPH)
{
- rExport.AddAttribute(XML_NAMESPACE_C, XML_START, "/" + sParagraphIdx);
+ rExport.AddAttribute(XML_NAMESPACE_C, XML_START, "/" + rtl::OUString::number(nParagraphIdx));
rExport.AddAttribute(XML_NAMESPACE_DC, XML_TYPE, XML_PARAGRAPH);
}
else
{
- rExport.AddAttribute(XML_NAMESPACE_C, XML_START, "/" + sParagraphIdx + "/" + sCharStart);
+ rExport.AddAttribute(XML_NAMESPACE_C, XML_START, "/" + rtl::OUString::number(nParagraphIdx) + "/" + rtl::OUString::number(nCharStart));
if( sType == sInsert )
- rExport.AddAttribute(XML_NAMESPACE_C, XML_END, "/" + sParagraphIdx + "/" + sCharEnd);
+ rExport.AddAttribute(XML_NAMESPACE_C, XML_END, "/" + rtl::OUString::number(nParagraphIdx) + "/" + rtl::OUString::number(nCharEnd));
rExport.AddAttribute(XML_NAMESPACE_DC, XML_TYPE, eChangeType);
}
SvXMLElementExport aChange(rExport, XML_NAMESPACE_TEXT,
More information about the Libreoffice-commits
mailing list