1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: xmltexti.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
33 #ifndef _XMLOFF_TXTIMP_HXX
34 #include <xmloff/txtimp.hxx>
36 #include <xmloff/functional.hxx>
38 class XMLRedlineImportHelper
;
41 class SwXMLTextImportHelper
: public XMLTextImportHelper
43 XMLRedlineImportHelper
*pRedlineHelper
;
46 virtual SvXMLImportContext
*CreateTableChildContext(
48 sal_uInt16 nPrefix
, const ::rtl::OUString
& rLocalName
,
49 const ::com::sun::star::uno::Reference
<
50 ::com::sun::star::xml::sax::XAttributeList
> & xAttrList
);
53 SwXMLTextImportHelper(
54 const ::com::sun::star::uno::Reference
<
55 ::com::sun::star::frame::XModel
>& rModel
,
57 const ::com::sun::star::uno::Reference
<
58 ::com::sun::star::beans::XPropertySet
>& rInfoSet
,
59 sal_Bool bInsertM
, sal_Bool bStylesOnlyM
, sal_Bool bProgress
,
60 sal_Bool bBlockM
, sal_Bool bOrganizerM
,
61 sal_Bool bPreserveRedlineMode
);
62 ~SwXMLTextImportHelper();
64 virtual ::com::sun::star::uno::Reference
<
65 ::com::sun::star::beans::XPropertySet
>
66 createAndInsertOLEObject( SvXMLImport
& rImport
,
67 const ::rtl::OUString
& rHRef
,
68 const ::rtl::OUString
& rStyleName
,
69 const ::rtl::OUString
& rTblName
,
70 sal_Int32 nWidth
, sal_Int32 nHeight
);
71 virtual ::com::sun::star::uno::Reference
<
72 ::com::sun::star::beans::XPropertySet
>
73 createAndInsertOOoLink( SvXMLImport
& rImport
,
74 const ::rtl::OUString
& rHRef
,
75 const ::rtl::OUString
& rStyleName
,
76 const ::rtl::OUString
& rTblName
,
77 sal_Int32 nWidth
, sal_Int32 nHeight
);
78 virtual ::com::sun::star::uno::Reference
<
79 ::com::sun::star::beans::XPropertySet
>
80 createAndInsertApplet(
81 const ::rtl::OUString
&rName
,
82 const ::rtl::OUString
&rCode
,
84 const ::rtl::OUString
& rHRef
,
85 sal_Int32 nWidth
, sal_Int32 nHeight
);
87 virtual ::com::sun::star::uno::Reference
<
88 ::com::sun::star::beans::XPropertySet
>
89 createAndInsertPlugin(
90 const ::rtl::OUString
&rMimeType
,
91 const ::rtl::OUString
& rHRef
,
92 sal_Int32 nWidth
, sal_Int32 nHeight
);
94 virtual ::com::sun::star::uno::Reference
<
95 ::com::sun::star::beans::XPropertySet
>
96 createAndInsertFloatingFrame(
97 const ::rtl::OUString
&rName
,
98 const ::rtl::OUString
&rHRef
,
99 const ::rtl::OUString
&rStyleName
,
100 sal_Int32 nWidth
, sal_Int32 nHeight
);
102 virtual void endAppletOrPlugin(
103 const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
> &rPropSet
,
104 ::std::map
< const ::rtl::OUString
, ::rtl::OUString
, ::comphelper::UStringLess
> &rParamMap
);
106 virtual sal_Bool
IsInHeaderFooter() const;
108 // redlining helper methods
109 // (here is the real implementation)
110 virtual void RedlineAdd(
111 const ::rtl::OUString
& rType
, /// redline type (insert, del,... )
112 const ::rtl::OUString
& rId
, /// use to identify this redline
113 const ::rtl::OUString
& rAuthor
, /// name of the author
114 const ::rtl::OUString
& rComment
, /// redline comment
115 const ::com::sun::star::util::DateTime
& rDateTime
, /// date+time
116 sal_Bool bMergeLastPara
); /// merge last paragraph
117 virtual ::com::sun::star::uno::Reference
<
118 ::com::sun::star::text::XTextCursor
> RedlineCreateText(
119 ::com::sun::star::uno::Reference
< /// needed to get the document
120 ::com::sun::star::text::XTextCursor
> & rOldCursor
,
121 const ::rtl::OUString
& rId
); /// ID used to RedlineAdd() call
122 virtual void RedlineSetCursor(
123 const ::rtl::OUString
& rId
, /// ID used to RedlineAdd() call
124 sal_Bool bStart
, /// start or end Cursor
125 sal_Bool bIsOutsideOfParagraph
);
126 virtual void RedlineAdjustStartNodeCursor(
128 virtual void SetShowChanges( sal_Bool bShowChanges
);
129 virtual void SetRecordChanges( sal_Bool bRecordChanges
);
130 virtual void SetChangesProtectionKey(
131 const ::com::sun::star::uno::Sequence
<sal_Int8
> & rKey
);
134 #endif // _XMLTEXTI_HXX