sw/inc/unoprnms.hxx |2 ++
sw/source/core/unocore/unomapproperties.hxx |5 +++--
sw/source/core/unocore/unoredline.cxx | 10 ++
3 files changed, 15 insertions(+), 2 deletions(-)
New commits:
commit db2c79d70c5c464ecd794db57f4961df27791997
Author: Rosemary Sebastian
Date: Wed Jun 15 12:17:42 2016 +0530
Create "Start" and "End" properties for redline
Change-Id: I2c5a69948af9b80334e84f45382f290c9bfcad1a
diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx
index 63589f2..c3e9853 100644
--- a/sw/inc/unoprnms.hxx
+++ b/sw/inc/unoprnms.hxx
@@ -540,6 +540,8 @@
#define UNO_NAME_REDLINE_SUCCESSOR_DATA "RedlineSuccessorData"
#define UNO_NAME_REDLINE_IDENTIFIER "RedlineIdentifier"
#define UNO_NAME_IS_IN_HEADER_FOOTER "IsInHeaderFooter"
+#define UNO_NAME_START "Start"
+#define UNO_NAME_END "End"
#define UNO_NAME_START_REDLINE "StartRedline"
#define UNO_NAME_END_REDLINE "EndRedline"
#define UNO_NAME_REDLINE_START "RedlineStart"
diff --git a/sw/source/core/unocore/unomapproperties.hxx
b/sw/source/core/unocore/unomapproperties.hxx
index 1f528f0..bc2851f 100644
--- a/sw/source/core/unocore/unomapproperties.hxx
+++ b/sw/source/core/unocore/unomapproperties.hxx
@@ -73,8 +73,9 @@
{OUString(UNO_NAME_REDLINE_IDENTIFIER), 0, cppu::UnoType::get(),
PropertyAttribute::MAYBEVOID|PropertyAttribute::READONLY, 0},\
{OUString(UNO_NAME_IS_IN_HEADER_FOOTER), 0, cppu::UnoType::get(),
PropertyAttribute::MAYBEVOID|PropertyAttribute::READONLY, 0},\
{OUString(UNO_NAME_REDLINE_TEXT), 0,
cppu::UnoType::get(),
PropertyAttribute::MAYBEVOID|PropertyAttribute::READONLY, 0},\
-{OUString(UNO_NAME_MERGE_LAST_PARA), 0, cppu::UnoType::get(),
PropertyAttribute::MAYBEVOID|PropertyAttribute::READONLY,
0},
-
+{OUString(UNO_NAME_MERGE_LAST_PARA), 0, cppu::UnoType::get(),
PropertyAttribute::MAYBEVOID|PropertyAttribute::READONLY,
0},\
+{OUString(UNO_NAME_START), 0, cppu::UnoType::get(),
PropertyAttribute::MAYBEVOID|PropertyAttribute::READONLY, 0},\
+{OUString(UNO_NAME_END), 0, cppu::UnoType::get(),
PropertyAttribute::MAYBEVOID|PropertyAttribute::READONLY, 0},
#define COMMON_CRSR_PARA_PROPERTIES_FN_ONLY \
{ OUString(UNO_NAME_PARA_STYLE_NAME), FN_UNO_PARA_STYLE,
cppu::UnoType::get(),PropertyAttribute::MAYBEVOID,
0}, \
{ OUString(UNO_NAME_PAGE_STYLE_NAME), FN_UNO_PAGE_STYLE,
cppu::UnoType::get(),
PropertyAttribute::MAYBEVOID|PropertyAttribute::READONLY, 0},
\
diff --git a/sw/source/core/unocore/unoredline.cxx
b/sw/source/core/unocore/unoredline.cxx
index 20b9f4c..896da83 100644
--- a/sw/source/core/unocore/unoredline.cxx
+++ b/sw/source/core/unocore/unoredline.cxx
@@ -309,6 +309,16 @@ uno::Any SwXRedlinePortion::GetPropertyValue( const
OUString& rPropertyName, co
{
aRet <<= !rRedline.IsDelLastPara();
}
+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
+ aRet <<= nEnd;
+}
return aRet;
}
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits