2010-10-27 13:11:31 +01:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-21 14:30:25 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2001-01-10 19:51:01 +00:00
|
|
|
|
|
|
|
|
2013-10-23 19:30:56 +02:00
|
|
|
#ifndef INCLUDED_XMLOFF_SOURCE_TEXT_XMLCHANGEDREGIONIMPORTCONTEXT_HXX
|
|
|
|
#define INCLUDED_XMLOFF_SOURCE_TEXT_XMLCHANGEDREGIONIMPORTCONTEXT_HXX
|
2001-01-10 19:51:01 +00:00
|
|
|
|
2007-06-27 14:54:22 +00:00
|
|
|
#include <xmloff/xmlictxt.hxx>
|
2001-01-10 19:51:01 +00:00
|
|
|
#include <com/sun/star/uno/Reference.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace com { namespace sun { namespace star {
|
|
|
|
namespace text {
|
|
|
|
class XTextCursor;
|
|
|
|
}
|
|
|
|
namespace xml { namespace sax {
|
|
|
|
class XAttributeList;
|
|
|
|
} }
|
|
|
|
} } }
|
|
|
|
|
2013-04-04 18:05:24 +02:00
|
|
|
/**
|
|
|
|
* Import <text:changed-region> elements contained in a
|
|
|
|
* <text:tracked-changes> element.
|
|
|
|
*/
|
2001-01-10 19:51:01 +00:00
|
|
|
class XMLChangedRegionImportContext : public SvXMLImportContext
|
|
|
|
{
|
|
|
|
/// if we replace the current XTextCursor/XText by the ones for
|
2013-03-03 17:11:39 +01:00
|
|
|
/// the redline, we remember the old cursor here.
|
2015-11-26 08:43:00 +02:00
|
|
|
css::uno::Reference<css::text::XTextCursor> xOldCursor;
|
2001-01-10 19:51:01 +00:00
|
|
|
|
2013-04-04 18:05:24 +02:00
|
|
|
/// redline-ID
|
|
|
|
OUString sID;
|
2001-11-30 16:43:02 +00:00
|
|
|
|
2013-04-04 18:05:24 +02:00
|
|
|
/// merge-last-paragraph flag
|
2014-04-07 16:42:18 +02:00
|
|
|
bool bMergeLastPara;
|
2001-01-10 19:51:01 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
|
|
XMLChangedRegionImportContext(
|
|
|
|
SvXMLImport& rImport,
|
|
|
|
sal_uInt16 nPrefix,
|
2013-04-07 12:06:47 +02:00
|
|
|
const OUString& rLocalName);
|
2001-01-10 19:51:01 +00:00
|
|
|
|
2016-09-13 13:09:01 +02:00
|
|
|
virtual ~XMLChangedRegionImportContext() override;
|
2001-01-10 19:51:01 +00:00
|
|
|
|
|
|
|
virtual void StartElement(
|
2015-11-26 08:43:00 +02:00
|
|
|
const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList) override;
|
2001-01-10 19:51:01 +00:00
|
|
|
|
2017-09-21 12:12:33 +01:00
|
|
|
virtual SvXMLImportContextRef CreateChildContext(
|
2001-01-10 19:51:01 +00:00
|
|
|
sal_uInt16 nPrefix,
|
2013-04-07 12:06:47 +02:00
|
|
|
const OUString& rLocalName,
|
2015-11-26 08:43:00 +02:00
|
|
|
const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList) override;
|
2001-01-10 19:51:01 +00:00
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void EndElement() override;
|
2001-01-10 19:51:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
/// change info: To be called from change-info context
|
2013-04-07 12:06:47 +02:00
|
|
|
void SetChangeInfo(const OUString& rType,
|
|
|
|
const OUString& rAuthor,
|
|
|
|
const OUString& rComment,
|
|
|
|
const OUString& rDate);
|
2001-01-10 19:51:01 +00:00
|
|
|
|
|
|
|
/// create redline XText/XTextCursor on demand and register with
|
|
|
|
/// XMLTextImportHelper
|
|
|
|
void UseRedlineText();
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
2010-10-27 13:11:31 +01:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|