1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_SW_SOURCE_FILTER_XML_XMLTEXTI_HXX
20 #define INCLUDED_SW_SOURCE_FILTER_XML_XMLTEXTI_HXX
22 #include <xmloff/txtimp.hxx>
24 class XMLRedlineImportHelper
;
27 class SwXMLTextImportHelper
: public XMLTextImportHelper
29 XMLRedlineImportHelper
*m_pRedlineHelper
;
32 virtual SvXMLImportContext
*CreateTableChildContext(
35 const css::uno::Reference
< css::xml::sax::XFastAttributeList
> & xAttrList
) override
;
38 SwXMLTextImportHelper(
39 const css::uno::Reference
<css::frame::XModel
>& rModel
,
41 const css::uno::Reference
<css::beans::XPropertySet
>& rInfoSet
,
42 bool bInsertM
, bool bStylesOnlyM
,
43 bool bBlockM
, bool bOrganizerM
);
44 virtual ~SwXMLTextImportHelper() override
;
46 virtual css::uno::Reference
<css::beans::XPropertySet
>
47 createAndInsertOLEObject( SvXMLImport
& rImport
,
48 const OUString
& rHRef
,
49 const OUString
& rStyleName
,
50 const OUString
& rTableName
,
51 sal_Int32 nWidth
, sal_Int32 nHeight
) override
;
52 virtual css::uno::Reference
<css::beans::XPropertySet
>
53 createAndInsertOOoLink( SvXMLImport
& rImport
,
54 const OUString
& rHRef
,
55 const OUString
& rStyleName
,
56 const OUString
& rTableName
,
57 sal_Int32 nWidth
, sal_Int32 nHeight
) override
;
58 virtual css::uno::Reference
<css::beans::XPropertySet
>
59 createAndInsertApplet(
60 const OUString
&rName
,
61 const OUString
&rCode
,
63 const OUString
& rHRef
,
64 sal_Int32 nWidth
, sal_Int32 nHeight
) override
;
66 virtual css::uno::Reference
<css::beans::XPropertySet
>
67 createAndInsertPlugin(
68 const OUString
&rMimeType
,
69 const OUString
& rHRef
,
70 sal_Int32 nWidth
, sal_Int32 nHeight
) override
;
72 virtual css::uno::Reference
<css::beans::XPropertySet
>
73 createAndInsertFloatingFrame(
74 const OUString
&rName
,
75 const OUString
&rHRef
,
76 const OUString
&rStyleName
,
77 sal_Int32 nWidth
, sal_Int32 nHeight
) override
;
79 virtual void endAppletOrPlugin(
80 const css::uno::Reference
< css::beans::XPropertySet
> &rPropSet
,
81 std::map
< const OUString
, OUString
> &rParamMap
) override
;
83 virtual bool IsInHeaderFooter() const override
;
85 // redlining helper methods
86 // (here is the real implementation)
87 virtual void RedlineAdd(
88 const OUString
& rType
, /// redline type (insert, del,... )
89 const OUString
& rId
, /// use to identify this redline
90 const OUString
& rAuthor
, /// name of the author
91 const OUString
& rComment
, /// redline comment
92 const css::util::DateTime
& rDateTime
, /// date+time
93 const OUString
& rMovedID
, /// redline move id, to find moveFrom/MoveTo parts
94 bool bMergeLastPara
) override
; /// merge last paragraph
95 virtual css::uno::Reference
<css::text::XTextCursor
> RedlineCreateText(
96 css::uno::Reference
<css::text::XTextCursor
> & rOldCursor
, /// needed to get the document
97 const OUString
& rId
) override
; /// ID used to RedlineAdd() call
98 virtual void RedlineSetCursor(
99 const OUString
& rId
, /// ID used to RedlineAdd() call
100 bool bStart
, /// start or end Cursor
101 bool bIsOutsideOfParagraph
) override
;
102 virtual void RedlineAdjustStartNodeCursor() override
;
103 virtual void SetShowChanges( bool bShowChanges
) override
;
104 virtual void SetRecordChanges( bool bRecordChanges
) override
;
105 virtual void SetChangesProtectionKey(
106 const css::uno::Sequence
<sal_Int8
> & rKey
) override
;
109 #endif // INCLUDED_SW_SOURCE_FILTER_XML_XMLTEXTI_HXX
111 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */