summaryrefslogtreecommitdiff
path: root/desktop/source/lib/init.cxx
diff options
context:
space:
mode:
authorPranav Kant <pranavk@collabora.co.uk>2017-03-03 14:57:39 +0530
committerpranavk <pranavk@collabora.co.uk>2017-03-08 06:44:57 +0000
commite6cca48bc9deb1049f8d501406269b71f91511ca (patch)
treeff2aec2ec271497c0b0f1c844a411f3cd42c0372 /desktop/source/lib/init.cxx
parent0531ffaf99941ad1d1a1c79b368c086cd9e64516 (diff)
lok: Do not use UNO for fetching tracked changes
See inline comment for reasons. Also, move the SwRedlineTypeToOUString function as inline to same header file containing redline types. Change-Id: I9b4be4f104c095b2ccd8287d935347c81fd25974 Reviewed-on: https://gerrit.libreoffice.org/34950 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: pranavk <pranavk@collabora.co.uk>
Diffstat (limited to 'desktop/source/lib/init.cxx')
-rw-r--r--desktop/source/lib/init.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 5ba852efccb4..5d0dfc28d688 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -2484,7 +2484,10 @@ static char* getTrackedChanges(LibreOfficeKitDocument* pThis)
uno::Reference<document::XRedlinesSupplier> xRedlinesSupplier(pDocument->mxComponent, uno::UNO_QUERY);
std::stringstream aStream;
- if (xRedlinesSupplier.is())
+ // We want positions of the track changes also which is not possible from
+ // UNO. Enable positioning information for text documents only for now, so
+ // construct the tracked changes JSON from inside the sw/, not here using UNO
+ if (doc_getDocumentType(pThis) != LOK_DOCTYPE_TEXT && xRedlinesSupplier.is())
{
uno::Reference<container::XEnumeration> xRedlines = xRedlinesSupplier->getRedlines()->createEnumeration();
boost::property_tree::ptree aRedlines;