summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
Diffstat (limited to 'editeng')
-rw-r--r--editeng/inc/editeng.hrc46
-rw-r--r--editeng/inc/editeng/AccessibleComponentBase.hxx150
-rw-r--r--editeng/inc/editeng/AccessibleContextBase.hxx403
-rw-r--r--editeng/inc/editeng/AccessibleEditableTextPara.hxx415
-rw-r--r--editeng/inc/editeng/AccessibleImageBullet.hxx240
-rw-r--r--editeng/inc/editeng/AccessibleParaManager.hxx350
-rw-r--r--editeng/inc/editeng/AccessibleSelectionBase.hxx76
-rw-r--r--editeng/inc/editeng/AccessibleStaticTextBase.hxx562
-rw-r--r--editeng/inc/editeng/AccessibleStringWrap.hxx66
-rw-r--r--editeng/inc/editeng/SpellPortions.hxx98
-rw-r--r--editeng/inc/editeng/UnoForbiddenCharsTable.hxx68
-rw-r--r--editeng/inc/editeng/acorrcfg.hxx136
-rw-r--r--editeng/inc/editeng/adjitem.hxx146
-rw-r--r--editeng/inc/editeng/akrnitem.hxx77
-rw-r--r--editeng/inc/editeng/blnkitem.hxx75
-rw-r--r--editeng/inc/editeng/bolnitem.hxx86
-rw-r--r--editeng/inc/editeng/borderline.hxx137
-rw-r--r--editeng/inc/editeng/boxitem.hxx229
-rw-r--r--editeng/inc/editeng/brkitem.hxx106
-rw-r--r--editeng/inc/editeng/brshitem.hxx143
-rw-r--r--editeng/inc/editeng/bulitem.hxx163
-rw-r--r--editeng/inc/editeng/charhiddenitem.hxx64
-rw-r--r--editeng/inc/editeng/charreliefitem.hxx83
-rw-r--r--editeng/inc/editeng/charrotateitem.hxx95
-rw-r--r--editeng/inc/editeng/charscaleitem.hxx81
-rw-r--r--editeng/inc/editeng/cmapitem.hxx92
-rw-r--r--editeng/inc/editeng/cntritem.hxx71
-rw-r--r--editeng/inc/editeng/colritem.hxx98
-rw-r--r--editeng/inc/editeng/crsditem.hxx96
-rw-r--r--editeng/inc/editeng/cscoitem.hxx78
-rw-r--r--editeng/inc/editeng/editdata.hxx391
-rw-r--r--editeng/inc/editeng/editeng.hxx489
-rw-r--r--editeng/inc/editeng/editengdllapi.h43
-rw-r--r--editeng/inc/editeng/editerr.hxx39
-rw-r--r--editeng/inc/editeng/editids.hrc245
-rw-r--r--editeng/inc/editeng/editobj.hxx129
-rw-r--r--editeng/inc/editeng/editrids.hrc432
-rw-r--r--editeng/inc/editeng/editstat.hxx153
-rw-r--r--editeng/inc/editeng/editund2.hxx79
-rw-r--r--editeng/inc/editeng/editview.hxx251
-rw-r--r--editeng/inc/editeng/edtdlg.hxx114
-rw-r--r--editeng/inc/editeng/eedata.hxx78
-rw-r--r--editeng/inc/editeng/eeitem.hxx102
-rw-r--r--editeng/inc/editeng/eeitemid.hxx139
-rw-r--r--editeng/inc/editeng/eerdll.hxx64
-rw-r--r--editeng/inc/editeng/emphitem.hxx91
-rw-r--r--editeng/inc/editeng/escpitem.hxx117
-rw-r--r--editeng/inc/editeng/fhgtitem.hxx119
-rw-r--r--editeng/inc/editeng/flditem.hxx430
-rw-r--r--editeng/inc/editeng/flstitem.hxx82
-rw-r--r--editeng/inc/editeng/fontitem.hxx121
-rw-r--r--editeng/inc/editeng/forbiddencharacterstable.hxx73
-rw-r--r--editeng/inc/editeng/forbiddenruleitem.hxx72
-rw-r--r--editeng/inc/editeng/frmdir.hxx63
-rw-r--r--editeng/inc/editeng/frmdiritem.hxx83
-rw-r--r--editeng/inc/editeng/fwdtitem.hxx111
-rw-r--r--editeng/inc/editeng/hangulhanja.hxx305
-rw-r--r--editeng/inc/editeng/hngpnctitem.hxx72
-rw-r--r--editeng/inc/editeng/hyznitem.hxx109
-rw-r--r--editeng/inc/editeng/itemtype.hxx78
-rw-r--r--editeng/inc/editeng/keepitem.hxx81
-rw-r--r--editeng/inc/editeng/kernitem.hxx83
-rw-r--r--editeng/inc/editeng/langitem.hxx87
-rw-r--r--editeng/inc/editeng/lcolitem.hxx68
-rw-r--r--editeng/inc/editeng/lrspitem.hxx182
-rw-r--r--editeng/inc/editeng/lspcitem.hxx126
-rw-r--r--editeng/inc/editeng/measfld.hxx69
-rw-r--r--editeng/inc/editeng/memberids.hrc196
-rw-r--r--editeng/inc/editeng/mutxhelp.hxx47
-rw-r--r--editeng/inc/editeng/nhypitem.hxx71
-rw-r--r--editeng/inc/editeng/nlbkitem.hxx76
-rw-r--r--editeng/inc/editeng/numdef.hxx33
-rw-r--r--editeng/inc/editeng/numitem.hxx399
-rw-r--r--editeng/inc/editeng/opaqitem.hxx84
-rw-r--r--editeng/inc/editeng/optitems.hxx114
-rw-r--r--editeng/inc/editeng/orphitem.hxx77
-rw-r--r--editeng/inc/editeng/outliner.hxx1050
-rw-r--r--editeng/inc/editeng/outlobj.hxx99
-rw-r--r--editeng/inc/editeng/paperinf.hxx76
-rw-r--r--editeng/inc/editeng/paragraphdata.hxx75
-rw-r--r--editeng/inc/editeng/paravertalignitem.hxx83
-rw-r--r--editeng/inc/editeng/pbinitem.hxx80
-rw-r--r--editeng/inc/editeng/pgrditem.hxx67
-rw-r--r--editeng/inc/editeng/pmdlitem.hxx89
-rw-r--r--editeng/inc/editeng/postitem.hxx92
-rw-r--r--editeng/inc/editeng/prntitem.hxx82
-rw-r--r--editeng/inc/editeng/protitem.hxx108
-rw-r--r--editeng/inc/editeng/prszitem.hxx71
-rw-r--r--editeng/inc/editeng/scriptspaceitem.hxx73
-rw-r--r--editeng/inc/editeng/scripttypeitem.hxx94
-rw-r--r--editeng/inc/editeng/shaditem.hxx114
-rw-r--r--editeng/inc/editeng/shdditem.hxx77
-rw-r--r--editeng/inc/editeng/sizeitem.hxx86
-rw-r--r--editeng/inc/editeng/spltitem.hxx84
-rw-r--r--editeng/inc/editeng/splwrap.hxx162
-rw-r--r--editeng/inc/editeng/svxacorr.hxx396
-rw-r--r--editeng/inc/editeng/svxenum.hxx221
-rw-r--r--editeng/inc/editeng/svxfont.hxx129
-rw-r--r--editeng/inc/editeng/svxrtf.hxx478
-rw-r--r--editeng/inc/editeng/swafopt.hxx109
-rw-r--r--editeng/inc/editeng/tstpitem.hxx188
-rw-r--r--editeng/inc/editeng/twolinesitem.hxx93
-rw-r--r--editeng/inc/editeng/txtrange.hxx121
-rw-r--r--editeng/inc/editeng/udlnitem.hxx136
-rw-r--r--editeng/inc/editeng/ulspitem.hxx116
-rw-r--r--editeng/inc/editeng/unoedhlp.hxx192
-rw-r--r--editeng/inc/editeng/unoedprx.hxx177
-rw-r--r--editeng/inc/editeng/unoedsrc.hxx554
-rw-r--r--editeng/inc/editeng/unofdesc.hxx57
-rw-r--r--editeng/inc/editeng/unofield.hxx140
-rw-r--r--editeng/inc/editeng/unofored.hxx102
-rw-r--r--editeng/inc/editeng/unoforou.hxx130
-rw-r--r--editeng/inc/editeng/unoipset.hxx86
-rw-r--r--editeng/inc/editeng/unolingu.hxx239
-rw-r--r--editeng/inc/editeng/unonrule.hxx98
-rw-r--r--editeng/inc/editeng/unopracc.hxx76
-rw-r--r--editeng/inc/editeng/unoprnms.hxx379
-rw-r--r--editeng/inc/editeng/unotext.hxx678
-rw-r--r--editeng/inc/editeng/unoviwed.hxx65
-rw-r--r--editeng/inc/editeng/unoviwou.hxx71
-rw-r--r--editeng/inc/editeng/wghtitem.hxx92
-rw-r--r--editeng/inc/editeng/widwitem.hxx77
-rw-r--r--editeng/inc/editeng/writingmodeitem.hxx71
-rw-r--r--editeng/inc/editeng/wrlmitem.hxx78
-rw-r--r--editeng/inc/editeng/xmlcnitm.hxx94
-rw-r--r--editeng/inc/editxml.hxx46
-rw-r--r--editeng/inc/helpid.hrc81
-rw-r--r--editeng/inc/makefile.mk52
-rw-r--r--editeng/inc/pch/precompiled_editeng.cxx32
-rw-r--r--editeng/inc/pch/precompiled_editeng.hxx897
-rw-r--r--editeng/prj/build.lst13
-rw-r--r--editeng/prj/d.lst14
-rw-r--r--editeng/source/accessibility/AccessibleComponentBase.cxx240
-rw-r--r--editeng/source/accessibility/AccessibleContextBase.cxx718
-rw-r--r--editeng/source/accessibility/AccessibleEditableTextPara.cxx2204
-rw-r--r--editeng/source/accessibility/AccessibleImageBullet.cxx654
-rw-r--r--editeng/source/accessibility/AccessibleParaManager.cxx423
-rw-r--r--editeng/source/accessibility/AccessibleSelectionBase.cxx111
-rw-r--r--editeng/source/accessibility/AccessibleStaticTextBase.cxx1050
-rw-r--r--editeng/source/accessibility/AccessibleStringWrap.cxx103
-rw-r--r--editeng/source/accessibility/accessibility.src43
-rwxr-xr-xediteng/source/accessibility/makefile.mk58
-rw-r--r--editeng/source/editeng/editattr.cxx457
-rw-r--r--editeng/source/editeng/editattr.hxx429
-rw-r--r--editeng/source/editeng/editdbg.cxx589
-rw-r--r--editeng/source/editeng/editdbg.hxx60
-rw-r--r--editeng/source/editeng/editdoc.cxx2317
-rw-r--r--editeng/source/editeng/editdoc.hxx805
-rw-r--r--editeng/source/editeng/editdoc2.cxx547
-rw-r--r--editeng/source/editeng/editeng.cxx2944
-rw-r--r--editeng/source/editeng/editeng.src127
-rw-r--r--editeng/source/editeng/editobj.cxx1728
-rw-r--r--editeng/source/editeng/editobj2.hxx312
-rw-r--r--editeng/source/editeng/editsel.cxx124
-rw-r--r--editeng/source/editeng/editsel.hxx78
-rw-r--r--editeng/source/editeng/editstt2.hxx133
-rw-r--r--editeng/source/editeng/editundo.cxx753
-rw-r--r--editeng/source/editeng/editundo.hxx318
-rw-r--r--editeng/source/editeng/editview.cxx1598
-rw-r--r--editeng/source/editeng/edtspell.cxx749
-rw-r--r--editeng/source/editeng/edtspell.hxx188
-rw-r--r--editeng/source/editeng/eehtml.cxx853
-rw-r--r--editeng/source/editeng/eehtml.hxx101
-rw-r--r--editeng/source/editeng/eeng_pch.cxx33
-rw-r--r--editeng/source/editeng/eeng_pch.hxx37
-rw-r--r--editeng/source/editeng/eeobj.cxx115
-rw-r--r--editeng/source/editeng/eeobj.hxx75
-rw-r--r--editeng/source/editeng/eerdll.cxx240
-rw-r--r--editeng/source/editeng/eerdll2.hxx64
-rw-r--r--editeng/source/editeng/eertfpar.cxx635
-rw-r--r--editeng/source/editeng/eertfpar.hxx131
-rw-r--r--editeng/source/editeng/impedit.cxx2005
-rw-r--r--editeng/source/editeng/impedit.hxx1211
-rw-r--r--editeng/source/editeng/impedit2.cxx4635
-rw-r--r--editeng/source/editeng/impedit3.cxx4680
-rw-r--r--editeng/source/editeng/impedit4.cxx2958
-rw-r--r--editeng/source/editeng/impedit5.cxx914
-rw-r--r--editeng/source/editeng/makefile.mk84
-rw-r--r--editeng/source/editeng/textconv.cxx632
-rw-r--r--editeng/source/editeng/textconv.hxx125
-rw-r--r--editeng/source/items/bulitem.cxx537
-rw-r--r--editeng/source/items/charhiddenitem.cxx85
-rw-r--r--editeng/source/items/flditem.cxx1101
-rw-r--r--editeng/source/items/frmitems.cxx4470
-rw-r--r--editeng/source/items/itemtype.cxx242
-rw-r--r--editeng/source/items/makefile.mk79
-rw-r--r--editeng/source/items/numitem.cxx1276
-rw-r--r--editeng/source/items/optitems.cxx206
-rw-r--r--editeng/source/items/page.src258
-rw-r--r--editeng/source/items/paperinf.cxx188
-rw-r--r--editeng/source/items/paraitem.cxx1760
-rw-r--r--editeng/source/items/svdfield.cxx65
-rw-r--r--editeng/source/items/svxfont.cxx860
-rw-r--r--editeng/source/items/svxitems.src1027
-rw-r--r--editeng/source/items/textitem.cxx3846
-rw-r--r--editeng/source/items/writingmodeitem.cxx156
-rw-r--r--editeng/source/items/xmlcnitm.cxx251
-rw-r--r--editeng/source/misc/SvXMLAutoCorrectExport.cxx120
-rw-r--r--editeng/source/misc/SvXMLAutoCorrectExport.hxx78
-rw-r--r--editeng/source/misc/SvXMLAutoCorrectImport.cxx269
-rw-r--r--editeng/source/misc/SvXMLAutoCorrectImport.hxx151
-rw-r--r--editeng/source/misc/acorrcfg.cxx681
-rwxr-xr-xediteng/source/misc/edtdlg.cxx43
-rw-r--r--editeng/source/misc/forbiddencharacterstable.cxx95
-rw-r--r--editeng/source/misc/hangulhanja.cxx1174
-rw-r--r--editeng/source/misc/lingu.src107
-rw-r--r--editeng/source/misc/makefile.mk71
-rw-r--r--editeng/source/misc/splwrap.cxx635
-rw-r--r--editeng/source/misc/svxacorr.cxx2706
-rw-r--r--editeng/source/misc/swafopt.cxx163
-rw-r--r--editeng/source/misc/txtrange.cxx722
-rw-r--r--editeng/source/misc/unolingu.cxx1377
-rw-r--r--editeng/source/outliner/makefile.mk64
-rw-r--r--editeng/source/outliner/outl_pch.cxx34
-rw-r--r--editeng/source/outliner/outl_pch.hxx36
-rw-r--r--editeng/source/outliner/outleeng.cxx247
-rw-r--r--editeng/source/outliner/outleeng.hxx96
-rw-r--r--editeng/source/outliner/outlin2.cxx816
-rw-r--r--editeng/source/outliner/outliner.cxx2184
-rw-r--r--editeng/source/outliner/outliner.src87
-rw-r--r--editeng/source/outliner/outlobj.cxx274
-rw-r--r--editeng/source/outliner/outlundo.cxx237
-rw-r--r--editeng/source/outliner/outlundo.hxx143
-rw-r--r--editeng/source/outliner/outlvw.cxx1675
-rw-r--r--editeng/source/outliner/paralist.cxx290
-rw-r--r--editeng/source/outliner/paralist.hxx74
-rw-r--r--editeng/source/rtf/makefile.mk55
-rw-r--r--editeng/source/rtf/rtfgrf.cxx561
-rw-r--r--editeng/source/rtf/rtfitem.cxx2104
-rw-r--r--editeng/source/rtf/segincr.asm43
-rw-r--r--editeng/source/rtf/svxrtf.cxx1517
-rw-r--r--editeng/source/uno/UnoForbiddenCharsTable.cxx148
-rw-r--r--editeng/source/uno/makefile.mk65
-rw-r--r--editeng/source/uno/unoedhlp.cxx200
-rw-r--r--editeng/source/uno/unoedprx.cxx1292
-rw-r--r--editeng/source/uno/unoedsrc.cxx93
-rw-r--r--editeng/source/uno/unofdesc.cxx269
-rw-r--r--editeng/source/uno/unofield.cxx1183
-rw-r--r--editeng/source/uno/unofored.cxx555
-rw-r--r--editeng/source/uno/unoforou.cxx613
-rw-r--r--editeng/source/uno/unoipset.cxx394
-rw-r--r--editeng/source/uno/unonrule.cxx618
-rw-r--r--editeng/source/uno/unopracc.cxx174
-rw-r--r--editeng/source/uno/unotext.cxx2720
-rw-r--r--editeng/source/uno/unotext2.cxx714
-rw-r--r--editeng/source/uno/unoviwed.cxx140
-rw-r--r--editeng/source/uno/unoviwou.cxx176
-rw-r--r--editeng/source/xml/editsource.hxx55
-rw-r--r--editeng/source/xml/makefile.mk50
-rw-r--r--editeng/source/xml/xmltxtexp.cxx503
-rw-r--r--editeng/source/xml/xmltxtimp.cxx263
-rw-r--r--editeng/util/editeng.dxp3
-rw-r--r--editeng/util/hidother.src52
-rw-r--r--editeng/util/makefile.mk102
-rw-r--r--editeng/util/makefile.pmk47
255 files changed, 105390 insertions, 0 deletions
diff --git a/editeng/inc/editeng.hrc b/editeng/inc/editeng.hrc
new file mode 100644
index 000000000000..b255d01a80c2
--- /dev/null
+++ b/editeng/inc/editeng.hrc
@@ -0,0 +1,46 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: editeng.hrc,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _EDITENG_HRC
+#define _EDITENG_HRC
+
+#include <editeng/editrids.hrc>
+
+#define MN_SPELLING 1
+#define MN_INSERT 2
+#define MN_IGNORE 3
+#define MN_AUTOCORR 4
+#define MN_WORDLANGUAGE 5
+#define MN_PARALANGUAGE 6
+
+#define MN_ALTSTART 1000
+#define MN_AUTOSTART 2000
+#define MN_DICTSTART 3000
+
+#endif // _EDITENG_HRC
diff --git a/editeng/inc/editeng/AccessibleComponentBase.hxx b/editeng/inc/editeng/AccessibleComponentBase.hxx
new file mode 100644
index 000000000000..f2b25e607eea
--- /dev/null
+++ b/editeng/inc/editeng/AccessibleComponentBase.hxx
@@ -0,0 +1,150 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: AccessibleComponentBase.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#ifndef _SVX_ACCESSIBILITY_ACCESSIBLE_EXTENDED_COMPONENT_BASE_HXX
+#define _SVX_ACCESSIBILITY_ACCESSIBLE_EXTENDED_COMPONENT_BASE_HXX
+
+
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/XAccessibleExtendedComponent.hpp>
+#include <com/sun/star/awt/XFocusListener.hpp>
+#include "editeng/editengdllapi.h"
+
+namespace accessibility {
+
+/** @descr
+ This base class provides (will provice) a base implementation of the
+ <type>XAccessibleComponent</type> and the
+ <type>XAccessibleExtendedComponent</type> for all shapes. For
+ more detailed documentation about the methods refer to the interface
+ descriptions of <type>XAccessible</type>,
+ <type>XAccessibleContext</type>, <type>XInterface</type>,
+ <type>XServiceInfo</type>, and <type>XTypeProvider</type>.
+*/
+class EDITENG_DLLPUBLIC AccessibleComponentBase
+ : public ::com::sun::star::accessibility::XAccessibleExtendedComponent
+{
+public:
+ //===== internal ========================================================
+ AccessibleComponentBase (void);
+ virtual ~AccessibleComponentBase (void);
+
+
+ //===== XAccessibleComponent ================================================
+
+ /** The default implementation uses the result of
+ <member>getBounds</member> to determine whether the given point lies
+ inside this object.
+ */
+ virtual sal_Bool SAL_CALL containsPoint (
+ const ::com::sun::star::awt::Point& aPoint)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /** The default implementation returns an empty reference.
+ */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleAtPoint (
+ const ::com::sun::star::awt::Point& aPoint)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /** The default implementation returns an empty rectangle.
+ */
+ virtual ::com::sun::star::awt::Rectangle SAL_CALL getBounds (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /** The default implementation uses the result of
+ <member>getBounds</member> to determine the location.
+ */
+ virtual ::com::sun::star::awt::Point SAL_CALL getLocation (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /** The default implementation returns an empty position, i.e. the
+ * result of the default constructor of <type>com::sun::star::awt::Point</type>.
+ */
+ virtual ::com::sun::star::awt::Point SAL_CALL getLocationOnScreen (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /** The default implementation uses the result of
+ <member>getBounds</member> to determine the size.
+ */
+ virtual ::com::sun::star::awt::Size SAL_CALL getSize (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /** The default implementation ignores this call.
+ */
+ virtual void SAL_CALL addFocusListener (
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::awt::XFocusListener >& xListener)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /** The default implementation ignores this call.
+ */
+ virtual void SAL_CALL removeFocusListener (const ::com::sun::star::uno::Reference<
+ ::com::sun::star::awt::XFocusListener >& xListener )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /** The default implementation does nothing.
+ */
+ virtual void SAL_CALL grabFocus (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /** Returns black as the default foreground color.
+ */
+ virtual sal_Int32 SAL_CALL getForeground (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /** Returns white as the default background color.
+ */
+ virtual sal_Int32 SAL_CALL getBackground (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ //===== XAccessibleExtendedComponent ====================================
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont > SAL_CALL
+ getFont (void)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getTitledBorderText (void)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getToolTipText (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+
+ //===== XTypeProvider ===================================================
+
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> SAL_CALL
+ getTypes (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+};
+
+} // end of namespace accessibility
+
+#endif
diff --git a/editeng/inc/editeng/AccessibleContextBase.hxx b/editeng/inc/editeng/AccessibleContextBase.hxx
new file mode 100644
index 000000000000..188bf7dd53c7
--- /dev/null
+++ b/editeng/inc/editeng/AccessibleContextBase.hxx
@@ -0,0 +1,403 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: AccessibleContextBase.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SVX_ACCESSIBILITY_ACCESSIBLE_CONTEXT_BASE_HXX
+#define _SVX_ACCESSIBILITY_ACCESSIBLE_CONTEXT_BASE_HXX
+
+//#include <editeng/ChildrenManager.hxx>
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/XAccessibleContext.hpp>
+#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
+#include <com/sun/star/accessibility/XAccessibleStateSet.hpp>
+#include <com/sun/star/accessibility/XAccessibleRelationSet.hpp>
+#include <com/sun/star/accessibility/AccessibleEventObject.hpp>
+#include <com/sun/star/accessibility/AccessibleEventId.hpp>
+#include <com/sun/star/accessibility/IllegalAccessibleComponentStateException.hpp>
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/lang/XComponent.hpp>
+#include <cppuhelper/weak.hxx>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/lang/XTypeProvider.hpp>
+#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
+#include <com/sun/star/lang/DisposedException.hpp>
+#include <osl/mutex.hxx>
+#include <cppuhelper/compbase4.hxx>
+#include <editeng/editengdllapi.h>
+
+
+namespace accessibility {
+
+struct MutexOwner {mutable ::osl::Mutex maMutex;};
+
+/** @descr
+ This base class provides an implementation of the
+ <type>AccessibleContext</type> service. Appart from the
+ <type>XXAccessible<type> and <type>XAccessibleContextContext</type>
+ interfaces it supports the <type>XServiceInfo</type> interface.
+*/
+class EDITENG_DLLPUBLIC AccessibleContextBase
+ : public MutexOwner,
+ public cppu::WeakComponentImplHelper4<
+ ::com::sun::star::accessibility::XAccessible,
+ ::com::sun::star::accessibility::XAccessibleContext,
+ ::com::sun::star::accessibility::XAccessibleEventBroadcaster,
+ ::com::sun::star::lang::XServiceInfo
+ >
+{
+public:
+
+ //===== internal ========================================================
+
+ /** The origin of the accessible name or description.
+ */
+ enum StringOrigin {
+ ManuallySet,
+ FromShape,
+ AutomaticallyCreated,
+ NotSet
+ };
+
+ AccessibleContextBase (
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible>& rxParent,
+ const sal_Int16 aRole);
+ virtual ~AccessibleContextBase (void);
+
+
+ /** Call all accessiblity event listeners to inform them about the
+ specified event.
+ @param aEventId
+ Id of the event type.
+ @param rNewValue
+ New value of the modified attribute. Pass empty structure if
+ not applicable.
+ @param rOldValue
+ Old value of the modified attribute. Pass empty structure if
+ not applicable.
+ */
+ void CommitChange (sal_Int16 aEventId,
+ const ::com::sun::star::uno::Any& rNewValue,
+ const ::com::sun::star::uno::Any& rOldValue);
+
+ /** Set a new description and, provided that the new name differs from
+ the old one, broadcast an accessibility event.
+ @param rsDescription
+ The new description.
+ @param eDescriptionOrigin
+ The origin of the description. This is used to determine
+ whether the given description overrules the existing one. An
+ origin with a lower numerical value overrides one with a higher
+ value.
+ */
+ void SetAccessibleDescription (
+ const ::rtl::OUString& rsDescription,
+ StringOrigin eDescriptionOrigin)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /** Set a new description and, provided that the new name differs from
+ the old one, broadcast an accessibility event.
+ @param rsName
+ The new name.
+ @param eNameOrigin
+ The origin of the name. This is used to determine whether the
+ given name overrules the existing one. An origin with a lower
+ numerical value overrides one with a higher value.
+ */
+ void SetAccessibleName (
+ const ::rtl::OUString& rsName,
+ StringOrigin eNameOrigin)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /** Set the specified state (turn it on) and send events to all
+ listeners to inform them of the change.
+
+ @param aState
+ The state to turn on.
+
+ @return
+ If the specified state changed its value due to this call
+ <TRUE/> is returned, otherwise <FALSE/>.
+ */
+ virtual sal_Bool SetState (sal_Int16 aState);
+
+ /** Reset the specified state (turn it off) and send events to all
+ listeners to inform them of the change.
+
+ @param aState
+ The state to turn off.
+
+ @return
+ If the specified state changed its value due to this call
+ <TRUE/> is returned, otherwise <FALSE/>.
+ */
+ virtual sal_Bool ResetState (sal_Int16 aState);
+
+ /** Return the state of the specified state.
+
+ @param aState
+ The state for which to return its value.
+
+ @return
+ A value of <TRUE/> indicates that the state is set. A <FALSE/>
+ value indicates an unset state.
+ */
+ sal_Bool GetState (sal_Int16 aState);
+
+ /** Replace the current relation set with the specified one. Send
+ events for relations that are not in both sets.
+
+ @param rRelationSet
+ The new relation set that replaces the old one.
+ */
+ virtual void SetRelationSet (
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleRelationSet>& rxRelationSet)
+ throw (::com::sun::star::uno::RuntimeException);
+
+
+ //===== XAccessible =====================================================
+
+ /// Return the XAccessibleContext.
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleContext> SAL_CALL
+ getAccessibleContext (void) throw (::com::sun::star::uno::RuntimeException);
+
+
+ //===== XAccessibleContext ==============================================
+
+ /// Return the number of currently visible children.
+ virtual sal_Int32 SAL_CALL
+ getAccessibleChildCount (void) throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return the specified child or throw exception.
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL
+ getAccessibleChild (sal_Int32 nIndex)
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+
+ /// Return a reference to the parent.
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL
+ getAccessibleParent (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return this objects index among the parents children.
+ virtual sal_Int32 SAL_CALL
+ getAccessibleIndexInParent (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return this object's role.
+ virtual sal_Int16 SAL_CALL
+ getAccessibleRole (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return this object's description.
+ virtual ::rtl::OUString SAL_CALL
+ getAccessibleDescription (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return the object's current name.
+ virtual ::rtl::OUString SAL_CALL
+ getAccessibleName (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return NULL to indicate that an empty relation set.
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleRelationSet> SAL_CALL
+ getAccessibleRelationSet (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return the set of current states.
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleStateSet> SAL_CALL
+ getAccessibleStateSet (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /** Return the parents locale or throw exception if this object has no
+ parent yet/anymore.
+ */
+ virtual ::com::sun::star::lang::Locale SAL_CALL
+ getLocale (void)
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::accessibility::IllegalAccessibleComponentStateException);
+
+ //===== XComponent ========================================================
+
+ using WeakComponentImplHelperBase::addEventListener;
+ using WeakComponentImplHelperBase::removeEventListener;
+
+ //===== XAccessibleEventBroadcaster ========================================
+
+ virtual void SAL_CALL
+ addEventListener (
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleEventListener >& xListener)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL
+ removeEventListener (
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleEventListener >& xListener)
+ throw (::com::sun::star::uno::RuntimeException);
+
+
+ //===== XServiceInfo ====================================================
+
+ /** Returns an identifier for the implementation of this object.
+ */
+ virtual ::rtl::OUString SAL_CALL
+ getImplementationName (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /** Return whether the specified service is supported by this class.
+ */
+ virtual sal_Bool SAL_CALL
+ supportsService (const ::rtl::OUString& sServiceName)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /** Returns a list of all supported services. In this case that is just
+ the AccessibleContext service.
+ */
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL
+ getSupportedServiceNames (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+
+ //===== XTypeProvider ===================================================
+
+ /** Returns a sequence of all supported interfaces.
+ */
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> SAL_CALL
+ getTypes (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /** Returns a implementation id.
+ */
+ virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL
+ getImplementationId (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+protected:
+ /** The state set.
+ */
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleStateSet> mxStateSet;
+
+ /** The relation set. Relations can be set or removed by calling the
+ <member>AddRelation</member> and <member>RemoveRelation</member> methods.
+ */
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleRelationSet> mxRelationSet;
+
+ // This method is called from the component helper base class while disposing.
+ virtual void SAL_CALL disposing (void);
+
+ /** Create the accessible object's name. This method may be called more
+ than once for a single object.
+ @return
+ The returned string is a unique (among the accessible object's
+ siblings) name.
+ */
+ virtual ::rtl::OUString CreateAccessibleName (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /** Create the accessible object's descriptive string. May be called
+ more than once.
+ @return
+ Descriptive string. Not necessarily unique.
+ */
+ virtual ::rtl::OUString
+ CreateAccessibleDescription (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ void FireEvent (const ::com::sun::star::accessibility::AccessibleEventObject& aEvent);
+
+ /** Check whether or not the object has been disposed (or is in the
+ state of beeing disposed). If that is the case then
+ DisposedException is thrown to inform the (indirect) caller of the
+ foul deed.
+ */
+ void ThrowIfDisposed (void)
+ throw (::com::sun::star::lang::DisposedException);
+
+ /** Check whether or not the object has been disposed (or is in the
+ state of beeing disposed).
+
+ @return sal_True, if the object is disposed or in the course
+ of being disposed. Otherwise, sal_False is returned.
+ */
+ sal_Bool IsDisposed (void);
+
+ /** sets the role as returned by XaccessibleContext::getAccessibleRole
+
+ <p>Caution: This is only to be used in the construction phase (means within
+ the ctor or late ctor), <em>never</em> when the object is still alive and part
+ of an Accessibility hierarchy.</p>
+ */
+ void SetAccessibleRole( sal_Int16 _nRole );
+
+private:
+ /// Reference to the parent object.
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible> mxParent;
+
+ /** Description of this object. This is not a constant because it can
+ be set from the outside. Furthermore, it changes according the the
+ draw page's display mode.
+ */
+ ::rtl::OUString msDescription;
+
+ /** The origin of the description is used to determine whether new
+ descriptions given to the SetAccessibleDescription is ignored or
+ whether that replaces the old value in msDescription.
+ */
+ StringOrigin meDescriptionOrigin;
+
+ /** Name of this object. It changes according the the draw page's
+ display mode.
+ */
+ ::rtl::OUString msName;
+
+ /** The origin of the name is used to determine whether new
+ name given to the SetAccessibleName is ignored or
+ whether that replaces the old value in msName.
+ */
+ StringOrigin meNameOrigin;
+
+ /** client id in the AccessibleEventNotifier queue
+ */
+ sal_uInt32 mnClientId;
+
+ /** This is the role of this object.
+ */
+ sal_Int16 maRole;
+};
+
+}
+
+#endif
diff --git a/editeng/inc/editeng/AccessibleEditableTextPara.hxx b/editeng/inc/editeng/AccessibleEditableTextPara.hxx
new file mode 100644
index 000000000000..776f3180f072
--- /dev/null
+++ b/editeng/inc/editeng/AccessibleEditableTextPara.hxx
@@ -0,0 +1,415 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: AccessibleEditableTextPara.hxx,v $
+ * $Revision: 1.22 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SVX_ACCESSIBLE_EDITABLE_TEXT_PARA_HXX
+#define _SVX_ACCESSIBLE_EDITABLE_TEXT_PARA_HXX
+
+#include <tools/gen.hxx>
+#include <tools/string.hxx>
+#include <cppuhelper/weakref.hxx>
+#include <cppuhelper/compbase8.hxx>
+#include <cppuhelper/typeprovider.hxx>
+#include <cppuhelper/interfacecontainer.hxx>
+
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/XAccessibleContext.hpp>
+#include <com/sun/star/accessibility/XAccessibleComponent.hpp>
+#include <com/sun/star/accessibility/XAccessibleEditableText.hpp>
+#include <com/sun/star/accessibility/XAccessibleTextAttributes.hpp>
+#include <com/sun/star/accessibility/XAccessibleMultiLineText.hpp>
+
+#include <comphelper/accessibletexthelper.hxx>
+#include <comphelper/broadcasthelper.hxx>
+#include "editeng/AccessibleParaManager.hxx"
+#include "editeng/AccessibleImageBullet.hxx"
+#include "editeng/unoedprx.hxx"
+#include "editeng/editengdllapi.h"
+
+namespace accessibility
+{
+ typedef ::cppu::WeakComponentImplHelper8< ::com::sun::star::accessibility::XAccessible,
+ ::com::sun::star::accessibility::XAccessibleContext,
+ ::com::sun::star::accessibility::XAccessibleComponent,
+ ::com::sun::star::accessibility::XAccessibleEditableText,
+ ::com::sun::star::accessibility::XAccessibleEventBroadcaster,
+ ::com::sun::star::accessibility::XAccessibleTextAttributes,
+ ::com::sun::star::accessibility::XAccessibleMultiLineText,
+ ::com::sun::star::lang::XServiceInfo > AccessibleTextParaInterfaceBase;
+
+ /** This class implements the actual text paragraphs for the EditEngine/Outliner UAA
+ */
+ class EDITENG_DLLPUBLIC AccessibleEditableTextPara : public ::comphelper::OBaseMutex, public AccessibleTextParaInterfaceBase, public ::comphelper::OCommonAccessibleText
+ {
+
+ protected:
+ // override OCommonAccessibleText methods
+ virtual ::rtl::OUString implGetText();
+ virtual ::com::sun::star::lang::Locale implGetLocale();
+ virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex );
+ virtual void implGetParagraphBoundary( ::com::sun::star::i18n::Boundary& rBoundary, sal_Int32 nIndex );
+ virtual void implGetLineBoundary( ::com::sun::star::i18n::Boundary& rBoundary, sal_Int32 nIndex );
+
+ public:
+ /// Create accessible object for given parent
+ // --> OD 2006-01-11 #i27138#
+ // - add parameter <_pParaManager> (default value NULL)
+ // This has to be the the instance of <AccessibleParaManager>, which
+ // created and manages this accessible paragraph.
+ AccessibleEditableTextPara ( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rParent,
+ const AccessibleParaManager* _pParaManager = NULL );
+ // <--
+
+ virtual ~AccessibleEditableTextPara ();
+
+ // XInterface
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface (const ::com::sun::star::uno::Type & rType) throw (::com::sun::star::uno::RuntimeException);
+
+ // XComponent
+
+ using WeakComponentImplHelperBase::addEventListener;
+ using WeakComponentImplHelperBase::removeEventListener;
+
+ // XAccessible
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleContext
+ virtual sal_Int32 SAL_CALL getAccessibleChildCount() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleParent() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int16 SAL_CALL getAccessibleRole() throw (::com::sun::star::uno::RuntimeException);
+ /// Maximal length of text returned by getAccessibleDescription()
+ enum { MaxDescriptionLen = 40 };
+ virtual ::rtl::OUString SAL_CALL getAccessibleDescription() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getAccessibleName() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::lang::Locale SAL_CALL getLocale() throw (::com::sun::star::accessibility::IllegalAccessibleComponentStateException, ::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleEventBroadcaster
+ virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleComponent
+ virtual sal_Bool SAL_CALL containsPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Rectangle SAL_CALL getBounds( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Point SAL_CALL getLocation( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Point SAL_CALL getLocationOnScreen( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Size SAL_CALL getSize( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL grabFocus( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getForeground( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getBackground( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleText (this comes implicitely inherited by XAccessibleEditableText AND by XAccessibleMultiLineText)
+ virtual sal_Int32 SAL_CALL getCaretPosition() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRequestedAttributes ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getCharacterCount() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getIndexAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getSelectedText() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getSelectionStart() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getSelectionEnd() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getText() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ /// Does not support AccessibleTextType::SENTENCE (missing feature in EditEngine)
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ /// Does not support AccessibleTextType::SENTENCE (missing feature in EditEngine)
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ /// Does not support AccessibleTextType::SENTENCE (missing feature in EditEngine)
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleEditableText
+ virtual sal_Bool SAL_CALL cutText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL pasteText( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL deleteText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL insertText( const ::rtl::OUString& sText, sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL replaceText( sal_Int32 nStartIndex, sal_Int32 nEndIndex, const ::rtl::OUString& sReplacement ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL setAttributes( sal_Int32 nStartIndex, sal_Int32 nEndIndex, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aAttributeSet ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL setText( const ::rtl::OUString& sText ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleTextAttributes
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getDefaultAttributes( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& RequestedAttributes ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getRunAttributes( ::sal_Int32 Index, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& RequestedAttributes ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleMultiLineText
+ virtual ::sal_Int32 SAL_CALL getLineNumberAtIndex( ::sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextAtLineNumber( ::sal_Int32 nLineNo ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextAtLineWithCaret( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getNumberOfLineWithCaret( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName (void) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService (const ::rtl::OUString& sServiceName) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL getSupportedServiceNames (void) throw (::com::sun::star::uno::RuntimeException);
+
+ // XServiceName
+ virtual ::rtl::OUString SAL_CALL getServiceName (void) throw (::com::sun::star::uno::RuntimeException);
+
+ /** Set the current index in the accessibility parent
+
+ @attention This method does not lock the SolarMutex,
+ leaving that to the calling code. This is because only
+ there potential deadlock situations can be resolved. Thus,
+ make sure SolarMutex is locked when calling this.
+ */
+ void SetIndexInParent( sal_Int32 nIndex );
+
+ /** Get the current index in the accessibility parent
+
+ @attention This method does not lock the SolarMutex,
+ leaving that to the calling code. This is because only
+ there potential deadlock situations can be resolved. Thus,
+ make sure SolarMutex is locked when calling this.
+ */
+ sal_Int32 GetIndexInParent() const;
+
+ /** Set the current paragraph number
+
+ @attention This method does not lock the SolarMutex,
+ leaving that to the calling code. This is because only
+ there potential deadlock situations can be resolved. Thus,
+ make sure SolarMutex is locked when calling this.
+ */
+ void SetParagraphIndex( sal_Int32 nIndex );
+
+ /** Query the current paragraph number (0 - nParas-1)
+
+ @attention This method does not lock the SolarMutex,
+ leaving that to the calling code. This is because only
+ there potential deadlock situations can be resolved. Thus,
+ make sure SolarMutex is locked when calling this.
+ */
+ sal_Int32 GetParagraphIndex() const SAL_THROW((::com::sun::star::uno::RuntimeException));
+
+ /** Set the edit engine offset
+
+ @attention This method does not lock the SolarMutex,
+ leaving that to the calling code. This is because only
+ there potential deadlock situations can be resolved. Thus,
+ make sure SolarMutex is locked when calling this.
+ */
+ void SetEEOffset( const Point& rOffset );
+
+ /** Set the EditEngine offset
+
+ @attention This method does not lock the SolarMutex,
+ leaving that to the calling code. This is because only
+ there potential deadlock situations can be resolved. Thus,
+ make sure SolarMutex is locked when calling this.
+ */
+ void SetEditSource( SvxEditSourceAdapter* pEditSource );
+
+ /** Dispose this object
+
+ Notifies and deregisters the listeners, drops all references.
+ */
+ void Dispose();
+
+ /// Calls all Listener objects to tell them the change. Don't hold locks when calling this!
+ virtual void FireEvent(const sal_Int16 nEventId, const ::com::sun::star::uno::Any& rNewValue = ::com::sun::star::uno::Any(), const ::com::sun::star::uno::Any& rOldValue = ::com::sun::star::uno::Any() ) const;
+
+ /// Queries the given state on the internal state set
+ bool HasState( const sal_Int16 nStateId );
+ /// Sets the given state on the internal state set and fires STATE_CHANGE event. Don't hold locks when calling this!
+ void SetState( const sal_Int16 nStateId );
+ /// Unsets the given state on the internal state set and fires STATE_CHANGE event. Don't hold locks when calling this!
+ void UnSetState( const sal_Int16 nStateId );
+
+ static Rectangle LogicToPixel( const Rectangle& rRect, const MapMode& rMapMode, SvxViewForwarder& rForwarder );
+
+ SvxEditSourceAdapter& GetEditSource() const SAL_THROW((::com::sun::star::uno::RuntimeException));
+
+ /** Query the SvxTextForwarder for EditEngine access.
+
+ @attention This method does not lock the SolarMutex,
+ leaving that to the calling code. This is because only
+ there potential deadlock situations can be resolved. Thus,
+ make sure SolarMutex is locked when calling this.
+ */
+ SvxAccessibleTextAdapter& GetTextForwarder() const SAL_THROW((::com::sun::star::uno::RuntimeException));
+
+ /** Query the SvxViewForwarder for EditEngine access.
+
+ @attention This method does not lock the SolarMutex,
+ leaving that to the calling code. This is because only
+ there potential deadlock situations can be resolved. Thus,
+ make sure SolarMutex is locked when calling this.
+ */
+ SvxViewForwarder& GetViewForwarder() const SAL_THROW((::com::sun::star::uno::RuntimeException));
+
+ /** Query whether a GetEditViewForwarder( sal_False ) will return a forwarder
+
+ @attention This method does not lock the SolarMutex,
+ leaving that to the calling code. This is because only
+ there potential deadlock situations can be resolved. Thus,
+ make sure SolarMutex is locked when calling this.
+ */
+ sal_Bool HaveEditView() const;
+
+ /** Query the SvxEditViewForwarder for EditEngine access.
+
+ @attention This method does not lock the SolarMutex,
+ leaving that to the calling code. This is because only
+ there potential deadlock situations can be resolved. Thus,
+ make sure SolarMutex is locked when calling this.
+ */
+ SvxAccessibleTextEditViewAdapter& GetEditViewForwarder( sal_Bool bCreate = sal_False ) const SAL_THROW((::com::sun::star::uno::RuntimeException));
+
+ /** Send a TEXT_CHANGED event for this paragraph
+
+ This method internally caters for calculating text
+ differences, and sends the appropriate Anys in the
+ Accessibility::TEXT_CHANGED event
+ */
+ void TextChanged();
+
+ private:
+
+ // declared, but not defined
+ AccessibleEditableTextPara( const AccessibleEditableTextPara& );
+ AccessibleEditableTextPara& operator= ( const AccessibleEditableTextPara& );
+
+ /** Calculate character range of similar attributes
+
+ @param nStartIndex
+ Therein, the start of the character range with the same attributes is returned
+
+ @param nEndIndex
+ Therein, the end (exclusively) of the character range with the same attributes is returned
+
+ @param nIndex
+ The character index at where to look for similar character attributes
+
+ @return sal_False, if the method was not able to determine the range
+ */
+ sal_Bool GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, sal_Int32 nIndex );
+
+ // syntactic sugar for FireEvent
+ void GotPropertyEvent( const ::com::sun::star::uno::Any& rNewValue, const sal_Int16 nEventId ) const;
+ void LostPropertyEvent( const ::com::sun::star::uno::Any& rOldValue, const sal_Int16 nEventId ) const;
+
+ /** Query the visibility state
+
+ @attention This method does not lock the SolarMutex,
+ leaving that to the calling code. This is because only
+ there potential deadlock situations can be resolved. Thus,
+ make sure SolarMutex is locked when calling this.
+
+ @return the visibility state. Per definition, a defunc object is no longer visible
+ */
+ sal_Bool IsVisible() const;
+
+ int getNotifierClientId() const;
+
+ // retrieve text interface for given paragraph index
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleText > GetParaInterface( sal_Int32 nIndex );
+
+ /// Do we have children? This is the case for image bullets
+ sal_Bool HaveChildren();
+
+ /// Is the underlying object in edit mode
+ sal_Bool IsActive() const SAL_THROW((::com::sun::star::uno::RuntimeException));
+
+ const Point& GetEEOffset() const;
+
+ // Get text from forwarder
+ String GetText( sal_Int32 nIndex ) SAL_THROW((::com::sun::star::uno::RuntimeException));
+ String GetTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) SAL_THROW((::com::sun::star::uno::RuntimeException));
+ USHORT GetTextLen() const SAL_THROW((::com::sun::star::uno::RuntimeException));
+
+ /** Get the current selection of this paragraph
+
+ @return sal_False, if nothing in this paragraph is selected
+ */
+ sal_Bool GetSelection( USHORT& nStartPos, USHORT& nEndPos ) SAL_THROW((::com::sun::star::uno::RuntimeException));
+
+ /** create selection from Accessible selection.
+
+ */
+ ESelection MakeSelection( sal_Int32 nStartEEIndex, sal_Int32 nEndEEIndex );
+ ESelection MakeSelection( sal_Int32 nEEIndex );
+ ESelection MakeCursor( sal_Int32 nEEIndex );
+
+ // check whether index value is within permitted range
+
+ /// Check whether 0<=nIndex<=n-1
+ void CheckIndex( sal_Int32 nIndex ) SAL_THROW((::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException));
+ /// Check whether 0<=nIndex<=n
+ void CheckPosition( sal_Int32 nIndex ) SAL_THROW((::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException));
+ /// Check whether 0<=nStart<=n and 0<=nEnd<=n
+ void CheckRange( sal_Int32 nStart, sal_Int32 nEnd ) SAL_THROW((::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException));
+
+ // the paragraph index in the edit engine (guarded by solar mutex)
+ sal_Int32 mnParagraphIndex;
+
+ // our current index in the parent (guarded by solar mutex)
+ sal_Int32 mnIndexInParent;
+
+ // the current edit source (guarded by solar mutex)
+ SvxEditSourceAdapter* mpEditSource;
+
+ // the possible child (for image bullets, guarded by solar mutex)
+ typedef WeakCppRef < ::com::sun::star::accessibility::XAccessible, AccessibleImageBullet > WeakBullet;
+ WeakBullet maImageBullet;
+
+ // the last string used for an Accessibility::TEXT_CHANGED event (guarded by solar mutex)
+ ::rtl::OUString maLastTextString;
+
+ // the offset of the underlying EditEngine from the shape/cell (guarded by solar mutex)
+ Point maEEOffset;
+
+ // the current state set (updated from SetState/UnSetState and guarded by solar mutex)
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > mxStateSet;
+
+ /// The shape we're the accessible for (unguarded)
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > mxParent;
+
+ /// Our listeners (guarded by maMutex)
+ int mnNotifierClientId;
+
+ // --> OD 2006-01-11 #i27138#
+ // the paragraph manager, which created this instance - is NULL, if
+ // instance isn't created by AccessibleParaManager.
+ // Needed for method <getAccessibleRelationSet()> to retrieve predecessor
+ // paragraph and the successor paragraph.
+ const AccessibleParaManager* mpParaManager;
+ };
+
+} // end of namespace accessibility
+
+#endif
+
diff --git a/editeng/inc/editeng/AccessibleImageBullet.hxx b/editeng/inc/editeng/AccessibleImageBullet.hxx
new file mode 100644
index 000000000000..b3ad47e7f3fd
--- /dev/null
+++ b/editeng/inc/editeng/AccessibleImageBullet.hxx
@@ -0,0 +1,240 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: editeng/AccessibleImageBullet.hxx,v $
+ * $Revision: 1.12 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SVX_ACCESSIBLE_IMAGE_BULLET_HXX
+#define _SVX_ACCESSIBLE_IMAGE_BULLET_HXX
+
+#include <tools/gen.hxx>
+#include <cppuhelper/weakref.hxx>
+#include <cppuhelper/implbase5.hxx>
+
+#ifndef _CPPUHELPER_INTERFACECONTAINER_H_
+#include <cppuhelper/interfacecontainer.hxx>
+#endif
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/XAccessibleContext.hpp>
+#include <com/sun/star/accessibility/XAccessibleComponent.hpp>
+#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
+#include "editeng/AccessibleParaManager.hxx"
+#include <editeng/unoedsrc.hxx>
+
+namespace accessibility
+{
+ typedef ::cppu::WeakImplHelper5< ::com::sun::star::accessibility::XAccessible,
+ ::com::sun::star::accessibility::XAccessibleContext,
+ ::com::sun::star::accessibility::XAccessibleComponent,
+ ::com::sun::star::accessibility::XAccessibleEventBroadcaster,
+ ::com::sun::star::lang::XServiceInfo > AccessibleImageBulletInterfaceBase;
+
+ /** This class implements the image bullets for the EditEngine/Outliner UAA
+ */
+ class AccessibleImageBullet : public AccessibleImageBulletInterfaceBase
+ {
+
+ public:
+ /// Create accessible object for given parent
+ AccessibleImageBullet ( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rParent );
+
+ virtual ~AccessibleImageBullet ();
+
+ // XInterface
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface (const ::com::sun::star::uno::Type & rType) throw (::com::sun::star::uno::RuntimeException);
+
+ // XAccessible
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleContext
+ virtual sal_Int32 SAL_CALL getAccessibleChildCount() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleParent() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int16 SAL_CALL getAccessibleRole() throw (::com::sun::star::uno::RuntimeException);
+ /// Maximal length of text returned by getAccessibleDescription()
+ enum { MaxDescriptionLen = 40 };
+ virtual ::rtl::OUString SAL_CALL getAccessibleDescription() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getAccessibleName() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::lang::Locale SAL_CALL getLocale() throw (::com::sun::star::accessibility::IllegalAccessibleComponentStateException, ::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleEventBroadcaster
+ virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleComponent
+ virtual sal_Bool SAL_CALL containsPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Rectangle SAL_CALL getBounds( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Point SAL_CALL getLocation( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Point SAL_CALL getLocationOnScreen( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Size SAL_CALL getSize( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL grabFocus( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getForeground( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getBackground( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName (void) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService (const ::rtl::OUString& sServiceName) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL getSupportedServiceNames (void) throw (::com::sun::star::uno::RuntimeException);
+
+ // XServiceName
+ virtual ::rtl::OUString SAL_CALL getServiceName (void) throw (::com::sun::star::uno::RuntimeException);
+
+ /** Set the current index in the accessibility parent
+
+ @attention This method does not lock the SolarMutex,
+ leaving that to the calling code. This is because only
+ there potential deadlock situations can be resolved. Thus,
+ make sure SolarMutex is locked when calling this.
+ */
+ void SetIndexInParent( sal_Int32 nIndex );
+
+ /** Get the current index in the accessibility parent
+
+ @attention This method does not lock the SolarMutex,
+ leaving that to the calling code. This is because only
+ there potential deadlock situations can be resolved. Thus,
+ make sure SolarMutex is locked when calling this.
+ */
+ sal_Int32 GetIndexInParent() const;
+
+ /** Set the edit engine offset
+
+ @attention This method does not lock the SolarMutex,
+ leaving that to the calling code. This is because only
+ there potential deadlock situations can be resolved. Thus,
+ make sure SolarMutex is locked when calling this.
+ */
+ void SetEEOffset( const Point& rOffset );
+
+ /** Set the EditEngine offset
+
+ @attention This method does not lock the SolarMutex,
+ leaving that to the calling code. This is because only
+ there potential deadlock situations can be resolved. Thus,
+ make sure SolarMutex is locked when calling this.
+ */
+ void SetEditSource( SvxEditSource* pEditSource );
+
+ /** Dispose this object
+
+ Notifies and deregisters the listeners, drops all references.
+ */
+ void Dispose();
+
+ /** Set the current paragraph number
+
+ @attention This method does not lock the SolarMutex,
+ leaving that to the calling code. This is because only
+ there potential deadlock situations can be resolved. Thus,
+ make sure SolarMutex is locked when calling this.
+ */
+ void SetParagraphIndex( sal_Int32 nIndex );
+
+ /** Query the current paragraph number (0 - nParas-1)
+
+ @attention This method does not lock the SolarMutex,
+ leaving that to the calling code. This is because only
+ there potential deadlock situations can be resolved. Thus,
+ make sure SolarMutex is locked when calling this.
+ */
+ sal_Int32 GetParagraphIndex() const SAL_THROW((::com::sun::star::uno::RuntimeException));
+
+ /// Calls all Listener objects to tell them the change. Don't hold locks when calling this!
+ virtual void FireEvent(const sal_Int16 nEventId, const ::com::sun::star::uno::Any& rNewValue = ::com::sun::star::uno::Any(), const ::com::sun::star::uno::Any& rOldValue = ::com::sun::star::uno::Any() ) const;
+
+ private:
+
+ // declared, but not defined
+ AccessibleImageBullet( const AccessibleImageBullet& );
+ AccessibleImageBullet& operator= ( const AccessibleImageBullet& );
+
+ // syntactic sugar for FireEvent
+ void GotPropertyEvent( const ::com::sun::star::uno::Any& rNewValue, const sal_Int16 nEventId ) const;
+ void LostPropertyEvent( const ::com::sun::star::uno::Any& rOldValue, const sal_Int16 nEventId ) const;
+
+ // maintain state set and send STATE_CHANGE events
+ void SetState( const sal_Int16 nStateId );
+ void UnSetState( const sal_Int16 nStateId );
+
+ SvxEditSource& GetEditSource() const SAL_THROW((::com::sun::star::uno::RuntimeException));
+
+ int getNotifierClientId() const;
+
+ /** Query the SvxTextForwarder for EditEngine access.
+
+ @attention This method does not lock the SolarMutex,
+ leaving that to the calling code. This is because only
+ there potential deadlock situations can be resolved. Thus,
+ make sure SolarMutex is locked when calling this.
+ */
+ SvxTextForwarder& GetTextForwarder() const SAL_THROW((::com::sun::star::uno::RuntimeException));
+
+ /** Query the SvxViewForwarder for EditEngine access.
+
+ @attention This method does not lock the SolarMutex,
+ leaving that to the calling code. This is because only
+ there potential deadlock situations can be resolved. Thus,
+ make sure SolarMutex is locked when calling this.
+ */
+ SvxViewForwarder& GetViewForwarder() const SAL_THROW((::com::sun::star::uno::RuntimeException));
+
+ const Point& GetEEOffset() const;
+
+ // the paragraph index in the edit engine (guarded by solar mutex)
+ sal_Int32 mnParagraphIndex;
+
+ // our current index in the parent (guarded by solar mutex)
+ sal_Int32 mnIndexInParent;
+
+ // the current edit source (guarded by solar mutex)
+ SvxEditSource* mpEditSource;
+
+ // the offset of the underlying EditEngine from the shape/cell (guarded by solar mutex)
+ Point maEEOffset;
+
+ // the current state set (updated from SetState/UnSetState and guarded by solar mutex)
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > mxStateSet;
+
+ mutable osl::Mutex maMutex;
+
+ /// The shape we're the accessible for (unguarded)
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > mxParent;
+
+ /// Our listeners (guarded by maMutex)
+ int mnNotifierClientId;
+ };
+
+} // end of namespace accessibility
+
+#endif
+
diff --git a/editeng/inc/editeng/AccessibleParaManager.hxx b/editeng/inc/editeng/AccessibleParaManager.hxx
new file mode 100644
index 000000000000..16c346e960de
--- /dev/null
+++ b/editeng/inc/editeng/AccessibleParaManager.hxx
@@ -0,0 +1,350 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: AccessibleParaManager.hxx,v $
+ * $Revision: 1.12 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SVX_ACCESSIBLE_PARA_MANAGER_HXX
+#define _SVX_ACCESSIBLE_PARA_MANAGER_HXX
+
+#include <vector>
+#include <algorithm>
+#include <functional>
+#include <utility>
+#include <tools/gen.hxx>
+#include <com/sun/star/awt/Rectangle.hpp>
+#include <com/sun/star/uno/Reference.hxx>
+#include <cppuhelper/weakref.hxx>
+#include <com/sun/star/accessibility/XAccessibleContext.hpp>
+#include "editeng/editengdllapi.h"
+
+class SvxEditSourceAdapter;
+
+namespace accessibility
+{
+ class AccessibleEditableTextPara;
+
+ /** Helper class for WeakCppRef
+
+ This class is returned by WeakChild::get() and contains a hard
+ reference and a reference to the c++ object. This combination
+ prevents the c++ object from destruction during usage. Hold
+ this object only as long as absolutely necessary, prevents
+ referenced object from vanishing otherwise
+ */
+ template < class UnoType, class CppType > class HardCppRef
+ {
+ public:
+
+ typedef UnoType UnoInterfaceType;
+ typedef CppType InterfaceType;
+
+ HardCppRef( const ::com::sun::star::uno::WeakReference< UnoInterfaceType >& xRef, InterfaceType* rImpl ) :
+ mxRef( xRef ),
+ mpImpl( rImpl )
+ {
+ }
+
+ /** Query whether the reference is still valid.
+
+ Hands off also from the implementation pointer if this
+ returns sal_False!
+ */
+ sal_Bool is() const { return mxRef.is(); }
+ InterfaceType* operator->() const { return mpImpl; }
+ InterfaceType& operator*() const { return *mpImpl; }
+ ::com::sun::star::uno::Reference< UnoInterfaceType >& getRef() { return mxRef; }
+ const ::com::sun::star::uno::Reference< UnoInterfaceType >& getRef() const { return mxRef; }
+
+ // default copy constructor and assignment will do
+ // HardCppRef( const HardCppRef& );
+ // HardCppRef& operator= ( const HardCppRef& );
+
+ private:
+
+ // the interface, hard reference to prevent object from vanishing
+ ::com::sun::star::uno::Reference< UnoInterfaceType > mxRef;
+
+ // the c++ object, for our internal stuff
+ InterfaceType* mpImpl;
+
+ };
+
+ /** Helper class for weak object references plus implementation
+
+ This class combines a weak reference (to facilitate automatic
+ object disposal if user drops last reference) and hard
+ reference to the c++ class (for fast access and bypassing of
+ the UNO interface)
+ */
+ template < class UnoType, class CppType > class WeakCppRef
+ {
+ public:
+
+ typedef UnoType UnoInterfaceType;
+ typedef CppType InterfaceType;
+ typedef HardCppRef< UnoInterfaceType, InterfaceType > HardRefType;
+
+ WeakCppRef() : maWeakRef(), maUnsafeRef( NULL ) {}
+ WeakCppRef( InterfaceType& rImpl ) :
+ maWeakRef( ::com::sun::star::uno::Reference< UnoInterfaceType >( rImpl, ::com::sun::star::uno::UNO_QUERY ) ),
+ maUnsafeRef( &rImpl )
+ {
+ }
+
+ WeakCppRef( HardRefType& rImpl ) :
+ maWeakRef( rImpl.getRef() ),
+ maUnsafeRef( rImpl.operator->() )
+ {
+ }
+
+ // get object with c++ object and hard reference (which
+ // prevents the c++ object from destruction during use)
+ HardRefType get() const { return HardRefType( maWeakRef, maUnsafeRef ); }
+
+ // default copy constructor and assignment will do
+ // WeakCppRef( const WeakCppRef& );
+ // WeakCppRef& operator= ( const WeakCppRef& );
+
+ private:
+
+ // the interface, hold weakly
+ ::com::sun::star::uno::WeakReference< UnoInterfaceType > maWeakRef;
+
+ // hard ref to c++ class, _only_ valid if maWeakRef.is() is true
+ InterfaceType* maUnsafeRef;
+ };
+
+
+ /** This class manages the paragraphs of an AccessibleTextHelper
+
+ To facilitate automatic deletion of paragraphs no longer used,
+ this class uses the WeakCppRef helper to hold the objects weakly.
+ */
+ class EDITENG_DLLPUBLIC AccessibleParaManager
+ {
+ public:
+ typedef WeakCppRef < ::com::sun::star::accessibility::XAccessible, AccessibleEditableTextPara > WeakPara;
+ typedef ::std::pair< WeakPara, ::com::sun::star::awt::Rectangle > WeakChild;
+ typedef ::std::pair< ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > , ::com::sun::star::awt::Rectangle > Child;
+ typedef ::std::vector< WeakChild > VectorOfChildren;
+ typedef ::std::vector< sal_Int16 > VectorOfStates;
+
+ AccessibleParaManager();
+ ~AccessibleParaManager();
+
+ /** Sets a vector of additional accessible states.
+
+ The states are passed to every created child object
+ (text paragraph). The state values are defined in
+ com::sun::star::accessibility::AccessibleStateType.
+ */
+ void SetAdditionalChildStates( const VectorOfStates& rChildStates );
+
+ /** Returns the additional accessible states for children.
+ */
+ const VectorOfStates& GetAdditionalChildStates() const;
+
+ /** Set the number of paragraphs
+
+ @param nNumPara
+ The total number of paragraphs the EditEngine currently
+ has (_not_ the number of currently visible children)
+ */
+ void SetNum( sal_Int32 nNumParas );
+
+ /** Get the number of paragraphs currently possible */
+ sal_uInt32 GetNum() const;
+
+ // iterators
+ VectorOfChildren::iterator begin();
+ VectorOfChildren::iterator end();
+ VectorOfChildren::const_iterator begin() const;
+ VectorOfChildren::const_iterator end() const;
+
+ // dealing with single paragraphs (release reference, return reference etc)
+ void Release( sal_uInt32 nPara );
+ /// Set focus to given child
+ void SetFocus( sal_Int32 nChild );
+
+ void FireEvent( sal_uInt32 nPara,
+ const sal_Int16 nEventId,
+ const ::com::sun::star::uno::Any& rNewValue = ::com::sun::star::uno::Any(),
+ const ::com::sun::star::uno::Any& rOldValue = ::com::sun::star::uno::Any() ) const;
+
+ static sal_Bool IsReferencable( WeakPara::HardRefType aChild );
+ sal_Bool IsReferencable( sal_uInt32 nChild ) const;
+ static void ShutdownPara( const WeakChild& rChild );
+
+ Child CreateChild( sal_Int32 nChild,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& xFrontEnd,
+ SvxEditSourceAdapter& rEditSource,
+ sal_uInt32 nParagraphIndex );
+
+ WeakChild GetChild( sal_uInt32 nParagraphIndex ) const;
+
+ // forwarder to all paragraphs
+ /// Make all children active and editable (or off)
+ void SetActive( sal_Bool bActive = sal_True );
+ /// Set state of all children
+ void SetState( const sal_Int16 nStateId );
+ /// Unset state of all children
+ void UnSetState( const sal_Int16 nStateId );
+ /// Set offset to edit engine for all children
+ void SetEEOffset ( const Point& rOffset );
+ /// Change edit source on all living children
+ void SetEditSource ( SvxEditSourceAdapter* pEditSource );
+ /// Dispose all living children
+ void Dispose ();
+
+ // forwarder to given paragraphs
+ //------------------------------------------------------------------------
+ /** Release the given range of paragraphs
+
+ All ranges have the meaning [start,end), similar to STL
+
+ @param nStartPara
+ Index of paragraph to start with releasing
+
+ @param nEndPara
+ Index of first paragraph to stop with releasing
+ */
+ void Release( sal_uInt32 nStartPara, sal_uInt32 nEndPara );
+
+ /** Fire event for the given range of paragraphs
+
+ All ranges have the meaning [start,end), similar to STL
+
+ @param nStartPara
+ Index of paragraph to start with event firing
+
+ @param nEndPara
+ Index of first paragraph to stop with event firing
+ */
+ void FireEvent( sal_uInt32 nStartPara,
+ sal_uInt32 nEndPara,
+ const sal_Int16 nEventId,
+ const ::com::sun::star::uno::Any& rNewValue = ::com::sun::star::uno::Any(),
+ const ::com::sun::star::uno::Any& rOldValue = ::com::sun::star::uno::Any() ) const;
+
+ /** Functor adapter for ForEach template
+
+ Adapts giving functor such that only the paragraph objects
+ are accessed and the fact that our children are held
+ weakly is hidden
+
+ The functor must provide the following method:
+ void operator() ( AccessibleEditablePara& )
+
+ */
+ template < typename Functor > class WeakChildAdapter : public ::std::unary_function< const WeakChild&, void >
+ {
+ public:
+ WeakChildAdapter( Functor& rFunctor ) : mrFunctor(rFunctor) {}
+ void operator()( const WeakChild& rPara )
+ {
+ // retrieve hard reference from weak one
+ WeakPara::HardRefType aHardRef( rPara.first.get() );
+
+ if( aHardRef.is() )
+ mrFunctor( *aHardRef );
+ }
+
+ private:
+ Functor& mrFunctor;
+ };
+
+ /** Adapter for unary member functions
+
+ Since STL's binder don't work with const& arguments (and
+ BOOST's neither, at least on MSVC), have to provide our
+ own adapter for unary member functions.
+
+ Create with pointer to member function of
+ AccessibleEditableTextPara and the corresponding argument.
+ */
+ template < typename Argument > class MemFunAdapter : public ::std::unary_function< const WeakChild&, void >
+ {
+ public:
+ typedef void (::accessibility::AccessibleEditableTextPara::*FunctionPointer)( Argument );
+
+ MemFunAdapter( FunctionPointer aFunPtr, Argument aArg ) : maFunPtr(aFunPtr), maArg(aArg) {}
+ void operator()( const WeakChild& rPara )
+ {
+ // retrieve hard reference from weak one
+ WeakPara::HardRefType aHardRef( rPara.first.get() );
+
+ if( aHardRef.is() )
+ (*aHardRef.*maFunPtr)( maArg );
+ }
+
+ private:
+ FunctionPointer maFunPtr;
+ Argument maArg;
+ };
+
+ /** Generic algorithm on given paragraphs
+
+ Convenience method, that already adapts the given functor with WeakChildAdapter
+ */
+ template < typename Functor > void ForEach( Functor& rFunctor )
+ {
+ ::std::for_each( begin(), end(), WeakChildAdapter< Functor >(rFunctor) );
+ }
+
+ private:
+ /// Set state on given child
+ void SetState( sal_Int32 nChild, const sal_Int16 nStateId );
+ /// Unset state on given child
+ void UnSetState( sal_Int32 nChild, const sal_Int16 nStateId );
+ /// Init child with default state (as stored in previous SetFocus and SetActive calls)
+ void InitChild( AccessibleEditableTextPara& rChild,
+ SvxEditSourceAdapter& rEditSource,
+ sal_Int32 nChild,
+ sal_uInt32 nParagraphIndex ) const;
+
+ // vector the size of the paragraph number of the underlying EditEngine
+ VectorOfChildren maChildren;
+
+ /// Additional states that will be set at every created child object.
+ VectorOfStates maChildStates;
+
+ // cache EE offset for child creation
+ Point maEEOffset;
+
+ // which child currently has the focus (-1 for none)
+ sal_Int32 mnFocusedChild;
+
+ // whether children are active and editable
+ sal_Bool mbActive;
+ };
+
+} // end of namespace accessibility
+
+#endif
+
diff --git a/editeng/inc/editeng/AccessibleSelectionBase.hxx b/editeng/inc/editeng/AccessibleSelectionBase.hxx
new file mode 100644
index 000000000000..c46187abe351
--- /dev/null
+++ b/editeng/inc/editeng/AccessibleSelectionBase.hxx
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: AccessibleSelectionBase.hxx,v $
+ * $Revision: 1.6 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SVX_ACCESSIBILITY_ACCESSIBLE_SELECTION_BASE_HXX
+#define _SVX_ACCESSIBILITY_ACCESSIBLE_SELECTION_BASE_HXX
+
+#include <comphelper/accessibleselectionhelper.hxx>
+#include "editeng/editengdllapi.h"
+
+namespace accessibility
+{
+/** @descr
+ This base class provides a base implementation of the
+ <type>XAccessibleSelection</type> interface.
+ The following methods have to be implemented if this
+ class is used:
+
+ <method>implGetMutex</method>,
+ <method>implGetAccessibleContext</method>,
+ <method>implIsSelected</method>,
+ <method>implSelect</method>,
+*/
+ class EDITENG_DLLPUBLIC AccessibleSelectionBase : public ::comphelper::OCommonAccessibleSelection,
+ public ::com::sun::star::accessibility::XAccessibleSelection
+ {
+ protected:
+
+ virtual ::osl::Mutex& implGetMutex() = 0;
+
+ public:
+
+ // XAccessibleSelection - default implementations
+ virtual void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL clearAccessibleSelection( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL selectAllAccessibleChildren( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+
+ public:
+
+ AccessibleSelectionBase();
+ virtual ~AccessibleSelectionBase();
+ };
+
+}
+
+#endif // _SVX_ACCESSIBILITY_ACCESSIBLE_SELECTION_BASE_HXX
diff --git a/editeng/inc/editeng/AccessibleStaticTextBase.hxx b/editeng/inc/editeng/AccessibleStaticTextBase.hxx
new file mode 100644
index 000000000000..9a6eb7fd0752
--- /dev/null
+++ b/editeng/inc/editeng/AccessibleStaticTextBase.hxx
@@ -0,0 +1,562 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: AccessibleStaticTextBase.hxx,v $
+ * $Revision: 1.14 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SVX_ACCESSILE_STATIC_TEXT_BASE_HXX_
+#define _SVX_ACCESSILE_STATIC_TEXT_BASE_HXX_
+
+#include <memory>
+#include <tools/gen.hxx>
+#include <cppuhelper/implbase2.hxx>
+#include <com/sun/star/uno/Any.hxx>
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/XAccessibleText.hpp>
+#include <com/sun/star/accessibility/XAccessibleTextAttributes.hpp>
+#include <com/sun/star/accessibility/TextSegment.hpp>
+#include "editeng/editengdllapi.h"
+
+
+class SvxEditSource;
+class SvxEditViewForwarder;
+
+namespace accessibility
+{
+
+ class AccessibleStaticTextBase_Impl;
+
+ typedef ::cppu::ImplHelper2<
+ ::com::sun::star::accessibility::XAccessibleText,
+ ::com::sun::star::accessibility::XAccessibleTextAttributes > AccessibleStaticTextBase_BASE;
+
+ /** Helper class for objects containing EditEngine/Outliner text
+
+ This class implements the XAccessibleText interface for static
+ text, somewhat similar to the children of the
+ AccessibleTextHelper class. Currently, there are no children,
+ i.e. the whole text is presented in one big chunk. This might
+ change in the future, if a need for image bullets should
+ arise. These, by convention, would be represented as children
+ of the text.
+
+ You have to implement the SvxEditSource, SvxTextForwarder,
+ SvxViewForwarder and SvxEditViewForwarder interfaces in order
+ to enable your object to cooperate with this
+ class. SvxTextForwarder encapsulates the fact that text
+ objects do not necessarily have an EditEngine at their
+ disposal, SvxViewForwarder and SvxEditViewForwarder do the
+ same for the document and the edit view. The three mentioned
+ forwarder objects are not stored by the AccessibleTextHelper,
+ but fetched every time from the SvxEditSource. So you are best
+ off making your SvxEditSource::Get*Forwarder methods cache the
+ current forwarder.
+
+ As this class is intended for static (i.e. non-changing) text
+ only, no event broadcasting is necessary. You must handle
+ visibility by yourself, the bounding boxes returned by
+ getCharacterBounds() are relative to your accessibility
+ object.
+
+ @attention All public non-UNO methods (those are the uppercase
+ ones) must not be called with any mutex hold, except when
+ calling from the main thread (with holds the solar mutex),
+ unless stated otherwise. This is because they themselves might
+ need the solar mutex in addition to the object mutex, and the
+ ordering of the locking must be: first solar mutex, then
+ object mutex. Furthermore, state change events might be fired
+ internally.
+
+ @derive Use this class as a base for objects containing static
+ edit engine text. To avoid overwriting every interface method
+ to intercept derived object defunc state, just set NULL as the
+ edit source. Every interface method will then properly throw
+ an exception.
+ */
+ class EDITENG_DLLPUBLIC AccessibleStaticTextBase : public AccessibleStaticTextBase_BASE
+ {
+
+ public:
+ /** Create accessible text object for given edit source
+
+ @param pEditSource
+ The edit source to use. Object ownership is transferred
+ from the caller to the callee. The object listens on the
+ SvxEditSource for object disposal, so no provisions have
+ to be taken if the caller destroys the data (e.g. the
+ model) contained in the given SvxEditSource.
+
+ */
+ explicit AccessibleStaticTextBase( ::std::auto_ptr< SvxEditSource > pEditSource );
+ virtual ~AccessibleStaticTextBase();
+
+ private:
+
+ // declared, but not defined
+ EDITENG_DLLPRIVATE AccessibleStaticTextBase( const AccessibleStaticTextBase& );
+ // declared, but not defined
+ EDITENG_DLLPRIVATE AccessibleStaticTextBase& operator= ( const AccessibleStaticTextBase& );
+
+ public:
+ /** Query the current edit source
+
+ @attention This method returns by reference, so you are
+ responsible for serialization (typically, you aquired the
+ solar mutex when calling this method). Thus, the method
+ should only be called from the main office thread.
+
+ */
+ virtual const SvxEditSource& GetEditSource() const SAL_THROW((::com::sun::star::uno::RuntimeException));
+
+ /** Set the current edit source
+
+ @attention You are required to have the solar mutex
+ locked, when calling this method. Thus, the method should
+ only be called from the main office thread.
+
+ The EditSource set here is required to broadcast out the
+ following hints: EDITSOURCE_HINT_PARASMOVED,
+ EDITSOURCE_HINT_SELECTIONCHANGED, TEXT_HINT_MODIFIED,
+ TEXT_HINT_PARAINSERTED, TEXT_HINT_PARAREMOVED,
+ TEXT_HINT_TEXTHEIGHTCHANGED,
+ TEXT_HINT_VIEWSCROLLED. Otherwise, not all state changes
+ will get noticed by the accessibility object. Further
+ more, when the corresponding core object or the model is
+ dying, either the edit source must be set to NULL or it
+ has to broadcast a SFX_HINT_DYING hint.
+
+ This class does not have a dispose method, since it is not
+ a UNO component. Nevertheless, it holds C++ references to
+ several core objects, so you should issue a
+ SetEditSource(::std::auto_ptr<SvxEditSource>(NULL)) in
+ your dispose() method.
+
+ @param pEditSource
+ The new edit source to set. Object ownership is transferred
+ from the caller to the callee.
+ */
+ virtual void SetEditSource( ::std::auto_ptr< SvxEditSource > pEditSource ) SAL_THROW((::com::sun::star::uno::RuntimeException));
+
+ /** Set the event source
+
+ @attention When setting a reference here, you should call
+ Dispose() when you as the owner are disposing, since until
+ then this object will hold that reference
+
+ @param rInterface
+ The interface that should be set as the source for
+ accessibility events sent by this object.
+ */
+ virtual void SetEventSource( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rInterface );
+
+ /** Get the event source
+
+ @return the interface that is set as the source for
+ accessibility events sent by this object.
+ */
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > GetEventSource() const;
+
+ /** Set offset of EditEngine from parent
+
+ @attention You are required to have the solar mutex
+ locked, when calling this method. Thus, the method should
+ only be called from the main office thread.
+
+ If the origin of the underlying EditEngine does
+ not correspond to the upper left corner of the object
+ using this class, you have to specify the offset.
+
+ @param rPoint
+ The offset in screen coordinates (i.e. pixel)
+ */
+ virtual void SetOffset( const Point& rPoint );
+
+ /** Query offset of EditEngine from parent
+
+ @return the offset in screen coordinates (i.e. pixel)
+ */
+ virtual Point GetOffset() const;
+
+ /** Update the visible children
+
+ As this class currently does not represent any content
+ using children, this does nothing at the moment.
+
+ @attention You are required to have the solar mutex
+ locked, when calling this method. Thus, the method should
+ only be called from the main office thread.
+
+ This method reevaluates the visibility of all
+ childrens. Call this method if your visibility state has
+ changed somehow, e.g. if the visible area has changed and
+ the AccessibleStaticTextHelper isn't notified
+ internally. Normally, there should not be a need to call
+ this method.
+ */
+ virtual void UpdateChildren() SAL_THROW((::com::sun::star::uno::RuntimeException));
+
+ /** Drop all references and enter disposed state
+
+ This method drops all references to external objects (also
+ the event source reference set via SetEventSource()) and
+ sets the object into the disposed state (i.e. the methods
+ return default values or throw a uno::DisposedException
+ exception).
+ */
+ virtual void Dispose();
+
+ // XAccessibleText interface implementation
+ virtual sal_Int32 SAL_CALL getCaretPosition() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRequestedAttributes ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getCharacterCount() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getIndexAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getSelectedText() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getSelectionStart() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getSelectionEnd() throw (::com::sun::star::uno::RuntimeException);
+ /// This will only work with a functional SvxEditViewForwarder, i.e. an EditEngine/Outliner in edit mode
+ virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getText() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ /// Does not support AccessibleTextType::SENTENCE (missing feature in EditEngine)
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ /// Does not support AccessibleTextType::SENTENCE (missing feature in EditEngine)
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ /// Does not support AccessibleTextType::SENTENCE (missing feature in EditEngine)
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ /// This will only work with a functional SvxEditViewForwarder, i.e. an EditEngine/Outliner in edit mode
+ virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleTextAttributes
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getDefaultAttributes( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& RequestedAttributes ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getRunAttributes( sal_Int32 Index, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& RequestedAttributes ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+
+ // child-related methods from XAccessibleContext
+ virtual sal_Int32 SAL_CALL getAccessibleChildCount() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+
+ // child-related methods from XAccessibleComponent
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
+
+ protected:
+ Rectangle GetParagraphBoundingBox() const;
+ sal_Int32 GetParagraphCount() const;
+ sal_Int32 GetParagraphIndex() const;
+ sal_Int32 GetLineCount( sal_Int32 nParagraph ) const;
+
+ private:
+
+ /// @dyn
+ const std::auto_ptr< AccessibleStaticTextBase_Impl > mpImpl;
+
+ };
+
+} // end of namespace accessibility
+
+#endif /* _SVX_ACCESSILE_STATIC_TEXT_BASE_HXX_ */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: AccessibleStaticTextBase.hxx,v $
+ * $Revision: 1.14 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SVX_ACCESSILE_STATIC_TEXT_BASE_HXX_
+#define _SVX_ACCESSILE_STATIC_TEXT_BASE_HXX_
+
+#include <memory>
+#include <tools/gen.hxx>
+#include <cppuhelper/implbase2.hxx>
+#include <com/sun/star/uno/Any.hxx>
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/XAccessibleText.hpp>
+#include <com/sun/star/accessibility/XAccessibleTextAttributes.hpp>
+#include <com/sun/star/accessibility/TextSegment.hpp>
+#include "editeng/editengdllapi.h"
+
+
+class SvxEditSource;
+
+namespace accessibility
+{
+
+ class AccessibleStaticTextBase_Impl;
+
+ typedef ::cppu::ImplHelper2<
+ ::com::sun::star::accessibility::XAccessibleText,
+ ::com::sun::star::accessibility::XAccessibleTextAttributes > AccessibleStaticTextBase_BASE;
+
+ /** Helper class for objects containing EditEngine/Outliner text
+
+ This class implements the XAccessibleText interface for static
+ text, somewhat similar to the children of the
+ AccessibleTextHelper class. Currently, there are no children,
+ i.e. the whole text is presented in one big chunk. This might
+ change in the future, if a need for image bullets should
+ arise. These, by convention, would be represented as children
+ of the text.
+
+ You have to implement the SvxEditSource, SvxTextForwarder,
+ SvxViewForwarder and SvxEditViewForwarder interfaces in order
+ to enable your object to cooperate with this
+ class. SvxTextForwarder encapsulates the fact that text
+ objects do not necessarily have an EditEngine at their
+ disposal, SvxViewForwarder and SvxEditViewForwarder do the
+ same for the document and the edit view. The three mentioned
+ forwarder objects are not stored by the AccessibleTextHelper,
+ but fetched every time from the SvxEditSource. So you are best
+ off making your SvxEditSource::Get*Forwarder methods cache the
+ current forwarder.
+
+ As this class is intended for static (i.e. non-changing) text
+ only, no event broadcasting is necessary. You must handle
+ visibility by yourself, the bounding boxes returned by
+ getCharacterBounds() are relative to your accessibility
+ object.
+
+ @attention All public non-UNO methods (those are the uppercase
+ ones) must not be called with any mutex hold, except when
+ calling from the main thread (with holds the solar mutex),
+ unless stated otherwise. This is because they themselves might
+ need the solar mutex in addition to the object mutex, and the
+ ordering of the locking must be: first solar mutex, then
+ object mutex. Furthermore, state change events might be fired
+ internally.
+
+ @derive Use this class as a base for objects containing static
+ edit engine text. To avoid overwriting every interface method
+ to intercept derived object defunc state, just set NULL as the
+ edit source. Every interface method will then properly throw
+ an exception.
+ */
+ class EDITENG_DLLPUBLIC AccessibleStaticTextBase : public AccessibleStaticTextBase_BASE
+ {
+
+ public:
+ /** Create accessible text object for given edit source
+
+ @param pEditSource
+ The edit source to use. Object ownership is transferred
+ from the caller to the callee. The object listens on the
+ SvxEditSource for object disposal, so no provisions have
+ to be taken if the caller destroys the data (e.g. the
+ model) contained in the given SvxEditSource.
+
+ */
+ explicit AccessibleStaticTextBase( ::std::auto_ptr< SvxEditSource > pEditSource );
+ virtual ~AccessibleStaticTextBase();
+
+ private:
+
+ // declared, but not defined
+ EDITENG_DLLPRIVATE AccessibleStaticTextBase( const AccessibleStaticTextBase& );
+ // declared, but not defined
+ EDITENG_DLLPRIVATE AccessibleStaticTextBase& operator= ( const AccessibleStaticTextBase& );
+
+ public:
+ /** Query the current edit source
+
+ @attention This method returns by reference, so you are
+ responsible for serialization (typically, you aquired the
+ solar mutex when calling this method). Thus, the method
+ should only be called from the main office thread.
+
+ */
+ virtual const SvxEditSource& GetEditSource() const SAL_THROW((::com::sun::star::uno::RuntimeException));
+
+ /** Set the current edit source
+
+ @attention You are required to have the solar mutex
+ locked, when calling this method. Thus, the method should
+ only be called from the main office thread.
+
+ The EditSource set here is required to broadcast out the
+ following hints: EDITSOURCE_HINT_PARASMOVED,
+ EDITSOURCE_HINT_SELECTIONCHANGED, TEXT_HINT_MODIFIED,
+ TEXT_HINT_PARAINSERTED, TEXT_HINT_PARAREMOVED,
+ TEXT_HINT_TEXTHEIGHTCHANGED,
+ TEXT_HINT_VIEWSCROLLED. Otherwise, not all state changes
+ will get noticed by the accessibility object. Further
+ more, when the corresponding core object or the model is
+ dying, either the edit source must be set to NULL or it
+ has to broadcast a SFX_HINT_DYING hint.
+
+ This class does not have a dispose method, since it is not
+ a UNO component. Nevertheless, it holds C++ references to
+ several core objects, so you should issue a
+ SetEditSource(::std::auto_ptr<SvxEditSource>(NULL)) in
+ your dispose() method.
+
+ @param pEditSource
+ The new edit source to set. Object ownership is transferred
+ from the caller to the callee.
+ */
+ virtual void SetEditSource( ::std::auto_ptr< SvxEditSource > pEditSource ) SAL_THROW((::com::sun::star::uno::RuntimeException));
+
+ /** Set the event source
+
+ @attention When setting a reference here, you should call
+ Dispose() when you as the owner are disposing, since until
+ then this object will hold that reference
+
+ @param rInterface
+ The interface that should be set as the source for
+ accessibility events sent by this object.
+ */
+ virtual void SetEventSource( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rInterface );
+
+ /** Get the event source
+
+ @return the interface that is set as the source for
+ accessibility events sent by this object.
+ */
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > GetEventSource() const;
+
+ /** Set offset of EditEngine from parent
+
+ @attention You are required to have the solar mutex
+ locked, when calling this method. Thus, the method should
+ only be called from the main office thread.
+
+ If the origin of the underlying EditEngine does
+ not correspond to the upper left corner of the object
+ using this class, you have to specify the offset.
+
+ @param rPoint
+ The offset in screen coordinates (i.e. pixel)
+ */
+ virtual void SetOffset( const Point& rPoint );
+
+ /** Query offset of EditEngine from parent
+
+ @return the offset in screen coordinates (i.e. pixel)
+ */
+ virtual Point GetOffset() const;
+
+ /** Update the visible children
+
+ As this class currently does not represent any content
+ using children, this does nothing at the moment.
+
+ @attention You are required to have the solar mutex
+ locked, when calling this method. Thus, the method should
+ only be called from the main office thread.
+
+ This method reevaluates the visibility of all
+ childrens. Call this method if your visibility state has
+ changed somehow, e.g. if the visible area has changed and
+ the AccessibleStaticTextHelper isn't notified
+ internally. Normally, there should not be a need to call
+ this method.
+ */
+ virtual void UpdateChildren() SAL_THROW((::com::sun::star::uno::RuntimeException));
+
+ /** Drop all references and enter disposed state
+
+ This method drops all references to external objects (also
+ the event source reference set via SetEventSource()) and
+ sets the object into the disposed state (i.e. the methods
+ return default values or throw a uno::DisposedException
+ exception).
+ */
+ virtual void Dispose();
+
+ // XAccessibleText interface implementation
+ virtual sal_Int32 SAL_CALL getCaretPosition() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRequestedAttributes ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getCharacterCount() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getIndexAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getSelectedText() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getSelectionStart() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getSelectionEnd() throw (::com::sun::star::uno::RuntimeException);
+ /// This will only work with a functional SvxEditViewForwarder, i.e. an EditEngine/Outliner in edit mode
+ virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getText() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ /// Does not support AccessibleTextType::SENTENCE (missing feature in EditEngine)
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ /// Does not support AccessibleTextType::SENTENCE (missing feature in EditEngine)
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ /// Does not support AccessibleTextType::SENTENCE (missing feature in EditEngine)
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ /// This will only work with a functional SvxEditViewForwarder, i.e. an EditEngine/Outliner in edit mode
+ virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleTextAttributes
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getDefaultAttributes( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& RequestedAttributes ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getRunAttributes( sal_Int32 Index, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& RequestedAttributes ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+
+ // child-related methods from XAccessibleContext
+ virtual sal_Int32 SAL_CALL getAccessibleChildCount() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+
+ // child-related methods from XAccessibleComponent
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
+
+ protected:
+ Rectangle GetParagraphBoundingBox() const;
+
+ private:
+
+ /// @dyn
+ const std::auto_ptr< AccessibleStaticTextBase_Impl > mpImpl;
+
+ };
+
+} // end of namespace accessibility
+
+#endif /* _SVX_ACCESSILE_STATIC_TEXT_BASE_HXX_ */
diff --git a/editeng/inc/editeng/AccessibleStringWrap.hxx b/editeng/inc/editeng/AccessibleStringWrap.hxx
new file mode 100644
index 000000000000..9d736d799d9b
--- /dev/null
+++ b/editeng/inc/editeng/AccessibleStringWrap.hxx
@@ -0,0 +1,66 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: AccessibleStringWrap.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _ACCESSIBLESTRINGWRAP_HXX
+#define _ACCESSIBLESTRINGWRAP_HXX
+
+#include <sal/types.h>
+#include <tools/string.hxx>
+
+#include <editeng/editengdllapi.h>
+
+class OutputDevice;
+class SvxFont;
+class Rectangle;
+class Point;
+
+//------------------------------------------------------------------------
+//
+// AccessibleStringWrap declaration
+//
+//------------------------------------------------------------------------
+
+class AccessibleStringWrap
+{
+public:
+
+ EDITENG_DLLPUBLIC AccessibleStringWrap( OutputDevice& rDev, SvxFont& rFont, const String& rText );
+
+ EDITENG_DLLPUBLIC sal_Bool GetCharacterBounds( sal_Int32 nIndex, Rectangle& rRect );
+ EDITENG_DLLPUBLIC sal_Int32 GetIndexAtPoint( const Point& rPoint );
+
+private:
+
+ OutputDevice& mrDev;
+ SvxFont& mrFont;
+ String maText;
+};
+
+#endif /* _ACCESSIBLESTRINGWRAP_HXX */
diff --git a/editeng/inc/editeng/SpellPortions.hxx b/editeng/inc/editeng/SpellPortions.hxx
new file mode 100644
index 000000000000..97c79998a536
--- /dev/null
+++ b/editeng/inc/editeng/SpellPortions.hxx
@@ -0,0 +1,98 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: SpellPortions.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SVX_SPELL_PORTIONS_HXX
+#define SVX_SPELL_PORTIONS_HXX
+
+#include <i18npool/lang.h>
+#include <rtl/ustring.hxx>
+#include <com/sun/star/uno/Reference.h>
+#include <com/sun/star/linguistic2/SingleProofreadingError.hpp>
+#include <com/sun/star/linguistic2/XProofreader.hpp>
+#include <vector>
+
+namespace com{ namespace sun{ namespace star{ namespace linguistic2{
+ class XSpellAlternatives;
+}}}}
+
+namespace svx{
+/** contains a portion of text that has the same language attributes applied
+ and belongs to the same script type.
+ */
+struct SpellPortion
+{
+ /** contains the text of the portion.
+ */
+ rtl::OUString sText;
+ /** Marks the portion as field, footnote symbol or any other special content that
+ should be protected against unintentional deletion.
+ */
+ bool bIsField;
+ /** Marks the portion hidden content that should not be touched by spell checking
+ and not be removed like redlines. The creator of the portions has to take care
+ for them.
+ */
+ bool bIsHidden;
+ /** contains the language applied to the text. It has to match the script type.
+ */
+ LanguageType eLanguage;
+ /** for wrong words this reference is filled with the error informations otherwise
+ it's an empty reference
+ */
+ ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XSpellAlternatives> xAlternatives;
+ /** determines whether the error type is a grammar error
+ */
+ bool bIsGrammarError;
+ /** contains the grammar error information
+ */
+ com::sun::star::linguistic2::SingleProofreadingError aGrammarError;
+ /** provides access to the grammar checker interface
+ */
+ ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XProofreader > xGrammarChecker;
+ /** marks portion as to-be-ignored. This is a return parameter.
+ */
+ /** contains the proposed dialog title if the proof reading component provides one.
+ */
+ rtl::OUString sDialogTitle;
+
+ bool bIgnoreThisError;
+ SpellPortion() :
+ bIsField(false),
+ bIsHidden(false),
+ eLanguage(LANGUAGE_DONTKNOW),
+ bIsGrammarError(false),
+ bIgnoreThisError(false)
+ {
+ aGrammarError.nErrorStart = aGrammarError.nErrorLength = aGrammarError.nErrorType = 0;
+ }
+};
+typedef std::vector<SpellPortion> SpellPortions;
+}//namespace svx
+#endif
diff --git a/editeng/inc/editeng/UnoForbiddenCharsTable.hxx b/editeng/inc/editeng/UnoForbiddenCharsTable.hxx
new file mode 100644
index 000000000000..98c5563249c3
--- /dev/null
+++ b/editeng/inc/editeng/UnoForbiddenCharsTable.hxx
@@ -0,0 +1,68 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: UnoForbiddenCharsTable.hxx,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SVX_UNOFORBIDDENCHARSTABLE_HXX_
+#define _SVX_UNOFORBIDDENCHARSTABLE_HXX_
+
+#include <com/sun/star/i18n/XForbiddenCharacters.hpp>
+#include <com/sun/star/linguistic2/XSupportedLocales.hpp>
+#include <vos/ref.hxx>
+
+#include <cppuhelper/implbase2.hxx>
+#include "editeng/editengdllapi.h"
+
+class SvxForbiddenCharactersTable;
+
+class EDITENG_DLLPUBLIC SvxUnoForbiddenCharsTable : public cppu::WeakImplHelper2<
+ com::sun::star::i18n::XForbiddenCharacters,
+ com::sun::star::linguistic2::XSupportedLocales>
+{
+protected:
+ /** this virtual function is called if the forbidden characters are changed */
+ virtual void onChange();
+
+ vos::ORef<SvxForbiddenCharactersTable> mxForbiddenChars;
+
+public:
+ SvxUnoForbiddenCharsTable(vos::ORef<SvxForbiddenCharactersTable> xForbiddenChars);
+ ~SvxUnoForbiddenCharsTable();
+
+ // XForbiddenCharacters
+ virtual com::sun::star::i18n::ForbiddenCharacters SAL_CALL getForbiddenCharacters( const com::sun::star::lang::Locale& rLocale ) throw(com::sun::star::container::NoSuchElementException, com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasForbiddenCharacters( const com::sun::star::lang::Locale& rLocale ) throw(com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setForbiddenCharacters( const com::sun::star::lang::Locale& rLocale, const com::sun::star::i18n::ForbiddenCharacters& rForbiddenCharacters ) throw(com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeForbiddenCharacters( const com::sun::star::lang::Locale& rLocale ) throw(com::sun::star::uno::RuntimeException);
+
+ // XSupportedLocales
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::lang::Locale > SAL_CALL getLocales( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasLocale( const ::com::sun::star::lang::Locale& aLocale ) throw (::com::sun::star::uno::RuntimeException);
+};
+
+#endif // _SVX_UNOFORBIDDENCHARSTABLE_HXX_
diff --git a/editeng/inc/editeng/acorrcfg.hxx b/editeng/inc/editeng/acorrcfg.hxx
new file mode 100644
index 000000000000..6e6e2b3fdd11
--- /dev/null
+++ b/editeng/inc/editeng/acorrcfg.hxx
@@ -0,0 +1,136 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: acorrcfg.hxx,v $
+ * $Revision: 1.7 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVXACCFG_HXX
+#define _SVXACCFG_HXX
+
+// include ---------------------------------------------------------------
+
+#include "editeng/editengdllapi.h"
+#include <unotools/configitem.hxx>
+/* -----------------------------12.10.00 11:40--------------------------------
+
+ ---------------------------------------------------------------------------*/
+class SvxAutoCorrect;
+class SvxAutoCorrCfg;
+class EDITENG_DLLPUBLIC SvxBaseAutoCorrCfg : public utl::ConfigItem
+{
+ SvxAutoCorrCfg& rParent;
+ com::sun::star::uno::Sequence<rtl::OUString> GetPropertyNames();
+
+public:
+ SvxBaseAutoCorrCfg(SvxAutoCorrCfg& rParent);
+ ~SvxBaseAutoCorrCfg();
+
+ void Load(sal_Bool bInit);
+ virtual void Commit();
+ virtual void Notify( const com::sun::star::uno::Sequence<rtl::OUString>& aPropertyNames);
+ void SetModified() {ConfigItem::SetModified();}
+};
+/* -----------------------------12.10.00 11:40--------------------------------
+
+ ---------------------------------------------------------------------------*/
+class EDITENG_DLLPUBLIC SvxSwAutoCorrCfg : public utl::ConfigItem
+{
+ SvxAutoCorrCfg& rParent;
+ com::sun::star::uno::Sequence<rtl::OUString> GetPropertyNames();
+
+public:
+ SvxSwAutoCorrCfg(SvxAutoCorrCfg& rParent);
+ ~SvxSwAutoCorrCfg();
+
+ void Load(sal_Bool bInit);
+ virtual void Commit();
+ virtual void Notify( const com::sun::star::uno::Sequence<rtl::OUString>& aPropertyNames);
+ void SetModified() {ConfigItem::SetModified();}
+};
+/*--------------------------------------------------------------------
+ Beschreibung: Konfiguration fuer Auto Correction
+ --------------------------------------------------------------------*/
+class EDITENG_DLLPUBLIC SvxAutoCorrCfg
+{
+ friend class SvxBaseAutoCorrCfg;
+ friend class SvxSwAutoCorrCfg;
+
+ SvxAutoCorrect* pAutoCorrect;
+
+ SvxBaseAutoCorrCfg aBaseConfig;
+ SvxSwAutoCorrCfg aSwConfig;
+
+ // Flags f"ur Autotext:
+ sal_Bool bFileRel;
+ sal_Bool bNetRel;
+ // Tiphilfe f"ur Autotext w"ahrend der Eingabe
+ sal_Bool bAutoTextTip;
+ sal_Bool bAutoTextPreview;
+ sal_Bool bAutoFmtByInput;
+ sal_Bool bSearchInAllCategories;
+
+public:
+ void SetModified()
+ {
+ aBaseConfig.SetModified();
+ aSwConfig.SetModified();
+ }
+ void Commit()
+ {
+ aBaseConfig.Commit();
+ aSwConfig.Commit();
+ }
+
+ SvxAutoCorrect* GetAutoCorrect() { return pAutoCorrect; }
+ const SvxAutoCorrect* GetAutoCorrect() const { return pAutoCorrect; }
+ // der Pointer geht in den Besitz des ConfigItems!
+ void SetAutoCorrect( SvxAutoCorrect* );
+
+ sal_Bool IsAutoFmtByInput() const { return bAutoFmtByInput; }
+ void SetAutoFmtByInput( sal_Bool bSet ) { bAutoFmtByInput = bSet;aSwConfig.SetModified();}
+
+ sal_Bool IsSaveRelFile() const { return bFileRel; }
+ void SetSaveRelFile( sal_Bool bSet ) { bFileRel = bSet; aSwConfig.SetModified(); }
+
+ sal_Bool IsSaveRelNet() const { return bNetRel; }
+ void SetSaveRelNet( sal_Bool bSet ) { bNetRel = bSet; aSwConfig.SetModified();}
+
+ sal_Bool IsAutoTextPreview() const {return bAutoTextPreview;}
+ void SetAutoTextPreview(sal_Bool bSet) {bAutoTextPreview = bSet; aSwConfig.SetModified();}
+
+ sal_Bool IsAutoTextTip() const { return bAutoTextTip; }
+ void SetAutoTextTip(sal_Bool bSet ) { bAutoTextTip = bSet;aSwConfig.SetModified();}
+
+ sal_Bool IsSearchInAllCategories() const { return bSearchInAllCategories;}
+ void SetSearchInAllCategories(sal_Bool bSet ) { bSearchInAllCategories = bSet; aSwConfig.SetModified(); }
+
+ SvxAutoCorrCfg();
+ virtual ~SvxAutoCorrCfg();
+ static SvxAutoCorrCfg* Get();
+};
+
+
+#endif
diff --git a/editeng/inc/editeng/adjitem.hxx b/editeng/inc/editeng/adjitem.hxx
new file mode 100644
index 000000000000..baf55e5531ab
--- /dev/null
+++ b/editeng/inc/editeng/adjitem.hxx
@@ -0,0 +1,146 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: adjitem.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_ADJITEM_HXX
+#define _SVX_ADJITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#include <svl/eitem.hxx>
+#include <editeng/svxenum.hxx>
+#include <editeng/eeitem.hxx>
+#include <editeng/editengdllapi.h>
+
+class SvXMLUnitConverter;
+namespace rtl
+{
+ class OUString;
+}
+
+// class SvxAdjustItem ---------------------------------------------------
+
+/*
+[Beschreibung]
+Dieses Item beschreibt die Zeilenausrichtung.
+*/
+#define ADJUST_LASTBLOCK_VERSION ((USHORT)0x0001)
+
+class EDITENG_DLLPUBLIC SvxAdjustItem : public SfxEnumItemInterface
+{
+ BOOL bLeft : 1;
+ BOOL bRight : 1;
+ BOOL bCenter : 1;
+ BOOL bBlock : 1;
+
+ // nur aktiv, wenn bBlock
+ BOOL bOneBlock : 1;
+ BOOL bLastCenter : 1;
+ BOOL bLastBlock : 1;
+
+ friend SvStream& operator<<( SvStream&, SvxAdjustItem& ); //$ ostream
+public:
+ TYPEINFO();
+
+ SvxAdjustItem( const SvxAdjust eAdjst /*= SVX_ADJUST_LEFT*/,
+ const USHORT nId );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const IntlWrapper * = 0 ) const;
+ virtual USHORT GetValueCount() const;
+ virtual String GetValueTextByPos( USHORT nPos ) const;
+ virtual USHORT GetEnumValue() const;
+ virtual void SetEnumValue( USHORT nNewVal );
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const;
+ virtual USHORT GetVersion( USHORT nFileVersion ) const;
+
+ inline void SetOneWord( const SvxAdjust eType )
+ {
+ bOneBlock = eType == SVX_ADJUST_BLOCK;
+ }
+
+ inline void SetLastBlock( const SvxAdjust eType )
+ {
+ bLastBlock = eType == SVX_ADJUST_BLOCK;
+ bLastCenter = eType == SVX_ADJUST_CENTER;
+ }
+
+ inline void SetAdjust( const SvxAdjust eType )
+ {
+ bLeft = eType == SVX_ADJUST_LEFT;
+ bRight = eType == SVX_ADJUST_RIGHT;
+ bCenter = eType == SVX_ADJUST_CENTER;
+ bBlock = eType == SVX_ADJUST_BLOCK;
+ }
+
+ inline SvxAdjust GetLastBlock() const
+ {
+ SvxAdjust eRet = SVX_ADJUST_LEFT;
+
+ if ( bLastBlock )
+ eRet = SVX_ADJUST_BLOCK;
+ else if( bLastCenter )
+ eRet = SVX_ADJUST_CENTER;
+ return eRet;
+ }
+
+ inline SvxAdjust GetOneWord() const
+ {
+ SvxAdjust eRet = SVX_ADJUST_LEFT;
+
+ if ( bBlock && bOneBlock )
+ eRet = SVX_ADJUST_BLOCK;
+ return eRet;
+ }
+
+ inline SvxAdjust GetAdjust() const
+ {
+ SvxAdjust eRet = SVX_ADJUST_LEFT;
+
+ if ( bRight )
+ eRet = SVX_ADJUST_RIGHT;
+ else if ( bCenter )
+ eRet = SVX_ADJUST_CENTER;
+ else if ( bBlock )
+ eRet = SVX_ADJUST_BLOCK;
+ return eRet;
+ }
+};
+
+#endif
+
diff --git a/editeng/inc/editeng/akrnitem.hxx b/editeng/inc/editeng/akrnitem.hxx
new file mode 100644
index 000000000000..4e0290003f4b
--- /dev/null
+++ b/editeng/inc/editeng/akrnitem.hxx
@@ -0,0 +1,77 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: akrnitem.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_AKRNITEM_HXX
+#define _SVX_AKRNITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#include <svl/eitem.hxx>
+#include <editeng/editengdllapi.h>
+
+class SvXMLUnitConverter;
+namespace rtl
+{
+ class OUString;
+}
+
+// class SvxAutoKernItem -------------------------------------------------
+
+/*
+ [Beschreibung]
+ Attribut fuer Pair-Kerning.
+*/
+
+class EDITENG_DLLPUBLIC SvxAutoKernItem : public SfxBoolItem
+{
+public:
+ TYPEINFO();
+
+ SvxAutoKernItem( const BOOL bAutoKern /*= FALSE*/,
+ const USHORT nId );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const IntlWrapper * = 0 ) const;
+
+ inline SvxAutoKernItem& operator=(const SvxAutoKernItem& rAutoKern)
+ {
+ SetValue( rAutoKern.GetValue() );
+ return *this;
+ }
+};
+
+#endif
+
diff --git a/editeng/inc/editeng/blnkitem.hxx b/editeng/inc/editeng/blnkitem.hxx
new file mode 100644
index 000000000000..426e14797e96
--- /dev/null
+++ b/editeng/inc/editeng/blnkitem.hxx
@@ -0,0 +1,75 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: blnkitem.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_BLNKITEM_HXX
+#define _SVX_BLNKITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#include <svl/poolitem.hxx>
+#include <svl/eitem.hxx>
+#include <editeng/editengdllapi.h>
+
+class SvXMLUnitConverter;
+namespace rtl
+{
+ class OUString;
+}
+
+// class SvxBlinkItem -------------------------------------------------
+
+/*
+ [Beschreibung]
+ Dieses Item beschreibt, ob geblinkt werden soll.
+*/
+
+class EDITENG_DLLPUBLIC SvxBlinkItem : public SfxBoolItem
+{
+public:
+ TYPEINFO();
+
+ SvxBlinkItem( const BOOL bBlink /*= FALSE*/, const USHORT nId );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const IntlWrapper * = 0 ) const;
+
+ inline SvxBlinkItem& operator=(const SvxBlinkItem& rBlink) {
+ SetValue(rBlink.GetValue());
+ return *this;
+ }
+};
+
+#endif
+
diff --git a/editeng/inc/editeng/bolnitem.hxx b/editeng/inc/editeng/bolnitem.hxx
new file mode 100644
index 000000000000..8110c986ee34
--- /dev/null
+++ b/editeng/inc/editeng/bolnitem.hxx
@@ -0,0 +1,86 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: bolnitem.hxx,v $
+ * $Revision: 1.7 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_BOLNITEM_HXX
+#define _SVX_BOLNITEM_HXX
+
+// include ---------------------------------------------------------------
+
+
+
+#include <svl/poolitem.hxx>
+#include "editeng/editengdllapi.h"
+
+
+
+// class SvxLineItem -----------------------------------------------------
+
+
+/*
+[Beschreibung]
+Dieses Item transportiert eine SvxBorderLine.
+*/
+
+class SvxBorderLine;
+
+class EDITENG_DLLPUBLIC SvxLineItem : public SfxPoolItem
+{
+public:
+ TYPEINFO();
+
+ SvxLineItem( const USHORT nId );
+ SvxLineItem( const SvxLineItem& rCpy );
+ ~SvxLineItem();
+ SvxLineItem &operator=( const SvxLineItem& rLine );
+
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const IntlWrapper * = 0 ) const;
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const;
+ virtual int ScaleMetrics( long nMult, long nDiv );
+ virtual int HasMetrics() const;
+
+ const SvxBorderLine* GetLine () const { return pLine; }
+ void SetLine ( const SvxBorderLine *pNew );
+
+private:
+ SvxBorderLine* pLine;
+};
+
+
+
+
+#endif
diff --git a/editeng/inc/editeng/borderline.hxx b/editeng/inc/editeng/borderline.hxx
new file mode 100644
index 000000000000..8ae8d7e6416b
--- /dev/null
+++ b/editeng/inc/editeng/borderline.hxx
@@ -0,0 +1,137 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: borderline.hxx,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SVX_BORDERLINE_HXX
+#define SVX_BORDERLINE_HXX
+
+#include <tools/color.hxx>
+#include <svl/poolitem.hxx>
+#include <editeng/editengdllapi.h>
+
+// Line defaults in twips (former Writer defaults):
+
+#define DEF_LINE_WIDTH_0 1
+#define DEF_LINE_WIDTH_1 20
+#define DEF_LINE_WIDTH_2 50
+#define DEF_LINE_WIDTH_3 80
+#define DEF_LINE_WIDTH_4 100
+#define DEF_LINE_WIDTH_5 10
+
+#define DEF_MAX_LINE_WIDHT DEF_LINE_WIDTH_4
+#define DEF_MAX_LINE_DIST DEF_LINE_WIDTH_2
+
+#define DEF_DOUBLE_LINE0_OUT DEF_LINE_WIDTH_0
+#define DEF_DOUBLE_LINE0_IN DEF_LINE_WIDTH_0
+#define DEF_DOUBLE_LINE0_DIST DEF_LINE_WIDTH_1
+
+#define DEF_DOUBLE_LINE1_OUT DEF_LINE_WIDTH_1
+#define DEF_DOUBLE_LINE1_IN DEF_LINE_WIDTH_1
+#define DEF_DOUBLE_LINE1_DIST DEF_LINE_WIDTH_1
+
+#define DEF_DOUBLE_LINE2_OUT DEF_LINE_WIDTH_2
+#define DEF_DOUBLE_LINE2_IN DEF_LINE_WIDTH_2
+#define DEF_DOUBLE_LINE2_DIST DEF_LINE_WIDTH_2
+
+#define DEF_DOUBLE_LINE3_OUT DEF_LINE_WIDTH_2
+#define DEF_DOUBLE_LINE3_IN DEF_LINE_WIDTH_1
+#define DEF_DOUBLE_LINE3_DIST DEF_LINE_WIDTH_2
+
+#define DEF_DOUBLE_LINE4_OUT DEF_LINE_WIDTH_1
+#define DEF_DOUBLE_LINE4_IN DEF_LINE_WIDTH_2
+#define DEF_DOUBLE_LINE4_DIST DEF_LINE_WIDTH_1
+
+#define DEF_DOUBLE_LINE5_OUT DEF_LINE_WIDTH_3
+#define DEF_DOUBLE_LINE5_IN DEF_LINE_WIDTH_2
+#define DEF_DOUBLE_LINE5_DIST DEF_LINE_WIDTH_2
+
+#define DEF_DOUBLE_LINE6_OUT DEF_LINE_WIDTH_2
+#define DEF_DOUBLE_LINE6_IN DEF_LINE_WIDTH_3
+#define DEF_DOUBLE_LINE6_DIST DEF_LINE_WIDTH_2
+
+#define DEF_DOUBLE_LINE7_OUT DEF_LINE_WIDTH_0
+#define DEF_DOUBLE_LINE7_IN DEF_LINE_WIDTH_0
+#define DEF_DOUBLE_LINE7_DIST DEF_LINE_WIDTH_2
+
+#define DEF_DOUBLE_LINE8_OUT DEF_LINE_WIDTH_1
+#define DEF_DOUBLE_LINE8_IN DEF_LINE_WIDTH_0
+#define DEF_DOUBLE_LINE8_DIST DEF_LINE_WIDTH_2
+
+#define DEF_DOUBLE_LINE9_OUT DEF_LINE_WIDTH_2
+#define DEF_DOUBLE_LINE9_IN DEF_LINE_WIDTH_0
+#define DEF_DOUBLE_LINE9_DIST DEF_LINE_WIDTH_2
+
+#define DEF_DOUBLE_LINE10_OUT DEF_LINE_WIDTH_3
+#define DEF_DOUBLE_LINE10_IN DEF_LINE_WIDTH_0
+#define DEF_DOUBLE_LINE10_DIST DEF_LINE_WIDTH_2
+
+// ============================================================================
+
+class EDITENG_DLLPUBLIC SvxBorderLine
+{
+protected:
+ Color aColor;
+ USHORT nOutWidth;
+ USHORT nInWidth;
+ USHORT nDistance;
+
+public:
+ SvxBorderLine( const Color *pCol = 0, USHORT nOut = 0, USHORT nIn = 0, USHORT nDist = 0 );
+ SvxBorderLine( const SvxBorderLine& r );
+
+ SvxBorderLine& operator=( const SvxBorderLine& r );
+
+ const Color& GetColor() const { return aColor; }
+ USHORT GetOutWidth() const { return nOutWidth; }
+ USHORT GetInWidth() const { return nInWidth; }
+ USHORT GetDistance() const { return nDistance; }
+
+ void SetColor( const Color &rColor ) { aColor = rColor; }
+ void SetOutWidth( USHORT nNew ) { nOutWidth = nNew; }
+ void SetInWidth( USHORT nNew ) { nInWidth = nNew; }
+ void SetDistance( USHORT nNew ) { nDistance = nNew; }
+ void ScaleMetrics( long nMult, long nDiv );
+
+ BOOL operator==( const SvxBorderLine &rCmp ) const;
+
+ String GetValueString( SfxMapUnit eSrcUnit, SfxMapUnit eDestUnit,
+ const IntlWrapper* pIntl,
+ BOOL bMetricStr = FALSE ) const;
+
+ bool HasPriority( const SvxBorderLine& rOtherLine ) const;
+
+ bool isEmpty() const { return (0 == nOutWidth && 0 == nInWidth && 0 == nDistance); }
+ bool isDouble() const { return (0 != nOutWidth && 0 != nInWidth); }
+ sal_uInt16 getWidth() const { return nOutWidth + nInWidth + nDistance; }
+};
+
+// ============================================================================
+
+#endif
+
diff --git a/editeng/inc/editeng/boxitem.hxx b/editeng/inc/editeng/boxitem.hxx
new file mode 100644
index 000000000000..284118ff302c
--- /dev/null
+++ b/editeng/inc/editeng/boxitem.hxx
@@ -0,0 +1,229 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: boxitem.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_BOXITEM_HXX
+#define _SVX_BOXITEM_HXX
+
+#include <svl/poolitem.hxx>
+#include <editeng/borderline.hxx>
+#include <editeng/editengdllapi.h>
+#include <com/sun/star/table/BorderLine.hpp>
+
+namespace rtl { class OUString; }
+
+// class SvxBoxItem ------------------------------------------------------
+
+/*
+[Beschreibung]
+Dieses Item beschreibt ein Umrandungsattribut (alle vier Kanten und
+Abstand nach innen.
+*/
+
+#define BOX_LINE_TOP ((USHORT)0)
+#define BOX_LINE_BOTTOM ((USHORT)1)
+#define BOX_LINE_LEFT ((USHORT)2)
+#define BOX_LINE_RIGHT ((USHORT)3)
+
+#define BOX_4DISTS_VERSION ((USHORT)1)
+
+class EDITENG_DLLPUBLIC SvxBoxItem : public SfxPoolItem
+{
+ SvxBorderLine *pTop,
+ *pBottom,
+ *pLeft,
+ *pRight;
+ USHORT nTopDist,
+ nBottomDist,
+ nLeftDist,
+ nRightDist;
+
+public:
+ TYPEINFO();
+
+ SvxBoxItem( const USHORT nId );
+ SvxBoxItem( const SvxBoxItem &rCpy );
+ ~SvxBoxItem();
+ SvxBoxItem &operator=( const SvxBoxItem& rBox );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const IntlWrapper * = 0 ) const;
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const;
+ virtual USHORT GetVersion( USHORT nFileVersion ) const;
+
+ virtual int ScaleMetrics( long nMult, long nDiv );
+ virtual int HasMetrics() const;
+
+ const SvxBorderLine* GetTop() const { return pTop; }
+ const SvxBorderLine* GetBottom() const { return pBottom; }
+ const SvxBorderLine* GetLeft() const { return pLeft; }
+ const SvxBorderLine* GetRight() const { return pRight; }
+
+ const SvxBorderLine* GetLine( USHORT nLine ) const;
+
+ //Die Pointer werden kopiert!
+ void SetLine( const SvxBorderLine* pNew, USHORT nLine );
+
+ USHORT GetDistance( USHORT nLine ) const;
+ USHORT GetDistance() const;
+
+ void SetDistance( USHORT nNew, USHORT nLine );
+ inline void SetDistance( USHORT nNew );
+
+ //Breite der Linien plus Zwischenraum plus Abstand nach innen.
+ //JP 09.06.99: bIgnoreLine = TRUE -> Distance auch returnen, wenn
+ // keine Line gesetzt ist
+ USHORT CalcLineSpace( USHORT nLine, BOOL bIgnoreLine = FALSE ) const;
+ static com::sun::star::table::BorderLine SvxLineToLine( const SvxBorderLine* pLine, sal_Bool bConvert );
+ static sal_Bool LineToSvxLine(const ::com::sun::star::table::BorderLine& rLine, SvxBorderLine& rSvxLine, sal_Bool bConvert);
+};
+
+inline void SvxBoxItem::SetDistance( USHORT nNew )
+{
+ nTopDist = nBottomDist = nLeftDist = nRightDist = nNew;
+}
+
+// class SvxBoxInfoItem --------------------------------------------------
+
+/*
+[Beschreibung]
+Noch ein Item fuer die Umrandung. Dieses Item hat lediglich SS-Funktionalitaet.
+Einerseits wird dem allgemeinen Dialog mit diesem Item mitgeteilt, welche
+Moeglichkeiten er anbieten soll.
+Andererseits werden ueber dieses Attribut ggf. die BorderLines fuer die
+horizontalen und vertikalen innerern Linien transportiert.
+*/
+
+#define BOXINFO_LINE_HORI ((USHORT)0)
+#define BOXINFO_LINE_VERT ((USHORT)1)
+
+#define VALID_TOP 0x01
+#define VALID_BOTTOM 0x02
+#define VALID_LEFT 0x04
+#define VALID_RIGHT 0x08
+#define VALID_HORI 0x10
+#define VALID_VERT 0x20
+#define VALID_DISTANCE 0x40
+#define VALID_DISABLE 0x80
+
+class EDITENG_DLLPUBLIC SvxBoxInfoItem : public SfxPoolItem
+{
+ SvxBorderLine* pHori; //innere horizontale Linie
+ SvxBorderLine* pVert; //innere vertikale Linie
+
+ bool mbEnableHor; /// true = Enable inner horizonal line.
+ bool mbEnableVer; /// true = Enable inner vertical line.
+
+ /*
+ z.Z. nur fuer StarWriter: Abstand nach innen von SvxBoxItem.
+ Wenn der Abstand gewuenscht ist, so muss das Feld fuer den Abstand vom
+ Dialog freigeschaltet werden. nDefDist ist als Defaultwert anzusehen.
+ Wenn irgendeine Linie eingeschalt ist oder wird, so muss dieser
+ Abstand defaultet werden. bMinDist gibt an, ob der Wert durch den
+ Anwender unterschritten werden darf. Mit nDist wird der aktuelle
+ Abstand von der App zum Dialog und zurueck transportiert.
+ */
+
+ BOOL bDist :1; // TRUE, Abstand freischalten.
+ BOOL bMinDist :1; // TRUE, Abstand darf nicht unterschritten werden.
+
+ BYTE nValidFlags; // 0000 0000
+ // ││││ │││└─ VALID_TOP
+ // ││││ ││└── VALID_BOTTOM
+ // ││││ │└─── VALID_LEFT
+ // ││││ └──── VALID_RIGHT
+ // │││└────── VALID_HORI
+ // ││└─────── VALID_VERT
+ // │└──────── VALID_DIST
+ // └───────── VALID_DISABLE
+
+ USHORT nDefDist; // Der Default- bzw. Minimalabstand.
+
+public:
+ TYPEINFO();
+
+ SvxBoxInfoItem( const USHORT nId );
+ SvxBoxInfoItem( const SvxBoxInfoItem &rCpy );
+ ~SvxBoxInfoItem();
+ SvxBoxInfoItem &operator=( const SvxBoxInfoItem &rCpy );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const IntlWrapper * = 0 ) const;
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const;
+ virtual int ScaleMetrics( long nMult, long nDiv );
+ virtual int HasMetrics() const;
+
+ const SvxBorderLine* GetHori() const { return pHori; }
+ const SvxBorderLine* GetVert() const { return pVert; }
+
+ //Die Pointer werden kopiert!
+ void SetLine( const SvxBorderLine* pNew, USHORT nLine );
+
+ BOOL IsTable() const { return mbEnableHor && mbEnableVer; }
+ void SetTable( BOOL bNew ) { mbEnableHor = mbEnableVer = bNew; }
+
+ inline bool IsHorEnabled() const { return mbEnableHor; }
+ inline void EnableHor( bool bEnable ) { mbEnableHor = bEnable; }
+ inline bool IsVerEnabled() const { return mbEnableVer; }
+ inline void EnableVer( bool bEnable ) { mbEnableVer = bEnable; }
+
+ BOOL IsDist() const { return bDist; }
+ void SetDist( BOOL bNew ) { bDist = bNew; }
+ BOOL IsMinDist() const { return bMinDist; }
+ void SetMinDist( BOOL bNew ) { bMinDist = bNew; }
+ USHORT GetDefDist() const { return nDefDist; }
+ void SetDefDist( USHORT nNew ) { nDefDist = nNew; }
+
+ BOOL IsValid( BYTE nValid ) const
+ { return ( nValidFlags & nValid ) == nValid; }
+ void SetValid( BYTE nValid, BOOL bValid = TRUE )
+ { bValid ? ( nValidFlags |= nValid )
+ : ( nValidFlags &= ~nValid ); }
+ void ResetFlags();
+};
+#endif
+
diff --git a/editeng/inc/editeng/brkitem.hxx b/editeng/inc/editeng/brkitem.hxx
new file mode 100644
index 000000000000..1affe04f006f
--- /dev/null
+++ b/editeng/inc/editeng/brkitem.hxx
@@ -0,0 +1,106 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: brkitem.hxx,v $
+ * $Revision: 1.4.216.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_BRKITEM_HXX
+#define _SVX_BRKITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#include <svl/eitem.hxx>
+#include <editeng/svxenum.hxx>
+#include <editeng/editengdllapi.h>
+
+namespace rtl
+{
+ class OUString;
+}
+
+// class SvxFmtBreakItem -------------------------------------------------
+
+/*
+ [Beschreibung]
+ Dieses Item beschreibt ein Umbruch-Attribut
+ Automatisch?, Seiten- oder Spaltenumbruch, davor oder danach?
+*/
+#define FMTBREAK_NOAUTO ((USHORT)0x0001)
+
+class EDITENG_DLLPUBLIC SvxFmtBreakItem : public SfxEnumItem
+{
+public:
+ TYPEINFO();
+
+ inline SvxFmtBreakItem( const SvxBreak eBrk /*= SVX_BREAK_NONE*/,
+ const USHORT nWhich );
+ inline SvxFmtBreakItem( const SvxFmtBreakItem& rBreak );
+ inline SvxFmtBreakItem& operator=( const SvxFmtBreakItem& rCpy );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const IntlWrapper * = 0 ) const;
+ virtual String GetValueTextByPos( USHORT nPos ) const;
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SvStream& Store( SvStream& , USHORT nItemVersion ) const;
+ virtual USHORT GetVersion( USHORT nFileVersion ) const;
+ virtual SfxPoolItem* Create( SvStream&, USHORT ) const;
+ virtual USHORT GetValueCount() const;
+
+ // MS VC4.0 kommt durcheinander
+ void SetValue( USHORT nNewVal )
+ {SfxEnumItem::SetValue(nNewVal); }
+ SvxBreak GetBreak() const { return SvxBreak( GetValue() ); }
+ void SetBreak( const SvxBreak eNew )
+ { SetValue( (USHORT)eNew ); }
+};
+
+
+inline SvxFmtBreakItem::SvxFmtBreakItem( const SvxBreak eBreak,
+ const USHORT _nWhich ) :
+ SfxEnumItem( _nWhich, (USHORT)eBreak )
+{}
+
+inline SvxFmtBreakItem::SvxFmtBreakItem( const SvxFmtBreakItem& rBreak ) :
+ SfxEnumItem( rBreak )
+{}
+
+inline SvxFmtBreakItem& SvxFmtBreakItem::operator=(
+ const SvxFmtBreakItem& rBreak )
+{
+ SetValue( rBreak.GetValue() );
+ return *this;
+}
+
+#endif
+
diff --git a/editeng/inc/editeng/brshitem.hxx b/editeng/inc/editeng/brshitem.hxx
new file mode 100644
index 000000000000..9ef1627dcbd6
--- /dev/null
+++ b/editeng/inc/editeng/brshitem.hxx
@@ -0,0 +1,143 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: brshitem.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_BRSHITEM_HXX
+#define _SVX_BRSHITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#include <svl/poolitem.hxx>
+#include <vcl/wall.hxx>
+#include <tools/link.hxx>
+#include <editeng/editengdllapi.h>
+
+// class SvxBrushItem ----------------------------------------------------
+
+class Graphic;
+class GraphicObject;
+class CntWallpaperItem;
+namespace rtl
+{
+ class OUString;
+}
+
+#define BRUSH_GRAPHIC_VERSION ((USHORT)0x0001)
+
+enum SvxGraphicPosition
+{
+ GPOS_NONE,
+ GPOS_LT, GPOS_MT, GPOS_RT,
+ GPOS_LM, GPOS_MM, GPOS_RM,
+ GPOS_LB, GPOS_MB, GPOS_RB,
+ GPOS_AREA, GPOS_TILED
+};
+
+#define PARA_DEST_PARA 0
+#define PARA_DEST_CHAR 1
+
+class SvxBrushItem_Impl;
+class EDITENG_DLLPUBLIC SvxBrushItem : public SfxPoolItem
+{
+ Color aColor;
+ SvxBrushItem_Impl* pImpl;
+ String* pStrLink;
+ String* pStrFilter;
+ SvxGraphicPosition eGraphicPos;
+ BOOL bLoadAgain;
+
+ void ApplyGraphicTransparency_Impl();
+ DECL_STATIC_LINK( SvxBrushItem, DoneHdl_Impl, void *);
+ // wird nur von Create benutzt
+ SvxBrushItem( SvStream& rStrm,
+ USHORT nVersion, USHORT nWhich );
+
+public:
+ TYPEINFO();
+
+ SvxBrushItem( USHORT nWhich );
+ SvxBrushItem( const Color& rColor, USHORT nWhich );
+
+ SvxBrushItem( const Graphic& rGraphic,
+ SvxGraphicPosition ePos, USHORT nWhich );
+ SvxBrushItem( const GraphicObject& rGraphicObj,
+ SvxGraphicPosition ePos, USHORT nWhich );
+ SvxBrushItem( const String& rLink, const String& rFilter,
+ SvxGraphicPosition ePos, USHORT nWhich );
+ SvxBrushItem( const SvxBrushItem& );
+ SvxBrushItem( const CntWallpaperItem&, USHORT nWhich );
+
+ ~SvxBrushItem();
+
+public:
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const IntlWrapper * = 0 ) const;
+
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create( SvStream&, USHORT nVersion ) const;
+ virtual SvStream& Store( SvStream& , USHORT nItemVersion ) const;
+ virtual USHORT GetVersion( USHORT nFileVersion ) const;
+
+ const Color& GetColor() const { return aColor; }
+ Color& GetColor() { return aColor; }
+ void SetColor( const Color& rCol) { aColor = rCol; }
+
+ void SetDoneLink( const Link& rLink );
+
+ SvxGraphicPosition GetGraphicPos() const { return eGraphicPos; }
+
+ void PurgeGraphic() const;
+ void PurgeMedium() const;
+
+ const Graphic* GetGraphic() const;
+ const GraphicObject* GetGraphicObject() const;
+ const String* GetGraphicLink() const { return pStrLink; }
+ const String* GetGraphicFilter() const { return pStrFilter; }
+
+ void SetGraphicPos( SvxGraphicPosition eNew );
+ void SetGraphic( const Graphic& rNew );
+ void SetGraphicObject( const GraphicObject& rNewObj );
+ void SetGraphicLink( const String& rNew );
+ void SetGraphicFilter( const String& rNew );
+
+ SvxBrushItem& operator=( const SvxBrushItem& rItem);
+
+ static SvxGraphicPosition WallpaperStyle2GraphicPos( WallpaperStyle eStyle );
+ static WallpaperStyle GraphicPos2WallpaperStyle( SvxGraphicPosition ePos );
+ CntWallpaperItem* CreateCntWallpaperItem() const;
+};
+
+#endif // #ifndef _SVX_BRSHITEM_HXX
+
diff --git a/editeng/inc/editeng/bulitem.hxx b/editeng/inc/editeng/bulitem.hxx
new file mode 100644
index 000000000000..f8247e497c36
--- /dev/null
+++ b/editeng/inc/editeng/bulitem.hxx
@@ -0,0 +1,163 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: bulitem.hxx,v $
+ * $Revision: 1.6 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_BULITEM_HXX
+#define _SVX_BULITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#include "editeng/editengdllapi.h"
+
+
+// define ----------------------------------------------------------------
+
+// Styles
+#define BS_ABC_BIG 0
+#define BS_ABC_SMALL 1
+#define BS_ROMAN_BIG 2
+#define BS_ROMAN_SMALL 3
+#define BS_123 4
+#define BS_NONE 5
+#define BS_BULLET 6
+#define BS_BMP 128
+
+// Justification
+#define BJ_HLEFT 0x01
+#define BJ_HRIGHT 0x02
+#define BJ_HCENTER 0x04
+#define BJ_VTOP 0x08
+#define BJ_VBOTTOM 0x10
+#define BJ_VCENTER 0x20
+
+// Valid-Bits
+// Erstmal nur die Werte, die vom Dialog geaendert werden...
+#define VALID_FONTCOLOR 0x0001
+#define VALID_FONTNAME 0x0002
+#define VALID_SYMBOL 0x0004
+#define VALID_BITMAP 0x0008
+#define VALID_SCALE 0x0010
+#define VALID_START 0x0020
+#define VALID_STYLE 0x0040
+#define VALID_PREVTEXT 0x0080
+#define VALID_FOLLOWTEXT 0x0100
+#include <svl/poolitem.hxx>
+#include <vcl/font.hxx>
+#include <svtools/grfmgr.hxx>
+
+// class SvxBulletItem ---------------------------------------------------
+
+class EDITENG_DLLPUBLIC SvxBulletItem : public SfxPoolItem
+{
+ Font aFont;
+ GraphicObject* pGraphicObject;
+ String aPrevText;
+ String aFollowText;
+ USHORT nStart;
+ USHORT nStyle;
+ long nWidth;
+ USHORT nScale;
+ sal_Unicode cSymbol;
+ BYTE nJustify;
+ USHORT nValidMask; // Nur temporaer fuer GetAttribs/SetAttribs, wegen des grossen Bullets
+
+#ifdef _SVX_BULITEM_CXX
+ void SetDefaultFont_Impl();
+ void SetDefaults_Impl();
+#endif
+
+public:
+ TYPEINFO();
+
+ SvxBulletItem( USHORT nWhich = 0 );
+ SvxBulletItem( BYTE nStyle, const Font& rFont, USHORT nStart = 0, USHORT nWhich = 0 );
+ SvxBulletItem( const Font& rFont, sal_Unicode cSymbol, USHORT nWhich=0 );
+ SvxBulletItem( const Bitmap&, USHORT nWhich = 0 );
+ SvxBulletItem( const GraphicObject&, USHORT nWhich = 0 );
+ SvxBulletItem( SvStream& rStrm, USHORT nWhich = 0 );
+ SvxBulletItem( const SvxBulletItem& );
+ ~SvxBulletItem();
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create( SvStream&, USHORT nVersion ) const;
+ virtual SvStream& Store( SvStream & , USHORT nItemVersion ) const;
+
+ String GetFullText() const;
+ sal_Unicode GetSymbol() const { return cSymbol; }
+ String GetPrevText() const { return aPrevText; }
+ String GetFollowText() const { return aFollowText; }
+
+ USHORT GetStart() const { return nStart; }
+ long GetWidth() const { return nWidth; }
+ USHORT GetStyle() const { return nStyle; }
+ BYTE GetJustification() const { return nJustify; }
+ Font GetFont() const { return aFont; }
+ USHORT GetScale() const { return nScale; }
+
+ Bitmap GetBitmap() const;
+ void SetBitmap( const Bitmap& rBmp );
+
+ const GraphicObject& GetGraphicObject() const;
+ void SetGraphicObject( const GraphicObject& rGraphicObject );
+
+ void SetSymbol( sal_Unicode c) { cSymbol = c; }
+ void SetPrevText( const String& rStr) { aPrevText = rStr;}
+ void SetFollowText(const String& rStr) { aFollowText=rStr;}
+
+ void SetStart( USHORT nNew ) { nStart = nNew; }
+ void SetWidth( long nNew ) { nWidth = nNew; }
+ void SetStyle( USHORT nNew ) { nStyle = nNew; }
+ void SetJustification( BYTE nNew ) { nJustify = nNew; }
+ void SetFont( const Font& rNew) { aFont = rNew; }
+ void SetScale( USHORT nNew ) { nScale = nNew; }
+
+ virtual USHORT GetVersion(USHORT nFileVersion) const;
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const IntlWrapper * = 0 ) const;
+
+ static void StoreFont( SvStream&, const Font& );
+ static Font CreateFont( SvStream&, USHORT nVer );
+
+ USHORT& GetValidMask() { return nValidMask; }
+ USHORT GetValidMask() const { return nValidMask; }
+ USHORT IsValid( USHORT nFlag ) const { return nValidMask & nFlag; }
+ void SetValid( USHORT nFlag, BOOL bValid )
+ {
+ if ( bValid )
+ nValidMask |= nFlag;
+ else
+ nValidMask &= ~nFlag;
+ }
+ void CopyValidProperties( const SvxBulletItem& rCopyFrom );
+};
+
+
+#endif
diff --git a/editeng/inc/editeng/charhiddenitem.hxx b/editeng/inc/editeng/charhiddenitem.hxx
new file mode 100644
index 000000000000..a6f318a471cf
--- /dev/null
+++ b/editeng/inc/editeng/charhiddenitem.hxx
@@ -0,0 +1,64 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: charhiddenitem.hxx,v $
+ * $Revision: 1.6 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_CHARHIDDENITEM_HXX
+#define _SVX_CHARHIDDENITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#include <svl/poolitem.hxx>
+#include <svl/eitem.hxx>
+#include "editeng/editengdllapi.h"
+
+// class SvxCharHiddenItem -------------------------------------------------
+/*
+ [Description]
+ This item marks text as hidden
+*/
+
+class EDITENG_DLLPUBLIC SvxCharHiddenItem : public SfxBoolItem
+{
+public:
+ TYPEINFO();
+
+ SvxCharHiddenItem( const BOOL bHidden /*= FALSE*/, const USHORT nId );
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const IntlWrapper * = 0 ) const;
+
+ inline SvxCharHiddenItem& operator=(const SvxCharHiddenItem& rHidden) {
+ SetValue(rHidden.GetValue());
+ return *this;
+ }
+};
+
+#endif
diff --git a/editeng/inc/editeng/charreliefitem.hxx b/editeng/inc/editeng/charreliefitem.hxx
new file mode 100644
index 000000000000..e20a6425fb3e
--- /dev/null
+++ b/editeng/inc/editeng/charreliefitem.hxx
@@ -0,0 +1,83 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: charreliefitem.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_CHARRELIEFITEM_HXX
+#define _SVX_CHARRELIEFITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#include <svl/eitem.hxx>
+#include <vcl/fntstyle.hxx>
+#include <editeng/editengdllapi.h>
+
+// class SvxCharRotateItem ----------------------------------------------
+
+/* [Description]
+
+ This item defines a character relief and has currently the values
+ emboss, relief.
+
+*/
+
+class EDITENG_DLLPUBLIC SvxCharReliefItem : public SfxEnumItem
+{
+public:
+ TYPEINFO();
+
+ SvxCharReliefItem( FontRelief eValue /*= RELIEF_NONE*/,
+ const sal_uInt16 nId );
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual SvStream& Store(SvStream & rStrm, USHORT nIVer) const;
+ virtual USHORT GetVersion( USHORT nFileVersion ) const;
+
+ virtual String GetValueTextByPos( USHORT nPos ) const;
+ virtual USHORT GetValueCount() const;
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper * = 0 ) const;
+
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal,
+ BYTE nMemberId );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal,
+ BYTE nMemberId ) const;
+
+ inline SvxCharReliefItem& operator=( const SvxCharReliefItem& rItem )
+ {
+ SetValue( rItem.GetValue() );
+ return *this;
+ }
+};
+
+#endif
+
diff --git a/editeng/inc/editeng/charrotateitem.hxx b/editeng/inc/editeng/charrotateitem.hxx
new file mode 100644
index 000000000000..9b42154400b4
--- /dev/null
+++ b/editeng/inc/editeng/charrotateitem.hxx
@@ -0,0 +1,95 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: charrotateitem.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_CHARROTATEITEM_HXX
+#define _SVX_CHARROTATEITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#include <svl/intitem.hxx>
+#include <editeng/editengdllapi.h>
+
+// class SvxCharRotateItem ----------------------------------------------
+
+/* [Description]
+
+ This item defines a character rotation value (0,1 degree). Currently
+ character can only be rotated 90,0 and 270,0 degrees.
+ The flag FitToLine defines only a UI-Information -
+ if true it must also create a SvxCharScaleItem.
+
+*/
+
+class EDITENG_DLLPUBLIC SvxCharRotateItem : public SfxUInt16Item
+{
+ sal_Bool bFitToLine;
+public:
+ TYPEINFO();
+
+ SvxCharRotateItem( sal_uInt16 nValue /*= 0*/,
+ sal_Bool bFitIntoLine /*= sal_False*/,
+ const sal_uInt16 nId );
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual SvStream& Store(SvStream & rStrm, USHORT nIVer) const;
+ virtual USHORT GetVersion( USHORT nFileVersion ) const;
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper * = 0 ) const;
+
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal,
+ BYTE nMemberId );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal,
+ BYTE nMemberId ) const;
+
+ inline SvxCharRotateItem& operator=( const SvxCharRotateItem& rItem )
+ {
+ SetValue( rItem.GetValue() );
+ SetFitToLine( rItem.IsFitToLine() );
+ return *this;
+ }
+
+ virtual int operator==( const SfxPoolItem& ) const;
+
+ // our currently only degree values
+ void SetTopToBotton() { SetValue( 2700 ); }
+ void SetBottomToTop() { SetValue( 900 ); }
+ sal_Bool IsTopToBotton() const { return 2700 == GetValue(); }
+ sal_Bool IsBottomToTop() const { return 900 == GetValue(); }
+
+ sal_Bool IsFitToLine() const { return bFitToLine; }
+ void SetFitToLine( sal_Bool b ) { bFitToLine = b; }
+};
+
+#endif
+
diff --git a/editeng/inc/editeng/charscaleitem.hxx b/editeng/inc/editeng/charscaleitem.hxx
new file mode 100644
index 000000000000..0b663653b129
--- /dev/null
+++ b/editeng/inc/editeng/charscaleitem.hxx
@@ -0,0 +1,81 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: charscaleitem.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_CHARSCALEITEM_HXX
+#define _SVX_CHARSCALEITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#include <svl/intitem.hxx>
+#include <editeng/editengdllapi.h>
+
+// class SvxCharScaleItem ----------------------------------------------
+
+/* [Description]
+
+ This item defines a character scaling factor as percent value.
+ A value of 100 is identical to 100% and means normal width
+ A value of 50 is identical to 50% and means 1/2 width.
+
+*/
+
+class EDITENG_DLLPUBLIC SvxCharScaleWidthItem : public SfxUInt16Item
+{
+public:
+ TYPEINFO();
+
+ SvxCharScaleWidthItem( sal_uInt16 nValue /*= 100*/,
+ const sal_uInt16 nId );
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual SvStream& Store( SvStream& , USHORT nItemVersion ) const;
+ virtual USHORT GetVersion( USHORT nFileVersion ) const;
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper * = 0 ) const;
+
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal,
+ BYTE nMemberId );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal,
+ BYTE nMemberId ) const;
+
+ inline SvxCharScaleWidthItem& operator=(const SvxCharScaleWidthItem& rItem )
+ {
+ SetValue( rItem.GetValue() );
+ return *this;
+ }
+
+};
+
+#endif
+
diff --git a/editeng/inc/editeng/cmapitem.hxx b/editeng/inc/editeng/cmapitem.hxx
new file mode 100644
index 000000000000..871f68baef75
--- /dev/null
+++ b/editeng/inc/editeng/cmapitem.hxx
@@ -0,0 +1,92 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: cmapitem.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_CMAPITEM_HXX
+#define _SVX_CMAPITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#include <svl/eitem.hxx>
+#include <editeng/svxenum.hxx>
+#include <editeng/editengdllapi.h>
+
+class SvXMLUnitConverter;
+namespace rtl
+{
+ class OUString;
+}
+
+// class SvxCaseMapItem --------------------------------------------------
+
+/* [Beschreibung]
+
+ Dieses Item beschreibt die Schrift-Ausrichtung (Versalien, Kapitaelchen,...).
+*/
+
+class EDITENG_DLLPUBLIC SvxCaseMapItem : public SfxEnumItem
+{
+public:
+ TYPEINFO();
+
+ SvxCaseMapItem( const SvxCaseMap eMap /*= SVX_CASEMAP_NOT_MAPPED*/,
+ const USHORT nId );
+
+ // "pure virtual Methoden" vom SfxPoolItem + SfxEnumItem
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const IntlWrapper * = 0 ) const;
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
+ virtual String GetValueTextByPos( USHORT nPos ) const;
+ virtual USHORT GetValueCount() const;
+
+ // MS VC4.0 kommt durcheinander
+ void SetValue( USHORT nNewVal )
+ {SfxEnumItem::SetValue(nNewVal); }
+
+ inline SvxCaseMapItem& operator=(const SvxCaseMapItem& rMap)
+ {
+ SetValue( rMap.GetValue() );
+ return *this;
+ }
+
+ // enum cast
+ SvxCaseMap GetCaseMap() const
+ { return (SvxCaseMap)GetValue(); }
+ void SetCaseMap( SvxCaseMap eNew )
+ { SetValue( (USHORT)eNew ); }
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+};
+
+#endif
+
diff --git a/editeng/inc/editeng/cntritem.hxx b/editeng/inc/editeng/cntritem.hxx
new file mode 100644
index 000000000000..6439ea55bc11
--- /dev/null
+++ b/editeng/inc/editeng/cntritem.hxx
@@ -0,0 +1,71 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: cntritem.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_ITEM_HXX
+#define _SVX_ITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#include <svl/eitem.hxx>
+#include <editeng/editengdllapi.h>
+
+// class SvxContourItem --------------------------------------------------
+
+/*
+ [Beschreibung]
+ Dieses Item beschreibt, ob Konturschrift eingestellt ist.
+*/
+
+class EDITENG_DLLPUBLIC SvxContourItem : public SfxBoolItem
+{
+public:
+ TYPEINFO();
+
+ SvxContourItem( const BOOL bContoured /*= FALSE*/,
+ const USHORT nId );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const IntlWrapper * = 0 ) const;
+
+ inline SvxContourItem& operator=(const SvxContourItem& rCont)
+ {
+ SetValue(rCont.GetValue());
+ return *this;
+ }
+};
+
+#endif
+
diff --git a/editeng/inc/editeng/colritem.hxx b/editeng/inc/editeng/colritem.hxx
new file mode 100644
index 000000000000..fe36674a28a9
--- /dev/null
+++ b/editeng/inc/editeng/colritem.hxx
@@ -0,0 +1,98 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: colritem.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_COLRITEM_HXX
+#define _SVX_COLRITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#include <svl/poolitem.hxx>
+#include <tools/color.hxx>
+#include <editeng/editengdllapi.h>
+
+class SvXMLUnitConverter;
+namespace rtl
+{
+ class OUString;
+}
+
+// class SvxColorItem ----------------------------------------------------
+
+/* [Beschreibung]
+
+ Dieses Item beschreibt eine Farbe.
+*/
+
+#define VERSION_USEAUTOCOLOR 1
+
+class EDITENG_DLLPUBLIC SvxColorItem : public SfxPoolItem
+{
+private:
+ Color mColor;
+
+public:
+ TYPEINFO();
+
+ SvxColorItem( const USHORT nId );
+ SvxColorItem( const Color& aColor, const USHORT nId );
+ SvxColorItem( SvStream& rStrm, const USHORT nId );
+ SvxColorItem( const SvxColorItem& rCopy );
+ ~SvxColorItem();
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ virtual USHORT GetVersion( USHORT nFileVersion ) const;
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const IntlWrapper * = 0 ) const;
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
+
+ inline SvxColorItem& operator=(const SvxColorItem& rColor)
+ {
+ SetValue( rColor.GetValue() );
+ return *this;
+ }
+
+ const Color& GetValue() const
+ {
+ return mColor;
+ }
+ void SetValue( const Color& rNewCol );
+
+};
+
+#endif
+
diff --git a/editeng/inc/editeng/crsditem.hxx b/editeng/inc/editeng/crsditem.hxx
new file mode 100644
index 000000000000..fb43334ca97d
--- /dev/null
+++ b/editeng/inc/editeng/crsditem.hxx
@@ -0,0 +1,96 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: crsditem.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_CRSDITEM_HXX
+#define _SVX_CRSDITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#include <vcl/vclenum.hxx>
+#include <svl/eitem.hxx>
+#include <editeng/editengdllapi.h>
+
+class SvXMLUnitConverter;
+namespace rtl
+{
+ class OUString;
+}
+
+// class SvxCrossedOutItem -----------------------------------------------
+
+/*
+ [Beschreibung]
+ Dieses Item beschreibt, ob und wie durchstrichen ist.
+*/
+
+class EDITENG_DLLPUBLIC SvxCrossedOutItem : public SfxEnumItem
+{
+public:
+ TYPEINFO();
+
+ SvxCrossedOutItem( const FontStrikeout eSt /*= STRIKEOUT_NONE*/,
+ const USHORT nId );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const IntlWrapper * = 0 ) const;
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
+ virtual String GetValueTextByPos( USHORT nPos ) const;
+ virtual USHORT GetValueCount() const;
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+
+ // MS VC4.0 kommt durcheinander
+ void SetValue( USHORT nNewVal )
+ {SfxEnumItem::SetValue(nNewVal); }
+
+ virtual int HasBoolValue() const;
+ virtual BOOL GetBoolValue() const;
+ virtual void SetBoolValue( BOOL bVal );
+
+ inline SvxCrossedOutItem& operator=(const SvxCrossedOutItem& rCross)
+ {
+ SetValue( rCross.GetValue() );
+ return *this;
+ }
+
+ // enum cast
+ FontStrikeout GetStrikeout() const
+ { return (FontStrikeout)GetValue(); }
+ void SetStrikeout( FontStrikeout eNew )
+ { SetValue( (USHORT)eNew ); }
+};
+
+#endif // #ifndef _SVX_CRSDITEM_HXX
+
diff --git a/editeng/inc/editeng/cscoitem.hxx b/editeng/inc/editeng/cscoitem.hxx
new file mode 100644
index 000000000000..1353337262eb
--- /dev/null
+++ b/editeng/inc/editeng/cscoitem.hxx
@@ -0,0 +1,78 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: cscoitem.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_CSCOITEM_HXX
+#define _SVX_CSCOITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#include <tools/string.hxx>
+#include <editeng/colritem.hxx>
+#include <editeng/editengdllapi.h>
+
+// class SvxCharSetColorItem ---------------------------------------------
+
+/* [Beschreibung]
+
+ PB: wird nur intern im Reader des Writers benoetigt
+*/
+
+class EDITENG_DLLPUBLIC SvxCharSetColorItem : public SvxColorItem
+{
+ rtl_TextEncoding eFrom;
+public:
+ TYPEINFO();
+
+ SvxCharSetColorItem( const USHORT nId );
+ SvxCharSetColorItem( const Color& aColor, const rtl_TextEncoding eFrom,
+ const USHORT nId );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const IntlWrapper * = 0 ) const;
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
+
+ inline rtl_TextEncoding& GetCharSet() { return eFrom; }
+ inline rtl_TextEncoding GetCharSet() const { return eFrom; }
+
+ inline SvxCharSetColorItem& operator=(const SvxCharSetColorItem& rColor)
+ {
+ SetValue( rColor.GetValue() );
+ eFrom = rColor.GetCharSet();
+ return *this;
+ }
+};
+
+#endif
+
diff --git a/editeng/inc/editeng/editdata.hxx b/editeng/inc/editeng/editdata.hxx
new file mode 100644
index 000000000000..1af3d1190c9b
--- /dev/null
+++ b/editeng/inc/editeng/editdata.hxx
@@ -0,0 +1,391 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: editdata.hxx,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MyEDITDATA, wegen exportiertem EditData
+#ifndef _MyEDITDATA_HXX
+#define _MyEDITDATA_HXX
+
+#include <tools/string.hxx>
+#include "editeng/editengdllapi.h"
+
+#include <svl/svarray.hxx>
+
+class SfxItemSet;
+class SfxPoolItem;
+class SvParser;
+class SvxFieldItem;
+
+enum EETextFormat { EE_FORMAT_TEXT = 0x20, EE_FORMAT_RTF, EE_FORMAT_BIN = 0x31, EE_FORMAT_HTML, EE_FORMAT_XML };
+enum EEHorizontalTextDirection { EE_HTEXTDIR_DEFAULT, EE_HTEXTDIR_L2R, EE_HTEXTDIR_R2L };
+enum EESelectionMode { EE_SELMODE_STD, EE_SELMODE_TXTONLY, EE_SELMODE_HIDDEN };
+ // EE_SELMODE_HIDDEN can be used to completely hide the selection. This is usefull e.g. when you want show the selection
+ // only as long as your window (which the edit view works on) has the focus
+enum EESpellState { EE_SPELL_OK, EE_SPELL_NOLANGUAGE, EE_SPELL_LANGUAGENOTINSTALLED, EE_SPELL_NOSPELLER, EE_SPELL_ERRORFOUND };
+enum EVAnchorMode {
+ ANCHOR_TOP_LEFT, ANCHOR_VCENTER_LEFT, ANCHOR_BOTTOM_LEFT,
+ ANCHOR_TOP_HCENTER, ANCHOR_VCENTER_HCENTER, ANCHOR_BOTTOM_HCENTER,
+ ANCHOR_TOP_RIGHT, ANCHOR_VCENTER_RIGHT, ANCHOR_BOTTOM_RIGHT };
+
+#define EE_PARA_NOT_FOUND 0xFFFF
+#define EE_PARA_APPEND 0xFFFF
+#define EE_PARA_ALL 0xFFFF
+#define EE_APPEND 0xFFFF
+#define EE_INDEX_NOT_FOUND 0xFFFF
+
+// Fehlermeldungen fuer Read/Write-Methode
+#define EE_READWRITE_OK (SVSTREAM_OK)
+#define EE_READWRITE_WRONGFORMAT (SVSTREAM_ERRBASE_USER+1)
+#define EE_READWRITE_GENERALERROR (SVSTREAM_ERRBASE_USER+2)
+
+#define EDITUNDO_START 100
+#define EDITUNDO_REMOVECHARS 100
+#define EDITUNDO_CONNECTPARAS 101
+#define EDITUNDO_REMOVEFEATURE 102
+#define EDITUNDO_MOVEPARAGRAPHS 103
+#define EDITUNDO_INSERTFEATURE 104
+#define EDITUNDO_SPLITPARA 105
+#define EDITUNDO_INSERTCHARS 106
+#define EDITUNDO_DELCONTENT 107
+#define EDITUNDO_DELETE 108
+#define EDITUNDO_CUT 109
+#define EDITUNDO_PASTE 110
+#define EDITUNDO_INSERT 111
+#define EDITUNDO_SRCHANDREPL 112
+#define EDITUNDO_MOVEPARAS 113
+#define EDITUNDO_PARAATTRIBS 114
+#define EDITUNDO_ATTRIBS 115
+#define EDITUNDO_DRAGANDDROP 116
+#define EDITUNDO_READ 117
+#define EDITUNDO_STYLESHEET 118
+#define EDITUNDO_REPLACEALL 119
+#define EDITUNDO_STRETCH 120
+#define EDITUNDO_RESETATTRIBS 121
+#define EDITUNDO_INDENTBLOCK 122
+#define EDITUNDO_UNINDENTBLOCK 123
+#define EDITUNDO_MARKSELECTION 124
+#define EDITUNDO_TRANSLITERATE 125
+#define EDITUNDO_END 125
+
+#define EDITUNDO_USER 200
+
+
+#define EE_COMPATIBLEMODE_PARAGRAPHSPACING_SUMMATION 0x0001
+#define EE_COMPATIBLEMODE_PARAGRAPHSPACING_BEFOREFIRSTPARAGRAPH 0x0002
+
+class EditView;
+class EditEngine;
+class ImpEditView;
+class ImpEditEngine;
+class EditTextObject;
+class SfxStyleSheet;
+
+#define RGCHK_NONE 0 // Keine Korrektur der ViusArea beim Scrollen
+#define RGCHK_NEG 1 // Keine neg. ViusArea beim Scrollen
+#define RGCHK_PAPERSZ1 2 // VisArea muss in Papierbreite,Texthoehe liegen
+
+struct EPosition
+{
+ USHORT nPara;
+ xub_StrLen nIndex;
+
+ EPosition() :
+ nPara( EE_PARA_NOT_FOUND ),
+ nIndex( EE_INDEX_NOT_FOUND )
+ {
+ }
+
+ EPosition( USHORT nPara_, xub_StrLen nPos_ ) :
+ nPara( nPara_ ),
+ nIndex( nPos_ )
+ {
+ }
+};
+
+struct ESelection
+{
+ USHORT nStartPara;
+ xub_StrLen nStartPos;
+ USHORT nEndPara;
+ xub_StrLen nEndPos;
+
+ ESelection() : nStartPara( 0 ), nStartPos( 0 ), nEndPara( 0 ), nEndPos( 0 ) {}
+
+ ESelection( USHORT nStPara, xub_StrLen nStPos, USHORT nEPara, xub_StrLen nEPos ) :
+ nStartPara( nStPara ),
+ nStartPos( nStPos ),
+ nEndPara( nEPara ),
+ nEndPos( nEPos )
+ {
+ }
+
+ ESelection( USHORT nPara, xub_StrLen nPos ) :
+ nStartPara( nPara ),
+ nStartPos( nPos ),
+ nEndPara( nPara ),
+ nEndPos( nPos )
+ {
+ }
+
+ void Adjust();
+ BOOL IsEqual( const ESelection& rS ) const;
+ BOOL IsLess( const ESelection& rS ) const;
+ BOOL IsGreater( const ESelection& rS ) const;
+ BOOL IsZero() const;
+ BOOL HasRange() const;
+};
+
+inline BOOL ESelection::HasRange() const
+{
+ return ( nStartPara != nEndPara ) || ( nStartPos != nEndPos );
+}
+
+inline sal_Bool ESelection::IsZero() const
+{
+ return ( ( nStartPara == 0 ) && ( nStartPos == 0 ) &&
+ ( nEndPara == 0 ) && ( nEndPos == 0 ) );
+}
+
+inline sal_Bool ESelection::IsEqual( const ESelection& rS ) const
+{
+ return ( ( nStartPara == rS.nStartPara ) && ( nStartPos == rS.nStartPos ) &&
+ ( nEndPara == rS.nEndPara ) && ( nEndPos == rS.nEndPos ) );
+}
+
+inline sal_Bool ESelection::IsLess( const ESelection& rS ) const
+{
+ // Selektion muss justiert sein.
+ // => Nur pueffen, ob Ende von 'this' < Start von rS
+
+ if ( ( nEndPara < rS.nStartPara ) ||
+ ( ( nEndPara == rS.nStartPara ) && ( nEndPos < rS.nStartPos ) && !IsEqual( rS ) ) )
+ {
+ return sal_True;
+ }
+ return sal_False;
+}
+
+inline sal_Bool ESelection::IsGreater( const ESelection& rS ) const
+{
+ // Selektion muss justiert sein.
+ // => Nur pueffen, ob Ende von 'this' > Start von rS
+
+ if ( ( nStartPara > rS.nEndPara ) ||
+ ( ( nStartPara == rS.nEndPara ) && ( nStartPos > rS.nEndPos ) && !IsEqual( rS ) ) )
+ {
+ return sal_True;
+ }
+ return sal_False;
+}
+
+inline void ESelection::Adjust()
+{
+ sal_Bool bSwap = sal_False;
+ if ( nStartPara > nEndPara )
+ bSwap = sal_True;
+ else if ( ( nStartPara == nEndPara ) && ( nStartPos > nEndPos ) )
+ bSwap = sal_True;
+
+ if ( bSwap )
+ {
+ sal_uInt16 nSPar = nStartPara; sal_uInt16 nSPos = nStartPos;
+ nStartPara = nEndPara; nStartPos = nEndPos;
+ nEndPara = nSPar; nEndPos = nSPos;
+ }
+}
+
+struct EDITENG_DLLPUBLIC EFieldInfo
+{
+ SvxFieldItem* pFieldItem;
+ String aCurrentText;
+ EPosition aPosition;
+
+ EFieldInfo();
+ EFieldInfo( const SvxFieldItem& rFieldItem, USHORT nPara, USHORT nPos );
+ ~EFieldInfo();
+
+ EFieldInfo( const EFieldInfo& );
+ EFieldInfo& operator= ( const EFieldInfo& );
+};
+
+// -----------------------------------------------------------------------
+
+enum ImportState {
+ RTFIMP_START, RTFIMP_END, // nur pParser, nPara, nIndex
+ RTFIMP_NEXTTOKEN, RTFIMP_UNKNOWNATTR, // nToken+nTokenValue
+ RTFIMP_SETATTR, // pAttrs
+ RTFIMP_INSERTTEXT, // aText
+ RTFIMP_INSERTPARA, // -
+ HTMLIMP_START, HTMLIMP_END, // nur pParser, nPara, nIndex
+ HTMLIMP_NEXTTOKEN, HTMLIMP_UNKNOWNATTR, // nToken
+ HTMLIMP_SETATTR, // pAttrs
+ HTMLIMP_INSERTTEXT, // aText
+ HTMLIMP_INSERTPARA, HTMLIMP_INSERTFIELD // -
+ };
+
+struct ImportInfo
+{
+ SvParser* pParser;
+ ESelection aSelection;
+ ImportState eState;
+
+ int nToken;
+ short nTokenValue;
+
+ String aText;
+
+ void* pAttrs; // RTF: SvxRTFItemStackType*, HTML: SfxItemSet*
+
+ ImportInfo( ImportState eState, SvParser* pPrsrs, const ESelection& rSel );
+ ~ImportInfo();
+};
+
+#define EE_SEARCH_WORDONLY 0x0001
+#define EE_SEARCH_EXACT 0x0002
+#define EE_SEARCH_BACKWARD 0x0004
+#define EE_SEARCH_INSELECTION 0x0008
+#define EE_SEARCH_REGEXPR 0x0010
+#define EE_SEARCH_PATTERN 0x0020
+
+struct ParagraphInfos
+{
+ ParagraphInfos()
+ : nParaHeight( 0 )
+ , nLines( 0 )
+ , nFirstLineStartX( 0 )
+ , nFirstLineOffset( 0 )
+ , nFirstLineHeight( 0 )
+ , nFirstLineTextHeight ( 0 )
+ , nFirstLineMaxAscent( 0 )
+ , bValid( 0 )
+ {}
+ USHORT nParaHeight;
+ USHORT nLines;
+
+ USHORT nFirstLineStartX;
+
+ USHORT nFirstLineOffset;
+ USHORT nFirstLineHeight;
+ USHORT nFirstLineTextHeight;
+ USHORT nFirstLineMaxAscent;
+
+ BOOL bValid; // Bei einer Abfrage waehrend der Formatierung ungueltig!
+};
+
+struct EECharAttrib
+{
+ const SfxPoolItem* pAttr;
+
+ USHORT nPara;
+ xub_StrLen nStart;
+ xub_StrLen nEnd;
+};
+
+SV_DECL_VARARR_VISIBILITY( EECharAttribArray, EECharAttrib, 0, 4, EDITENG_DLLPUBLIC )
+
+struct MoveParagraphsInfo
+{
+ USHORT nStartPara;
+ USHORT nEndPara;
+ USHORT nDestPara;
+
+ MoveParagraphsInfo( USHORT nS, USHORT nE, USHORT nD )
+ { nStartPara = nS; nEndPara = nE; nDestPara = nD; }
+};
+
+#define EE_ACTION_PASTE 1
+#define EE_ACTION_DROP 2
+
+struct PasteOrDropInfos
+{
+ USHORT nAction;
+ USHORT nStartPara;
+ USHORT nEndPara;
+
+ PasteOrDropInfos() : nAction(0), nStartPara(0xFFFF), nEndPara(0xFFFF) {}
+};
+
+enum EENotifyType
+{
+ /// EditEngine text was modified
+ EE_NOTIFY_TEXTMODIFIED,
+
+ /// A paragraph was inserted into the EditEngine
+ EE_NOTIFY_PARAGRAPHINSERTED,
+
+ /// A paragraph was removed from the EditEngine
+ EE_NOTIFY_PARAGRAPHREMOVED,
+
+ /// Multiple paragraphs have been removed from the EditEngine
+ EE_NOTIFY_PARAGRAPHSMOVED,
+
+ /// The height of at least one paragraph has changed
+ EE_NOTIFY_TEXTHEIGHTCHANGED,
+
+ /// The view area of the EditEngine scrolled
+ EE_NOTIFY_TEXTVIEWSCROLLED,
+
+ /// The selection and/or the cursor position has changed
+ EE_NOTIFY_TEXTVIEWSELECTIONCHANGED,
+
+ /** Denotes the beginning of a collected amount of EditEngine
+ notification events. This event itself is not queued, but sent
+ immediately
+ */
+ EE_NOTIFY_BLOCKNOTIFICATION_START,
+
+ /** Denotes the end of a collected amount of EditEngine
+ notification events. After this event, the queue is empty, and
+ a high-level operation such as "insert paragraph" is finished
+ */
+ EE_NOTIFY_BLOCKNOTIFICATION_END,
+
+ /// Denotes the beginning of a high-level action triggered by a key press
+ EE_NOTIFY_INPUT_START,
+
+ /// Denotes the end of a high-level action triggered by a key press
+ EE_NOTIFY_INPUT_END
+};
+
+struct EENotify
+{
+ EENotifyType eNotificationType;
+ EditEngine* pEditEngine;
+ EditView* pEditView;
+
+ USHORT nParagraph; // only valid in PARAGRAPHINSERTED/EE_NOTIFY_PARAGRAPHREMOVED
+
+ USHORT nParam1;
+ USHORT nParam2;
+
+ EENotify( EENotifyType eType )
+ { eNotificationType = eType; pEditEngine = NULL; pEditView = NULL; nParagraph = EE_PARA_NOT_FOUND; nParam1 = 0; nParam2 = 0; }
+};
+
+#endif // _MyEDITDATA_HXX
diff --git a/editeng/inc/editeng/editeng.hxx b/editeng/inc/editeng/editeng.hxx
new file mode 100644
index 000000000000..2728cd0544bb
--- /dev/null
+++ b/editeng/inc/editeng/editeng.hxx
@@ -0,0 +1,489 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: editeng.hxx,v $
+ * $Revision: 1.8.14.2 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+// MyEDITENG, wegen exportiertem EditEng
+#ifndef _MyEDITENG_HXX
+#define _MyEDITENG_HXX
+
+class ImpEditEngine;
+class EditView;
+class OutputDevice;
+class EditUndo;
+class SvxFont;
+class SfxUndoManager;
+class SfxItemPool;
+class SfxStyleSheet;
+class String;
+class SfxStyleSheetPool;
+class SvxSearchItem;
+class SvxFieldItem;
+class SvxCharSetColorItem;
+class SfxUndoAction;
+class MapMode;
+class Color;
+class Font;
+class KeyEvent;
+class PolyPolygon;
+class Size;
+class Point;
+class Rectangle;
+class SvStream;
+class Link;
+class OutputDevice;
+class SvUShorts;
+class SfxPoolItem;
+class SvxNumBulletItem;
+class SvxBulletItem;
+class SvxLRSpaceItem;
+class SvKeyValueIterator;
+class SvxForbiddenCharactersTable;
+class SvxNumberFormat;
+class FontList;
+
+#include <vos/ref.hxx>
+#include <vector>
+#include <com/sun/star/uno/Reference.h>
+
+namespace com { namespace sun { namespace star {
+ namespace linguistic2 {
+ class XSpellChecker1;
+ class XHyphenator;
+ }
+ namespace datatransfer {
+ class XTransferable;
+ }
+ namespace lang {
+ struct Locale;
+ }
+}}}
+namespace svx{
+struct SpellPortion;
+typedef std::vector<SpellPortion> SpellPortions;
+}
+
+namespace basegfx { class B2DPolyPolygon; }
+#include <rsc/rscsfx.hxx>
+#ifndef _EDITDATA_HXX
+#include <editeng/editdata.hxx>
+#endif
+#include <i18npool/lang.h>
+#include "editeng/editengdllapi.h"
+
+#include <tools/rtti.hxx> // wegen typedef TypeId
+
+#include <editeng/eedata.hxx>
+class SvxFieldData;
+
+//////////////////////////////////////////////////////////////////////////////
+
+/** values for GetAttribs
+*/
+const sal_uInt8 EditEngineAttribs_All = 0; /// returns all attributes even when theire not set
+const sal_uInt8 EditEngineAttribs_HardAndPara = 1; /// returns all attributes set on paragraph and on portions
+const sal_uInt8 EditEngineAttribs_OnlyHard = 2; /// returns only attributes hard set on portions
+
+#define GETATTRIBS_STYLESHEET (sal_uInt8)0x01
+#define GETATTRIBS_PARAATTRIBS (sal_uInt8)0x02
+#define GETATTRIBS_CHARATTRIBS (sal_uInt8)0x04
+#define GETATTRIBS_ALL (sal_uInt8)0xFF
+
+class EDITENG_DLLPUBLIC EditEngine
+{
+ friend class EditView;
+ friend class ImpEditView;
+ friend class EditDbg;
+ friend class Outliner;
+
+private:
+ ImpEditEngine* pImpEditEngine;
+
+ EDITENG_DLLPRIVATE EditEngine( const EditEngine& );
+ EDITENG_DLLPRIVATE EditEngine& operator=( const EditEngine& );
+
+//#if 0 // _SOLAR__PRIVATE
+ EDITENG_DLLPRIVATE BOOL PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pView );
+//#endif
+
+protected:
+
+
+public:
+ EditEngine( SfxItemPool* pItemPool );
+ virtual ~EditEngine();
+
+ const SfxItemSet& GetEmptyItemSet();
+
+ void SetDefTab( USHORT nDefTab );
+ USHORT GetDefTab() const;
+
+ void SetRefDevice( OutputDevice* pRefDef );
+ OutputDevice* GetRefDevice() const;
+
+ void SetRefMapMode( const MapMode& rMapMode );
+ MapMode GetRefMapMode();
+
+ void SetUpdateMode( BOOL bUpdate );
+ BOOL GetUpdateMode() const;
+
+ void SetBackgroundColor( const Color& rColor );
+ Color GetBackgroundColor() const;
+ Color GetAutoColor() const;
+ void EnableAutoColor( BOOL b );
+ BOOL IsAutoColorEnabled() const;
+ void ForceAutoColor( BOOL b );
+ BOOL IsForceAutoColor() const;
+
+ void InsertView( EditView* pEditView, USHORT nIndex = EE_APPEND );
+ EditView* RemoveView( EditView* pEditView );
+ EditView* RemoveView( USHORT nIndex = EE_APPEND );
+ EditView* GetView( USHORT nIndex = 0 ) const;
+ USHORT GetViewCount() const;
+ BOOL HasView( EditView* pView ) const;
+ EditView* GetActiveView() const;
+ void SetActiveView( EditView* pView );
+
+ void SetPaperSize( const Size& rSize );
+ const Size& GetPaperSize() const;
+
+ void SetVertical( BOOL bVertical );
+ BOOL IsVertical() const;
+
+ void SetFixedCellHeight( BOOL bUseFixedCellHeight );
+ BOOL IsFixedCellHeight() const;
+
+ void SetDefaultHorizontalTextDirection( EEHorizontalTextDirection eHTextDir );
+ EEHorizontalTextDirection GetDefaultHorizontalTextDirection() const;
+
+ USHORT GetScriptType( const ESelection& rSelection ) const;
+ LanguageType GetLanguage( USHORT nPara, USHORT nPos ) const;
+
+ void TransliterateText( const ESelection& rSelection, sal_Int32 nTransliterationMode );
+
+ void SetAsianCompressionMode( USHORT nCompression );
+ USHORT GetAsianCompressionMode() const;
+
+ void SetKernAsianPunctuation( BOOL bEnabled );
+ BOOL IsKernAsianPunctuation() const;
+
+ void SetAddExtLeading( BOOL b );
+ BOOL IsAddExtLeading() const;
+
+ void SetPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon );
+ void SetPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::B2DPolyPolygon* pLinePolyPolygon);
+ void ClearPolygon();
+ const PolyPolygon* GetPolygon();
+
+ const Size& GetMinAutoPaperSize() const;
+ void SetMinAutoPaperSize( const Size& rSz );
+
+ const Size& GetMaxAutoPaperSize() const;
+ void SetMaxAutoPaperSize( const Size& rSz );
+
+ String GetText( LineEnd eEnd = LINEEND_LF ) const;
+ String GetText( const ESelection& rSelection, const LineEnd eEnd = LINEEND_LF ) const;
+ sal_uInt32 GetTextLen() const;
+ sal_uInt32 GetTextHeight() const;
+ sal_uInt32 CalcTextWidth();
+
+ String GetText( USHORT nParagraph ) const;
+ xub_StrLen GetTextLen( USHORT nParagraph ) const;
+ sal_uInt32 GetTextHeight( USHORT nParagraph ) const;
+
+ USHORT GetParagraphCount() const;
+
+ USHORT GetLineCount( USHORT nParagraph ) const;
+ xub_StrLen GetLineLen( USHORT nParagraph, USHORT nLine ) const;
+ void GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const;
+ USHORT GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const;
+ sal_uInt32 GetLineHeight( USHORT nParagraph, USHORT nLine = 0 );
+ USHORT GetFirstLineOffset( USHORT nParagraph );
+ ParagraphInfos GetParagraphInfos( USHORT nPara );
+ USHORT FindParagraph( long nDocPosY );
+ EPosition FindDocPosition( const Point& rDocPos ) const;
+ Rectangle GetCharacterBounds( const EPosition& rPos ) const;
+
+ String GetWord( USHORT nPara, xub_StrLen nIndex );
+
+ ESelection GetWord( const ESelection& rSelection, USHORT nWordType ) const;
+ ESelection WordLeft( const ESelection& rSelection, USHORT nWordType ) const;
+ ESelection WordRight( const ESelection& rSelection, USHORT nWordType ) const;
+ ESelection CursorLeft( const ESelection& rSelection, USHORT nCharacterIteratorMode ) const;
+ ESelection CursorRight( const ESelection& rSelection, USHORT nCharacterIteratorMode ) const;
+
+ void Clear();
+ void SetText( const String& rStr );
+
+ EditTextObject* CreateTextObject();
+ EditTextObject* CreateTextObject( USHORT nPara, USHORT nParas = 1 );
+ EditTextObject* CreateTextObject( const ESelection& rESelection );
+ void SetText( const EditTextObject& rTextObject );
+
+ void RemoveParagraph( USHORT nPara );
+ void InsertParagraph( USHORT nPara, const EditTextObject& rTxtObj );
+ void InsertParagraph( USHORT nPara, const String& rText);
+
+ void SetText( USHORT nPara, const EditTextObject& rTxtObj );
+ void SetText( USHORT nPara, const String& rText);
+
+ virtual void SetParaAttribs( USHORT nPara, const SfxItemSet& rSet );
+ virtual const SfxItemSet& GetParaAttribs( USHORT nPara ) const;
+
+ void GetCharAttribs( USHORT nPara, EECharAttribArray& rLst ) const;
+
+ SfxItemSet GetAttribs( USHORT nPara, USHORT nStart, USHORT nEnd, sal_uInt8 nFlags = 0xFF ) const;
+ SfxItemSet GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib = EditEngineAttribs_All );
+
+ BOOL HasParaAttrib( USHORT nPara, USHORT nWhich ) const;
+ const SfxPoolItem& GetParaAttrib( USHORT nPara, USHORT nWhich );
+
+ Font GetStandardFont( USHORT nPara );
+ SvxFont GetStandardSvxFont( USHORT nPara );
+
+ void RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich );
+
+ void ShowParagraph( USHORT nParagraph, BOOL bShow = TRUE );
+ BOOL IsParagraphVisible( USHORT nParagraph );
+
+ SfxUndoManager& GetUndoManager();
+ void UndoActionStart( USHORT nId );
+ void UndoActionEnd( USHORT nId );
+ BOOL IsInUndo();
+
+ void EnableUndo( BOOL bEnable );
+ BOOL IsUndoEnabled();
+
+ /** returns the value last used for bTryMerge while calling ImpEditEngine::InsertUndo
+ This is currently used in a bad but needed hack to get undo actions merged in the
+ OutlineView in impress. Do not use it unless you want to sell your soul too! */
+ BOOL HasTriedMergeOnLastAddUndo() const;
+
+ void ClearModifyFlag();
+ void SetModified();
+ BOOL IsModified() const;
+
+ void SetModifyHdl( const Link& rLink );
+ Link GetModifyHdl() const;
+
+ BOOL IsInSelectionMode() const;
+ void StopSelectionMode();
+
+ void StripPortions();
+ void GetPortions( USHORT nPara, SvUShorts& rList );
+
+ long GetFirstLineStartX( USHORT nParagraph );
+ Point GetDocPosTopLeft( USHORT nParagraph );
+ Point GetDocPos( const Point& rPaperPos ) const;
+ BOOL IsTextPos( const Point& rPaperPos, USHORT nBorder = 0 );
+
+ // StartDocPos entspr. VisArea.TopLeft().
+ void Draw( OutputDevice* pOutDev, const Rectangle& rOutRect );
+ void Draw( OutputDevice* pOutDev, const Rectangle& rOutRect, const Point& rStartDocPos );
+ void Draw( OutputDevice* pOutDev, const Rectangle& rOutRect, const Point& rStartDocPos, BOOL bClip );
+ void Draw( OutputDevice* pOutDev, const Point& rStartPos, short nOrientation = 0 );
+
+// ULONG: Fehlercode des Streams.
+ ULONG Read( SvStream& rInput, const String& rBaseURL, EETextFormat, SvKeyValueIterator* pHTTPHeaderAttrs = NULL );
+ ULONG Write( SvStream& rOutput, EETextFormat );
+
+ void SetStatusEventHdl( const Link& rLink );
+ Link GetStatusEventHdl() const;
+
+ void SetNotifyHdl( const Link& rLink );
+ Link GetNotifyHdl() const;
+
+ void SetImportHdl( const Link& rLink );
+ Link GetImportHdl() const;
+
+ // Flat-Mode: Keine Zeichenformatierung auswerten => Fuer Outliner
+ BOOL IsFlatMode() const;
+ void SetFlatMode( BOOL bFlat );
+
+ void SetControlWord( sal_uInt32 nWord );
+ sal_uInt32 GetControlWord() const;
+
+ void QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel );
+ void QuickRemoveCharAttribs( USHORT nPara, USHORT nWhich = 0 );
+ void QuickMarkInvalid( const ESelection& rSel );
+ void QuickFormatDoc( BOOL bFull = FALSE );
+ void QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel );
+ void QuickInsertLineBreak( const ESelection& rSel );
+ void QuickInsertText( const String& rText, const ESelection& rSel );
+ void QuickDelete( const ESelection& rSel );
+ void QuickMarkToBeRepainted( USHORT nPara );
+
+ void SetGlobalCharStretching( USHORT nX = 100, USHORT nY = 100 );
+ void GetGlobalCharStretching( USHORT& rX, USHORT& rY );
+ void DoStretchChars( USHORT nX, USHORT nY );
+
+ void SetEditTextObjectPool( SfxItemPool* pPool );
+ SfxItemPool* GetEditTextObjectPool() const;
+
+ void SetStyleSheetPool( SfxStyleSheetPool* pSPool );
+ SfxStyleSheetPool* GetStyleSheetPool();
+
+ void SetStyleSheet( USHORT nPara, SfxStyleSheet* pStyle );
+ SfxStyleSheet* GetStyleSheet( USHORT nPara ) const;
+
+ void SetWordDelimiters( const String& rDelimiters );
+ String GetWordDelimiters() const;
+
+ void SetGroupChars( const String& rChars );
+ String GetGroupChars() const;
+
+ void EnablePasteSpecial( BOOL bEnable );
+ BOOL IsPasteSpecialEnabled() const;
+
+ void EnableIdleFormatter( BOOL bEnable );
+ BOOL IsIdleFormatterEnabled() const;
+
+ void EraseVirtualDevice();
+
+ void SetSpeller( ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XSpellChecker1 > &xSpeller );
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XSpellChecker1 >
+ GetSpeller();
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XHyphenator >
+ GetHyphenator() const;
+ void SetHyphenator( ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XHyphenator >& xHyph );
+
+ void SetForbiddenCharsTable( vos::ORef<SvxForbiddenCharactersTable> xForbiddenChars );
+ vos::ORef<SvxForbiddenCharactersTable> GetForbiddenCharsTable() const;
+
+ void SetDefaultLanguage( LanguageType eLang );
+ LanguageType GetDefaultLanguage() const;
+
+ BOOL HasOnlineSpellErrors() const;
+ void CompleteOnlineSpelling();
+
+ void SetBigTextObjectStart( USHORT nStartAtPortionCount );
+ USHORT GetBigTextObjectStart() const;
+ BOOL ShouldCreateBigTextObject() const;
+
+ // Zum schnellen Vorab-Pruefen ohne View:
+ EESpellState HasSpellErrors();
+ BOOL HasText( const SvxSearchItem& rSearchItem );
+
+ //initialize sentence spelling
+ void StartSpelling(EditView& rEditView, sal_Bool bMultipleDoc);
+ //spell and return a sentence
+ bool SpellSentence(EditView& rEditView, ::svx::SpellPortions& rToFill, bool bIsGrammarChecking );
+ // put spell position to start of current sentence
+ void PutSpellingToSentenceStart( EditView& rEditView );
+ //applies a changed sentence
+ void ApplyChangedSentence(EditView& rEditView, const ::svx::SpellPortions& rNewPortions, bool bIsGrammarChecking );
+ //deinitialize sentence spelling
+ void EndSpelling();
+
+ // for text conversion (see also HasSpellErrors)
+ sal_Bool HasConvertibleTextPortion( LanguageType nLang );
+ virtual BOOL ConvertNextDocument();
+
+ BOOL UpdateFields();
+ void RemoveFields( BOOL bKeepFieldText, TypeId aType = NULL );
+
+ USHORT GetFieldCount( USHORT nPara ) const;
+ EFieldInfo GetFieldInfo( USHORT nPara, USHORT nField ) const;
+
+ BOOL IsRightToLeft( USHORT nPara ) const;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >
+ CreateTransferable( const ESelection& rSelection ) const;
+
+ // MT: Can't create new virtual functions like for ParagraphInserted/Deleted, musst be compatible in SRC638, change later...
+ void SetBeginMovingParagraphsHdl( const Link& rLink );
+ void SetEndMovingParagraphsHdl( const Link& rLink );
+ void SetBeginPasteOrDropHdl( const Link& rLink );
+ void SetEndPasteOrDropHdl( const Link& rLink );
+
+ virtual void PaintingFirstLine( USHORT nPara, const Point& rStartPos, long nBaseLineY, const Point& rOrigin, short nOrientation, OutputDevice* pOutDev );
+ virtual void ParagraphInserted( USHORT nNewParagraph );
+ virtual void ParagraphDeleted( USHORT nDeletedParagraph );
+ virtual void ParagraphConnected( USHORT nLeftParagraph, USHORT nRightParagraph );
+ virtual void ParaAttribsChanged( USHORT nParagraph );
+ virtual void StyleSheetChanged( SfxStyleSheet* pStyle );
+ virtual void ParagraphHeightChanged( USHORT nPara );
+
+ // #101498#
+ virtual void DrawingText(
+ const Point& rStartPos, const String& rText, USHORT nTextStart, USHORT nTextLen, const sal_Int32* pDXArray,
+ const SvxFont& rFont, USHORT nPara, xub_StrLen nIndex, BYTE nRightToLeft,
+ const EEngineData::WrongSpellVector* pWrongSpellVector,
+ const SvxFieldData* pFieldData,
+ bool bEndOfLine,
+ bool bEndOfParagraph,
+ bool bEndOfBullet,
+ const ::com::sun::star::lang::Locale* pLocale,
+ const Color& rOverlineColor,
+ const Color& rTextLineColor);
+
+ virtual String GetUndoComment( USHORT nUndoId ) const;
+ virtual BOOL FormattingParagraph( USHORT nPara );
+ virtual BOOL SpellNextDocument();
+ virtual void FieldClicked( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos );
+ virtual void FieldSelected( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos );
+ virtual String CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos, Color*& rTxtColor, Color*& rFldColor );
+
+ // to be overloaded if access to bullet information needs to be provided
+ virtual const SvxNumberFormat * GetNumberFormat( USHORT nPara ) const;
+
+ virtual Rectangle GetBulletArea( USHORT nPara );
+
+ static SfxItemPool* CreatePool( BOOL bLoadRefCounts = TRUE );
+ static SfxItemPool& GetGlobalItemPool();
+ static sal_uInt32 RegisterClipboardFormatName();
+ static BOOL DoesKeyChangeText( const KeyEvent& rKeyEvent );
+ static BOOL DoesKeyMoveCursor( const KeyEvent& rKeyEvent );
+ static BOOL IsSimpleCharInput( const KeyEvent& rKeyEvent );
+ static USHORT GetAvailableSearchOptions();
+ static void SetFontInfoInItemSet( SfxItemSet& rItemSet, const Font& rFont );
+ static void SetFontInfoInItemSet( SfxItemSet& rItemSet, const SvxFont& rFont );
+ static Font CreateFontFromItemSet( const SfxItemSet& rItemSet );
+ static Font CreateFontFromItemSet( const SfxItemSet& rItemSet, USHORT nScriptType );
+ static SvxFont CreateSvxFontFromItemSet( const SfxItemSet& rItemSet );
+ static void ImportBulletItem( SvxNumBulletItem& rNumBullet, USHORT nLevel, const SvxBulletItem* pOldBullet, const SvxLRSpaceItem* pOldLRSpace );
+ static BOOL IsPrintable( sal_Unicode c ) { return ( ( c >= 32 ) && ( c != 127 ) ); }
+ static BOOL HasValidData( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rTransferable );
+
+ /** sets a link that is called at the beginning of a drag operation at an edit view */
+ void SetBeginDropHdl( const Link& rLink );
+ Link GetBeginDropHdl() const;
+
+ /** sets a link that is called at the end of a drag operation at an edit view */
+ void SetEndDropHdl( const Link& rLink );
+ Link GetEndDropHdl() const;
+
+ /// specifies if auto-correction should capitalize the first word or not (default is on)
+ void SetFirstWordCapitalization( BOOL bCapitalize );
+ BOOL IsFirstWordCapitalization() const;
+};
+
+#endif // _MyEDITENG_HXX
diff --git a/editeng/inc/editeng/editengdllapi.h b/editeng/inc/editeng/editengdllapi.h
new file mode 100644
index 000000000000..ec4b02f07e6a
--- /dev/null
+++ b/editeng/inc/editeng/editengdllapi.h
@@ -0,0 +1,43 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: editengdllapi.h,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef INCLUDED_EDITENGDLLAPI_H
+#define INCLUDED_EDITENGDLLAPI_H
+
+#include "sal/types.h"
+
+#if defined(EDITENG_DLLIMPLEMENTATION)
+#define EDITENG_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
+#else
+#define EDITENG_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
+#endif
+#define EDITENG_DLLPRIVATE SAL_DLLPRIVATE
+
+#endif
diff --git a/editeng/inc/editeng/editerr.hxx b/editeng/inc/editeng/editerr.hxx
new file mode 100644
index 000000000000..ab17123800f7
--- /dev/null
+++ b/editeng/inc/editeng/editerr.hxx
@@ -0,0 +1,39 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: svxids.hrc,v $
+ * $Revision: 1.10.132.2 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _EDIT_ERR_HRC
+#define _EDIT_ERR_HRC
+
+#include <tools/errcode.hxx>
+
+#define ERRCODE_SVX_LINGU_LANGUAGENOTEXISTS (2UL | ERRCODE_AREA_SVX)
+
+#define ERRCODE_SVX_GRAPHIC_WRONG_FILEFORMAT (8UL | ERRCODE_AREA_SVX | \
+ ERRCODE_CLASS_READ )
+#endif
diff --git a/editeng/inc/editeng/editids.hrc b/editeng/inc/editeng/editids.hrc
new file mode 100644
index 000000000000..49629a46c2f9
--- /dev/null
+++ b/editeng/inc/editeng/editids.hrc
@@ -0,0 +1,245 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: svxids.hrc,v $
+ * $Revision: 1.10.132.2 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _EDIT_SVXIDS_HRC
+#define _EDIT_SVXIDS_HRC
+
+// include ------------------------------------------------------------------
+
+#include <svl/solar.hrc>
+
+#define SID_ATTR_BRUSH ( SID_SVX_START + 1 )
+#define SID_ATTR_TABSTOP ( SID_SVX_START + 2 )
+#define SID_ATTR_TABSTOP_DEFAULTS ( SID_SVX_START + 3 )
+#define SID_ATTR_TABSTOP_POS ( SID_SVX_START + 4 )
+#define SID_ATTR_TABSTOP_OFFSET ( SID_SVX_START + 5 )
+#define SID_ATTR_CHAR ( SID_SVX_START + 6 )
+#define SID_ATTR_CHAR_FONT ( SID_SVX_START + 7 )
+#define SID_ATTR_CHAR_POSTURE ( SID_SVX_START + 8 )
+#define SID_ATTR_CHAR_WEIGHT ( SID_SVX_START + 9 )
+#define SID_ATTR_CHAR_SHADOWED ( SID_SVX_START + 10 )
+#define SID_ATTR_CHAR_WORDLINEMODE ( SID_SVX_START + 11 )
+#define SID_ATTR_CHAR_CONTOUR ( SID_SVX_START + 12 )
+#define SID_ATTR_CHAR_STRIKEOUT ( SID_SVX_START + 13 )
+#define SID_ATTR_CHAR_UNDERLINE ( SID_SVX_START + 14 )
+#define SID_ATTR_CHAR_FONTHEIGHT ( SID_SVX_START + 15 )
+#define SID_ATTR_CHAR_PROPSIZE ( SID_SVX_START + 16 )
+#define SID_ATTR_CHAR_COLOR ( SID_SVX_START + 17 )
+#define SID_ATTR_CHAR_KERNING ( SID_SVX_START + 18 )
+#define SID_ATTR_CHAR_CASEMAP ( SID_SVX_START + 19 )
+#define SID_ATTR_CHAR_LANGUAGE ( SID_SVX_START + 20 )
+#define SID_ATTR_CHAR_ESCAPEMENT ( SID_SVX_START + 21 )
+#define SID_ATTR_CHAR_FONTLIST ( SID_SVX_START + 22 )
+#define SID_ATTR_BORDER_OUTER ( SID_SVX_START + 24 )
+#define SID_ATTR_BORDER_SHADOW ( SID_SVX_START + 25 )
+#define SID_ATTR_PARA ( SID_SVX_START + 26 )
+#define SID_ATTR_PARA_ADJUST ( SID_SVX_START + 27 )
+#define SID_ATTR_PARA_ADJUST_LEFT ( SID_SVX_START + 28 )
+#define SID_ATTR_PARA_ADJUST_RIGHT ( SID_SVX_START + 29 )
+#define SID_ATTR_PARA_ADJUST_CENTER ( SID_SVX_START + 30 )
+#define SID_ATTR_PARA_ADJUST_BLOCK ( SID_SVX_START + 31 )
+#define SID_ATTR_PARA_ADJUST_BLOCKLINE ( SID_SVX_START + 32 )
+#define SID_ATTR_PARA_LINESPACE ( SID_SVX_START + 33 )
+#define SID_ATTR_PARA_LINESPACE_10 ( SID_SVX_START + 34 )
+#define SID_ATTR_PARA_LINESPACE_15 ( SID_SVX_START + 35 )
+#define SID_ATTR_PARA_LINESPACE_20 ( SID_SVX_START + 36 )
+#define SID_ATTR_PARA_PAGEBREAK ( SID_SVX_START + 37 )
+#define SID_ATTR_PARA_HYPHENZONE ( SID_SVX_START + 38 )
+#define SID_ATTR_PARA_SPLIT ( SID_SVX_START + 39 )
+#define SID_ATTR_PARA_ORPHANS ( SID_SVX_START + 40 )
+#define SID_ATTR_PARA_WIDOWS ( SID_SVX_START + 41 )
+#define SID_ATTR_PARA_ULSPACE ( SID_SVX_START + 42 )
+#define SID_ATTR_PARA_LRSPACE ( SID_SVX_START + 43 )
+#define SID_ATTR_LRSPACE ( SID_SVX_START + 48 )
+#define SID_ATTR_ULSPACE ( SID_SVX_START + 49 )
+#define SID_ATTR_CHAR_MAPTYPE ( SID_SVX_START + 64 )
+#define SID_ATTR_PARA_MODEL ( SID_SVX_START + 65 )
+#define SID_ATTR_PARA_KEEP ( SID_SVX_START + 66 )
+#define SID_ATTR_CHAR_AUTOKERN ( SID_SVX_START + 67 )
+#define SID_ATTR_PARA_BULLET ( SID_SVX_START + 250 )
+#define SID_ATTR_PARA_OUTLLEVEL ( SID_SVX_START + 300 )
+#define SID_FIELD ( SID_SVX_START + 363 )
+#define SID_ATTR_PARA_REGISTER ( SID_SVX_START + 413 )
+#define SID_ATTR_PARA_PAGENUM ( SID_SVX_START + 457 )
+#define SID_ATTR_PARA_NUMRULE ( SID_SVX_START + 587 )
+#define SID_ATTR_BRUSH_CHAR ( SID_SVX_START + 591 )
+#define SID_ATTR_NUMBERING_RULE ( SID_SVX_START + 855 )
+#define SID_ATTR_CHAR_CHARSETCOLOR ( SID_SVX_START + 877 )
+#define SID_ATTR_CHAR_CJK_FONT ( SID_SVX_START + 887 )
+#define SID_ATTR_CHAR_CJK_FONTHEIGHT ( SID_SVX_START + 888 )
+#define SID_ATTR_CHAR_CJK_LANGUAGE ( SID_SVX_START + 889 )
+#define SID_ATTR_CHAR_CJK_POSTURE ( SID_SVX_START + 890 )
+#define SID_ATTR_CHAR_CJK_WEIGHT ( SID_SVX_START + 891 )
+#define SID_ATTR_CHAR_CTL_FONT ( SID_SVX_START + 892 )
+#define SID_ATTR_CHAR_CTL_FONTHEIGHT ( SID_SVX_START + 893 )
+#define SID_ATTR_CHAR_CTL_LANGUAGE ( SID_SVX_START + 894 )
+#define SID_ATTR_CHAR_CTL_POSTURE ( SID_SVX_START + 895 )
+#define SID_ATTR_CHAR_CTL_WEIGHT ( SID_SVX_START + 896 )
+#define SID_ATTR_CHAR_TWO_LINES ( SID_SVX_START + 897 )
+#define SID_ATTR_CHAR_CJK_RUBY ( SID_SVX_START + 898 )
+#define SID_ATTR_CHAR_EMPHASISMARK ( SID_SVX_START + 899 )
+#define SID_ATTR_CHAR_SCRIPTTYPE ( SID_SVX_START + 900 )
+#define SID_ATTR_PARA_SCRIPTSPACE ( SID_SVX_START + 901 )
+#define SID_ATTR_PARA_HANGPUNCTUATION ( SID_SVX_START + 902 )
+#define SID_ATTR_PARA_FORBIDDEN_RULES ( SID_SVX_START + 903 )
+#define SID_ATTR_CHAR_VERTICAL ( SID_SVX_START + 905 )
+#define SID_ATTR_CHAR_ROTATED ( SID_SVX_START + 910 )
+#define SID_ATTR_CHAR_SCALEWIDTH ( SID_SVX_START + 911 )
+#define SID_ATTR_CHAR_WIDTH_FIT_TO_LINE ( SID_SVX_START + 919 )
+#define SID_ATTR_CHAR_RELIEF ( SID_SVX_START + 920 )
+#define SID_PARA_VERTALIGN ( SID_SVX_START + 925 )
+#define SID_ATTR_FRAMEDIRECTION ( SID_SVX_START + 944 )
+#define SID_ATTR_PARA_SNAPTOGRID ( SID_SVX_START + 945 )
+#define SID_ATTR_PARA_LRSPACE_VERTICAL ( SID_SVX_START + 947 )
+#define SID_ATTR_PARA_LEFT_TO_RIGHT ( SID_SVX_START + 950 )
+#define SID_ATTR_PARA_RIGHT_TO_LEFT ( SID_SVX_START + 951 )
+#define SID_ATTR_CHAR_HIDDEN ( SID_SVX_START + 989 )
+#define SID_ATTR_CHAR_LATIN_FONT ( SID_SVX_START + 994 )
+#define SID_ATTR_CHAR_LATIN_FONTHEIGHT ( SID_SVX_START + 995 )
+#define SID_ATTR_CHAR_LATIN_LANGUAGE ( SID_SVX_START + 996 )
+#define SID_ATTR_CHAR_LATIN_POSTURE ( SID_SVX_START + 997 )
+#define SID_ATTR_CHAR_LATIN_WEIGHT ( SID_SVX_START + 998 )
+#define SID_ATTR_PARA_OUTLINE_LEVEL ( SID_SVX_START +1092 )
+
+// this ID didn't exist prior to the svx split
+#define SID_ATTR_CHAR_OVERLINE ( SID_EDIT_START + 68 )
+
+/*
+// planned, but not doable: changing value of SIDs will break code that uses them for WhichRanges
+#define SID_PARA_VERTALIGN ( SID_EDIT_START )
+#define SID_ATTR_BORDER_OUTER ( SID_EDIT_START + 1 )
+#define SID_ATTR_BORDER_SHADOW ( SID_EDIT_START + 2 )
+#define SID_ATTR_BRUSH ( SID_EDIT_START + 3 )
+#define SID_ATTR_BRUSH_CHAR ( SID_EDIT_START + 4 )
+
+
+#define SID_FIELD ( SID_EDIT_START + 7 )
+#define SID_ATTR_FRAMEDIRECTION ( SID_EDIT_START + 8 )
+#define SID_ATTR_PARA ( SID_EDIT_START + 9 )
+#define SID_ATTR_PARA_ADJUST ( SID_EDIT_START + 10 )
+#define SID_ATTR_PARA_ADJUST_LEFT ( SID_EDIT_START + 11 )
+#define SID_ATTR_PARA_BULLET ( SID_EDIT_START + 12 )
+#define SID_ATTR_PARA_OUTLLEVEL ( SID_EDIT_START + 13 )
+#define SID_ATTR_PARA_REGISTER ( SID_EDIT_START + 14 )
+#define SID_ATTR_PARA_PAGENUM ( SID_EDIT_START + 15 )
+#define SID_ATTR_PARA_NUMRULE ( SID_EDIT_START + 16 )
+#define SID_ATTR_PARA_SCRIPTSPACE ( SID_EDIT_START + 17 )
+#define SID_ATTR_PARA_HANGPUNCTUATION ( SID_EDIT_START + 18 )
+#define SID_ATTR_PARA_FORBIDDEN_RULES ( SID_EDIT_START + 19 )
+#define SID_ATTR_PARA_SNAPTOGRID ( SID_EDIT_START + 20 )
+#define SID_ATTR_PARA_LRSPACE_VERTICAL ( SID_EDIT_START + 21 )
+#define SID_ATTR_PARA_LEFT_TO_RIGHT ( SID_EDIT_START + 22 )
+#define SID_ATTR_PARA_RIGHT_TO_LEFT ( SID_EDIT_START + 23 )
+#define SID_ATTR_PARA_OUTLINE_LEVEL ( SID_EDIT_START + 24 )
+#define SID_ATTR_PARA_ADJUST_RIGHT ( SID_EDIT_START + 25 )
+#define SID_ATTR_PARA_ADJUST_CENTER ( SID_EDIT_START + 26 )
+#define SID_ATTR_PARA_ADJUST_BLOCK ( SID_EDIT_START + 27 )
+#define SID_ATTR_PARA_ADJUST_BLOCKLINE ( SID_EDIT_START + 28 )
+#define SID_ATTR_PARA_LINESPACE ( SID_EDIT_START + 29 )
+#define SID_ATTR_PARA_LINESPACE_10 ( SID_EDIT_START + 30 )
+#define SID_ATTR_PARA_LINESPACE_15 ( SID_EDIT_START + 31 )
+#define SID_ATTR_PARA_LINESPACE_20 ( SID_EDIT_START + 32 )
+#define SID_ATTR_PARA_PAGEBREAK ( SID_EDIT_START + 33 )
+#define SID_ATTR_PARA_HYPHENZONE ( SID_EDIT_START + 34 )
+#define SID_ATTR_PARA_SPLIT ( SID_EDIT_START + 35 )
+#define SID_ATTR_PARA_ORPHANS ( SID_EDIT_START + 36 )
+#define SID_ATTR_PARA_WIDOWS ( SID_EDIT_START + 37 )
+#define SID_ATTR_PARA_ULSPACE ( SID_EDIT_START + 38 )
+#define SID_ATTR_PARA_LRSPACE ( SID_EDIT_START + 39 )
+#define SID_ATTR_PARA_MODEL ( SID_EDIT_START + 40 )
+#define SID_ATTR_PARA_KEEP ( SID_EDIT_START + 41 )
+#define SID_ATTR_NUMBERING_RULE ( SID_EDIT_START + 42 )
+#define SID_ATTR_LRSPACE ( SID_EDIT_START + 43 )
+#define SID_ATTR_ULSPACE ( SID_EDIT_START + 44 )
+#define SID_ATTR_TABSTOP ( SID_EDIT_START + 45 )
+#define SID_ATTR_TABSTOP_DEFAULTS ( SID_EDIT_START + 46 )
+#define SID_ATTR_TABSTOP_POS ( SID_EDIT_START + 47 )
+#define SID_ATTR_TABSTOP_OFFSET ( SID_EDIT_START + 48 )
+#define SID_ATTR_CHAR ( SID_EDIT_START + 49 )
+#define SID_ATTR_CHAR_FONT ( SID_EDIT_START + 50 )
+#define SID_ATTR_CHAR_POSTURE ( SID_EDIT_START + 51 )
+#define SID_ATTR_CHAR_WEIGHT ( SID_EDIT_START + 52 )
+#define SID_ATTR_CHAR_SHADOWED ( SID_EDIT_START + 53 )
+#define SID_ATTR_CHAR_WORDLINEMODE ( SID_EDIT_START + 54 )
+#define SID_ATTR_CHAR_CONTOUR ( SID_EDIT_START + 55 )
+#define SID_ATTR_CHAR_STRIKEOUT ( SID_EDIT_START + 56 )
+#define SID_ATTR_CHAR_UNDERLINE ( SID_EDIT_START + 57 )
+#define SID_ATTR_CHAR_FONTHEIGHT ( SID_EDIT_START + 58 )
+#define SID_ATTR_CHAR_PROPSIZE ( SID_EDIT_START + 59 )
+#define SID_ATTR_CHAR_COLOR ( SID_EDIT_START + 60 )
+#define SID_ATTR_CHAR_KERNING ( SID_EDIT_START + 61 )
+#define SID_ATTR_CHAR_CASEMAP ( SID_EDIT_START + 62 )
+#define SID_ATTR_CHAR_LANGUAGE ( SID_EDIT_START + 63 )
+#define SID_ATTR_CHAR_ESCAPEMENT ( SID_EDIT_START + 64 )
+#define SID_ATTR_CHAR_FONTLIST ( SID_EDIT_START + 65 )
+#define SID_ATTR_CHAR_MAPTYPE ( SID_EDIT_START + 66 )
+#define SID_ATTR_CHAR_AUTOKERN ( SID_EDIT_START + 67 )
+#define SID_ATTR_CHAR_OVERLINE ( SID_EDIT_START + 68 )
+#define SID_ATTR_CHAR_CHARSETCOLOR ( SID_EDIT_START + 69 )
+#define SID_ATTR_CHAR_CJK_FONT ( SID_EDIT_START + 70 )
+#define SID_ATTR_CHAR_CJK_FONTHEIGHT ( SID_EDIT_START + 71 )
+#define SID_ATTR_CHAR_CJK_LANGUAGE ( SID_EDIT_START + 72 )
+#define SID_ATTR_CHAR_CJK_POSTURE ( SID_EDIT_START + 73 )
+#define SID_ATTR_CHAR_CJK_WEIGHT ( SID_EDIT_START + 74 )
+#define SID_ATTR_CHAR_CTL_FONT ( SID_EDIT_START + 75 )
+#define SID_ATTR_CHAR_CTL_FONTHEIGHT ( SID_EDIT_START + 76 )
+#define SID_ATTR_CHAR_CTL_LANGUAGE ( SID_EDIT_START + 77 )
+#define SID_ATTR_CHAR_CTL_POSTURE ( SID_EDIT_START + 78 )
+#define SID_ATTR_CHAR_CTL_WEIGHT ( SID_EDIT_START + 79 )
+#define SID_ATTR_CHAR_TWO_LINES ( SID_EDIT_START + 80 )
+#define SID_ATTR_CHAR_CJK_RUBY ( SID_EDIT_START + 81 )
+#define SID_ATTR_CHAR_EMPHASISMARK ( SID_EDIT_START + 82 )
+#define SID_ATTR_CHAR_SCRIPTTYPE ( SID_EDIT_START + 83 )
+#define SID_ATTR_CHAR_VERTICAL ( SID_EDIT_START + 84 )
+#define SID_ATTR_CHAR_ROTATED ( SID_EDIT_START + 85 )
+#define SID_ATTR_CHAR_SCALEWIDTH ( SID_EDIT_START + 86 )
+#define SID_ATTR_CHAR_WIDTH_FIT_TO_LINE ( SID_EDIT_START + 87 )
+#define SID_ATTR_CHAR_RELIEF ( SID_EDIT_START + 88 )
+#define SID_ATTR_CHAR_HIDDEN ( SID_EDIT_START + 89 )
+#define SID_ATTR_CHAR_LATIN_FONT ( SID_EDIT_START + 90 )
+#define SID_ATTR_CHAR_LATIN_FONTHEIGHT ( SID_EDIT_START + 91 )
+#define SID_ATTR_CHAR_LATIN_LANGUAGE ( SID_EDIT_START + 92 )
+#define SID_ATTR_CHAR_LATIN_POSTURE ( SID_EDIT_START + 93 )
+#define SID_ATTR_CHAR_LATIN_WEIGHT ( SID_EDIT_START + 94 )
+*/
+
+#if 94 > (SID_EDIT_END-SID_EDIT_START)
+#error Resource-Ueberlauf in #line, #file
+#endif
+
+#define SID_TEXT_ALIGNLEFT SID_ATTR_PARA_ADJUST_LEFT
+#define SID_TEXT_ALIGNRIGHT SID_ATTR_PARA_ADJUST_RIGHT
+#define SID_TEXT_ALIGNCENTER SID_ATTR_PARA_ADJUST_CENTER
+#define SID_TEXT_ALIGNBLOCK SID_ATTR_PARA_ADJUST_BLOCK
+#define SID_DRAW_TEXT_VERTICAL SID_ATTR_CHAR_VERTICAL
+
+#endif
+
+// ******************************************************************* EOF
+
diff --git a/editeng/inc/editeng/editobj.hxx b/editeng/inc/editeng/editobj.hxx
new file mode 100644
index 000000000000..f9b8aaf72a6d
--- /dev/null
+++ b/editeng/inc/editeng/editobj.hxx
@@ -0,0 +1,129 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: editobj.hxx,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _EDITOBJ_HXX
+#define _EDITOBJ_HXX
+
+#include <tools/stream.hxx>
+#include <tools/debug.hxx>
+#include <rsc/rscsfx.hxx>
+#include <svl/itemset.hxx>
+#include <editeng/eeitem.hxx>
+#include "editeng/editengdllapi.h"
+
+DBG_NAMEEX( EE_EditTextObject )
+
+class SfxItemPool;
+class SfxStyleSheetPool;
+class SvxFieldItem;
+class EECharAttribArray;
+
+#define EDTOBJ_SETTINGS_ULITEMSUMMATION 0x00000001
+#define EDTOBJ_SETTINGS_ULITEMFIRSTPARA 0x00000002
+
+class EDITENG_DLLPUBLIC EditTextObject
+{
+private:
+ USHORT nWhich;
+ EDITENG_DLLPRIVATE EditTextObject& operator=( const EditTextObject& );
+
+protected:
+ EditTextObject( USHORT nWhich );
+ EditTextObject( const EditTextObject& r );
+
+ virtual void StoreData( SvStream& rOStream ) const;
+ virtual void CreateData( SvStream& rIStream );
+
+public:
+ virtual ~EditTextObject();
+
+ USHORT Which() const { return nWhich; }
+
+ virtual USHORT GetUserType() const; // Fuer OutlinerMode, der kann das aber nicht kompatibel speichern
+ virtual void SetUserType( USHORT n );
+
+ virtual ULONG GetObjectSettings() const;
+ virtual void SetObjectSettings( ULONG n );
+
+ virtual BOOL IsVertical() const;
+ virtual void SetVertical( BOOL bVertical );
+
+ virtual USHORT GetScriptType() const;
+
+ virtual USHORT GetVersion() const; // Solange der Outliner keine Recordlaenge speichert
+
+ virtual EditTextObject* Clone() const = 0;
+
+ BOOL Store( SvStream& rOStream ) const;
+ static EditTextObject* Create( SvStream& rIStream,
+ SfxItemPool* pGlobalTextObjectPool = 0 );
+ void Skip( SvStream& rIStream );
+
+ virtual USHORT GetParagraphCount() const;
+
+ virtual XubString GetText( USHORT nParagraph ) const;
+ virtual void Insert( const EditTextObject& rObj, USHORT nPara );
+ virtual void RemoveParagraph( USHORT nPara );
+ virtual EditTextObject* CreateTextObject( USHORT nPara, USHORT nParas = 1 ) const;
+
+ virtual BOOL HasPortionInfo() const;
+ virtual void ClearPortionInfo();
+
+ virtual BOOL HasOnlineSpellErrors() const;
+
+ virtual BOOL HasCharAttribs( USHORT nWhich = 0 ) const;
+ virtual void GetCharAttribs( USHORT nPara, EECharAttribArray& rLst ) const;
+
+ virtual BOOL RemoveCharAttribs( USHORT nWhich = 0 );
+ virtual BOOL RemoveParaAttribs( USHORT nWhich = 0 );
+
+ virtual void MergeParaAttribs( const SfxItemSet& rAttribs, USHORT nStart = EE_CHAR_START, USHORT nEnd = EE_CHAR_END );
+
+ virtual BOOL IsFieldObject() const;
+ virtual const SvxFieldItem* GetField() const;
+ virtual BOOL HasField( TypeId aType = NULL ) const;
+
+ virtual SfxItemSet GetParaAttribs( USHORT nPara ) const;
+ virtual void SetParaAttribs( USHORT nPara, const SfxItemSet& rAttribs );
+
+ virtual BOOL HasStyleSheet( const XubString& rName, SfxStyleFamily eFamily ) const;
+ virtual void GetStyleSheet( USHORT nPara, XubString& rName, SfxStyleFamily& eFamily ) const;
+ virtual void SetStyleSheet( USHORT nPara, const XubString& rName, const SfxStyleFamily& eFamily );
+ virtual BOOL ChangeStyleSheets( const XubString& rOldName, SfxStyleFamily eOldFamily,
+ const XubString& rNewName, SfxStyleFamily eNewFamily );
+ virtual void ChangeStyleSheetName( SfxStyleFamily eFamily, const XubString& rOldName, const XubString& rNewName );
+
+ bool operator==( const EditTextObject& rCompare ) const;
+
+ // #i102062#
+ bool isWrongListEqual(const EditTextObject& rCompare) const;
+};
+
+#endif // _EDITOBJ_HXX
diff --git a/editeng/inc/editeng/editrids.hrc b/editeng/inc/editeng/editrids.hrc
new file mode 100644
index 000000000000..dcef661d01b8
--- /dev/null
+++ b/editeng/inc/editeng/editrids.hrc
@@ -0,0 +1,432 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: svxids.hrc,v $
+ * $Revision: 1.10.132.2 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _EDIT_RIDS_HRC
+#define _EDIT_RIDS_HRC
+
+// include ------------------------------------------------------------------
+
+#include <svl/solar.hrc>
+
+// strings also used in cui
+#define RID_SVXSTR_PAPERBIN_SETTINGS (RID_EDIT_START)
+#define RID_SVXSTR_PAPERBIN (RID_EDIT_START + 1)
+
+#define RID_OUTLUNDO_EXPAND (RID_EDIT_START + 2)
+#define RID_OUTLUNDO_COLLAPSE (RID_EDIT_START + 3)
+#define RID_OUTLUNDO_ATTR (RID_EDIT_START + 4)
+#define RID_OUTLUNDO_INSERT (RID_EDIT_START + 5)
+#define RID_OUTLUNDO_DEPTH (RID_EDIT_START + 6)
+#define RID_OUTLUNDO_HEIGHT (RID_EDIT_START + 7)
+
+// strings for items
+
+#define RID_SVXITEMS_FRMDIR_BEGIN (RID_EDIT_START + 9)
+#define RID_SVXITEMS_FRMDIR_HORI_LEFT_TOP (RID_EDIT_START + 9)
+#define RID_SVXITEMS_FRMDIR_HORI_RIGHT_TOP (RID_EDIT_START + 10)
+#define RID_SVXITEMS_FRMDIR_VERT_TOP_RIGHT (RID_EDIT_START + 11)
+#define RID_SVXITEMS_FRMDIR_VERT_TOP_LEFT (RID_EDIT_START + 12)
+#define RID_SVXITEMS_FRMDIR_ENVIRONMENT (RID_EDIT_START + 13)
+#define RID_SVXITEMS_FRMDIR_END (RID_EDIT_START + 14)
+
+#define RID_SVXITEMS_TRUE (RID_EDIT_START + 15)
+#define RID_SVXITEMS_FALSE (RID_EDIT_START + 16)
+#define RID_SVXITEMS_BORDER_COMPLETE (RID_EDIT_START + 17)
+#define RID_SVXITEMS_BORDER_TOP (RID_EDIT_START + 18)
+#define RID_SVXITEMS_BORDER_BOTTOM (RID_EDIT_START + 19)
+#define RID_SVXITEMS_BORDER_LEFT (RID_EDIT_START + 20)
+#define RID_SVXITEMS_BORDER_RIGHT (RID_EDIT_START + 21)
+#define RID_SVXITEMS_BORDER_DISTANCE (RID_EDIT_START + 22)
+#define RID_SVXITEMS_BORDER_NONE (RID_EDIT_START + 23)
+
+#define RID_SVXITEMS_TRANSPARENT_TRUE (RID_EDIT_START + 24)
+#define RID_SVXITEMS_TRANSPARENT_FALSE (RID_EDIT_START + 25)
+#define RID_SVXITEMS_OPAQUE_TRUE (RID_EDIT_START + 26)
+#define RID_SVXITEMS_OPAQUE_FALSE (RID_EDIT_START + 27)
+
+#define RID_SVXITEMS_SHADOW_COMPLETE (RID_EDIT_START + 28)
+#define RID_SVXITEMS_GRAPHIC (RID_EDIT_START + 29)
+#define RID_SVXITEMS_LINES (RID_EDIT_START + 30)
+#define RID_SVXITEMS_ORPHANS_COMPLETE (RID_EDIT_START + 31)
+#define RID_SVXITEMS_WIDOWS_COMPLETE (RID_EDIT_START + 32)
+#define RID_SVXITEMS_PAGEMODEL_COMPLETE (RID_EDIT_START + 33)
+
+#define RID_SVXITEMS_SHADOWED_TRUE (RID_EDIT_START + 34)
+#define RID_SVXITEMS_SHADOWED_FALSE (RID_EDIT_START + 35)
+#define RID_SVXITEMS_AUTOKERN_TRUE (RID_EDIT_START + 36)
+#define RID_SVXITEMS_AUTOKERN_FALSE (RID_EDIT_START + 37)
+#define RID_SVXITEMS_WORDLINE_TRUE (RID_EDIT_START + 38)
+#define RID_SVXITEMS_WORDLINE_FALSE (RID_EDIT_START + 39)
+#define RID_SVXITEMS_CONTOUR_TRUE (RID_EDIT_START + 40)
+#define RID_SVXITEMS_CONTOUR_FALSE (RID_EDIT_START + 41)
+#define RID_SVXITEMS_NOLINEBREAK_TRUE (RID_EDIT_START + 42)
+#define RID_SVXITEMS_NOLINEBREAK_FALSE (RID_EDIT_START + 43)
+#define RID_SVXITEMS_NOHYPHEN_TRUE (RID_EDIT_START + 44)
+#define RID_SVXITEMS_NOHYPHEN_FALSE (RID_EDIT_START + 45)
+#define RID_SVXITEMS_FMTKEEP_TRUE (RID_EDIT_START + 46)
+#define RID_SVXITEMS_FMTKEEP_FALSE (RID_EDIT_START + 47)
+#define RID_SVXITEMS_FMTSPLIT_TRUE (RID_EDIT_START + 48)
+#define RID_SVXITEMS_FMTSPLIT_FALSE (RID_EDIT_START + 49)
+#define RID_SVXITEMS_PRINT_TRUE (RID_EDIT_START + 50)
+#define RID_SVXITEMS_PRINT_FALSE (RID_EDIT_START + 51)
+#define RID_SVXITEMS_PROT_POS_TRUE (RID_EDIT_START + 52)
+#define RID_SVXITEMS_PROT_POS_FALSE (RID_EDIT_START + 53)
+#define RID_SVXITEMS_PROT_SIZE_TRUE (RID_EDIT_START + 54)
+#define RID_SVXITEMS_PROT_SIZE_FALSE (RID_EDIT_START + 55)
+#define RID_SVXITEMS_PROT_CONTENT_TRUE (RID_EDIT_START + 56)
+#define RID_SVXITEMS_PROT_CONTENT_FALSE (RID_EDIT_START + 57)
+#define RID_SVXITEMS_ULSPACE_UPPER (RID_EDIT_START + 58)
+#define RID_SVXITEMS_ULSPACE_LOWER (RID_EDIT_START + 59)
+#define RID_SVXITEMS_LRSPACE_LEFT (RID_EDIT_START + 60)
+#define RID_SVXITEMS_LRSPACE_FLINE (RID_EDIT_START + 62)
+#define RID_SVXITEMS_LRSPACE_RIGHT (RID_EDIT_START + 63)
+#define RID_SVXITEMS_SIZE_WIDTH (RID_EDIT_START + 64)
+#define RID_SVXITEMS_SIZE_HEIGHT (RID_EDIT_START + 65)
+#define RID_SVXITEMS_PAGE_END_TRUE (RID_EDIT_START + 66)
+#define RID_SVXITEMS_PAGE_END_FALSE (RID_EDIT_START + 67)
+#define RID_SVXITEMS_HYPHEN_TRUE (RID_EDIT_START + 68)
+#define RID_SVXITEMS_HYPHEN_FALSE (RID_EDIT_START + 69)
+#define RID_SVXITEMS_HYPHEN_MINLEAD (RID_EDIT_START + 70)
+#define RID_SVXITEMS_HYPHEN_MINTRAIL (RID_EDIT_START + 71)
+#define RID_SVXITEMS_HYPHEN_MAX (RID_EDIT_START + 72)
+#define RID_SVXITEMS_HNGPNCT_OFF (RID_EDIT_START + 73)
+#define RID_SVXITEMS_HNGPNCT_ON (RID_EDIT_START + 74)
+#define RID_SVXITEMS_FORBIDDEN_RULE_OFF (RID_EDIT_START + 75)
+#define RID_SVXITEMS_FORBIDDEN_RULE_ON (RID_EDIT_START + 76)
+#define RID_SVXITEMS_SCRPTSPC_OFF (RID_EDIT_START + 77)
+#define RID_SVXITEMS_SCRPTSPC_ON (RID_EDIT_START + 78)
+#define RID_SVXITEMS_CHARSCALE_OFF (RID_EDIT_START + 79)
+#define RID_SVXITEMS_CHARSCALE (RID_EDIT_START + 80)
+#define RID_SVXITEMS_CHARROTATE_OFF (RID_EDIT_START + 81)
+#define RID_SVXITEMS_CHARROTATE (RID_EDIT_START + 82)
+#define RID_SVXITEMS_CHARROTATE_FITLINE (RID_EDIT_START + 83)
+
+#define RID_SVXITEMS_RELIEF_BEGIN (RID_EDIT_START + 85)
+#define RID_SVXITEMS_RELIEF_NONE (RID_EDIT_START + 85)
+#define RID_SVXITEMS_RELIEF_EMBOSSED (RID_EDIT_START + 86)
+#define RID_SVXITEMS_RELIEF_ENGRAVED (RID_EDIT_START + 87)
+#define RID_SVXITEMS_RELIEF_END (RID_EDIT_START + 88)
+
+// HM_ERR
+#define RID_SVXSTR_HMERR_THESAURUS (RID_EDIT_START + 89)
+
+// enum FontEmphasisMark ---------------------------------------------------
+#define RID_SVXITEMS_EMPHASIS_BEGIN_STYLE (RID_EDIT_START + 90)
+#define RID_SVXITEMS_EMPHASIS_NONE_STYLE (RID_EDIT_START + 90)
+#define RID_SVXITEMS_EMPHASIS_DOT_STYLE (RID_EDIT_START + 91)
+#define RID_SVXITEMS_EMPHASIS_CIRCLE_STYLE (RID_EDIT_START + 92)
+#define RID_SVXITEMS_EMPHASIS_DISC_STYLE (RID_EDIT_START + 93)
+#define RID_SVXITEMS_EMPHASIS_ACCENT_STYLE (RID_EDIT_START + 94)
+
+#define RID_SVXITEMS_EMPHASIS_ABOVE_POS (RID_EDIT_START + 95)
+#define RID_SVXITEMS_EMPHASIS_BELOW_POS (RID_EDIT_START + 96)
+
+// enum ESCAPEMENT -------------------------------------------------------
+#define RID_SVXITEMS_ESCAPEMENT_BEGIN (RID_EDIT_START + 97)
+#define RID_SVXITEMS_ESCAPEMENT_OFF (RID_EDIT_START + 97)
+#define RID_SVXITEMS_ESCAPEMENT_SUPER (RID_EDIT_START + 98)
+#define RID_SVXITEMS_ESCAPEMENT_SUB (RID_EDIT_START + 99)
+#define RID_SVXITEMS_ESCAPEMENT_AUTO (RID_EDIT_START + 100)
+
+// enum CASEMAP ----------------------------------------------------------
+#define RID_SVXITEMS_CASEMAP_BEGIN (RID_EDIT_START + 101)
+#define RID_SVXITEMS_CASEMAP_NONE (RID_EDIT_START + 101)
+#define RID_SVXITEMS_CASEMAP_VERSALIEN (RID_EDIT_START + 102)
+#define RID_SVXITEMS_CASEMAP_GEMEINE (RID_EDIT_START + 103)
+#define RID_SVXITEMS_CASEMAP_TITEL (RID_EDIT_START + 104)
+#define RID_SVXITEMS_CASEMAP_KAPITAELCHEN (RID_EDIT_START + 105)
+
+#define RID_SVXITEMS_KERNING_COMPLETE (RID_EDIT_START + 106)
+#define RID_SVXITEMS_KERNING_EXPANDED (RID_EDIT_START + 107)
+#define RID_SVXITEMS_KERNING_CONDENSED (RID_EDIT_START + 108)
+
+#define RID_SVXITEMS_BLINK_TRUE (RID_EDIT_START + 109)
+#define RID_SVXITEMS_BLINK_FALSE (RID_EDIT_START + 110)
+
+#define RID_SVXITEMS_TWOLINES_OFF (RID_EDIT_START + 111)
+#define RID_SVXITEMS_TWOLINES (RID_EDIT_START + 112)
+
+// enum FontStrikeout ----------------------------------------------------
+#define RID_SVXITEMS_STRIKEOUT_BEGIN (RID_EDIT_START + 113)
+#define RID_SVXITEMS_STRIKEOUT_NONE (RID_EDIT_START + 113)
+#define RID_SVXITEMS_STRIKEOUT_SINGLE (RID_EDIT_START + 114)
+#define RID_SVXITEMS_STRIKEOUT_DOUBLE (RID_EDIT_START + 115)
+#define RID_SVXITEMS_STRIKEOUT_DONTKNOW (RID_EDIT_START + 116)
+#define RID_SVXITEMS_STRIKEOUT_BOLD (RID_EDIT_START + 117)
+#define RID_SVXITEMS_STRIKEOUT_SLASH (RID_EDIT_START + 118)
+#define RID_SVXITEMS_STRIKEOUT_X (RID_EDIT_START + 119)
+
+// enum FontUnderline - used for overline --------------------------------
+#define RID_SVXITEMS_OL_BEGIN (RID_EDIT_START + 120)
+#define RID_SVXITEMS_OL_NONE (RID_EDIT_START + 120)
+#define RID_SVXITEMS_OL_SINGLE (RID_EDIT_START + 121)
+#define RID_SVXITEMS_OL_DOUBLE (RID_EDIT_START + 122)
+#define RID_SVXITEMS_OL_DOTTED (RID_EDIT_START + 123)
+#define RID_SVXITEMS_OL_DONTKNOW (RID_EDIT_START + 124)
+#define RID_SVXITEMS_OL_DASH (RID_EDIT_START + 125)
+#define RID_SVXITEMS_OL_LONGDASH (RID_EDIT_START + 126)
+#define RID_SVXITEMS_OL_DASHDOT (RID_EDIT_START + 127)
+#define RID_SVXITEMS_OL_DASHDOTDOT (RID_EDIT_START + 128)
+#define RID_SVXITEMS_OL_SMALLWAVE (RID_EDIT_START + 129)
+#define RID_SVXITEMS_OL_WAVE (RID_EDIT_START + 130)
+#define RID_SVXITEMS_OL_DOUBLEWAVE (RID_EDIT_START + 131)
+#define RID_SVXITEMS_OL_BOLD (RID_EDIT_START + 132)
+#define RID_SVXITEMS_OL_BOLDDOTTED (RID_EDIT_START + 133)
+#define RID_SVXITEMS_OL_BOLDDASH (RID_EDIT_START + 134)
+#define RID_SVXITEMS_OL_BOLDLONGDASH (RID_EDIT_START + 135)
+#define RID_SVXITEMS_OL_BOLDDASHDOT (RID_EDIT_START + 136)
+#define RID_SVXITEMS_OL_BOLDDASHDOTDOT (RID_EDIT_START + 137)
+#define RID_SVXITEMS_OL_BOLDWAVE (RID_EDIT_START + 138)
+
+// enum FontUnderline - used for underline -------------------------------
+#define RID_SVXITEMS_UL_BEGIN (RID_EDIT_START + 139)
+#define RID_SVXITEMS_UL_NONE (RID_EDIT_START + 139)
+#define RID_SVXITEMS_UL_SINGLE (RID_EDIT_START + 140)
+#define RID_SVXITEMS_UL_DOUBLE (RID_EDIT_START + 141)
+#define RID_SVXITEMS_UL_DOTTED (RID_EDIT_START + 142)
+#define RID_SVXITEMS_UL_DONTKNOW (RID_EDIT_START + 143)
+#define RID_SVXITEMS_UL_DASH (RID_EDIT_START + 144)
+#define RID_SVXITEMS_UL_LONGDASH (RID_EDIT_START + 145)
+#define RID_SVXITEMS_UL_DASHDOT (RID_EDIT_START + 146)
+#define RID_SVXITEMS_UL_DASHDOTDOT (RID_EDIT_START + 147)
+#define RID_SVXITEMS_UL_SMALLWAVE (RID_EDIT_START + 148)
+#define RID_SVXITEMS_UL_WAVE (RID_EDIT_START + 149)
+#define RID_SVXITEMS_UL_DOUBLEWAVE (RID_EDIT_START + 150)
+#define RID_SVXITEMS_UL_BOLD (RID_EDIT_START + 151)
+#define RID_SVXITEMS_UL_BOLDDOTTED (RID_EDIT_START + 152)
+#define RID_SVXITEMS_UL_BOLDDASH (RID_EDIT_START + 153)
+#define RID_SVXITEMS_UL_BOLDLONGDASH (RID_EDIT_START + 154)
+#define RID_SVXITEMS_UL_BOLDDASHDOT (RID_EDIT_START + 155)
+#define RID_SVXITEMS_UL_BOLDDASHDOTDOT (RID_EDIT_START + 156)
+#define RID_SVXITEMS_UL_BOLDWAVE (RID_EDIT_START + 157)
+
+// enum FontWeight -------------------------------------------------------
+#define RID_SVXITEMS_WEIGHT_BEGIN (RID_EDIT_START + 158)
+#define RID_SVXITEMS_WEIGHT_DONTKNOW (RID_EDIT_START + 158)
+#define RID_SVXITEMS_WEIGHT_THIN (RID_EDIT_START + 159)
+#define RID_SVXITEMS_WEIGHT_ULTRALIGHT (RID_EDIT_START + 160)
+#define RID_SVXITEMS_WEIGHT_LIGHT (RID_EDIT_START + 161)
+#define RID_SVXITEMS_WEIGHT_SEMILIGHT (RID_EDIT_START + 162)
+#define RID_SVXITEMS_WEIGHT_NORMAL (RID_EDIT_START + 163)
+#define RID_SVXITEMS_WEIGHT_MEDIUM (RID_EDIT_START + 164)
+#define RID_SVXITEMS_WEIGHT_SEMIBOLD (RID_EDIT_START + 165)
+#define RID_SVXITEMS_WEIGHT_BOLD (RID_EDIT_START + 166)
+#define RID_SVXITEMS_WEIGHT_ULTRABOLD (RID_EDIT_START + 167)
+#define RID_SVXITEMS_WEIGHT_BLACK (RID_EDIT_START + 168)
+
+// paper formats
+#define RID_SVXSTR_PAPER_A0 (RID_SVX_START + 169)
+#define RID_SVXSTR_PAPER_A1 (RID_SVX_START + 170)
+#define RID_SVXSTR_PAPER_A2 (RID_SVX_START + 171)
+#define RID_SVXSTR_PAPER_A3 (RID_SVX_START + 172)
+#define RID_SVXSTR_PAPER_A4 (RID_SVX_START + 173)
+#define RID_SVXSTR_PAPER_A5 (RID_SVX_START + 174)
+#define RID_SVXSTR_PAPER_B4_ISO (RID_SVX_START + 175)
+#define RID_SVXSTR_PAPER_B5_ISO (RID_SVX_START + 176)
+#define RID_SVXSTR_PAPER_LETTER (RID_SVX_START + 177)
+#define RID_SVXSTR_PAPER_LEGAL (RID_SVX_START + 178)
+#define RID_SVXSTR_PAPER_TABLOID (RID_SVX_START + 179)
+#define RID_SVXSTR_PAPER_USER (RID_SVX_START + 180)
+#define RID_SVXSTR_PAPER_B6_ISO (RID_SVX_START + 181)
+#define RID_SVXSTR_PAPER_C4 (RID_SVX_START + 182)
+#define RID_SVXSTR_PAPER_C5 (RID_SVX_START + 183)
+#define RID_SVXSTR_PAPER_C6 (RID_SVX_START + 184)
+#define RID_SVXSTR_PAPER_C65 (RID_SVX_START + 185)
+#define RID_SVXSTR_PAPER_DL (RID_SVX_START + 186)
+#define RID_SVXSTR_PAPER_DIA (RID_SVX_START + 187)
+#define RID_SVXSTR_PAPER_SCREEN (RID_SVX_START + 188)
+#define RID_SVXSTR_PAPER_C (RID_SVX_START + 189)
+#define RID_SVXSTR_PAPER_D (RID_SVX_START + 190)
+#define RID_SVXSTR_PAPER_E (RID_SVX_START + 191)
+#define RID_SVXSTR_PAPER_EXECUTIVE (RID_SVX_START + 192)
+#define RID_SVXSTR_PAPER_LEGAL2 (RID_SVX_START + 193)
+#define RID_SVXSTR_PAPER_MONARCH (RID_SVX_START + 194)
+#define RID_SVXSTR_PAPER_COM675 (RID_SVX_START + 195)
+#define RID_SVXSTR_PAPER_COM9 (RID_SVX_START + 196)
+#define RID_SVXSTR_PAPER_COM10 (RID_SVX_START + 197)
+#define RID_SVXSTR_PAPER_COM11 (RID_SVX_START + 198)
+#define RID_SVXSTR_PAPER_COM12 (RID_SVX_START + 199)
+#define RID_SVXSTR_PAPER_KAI16 (RID_SVX_START + 200)
+#define RID_SVXSTR_PAPER_KAI32 (RID_SVX_START + 201)
+#define RID_SVXSTR_PAPER_KAI32BIG (RID_SVX_START + 202)
+#define RID_SVXSTR_PAPER_B4_JIS (RID_SVX_START + 203)
+#define RID_SVXSTR_PAPER_B5_JIS (RID_SVX_START + 204)
+#define RID_SVXSTR_PAPER_B6_JIS (RID_SVX_START + 205)
+
+// enum FontItalic -------------------------------------------------------
+#define RID_SVXITEMS_ITALIC_BEGIN (RID_EDIT_START + 206)
+#define RID_SVXITEMS_ITALIC_NONE (RID_EDIT_START + 206)
+#define RID_SVXITEMS_ITALIC_OBLIQUE (RID_EDIT_START + 207)
+#define RID_SVXITEMS_ITALIC_NORMAL (RID_EDIT_START + 208)
+
+// enum SvxAdjust -----------------------------------------------------------
+#define RID_SVXITEMS_ADJUST_BEGIN (RID_EDIT_START + 209)
+#define RID_SVXITEMS_ADJUST_LEFT (RID_EDIT_START + 209)
+#define RID_SVXITEMS_ADJUST_RIGHT (RID_EDIT_START + 210)
+#define RID_SVXITEMS_ADJUST_BLOCK (RID_EDIT_START + 211)
+#define RID_SVXITEMS_ADJUST_CENTER (RID_EDIT_START + 212)
+#define RID_SVXITEMS_ADJUST_BLOCKLINE (RID_EDIT_START + 213)
+
+#define RID_SVXITEMS_TAB_DECIMAL_CHAR (RID_EDIT_START + 214)
+#define RID_SVXITEMS_TAB_FILL_CHAR (RID_EDIT_START + 215)
+
+#define RID_SVXITEMS_TAB_ADJUST_BEGIN (RID_EDIT_START + 217)
+#define RID_SVXITEMS_TAB_ADJUST_LEFT (RID_EDIT_START + 217)
+#define RID_SVXITEMS_TAB_ADJUST_RIGHT (RID_EDIT_START + 218)
+#define RID_SVXITEMS_TAB_ADJUST_DECIMAL (RID_EDIT_START + 219)
+#define RID_SVXITEMS_TAB_ADJUST_CENTER (RID_EDIT_START + 220)
+#define RID_SVXITEMS_TAB_ADJUST_DEFAULT (RID_EDIT_START + 221)
+
+// enum SvxBreak ------------------------------------------------------------
+#define RID_SVXITEMS_BREAK_BEGIN (RID_EDIT_START + 222)
+#define RID_SVXITEMS_BREAK_NONE (RID_EDIT_START + 222)
+#define RID_SVXITEMS_BREAK_COLUMN_BEFORE (RID_EDIT_START + 223)
+#define RID_SVXITEMS_BREAK_COLUMN_AFTER (RID_EDIT_START + 224)
+#define RID_SVXITEMS_BREAK_COLUMN_BOTH (RID_EDIT_START + 225)
+#define RID_SVXITEMS_BREAK_PAGE_BEFORE (RID_EDIT_START + 226)
+#define RID_SVXITEMS_BREAK_PAGE_AFTER (RID_EDIT_START + 227)
+#define RID_SVXITEMS_BREAK_PAGE_BOTH (RID_EDIT_START + 228)
+
+// enum SvxShadowLocation ---------------------------------------------------
+#define RID_SVXITEMS_SHADOW_BEGIN (RID_EDIT_START + 229)
+#define RID_SVXITEMS_SHADOW_NONE (RID_EDIT_START + 229)
+#define RID_SVXITEMS_SHADOW_TOPLEFT (RID_EDIT_START + 230)
+#define RID_SVXITEMS_SHADOW_TOPRIGHT (RID_EDIT_START + 231)
+#define RID_SVXITEMS_SHADOW_BOTTOMLEFT (RID_EDIT_START + 232)
+#define RID_SVXITEMS_SHADOW_BOTTOMRIGHT (RID_EDIT_START + 233)
+
+// Umrandungslinien
+#define RID_SINGLE_LINE0 (RID_EDIT_START + 234)
+#define RID_SINGLE_LINE1 (RID_EDIT_START + 235)
+#define RID_SINGLE_LINE2 (RID_EDIT_START + 236)
+#define RID_SINGLE_LINE3 (RID_EDIT_START + 237)
+#define RID_SINGLE_LINE4 (RID_EDIT_START + 238)
+#define RID_DOUBLE_LINE0 (RID_EDIT_START + 239)
+#define RID_DOUBLE_LINE1 (RID_EDIT_START + 240)
+#define RID_DOUBLE_LINE2 (RID_EDIT_START + 241)
+#define RID_DOUBLE_LINE3 (RID_EDIT_START + 242)
+#define RID_DOUBLE_LINE4 (RID_EDIT_START + 243)
+#define RID_DOUBLE_LINE5 (RID_EDIT_START + 244)
+#define RID_DOUBLE_LINE6 (RID_EDIT_START + 245)
+#define RID_DOUBLE_LINE7 (RID_EDIT_START + 246)
+#define RID_DOUBLE_LINE8 (RID_EDIT_START + 247)
+#define RID_DOUBLE_LINE9 (RID_EDIT_START + 248)
+#define RID_DOUBLE_LINE10 (RID_EDIT_START + 249)
+
+// Metric-Texte
+#define RID_SVXITEMS_METRIC_MM (RID_EDIT_START + 250)
+#define RID_SVXITEMS_METRIC_CM (RID_EDIT_START + 251)
+#define RID_SVXITEMS_METRIC_INCH (RID_EDIT_START + 252)
+#define RID_SVXITEMS_METRIC_POINT (RID_EDIT_START + 253)
+#define RID_SVXITEMS_METRIC_TWIP (RID_EDIT_START + 254)
+#define RID_SVXITEMS_METRIC_PIXEL (RID_EDIT_START + 255)
+
+// enum ColorName -----------------------------------------------------------
+#define RID_SVXITEMS_COLOR_BEGIN (RID_EDIT_START + 256)
+#define RID_SVXITEMS_COLOR (RID_EDIT_START + 256)
+#define RID_SVXITEMS_COLOR_BLACK (RID_EDIT_START + 257)
+#define RID_SVXITEMS_COLOR_BLUE (RID_EDIT_START + 258)
+#define RID_SVXITEMS_COLOR_GREEN (RID_EDIT_START + 259)
+#define RID_SVXITEMS_COLOR_CYAN (RID_EDIT_START + 260)
+#define RID_SVXITEMS_COLOR_RED (RID_EDIT_START + 261)
+#define RID_SVXITEMS_COLOR_MAGENTA (RID_EDIT_START + 262)
+#define RID_SVXITEMS_COLOR_BROWN (RID_EDIT_START + 263)
+#define RID_SVXITEMS_COLOR_GRAY (RID_EDIT_START + 264)
+#define RID_SVXITEMS_COLOR_LIGHTGRAY (RID_EDIT_START + 265)
+#define RID_SVXITEMS_COLOR_LIGHTBLUE (RID_EDIT_START + 266)
+#define RID_SVXITEMS_COLOR_LIGHTGREEN (RID_EDIT_START + 267)
+#define RID_SVXITEMS_COLOR_LIGHTCYAN (RID_EDIT_START + 268)
+#define RID_SVXITEMS_COLOR_LIGHTRED (RID_EDIT_START + 269)
+#define RID_SVXITEMS_COLOR_LIGHTMAGENTA (RID_EDIT_START + 270)
+#define RID_SVXITEMS_COLOR_YELLOW (RID_EDIT_START + 271)
+#define RID_SVXITEMS_COLOR_WHITE (RID_EDIT_START + 272)
+#define RID_SVXITEMS_COLOR_MENUBAR (RID_EDIT_START + 273)
+#define RID_SVXITEMS_COLOR_MENUBARTEXT (RID_EDIT_START + 274)
+#define RID_SVXITEMS_COLOR_POPUPMENU (RID_EDIT_START + 275)
+#define RID_SVXITEMS_COLOR_POPUPMENUTEXT (RID_EDIT_START + 276)
+#define RID_SVXITEMS_COLOR_WINDOWTEXT (RID_EDIT_START + 277)
+#define RID_SVXITEMS_COLOR_WINDOWWORKSPACE (RID_EDIT_START + 278)
+#define RID_SVXITEMS_COLOR_HIGHLIGHT (RID_EDIT_START + 279)
+#define RID_SVXITEMS_COLOR_HIGHLIGHTTEXT (RID_EDIT_START + 280)
+#define RID_SVXITEMS_COLOR_3DTEXT (RID_EDIT_START + 281)
+#define RID_SVXITEMS_COLOR_3DFACE (RID_EDIT_START + 282)
+#define RID_SVXITEMS_COLOR_3DLIGHT (RID_EDIT_START + 283)
+#define RID_SVXITEMS_COLOR_3DSHADOW (RID_EDIT_START + 284)
+#define RID_SVXITEMS_COLOR_SCROLLBAR (RID_EDIT_START + 285)
+#define RID_SVXITEMS_COLOR_FIELD (RID_EDIT_START + 286)
+#define RID_SVXITEMS_COLOR_FIELDTEXT (RID_EDIT_START + 287)
+
+
+#define RID_SVXITEMS_PARASNAPTOGRID_ON (RID_EDIT_START + 288)
+#define RID_SVXITEMS_PARASNAPTOGRID_OFF (RID_EDIT_START + 289)
+
+#define RID_SVXITEMS_PARAVERTALIGN_AUTO (RID_EDIT_START + 290)
+#define RID_SVXITEMS_PARAVERTALIGN_BASELINE (RID_EDIT_START + 291)
+#define RID_SVXITEMS_PARAVERTALIGN_TOP (RID_EDIT_START + 292)
+#define RID_SVXITEMS_PARAVERTALIGN_CENTER (RID_EDIT_START + 293)
+#define RID_SVXITEMS_PARAVERTALIGN_BOTTOM (RID_EDIT_START + 294)
+
+#define RID_SVXITEMS_CHARHIDDEN_FALSE (RID_EDIT_START + 295)
+#define RID_SVXITEMS_CHARHIDDEN_TRUE (RID_EDIT_START + 296)
+
+// strings for error messsages in dictionary updates
+#define RID_SVXSTR_DIC_ERR_UNKNOWN (RID_EDIT_START + 297)
+#define RID_SVXSTR_DIC_ERR_FULL (RID_EDIT_START + 298)
+#define RID_SVXSTR_DIC_ERR_READONLY (RID_EDIT_START + 299)
+
+// ResIds fuer HM-QueryBoxen und Error-Strings
+#define RID_SVXQB_BW_CONTINUE (RID_EDIT_START + 300)
+#define RID_SVXQB_CONTINUE (RID_EDIT_START + 301)
+
+// EditEngine
+#define RID_EDITUNDO_DEL (RID_EDIT_START + 302)
+#define RID_EDITUNDO_MOVE (RID_EDIT_START + 303)
+#define RID_EDITUNDO_INSERT (RID_EDIT_START + 304)
+#define RID_EDITUNDO_REPLACE (RID_EDIT_START + 305)
+#define RID_EDITUNDO_SETATTRIBS (RID_EDIT_START + 306)
+#define RID_EDITUNDO_SETSTYLE (RID_EDIT_START + 307)
+#define RID_EDITUNDO_RESETATTRIBS (RID_EDIT_START + 308)
+#define RID_EDITUNDO_INDENT (RID_EDIT_START + 309)
+#define RID_EDITUNDO_TRANSLITERATE (RID_EDIT_START + 310)
+#define RID_MENU_SPELL (RID_EDIT_START + 311)
+#define RID_STR_PARAGRAPH (RID_EDIT_START + 312)
+#define RID_STR_WORD (RID_EDIT_START + 313)
+#define RID_SVXSTR_A11Y_IMAGEBULLET_DESCRIPTION (RID_EDIT_START + 314)
+#define RID_SVXSTR_A11Y_IMAGEBULLET_NAME (RID_EDIT_START + 315)
+
+#if 315 > (RID_EDIT_END-RID_EDIT_START)
+#error Resource-Ueberlauf in #line, #file
+#endif
+
+
+
+#endif
+
+// ******************************************************************* EOF
+
diff --git a/editeng/inc/editeng/editstat.hxx b/editeng/inc/editeng/editstat.hxx
new file mode 100644
index 000000000000..71f65dbe6657
--- /dev/null
+++ b/editeng/inc/editeng/editstat.hxx
@@ -0,0 +1,153 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: editstat.hxx,v $
+ * $Revision: 1.7 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _EDITSTAT_HXX
+#define _EDITSTAT_HXX
+
+#include <tools/string.hxx>
+#include <i18npool/lang.h>
+
+#define EE_CNTRL_USECHARATTRIBS 0x00000001 // Verwendung harter ZeichenAttr.
+#define EE_CNTRL_USEPARAATTRIBS 0x00000002 // Verwendung von AbsatzAttr.
+#define EE_CNTRL_CRSRLEFTPARA 0x00000004 // Cursor ist in einen anderen Absatz gewandert
+#define EE_CNTRL_DOIDLEFORMAT 0x00000008 // Idle-Formatierung
+#define EE_CNTRL_PASTESPECIAL 0x00000010 // Allow PasteSpecial
+#define EE_CNTRL_AUTOINDENTING 0x00000020 // Automatisches einruecken
+#define EE_CNTRL_UNDOATTRIBS 0x00000040 // Undo fuer Attribute....
+#define EE_CNTRL_ONECHARPERLINE 0x00000080 // Ein Zeichen pro Zeile
+#define EE_CNTRL_NOCOLORS 0x00000100 // Engine: Keine Farben
+#define EE_CNTRL_OUTLINER 0x00000200 // Sonderbehandlung Outliner/Gliederungsmodus
+#define EE_CNTRL_OUTLINER2 0x00000400 // Sonderbehandlung Outliner/Seite
+#define EE_CNTRL_ALLOWBIGOBJS 0x00000800 // PortionInfo in Textobjekten
+#define EE_CNTRL_ONLINESPELLING 0x00001000 // Waehrend des editieren Spelling
+#define EE_CNTRL_STRETCHING 0x00002000 // Stretch-Modus
+#define EE_CNTRL_MARKFIELDS 0x00004000 // Felder farblich hinterlegen
+#define EE_CNTRL_URLSFXEXECUTE 0x00008000 // !!!OLD!!!: SFX-URL-Execute.
+#define EE_CNTRL_RESTOREFONT 0x00010000 // Font im OutDev restaurieren
+#define EE_CNTRL_RTFSTYLESHEETS 0x00020000 // Stylesheets bei Import verwenden
+//#define EE_CNTRL_NOREDLINES 0x00040000 // Keine RedLines bei OnlineSpellError /* removed #i91949 */
+#define EE_CNTRL_AUTOCORRECT 0x00080000 // AutoKorrektur
+#define EE_CNTRL_AUTOCOMPLETE 0x00100000 // AutoComplete
+#define EE_CNTRL_AUTOPAGESIZEX 0x00200000 // Papierbreite an Text anpassen
+#define EE_CNTRL_AUTOPAGESIZEY 0x00400000 // Papierhoehe an Text anpassen
+#define EE_CNTRL_AUTOPAGESIZE (EE_CNTRL_AUTOPAGESIZEX|EE_CNTRL_AUTOPAGESIZEY)
+#define EE_CNTRL_TABINDENTING 0x00800000 // Einruecken mit Tab
+#define EE_CNTRL_FORMAT100 0x01000000 // Immer nach 100% formatieren
+#define EE_CNTRL_ULSPACESUMMATION 0x02000000 // MS Compat: SA und SB aufsummieren, nicht maximalwert
+#define EE_CNTRL_ULSPACEFIRSTPARA 0x04000000 // MS Compat: SB auch beim ersten Absatz auswerten
+
+#define EV_CNTRL_AUTOSCROLL 0x00000001 // Autom. Scrollen horiz.
+#define EV_CNTRL_BIGSCROLL 0x00000002 // Weiter Scrollen, als nur zum Cursor
+#define EV_CNTRL_ENABLEPASTE 0x00000004 // Paste erlauben
+#define EV_CNTRL_SINGLELINEPASTE 0x00000008 // View: Paste in Eingabezeile...
+#define EV_CNTRL_OVERWRITE 0x00000010 // Ueberschreibmodus
+#define EV_CNTRL_INVONEMORE 0x00000020 // Ein Pixel mehr invalidieren
+#define EV_CNTRL_AUTOSIZEX 0x00000040 // Automatisch an Textbreite anpassen
+#define EV_CNTRL_AUTOSIZEY 0x00000080 // Automatisch an Texthoehe anpassen
+#define EV_CNTRL_AUTOSIZE (EV_CNTRL_AUTOSIZEX|EV_CNTRL_AUTOSIZEY)
+
+#define EE_STAT_HSCROLL 0x00000001
+#define EE_STAT_VSCROLL 0x00000002
+#define EE_STAT_CURSOROUT 0x00000004
+#define EE_STAT_CRSRMOVEFAIL 0x00000008
+#define EE_STAT_CRSRLEFTPARA 0x00000010
+#define EE_STAT_TEXTWIDTHCHANGED 0x00000020
+#define EE_STAT_TEXTHEIGHTCHANGED 0x00000040
+#define EE_STAT_WRONGWORDCHANGED 0x00000080
+// #define EE_STAT_MODIFIED 0x00000100
+
+// Nur fuer Update:
+#define EE_CNTRL_AUTOCENTER EE_CNTRL_AUTOPAGESIZE
+#define EE_STAT_GROWY EE_STAT_TEXTHEIGHTCHANGED
+
+/*
+ EE_STAT_CRSRLEFTPARA zur Zeit bei Cursorbewegungen und Return.
+*/
+
+inline void SetFlags( ULONG& rBits, const ULONG nMask, FASTBOOL bOn )
+{
+ if ( bOn )
+ rBits |= nMask;
+ else
+ rBits &= ~nMask;
+}
+
+class EditStatus
+{
+protected:
+ ULONG nStatusBits;
+ ULONG nControlBits;
+ USHORT nPrevPara; // fuer EE_STAT_CRSRLEFTPARA
+
+public:
+ EditStatus() { nStatusBits = 0; nControlBits = 0; nPrevPara = 0xFFFF; }
+
+ void Clear() { nStatusBits = 0; }
+ void SetControlBits( ULONG nMask, FASTBOOL bOn )
+ { SetFlags( nControlBits, nMask, bOn ); }
+
+ ULONG GetStatusWord() const { return nStatusBits; }
+ ULONG& GetStatusWord() { return nStatusBits; }
+
+ ULONG GetControlWord() const { return nControlBits; }
+ ULONG& GetControlWord() { return nControlBits; }
+
+ USHORT GetPrevParagraph() const { return nPrevPara; }
+ USHORT& GetPrevParagraph() { return nPrevPara; }
+};
+
+#define SPELLCMD_IGNOREWORD 0x0001
+#define SPELLCMD_STARTSPELLDLG 0x0002
+#define SPELLCMD_ADDTODICTIONARY 0x0003
+#define SPELLCMD_WORDLANGUAGE 0x0004
+#define SPELLCMD_PARALANGUAGE 0x0005
+
+struct SpellCallbackInfo
+{
+ USHORT nCommand;
+ String aWord;
+ LanguageType eLanguage;
+
+ SpellCallbackInfo( USHORT nCMD, const String& rWord )
+ : aWord( rWord )
+ {
+ nCommand = nCMD;
+ eLanguage = LANGUAGE_DONTKNOW;
+ }
+
+ SpellCallbackInfo( USHORT nCMD, LanguageType eLang )
+ {
+ nCommand = nCMD;
+ eLanguage = eLang;
+ }
+};
+
+#endif // _EDITSTAT_HXX
+
diff --git a/editeng/inc/editeng/editund2.hxx b/editeng/inc/editeng/editund2.hxx
new file mode 100644
index 000000000000..7bb2f926df2d
--- /dev/null
+++ b/editeng/inc/editeng/editund2.hxx
@@ -0,0 +1,79 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: editund2.hxx,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _EDITUND2_HXX
+#define _EDITUND2_HXX
+
+#include "editeng/editengdllapi.h"
+#include <svl/undo.hxx>
+
+class ImpEditEngine;
+
+class EDITENG_DLLPUBLIC EditUndoManager : public SfxUndoManager
+{
+ using SfxUndoManager::Undo;
+ using SfxUndoManager::Redo;
+
+private:
+ ImpEditEngine* pImpEE;
+public:
+ EditUndoManager( ImpEditEngine* pImpEE );
+
+ virtual BOOL Undo( USHORT nCount=1 );
+ virtual BOOL Redo( USHORT nCount=1 );
+};
+
+// -----------------------------------------------------------------------
+// EditUndo
+// ------------------------------------------------------------------------
+class EDITENG_DLLPUBLIC EditUndo : public SfxUndoAction
+{
+private:
+ USHORT nId;
+ ImpEditEngine* pImpEE;
+
+public:
+ TYPEINFO();
+ EditUndo( USHORT nI, ImpEditEngine* pImpEE );
+ virtual ~EditUndo();
+
+ ImpEditEngine* GetImpEditEngine() const { return pImpEE; }
+
+ virtual void Undo() = 0;
+ virtual void Redo() = 0;
+
+ virtual BOOL CanRepeat(SfxRepeatTarget&) const;
+ virtual String GetComment() const;
+ virtual USHORT GetId() const;
+};
+
+#endif // _EDITUND2_HXX
+
+
diff --git a/editeng/inc/editeng/editview.hxx b/editeng/inc/editeng/editview.hxx
new file mode 100644
index 000000000000..7a357f8df00a
--- /dev/null
+++ b/editeng/inc/editeng/editview.hxx
@@ -0,0 +1,251 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: editview.hxx,v $
+ * $Revision: 1.4.198.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+// MyEDITVIEW, wegen exportiertem EditView
+#ifndef _MyEDITVIEW_HXX
+#define _MyEDITVIEW_HXX
+
+#include <rsc/rscsfx.hxx>
+#include <i18npool/lang.h>
+#include <tools/color.hxx>
+#include <tools/gen.hxx>
+
+class EditEngine;
+class ImpEditEngine;
+class ImpEditView;
+class SvxSearchItem;
+class SvxFieldItem;
+class Window;
+class Pointer;
+class Cursor;
+class KeyEvent;
+class MouseEvent;
+class DropEvent;
+class CommandEvent;
+class Rectangle;
+class Link;
+class Pair;
+class Point;
+class Range;
+class SvStream;
+class SvKeyValueIterator;
+class SfxStyleSheet;
+class Font;
+class FontList;
+
+#ifndef _EDITDATA_HXX
+#include <editeng/editdata.hxx>
+#endif
+#include <com/sun/star/uno/Reference.h>
+#include "editeng/editengdllapi.h"
+
+namespace com {
+namespace sun {
+namespace star {
+namespace datatransfer {
+ class XTransferable;
+}}}}
+
+class EDITENG_DLLPUBLIC EditView
+{
+ friend class EditEngine;
+ friend class ImpEditEngine;
+ friend class EditSelFunctionSet;
+
+public: // brauche ich fuer Undo
+ ImpEditView* GetImpEditView() const { return pImpEditView; }
+ ImpEditEngine* GetImpEditEngine() const;
+
+private:
+ ImpEditView* pImpEditView;
+
+ EDITENG_DLLPRIVATE EditView( const EditView& );
+ EDITENG_DLLPRIVATE EditView& operator=( const EditView& );
+
+public:
+ EditView( EditEngine* pEng, Window* pWindow );
+ virtual ~EditView();
+
+ void SetEditEngine( EditEngine* pEditEngine );
+ EditEngine* GetEditEngine() const;
+
+ void SetWindow( Window* pWin );
+ Window* GetWindow() const;
+
+ void Paint( const Rectangle& rRect );
+ void Invalidate();
+ Pair Scroll( long nHorzScroll, long nVertScroll, BYTE nRangeCheck = RGCHK_NEG );
+
+ void ShowCursor( BOOL bGotoCursor = TRUE, BOOL bForceVisCursor = TRUE );
+ void HideCursor();
+
+ EESelectionMode GetSelectionMode() const;
+ void SetSelectionMode( EESelectionMode eMode );
+
+ void SetReadOnly( BOOL bReadOnly );
+ BOOL IsReadOnly() const;
+
+ BOOL HasSelection() const;
+ ESelection GetSelection() const;
+ void SetSelection( const ESelection& rNewSel );
+ BOOL SelectCurrentWord();
+
+ void IndentBlock();
+ void UnindentBlock();
+
+ BOOL IsInsertMode() const;
+ void SetInsertMode( BOOL bInsert );
+
+ void ReplaceSelected( const String& rStr );
+ String GetSelected();
+ void DeleteSelected();
+
+ USHORT GetSelectedScriptType() const;
+
+ // Position der VisArea im Ausgabefenster.
+ // Eine Groessenaenderung betrifft auch die VisArea
+ void SetOutputArea( const Rectangle& rRec );
+ const Rectangle& GetOutputArea() const;
+
+ // Dokumentposition.
+ // Eine Groessenaenderung betrifft auch die VisArea
+ void SetVisArea( const Rectangle& rRec );
+ const Rectangle& GetVisArea() const;
+
+ void SetPointer( const Pointer& rPointer );
+ const Pointer& GetPointer() const;
+
+ void SetCursor( const Cursor& rCursor );
+ Cursor* GetCursor() const;
+
+ void InsertText( const String& rNew, BOOL bSelect = FALSE );
+
+ BOOL PostKeyEvent( const KeyEvent& rKeyEvent );
+
+ BOOL MouseButtonUp( const MouseEvent& rMouseEvent );
+ BOOL MouseButtonDown( const MouseEvent& rMouseEvent );
+ BOOL MouseMove( const MouseEvent& rMouseEvent );
+ void Command( const CommandEvent& rCEvt );
+
+ BOOL Drop( const DropEvent& rEvt );
+ BOOL QueryDrop( DropEvent& rEvt );
+ ESelection GetDropPos();
+
+ void Cut();
+ void Copy();
+ void Paste();
+ void PasteSpecial();
+
+ void EnablePaste( BOOL bEnable );
+ BOOL IsPasteEnabled() const;
+
+ void Undo();
+ void Redo();
+
+ // speziell fuer Olli
+ USHORT GetParagraph( const Point& rMousePosPixel );
+ Point GetWindowPosTopLeft( USHORT nParagraph );
+ void MoveParagraphs( Range aParagraphs, USHORT nNewPos );
+ void MoveParagraphs( long nDiff );
+
+ const SfxItemSet& GetEmptyItemSet();
+ SfxItemSet GetAttribs();
+ void SetAttribs( const SfxItemSet& rSet );
+ void SetParaAttribs( const SfxItemSet& rSet, USHORT nPara );
+ void RemoveAttribs( BOOL bRemoveParaAttribs = FALSE, USHORT nWhich = 0 );
+ void RemoveCharAttribs( USHORT nPara, USHORT nWhich = 0 );
+ void RemoveAttribsKeepLanguages( BOOL bRemoveParaAttribs = FALSE );
+
+ ULONG Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFormat, BOOL bSelect = FALSE, SvKeyValueIterator* pHTTPHeaderAttrs = NULL );
+ ULONG Write( SvStream& rOutput, EETextFormat eFormat );
+
+ void SetBackgroundColor( const Color& rColor );
+ Color GetBackgroundColor() const;
+
+ void SetControlWord( sal_uInt32 nWord );
+ sal_uInt32 GetControlWord() const;
+
+ EditTextObject* CreateTextObject();
+ void InsertText( const EditTextObject& rTextObject );
+ void InsertText( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > xDataObj, const String& rBaseURL, BOOL bUseSpecial );
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > GetTransferable();
+
+ // An EditView, damit bei TRUE flackerfreies Update:
+ void SetEditEngineUpdateMode( BOOL bUpdate );
+ void ForceUpdate();
+
+ SfxStyleSheet* GetStyleSheet() const;
+ void SetStyleSheet( SfxStyleSheet* pStyle );
+
+ void SetAnchorMode( EVAnchorMode eMode );
+ EVAnchorMode GetAnchorMode() const;
+
+ BOOL MatchGroup();
+
+ void CompleteAutoCorrect();
+
+ EESpellState StartSpeller( BOOL bMultipleDoc = FALSE );
+ EESpellState StartThesaurus();
+ USHORT StartSearchAndReplace( const SvxSearchItem& rSearchItem );
+
+ // for text conversion
+ void StartTextConversion( LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont, INT32 nOptions, BOOL bIsInteractive, BOOL bMultipleDoc );
+ sal_Bool HasConvertibleTextPortion( LanguageType nLang );
+
+ void TransliterateText( sal_Int32 nTransliterationMode );
+
+ BOOL IsCursorAtWrongSpelledWord( BOOL bMarkIfWrong = FALSE );
+ BOOL IsWrongSpelledWordAtPos( const Point& rPosPixel, BOOL bMarkIfWrong = FALSE );
+ void SpellIgnoreWord();
+ void ExecuteSpellPopup( const Point& rPosPixel, Link* pCallBack = 0 );
+
+ void InsertField( const SvxFieldItem& rFld );
+ const SvxFieldItem* GetFieldUnderMousePointer() const;
+ const SvxFieldItem* GetFieldUnderMousePointer( USHORT& nPara, xub_StrLen& nPos ) const;
+ const SvxFieldItem* GetField( const Point& rPos, USHORT* pnPara = NULL, xub_StrLen* pnPos = NULL ) const;
+
+ const SvxFieldItem* GetFieldAtSelection() const;
+
+ String GetWordUnderMousePointer() const;
+ String GetWordUnderMousePointer( Rectangle& rWordRect ) const;
+
+ void SetInvalidateMore( USHORT nPixel );
+ USHORT GetInvalidateMore() const;
+
+ // grows or shrinks the font height for the current selection
+ void ChangeFontSize( bool bGrow, const FontList* pList );
+
+ static bool ChangeFontSize( bool bGrow, SfxItemSet& rSet, const FontList* pFontList );
+
+ String GetSurroundingText() const;
+ Selection GetSurroundingTextSelection() const;
+};
+
+#endif // _MyEDITVIEW_HXX
diff --git a/editeng/inc/editeng/edtdlg.hxx b/editeng/inc/editeng/edtdlg.hxx
new file mode 100644
index 000000000000..82f1f07269c4
--- /dev/null
+++ b/editeng/inc/editeng/edtdlg.hxx
@@ -0,0 +1,114 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: abstdlg.hxx,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _EDT_ABSTDLG_HXX
+#define _EDT_ABSTDLG_HXX
+
+// include ---------------------------------------------------------------
+
+#include <tools/solar.h>
+#include <tools/string.hxx>
+#include <editeng/editengdllapi.h>
+#include <i18npool/lang.h>
+#include <com/sun/star/uno/Reference.hxx>
+#include <vcl/abstdlg.hxx>
+#include <editeng/hangulhanja.hxx>
+
+namespace com { namespace sun { namespace star { namespace linguistic2
+{
+ class XThesaurus;
+ class XHyphenator;
+} } } }
+
+class Window;
+class ResId;
+class Link;
+class SvxSpellWrapper;
+
+class AbstractThesaurusDialog : public VclAbstractDialog
+{
+public:
+ virtual String GetWord() = 0;
+ virtual sal_uInt16 GetLanguage() const = 0;
+ virtual Window* GetWindow() = 0;
+};
+
+class AbstractHyphenWordDialog : public VclAbstractDialog
+{
+public:
+ virtual void SelLeft() = 0;
+ virtual void SelRight() = 0;
+ virtual Window* GetWindow() = 0;
+};
+
+class AbstractHangulHanjaConversionDialog : public VclAbstractTerminatedDialog
+{
+ public:
+ virtual void EnableRubySupport( sal_Bool _bVal ) = 0;
+ virtual void SetByCharacter( sal_Bool _bByCharacter ) = 0;
+ virtual void SetConversionDirectionState( sal_Bool _bTryBothDirections, editeng::HangulHanjaConversion::ConversionDirection _ePrimaryConversionDirection ) = 0;
+ virtual void SetConversionFormat( editeng::HangulHanjaConversion::ConversionFormat _eType ) = 0;
+ virtual void SetOptionsChangedHdl( const Link& _rHdl ) = 0;
+ virtual void SetIgnoreHdl( const Link& _rHdl ) = 0;
+ virtual void SetIgnoreAllHdl( const Link& _rHdl ) = 0;
+ virtual void SetChangeHdl( const Link& _rHdl ) = 0;
+ virtual void SetChangeAllHdl( const Link& _rHdl ) = 0;
+ virtual void SetClickByCharacterHdl( const Link& _rHdl ) = 0;
+ virtual void SetConversionFormatChangedHdl( const Link& _rHdl ) = 0;
+ virtual void SetFindHdl( const Link& _rHdl ) = 0;
+ virtual sal_Bool GetUseBothDirections( ) const= 0;
+ virtual editeng::HangulHanjaConversion::ConversionDirection GetDirection( editeng::HangulHanjaConversion::ConversionDirection _eDefaultDirection ) const = 0;
+ virtual void SetCurrentString(
+ const String& _rNewString,
+ const ::com::sun::star::uno::Sequence< ::rtl::OUString >& _rSuggestions,
+ bool _bOriginatesFromDocument = true )=0;
+ virtual String GetCurrentString( ) const =0;
+ virtual editeng::HangulHanjaConversion::ConversionFormat GetConversionFormat( ) const =0;
+ virtual void FocusSuggestion( )= 0;
+ virtual String GetCurrentSuggestion( ) const =0;
+};
+
+class EDITENG_DLLPUBLIC EditAbstractDialogFactory : virtual public VclAbstractDialogFactory
+{
+public:
+ virtual ~EditAbstractDialogFactory(); // needed for export of vtable
+ static EditAbstractDialogFactory* Create();
+ virtual AbstractThesaurusDialog* CreateThesaurusDialog( Window*, ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XThesaurus > xThesaurus,
+ const String &rWord, sal_Int16 nLanguage ) = 0;
+
+ virtual AbstractHyphenWordDialog* CreateHyphenWordDialog( Window*,
+ const String &rWord, LanguageType nLang,
+ ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XHyphenator > &xHyphen,
+ SvxSpellWrapper* pWrapper ) = 0;
+ virtual AbstractHangulHanjaConversionDialog * CreateHangulHanjaConversionDialog( Window* _pParent,
+ editeng::HangulHanjaConversion::ConversionDirection _ePrimaryDirection ) = 0;
+};
+
+#endif
+
diff --git a/editeng/inc/editeng/eedata.hxx b/editeng/inc/editeng/eedata.hxx
new file mode 100644
index 000000000000..33e542746d56
--- /dev/null
+++ b/editeng/inc/editeng/eedata.hxx
@@ -0,0 +1,78 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: eedata.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _EEDATA_HXX
+#define _EEDATA_HXX
+
+//////////////////////////////////////////////////////////////////////////////
+// extended data definitions for EditEngine portion stripping (StripPortions()
+// support). These may be mapped to some primitive definitions from Drawinglayer
+// later.
+#include <vector>
+
+namespace EEngineData
+{
+ // spell checking wrong vector containing the redlining data
+ class WrongSpellClass
+ {
+ public:
+ sal_uInt32 nStart;
+ sal_uInt32 nEnd;
+
+ WrongSpellClass(sal_uInt32 nS, sal_uInt32 nE) : nStart(nS), nEnd(nE) {}
+ };
+
+ typedef std::vector< WrongSpellClass > WrongSpellVector;
+
+ // text marking vector containing the EOC, EOW and EOS TEXT definitions
+ enum TextMarkingType
+ {
+ EndOfCaracter = 0,
+ EndOfWord = 1,
+ EndOfSentence = 2
+ };
+
+ class TextMarkingClass
+ {
+ public:
+ TextMarkingType eType;
+ sal_uInt32 nIndex;
+
+ TextMarkingClass(TextMarkingType eT, sal_uInt32 nI) : eType(eT), nIndex(nI) {}
+ };
+
+ typedef std::vector< TextMarkingClass > TextMarkingVector;
+
+} // end of namespace EditEngine
+
+#endif // _EEDATA_HXX
+
+//////////////////////////////////////////////////////////////////////////////
+// eof
diff --git a/editeng/inc/editeng/eeitem.hxx b/editeng/inc/editeng/eeitem.hxx
new file mode 100644
index 000000000000..53202b795170
--- /dev/null
+++ b/editeng/inc/editeng/eeitem.hxx
@@ -0,0 +1,102 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: eeitem.hxx,v $
+ * $Revision: 1.3.212.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _EEITEM_HXX
+#define _EEITEM_HXX
+
+#define EE_ITEMS_START 3989
+
+// Absatzattribute:
+#define EE_PARA_START (EE_ITEMS_START+0)
+#define EE_PARA_WRITINGDIR (EE_ITEMS_START+0)
+#define EE_PARA_XMLATTRIBS (EE_ITEMS_START+1)
+#define EE_PARA_HANGINGPUNCTUATION (EE_ITEMS_START+2)
+#define EE_PARA_FORBIDDENRULES (EE_ITEMS_START+3)
+#define EE_PARA_ASIANCJKSPACING (EE_ITEMS_START+4)
+#define EE_PARA_NUMBULLET (EE_ITEMS_START+5)
+#define EE_PARA_HYPHENATE (EE_ITEMS_START+6)
+#define EE_PARA_BULLETSTATE (EE_ITEMS_START+7)
+#define EE_PARA_OUTLLRSPACE (EE_ITEMS_START+8)
+#define EE_PARA_OUTLLEVEL (EE_ITEMS_START+9)
+#define EE_PARA_BULLET (EE_ITEMS_START+10)
+#define EE_PARA_LRSPACE (EE_ITEMS_START+11)
+#define EE_PARA_ULSPACE (EE_ITEMS_START+12)
+#define EE_PARA_SBL (EE_ITEMS_START+13)
+#define EE_PARA_JUST (EE_ITEMS_START+14)
+#define EE_PARA_TABS (EE_ITEMS_START+15)
+#define EE_PARA_END (EE_ITEMS_START+15)
+
+// Zeichenattribute:
+#define EE_CHAR_START (EE_ITEMS_START+16)
+#define EE_CHAR_COLOR (EE_ITEMS_START+16)
+#define EE_CHAR_FONTINFO (EE_ITEMS_START+17)
+#define EE_CHAR_FONTHEIGHT (EE_ITEMS_START+18)
+#define EE_CHAR_FONTWIDTH (EE_ITEMS_START+19)
+#define EE_CHAR_WEIGHT (EE_ITEMS_START+20)
+#define EE_CHAR_UNDERLINE (EE_ITEMS_START+21)
+#define EE_CHAR_STRIKEOUT (EE_ITEMS_START+22)
+#define EE_CHAR_ITALIC (EE_ITEMS_START+23)
+#define EE_CHAR_OUTLINE (EE_ITEMS_START+24)
+#define EE_CHAR_SHADOW (EE_ITEMS_START+25)
+#define EE_CHAR_ESCAPEMENT (EE_ITEMS_START+26)
+#define EE_CHAR_PAIRKERNING (EE_ITEMS_START+27)
+#define EE_CHAR_KERNING (EE_ITEMS_START+28)
+#define EE_CHAR_WLM (EE_ITEMS_START+29)
+#define EE_CHAR_LANGUAGE (EE_ITEMS_START+30)
+#define EE_CHAR_LANGUAGE_CJK (EE_ITEMS_START+31)
+#define EE_CHAR_LANGUAGE_CTL (EE_ITEMS_START+32)
+#define EE_CHAR_FONTINFO_CJK (EE_ITEMS_START+33)
+#define EE_CHAR_FONTINFO_CTL (EE_ITEMS_START+34)
+#define EE_CHAR_FONTHEIGHT_CJK (EE_ITEMS_START+35)
+#define EE_CHAR_FONTHEIGHT_CTL (EE_ITEMS_START+36)
+#define EE_CHAR_WEIGHT_CJK (EE_ITEMS_START+37)
+#define EE_CHAR_WEIGHT_CTL (EE_ITEMS_START+38)
+#define EE_CHAR_ITALIC_CJK (EE_ITEMS_START+39)
+#define EE_CHAR_ITALIC_CTL (EE_ITEMS_START+40)
+#define EE_CHAR_EMPHASISMARK (EE_ITEMS_START+41)
+#define EE_CHAR_RELIEF (EE_ITEMS_START+42)
+#define EE_CHAR_RUBI_DUMMY (EE_ITEMS_START+43)
+#define EE_CHAR_XMLATTRIBS (EE_ITEMS_START+44)
+#define EE_CHAR_OVERLINE (EE_ITEMS_START+45)
+#define EE_CHAR_END (EE_ITEMS_START+45)
+
+
+#define EE_FEATURE_START (EE_ITEMS_START+46)
+#define EE_FEATURE_TAB (EE_ITEMS_START+46)
+#define EE_FEATURE_LINEBR (EE_ITEMS_START+47)
+#define EE_FEATURE_NOTCONV (EE_ITEMS_START+48)
+#define EE_FEATURE_FIELD (EE_ITEMS_START+49)
+#define EE_FEATURE_END (EE_ITEMS_START+49)
+
+#define EE_ITEMS_END (EE_ITEMS_START+49)
+
+#define EDITITEMCOUNT ( EE_ITEMS_END - EE_ITEMS_START + 1 )
+
+#endif // _EEITEM_HXX
diff --git a/editeng/inc/editeng/eeitemid.hxx b/editeng/inc/editeng/eeitemid.hxx
new file mode 100644
index 000000000000..da4570126a96
--- /dev/null
+++ b/editeng/inc/editeng/eeitemid.hxx
@@ -0,0 +1,139 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: eeitemid.hxx,v $
+ * $Revision: 1.3.212.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _EEITEMID_HXX
+#define _EEITEMID_HXX
+
+#include <editeng/eeitem.hxx>
+
+#ifdef ITEMID_FONT
+#undef ITEMID_FONT
+#endif
+#ifdef ITEMID_FONTHEIGHT
+#undef ITEMID_FONTHEIGHT
+#endif
+#ifdef ITEMID_COLOR
+#undef ITEMID_COLOR
+#endif
+#ifdef ITEMID_WEIGHT
+#undef ITEMID_WEIGHT
+#endif
+#ifdef ITEMID_POSTURE
+#undef ITEMID_POSTURE
+#endif
+#ifdef ITEMID_SHADOWED
+#undef ITEMID_SHADOWED
+#endif
+#ifdef ITEMID_CONTOUR
+#undef ITEMID_CONTOUR
+#endif
+#ifdef ITEMID_CROSSEDOUT
+#undef ITEMID_CROSSEDOUT
+#endif
+#ifdef ITEMID_UNDERLINE
+#undef ITEMID_UNDERLINE
+#endif
+#ifdef ITEMID_OVERLINE
+#undef ITEMID_OVERLINE
+#endif
+#ifdef ITEMID_LANGUAGE
+#undef ITEMID_LANGUAGE
+#endif
+#ifdef ITEMID_ADJUST
+#undef ITEMID_ADJUST
+#endif
+#ifdef ITEMID_WORDLINEMODE
+#undef ITEMID_WORDLINEMODE
+#endif
+#ifdef ITEMID_CHARSETCOLOR
+#undef ITEMID_CHARSETCOLOR
+#endif
+#ifdef ITEMID_SEARCH
+#undef ITEMID_SEARCH
+#endif
+#ifdef ITEMID_BRUSH
+#undef ITEMID_BRUSH
+#endif
+
+// Zeichenattribute....
+#define ITEMID_FONT EE_CHAR_FONTINFO
+#define ITEMID_POSTURE EE_CHAR_ITALIC
+#define ITEMID_WEIGHT EE_CHAR_WEIGHT
+#define ITEMID_SHADOWED EE_CHAR_SHADOW
+#define ITEMID_CONTOUR EE_CHAR_OUTLINE
+#define ITEMID_CROSSEDOUT EE_CHAR_STRIKEOUT
+#define ITEMID_UNDERLINE EE_CHAR_UNDERLINE
+#define ITEMID_OVERLINE EE_CHAR_OVERLINE
+#define ITEMID_FONTHEIGHT EE_CHAR_FONTHEIGHT
+#define ITEMID_CHARSCALE_W EE_CHAR_FONTWIDTH
+#define ITEMID_COLOR EE_CHAR_COLOR
+#define ITEMID_WORDLINEMODE EE_CHAR_WLM
+#define ITEMID_PROPSIZE 0
+#define ITEMID_CHARSETCOLOR 0 // EE_FEATURE_NOTCONV
+#define ITEMID_CASEMAP 0
+#define ITEMID_LANGUAGE 0
+#define ITEMID_ESCAPEMENT EE_CHAR_ESCAPEMENT
+#define ITEMID_NOLINEBREAK 0
+#define ITEMID_NOHYPHENHERE 0
+#define ITEMID_AUTOKERN EE_CHAR_PAIRKERNING
+#define ITEMID_KERNING EE_CHAR_KERNING
+#define ITEMID_EMPHASISMARK EE_CHAR_EMPHASISMARK
+#define ITEMID_CHARRELIEF EE_CHAR_RELIEF
+
+// Absatzattribute
+#define ITEMID_SCRIPTSPACE EE_PARA_ASIANCJKSPACING
+#define ITEMID_ADJUST EE_PARA_JUST
+#define ITEMID_LINESPACING EE_PARA_SBL
+#define ITEMID_WIDOWS 0
+#define ITEMID_ORPHANS 0
+#define ITEMID_HYPHENZONE 0
+
+#define ITEMID_TABSTOP EE_PARA_TABS
+
+#define ITEMID_PAPERBIN 0
+#define ITEMID_LRSPACE EE_PARA_LRSPACE
+#define ITEMID_ULSPACE EE_PARA_ULSPACE
+#define ITEMID_FRAMEDIR EE_PARA_WRITINGDIR
+#define ITEMID_PRINT 0
+#define ITEMID_OPAQUE 0
+#define ITEMID_PROTECT 0
+#define ITEMID_BACKGROUND 0
+#define ITEMID_SHADOW 0
+#define ITEMID_MACRO 0
+#define ITEMID_BOX 0
+#define ITEMID_BOXINFO 0
+#define ITEMID_BRUSH 0
+
+#define ITEMID_FIELD EE_FEATURE_FIELD
+
+#define ITEMID_SEARCH 0
+
+#endif //_EEITEMID_HXX
+
diff --git a/editeng/inc/editeng/eerdll.hxx b/editeng/inc/editeng/eerdll.hxx
new file mode 100644
index 000000000000..ac0d1d8b9e04
--- /dev/null
+++ b/editeng/inc/editeng/eerdll.hxx
@@ -0,0 +1,64 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: eerdll.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _EERDLL_HXX
+#define _EERDLL_HXX
+
+class GlobalEditData;
+
+#include <tools/resid.hxx>
+#include <tools/shl.hxx>
+#include <editeng/editengdllapi.h>
+
+class EDITENG_DLLPUBLIC EditResId: public ResId
+{
+public:
+ EditResId( USHORT nId );
+};
+
+class EditDLL
+{
+ ResMgr* pResMgr;
+ GlobalEditData* pGlobalData;
+
+public:
+ EditDLL();
+ ~EditDLL();
+
+ ResMgr* GetResMgr() const { return pResMgr; }
+ GlobalEditData* GetGlobalData() const { return pGlobalData; }
+ static EditDLL* Get();
+};
+
+#define EE_DLL() EditDLL::Get()
+
+#define EE_RESSTR(x) String( EditResId(x) )
+
+#endif //_EERDLL_HXX
diff --git a/editeng/inc/editeng/emphitem.hxx b/editeng/inc/editeng/emphitem.hxx
new file mode 100644
index 000000000000..5a2bf2335105
--- /dev/null
+++ b/editeng/inc/editeng/emphitem.hxx
@@ -0,0 +1,91 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: emphitem.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_EMPHITEM_HXX
+#define _SVX_EMPHITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#include <vcl/vclenum.hxx>
+#include <svl/intitem.hxx>
+#include <editeng/editengdllapi.h>
+
+class SvXMLUnitConverter;
+namespace rtl
+{
+ class OUString;
+}
+
+// class SvxEmphasisMarkItem ----------------------------------------------
+
+/* [Beschreibung]
+
+ Dieses Item beschreibt die Font-Betonung.
+*/
+
+class EDITENG_DLLPUBLIC SvxEmphasisMarkItem : public SfxUInt16Item
+{
+public:
+ TYPEINFO();
+
+ SvxEmphasisMarkItem( const FontEmphasisMark eVal /*= EMPHASISMARK_NONE*/,
+ const USHORT nId );
+
+ // "pure virtual Methoden" vom SfxPoolItem + SfxEnumItem
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper * = 0 ) const;
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
+ virtual USHORT GetVersion( USHORT nFileVersion ) const;
+
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal,
+ BYTE nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal,
+ BYTE nMemberId = 0 );
+
+ inline SvxEmphasisMarkItem& operator=(const SvxEmphasisMarkItem& rItem )
+ {
+ SetValue( rItem.GetValue() );
+ return *this;
+ }
+
+ // enum cast
+ FontEmphasisMark GetEmphasisMark() const
+ { return (FontEmphasisMark)GetValue(); }
+ void SetEmphasisMark( FontEmphasisMark eNew )
+ { SetValue( (USHORT)eNew ); }
+};
+
+#endif // #ifndef _SVX_EMPHITEM_HXX
+
diff --git a/editeng/inc/editeng/escpitem.hxx b/editeng/inc/editeng/escpitem.hxx
new file mode 100644
index 000000000000..ac6b7ca090ae
--- /dev/null
+++ b/editeng/inc/editeng/escpitem.hxx
@@ -0,0 +1,117 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: escpitem.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_ESCPITEM_HXX
+#define _SVX_ESCPITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#include <svl/eitem.hxx>
+#include <editeng/svxenum.hxx>
+#include <editeng/editengdllapi.h>
+
+class SvXMLUnitConverter;
+namespace rtl
+{
+ class OUString;
+}
+
+// class SvxEscapementItem -----------------------------------------------
+
+#define DFLT_ESC_SUPER 33 // 1/3
+#define DFLT_ESC_SUB -33 // auch 1/3 fr"uher 8/100
+#define DFLT_ESC_PROP 58
+#define DFLT_ESC_AUTO_SUPER 101
+#define DFLT_ESC_AUTO_SUB -101
+
+/* [Beschreibung]
+
+ Dieses Item beschreibt die Schrift-Position.
+*/
+
+class EDITENG_DLLPUBLIC SvxEscapementItem : public SfxEnumItemInterface
+{
+ short nEsc;
+ BYTE nProp;
+public:
+ TYPEINFO();
+
+ SvxEscapementItem( const USHORT nId );
+ SvxEscapementItem( const SvxEscapement eEscape,
+ const USHORT nId );
+ SvxEscapementItem( const short nEsc, const BYTE nProp,
+ const USHORT nId );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const IntlWrapper * = 0 ) const;
+
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
+
+ inline void SetEscapement( const SvxEscapement eNew )
+ {
+ if( SVX_ESCAPEMENT_OFF == eNew )
+ nEsc = 0, nProp = 100;
+ else
+ if( SVX_ESCAPEMENT_SUPERSCRIPT == eNew )
+ nEsc = DFLT_ESC_SUPER, nProp = DFLT_ESC_PROP;
+ else
+ nEsc = DFLT_ESC_SUB, nProp = DFLT_ESC_PROP;
+ }
+ inline SvxEscapement GetEscapement() const { return static_cast< SvxEscapement >( GetEnumValue() ); }
+
+ inline short &GetEsc() { return nEsc; }
+ inline short GetEsc() const { return nEsc; }
+
+ inline BYTE &GetProp() { return nProp; }
+ inline BYTE GetProp() const { return nProp; }
+
+ inline SvxEscapementItem& operator=(const SvxEscapementItem& rEsc)
+ {
+ nEsc = rEsc.GetEsc();
+ nProp = rEsc.GetProp();
+ return *this;
+ }
+
+ virtual USHORT GetValueCount() const;
+ virtual String GetValueTextByPos( USHORT nPos ) const;
+ virtual USHORT GetEnumValue() const;
+ virtual void SetEnumValue( USHORT nNewVal );
+};
+
+#endif
+
diff --git a/editeng/inc/editeng/fhgtitem.hxx b/editeng/inc/editeng/fhgtitem.hxx
new file mode 100644
index 000000000000..9a91e9f7431e
--- /dev/null
+++ b/editeng/inc/editeng/fhgtitem.hxx
@@ -0,0 +1,119 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: fhgtitem.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_FHGTITEM_HXX
+#define _SVX_FHGTITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#include <svl/poolitem.hxx>
+#include <editeng/editengdllapi.h>
+
+class SvXMLUnitConverter;
+namespace rtl
+{
+ class OUString;
+}
+
+// class SvxFontHeightItem -----------------------------------------------
+
+// Achtung: Twips-Werte
+
+/* [Beschreibung]
+
+ Dieses Item beschreibt die Font-Hoehe.
+*/
+
+#define FONTHEIGHT_16_VERSION ((USHORT)0x0001)
+#define FONTHEIGHT_UNIT_VERSION ((USHORT)0x0002)
+
+class EDITENG_DLLPUBLIC SvxFontHeightItem : public SfxPoolItem
+{
+ UINT32 nHeight;
+ USHORT nProp; // default 100%
+ SfxMapUnit ePropUnit; // Percent, Twip, ...
+public:
+ TYPEINFO();
+
+ SvxFontHeightItem( const ULONG nSz /*= 240*/, const USHORT nPropHeight /*= 100*/,
+ const USHORT nId );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const IntlWrapper * = 0 ) const;
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
+ virtual USHORT GetVersion( USHORT nItemVersion) const;
+ virtual int ScaleMetrics( long nMult, long nDiv );
+ virtual int HasMetrics() const;
+
+ inline SvxFontHeightItem& operator=(const SvxFontHeightItem& rSize)
+ {
+ SetHeightValue( rSize.GetHeight() );
+ SetProp( rSize.GetProp(), ePropUnit );
+ return *this;
+ }
+
+ void SetHeight( UINT32 nNewHeight, const USHORT nNewProp = 100,
+ SfxMapUnit eUnit = SFX_MAPUNIT_RELATIVE );
+
+ void SetHeight( UINT32 nNewHeight, USHORT nNewProp,
+ SfxMapUnit eUnit, SfxMapUnit eCoreUnit );
+
+ UINT32 GetHeight() const { return nHeight; }
+
+ void SetHeightValue( UINT32 nNewHeight )
+ {
+ DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" );
+ nHeight = nNewHeight;
+ }
+
+ void SetProp( const USHORT nNewProp,
+ SfxMapUnit eUnit = SFX_MAPUNIT_RELATIVE )
+ {
+ DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" );
+ nProp = nNewProp;
+ ePropUnit = eUnit;
+ }
+
+ USHORT GetProp() const { return nProp; }
+
+ SfxMapUnit GetPropUnit() const { return ePropUnit; } // Percent, Twip, ...
+};
+
+#endif
+
diff --git a/editeng/inc/editeng/flditem.hxx b/editeng/inc/editeng/flditem.hxx
new file mode 100644
index 000000000000..a154f37dd8c1
--- /dev/null
+++ b/editeng/inc/editeng/flditem.hxx
@@ -0,0 +1,430 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: flditem.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_FLDITEM_HXX
+#define _SVX_FLDITEM_HXX
+
+#include <i18npool/lang.h>
+#include <tools/time.hxx>
+#include <tools/date.hxx>
+#include <svl/poolitem.hxx>
+#include <tools/pstm.hxx>
+#include "editeng/editengdllapi.h"
+
+class SvNumberFormatter;
+class MetaAction;
+
+// class SvxFieldItem ---------------------------------------------------
+
+
+
+class EDITENG_DLLPUBLIC SvxFieldData : public SvPersistBase
+{
+public:
+ SV_DECL_PERSIST1( SvxFieldData, SvPersistBase, 1 )
+
+ SvxFieldData();
+ virtual ~SvxFieldData();
+
+ virtual SvxFieldData* Clone() const;
+ virtual int operator==( const SvxFieldData& ) const;
+
+ virtual MetaAction* createBeginComment() const;
+ virtual MetaAction* createEndComment() const;
+};
+
+/*
+[Beschreibung]
+In diesem Item wird ein Feld (SvxFieldData) gespeichert.
+Das Feld gehoert dem Item.
+Das Feld selbst wird durch eine Ableitung von SvxFieldData bestimmt. (RTTI)
+*/
+
+class EDITENG_DLLPUBLIC SvxFieldItem : public SfxPoolItem
+{
+private:
+ SvxFieldData* pField;
+
+ EDITENG_DLLPRIVATE SvxFieldItem( SvxFieldData* pField, const USHORT nId );
+
+public:
+ TYPEINFO();
+
+ SvxFieldItem( const SvxFieldData& rField, const USHORT nId );
+ SvxFieldItem( const SvxFieldItem& rItem );
+ ~SvxFieldItem();
+
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create( SvStream&, USHORT nVer ) const;
+ virtual SvStream& Store( SvStream& , USHORT nItemVersion ) const;
+
+ const SvxFieldData* GetField() const { return pField; }
+ static SvClassManager& GetClassManager();
+};
+
+// =================================================================
+// Es folgen die Ableitungen von SvxFieldData...
+// =================================================================
+
+#define SVX_DATEFIELD 2
+#define SVX_URLFIELD 3
+
+#define SVX_PAGEFIELD 100 // Ex-Calc-Felder
+#define SVX_PAGESFIELD 101
+#define SVX_TIMEFIELD 102
+#define SVX_FILEFIELD 103
+#define SVX_TABLEFIELD 104
+#define SVX_EXT_TIMEFIELD 105
+#define SVX_EXT_FILEFIELD 106
+#define SVX_AUTHORFIELD 107
+#define SVX_HEADERFIELD 108
+#define SVX_FOOTERFIELD 109
+#define SVX_DATEFIMEFIELD 110
+
+#define SVX_USERFIELD 200 // Ab hier eigene Felder, nicht im SVX
+
+enum SvxDateType { SVXDATETYPE_FIX, SVXDATETYPE_VAR };
+enum SvxDateFormat { SVXDATEFORMAT_APPDEFAULT, // Wie in App eingestellt
+ SVXDATEFORMAT_SYSTEM, // Wie im System eingestellt
+ SVXDATEFORMAT_STDSMALL,
+ SVXDATEFORMAT_STDBIG,
+ SVXDATEFORMAT_A, // 13.02.96
+ SVXDATEFORMAT_B, // 13.02.1996
+ SVXDATEFORMAT_C, // 13.Feb 1996
+ SVXDATEFORMAT_D, // 13.Februar 1996
+ SVXDATEFORMAT_E, // Die, 13.Februar 1996
+ SVXDATEFORMAT_F // Dienstag, 13.Februar 1996
+ };
+
+class EDITENG_DLLPUBLIC SvxDateField : public SvxFieldData
+{
+ sal_uInt32 nFixDate;
+ SvxDateType eType;
+ SvxDateFormat eFormat;
+
+public:
+ SV_DECL_PERSIST1( SvxDateField, SvxFieldData, SVX_DATEFIELD )
+
+ SvxDateField();
+ SvxDateField( const Date& rDate,
+ SvxDateType eType = SVXDATETYPE_VAR,
+ SvxDateFormat eFormat = SVXDATEFORMAT_STDSMALL );
+
+ sal_uInt32 GetFixDate() const { return nFixDate; }
+ void SetFixDate( const Date& rDate ) { nFixDate = rDate.GetDate(); }
+
+ SvxDateType GetType() const { return eType; }
+ void SetType( SvxDateType eTp ) { eType = eTp; }
+
+ SvxDateFormat GetFormat() const { return eFormat; }
+ void SetFormat( SvxDateFormat eFmt ) { eFormat = eFmt; }
+
+ // deprecated, to be removed
+ String GetFormatted( LanguageType eLanguage, LanguageType eFormat ) const;
+ // use this instead
+ // If eLanguage==LANGUAGE_DONTKNOW the language/country
+ // used in number formatter initialization is taken.
+ String GetFormatted( SvNumberFormatter& rFormatter, LanguageType eLanguage ) const;
+ static String GetFormatted( Date& rDate, SvxDateFormat eFormat, SvNumberFormatter& rFormatter, LanguageType eLanguage );
+
+ virtual SvxFieldData* Clone() const;
+ virtual int operator==( const SvxFieldData& ) const;
+
+ virtual MetaAction* createBeginComment() const;
+};
+
+
+enum SvxURLFormat { SVXURLFORMAT_APPDEFAULT, // Wie in App eingestellt
+ SVXURLFORMAT_URL, // URL darstellen
+ SVXURLFORMAT_REPR // Repraesentation darstellen
+ };
+
+class EDITENG_DLLPUBLIC SvxURLField : public SvxFieldData
+{
+private:
+ SvxURLFormat eFormat;
+ XubString aURL; // URL-Adresse
+ XubString aRepresentation; // Was wird dargestellt
+ XubString aTargetFrame; // In welchem Frame
+
+public:
+ SV_DECL_PERSIST1( SvxURLField, SvxFieldData, SVX_URLFIELD )
+
+ SvxURLField();
+ SvxURLField( const XubString& rURL, const XubString& rRepres, SvxURLFormat eFmt = SVXURLFORMAT_URL );
+
+ const XubString& GetURL() const { return aURL; }
+ void SetURL( const XubString& rURL ) { aURL = rURL; }
+
+ const XubString& GetRepresentation() const { return aRepresentation; }
+ void SetRepresentation( const XubString& rRep ) { aRepresentation= rRep; }
+
+ const XubString& GetTargetFrame() const { return aTargetFrame; }
+ void SetTargetFrame( const XubString& rFrm ) { aTargetFrame = rFrm; }
+
+ SvxURLFormat GetFormat() const { return eFormat; }
+ void SetFormat( SvxURLFormat eFmt ) { eFormat = eFmt; }
+
+ virtual SvxFieldData* Clone() const;
+ virtual int operator==( const SvxFieldData& ) const;
+
+ virtual MetaAction* createBeginComment() const;
+};
+
+class EDITENG_DLLPUBLIC SvxPageField : public SvxFieldData
+{
+public:
+ SV_DECL_PERSIST1( SvxPageField, SvxFieldData, SVX_PAGEFIELD )
+ SvxPageField() {}
+ virtual SvxFieldData* Clone() const;
+ virtual int operator==( const SvxFieldData& ) const;
+
+ virtual MetaAction* createBeginComment() const;
+};
+
+class EDITENG_DLLPUBLIC SvxPagesField : public SvxFieldData
+{
+public:
+ SV_DECL_PERSIST1( SvxPagesField, SvxFieldData, SVX_PAGESFIELD )
+ SvxPagesField() {}
+ virtual SvxFieldData* Clone() const;
+ virtual int operator==( const SvxFieldData& ) const;
+};
+
+class EDITENG_DLLPUBLIC SvxTimeField : public SvxFieldData
+{
+public:
+ SV_DECL_PERSIST1( SvxTimeField, SvxFieldData, SVX_TIMEFIELD )
+ SvxTimeField() {}
+ virtual SvxFieldData* Clone() const;
+ virtual int operator==( const SvxFieldData& ) const;
+
+ virtual MetaAction* createBeginComment() const;
+};
+
+class EDITENG_DLLPUBLIC SvxFileField : public SvxFieldData
+{
+public:
+ SV_DECL_PERSIST1( SvxFileField, SvxFieldData, SVX_FILEFIELD )
+ SvxFileField() {}
+ virtual SvxFieldData* Clone() const;
+ virtual int operator==( const SvxFieldData& ) const;
+};
+
+class EDITENG_DLLPUBLIC SvxTableField : public SvxFieldData
+{
+public:
+ SV_DECL_PERSIST1( SvxTableField, SvxFieldData, SVX_TABLEFIELD )
+ SvxTableField() {}
+ virtual SvxFieldData* Clone() const;
+ virtual int operator==( const SvxFieldData& ) const;
+};
+
+
+enum SvxTimeType { SVXTIMETYPE_FIX, SVXTIMETYPE_VAR };
+enum SvxTimeFormat { SVXTIMEFORMAT_APPDEFAULT, // Wie in App eingestellt
+ SVXTIMEFORMAT_SYSTEM, // Wie im System eingestellt
+ SVXTIMEFORMAT_STANDARD,
+ SVXTIMEFORMAT_24_HM, // 13:49
+ SVXTIMEFORMAT_24_HMS, // 13:49:38
+ SVXTIMEFORMAT_24_HMSH, // 13:49:38.78
+ SVXTIMEFORMAT_12_HM, // 01:49
+ SVXTIMEFORMAT_12_HMS, // 01:49:38
+ SVXTIMEFORMAT_12_HMSH, // 01:49:38.78
+ SVXTIMEFORMAT_AM_HM, // 01:49 PM
+ SVXTIMEFORMAT_AM_HMS, // 01:49:38 PM
+ SVXTIMEFORMAT_AM_HMSH // 01:49:38.78 PM
+ };
+
+class EDITENG_DLLPUBLIC SvxExtTimeField : public SvxFieldData
+{
+private:
+ sal_uInt32 nFixTime;
+ SvxTimeType eType;
+ SvxTimeFormat eFormat;
+
+public:
+ SV_DECL_PERSIST1( SvxExtTimeField, SvxFieldData, SVX_EXT_TIMEFIELD )
+ SvxExtTimeField();
+ SvxExtTimeField( const Time& rTime,
+ SvxTimeType eType = SVXTIMETYPE_VAR,
+ SvxTimeFormat eFormat = SVXTIMEFORMAT_STANDARD );
+
+ sal_uInt32 GetFixTime() const { return nFixTime; }
+ void SetFixTime( const Time& rTime ) { nFixTime = rTime.GetTime(); }
+
+ SvxTimeType GetType() const { return eType; }
+ void SetType( SvxTimeType eTp ) { eType = eTp; }
+
+ SvxTimeFormat GetFormat() const { return eFormat; }
+ void SetFormat( SvxTimeFormat eFmt ) { eFormat = eFmt; }
+
+ // deprecated, to be removed
+ XubString GetFormatted( LanguageType eLanguage, LanguageType eFormat ) const;
+ // use this instead
+ // If eLanguage==LANGUAGE_DONTKNOW the language/country
+ // used in number formatter initialization is taken.
+ String GetFormatted( SvNumberFormatter& rFormatter, LanguageType eLanguage ) const;
+ static String GetFormatted( Time& rTime, SvxTimeFormat eFormat, SvNumberFormatter& rFormatter, LanguageType eLanguage );
+
+ virtual SvxFieldData* Clone() const;
+ virtual int operator==( const SvxFieldData& ) const;
+
+ virtual MetaAction* createBeginComment() const;
+};
+
+
+enum SvxFileType { SVXFILETYPE_FIX, SVXFILETYPE_VAR };
+enum SvxFileFormat { SVXFILEFORMAT_NAME_EXT, // Dateiname mit Extension
+ SVXFILEFORMAT_FULLPATH, // vollständiger Pfad
+ SVXFILEFORMAT_PATH, // nur Pfad
+ SVXFILEFORMAT_NAME // nur Dateiname
+ };
+
+
+
+class EDITENG_DLLPUBLIC SvxExtFileField : public SvxFieldData
+{
+private:
+ XubString aFile;
+ SvxFileType eType;
+ SvxFileFormat eFormat;
+
+public:
+ SV_DECL_PERSIST1( SvxExtFileField, SvxFieldData, SVX_EXT_FILEFIELD )
+ SvxExtFileField();
+ SvxExtFileField( const XubString& rString,
+ SvxFileType eType = SVXFILETYPE_VAR,
+ SvxFileFormat eFormat = SVXFILEFORMAT_FULLPATH );
+
+ String GetFile() const { return aFile; }
+ void SetFile( const XubString& rString ) { aFile = rString; }
+
+ SvxFileType GetType() const { return eType; }
+ void SetType( SvxFileType eTp ) { eType = eTp; }
+
+ SvxFileFormat GetFormat() const { return eFormat; }
+ void SetFormat( SvxFileFormat eFmt ) { eFormat = eFmt; }
+
+ XubString GetFormatted() const;
+
+ virtual SvxFieldData* Clone() const;
+ virtual int operator==( const SvxFieldData& ) const;
+};
+
+
+enum SvxAuthorType { SVXAUTHORTYPE_FIX, SVXAUTHORTYPE_VAR };
+enum SvxAuthorFormat { SVXAUTHORFORMAT_FULLNAME, // vollständiger Name
+ SVXAUTHORFORMAT_NAME, // nur Nachname
+ SVXAUTHORFORMAT_FIRSTNAME, // nur Vorname
+ SVXAUTHORFORMAT_SHORTNAME // Initialen
+ };
+
+class EDITENG_DLLPUBLIC SvxAuthorField : public SvxFieldData
+{
+private:
+ XubString aName;
+ XubString aFirstName;
+ XubString aShortName;
+ SvxAuthorType eType;
+ SvxAuthorFormat eFormat;
+
+public:
+ SV_DECL_PERSIST1( SvxAuthorField, SvxFieldData, SVX_AUTHORFIELD )
+ SvxAuthorField();
+ SvxAuthorField(
+ const XubString& rFirstName,
+ const XubString& rLastName,
+ const XubString& rShortName,
+ SvxAuthorType eType = SVXAUTHORTYPE_VAR,
+ SvxAuthorFormat eFormat = SVXAUTHORFORMAT_FULLNAME );
+
+ XubString GetName() const { return aName; }
+ void SetName( const XubString& rString ) { aName = rString; }
+
+ XubString GetFirstName() const { return aFirstName; }
+ void SetFirstName( const XubString& rString ) { aFirstName = rString; }
+
+ XubString GetShortName() const { return aShortName; }
+ void SetShortName( const XubString& rString ) { aShortName = rString; }
+
+ SvxAuthorType GetType() const { return eType; }
+ void SetType( SvxAuthorType eTp ) { eType = eTp; }
+
+ SvxAuthorFormat GetFormat() const { return eFormat; }
+ void SetFormat( SvxAuthorFormat eFmt ) { eFormat = eFmt; }
+
+ XubString GetFormatted() const;
+
+ virtual SvxFieldData* Clone() const;
+ virtual int operator==( const SvxFieldData& ) const;
+};
+
+/** this field is used as a placeholder for a header&footer in impress. The actual
+ value is stored at the page */
+class EDITENG_DLLPUBLIC SvxHeaderField : public SvxFieldData
+{
+public:
+ SV_DECL_PERSIST1( SvxHeaderField, SvxFieldData, SVX_HEADERFIELD )
+ SvxHeaderField() {}
+ virtual SvxFieldData* Clone() const;
+ virtual int operator==( const SvxFieldData& ) const;
+};
+
+/** this field is used as a placeholder for a header&footer in impress. The actual
+ value is stored at the page */
+class EDITENG_DLLPUBLIC SvxFooterField : public SvxFieldData
+{
+public:
+ SV_DECL_PERSIST1( SvxFooterField, SvxFieldData, SVX_FOOTERFIELD )
+ SvxFooterField() {}
+ virtual SvxFieldData* Clone() const;
+ virtual int operator==( const SvxFieldData& ) const;
+};
+
+/** this field is used as a placeholder for a header&footer in impress. The actual
+ value is stored at the page */
+class EDITENG_DLLPUBLIC SvxDateTimeField : public SvxFieldData
+{
+public:
+ SV_DECL_PERSIST1( SvxDateTimeField, SvxFieldData, SVX_DATEFIMEFIELD )
+ SvxDateTimeField() {}
+
+ static String GetFormatted( Date& rDate, Time& rTime, int eFormat, SvNumberFormatter& rFormatter, LanguageType eLanguage );
+
+ virtual SvxFieldData* Clone() const;
+ virtual int operator==( const SvxFieldData& ) const;
+};
+
+
+
+
+#endif
+
diff --git a/editeng/inc/editeng/flstitem.hxx b/editeng/inc/editeng/flstitem.hxx
new file mode 100644
index 000000000000..c0978ee4cc7a
--- /dev/null
+++ b/editeng/inc/editeng/flstitem.hxx
@@ -0,0 +1,82 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: flstitem.hxx,v $
+ * $Revision: 1.7 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_FLSTITEM_HXX
+#define _SVX_FLSTITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#include <svl/poolitem.hxx>
+#include <rtl/ustring.hxx>
+#include <com/sun/star/uno/Sequence.h>
+#include "editeng/editengdllapi.h"
+
+// class SvxFontListItem -------------------------------------------------
+
+class FontList;
+
+/*
+ [Beschreibung]
+
+ Dieses Item dient als Transport-Medium fuer eine FontListe.
+ Die Fontliste wird nicht kopiert und nicht geloescht!
+*/
+
+class EDITENG_DLLPUBLIC SvxFontListItem : public SfxPoolItem
+{
+private:
+ const FontList* pFontList;
+ com::sun::star::uno::Sequence< rtl::OUString > aFontNameSeq;
+
+public:
+ TYPEINFO();
+
+ SvxFontListItem( const FontList* pFontLst,
+ const USHORT nId );
+ SvxFontListItem( const SvxFontListItem& rItem );
+
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const IntlWrapper * = 0 ) const;
+
+ const FontList* GetFontList() const { return pFontList; }
+};
+
+
+
+
+#endif
+
+
diff --git a/editeng/inc/editeng/fontitem.hxx b/editeng/inc/editeng/fontitem.hxx
new file mode 100644
index 000000000000..1f4a82991be4
--- /dev/null
+++ b/editeng/inc/editeng/fontitem.hxx
@@ -0,0 +1,121 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: fontitem.hxx,v $
+ * $Revision: 1.11 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_FONTITEM_HXX
+#define _SVX_FONTITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#include <svl/poolitem.hxx>
+#include <tools/string.hxx>
+#include <vcl/font.hxx>
+#include "editeng/editengdllapi.h"
+
+class SvXMLUnitConverter;
+namespace rtl
+{
+ class OUString;
+}
+
+// class SvxFontItem -----------------------------------------------------
+
+/*
+ [Beschreibung]
+ Dieses Item beschreibt einen Font.
+*/
+
+class EDITENG_DLLPUBLIC SvxFontItem : public SfxPoolItem
+{
+ String aFamilyName;
+ String aStyleName;
+ FontFamily eFamily;
+ FontPitch ePitch;
+ rtl_TextEncoding eTextEncoding;
+
+ static BOOL bEnableStoreUnicodeNames;
+
+public:
+ TYPEINFO();
+
+ SvxFontItem( const USHORT nId );
+ SvxFontItem( const FontFamily eFam, const String& rFamilyName,
+ const String& rStyleName,
+ const FontPitch eFontPitch /*= PITCH_DONTKNOW*/,
+ const rtl_TextEncoding eFontTextEncoding /*= RTL_TEXTENCODING_DONTKNOW*/,
+ const USHORT nId );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const IntlWrapper * = 0 ) const;
+
+ // ZugriffsMethoden:
+ inline String &GetFamilyName() { return aFamilyName; }
+ inline const String &GetFamilyName() const { return aFamilyName; }
+
+ inline String &GetStyleName() { return aStyleName; }
+ inline const String &GetStyleName() const { return aStyleName; }
+
+ inline FontFamily &GetFamily() { return eFamily; }
+ inline FontFamily GetFamily() const { return eFamily; }
+
+ inline FontPitch &GetPitch() { return ePitch; }
+ inline FontPitch GetPitch() const { return ePitch; }
+
+ inline rtl_TextEncoding &GetCharSet() { return eTextEncoding; }
+ inline rtl_TextEncoding GetCharSet() const { return eTextEncoding; }
+
+ inline SvxFontItem& operator=(const SvxFontItem& rFont)
+ {
+ aFamilyName = rFont.GetFamilyName();
+ aStyleName = rFont.GetStyleName();
+ eFamily = rFont.GetFamily();
+ ePitch = rFont.GetPitch();
+ eTextEncoding = rFont.GetCharSet();
+ return *this;
+ }
+
+ static void EnableStoreUnicodeNames( BOOL bEnable );
+
+};
+
+EDITENG_DLLPUBLIC void GetDefaultFonts( SvxFontItem& rLatin, SvxFontItem& rAsian,
+ SvxFontItem& rComplex );
+
+#endif // #ifndef _SVX_FONTITEM_HXX
+
+
diff --git a/editeng/inc/editeng/forbiddencharacterstable.hxx b/editeng/inc/editeng/forbiddencharacterstable.hxx
new file mode 100644
index 000000000000..ed52f5e31742
--- /dev/null
+++ b/editeng/inc/editeng/forbiddencharacterstable.hxx
@@ -0,0 +1,73 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: forbiddencharacterstable.hxx,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _FORBIDDENCHARACTERSTABLE_HXX
+#define _FORBIDDENCHARACTERSTABLE_HXX
+
+#ifndef _TABLE_HXX //autogen
+#include <tools/table.hxx>
+#endif
+
+#include <vos/refernce.hxx>
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/i18n/ForbiddenCharacters.hpp>
+#include "editeng/editengdllapi.h"
+
+namespace com {
+namespace sun {
+namespace star {
+namespace lang {
+ class XMultiServiceFactory;
+}}}}
+
+struct ForbiddenCharactersInfo
+{
+ com::sun::star::i18n::ForbiddenCharacters aForbiddenChars;
+ BOOL bTemporary;
+};
+
+DECLARE_TABLE( SvxForbiddenCharactersTableImpl, ForbiddenCharactersInfo* )
+
+class EDITENG_DLLPUBLIC SvxForbiddenCharactersTable : public SvxForbiddenCharactersTableImpl, public vos::OReference
+{
+private:
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMSF;
+
+public:
+ SvxForbiddenCharactersTable( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMSF, USHORT nISize = 4, USHORT nGrow = 4 );
+ ~SvxForbiddenCharactersTable();
+
+ const com::sun::star::i18n::ForbiddenCharacters* GetForbiddenCharacters( USHORT nLanuage, BOOL bGetDefault ) const;
+ void SetForbiddenCharacters( USHORT nLanuage , const com::sun::star::i18n::ForbiddenCharacters& );
+ void ClearForbiddenCharacters( USHORT nLanuage );
+};
+
+#endif // _FORBIDDENCHARACTERSTABLE_HXX
+
diff --git a/editeng/inc/editeng/forbiddenruleitem.hxx b/editeng/inc/editeng/forbiddenruleitem.hxx
new file mode 100644
index 000000000000..a999fa8a8a34
--- /dev/null
+++ b/editeng/inc/editeng/forbiddenruleitem.hxx
@@ -0,0 +1,72 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: forbiddenruleitem.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_FORBIDDENRULEITEM_HXX
+#define _SVX_FORBIDDENRULEITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#include <svl/eitem.hxx>
+#include <editeng/editengdllapi.h>
+
+// class SvxForbiddenRuleItem -----------------------------------------
+
+/* [Description]
+
+ This item describe how to handle the last character of a line.
+*/
+
+class EDITENG_DLLPUBLIC SvxForbiddenRuleItem : public SfxBoolItem
+{
+public:
+ TYPEINFO();
+
+ SvxForbiddenRuleItem( sal_Bool bOn /*= sal_False*/,
+ const sal_uInt16 nId );
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual USHORT GetVersion( USHORT nFileVersion ) const;
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper * = 0 ) const;
+
+ inline SvxForbiddenRuleItem& operator=(
+ const SvxForbiddenRuleItem& rItem )
+ {
+ SetValue( rItem.GetValue() );
+ return *this;
+ }
+};
+
+#endif
+
diff --git a/editeng/inc/editeng/frmdir.hxx b/editeng/inc/editeng/frmdir.hxx
new file mode 100644
index 000000000000..04cdcc78ee23
--- /dev/null
+++ b/editeng/inc/editeng/frmdir.hxx
@@ -0,0 +1,63 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: frmdir.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SVX_FRMDIR_HXX
+#define _SVX_FRMDIR_HXX
+
+// ----------------------------------------------------------------------------
+
+/** Defines possible text directions in frames. */
+enum SvxFrameDirection
+{
+ /** Horizontal, from left to right, from top to bottom
+ (typical for western languages). */
+ FRMDIR_HORI_LEFT_TOP,
+
+ /** Horizontal, from right to left, from top to bottom
+ (typical for ararbic/hebrew languages). */
+ FRMDIR_HORI_RIGHT_TOP,
+
+ /** Vertical, from top to bottom, from right to left
+ (typical for asian languages). */
+ FRMDIR_VERT_TOP_RIGHT,
+
+ /** Vertical, from top to bottom, from left to right
+ (typical for mongol language). */
+ FRMDIR_VERT_TOP_LEFT,
+
+ /** Use the value from the environment, can only be used in frames. */
+ FRMDIR_ENVIRONMENT
+};
+
+// ----------------------------------------------------------------------------
+
+#endif // #ifndef _SVX_FRMDIR_HXX
+
+
diff --git a/editeng/inc/editeng/frmdiritem.hxx b/editeng/inc/editeng/frmdiritem.hxx
new file mode 100644
index 000000000000..59bccca85d20
--- /dev/null
+++ b/editeng/inc/editeng/frmdiritem.hxx
@@ -0,0 +1,83 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: frmdiritem.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_FRMDIRITEM_HXX
+#define _SVX_FRMDIRITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#include <svl/intitem.hxx>
+#include <editeng/frmdir.hxx>
+#include <editeng/editengdllapi.h>
+
+// class SvxFrameDirectionItem ----------------------------------------------
+
+/* [Description]
+
+ This item defines a frame direction, which place the content inside
+ a frame. It exist different kind of directions which are used to the
+ layout text for Western, CJK and CTL languages.
+*/
+
+class EDITENG_DLLPUBLIC SvxFrameDirectionItem : public SfxUInt16Item
+{
+public:
+ TYPEINFO();
+
+ SvxFrameDirectionItem( USHORT nWhich );
+ SvxFrameDirectionItem( SvxFrameDirection nValue /*= FRMDIR_HORI_LEFT_TOP*/,
+ USHORT nWhich );
+ virtual ~SvxFrameDirectionItem();
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual SvStream& Store(SvStream & rStrm, USHORT nIVer) const;
+ virtual USHORT GetVersion( USHORT nFileVersion ) const;
+ virtual int operator==( const SfxPoolItem& ) const;
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper * = 0 ) const;
+
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal,
+ BYTE nMemberId );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal,
+ BYTE nMemberId ) const;
+
+ inline SvxFrameDirectionItem& operator=( const SvxFrameDirectionItem& rItem )
+ {
+ SetValue( rItem.GetValue() );
+ return *this;
+ }
+};
+
+#endif // #ifndef _SVX_FRMDIRITEM_HXX
+
diff --git a/editeng/inc/editeng/fwdtitem.hxx b/editeng/inc/editeng/fwdtitem.hxx
new file mode 100644
index 000000000000..8a02474f525c
--- /dev/null
+++ b/editeng/inc/editeng/fwdtitem.hxx
@@ -0,0 +1,111 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: fwdtitem.hxx,v $
+ * $Revision: 1.6 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_FWDTITEM_HXX
+#define _SVX_FWDTITEM_HXX
+
+// include ---------------------------------------------------------------
+
+
+#include <svl/poolitem.hxx>
+
+
+// class SvxFontWidthItem -----------------------------------------------
+
+
+/* [Beschreibung]
+
+ Dieses Item beschreibt die Font-Breite.
+*/
+
+class SvxFontWidthItem : public SfxPoolItem
+{
+ UINT16 nWidth; // 0 = default
+ USHORT nProp; // default 100%
+public:
+ TYPEINFO();
+
+ SvxFontWidthItem( const USHORT nSz /*= 0*/,
+ const USHORT nPropWidth /*= 100*/,
+ const USHORT nId );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const IntlWrapper * = 0 ) const;
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
+ virtual int ScaleMetrics( long nMult, long nDiv );
+ virtual int HasMetrics() const;
+
+ inline SvxFontWidthItem& operator=(const SvxFontWidthItem& rItem )
+ {
+ SetWidthValue( rItem.GetWidth() );
+ SetProp( rItem.GetProp() );
+ return *this;
+ }
+
+ void SetWidth( UINT16 nNewWidth, const USHORT nNewProp = 100 )
+ {
+ DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" );
+ nWidth = UINT16(( (UINT32)nNewWidth * nNewProp ) / 100 );
+ nProp = nNewProp;
+ }
+
+ UINT16 GetWidth() const { return nWidth; }
+
+ void SetWidthValue( UINT16 nNewWidth )
+ {
+ DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" );
+ nWidth = nNewWidth;
+ }
+
+ void SetProp( const USHORT nNewProp )
+ {
+ DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" );
+ nProp = nNewProp;
+ }
+
+ USHORT GetProp() const { return nProp; }
+};
+
+
+
+
+
+#endif
+
+
diff --git a/editeng/inc/editeng/hangulhanja.hxx b/editeng/inc/editeng/hangulhanja.hxx
new file mode 100644
index 000000000000..d3f10d084a40
--- /dev/null
+++ b/editeng/inc/editeng/hangulhanja.hxx
@@ -0,0 +1,305 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: hangulhanja.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef SVX_HANGUL_HANJA_CONVERSION_HXX
+#define SVX_HANGUL_HANJA_CONVERSION_HXX
+
+#include <vcl/window.hxx>
+#include <memory>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/lang/Locale.hpp>
+#include <com/sun/star/uno/Sequence.hxx>
+#include "editeng/editengdllapi.h"
+
+//.............................................................................
+namespace editeng
+{
+//.............................................................................
+
+ class HangulHanjaConversion_Impl;
+
+ //=========================================================================
+ //= HangulHanjaConversion
+ //=========================================================================
+ /** encapsulates Hangul-Hanja conversion functionality
+
+ <p>terminology:
+ <ul><li>A <b>text <em>portion</em></b> is some (potentially large) piece of text
+ which is to be analyzed for convertible sub-strings.</li>
+ <li>A <b>text <em>unit</em></b> is a sub string in a text portion, which is
+ to be converted as a whole.</li>
+ </ul>
+ For instance, you could have two independent selections within your document, which are then
+ two text portions. A text unit would be single Hangul/Hanja words within a portion, or even
+ single Hangul syllabills when "replace by character" is enabled.
+ </p>
+ */
+ class EDITENG_DLLPUBLIC HangulHanjaConversion
+ {
+ friend class HangulHanjaConversion_Impl;
+
+ public:
+ enum ReplacementAction
+ {
+ eExchange, // simply exchange one text with another
+ eReplacementBracketed, // keep the original, and put the replacement in brackets after it
+ eOriginalBracketed, // replace the original text, but put it in brackeds after the replacement
+ eReplacementAbove, // keep the original, and put the replacement text as ruby text above it
+ eOriginalAbove, // replace the original text, but put it as ruby text above it
+ eReplacementBelow, // keep the original, and put the replacement text as ruby text below it
+ eOriginalBelow // replace the original text, but put it as ruby text below it
+ };
+
+ enum ConversionType // does not specify direction...
+ {
+ eConvHangulHanja, // Korean Hangul/Hanja conversion
+ eConvSimplifiedTraditional // Chinese simplified / Chinese traditional conversion
+ };
+
+ // Note: conversion direction for eConvSimplifiedTraditional is
+ // specified by source language.
+ // This one is for Hangul/Hanja where source and target language
+ // are the same.
+ enum ConversionDirection
+ {
+ eHangulToHanja,
+ eHanjaToHangul
+ };
+
+ enum ConversionFormat
+ {
+ eSimpleConversion, // used for simplified / traditional Chinese as well
+ eHangulBracketed,
+ eHanjaBracketed,
+ eRubyHanjaAbove,
+ eRubyHanjaBelow,
+ eRubyHangulAbove,
+ eRubyHangulBelow
+ };
+
+ private:
+ ::std::auto_ptr< HangulHanjaConversion_Impl > m_pImpl;
+
+ // used to set initial values of m_pImpl object from saved ones
+ static sal_Bool m_bUseSavedValues; // defines if the followng two values should be used for initialization
+ static sal_Bool m_bTryBothDirectionsSave;
+ static ConversionDirection m_ePrimaryConversionDirectionSave;
+
+ // Forbidden and not implemented.
+ HangulHanjaConversion (const HangulHanjaConversion &);
+ HangulHanjaConversion & operator= (const HangulHanjaConversion &);
+
+ public:
+ HangulHanjaConversion(
+ Window* _pUIParent,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
+ const ::com::sun::star::lang::Locale& _rSourceLocale,
+ const ::com::sun::star::lang::Locale& _rTargetLocale,
+ const Font* _pTargetFont,
+ sal_Int32 nOptions,
+ sal_Bool _bIsInteractive
+ );
+
+ virtual ~HangulHanjaConversion( );
+
+ // converts the whole document
+ void ConvertDocument();
+
+ LanguageType GetSourceLanguage() const;
+ LanguageType GetTargetLanguage() const;
+ const Font * GetTargetFont() const;
+ sal_Int32 GetConversionOptions() const;
+ sal_Bool IsInteractive() const;
+
+ // chinese text conversion
+ static inline sal_Bool IsSimplified( LanguageType nLang );
+ static inline sal_Bool IsTraditional( LanguageType nLang );
+ static inline sal_Bool IsChinese( LanguageType nLang );
+ static inline sal_Bool IsSimilarChinese( LanguageType nLang1, LanguageType nLang2 );
+
+ // used to specify that the conversion direction states from the
+ // last incarnation should be used as
+ // initial conversion direction for the next incarnation.
+ // (A hack used to transport a state information from
+ // one incarnation to the next. Used in Writers text conversion...)
+ static void SetUseSavedConversionDirectionState( sal_Bool bVal );
+ static sal_Bool IsUseSavedConversionDirectionState();
+
+ protected:
+ /** retrieves the next text portion which is to be analyzed
+
+ <p>pseudo-abstract, needs to be overridden</p>
+
+ @param _rNextPortion
+ upon return, this must contain the next text portion
+ @param _rLangOfPortion
+ upon return, this must contain the language for the found text portion.
+ (necessary for Chinese translation since there are 5 language variants
+ too look for even if the 'source' language usually is only 'simplified'
+ or 'traditional'.)
+ */
+ virtual void GetNextPortion(
+ ::rtl::OUString& /* [out] */ _rNextPortion,
+ LanguageType& /* [out] */ _rLangOfPortion,
+ sal_Bool /* [in] */ _bAllowImplicitChangesForNotConvertibleText );
+
+ /** announces a new "current unit"
+
+ <p>This will be called whenever it is necessary to interactively ask the user for
+ a conversion. In such a case, a range within the current portion (see <member>GetNextPortion</member>)
+ is presented to the user for chosing a substitution. Additionally, this method is called,
+ so that derived classes can e.g. highlight this text range in a document view.</p>
+
+ <p>Note that the indexes are relative to the most recent replace action. See
+ <member>ReplaceUnit</member> for details.</p>
+
+ @param _nUnitStart
+ the start index of the unit
+
+ @param _nUnitEnd
+ the start index (exclusively!) of the unit.
+
+ @param _bAllowImplicitChangesForNotConvertibleText
+ allows implicit changes other than the text itself for the
+ text parts not being convertible.
+ Used for chinese translation to attribute all not convertible
+ text (e.g. western text, empty paragraphs, spaces, ...) to
+ the target language and target font of the conversion.
+ This is to ensure that after the conversion any new text entered
+ anywhere in the document will have the target language (of course
+ CJK Language only) and target font (CJK font only) set.
+
+ @see GetNextPortion
+ */
+ virtual void HandleNewUnit( const sal_Int32 _nUnitStart, const sal_Int32 _nUnitEnd );
+
+ /** replaces a text unit within a text portion with a new text
+
+ <p>pseudo-abstract, needs to be overridden</p>
+
+ <p>Note an important thing about the indicies: They are always relative to the <em>previous
+ call</em> of ReplaceUnit. This means whe you get a call to ReplaceUnit, and replace some text
+ in your document, than you have to remember the document position immediately <em>behind</em>
+ the changed text. In a next call to ReplaceUnit, an index of <em>0</em> will denote exactly
+ this position behind the previous replacement<br/>
+ The reaons for this is that this class here does not know anything about your document structure,
+ so after a replacement took place, it's impossible to address anything in the range from the
+ beginning of the portion up to the replaced text.<br/>
+ In the very first call to ReplaceUnit, an index of <em>0</em> denotes the very first position of
+ the current portion.</p>
+
+ <p>If the language of the text to be replaced is different from
+ the target language (as given by 'GetTargetLanguage') for example
+ when converting simplified Chinese from/to traditional Chinese
+ the language attribute of the new text has to be changed as well,
+ **and** the font is to be set to the default (document) font for
+ that language.</p>
+
+ @param _nUnitStart
+ the start index of the range to replace
+
+ @param _nUnitEnd
+ the end index (exclusively!) of the range to replace. E.g., an index
+ pair (4,5) indicates a range of length 1.
+
+ @param _rOrigText
+ the original text to be replaced (as returned by GetNextPortion).
+ Since in Chinese conversion the original text is needed as well
+ in order to only do the minimal necassry text changes and to keep
+ as much attributes as possible this is supplied here as well.
+
+ @param _rReplaceWith
+ The replacement text
+
+ @param _rOffsets
+ An sequence matching the indices (characters) of _rReplaceWith
+ to the indices of the characters in the original text they are
+ replacing.
+ This is necessary since some portions of the text may get
+ converted in portions of different length than the original.
+ The sequence will be empty if all conversions in the text are
+ of equal length. That is if always the character at index i in
+ _rOffsets is replacing the character at index i in the original
+ text for all valid index values of i.
+
+ @param _eAction
+ replacement action to take
+
+ @param pNewUnitLanguage
+ if the replacement unit is required to have a new language that
+ is specified here. If the language is to be left unchanged this
+ is the 0 pointer.
+ */
+ virtual void ReplaceUnit(
+ const sal_Int32 _nUnitStart, const sal_Int32 _nUnitEnd,
+ const ::rtl::OUString& _rOrigText,
+ const ::rtl::OUString& _rReplaceWith,
+ const ::com::sun::star::uno::Sequence< sal_Int32 > &_rOffsets,
+ ReplacementAction _eAction,
+ LanguageType *pNewUnitLanguage
+ );
+
+ /** specifies if rubies are supported by the document implementing
+ this class.
+
+ @return
+ <TRUE/> if rubies are supported.
+ */
+ virtual sal_Bool HasRubySupport() const;
+ };
+
+ sal_Bool HangulHanjaConversion::IsSimplified( LanguageType nLang )
+ {
+ return nLang == LANGUAGE_CHINESE_SIMPLIFIED ||
+ nLang == LANGUAGE_CHINESE_SINGAPORE;
+ }
+
+ sal_Bool HangulHanjaConversion::IsTraditional( LanguageType nLang )
+ {
+ return nLang == LANGUAGE_CHINESE_TRADITIONAL ||
+ nLang == LANGUAGE_CHINESE_HONGKONG ||
+ nLang == LANGUAGE_CHINESE_MACAU;
+ }
+
+ sal_Bool HangulHanjaConversion::IsChinese( LanguageType nLang )
+ {
+ return IsTraditional( nLang ) || IsSimplified( nLang );
+ }
+
+ sal_Bool HangulHanjaConversion::IsSimilarChinese( LanguageType nLang1, LanguageType nLang2 )
+ {
+ return (IsTraditional(nLang1) && IsTraditional(nLang2)) ||
+ (IsSimplified(nLang1) && IsSimplified(nLang2));
+ }
+
+//.............................................................................
+} // namespace svx
+//.............................................................................
+
+#endif // SVX_HANGUL_HANJA_CONVERSION_HXX
diff --git a/editeng/inc/editeng/hngpnctitem.hxx b/editeng/inc/editeng/hngpnctitem.hxx
new file mode 100644
index 000000000000..e2d949f171a8
--- /dev/null
+++ b/editeng/inc/editeng/hngpnctitem.hxx
@@ -0,0 +1,72 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: hngpnctitem.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_HNGPNCTITEM_HXX
+#define _SVX_HNGPNCTITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#include <svl/eitem.hxx>
+#include <editeng/editengdllapi.h>
+
+// class SvxHangingPunctuationItem -----------------------------------------
+
+/* [Description]
+
+ This item describe how to handle the last character of a line.
+*/
+
+class EDITENG_DLLPUBLIC SvxHangingPunctuationItem : public SfxBoolItem
+{
+public:
+ TYPEINFO();
+
+ SvxHangingPunctuationItem( sal_Bool bOn /*= sal_False*/,
+ const sal_uInt16 nId );
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual USHORT GetVersion( USHORT nFileVersion ) const;
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper * = 0 ) const;
+
+ inline SvxHangingPunctuationItem& operator=(
+ const SvxHangingPunctuationItem& rItem )
+ {
+ SetValue( rItem.GetValue() );
+ return *this;
+ }
+};
+
+#endif
+
diff --git a/editeng/inc/editeng/hyznitem.hxx b/editeng/inc/editeng/hyznitem.hxx
new file mode 100644
index 000000000000..b343747ef575
--- /dev/null
+++ b/editeng/inc/editeng/hyznitem.hxx
@@ -0,0 +1,109 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: hyznitem.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_HYZNITEM_HXX
+#define _SVX_HYZNITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#include <svl/poolitem.hxx>
+#include <editeng/editengdllapi.h>
+
+class SvXMLUnitConverter;
+namespace rtl
+{
+ class OUString;
+}
+
+// class SvxHyphenZoneItem -----------------------------------------------
+
+/*
+[Beschreibung]
+Dieses Item beschreibt ein Silbentrennungsattribut (Automatisch?, Anzahl der
+Zeichen am Zeilenende und -anfang).
+*/
+
+class EDITENG_DLLPUBLIC SvxHyphenZoneItem : public SfxPoolItem
+{
+ BOOL bHyphen: 1;
+ BOOL bPageEnd: 1;
+ BYTE nMinLead;
+ BYTE nMinTrail;
+ BYTE nMaxHyphens;
+
+ friend SvStream & operator<<( SvStream & aS, SvxHyphenZoneItem & );
+
+public:
+ TYPEINFO();
+
+ SvxHyphenZoneItem( const BOOL bHyph /*= FALSE*/,
+ const USHORT nId );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const IntlWrapper * = 0 ) const;
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const;
+
+ inline void SetHyphen( const BOOL bNew ) { bHyphen = bNew; }
+ inline BOOL IsHyphen() const { return bHyphen; }
+
+ inline void SetPageEnd( const BOOL bNew ) { bPageEnd = bNew; }
+ inline BOOL IsPageEnd() const { return bPageEnd; }
+
+ inline BYTE &GetMinLead() { return nMinLead; }
+ inline BYTE GetMinLead() const { return nMinLead; }
+
+ inline BYTE &GetMinTrail() { return nMinTrail; }
+ inline BYTE GetMinTrail() const { return nMinTrail; }
+
+ inline BYTE &GetMaxHyphens() { return nMaxHyphens; }
+ inline BYTE GetMaxHyphens() const { return nMaxHyphens; }
+
+ inline SvxHyphenZoneItem &operator=( const SvxHyphenZoneItem &rNew )
+ {
+ bHyphen = rNew.IsHyphen();
+ bPageEnd = rNew.IsPageEnd();
+ nMinLead = rNew.GetMinLead();
+ nMinTrail = rNew.GetMinTrail();
+ nMaxHyphens = rNew.GetMaxHyphens();
+ return *this;
+ }
+};
+
+#endif
+
diff --git a/editeng/inc/editeng/itemtype.hxx b/editeng/inc/editeng/itemtype.hxx
new file mode 100644
index 000000000000..a8ef74778d33
--- /dev/null
+++ b/editeng/inc/editeng/itemtype.hxx
@@ -0,0 +1,78 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: itemtype.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_ITEMTYPE_HXX
+#define _SVX_ITEMTYPE_HXX
+
+// include ---------------------------------------------------------------
+
+#include <editeng/editrids.hrc>
+#include <editeng/eerdll.hxx>
+
+// forward ---------------------------------------------------------------
+#include <tools/string.hxx>
+#include <tools/resid.hxx>
+#include <tools/bigint.hxx>
+#include <svl/poolitem.hxx>
+#include <tools/shl.hxx>
+#include "editeng/editengdllapi.h"
+
+class Color;
+class XColorTable;
+class IntlWrapper;
+// static and prototypes -------------------------------------------------
+
+static const sal_Unicode cDelim = ',';
+static const sal_Unicode cpDelim[] = { ',' , ' ', '\0' };
+
+EDITENG_DLLPUBLIC String GetSvxString( USHORT nId );
+EDITENG_DLLPUBLIC String GetMetricText( long nVal, SfxMapUnit eSrcUnit, SfxMapUnit eDestUnit, const IntlWrapper * pIntl );
+String GetColorString( const Color& rCol );
+EDITENG_DLLPUBLIC USHORT GetMetricId( SfxMapUnit eUnit );
+
+// -----------------------------------------------------------------------
+
+inline String GetBoolString( BOOL bVal )
+{
+ return String( EditResId( bVal ? RID_SVXITEMS_TRUE : RID_SVXITEMS_FALSE ) );
+}
+
+// -----------------------------------------------------------------------
+
+inline long Scale( long nVal, long nMult, long nDiv )
+{
+ BigInt aVal( nVal );
+ aVal *= nMult;
+ aVal += nDiv/2;
+ aVal /= nDiv;
+ return aVal;
+}
+
+#endif
+
diff --git a/editeng/inc/editeng/keepitem.hxx b/editeng/inc/editeng/keepitem.hxx
new file mode 100644
index 000000000000..a4c68fb150b9
--- /dev/null
+++ b/editeng/inc/editeng/keepitem.hxx
@@ -0,0 +1,81 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: keepitem.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_KEEPITEM_HXX
+#define _SVX_KEEPITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#include <svl/eitem.hxx>
+#include <editeng/editengdllapi.h>
+
+namespace rtl
+{
+ class OUString;
+}
+
+// class SvxFmtKeepItem ------------------------------------------------
+
+/*
+[Beschreibung]
+Dieses Item beschreibt eine logische Variable "Absaetze zusammenhalten?".
+*/
+
+class EDITENG_DLLPUBLIC SvxFmtKeepItem : public SfxBoolItem
+{
+public:
+ TYPEINFO();
+
+ inline SvxFmtKeepItem( const BOOL bKeep /*= FALSE*/,
+ const USHORT _nWhich );
+ inline SvxFmtKeepItem& operator=( const SvxFmtKeepItem& rSplit );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create( SvStream&, USHORT ) const;
+ virtual SvStream& Store( SvStream& , USHORT nItemVersion ) const;
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const IntlWrapper * = 0 ) const;
+};
+
+inline SvxFmtKeepItem::SvxFmtKeepItem( const BOOL bKeep, const USHORT _nWhich ) :
+ SfxBoolItem( _nWhich, bKeep )
+{}
+
+inline SvxFmtKeepItem& SvxFmtKeepItem::operator=( const SvxFmtKeepItem& rKeep )
+{
+ SetValue( rKeep.GetValue() );
+ return *this;
+}
+
+#endif
+
diff --git a/editeng/inc/editeng/kernitem.hxx b/editeng/inc/editeng/kernitem.hxx
new file mode 100644
index 000000000000..c9e71282a447
--- /dev/null
+++ b/editeng/inc/editeng/kernitem.hxx
@@ -0,0 +1,83 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: kernitem.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_KERNITEM_HXX
+#define _SVX_KERNITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#include <svl/intitem.hxx>
+#include <editeng/editengdllapi.h>
+
+class SvXMLUnitConverter;
+namespace rtl
+{
+ class OUString;
+}
+
+// class SvxKerningItem --------------------------------------------------
+
+// Achtung: Twips-Werte
+// Twips: 0 = kein Kerning
+
+/* [Beschreibung]
+
+ Dieses Item beschreibt die Schrift-Laufweite.
+*/
+
+class EDITENG_DLLPUBLIC SvxKerningItem : public SfxInt16Item
+{
+public:
+ TYPEINFO();
+
+ SvxKerningItem( const short nKern /*= 0*/, const USHORT nId );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
+ virtual int ScaleMetrics( long nMult, long nDiv );
+ virtual int HasMetrics() const;
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const IntlWrapper * = 0 ) const;
+
+ inline SvxKerningItem& operator=(const SvxKerningItem& rKern) {
+ SetValue( rKern.GetValue() );
+ return *this;
+ }
+
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+};
+
+#endif
+
diff --git a/editeng/inc/editeng/langitem.hxx b/editeng/inc/editeng/langitem.hxx
new file mode 100644
index 000000000000..0c3a9d5c3dd3
--- /dev/null
+++ b/editeng/inc/editeng/langitem.hxx
@@ -0,0 +1,87 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: langitem.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_LANGITEM_HXX
+#define _SVX_LANGITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#include <svl/eitem.hxx>
+#include <i18npool/lang.h>
+#include <editeng/editengdllapi.h>
+
+class SvXMLUnitConverter;
+namespace rtl
+{
+ class OUString;
+}
+
+// class SvxLanguageItem -------------------------------------------------
+
+/* [Beschreibung]
+
+ Dieses Item beschreibt eine Sprache.
+*/
+
+class EDITENG_DLLPUBLIC SvxLanguageItem : public SfxEnumItem
+{
+public:
+ TYPEINFO();
+
+ SvxLanguageItem( const LanguageType eLang /*= LANGUAGE_GERMAN*/,
+ const USHORT nId );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const IntlWrapper * = 0 ) const;
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
+ virtual USHORT GetValueCount() const;
+
+ inline SvxLanguageItem& operator=(const SvxLanguageItem& rLang)
+ {
+ SetValue( rLang.GetValue() );
+ return *this;
+ }
+
+ // enum cast
+ LanguageType GetLanguage() const
+ { return (LanguageType)GetValue(); }
+ void SetLanguage( const LanguageType eLang )
+ { SetValue( (USHORT)eLang ); }
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+};
+
+#endif
+
diff --git a/editeng/inc/editeng/lcolitem.hxx b/editeng/inc/editeng/lcolitem.hxx
new file mode 100644
index 000000000000..72185becfbc0
--- /dev/null
+++ b/editeng/inc/editeng/lcolitem.hxx
@@ -0,0 +1,68 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: lcolitem.hxx,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_LCOLITEM_HXX
+#define _SVX_LCOLITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#include <editeng/colritem.hxx>
+#include <editeng/editengdllapi.h>
+
+/*
+ * dummy-Item fuer ToolBox-Controller:
+ *
+ */
+
+class EDITENG_DLLPUBLIC SvxLineColorItem : public SvxColorItem
+{
+public:
+ TYPEINFO();
+
+ SvxLineColorItem( const USHORT nId );
+ SvxLineColorItem( const Color& aColor, const USHORT nId );
+ SvxLineColorItem( SvStream& rStrm, const USHORT nId );
+ SvxLineColorItem( const SvxLineColorItem& rCopy );
+ ~SvxLineColorItem();
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper * pIntlWrapper = 0 )
+ const;
+
+ inline SvxLineColorItem& operator=(const SvxLineColorItem& rColor)
+ { return (SvxLineColorItem&)SvxColorItem::
+ operator=((const SvxColorItem&)rColor); }
+
+};
+
+#endif
+
diff --git a/editeng/inc/editeng/lrspitem.hxx b/editeng/inc/editeng/lrspitem.hxx
new file mode 100644
index 000000000000..feff7938cf5c
--- /dev/null
+++ b/editeng/inc/editeng/lrspitem.hxx
@@ -0,0 +1,182 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: lrspitem.hxx,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_LRSPITEM_HXX
+#define _SVX_LRSPITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#include <svl/poolitem.hxx>
+#include <editeng/editengdllapi.h>
+
+namespace rtl
+{
+ class OUString;
+}
+
+// class SvxLRSpaceItem --------------------------------------------------
+
+/*
+[Beschreibung]
+Linker/Rechter Rand sowie Erstzeileneinzug
+
+SvxLRSpaceItem bietet zwei Schnittstellen zur Befragung des linken
+Randes und des Erstzeileneinzuges an. Die Get-Methoden liefern
+die Member zurueck, wie sie das Layout bisher auch erwartete:
+Der linke Rand verschiebt sich beim negativem Erstzeileneinzug
+nach links. Die SetTxt/GetTxt-Methoden setzen voraus, dass der
+linke Rand der 0-Punkt des Erstzeileneinzugs darstellt:
+
+ UI UI LAYOUT UI/TEXT UI/TEXT (Wo?)
+SetTxtLeft SetTxtFirst GetLeft GetTxtLeft GetTxtFirst (Was?)
+ 500 -500 0 500 -500 (Wieviel?)
+ 500 0 500 500 0
+ 500 +500 500 500 +500
+ 700 -500 200 700 -500
+*/
+
+#define LRSPACE_16_VERSION ((USHORT)0x0001)
+#define LRSPACE_TXTLEFT_VERSION ((USHORT)0x0002)
+#define LRSPACE_AUTOFIRST_VERSION ((USHORT)0x0003)
+#define LRSPACE_NEGATIVE_VERSION ((USHORT)0x0004)
+
+class EDITENG_DLLPUBLIC SvxLRSpaceItem : public SfxPoolItem
+{
+ short nFirstLineOfst; // Erstzeileneinzug _immer_ relativ zu nTxtLeft
+ long nTxtLeft; // wir spendieren einen USHORT
+ long nLeftMargin; // nLeft oder der neg. Erstzeileneinzug
+ long nRightMargin; // der unproblematische rechte Rand
+
+ USHORT nPropFirstLineOfst, nPropLeftMargin, nPropRightMargin;
+ BOOL bAutoFirst : 1; // Automatische Berechnung der Erstzeileneinzugs
+
+ void AdjustLeft(); // nLeftMargin und nTxtLeft werden angepasst.
+
+public:
+ TYPEINFO();
+
+ SvxLRSpaceItem( const USHORT nId );
+ SvxLRSpaceItem( const long nLeft, const long nRight,
+ const long nTLeft /*= 0*/, const short nOfset /*= 0*/,
+ const USHORT nId );
+ inline SvxLRSpaceItem& operator=( const SvxLRSpaceItem &rCpy );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const IntlWrapper * = 0 ) const;
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const;
+ virtual USHORT GetVersion( USHORT nFileVersion ) const;
+ virtual int ScaleMetrics( long nMult, long nDiv );
+ virtual int HasMetrics() const;
+
+ // Die "Layout-Schnittstelle":
+ inline void SetLeft ( const long nL, const USHORT nProp = 100 );
+ inline void SetRight( const long nR, const USHORT nProp = 100 );
+
+ // abfragen / direktes setzen der absoluten Werte
+ inline long GetLeft() const { return nLeftMargin; }
+ inline long GetRight() const { return nRightMargin;}
+ inline void SetLeftValue( const long nL ) { nTxtLeft = nLeftMargin = nL; }
+ inline void SetRightValue( const long nR ) { nRightMargin = nR; }
+ inline BOOL IsAutoFirst() const { return bAutoFirst; }
+ inline void SetAutoFirst( const BOOL bNew ) { bAutoFirst = bNew; }
+
+ // abfragen / setzen der Prozent-Werte
+ inline void SetPropLeft( const USHORT nProp = 100 )
+ { nPropLeftMargin = nProp; }
+ inline void SetPropRight( const USHORT nProp = 100 )
+ { nPropRightMargin = nProp;}
+ inline USHORT GetPropLeft() const { return nPropLeftMargin; }
+ inline USHORT GetPropRight() const { return nPropRightMargin;}
+
+ // Die "UI/Text-Schnittstelle":
+ inline void SetTxtLeft( const long nL, const USHORT nProp = 100 );
+ inline long GetTxtLeft() const { return nTxtLeft; }
+
+ inline void SetTxtFirstLineOfst( const short nF, const USHORT nProp = 100 );
+ inline short GetTxtFirstLineOfst() const { return nFirstLineOfst; }
+ inline void SetPropTxtFirstLineOfst( const USHORT nProp = 100 )
+ { nPropFirstLineOfst = nProp; }
+ inline USHORT GetPropTxtFirstLineOfst() const
+ { return nPropFirstLineOfst; }
+ inline void SetTxtFirstLineOfstValue( const short nValue )
+ { nFirstLineOfst = nValue; }
+};
+
+inline SvxLRSpaceItem &SvxLRSpaceItem::operator=( const SvxLRSpaceItem &rCpy )
+{
+ nFirstLineOfst = rCpy.nFirstLineOfst;
+ nTxtLeft = rCpy.nTxtLeft;
+ nLeftMargin = rCpy.nLeftMargin;
+ nRightMargin = rCpy.nRightMargin;
+ nPropFirstLineOfst = rCpy.nPropFirstLineOfst;
+ nPropLeftMargin = rCpy.nPropLeftMargin;
+ nPropRightMargin = rCpy.nPropRightMargin;
+ bAutoFirst = rCpy.bAutoFirst;
+ return *this;
+}
+
+inline void SvxLRSpaceItem::SetLeft( const long nL, const USHORT nProp )
+{
+ nLeftMargin = (nL * nProp) / 100;
+ nTxtLeft = nLeftMargin;
+ nPropLeftMargin = nProp;
+}
+inline void SvxLRSpaceItem::SetRight( const long nR, const USHORT nProp )
+{
+ nRightMargin = (nR * nProp) / 100;
+ nPropRightMargin = nProp;
+}
+inline void SvxLRSpaceItem::SetTxtFirstLineOfst( const short nF,
+ const USHORT nProp )
+{
+ nFirstLineOfst = short((long(nF) * nProp ) / 100);
+ nPropFirstLineOfst = nProp;
+ AdjustLeft();
+}
+
+inline void SvxLRSpaceItem::SetTxtLeft( const long nL, const USHORT nProp )
+{
+ nTxtLeft = (nL * nProp) / 100;
+ nPropLeftMargin = nProp;
+ AdjustLeft();
+}
+
+#endif
+
diff --git a/editeng/inc/editeng/lspcitem.hxx b/editeng/inc/editeng/lspcitem.hxx
new file mode 100644
index 000000000000..db14574b1102
--- /dev/null
+++ b/editeng/inc/editeng/lspcitem.hxx
@@ -0,0 +1,126 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: lspcitem.hxx,v $
+ * $Revision: 1.4.216.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_LSPCITEM_HXX
+#define _SVX_LSPCITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#include <svl/eitem.hxx>
+#include <editeng/svxenum.hxx>
+#include <editeng/editengdllapi.h>
+
+class SvXMLUnitConverter;
+namespace rtl
+{
+ class OUString;
+}
+
+// class SvxLineSpacingItem ----------------------------------------------
+
+/*
+[Beschreibung]
+Dieses Item beschreibt den Abstand zwischen den Zeilen.
+*/
+
+#define LINE_SPACE_DEFAULT_HEIGHT 200
+class EDITENG_DLLPUBLIC SvxLineSpacingItem : public SfxEnumItemInterface
+{
+ friend SvStream& operator<<( SvStream&, SvxLineSpacingItem& ); //$ ostream
+
+ short nInterLineSpace;
+ USHORT nLineHeight;
+ BYTE nPropLineSpace;
+ SvxLineSpace eLineSpace;
+ SvxInterLineSpace eInterLineSpace;
+
+public:
+ TYPEINFO();
+
+ // Der Writer verlaesst sich auf eine Default-Hoehe von 200!
+ // Eigentlich wuerde ich alle Werte mit 0 initialisieren, aber wer kann
+ // die Folgen beim Writer absehen ?
+ // => lieber einen krummen Wert als Default, aber der Programmierer
+ // sieht, dass dort etwas besonderes passiert.
+
+ SvxLineSpacingItem( USHORT nHeight /*= LINE_SPACE_DEFAULT_HEIGHT*/, const USHORT nId );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const IntlWrapper * = 0 ) const;
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const;
+
+ // Methoden zum Abfragen und Aendern
+ // Interlinespace wird zur Hoehe addiert.
+ inline short GetInterLineSpace() const { return nInterLineSpace; }
+ inline void SetInterLineSpace( const short nSpace )
+ {
+ nInterLineSpace = nSpace;
+ eInterLineSpace = SVX_INTER_LINE_SPACE_FIX;
+ }
+
+ // Bestimmt absolute oder minimale Zeilenhoehe.
+ inline USHORT GetLineHeight() const { return nLineHeight; }
+ inline void SetLineHeight( const USHORT nHeight )
+ {
+ nLineHeight = nHeight;
+ eLineSpace = SVX_LINE_SPACE_MIN;
+ }
+
+ // Vergroessert oder verkleinert die Zeilenhoehe.
+ BYTE GetPropLineSpace() const { return nPropLineSpace; }
+ inline void SetPropLineSpace( const BYTE nProp )
+ {
+ nPropLineSpace = nProp;
+ eInterLineSpace = SVX_INTER_LINE_SPACE_PROP;
+ }
+
+ inline SvxLineSpace &GetLineSpaceRule() { return eLineSpace; }
+ inline SvxLineSpace GetLineSpaceRule() const { return eLineSpace; }
+
+ inline SvxInterLineSpace &GetInterLineSpaceRule() { return eInterLineSpace; }
+ inline SvxInterLineSpace GetInterLineSpaceRule() const { return eInterLineSpace; }
+
+ virtual USHORT GetValueCount() const;
+ virtual String GetValueTextByPos( USHORT nPos ) const;
+ virtual USHORT GetEnumValue() const;
+ virtual void SetEnumValue( USHORT nNewVal );
+};
+
+#endif
+
diff --git a/editeng/inc/editeng/measfld.hxx b/editeng/inc/editeng/measfld.hxx
new file mode 100644
index 000000000000..4d81fd698f47
--- /dev/null
+++ b/editeng/inc/editeng/measfld.hxx
@@ -0,0 +1,69 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: svdfield.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _EDIT_MEASFIELD_HXX
+#define _EDIT_MEASFIELD_HXX
+
+#include <editeng/eeitem.hxx>
+
+#ifndef _FLDITEM_HXX
+#ifndef ITEMID_FIELD
+#ifndef _EDITDATA_HXX
+#include <editeng/editdata.hxx> /* das include wird wg. EE_FEATURE_FIELD benoetigt */
+#endif
+#define ITEMID_FIELD EE_FEATURE_FIELD /* wird fuer #include <editeng/flditem.hxx> benoetigt */
+#endif
+#include <editeng/flditem.hxx>
+#endif
+#include "editeng/editengdllapi.h"
+
+#define SDR_MEASUREFIELD 50
+
+class SdrMeasureObj;
+
+enum SdrMeasureFieldKind {SDRMEASUREFIELD_VALUE,SDRMEASUREFIELD_UNIT,SDRMEASUREFIELD_ROTA90BLANCS};
+
+class EDITENG_DLLPUBLIC SdrMeasureField: public SvxFieldData {
+ SdrMeasureFieldKind eMeasureFieldKind;
+public:
+ SV_DECL_PERSIST1(SdrMeasureField,SvxFieldData,SDR_MEASUREFIELD)
+ SdrMeasureField(): eMeasureFieldKind(SDRMEASUREFIELD_VALUE) {}
+ SdrMeasureField(SdrMeasureFieldKind eNewKind): eMeasureFieldKind(eNewKind) {}
+ virtual ~SdrMeasureField();
+ virtual SvxFieldData* Clone() const;
+ virtual int operator==(const SvxFieldData&) const;
+ SdrMeasureFieldKind GetMeasureFieldKind() const { return eMeasureFieldKind; }
+ void SetMeasureFieldKind(SdrMeasureFieldKind eNewKind) { eMeasureFieldKind=eNewKind; }
+};
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+#endif //_SVDFIELD_HXX
+
diff --git a/editeng/inc/editeng/memberids.hrc b/editeng/inc/editeng/memberids.hrc
new file mode 100644
index 000000000000..6bd88ebf164d
--- /dev/null
+++ b/editeng/inc/editeng/memberids.hrc
@@ -0,0 +1,196 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: unomid.hxx,v $
+ * $Revision: 1.3.212.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _EDT_UNOMID_HXX
+#define _EDT_UNOMID_HXX
+
+#include <svl/memberid.hrc>
+
+#define MID_LOCATION 0x3c
+#define MID_TRANSPARENT 0x4b
+#define MID_BG_COLOR 0x22
+#define MID_FLAGS 0x2e
+#define MID_DISTANCE 0x29
+#define MID_FG_COLOR 0x2c
+#define MID_OUTER_WIDTH 0x41
+#define MID_INNER_WIDTH 0x35
+#define MID_LINESPACE 0x3b
+
+//NameOrIndex
+#define MID_NAME 16
+#define MID_GRAFURL 32
+
+// SvxPageModelItem
+#define MID_AUTO 1
+
+// SvxTabStop
+#define MID_TABSTOPS 0
+#define MID_STD_TAB 1
+
+//SvxHyphenZoneItem
+#define MID_IS_HYPHEN 0
+#define MID_HYPHEN_MIN_LEAD 1
+#define MID_HYPHEN_MIN_TRAIL 2
+#define MID_HYPHEN_MAX_HYPHENS 3
+
+// SvxBoxInfoItem
+#define MID_HORIZONTAL 1
+#define MID_VERTICAL 2
+#define MID_VALIDFLAGS 4
+
+//AdjustItem
+#define MID_PARA_ADJUST 0
+#define MID_LAST_LINE_ADJUST 1
+#define MID_EXPAND_SINGLE 2
+
+//SvxFontItem
+// Don't use 0 as it used for the whole struct
+#define MID_FONT_FAMILY_NAME 1
+#define MID_FONT_STYLE_NAME 2
+#define MID_FONT_FAMILY 3
+#define MID_FONT_CHAR_SET 4
+#define MID_FONT_PITCH 5
+
+// SvxCharReliefItem
+#define MID_RELIEF 0
+
+//SvxCharRotateItem
+#define MID_ROTATE 0
+#define MID_FITTOLINE 1
+
+//SvxExcapementItem
+#define MID_ESC 0
+#define MID_ESC_HEIGHT 1
+#define MID_AUTO_ESC 2
+
+//SvxFontWidthItem
+#define MID_FONTWIDTH 0
+#define MID_FONTWIDTH_PROP 1
+
+//SvxFontHeightItem
+#define MID_FONTHEIGHT 1
+#define MID_FONTHEIGHT_PROP 2
+#define MID_FONTHEIGHT_DIFF 3
+
+//SvxTextLineItem
+#define MID_TEXTLINED 0
+#define MID_TL_STYLE 1
+#define MID_TL_COLOR 2
+#define MID_TL_HASCOLOR 3
+
+//SvxCrossedOutItem
+#define MID_CROSSED_OUT 0
+#define MID_CROSS_OUT 1
+
+//SvxPostureItem
+#define MID_ITALIC 0
+#define MID_POSTURE 1
+
+//SvxBoolItem
+#define MID_BOLD 0
+#define MID_WEIGHT 1
+
+//SvxLanguageItem
+#define MID_LANG_INT 0
+#define MID_LANG_LOCALE 1
+
+//SvxEmphasisMarkItem
+#define MID_EMPHASIS 0
+
+//SvxTwoLinesItem
+#define MID_TWOLINES 0
+#define MID_START_BRACKET 1
+#define MID_END_BRACKET 2
+
+//ULSpaceItem
+#define MID_UL_MARGIN 1
+#define MID_UL_REL_MARGIN 2
+#define MID_UP_MARGIN 3
+#define MID_LO_MARGIN 4
+#define MID_UP_REL_MARGIN 5
+#define MID_LO_REL_MARGIN 6
+
+//LRSpaceItem
+#define MID_LR_MARGIN 0
+#define MID_LRP_MARGIN 1
+#define MID_LR_REL_MARGIN 2
+#define MID_LRP_REL_MARGIN 3
+#define MID_L_MARGIN 4
+#define MID_R_MARGIN 5
+#define MID_L_REL_MARGIN 6
+#define MID_R_REL_MARGIN 7
+#define MID_FIRST_LINE_INDENT 8
+#define MID_FIRST_LINE_REL_INDENT 9
+#define MID_FIRST_AUTO 10
+#define MID_TXT_LMARGIN 11
+
+//ProtectItem
+#define MID_PROTECT_CONTENT 0
+#define MID_PROTECT_SIZE 1
+#define MID_PROTECT_POSITION 2
+
+//SvxBoxItem
+#define LEFT_BORDER 1
+#define RIGHT_BORDER 2
+#define TOP_BORDER 3
+#define BOTTOM_BORDER 4
+#define BORDER_DISTANCE 5
+#define LEFT_BORDER_DISTANCE 6
+#define RIGHT_BORDER_DISTANCE 7
+#define TOP_BORDER_DISTANCE 8
+#define BOTTOM_BORDER_DISTANCE 9
+#define MID_LEFT_BORDER 10
+#define MID_RIGHT_BORDER 11
+#define MID_TOP_BORDER 12
+#define MID_BOTTOM_BORDER 13
+
+//BrushItem
+#define MID_BACK_COLOR 0
+#define MID_GRAPHIC_POSITION 1
+#define MID_GRAPHIC_LINK 2
+#define MID_GRAPHIC 3
+#define MID_GRAPHIC_TRANSPARENT 4
+#define MID_GRAPHIC_URL 5
+#define MID_GRAPHIC_FILTER 6
+#define MID_GRAPHIC_REPEAT 7
+#define MID_GRAPHIC_TRANSPARENCY 8
+#define MID_BACK_COLOR_R_G_B 9
+#define MID_BACK_COLOR_TRANSPARENCY 10
+
+//SvxFmtBreakItem
+#define MID_BREAK_BEFORE 0
+#define MID_BREAK_AFTER 1
+
+//SvxCaseMapItem
+#define MID_CASEMAP_VARIANT 0
+#define MID_CASEMAP_TRANS 1
+
+
+
+#endif
diff --git a/editeng/inc/editeng/mutxhelp.hxx b/editeng/inc/editeng/mutxhelp.hxx
new file mode 100644
index 000000000000..559eed80914f
--- /dev/null
+++ b/editeng/inc/editeng/mutxhelp.hxx
@@ -0,0 +1,47 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: mutxhelp.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SVX_MUTXHELP_HXX
+#define _SVX_MUTXHELP_HXX
+
+#include <osl/mutex.hxx>
+
+class SvxMutexHelper
+{
+private:
+ ::osl::Mutex maMutex;
+
+public:
+ ::osl::Mutex& getMutex() { return maMutex; }
+};
+
+#endif
+
+
diff --git a/editeng/inc/editeng/nhypitem.hxx b/editeng/inc/editeng/nhypitem.hxx
new file mode 100644
index 000000000000..8cf0d157da37
--- /dev/null
+++ b/editeng/inc/editeng/nhypitem.hxx
@@ -0,0 +1,71 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: nhypitem.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_NHYPITEM_HXX
+#define _SVX_NHYPITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#include <svl/eitem.hxx>
+#include <editeng/editengdllapi.h>
+
+// class SvxNoHyphenItem -------------------------------------------------
+
+/* [Beschreibung]
+
+ PB: ???
+*/
+
+class EDITENG_DLLPUBLIC SvxNoHyphenItem : public SfxBoolItem
+{
+public:
+ TYPEINFO();
+
+ SvxNoHyphenItem( const BOOL bHyphen /*= TRUE*/,
+ const USHORT nId );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const IntlWrapper * = 0 ) const;
+
+ inline SvxNoHyphenItem& operator=(const SvxNoHyphenItem& rNHH)
+ {
+ SetValue( rNHH.GetValue() );
+ return *this;
+ }
+};
+
+#endif
+
diff --git a/editeng/inc/editeng/nlbkitem.hxx b/editeng/inc/editeng/nlbkitem.hxx
new file mode 100644
index 000000000000..5622b870a8e5
--- /dev/null
+++ b/editeng/inc/editeng/nlbkitem.hxx
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: nlbkitem.hxx,v $
+ * $Revision: 1.6 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_NLBKITEM_HXX
+#define _SVX_NLBKITEM_HXX
+
+// include ---------------------------------------------------------------
+
+
+#include <svl/eitem.hxx>
+#include "editeng/editengdllapi.h"
+
+// class SvxNoLinebreakItem ----------------------------------------------
+
+
+/* [Beschreibung]
+
+ PB: ???
+*/
+
+class EDITENG_DLLPUBLIC SvxNoLinebreakItem : public SfxBoolItem
+{
+public:
+ TYPEINFO();
+
+ SvxNoLinebreakItem( const BOOL bBreak /*= TRUE*/,
+ const USHORT nId );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const IntlWrapper * = 0 ) const;
+
+ inline SvxNoLinebreakItem& operator=(const SvxNoLinebreakItem& rLB)
+ {
+ SetValue( rLB.GetValue() );
+ return *this;
+ }
+};
+
+
+
+#endif
+
+
diff --git a/editeng/inc/editeng/numdef.hxx b/editeng/inc/editeng/numdef.hxx
new file mode 100644
index 000000000000..72e5edcde5b7
--- /dev/null
+++ b/editeng/inc/editeng/numdef.hxx
@@ -0,0 +1,33 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: numdef.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#define SVX_MAX_NUM 10 // max. moegliche Numerierungsebenen
+#define SVX_DEF_BULLET (0xF000 + 149)// Charakter fuer Aufzaehlungen
+
diff --git a/editeng/inc/editeng/numitem.hxx b/editeng/inc/editeng/numitem.hxx
new file mode 100644
index 000000000000..99507b8dddab
--- /dev/null
+++ b/editeng/inc/editeng/numitem.hxx
@@ -0,0 +1,399 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: numitem.hxx,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_NUMITEM_HXX
+#define _SVX_NUMITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#include <tools/link.hxx>
+#include <tools/string.hxx>
+#include <svl/poolitem.hxx>
+#include <editeng/svxenum.hxx>
+#include <tools/gen.hxx>
+#include <editeng/numdef.hxx>
+#include <tools/color.hxx>
+#include <cppuhelper/weakref.hxx>
+#include <com/sun/star/lang/Locale.hpp>
+#include <com/sun/star/uno/Reference.h>
+#include <com/sun/star/style/NumberingType.hpp>
+#include <unotools/fontcvt.hxx>
+#include <editeng/editengdllapi.h>
+
+class SvxBrushItem;
+class Font;
+class Graphic;
+class SvxNodeNum;
+class BitmapEx;
+namespace com{namespace sun{ namespace star{
+ namespace text{
+ class XNumberingFormatter;
+ }
+}}}
+
+// -----------------------------------------------------------------------
+//Feature-Flags (only USHORT!)
+#define NUM_CONTINUOUS 0x0001 // fortlaufende Numerierung moeglich?
+#define NUM_CHAR_TEXT_DISTANCE 0x0002 // Abstand Symbol<->Text?
+#define NUM_CHAR_STYLE 0x0004 // Zeichenvorlagen?
+#define NUM_BULLET_REL_SIZE 0x0008 // rel. Bulletgroesse?
+#define NUM_BULLET_COLOR 0x0010 // Bullet color
+#define NUM_SYMBOL_ALIGNMENT 0x0040 // alignment soll unter den Optionen angezeigt werden
+#define NUM_NO_NUMBERS 0x0080 // Numberierungen sind nicht erlaubt
+#define NUM_ENABLE_LINKED_BMP 0x0100 // linked bitmaps are available
+#define NUM_ENABLE_EMBEDDED_BMP 0x0200 // embedded bitmaps are available
+
+#define SVX_NO_NUM 200 // Markierung fuer keine Numerierung
+#define SVX_NO_NUMLEVEL 0x20
+
+#define LINK_TOKEN 0x80 //indicate linked bitmaps - for use in dialog only
+class EDITENG_DLLPUBLIC SvxNumberType
+{
+ static sal_Int32 nRefCount;
+ static com::sun::star::uno::Reference<com::sun::star::text::XNumberingFormatter> xFormatter;
+
+ sal_Int16 nNumType;
+ sal_Bool bShowSymbol; // Symbol auch anzeigen?
+
+public:
+ SvxNumberType(sal_Int16 nType = com::sun::star::style::NumberingType::ARABIC);
+ SvxNumberType(const SvxNumberType& rType);
+ ~SvxNumberType();
+
+ String GetNumStr( ULONG nNo ) const;
+ String GetNumStr( ULONG nNo, const com::sun::star::lang::Locale& rLocale ) const;
+
+ void SetNumberingType(sal_Int16 nSet) {nNumType = nSet;}
+ sal_Int16 GetNumberingType() const {return nNumType;}
+
+ void SetShowSymbol(sal_Bool bSet) {bShowSymbol = bSet;}
+ sal_Bool IsShowSymbol()const{return bShowSymbol;}
+
+ sal_Bool IsTxtFmt() const
+ {
+ return com::sun::star::style::NumberingType::NUMBER_NONE != nNumType &&
+ com::sun::star::style::NumberingType::CHAR_SPECIAL != nNumType &&
+ com::sun::star::style::NumberingType::BITMAP != nNumType;
+ }
+};
+
+class EDITENG_DLLPUBLIC SvxNumberFormat : public SvxNumberType
+{
+public:
+ // --> OD 2008-01-08 #newlistlevelattrs#
+ enum SvxNumPositionAndSpaceMode
+ {
+ LABEL_WIDTH_AND_POSITION,
+ LABEL_ALIGNMENT
+ };
+ enum SvxNumLabelFollowedBy
+ {
+ LISTTAB,
+ SPACE,
+ NOTHING
+ };
+ // <--
+
+private:
+ String sPrefix;
+ String sSuffix;
+
+ SvxAdjust eNumAdjust;
+
+ BYTE nInclUpperLevels; //Nummern aus der vorigen Ebenen uebernehmen
+ USHORT nStart; //Start der Zaehlung
+
+ sal_Unicode cBullet; //Symbol
+ USHORT nBulletRelSize; //proz. Groesse des Bullets
+ Color nBulletColor; //Bullet color
+
+ // --> OD 2008-01-08 #newlistlevelattrs#
+ // mode indicating, if the position and spacing of the list label is
+ // determined by the former attributes (nFirstLineOffset, nAbsLSpace,
+ // nLSpace and nCharTextDistance) called position and spacing via label
+ // width and position (LABEL_WIDTH_AND_POSITION) or by the new attributes
+ // (meLabelFollowedBy, mnListtabPos, mnFirstLineIndent and mnIndentAt)
+ // called position and spacing via label alignment.
+ // Note 1: Attribute <eNumAdjust> is relevant for both modes.
+ // Note 2: The values of the former attributes are treated as 0, if mode
+ // LABEL_ALIGNMENT is active.
+ SvxNumPositionAndSpaceMode mePositionAndSpaceMode;
+ // <--
+
+ short nFirstLineOffset; //Erstzeileneinzug
+ short nAbsLSpace; //Abstand Rand<->Nummer
+ short nLSpace; //relative Einrueckung zum Vorgaenger
+ short nCharTextDistance; //Abstand Nummer<->Text
+
+ // --> OD 2008-01-08 #newlistlevelattrs#
+ // specifies what follows the list label before the text of the first line
+ // of the list item starts
+ SvxNumLabelFollowedBy meLabelFollowedBy;
+ // specifies an additional list tab stop position for meLabelFollowedBy = LISTTAB
+ long mnListtabPos;
+ // specifies the first line indent
+ long mnFirstLineIndent;
+ // specifies the indent before the text, e.g. in L2R-layout the left margin
+ long mnIndentAt;
+ // <--
+
+ SvxBrushItem* pGraphicBrush; //
+ sal_Int16 eVertOrient; // vert. Ausrichtung einer Bitmap
+
+ Size aGraphicSize; // immer! in 1/100 mm
+ Font* pBulletFont; // Pointer auf den BulletFont
+
+ String sCharStyleName; // Zeichenvorlage
+
+ BitmapEx* pScaledImageCache; // Image scaled to aGraphicSize, only cached for WINDOW/VDEV
+
+ DECL_STATIC_LINK( SvxNumberFormat, GraphicArrived, void * );
+ virtual void NotifyGraphicArrived();
+public:
+ // --> OD 2008-01-09 #newlistlevelattrs#
+ SvxNumberFormat( sal_Int16 nNumberingType,
+ SvxNumPositionAndSpaceMode ePositionAndSpaceMode = LABEL_WIDTH_AND_POSITION );
+ // <--
+ SvxNumberFormat(const SvxNumberFormat& rFormat);
+ SvxNumberFormat(SvStream &rStream);
+
+ virtual ~SvxNumberFormat();
+
+ SvStream& Store(SvStream &rStream, FontToSubsFontConverter pConverter);
+
+ SvxNumberFormat& operator=( const SvxNumberFormat& );
+ BOOL operator==( const SvxNumberFormat& ) const;
+ BOOL operator!=( const SvxNumberFormat& rFmt) const {return !(*this == rFmt);}
+
+ void SetNumAdjust(SvxAdjust eSet) {eNumAdjust = eSet;}
+ SvxAdjust GetNumAdjust() const {return eNumAdjust;}
+ void SetPrefix(const String& rSet) { sPrefix = rSet;}
+ const String& GetPrefix() const { return sPrefix;}
+ void SetSuffix(const String& rSet) { sSuffix = rSet;}
+ const String& GetSuffix() const { return sSuffix;}
+
+ void SetCharFmtName(const String& rSet){ sCharStyleName = rSet; }
+ virtual const String& GetCharFmtName()const;
+
+ void SetBulletFont(const Font* pFont);
+ const Font* GetBulletFont() const {return pBulletFont;}
+ void SetBulletChar(sal_Unicode cSet){cBullet = cSet;}
+ sal_Unicode GetBulletChar()const {return cBullet;}
+ void SetBulletRelSize(USHORT nSet) {nBulletRelSize = nSet;}
+ USHORT GetBulletRelSize() const { return nBulletRelSize;}
+ void SetBulletColor(Color nSet){nBulletColor = nSet;}
+ Color GetBulletColor()const {return nBulletColor;}
+
+ void SetIncludeUpperLevels( BYTE nSet ) { nInclUpperLevels = nSet;}
+ BYTE GetIncludeUpperLevels()const { return nInclUpperLevels;}
+ void SetStart(USHORT nSet) {nStart = nSet;}
+ USHORT GetStart() const {return nStart;}
+
+ virtual void SetGraphicBrush( const SvxBrushItem* pBrushItem, const Size* pSize = 0, const sal_Int16* pOrient = 0);
+ const SvxBrushItem* GetBrush() const {return pGraphicBrush;}
+ void SetGraphic( const String& rName );
+ virtual void SetVertOrient(sal_Int16 eSet);
+ virtual sal_Int16 GetVertOrient() const;
+ void SetGraphicSize(const Size& rSet) {aGraphicSize = rSet;}
+ const Size& GetGraphicSize() const {return aGraphicSize;}
+
+ // --> OD 2008-01-09 #newlistlevelattrs#
+ SvxNumPositionAndSpaceMode GetPositionAndSpaceMode() const;
+ void SetPositionAndSpaceMode( SvxNumPositionAndSpaceMode ePositionAndSpaceMode );
+ // <--
+
+ void SetLSpace(short nSet) {nLSpace = nSet;}
+ // --> OD 2008-01-09 #newlistlevelattrs#
+ short GetLSpace() const;
+ // <--
+ void SetAbsLSpace(short nSet) {nAbsLSpace = nSet;}
+ // --> OD 2008-01-09 #newlistlevelattrs#
+ short GetAbsLSpace() const;
+ // <--
+ void SetFirstLineOffset(short nSet) { nFirstLineOffset = nSet;}
+ // --> OD 2008-01-09 #newlistlevelattrs#
+ short GetFirstLineOffset() const;
+ // <--
+ void SetCharTextDistance(short nSet) { nCharTextDistance = nSet; }
+ // --> OD 2008-01-09 #newlistlevelattrs#
+ short GetCharTextDistance() const;
+ // <--
+
+ // --> OD 2008-01-09 #newlistlevelattrs#
+ void SetLabelFollowedBy( const SvxNumLabelFollowedBy eLabelFollowedBy );
+ SvxNumLabelFollowedBy GetLabelFollowedBy() const;
+ void SetListtabPos( const long nListtabPos );
+ long GetListtabPos() const;
+ void SetFirstLineIndent( const long nFirstLineIndent );
+ long GetFirstLineIndent() const;
+ void SetIndentAt( const long nIndentAt );
+ long GetIndentAt() const;
+ // <--
+
+ static Size GetGraphicSizeMM100(const Graphic* pGraphic);
+ static String CreateRomanString( ULONG nNo, BOOL bUpper );
+};
+
+enum SvxNumRuleType
+{
+ SVX_RULETYPE_NUMBERING,
+ SVX_RULETYPE_OUTLINE_NUMBERING,
+ SVX_RULETYPE_PRESENTATION_NUMBERING,
+ SVX_RULETYPE_END
+};
+
+class EDITENG_DLLPUBLIC SvxNumRule
+{
+ USHORT nLevelCount; // Anzahl der unterstuetzten Levels
+ ULONG nFeatureFlags; // was wird unterstuetzt?
+ SvxNumRuleType eNumberingType; // was fuer eine Numerierung
+ BOOL bContinuousNumbering; // fortlaufende Numerierung
+
+ SvxNumberFormat* aFmts[SVX_MAX_NUM];
+ BOOL aFmtsSet[SVX_MAX_NUM]; //Flags ueber Gueltigkeit der Ebenen
+
+ static sal_Int32 nRefCount;
+ com::sun::star::lang::Locale aLocale;
+public:
+ // --> OD 2008-02-11 #newlistlevelattrs#
+ SvxNumRule( ULONG nFeatures,
+ USHORT nLevels,
+ BOOL bCont,
+ SvxNumRuleType eType = SVX_RULETYPE_NUMBERING,
+ SvxNumberFormat::SvxNumPositionAndSpaceMode
+ eDefaultNumberFormatPositionAndSpaceMode
+ = SvxNumberFormat::LABEL_WIDTH_AND_POSITION );
+ // <--
+ SvxNumRule(const SvxNumRule& rCopy);
+ SvxNumRule(SvStream &rStream);
+ virtual ~SvxNumRule();
+
+ int operator==( const SvxNumRule& ) const;
+ int operator!=( const SvxNumRule& rRule ) const {return !(*this == rRule);}
+
+ SvxNumRule& operator=( const SvxNumRule& );
+
+ SvStream& Store(SvStream &rStream);
+
+ const SvxNumberFormat* Get(USHORT nLevel)const;
+ const SvxNumberFormat& GetLevel(USHORT nLevel)const;
+ void SetLevel(USHORT nLevel, const SvxNumberFormat& rFmt, BOOL bIsValid = TRUE);
+ void SetLevel(USHORT nLevel, const SvxNumberFormat* pFmt);
+
+ BOOL IsContinuousNumbering()const
+ {return bContinuousNumbering;}
+ void SetContinuousNumbering(BOOL bSet)
+ {bContinuousNumbering = bSet;}
+
+ USHORT GetLevelCount() const {return nLevelCount;}
+ BOOL IsFeatureSupported(ULONG nFeature) const
+ {return 0 != (nFeatureFlags & nFeature);}
+ ULONG GetFeatureFlags() const {return nFeatureFlags;}
+ void SetFeatureFlag( ULONG nFlag, BOOL bSet = TRUE ) { if(bSet) nFeatureFlags |= nFlag; else nFeatureFlags &= ~nFlag; }
+
+ String MakeNumString( const SvxNodeNum&, BOOL bInclStrings = TRUE ) const;
+
+ SvxNumRuleType GetNumRuleType() const { return eNumberingType; }
+ void SetNumRuleType( const SvxNumRuleType& rType ) { eNumberingType = rType; }
+
+ BOOL UnLinkGraphics();
+};
+/* -----------------27.10.98 13:04-------------------
+ *
+ * --------------------------------------------------*/
+class EDITENG_DLLPUBLIC SvxNumBulletItem : public SfxPoolItem
+{
+ SvxNumRule* pNumRule;
+public:
+ SvxNumBulletItem(SvxNumRule& rRule);
+ SvxNumBulletItem(SvxNumRule& rRule, USHORT nWhich );
+ SvxNumBulletItem(const SvxNumBulletItem& rCopy);
+ virtual ~SvxNumBulletItem();
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ USHORT GetVersion( USHORT nFileVersion ) const;
+ virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const;
+ virtual int operator==( const SfxPoolItem& ) const;
+
+ SvxNumRule* GetNumRule() const {return pNumRule;}
+
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+};
+/* -----------------28.10.98 15:21-------------------
+ *
+ * --------------------------------------------------*/
+class SvxNodeNum
+{
+ USHORT nLevelVal[ SVX_MAX_NUM ]; // Nummern aller Levels
+ USHORT nSetValue; // vorgegebene Nummer
+ BYTE nMyLevel; // akt. Level
+ BOOL bStartNum; // Numerierung neu starten
+
+public:
+ inline SvxNodeNum( BYTE nLevel = SVX_NO_NUM, USHORT nSetVal = USHRT_MAX );
+ inline SvxNodeNum& operator=( const SvxNodeNum& rCpy );
+
+ BYTE GetLevel() const { return nMyLevel; }
+ void SetLevel( BYTE nVal ) { nMyLevel = nVal; }
+
+ BOOL IsStart() const { return bStartNum; }
+ void SetStart( BOOL bFlag = TRUE ) { bStartNum = bFlag; }
+
+ USHORT GetSetValue() const { return nSetValue; }
+ void SetSetValue( USHORT nVal ) { nSetValue = nVal; }
+
+ const USHORT* GetLevelVal() const { return nLevelVal; }
+ USHORT* GetLevelVal() { return nLevelVal; }
+};
+
+SvxNodeNum::SvxNodeNum( BYTE nLevel, USHORT nSetVal )
+ : nSetValue( nSetVal ), nMyLevel( nLevel ), bStartNum( FALSE )
+{
+ memset( nLevelVal, 0, sizeof( nLevelVal ) );
+}
+
+inline SvxNodeNum& SvxNodeNum::operator=( const SvxNodeNum& rCpy )
+{
+ nSetValue = rCpy.nSetValue;
+ nMyLevel = rCpy.nMyLevel;
+ bStartNum = rCpy.bStartNum;
+
+ memcpy( nLevelVal, rCpy.nLevelVal, sizeof( nLevelVal ) );
+ return *this;
+}
+
+/* --------------------------------------------------
+ *
+ * --------------------------------------------------*/
+SvxNumRule* SvxConvertNumRule( const SvxNumRule* pRule, USHORT nLevel, SvxNumRuleType eType );
+
+#endif
+
diff --git a/editeng/inc/editeng/opaqitem.hxx b/editeng/inc/editeng/opaqitem.hxx
new file mode 100644
index 000000000000..d05a0f183d0b
--- /dev/null
+++ b/editeng/inc/editeng/opaqitem.hxx
@@ -0,0 +1,84 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: opaqitem.hxx,v $
+ * $Revision: 1.9 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_OPAQITEM_HXX
+#define _SVX_OPAQITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#include <svl/eitem.hxx>
+#include "editeng/editengdllapi.h"
+
+class SvXMLUnitConverter;
+namespace rtl
+{
+ class OUString;
+}
+
+// class SvxOpaqueItem ---------------------------------------------------
+
+
+/*
+[Beschreibung]
+Dieses Item beschreibt eine logische Variable "Undurchsichtig ja oder nein".
+*/
+
+class EDITENG_DLLPUBLIC SvxOpaqueItem : public SfxBoolItem
+{
+public:
+ TYPEINFO();
+
+ SvxOpaqueItem( const USHORT nId , const BOOL bOpa = TRUE );
+ inline SvxOpaqueItem &operator=( const SvxOpaqueItem &rCpy );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const;
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const IntlWrapper * = 0 ) const;
+};
+
+inline SvxOpaqueItem::SvxOpaqueItem( const USHORT nId, const BOOL bOpa )
+ : SfxBoolItem( nId, bOpa )
+{}
+
+inline SvxOpaqueItem &SvxOpaqueItem::operator=( const SvxOpaqueItem &rCpy )
+{
+ SetValue( rCpy.GetValue() );
+ return *this;
+}
+
+
+
+#endif
+
diff --git a/editeng/inc/editeng/optitems.hxx b/editeng/inc/editeng/optitems.hxx
new file mode 100644
index 000000000000..1dd586da29c7
--- /dev/null
+++ b/editeng/inc/editeng/optitems.hxx
@@ -0,0 +1,114 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: optitems.hxx,v $
+ * $Revision: 1.7 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _EDITENG_OPTITEMS_HXX
+#define _EDITENG_OPTITEMS_HXX
+
+// include ---------------------------------------------------------------
+
+#include <svl/poolitem.hxx>
+#include <com/sun/star/uno/Reference.hxx>
+#include <editeng/editengdllapi.h>
+
+// forward ---------------------------------------------------------------
+namespace com { namespace sun { namespace star {
+namespace linguistic2{
+ class XSpellChecker1;
+}}}}
+
+
+// class SfxSpellCheckItem -----------------------------------------------
+
+class EDITENG_DLLPUBLIC SfxSpellCheckItem: public SfxPoolItem
+{
+public:
+ TYPEINFO();
+
+ SfxSpellCheckItem( ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XSpellChecker1 > &xChecker,
+ sal_uInt16 nWhich );
+ SfxSpellCheckItem( const SfxSpellCheckItem& rItem );
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const IntlWrapper * = 0 ) const;
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual int operator==( const SfxPoolItem& ) const;
+
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XSpellChecker1 >
+ GetXSpellChecker() const { return xSpellCheck; }
+
+private:
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XSpellChecker1 > xSpellCheck;
+};
+
+
+// class SfxHyphenRegionItem ---------------------------------------------
+
+class EDITENG_DLLPUBLIC SfxHyphenRegionItem: public SfxPoolItem
+{
+ sal_uInt8 nMinLead;
+ sal_uInt8 nMinTrail;
+
+public:
+ TYPEINFO();
+
+ SfxHyphenRegionItem( const sal_uInt16 nId );
+ SfxHyphenRegionItem( const SfxHyphenRegionItem& rItem );
+
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const IntlWrapper * = 0 ) const;
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create( SvStream& rStrm, sal_uInt16 nVer ) const;
+ virtual SvStream& Store( SvStream& rStrm, sal_uInt16 ) const;
+
+ inline sal_uInt8 &GetMinLead() { return nMinLead; }
+ inline sal_uInt8 GetMinLead() const { return nMinLead; }
+
+ inline sal_uInt8 &GetMinTrail() { return nMinTrail; }
+ inline sal_uInt8 GetMinTrail() const { return nMinTrail; }
+
+ inline SfxHyphenRegionItem& operator=( const SfxHyphenRegionItem& rNew )
+ {
+ nMinLead = rNew.GetMinLead();
+ nMinTrail = rNew.GetMinTrail();
+ return *this;
+ }
+};
+
+#endif
+
diff --git a/editeng/inc/editeng/orphitem.hxx b/editeng/inc/editeng/orphitem.hxx
new file mode 100644
index 000000000000..e648fd57b11f
--- /dev/null
+++ b/editeng/inc/editeng/orphitem.hxx
@@ -0,0 +1,77 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: orphitem.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_ORPHITEM_HXX
+#define _SVX_ORPHITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#include <svl/intitem.hxx>
+#include <editeng/editengdllapi.h>
+
+class SvXMLUnitConverter;
+namespace rtl
+{
+ class OUString;
+}
+
+// class SvxOrphansItem --------------------------------------------------
+
+/*
+[Beschreibung]
+Dieses Item beschreibt die Anzahl der Zeilen fuer die Schusterjungenregelung.
+*/
+
+class EDITENG_DLLPUBLIC SvxOrphansItem: public SfxByteItem
+{
+ friend SvStream & operator<<( SvStream & aS, SvxOrphansItem & );
+public:
+ TYPEINFO();
+
+ SvxOrphansItem( const BYTE nL /*= 0*/, const USHORT nId );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const;
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const IntlWrapper * = 0 ) const;
+
+ inline SvxOrphansItem& operator=( const SvxOrphansItem& rOrphans )
+ {
+ SetValue( rOrphans.GetValue() );
+ return *this;
+ }
+};
+
+#endif
+
diff --git a/editeng/inc/editeng/outliner.hxx b/editeng/inc/editeng/outliner.hxx
new file mode 100644
index 000000000000..39384b56f70e
--- /dev/null
+++ b/editeng/inc/editeng/outliner.hxx
@@ -0,0 +1,1050 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: outliner.hxx,v $
+ * $Revision: 1.6.16.2 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _OUTLINER_HXX
+#define _OUTLINER_HXX
+
+#include <tools/gen.hxx>
+#include <tools/string.hxx>
+#include <tools/debug.hxx>
+
+#include <svl/brdcst.hxx>
+
+#include <editeng/editdata.hxx>
+#include <i18npool/lang.h>
+#include <tools/color.hxx>
+#include <vcl/graph.hxx>
+#include <tools/list.hxx>
+#include <tools/link.hxx>
+#include <rsc/rscsfx.hxx>
+#include "editeng/editengdllapi.h"
+
+#include <svtools/grfmgr.hxx>
+
+#include <tools/rtti.hxx> // wegen typedef TypeId
+#include <vector>
+
+class OutlinerEditEng;
+class Outliner;
+class EditView;
+class EditUndo;
+class ParagraphList;
+class OutlinerParaObject;
+class SvStream;
+class SvxBulletItem;
+class SvxFont;
+class SvxSearchItem;
+class SvxFieldItem;
+class OLUndoRemove;
+class Window;
+class KeyEvent;
+class MouseEvent;
+class Pointer;
+class CommandEvent;
+class MapMode;
+class OutputDevice;
+class PolyPolygon;
+class SfxStyleSheetPool;
+class SfxStyleSheet;
+class SfxItemPool;
+class SfxItemSet;
+class SvxNumBulletItem;
+class SvxNumberFormat;
+class SvxLRSpaceItem;
+class SfxUndoManager;
+class EditEngine;
+class SvKeyValueIterator;
+class SvxForbiddenCharactersTable;
+#include <com/sun/star/uno/Reference.h>
+
+#include <vos/ref.hxx>
+#include <editeng/svxfont.hxx>
+#include <editeng/eedata.hxx>
+#include <editeng/paragraphdata.hxx>
+
+class SvxFieldData;
+//////////////////////////////////////////////////////////////////////////////
+
+namespace com { namespace sun { namespace star { namespace linguistic2 {
+ class XSpellChecker1;
+ class XHyphenator;
+}}}}
+namespace svx{
+struct SpellPortion;
+typedef std::vector<SpellPortion> SpellPortions;
+}
+
+namespace basegfx { class B2DPolyPolygon; }
+
+// nur interner Gebrauch!
+#define PARAFLAG_DROPTARGET 0x1000
+#define PARAFLAG_DROPTARGET_EMPTY 0x2000
+#define PARAFLAG_HOLDDEPTH 0x4000
+#define PARAFLAG_SETBULLETTEXT 0x8000
+#define PARAFLAG_ISPAGE 0x0100
+
+// Undo-Action-Ids
+#define OLUNDO_DEPTH EDITUNDO_USER
+// #define OLUNDO_HEIGHT EDITUNDO_USER+1
+#define OLUNDO_EXPAND EDITUNDO_USER+2
+#define OLUNDO_COLLAPSE EDITUNDO_USER+3
+// #define OLUNDO_REMOVE EDITUNDO_USER+4
+#define OLUNDO_ATTR EDITUNDO_USER+5
+#define OLUNDO_INSERT EDITUNDO_USER+6
+// #define OLUNDO_MOVEPARAGRAPHS EDITUNDO_USER+7
+#define OLUNDO_CHECKPARA EDITUNDO_USER+8
+
+class Paragraph : protected ParagraphData
+{
+private:
+ friend class Outliner;
+ friend class ParagraphList;
+ friend class OutlinerView;
+ friend class OutlinerParaObject;
+ friend class OutlinerEditEng;
+ friend class OLUndoDepth;
+ friend class OutlinerUndoCheckPara;
+ friend class OutlinerUndoChangeParaFlags;
+
+ Paragraph& operator=(const Paragraph& rPara );
+
+ USHORT nFlags;
+ XubString aBulText;
+ Size aBulSize;
+ BOOL bVisible;
+
+ BOOL IsVisible() const { return bVisible; }
+ void SetText( const XubString& rText ) { aBulText = rText; aBulSize.Width() = -1; }
+ void Invalidate() { aBulSize.Width() = -1; }
+ void SetDepth( sal_Int16 nNewDepth ) { nDepth = nNewDepth; aBulSize.Width() = -1; }
+ const XubString& GetText() const { return aBulText; }
+
+ Paragraph( sal_Int16 nDepth );
+ Paragraph( const Paragraph& );
+ Paragraph( const ParagraphData& );
+ ~Paragraph();
+
+ sal_Int16 GetDepth() const { return nDepth; }
+
+ sal_Int16 GetNumberingStartValue() const { return mnNumberingStartValue; }
+ void SetNumberingStartValue( sal_Int16 nNumberingStartValue );
+
+ sal_Bool IsParaIsNumberingRestart() const { return mbParaIsNumberingRestart; }
+ void SetParaIsNumberingRestart( sal_Bool bParaIsNumberingRestart );
+
+ void SetFlag( USHORT nFlag ) { nFlags |= nFlag; }
+ void RemoveFlag( USHORT nFlag ) { nFlags &= ~nFlag; }
+ bool HasFlag( USHORT nFlag ) const { return (nFlags & nFlag) != 0; }
+};
+
+struct ParaRange
+{
+ USHORT nStartPara;
+ USHORT nEndPara;
+
+ ParaRange( USHORT nS, USHORT nE ) { nStartPara = nS, nEndPara = nE; }
+
+ void Adjust();
+ USHORT Len() const { return 1 + ( ( nEndPara > nStartPara ) ? (nEndPara-nStartPara) : (nStartPara-nEndPara) ); }
+};
+
+inline void ParaRange::Adjust()
+{
+ if ( nStartPara > nEndPara )
+ {
+ USHORT nTmp = nStartPara;
+ nStartPara = nEndPara;
+ nEndPara = nTmp;
+ }
+}
+
+#define OL_ROOTPARENT (Paragraph*)NULL
+
+class EDITENG_DLLPUBLIC OutlinerView
+{
+ friend class Outliner;
+
+private:
+
+ Outliner* pOwner;
+ EditView* pEditView;
+
+ // Drag & Drop
+ BOOL bBeginDragAtMove_OLDMEMBER;
+ BOOL bInDragMode;
+ Point aDDStartPosRef;
+ Point aDDStartPosPix;
+ ULONG nDDStartPara;
+ ULONG nDDStartParaVisChildCount;
+ ULONG nDDCurPara;
+ USHORT nDDStartDepth;
+ USHORT nDDCurDepth;
+ USHORT nDDMaxDepth;
+ BOOL bDDChangingDepth;
+ BOOL bDDCursorVisible;
+ long* pHorTabArrDoc;
+ long nDDScrollLRBorderWidthWin; // Left Right
+ long nDDScrollTBBorderWidthWin; // Top Bottom
+ long nDDScrollLROffs;
+ long nDDScrollTDOffs;
+
+ void* pDummy;
+ ULONG nDummy;
+
+ enum MouseTarget {
+ MouseText = 0,
+ MouseBullet = 1,
+ MouseHypertext = 2, // ausserhalb OutputArea
+ MouseOutside = 3, // ausserhalb OutputArea
+ MouseDontKnow = 4
+ };
+ MouseTarget OLD_ePrevMouseTarget;
+
+#ifdef _OUTLINER_CXX
+
+ EDITENG_DLLPRIVATE void ImplExpandOrCollaps( USHORT nStartPara, USHORT nEndPara, BOOL bExpand );
+
+ EDITENG_DLLPRIVATE ULONG ImpCheckMousePos( const Point& rPosPixel, MouseTarget& reTarget);
+ EDITENG_DLLPRIVATE void ImpToggleExpand( Paragraph* pParentPara );
+ EDITENG_DLLPRIVATE ParaRange ImpGetSelectedParagraphs( BOOL bIncludeHiddenChilds );
+ EDITENG_DLLPRIVATE void ImpHideDDCursor();
+ EDITENG_DLLPRIVATE void ImpShowDDCursor();
+ EDITENG_DLLPRIVATE void ImpPaintDDCursor();
+
+ EDITENG_DLLPRIVATE void ImpDragScroll( const Point& rPosPix );
+ EDITENG_DLLPRIVATE void ImpScrollLeft();
+ EDITENG_DLLPRIVATE void ImpScrollRight();
+ EDITENG_DLLPRIVATE void ImpScrollUp();
+ EDITENG_DLLPRIVATE void ImpScrollDown();
+
+ EDITENG_DLLPRIVATE ULONG ImpGetInsertionPara( const Point& rPosPixel );
+ EDITENG_DLLPRIVATE Point ImpGetDocPos( const Point& rPosPixel );
+ EDITENG_DLLPRIVATE Pointer ImpGetMousePointer( MouseTarget eTarget );
+ EDITENG_DLLPRIVATE USHORT ImpInitPaste( ULONG& rStart );
+ EDITENG_DLLPRIVATE void ImpPasted( ULONG nStart, ULONG nPrevParaCount, USHORT nSize);
+ EDITENG_DLLPRIVATE USHORT ImpCalcSelectedPages( BOOL bIncludeFirstSelected );
+ EDITENG_DLLPRIVATE BOOL ImpIsIndentingPages();
+
+#endif
+
+public:
+ OutlinerView( Outliner* pOut, Window* pWindow );
+ virtual ~OutlinerView();
+
+ EditView& GetEditView() const { return *pEditView; }
+
+ void Scroll( long nHorzScroll, long nVertScroll );
+
+ void Paint( const Rectangle& rRect );
+ BOOL PostKeyEvent( const KeyEvent& rKEvt );
+ BOOL MouseButtonDown( const MouseEvent& );
+ BOOL MouseButtonUp( const MouseEvent& );
+ BOOL MouseMove( const MouseEvent& );
+
+ void ShowCursor( BOOL bGotoCursor = TRUE );
+ void HideCursor();
+
+ void SetOutliner( Outliner* pOutliner );
+ Outliner* GetOutliner() const { return pOwner; }
+
+ void SetWindow( Window* pWindow );
+ Window* GetWindow() const;
+
+ void SetReadOnly( BOOL bReadOnly );
+ BOOL IsReadOnly() const;
+
+ void SetOutputArea( const Rectangle& rRect );
+ Rectangle GetOutputArea() const;
+
+ Rectangle GetVisArea() const;
+
+ List* CreateSelectionList();
+
+ // gibt Anzahl selektierter Absaetze zurueck
+ // MT 07/00: Who needs this?
+ ULONG Select( Paragraph* pParagraph,
+ BOOL bSelect=TRUE,
+ BOOL bWChilds=TRUE);
+
+ String GetSelected() const;
+ void SelectRange( ULONG nFirst, USHORT nCount );
+ void SetAttribs( const SfxItemSet& );
+ void Indent( short nDiff );
+ void AdjustDepth( short nDX ); // Spaeter gegeb Indent ersetzen!
+
+ BOOL AdjustHeight( long nDY );
+ void AdjustDepth( Paragraph* pPara, short nDX,
+ BOOL bWithChilds = FALSE );
+ void AdjustHeight( Paragraph* pPara, long nDY,
+ BOOL bWithChilds=FALSE );
+
+ ULONG Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFormat, BOOL bSelect = FALSE, SvKeyValueIterator* pHTTPHeaderAttrs = NULL );
+ ULONG Write( SvStream& rOutput, EETextFormat eFormat );
+
+ void InsertText( const String& rNew, BOOL bSelect = FALSE );
+ void InsertText( const OutlinerParaObject& rParaObj );
+ void Expand();
+ void Collapse();
+ void Expand( Paragraph* );
+ void Collapse( Paragraph* );
+ void ExpandAll();
+ void CollapseAll();
+
+ void SetBackgroundColor( const Color& rColor );
+ Color GetBackgroundColor();
+
+ SfxItemSet GetAttribs();
+
+ void Cut();
+ void Copy();
+ void Paste();
+ void PasteSpecial();
+ void EnablePaste( BOOL bEnable );
+
+ void Undo();
+ void Redo();
+
+ void SetStyleSheet( SfxStyleSheet* );
+ SfxStyleSheet* GetStyleSheet() const;
+
+ void SetControlWord( ULONG nWord );
+ ULONG GetControlWord() const;
+
+ void SetAnchorMode( EVAnchorMode eMode );
+ EVAnchorMode GetAnchorMode() const;
+
+ Pointer GetPointer( const Point& rPosPixel );
+ void Command( const CommandEvent& rCEvt );
+ void RemoveCharAttribs( ULONG nPara, USHORT nWhich = 0 );
+
+ void CompleteAutoCorrect();
+
+ EESpellState StartSpeller( BOOL bMultipleDoc = FALSE );
+ EESpellState StartThesaurus();
+ USHORT StartSearchAndReplace( const SvxSearchItem& rSearchItem );
+
+ // for text conversion
+ void StartTextConversion( LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont, INT32 nOptions, BOOL bIsInteractive, BOOL bMultipleDoc );
+
+ void TransliterateText( sal_Int32 nTransliterationMode );
+
+ ESelection GetSelection();
+
+ USHORT GetSelectedScriptType() const;
+
+ void SetVisArea( const Rectangle& rRec );
+ void SetSelection( const ESelection& );
+
+ void RemoveAttribs( BOOL bRemoveParaAttribs = FALSE, USHORT nWhich = 0, BOOL bKeepLanguages = FALSE );
+ void RemoveAttribsKeepLanguages( BOOL bRemoveParaAttribs );
+ BOOL HasSelection() const;
+
+ void InsertField( const SvxFieldItem& rFld );
+ const SvxFieldItem* GetFieldUnderMousePointer() const;
+ const SvxFieldItem* GetFieldUnderMousePointer( USHORT& nPara, xub_StrLen& nPos ) const;
+ const SvxFieldItem* GetFieldAtSelection() const;
+
+ /** enables numbering for the selected paragraphs if the numbering of the first paragraph is off
+ or disables numbering for the selected paragraphs if the numbering of the first paragraph is on
+ */
+ void ToggleBullets();
+
+ /** enables numbering for the selected paragraphs that are not enabled and ignore all selected
+ paragraphs that already have numbering enabled.
+ */
+ void EnableBullets();
+
+ BOOL IsCursorAtWrongSpelledWord( BOOL bMarkIfWrong = FALSE );
+ BOOL IsWrongSpelledWordAtPos( const Point& rPosPixel, BOOL bMarkIfWrong = FALSE );
+ void SpellIgnoreWord();
+ void ExecuteSpellPopup( const Point& rPosPixel, Link* pCallBack = 0 );
+
+ void SetInvalidateMore( USHORT nPixel );
+ USHORT GetInvalidateMore() const;
+
+ String GetSurroundingText() const;
+ Selection GetSurroundingTextSelection() const;
+};
+
+//#if 0 // _SOLAR__PRIVATE
+DECLARE_LIST(ViewList,OutlinerView*)
+//#else
+//typedef List ViewList;
+//#endif
+
+class EDITENG_DLLPUBLIC DrawPortionInfo
+{
+public:
+ const Point& mrStartPos;
+ const String& mrText;
+ sal_uInt16 mnTextStart;
+ sal_uInt16 mnTextLen;
+ sal_uInt16 mnPara;
+ xub_StrLen mnIndex;
+ const SvxFont& mrFont;
+ const sal_Int32* mpDXArray;
+
+ const EEngineData::WrongSpellVector* mpWrongSpellVector;
+ const SvxFieldData* mpFieldData;
+ const ::com::sun::star::lang::Locale* mpLocale;
+ const Color maOverlineColor;
+ const Color maTextLineColor;
+
+ // #101498# BiDi level needs to be transported, too.
+ BYTE mnBiDiLevel;
+
+ // bitfield
+ unsigned mbEndOfLine : 1;
+ unsigned mbEndOfParagraph : 1;
+ unsigned mbEndOfBullet : 1;
+
+ BYTE GetBiDiLevel() const { return mnBiDiLevel; }
+ sal_Bool IsRTL() const;
+
+ DrawPortionInfo(
+ const Point& rPos,
+ const String& rTxt,
+ sal_uInt16 nTxtStart,
+ sal_uInt16 nTxtLen,
+ const SvxFont& rFnt,
+ sal_uInt16 nPar,
+ xub_StrLen nIdx,
+ const sal_Int32* pDXArr,
+ const EEngineData::WrongSpellVector* pWrongSpellVector,
+ const SvxFieldData* pFieldData,
+ const ::com::sun::star::lang::Locale* pLocale,
+ const Color& rOverlineColor,
+ const Color& rTextLineColor,
+ BYTE nBiDiLevel,
+ bool bEndOfLine,
+ bool bEndOfParagraph,
+ bool bEndOfBullet)
+ : mrStartPos(rPos),
+ mrText(rTxt),
+ mnTextStart(nTxtStart),
+ mnTextLen(nTxtLen),
+ mnPara(nPar),
+ mnIndex(nIdx),
+ mrFont(rFnt),
+ mpDXArray(pDXArr),
+ mpWrongSpellVector(pWrongSpellVector),
+ mpFieldData(pFieldData),
+ mpLocale(pLocale),
+ maOverlineColor(rOverlineColor),
+ maTextLineColor(rTextLineColor),
+ mnBiDiLevel(nBiDiLevel),
+ mbEndOfLine(bEndOfLine),
+ mbEndOfParagraph(bEndOfParagraph),
+ mbEndOfBullet(bEndOfBullet)
+ {}
+};
+
+class EDITENG_DLLPUBLIC DrawBulletInfo
+{
+public:
+ const GraphicObject maBulletGraphicObject;
+ Point maBulletPosition;
+ Size maBulletSize;
+
+ DrawBulletInfo(
+ const GraphicObject& rBulletGraphicObject,
+ const Point& rBulletPosition,
+ const Size& rBulletSize)
+ : maBulletGraphicObject(rBulletGraphicObject),
+ maBulletPosition(rBulletPosition),
+ maBulletSize(rBulletSize)
+ {}
+};
+
+struct EDITENG_DLLPUBLIC PaintFirstLineInfo
+{
+ USHORT mnPara;
+ const Point& mrStartPos;
+ long mnBaseLineY;
+ const Point& mrOrigin;
+ short mnOrientation;
+ OutputDevice* mpOutDev;
+
+ PaintFirstLineInfo( USHORT nPara, const Point& rStartPos, long nBaseLineY, const Point& rOrigin, short nOrientation, OutputDevice* pOutDev )
+ : mnPara( nPara ), mrStartPos( rStartPos ), mnBaseLineY( nBaseLineY ), mrOrigin( rOrigin ), mnOrientation( nOrientation ), mpOutDev( pOutDev )
+ {}
+};
+
+class SdrPage;
+
+class EditFieldInfo
+{
+private:
+ Outliner* pOutliner;
+ const SvxFieldItem& rFldItem;
+
+ Color* pTxtColor;
+ Color* pFldColor;
+
+ String aRepresentation;
+
+ USHORT nPara;
+ xub_StrLen nPos;
+ BOOL bSimpleClick;
+
+ EditFieldInfo();
+ EditFieldInfo( const EditFieldInfo& );
+
+ SdrPage* mpSdrPage;
+
+public:
+ EditFieldInfo( Outliner* pOutl, const SvxFieldItem& rFItem, USHORT nPa, xub_StrLen nPo )
+ : rFldItem( rFItem )
+ {
+ pOutliner = pOutl;
+ nPara = nPa; nPos = nPo;
+ pTxtColor = 0; pFldColor = 0; bSimpleClick = FALSE;
+ mpSdrPage = 0;
+ }
+ ~EditFieldInfo()
+ {
+ delete pTxtColor;
+ delete pFldColor;
+ }
+
+ Outliner* GetOutliner() const { return pOutliner; }
+
+ const SvxFieldItem& GetField() const { return rFldItem; }
+
+ Color* GetTxtColor() const { return pTxtColor; }
+ void SetTxtColor( const Color& rColor )
+ { delete pTxtColor; pTxtColor = new Color( rColor ); }
+
+ Color* GetFldColor() const { return pFldColor; }
+ void SetFldColor( const Color& rColor )
+ { delete pFldColor; pFldColor = new Color( rColor ); }
+ void ClearFldColor()
+ { delete pFldColor; pFldColor = 0; }
+
+ USHORT GetPara() const { return nPara; }
+ xub_StrLen GetPos() const { return nPos; }
+
+ BOOL IsSimpleClick() const { return bSimpleClick; }
+ void SetSimpleClick( BOOL bSimple ) { bSimpleClick = bSimple; }
+
+ const String& GetRepresentation() const { return aRepresentation; }
+ String& GetRepresentation() { return aRepresentation; }
+ void SetRepresentation( const String& rStr ) { aRepresentation = rStr; }
+
+ void SetSdrPage( SdrPage* pPage ) { mpSdrPage = pPage; }
+ SdrPage* GetSdrPage() const { return mpSdrPage; }
+};
+
+struct EBulletInfo
+{
+ BOOL bVisible;
+ USHORT nType; // see SvxNumberType
+ String aText;
+ SvxFont aFont;
+ Graphic aGraphic;
+ USHORT nParagraph;
+ Rectangle aBounds;
+
+ EBulletInfo() : bVisible( FALSE ), nType( 0 ), nParagraph( EE_PARA_NOT_FOUND ) {}
+};
+
+#define OUTLINERMODE_DONTKNOW 0x0000
+#define OUTLINERMODE_TEXTOBJECT 0x0001
+#define OUTLINERMODE_TITLEOBJECT 0x0002
+#define OUTLINERMODE_OUTLINEOBJECT 0x0003
+#define OUTLINERMODE_OUTLINEVIEW 0x0004
+
+#define OUTLINERMODE_USERMASK 0x00FF
+
+#define OUTLINERMODE_SUBTITLE (0x0100|OUTLINERMODE_TEXTOBJECT)
+#define OUTLINERMODE_NOTE (0x0200|OUTLINERMODE_TEXTOBJECT)
+
+class EDITENG_DLLPUBLIC Outliner : public SfxBroadcaster
+{
+ friend class OutlinerView;
+ friend class OutlinerEditEng;
+ friend class OutlinerParaObject;
+ friend class OLUndoExpand;
+ friend class OutlinerUndoChangeDepth;
+ friend class OutlinerUndoCheckPara;
+ friend class OutlinerUndoChangeParaFlags;
+
+ OutlinerEditEng* pEditEngine;
+
+ ParagraphList* pParaList;
+ ViewList aViewList;
+
+ Paragraph* pHdlParagraph;
+ ULONG mnFirstSelPage;
+ Link aDrawPortionHdl;
+ Link aDrawBulletHdl;
+ Link aExpandHdl;
+ Link aParaInsertedHdl;
+ Link aParaRemovingHdl;
+ Link aDepthChangedHdl;
+ Link aWidthArrReqHdl;
+ Link aBeginMovingHdl;
+ Link aEndMovingHdl;
+ Link aIndentingPagesHdl;
+ Link aRemovingPagesHdl;
+ Link aFieldClickedHdl;
+ Link aCalcFieldValueHdl;
+ Link maPaintFirstLineHdl;
+ Link maBeginPasteOrDropHdl;
+ Link maEndPasteOrDropHdl;
+
+ sal_Int16 nDepthChangedHdlPrevDepth;
+ USHORT mnDepthChangeHdlPrevFlags;
+ sal_Int16 nMaxDepth;
+ const sal_Int16 nMinDepth;
+ USHORT nFirstPage;
+
+ USHORT nOutlinerMode;
+
+ BOOL bIsExpanding; // Nur in Expand/Collaps-Hdl gueltig, mal umstellen
+ BOOL bFirstParaIsEmpty;
+ BOOL bBlockInsCallback;
+ BOOL bStrippingPortions;
+ BOOL bPasting;
+
+ ULONG nDummy;
+
+#ifdef _OUTLINER_CXX
+
+ DECL_LINK( ParaVisibleStateChangedHdl, Paragraph* );
+ DECL_LINK( BeginMovingParagraphsHdl, MoveParagraphsInfo* );
+ DECL_LINK( EndMovingParagraphsHdl, MoveParagraphsInfo* );
+ DECL_LINK( BeginPasteOrDropHdl, PasteOrDropInfos* );
+ DECL_LINK( EndPasteOrDropHdl, PasteOrDropInfos* );
+ DECL_LINK( EditEngineNotifyHdl, EENotify* );
+ void ImplCheckParagraphs( USHORT nStart, USHORT nEnd );
+ BOOL ImplHasBullet( USHORT nPara ) const;
+ Size ImplGetBulletSize( USHORT nPara );
+ sal_uInt16 ImplGetNumbering( USHORT nPara, const SvxNumberFormat* pParaFmt );
+ void ImplCalcBulletText( USHORT nPara, BOOL bRecalcLevel, BOOL bRecalcChilds );
+ String ImplGetBulletText( USHORT nPara );
+ void ImplCheckNumBulletItem( USHORT nPara );
+ void ImplInitDepth( USHORT nPara, sal_Int16 nDepth, BOOL bCreateUndo, BOOL bUndoAction = FALSE );
+ void ImplSetLevelDependendStyleSheet( USHORT nPara, SfxStyleSheet* pLevelStyle = NULL );
+
+ void ImplBlockInsertionCallbacks( BOOL b );
+
+ void ImplCheckStyleSheet( USHORT nPara, BOOL bReplaceExistingStyle );
+ void ImpRecalcBulletIndent( ULONG nPara );
+
+ const SvxBulletItem& ImpGetBullet( ULONG nPara, USHORT& );
+ void ImpFilterIndents( ULONG nFirstPara, ULONG nLastPara );
+ bool ImpConvertEdtToOut( sal_uInt32 nPara, EditView* pView = 0 );
+
+ void ImpTextPasted( ULONG nStartPara, USHORT nCount );
+ long ImpCalcMaxBulletWidth( USHORT nPara, const SvxBulletItem& rBullet );
+ Font ImpCalcBulletFont( USHORT nPara ) const;
+ Rectangle ImpCalcBulletArea( USHORT nPara, BOOL bAdjust, BOOL bReturnPaperPos );
+ long ImpGetTextIndent( ULONG nPara );
+ BOOL ImpCanIndentSelectedPages( OutlinerView* pCurView );
+ BOOL ImpCanDeleteSelectedPages( OutlinerView* pCurView );
+ BOOL ImpCanDeleteSelectedPages( OutlinerView* pCurView, USHORT nFirstPage, USHORT nPages );
+
+ USHORT ImplGetOutlinerMode() const { return nOutlinerMode & OUTLINERMODE_USERMASK; }
+ void ImplCheckDepth( sal_Int16& rnDepth ) const;
+#endif
+
+protected:
+ void ParagraphInserted( USHORT nParagraph );
+ void ParagraphDeleted( USHORT nParagraph );
+ void ParaAttribsChanged( USHORT nParagraph );
+
+ virtual void StyleSheetChanged( SfxStyleSheet* pStyle );
+
+ void InvalidateBullet( Paragraph* pPara, ULONG nPara );
+ void PaintBullet( USHORT nPara, const Point& rStartPos,
+ const Point& rOrigin, short nOrientation,
+ OutputDevice* pOutDev );
+
+ // used by OutlinerEditEng. Allows Outliner objects to provide
+ // bullet access to the EditEngine.
+ virtual const SvxNumberFormat* GetNumberFormat( USHORT nPara ) const;
+
+public:
+
+ Outliner( SfxItemPool* pPool, USHORT nOutlinerMode );
+ virtual ~Outliner();
+
+ void Init( USHORT nOutlinerMode );
+ USHORT GetMode() const { return nOutlinerMode; }
+
+ void SetVertical( BOOL bVertical );
+ BOOL IsVertical() const;
+
+ void SetFixedCellHeight( BOOL bUseFixedCellHeight );
+ BOOL IsFixedCellHeight() const;
+
+ void SetDefaultHorizontalTextDirection( EEHorizontalTextDirection eHTextDir );
+ EEHorizontalTextDirection GetDefaultHorizontalTextDirection() const;
+
+ USHORT GetScriptType( const ESelection& rSelection ) const;
+ LanguageType GetLanguage( USHORT nPara, USHORT nPos ) const;
+
+ void SetAsianCompressionMode( USHORT nCompressionMode );
+ USHORT GetAsianCompressionMode() const;
+
+ void SetKernAsianPunctuation( BOOL bEnabled );
+ BOOL IsKernAsianPunctuation() const;
+
+ void SetAddExtLeading( BOOL b );
+ BOOL IsAddExtLeading() const;
+
+ ULONG InsertView( OutlinerView* pView, ULONG nIndex=LIST_APPEND);
+ OutlinerView* RemoveView( OutlinerView* pView );
+ OutlinerView* RemoveView( ULONG nIndex );
+ OutlinerView* GetView( ULONG nIndex ) const;
+ ULONG GetViewCount() const;
+
+ Paragraph* Insert( const String& rText, ULONG nAbsPos = LIST_APPEND, sal_Int16 nDepth = 0 );
+ void SetText( const OutlinerParaObject& );
+ void AddText( const OutlinerParaObject& );
+ void SetText( const String& rText, Paragraph* pParagraph );
+ String GetText( Paragraph* pPara, ULONG nParaCount=1 ) const;
+
+ OutlinerParaObject* CreateParaObject( USHORT nStartPara = 0, USHORT nParaCount = 0xFFFF ) const;
+
+ const SfxItemSet& GetEmptyItemSet() const;
+
+ void SetRefMapMode( const MapMode& );
+ MapMode GetRefMapMode() const;
+
+ void SetBackgroundColor( const Color& rColor );
+ Color GetBackgroundColor() const;
+
+ sal_Int16 GetMinDepth() const { return -1; }
+
+ void SetMaxDepth( sal_Int16 nDepth, BOOL bCheckParas = FALSE );
+ sal_Int16 GetMaxDepth() const { return nMaxDepth; }
+
+ void SetUpdateMode( BOOL bUpdate );
+ BOOL GetUpdateMode() const;
+
+ void Clear();
+
+ void RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich );
+
+ ULONG GetParagraphCount() const;
+ Paragraph* GetParagraph( ULONG nAbsPos ) const;
+
+ BOOL HasParent( Paragraph* pParagraph ) const;
+ BOOL HasChilds( Paragraph* pParagraph ) const;
+ ULONG GetChildCount( Paragraph* pParent ) const;
+ BOOL IsExpanded( Paragraph* pPara ) const;
+// Paragraph* GetParagraph( Paragraph* pParent, ULONG nRelPos ) const;
+ Paragraph* GetParent( Paragraph* pParagraph ) const;
+// ULONG GetRelPos( Paragraph* pParent, Paragraph* pPara ) const;
+ ULONG GetAbsPos( Paragraph* pPara );
+
+ sal_Int16 GetDepth( ULONG nPara ) const;
+ void SetDepth( Paragraph* pParagraph, sal_Int16 nNewDepth );
+
+ void SetVisible( Paragraph* pPara, BOOL bVisible );
+ BOOL IsVisible( Paragraph* pPara ) const { return pPara->IsVisible(); }
+
+ void EnableUndo( BOOL bEnable );
+ BOOL IsUndoEnabled() const;
+ void UndoActionStart( USHORT nId );
+ void UndoActionEnd( USHORT nId );
+ void InsertUndo( EditUndo* pUndo );
+ BOOL IsInUndo();
+
+ void ClearModifyFlag();
+ BOOL IsModified() const;
+
+ Paragraph* GetHdlParagraph() const { return pHdlParagraph; }
+ BOOL IsExpanding() const { return bIsExpanding; }
+
+ virtual void ExpandHdl();
+ void SetExpandHdl( const Link& rLink ) { aExpandHdl = rLink; }
+ Link GetExpandHdl() const { return aExpandHdl; }
+
+ virtual void ParagraphInsertedHdl();
+ void SetParaInsertedHdl(const Link& rLink){aParaInsertedHdl=rLink;}
+ Link GetParaInsertedHdl() const { return aParaInsertedHdl; }
+
+ virtual void ParagraphRemovingHdl();
+ void SetParaRemovingHdl(const Link& rLink){aParaRemovingHdl=rLink;}
+ Link GetParaRemovingHdl() const { return aParaRemovingHdl; }
+
+ virtual void DepthChangedHdl();
+ void SetDepthChangedHdl(const Link& rLink){aDepthChangedHdl=rLink;}
+ Link GetDepthChangedHdl() const { return aDepthChangedHdl; }
+ sal_Int16 GetPrevDepth() const { return nDepthChangedHdlPrevDepth; }
+ USHORT GetPrevFlags() const { return mnDepthChangeHdlPrevFlags; }
+
+ virtual long RemovingPagesHdl( OutlinerView* );
+ void SetRemovingPagesHdl(const Link& rLink){aRemovingPagesHdl=rLink;}
+ Link GetRemovingPagesHdl() const { return aRemovingPagesHdl; }
+ virtual long IndentingPagesHdl( OutlinerView* );
+ void SetIndentingPagesHdl(const Link& rLink){aIndentingPagesHdl=rLink;}
+ Link GetIndentingPagesHdl() const { return aIndentingPagesHdl; }
+ // nur gueltig in den beiden oberen Handlern
+ USHORT GetSelPageCount() const { return nDepthChangedHdlPrevDepth; }
+ // nur gueltig in den beiden oberen Handlern
+ ULONG GetFirstSelPage() const { return mnFirstSelPage; }
+
+ void SetCalcFieldValueHdl(const Link& rLink ) { aCalcFieldValueHdl= rLink; }
+ Link GetCalcFieldValueHdl() const { return aCalcFieldValueHdl; }
+
+ void SetFieldClickedHdl(const Link& rLink ) { aFieldClickedHdl= rLink; }
+ Link GetFieldClickedHdl() const { return aFieldClickedHdl; }
+
+ void SetDrawPortionHdl(const Link& rLink){aDrawPortionHdl=rLink;}
+ Link GetDrawPortionHdl() const { return aDrawPortionHdl; }
+
+ void SetDrawBulletHdl(const Link& rLink){aDrawBulletHdl=rLink;}
+ Link GetDrawBulletHdl() const { return aDrawBulletHdl; }
+
+ void SetPaintFirstLineHdl(const Link& rLink) { maPaintFirstLineHdl = rLink; }
+ Link GetPaintFirstLineHdl() const { return maPaintFirstLineHdl; }
+
+ void SetModifyHdl( const Link& rLink );
+ Link GetModifyHdl() const;
+
+ void SetNotifyHdl( const Link& rLink );
+ Link GetNotifyHdl() const;
+
+ void SetStatusEventHdl( const Link& rLink );
+ Link GetStatusEventHdl() const;
+
+ void Draw( OutputDevice* pOutDev, const Rectangle& rOutRect );
+ void Draw( OutputDevice* pOutDev, const Rectangle& rOutRect, const Point& rStartDocPos );
+ void Draw( OutputDevice* pOutDev, const Point& rStartPos, short nOrientation = 0 );
+
+ const Size& GetPaperSize() const;
+ void SetPaperSize( const Size& rSize );
+
+ void SetFirstPageNumber( USHORT n ) { nFirstPage = n; }
+ USHORT GetFirstPageNumber() const { return nFirstPage; }
+
+ void SetPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon );
+ void SetPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::B2DPolyPolygon* pLinePolyPolygon);
+ void ClearPolygon();
+ const PolyPolygon* GetPolygon();
+
+ const Size& GetMinAutoPaperSize() const;
+ void SetMinAutoPaperSize( const Size& rSz );
+
+ const Size& GetMaxAutoPaperSize() const;
+ void SetMaxAutoPaperSize( const Size& rSz );
+
+ void SetDefTab( USHORT nTab );
+ USHORT GetDefTab() const;
+
+ BOOL IsFlatMode() const;
+ void SetFlatMode( BOOL bFlat );
+
+ void EnableAutoColor( BOOL b );
+ BOOL IsAutoColorEnabled() const;
+
+ void ForceAutoColor( BOOL b );
+ BOOL IsForceAutoColor() const;
+
+ EBulletInfo GetBulletInfo( USHORT nPara );
+
+ void SetWordDelimiters( const String& rDelimiters );
+ String GetWordDelimiters() const;
+ String GetWord( USHORT nPara, xub_StrLen nIndex );
+
+ void StripPortions();
+
+ // #101498#
+ virtual void DrawingText(
+ const Point& rStartPos, const String& rText, USHORT nTextStart, USHORT nTextLen,
+ const sal_Int32* pDXArray, const SvxFont& rFont, USHORT nPara, xub_StrLen nIndex, BYTE nRightToLeft,
+ const EEngineData::WrongSpellVector* pWrongSpellVector,
+ const SvxFieldData* pFieldData,
+ bool bEndOfLine,
+ bool bEndOfParagraph,
+ bool bEndOfBullet,
+ const ::com::sun::star::lang::Locale* pLocale,
+ const Color& rOverlineColor,
+ const Color& rTextLineColor);
+
+ Size CalcTextSize();
+
+ Point GetDocPos( Paragraph* pPara );
+
+ void SetStyleSheetPool( SfxStyleSheetPool* pSPool );
+ SfxStyleSheetPool* GetStyleSheetPool();
+
+ BOOL IsInSelectionMode() const;
+
+ void SetStyleSheet( ULONG nPara, SfxStyleSheet* pStyle );
+ SfxStyleSheet* GetStyleSheet( ULONG nPara );
+
+ void SetParaAttribs( USHORT nPara, const SfxItemSet& );
+ SfxItemSet GetParaAttribs( USHORT nPara );
+
+ void Remove( Paragraph* pPara, ULONG nParaCount );
+ BOOL Expand( Paragraph* );
+ BOOL Collapse( Paragraph* );
+
+ void SetParaFlag( Paragraph* pPara, sal_uInt16 nFlag );
+ void RemoveParaFlag( Paragraph* pPara, sal_uInt16 nFlag );
+ bool HasParaFlag( const Paragraph* pPara, sal_uInt16 nFlag ) const;
+
+ // gibt ein Array mit den Bulletbreiten der n Einrueckebenen
+ // zurueck. Letzter Wert muss -1 sein. Wird vom Outliner geloescht.
+ Link GetWidthArrReqHdl() const{ return aWidthArrReqHdl; }
+ void SetWidthArrReqHdl(const Link& rLink){aWidthArrReqHdl=rLink; }
+
+ void SetControlWord( ULONG nWord );
+ ULONG GetControlWord() const;
+
+ Link GetBeginMovingHdl() const { return aBeginMovingHdl; }
+ void SetBeginMovingHdl(const Link& rLink) {aBeginMovingHdl=rLink;}
+ Link GetEndMovingHdl() const {return aEndMovingHdl;}
+ void SetEndMovingHdl( const Link& rLink){aEndMovingHdl=rLink;}
+
+ ULONG GetLineCount( ULONG nParagraph ) const;
+ USHORT GetLineLen( ULONG nParagraph, USHORT nLine ) const;
+ ULONG GetLineHeight( ULONG nParagraph, ULONG nLine = 0 );
+
+ // nFormat muss ein Wert aus dem enum EETextFormat sein (wg.CLOOKS)
+ ULONG Read( SvStream& rInput, const String& rBaseURL, USHORT, SvKeyValueIterator* pHTTPHeaderAttrs = NULL );
+
+ SfxUndoManager& GetUndoManager();
+
+ void QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel );
+ void QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel );
+ void QuickInsertLineBreak( const ESelection& rSel );
+
+ // nur fuer EditEngine-Modus
+ void QuickInsertText( const String& rText, const ESelection& rSel );
+ void QuickDelete( const ESelection& rSel );
+ void QuickRemoveCharAttribs( USHORT nPara, USHORT nWhich = 0 );
+ void QuickFormatDoc( BOOL bFull = FALSE );
+
+ BOOL UpdateFields();
+ void RemoveFields( BOOL bKeepFieldText, TypeId aType = NULL );
+
+ virtual void FieldClicked( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos );
+ virtual void FieldSelected( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos );
+ virtual String CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos, Color*& rTxtColor, Color*& rFldColor );
+
+ void SetSpeller( ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XSpellChecker1 > &xSpeller );
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XSpellChecker1 >
+ GetSpeller();
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XHyphenator >
+ GetHyphenator() const;
+ void SetHyphenator( ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XHyphenator >& xHyph );
+
+ void SetForbiddenCharsTable( vos::ORef<SvxForbiddenCharactersTable> xForbiddenChars );
+ vos::ORef<SvxForbiddenCharactersTable> GetForbiddenCharsTable() const;
+
+ // Depricated
+ void SetDefaultLanguage( LanguageType eLang );
+ LanguageType GetDefaultLanguage() const;
+
+ BOOL HasOnlineSpellErrors() const;
+ void CompleteOnlineSpelling();
+
+ EESpellState HasSpellErrors();
+ BOOL HasText( const SvxSearchItem& rSearchItem );
+ virtual BOOL SpellNextDocument();
+
+ // for text conversion
+ sal_Bool HasConvertibleTextPortion( LanguageType nLang );
+ virtual BOOL ConvertNextDocument();
+
+ void SetEditTextObjectPool( SfxItemPool* pPool );
+ SfxItemPool* GetEditTextObjectPool() const;
+
+ void SetRefDevice( OutputDevice* pRefDev );
+ OutputDevice* GetRefDevice() const;
+
+ USHORT GetFirstLineOffset( ULONG nParagraph );
+
+ ULONG GetTextHeight() const;
+ ULONG GetTextHeight( ULONG nParagraph ) const;
+ Point GetDocPosTopLeft( ULONG nParagraph );
+ Point GetDocPos( const Point& rPaperPos ) const;
+ BOOL IsTextPos( const Point& rPaperPos, USHORT nBorder = 0 );
+ BOOL IsTextPos( const Point& rPaperPos, USHORT nBorder, BOOL* pbBuuletPos );
+
+ void SetGlobalCharStretching( USHORT nX = 100, USHORT nY = 100 );
+ void GetGlobalCharStretching( USHORT& rX, USHORT& rY );
+ void DoStretchChars( USHORT nX, USHORT nY );
+ void EraseVirtualDevice();
+
+ void SetBigTextObjectStart( USHORT nStartAtPortionCount );
+ USHORT GetBigTextObjectStart() const;
+ BOOL ShouldCreateBigTextObject() const;
+
+ const EditEngine& GetEditEngine() const { return *((EditEngine*)pEditEngine); }
+
+ // this is needed for StarOffice Api
+ void SetLevelDependendStyleSheet( USHORT nPara );
+
+ USHORT GetOutlinerMode() const { return nOutlinerMode & OUTLINERMODE_USERMASK; }
+
+ void StartSpelling(EditView& rEditView, sal_Bool bMultipleDoc);
+ //spell and return a sentence
+ bool SpellSentence(EditView& rEditView, ::svx::SpellPortions& rToFill, bool bIsGrammarChecking );
+ // put spell position to start of current sentence
+ void PutSpellingToSentenceStart( EditView& rEditView );
+ //applies a changed sentence
+ void ApplyChangedSentence(EditView& rEditView, const ::svx::SpellPortions& rNewPortions, bool bIsGrammarChecking );
+ void EndSpelling();
+
+ /** sets a link that is called at the beginning of a drag operation at an edit view */
+ void SetBeginDropHdl( const Link& rLink );
+ Link GetBeginDropHdl() const;
+
+ /** sets a link that is called at the end of a drag operation at an edit view */
+ void SetEndDropHdl( const Link& rLink );
+ Link GetEndDropHdl() const;
+
+ /** sets a link that is called before a drop or paste operation. */
+ void SetBeginPasteOrDropHdl( const Link& rLink );
+ Link GetBeginPasteOrDropHdl() const { return maBeginPasteOrDropHdl; }
+
+ /** sets a link that is called after a drop or paste operation. */
+ void SetEndPasteOrDropHdl( const Link& rLink );
+ Link GetEndPasteOrDropHdl() const { return maEndPasteOrDropHdl; }
+
+ virtual sal_Int16 GetNumberingStartValue( sal_uInt16 nPara );
+ virtual void SetNumberingStartValue( sal_uInt16 nPara, sal_Int16 nNumberingStartValue );
+
+ virtual sal_Bool IsParaIsNumberingRestart( sal_uInt16 nPara );
+ virtual void SetParaIsNumberingRestart( sal_uInt16 nPara, sal_Bool bParaIsNumberingRestart );
+};
+
+#endif
+
diff --git a/editeng/inc/editeng/outlobj.hxx b/editeng/inc/editeng/outlobj.hxx
new file mode 100644
index 000000000000..eb67c49e2b0b
--- /dev/null
+++ b/editeng/inc/editeng/outlobj.hxx
@@ -0,0 +1,99 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: outlobj.hxx,v $
+ * $Revision: 1.5.78.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _OUTLOBJ_HXX
+#define _OUTLOBJ_HXX
+
+//////////////////////////////////////////////////////////////////////////////
+
+#include <tools/solar.h>
+#include <tools/string.hxx>
+#include <rsc/rscsfx.hxx>
+#include <editeng/paragraphdata.hxx>
+#include "editeng/editengdllapi.h"
+
+class EditTextObject;
+class ImplOutlinerParaObject;
+
+//////////////////////////////////////////////////////////////////////////////
+
+class EDITENG_DLLPUBLIC OutlinerParaObject
+{
+private:
+ ImplOutlinerParaObject* mpImplOutlinerParaObject;
+
+ void ImplMakeUnique();
+
+public:
+ // constructors/destructor
+ OutlinerParaObject(
+ const EditTextObject& rEditTextObject,
+ const ParagraphDataVector& rParagraphDataVector = ParagraphDataVector(),
+ bool bIsEditDoc = true);
+ OutlinerParaObject(const OutlinerParaObject& rCandidate);
+ ~OutlinerParaObject();
+
+ // assignment operator
+ OutlinerParaObject& operator=(const OutlinerParaObject& rCandidate);
+
+ // compare operator
+ bool operator==(const OutlinerParaObject& rCandidate) const;
+ bool operator!=(const OutlinerParaObject& rCandidate) const { return !operator==(rCandidate); }
+
+ // #i102062#
+ bool isWrongListEqual(const OutlinerParaObject& rCompare) const;
+
+ // outliner mode access
+ sal_uInt16 GetOutlinerMode() const;
+ void SetOutlinerMode(sal_uInt16 nNew);
+
+ // vertical access
+ bool IsVertical() const;
+ void SetVertical(bool bNew);
+
+ // data read access
+ sal_uInt32 Count() const;
+ sal_Int16 GetDepth(sal_uInt16 nPara) const;
+ const EditTextObject& GetTextObject() const;
+ bool IsEditDoc() const;
+ const ParagraphData& GetParagraphData(sal_uInt32 nIndex) const;
+
+ // portion info support
+ void ClearPortionInfo();
+
+ // StyleSheet support
+ bool ChangeStyleSheets(const XubString& rOldName, SfxStyleFamily eOldFamily, const XubString& rNewName, SfxStyleFamily eNewFamily);
+ void ChangeStyleSheetName(SfxStyleFamily eFamily, const XubString& rOldName, const XubString& rNewName);
+ void SetStyleSheets(sal_uInt16 nLevel, const XubString rNewName, const SfxStyleFamily& rNewFamily);
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif
diff --git a/editeng/inc/editeng/paperinf.hxx b/editeng/inc/editeng/paperinf.hxx
new file mode 100644
index 000000000000..6b3aba54f881
--- /dev/null
+++ b/editeng/inc/editeng/paperinf.hxx
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: paperinf.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_PAPERINF_HXX
+#define _SVX_PAPERINF_HXX
+
+// INCLUDE ---------------------------------------------------------------
+
+#include <vcl/print.hxx>
+#include <vcl/mapmod.hxx>
+#include <editeng/svxenum.hxx>
+#include "editeng/editengdllapi.h"
+
+// forward ---------------------------------------------------------------
+
+class Printer;
+class Size;
+class String;
+
+// class SvxPaperInfo -----------------------------------------------------
+
+class EDITENG_DLLPUBLIC SvxPaperInfo
+{
+public:
+ static Size GetDefaultPaperSize( MapUnit eUnit = MAP_TWIP );
+ static Size GetPaperSize( Paper ePaper, MapUnit eUnit = MAP_TWIP );
+ static Size GetPaperSize( const Printer* pPrinter );
+ static Paper GetSvxPaper( const Size &rSize, MapUnit eUnit = MAP_TWIP, bool bSloppy = FALSE );
+ static long GetSloppyPaperDimension( long nSize, MapUnit eUnit = MAP_TWIP );
+ static String GetName( Paper ePaper );
+};
+
+// INLINE -----------------------------------------------------------------
+
+inline Size &Swap(Size &rSize)
+{
+ const long lVal = rSize.Width();
+ rSize.Width() = rSize.Height();
+ rSize.Height() = lVal;
+ return rSize;
+}
+
+inline Size &LandscapeSwap(Size &rSize)
+{
+ if ( rSize.Height() > rSize.Width() )
+ Swap( rSize );
+ return rSize;
+}
+
+#endif
diff --git a/editeng/inc/editeng/paragraphdata.hxx b/editeng/inc/editeng/paragraphdata.hxx
new file mode 100644
index 000000000000..ddd98a15e176
--- /dev/null
+++ b/editeng/inc/editeng/paragraphdata.hxx
@@ -0,0 +1,75 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: outlobj.hxx,v $
+ * $Revision: 1.5.78.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _PARAGRAPH_DATA_HXX
+#define _PARAGRAPH_DATA_HXX
+
+#include <tools/solar.h>
+#include <vector>
+
+//////////////////////////////////////////////////////////////////////////////
+// MT 07/00: Only for internal use, oder some kind like hPara for the few
+// functions where you need it outside ( eg. moving paragraphs... )
+//
+// AW: Unfortunately NOT only local (formally in outliner.hxx), but also
+// used in outlobj.hxx. Moved to own header
+
+class ParagraphData
+{
+ friend class Paragraph;
+ friend class OutlinerParaObject;
+
+protected:
+ sal_Int16 nDepth;
+ sal_Int16 mnNumberingStartValue;
+ sal_Bool mbParaIsNumberingRestart;
+
+public:
+ ParagraphData( const ParagraphData& );
+ ParagraphData();
+
+ ParagraphData& operator=( const ParagraphData& );
+
+ // compare operator
+ bool operator==(const ParagraphData& rCandidate) const;
+
+ // data read access
+ sal_Int16 getDepth() const { return nDepth; }
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+typedef ::std::vector< ParagraphData > ParagraphDataVector;
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif // _PARAGRAPH_DATA_HXX
+
+// eof
diff --git a/editeng/inc/editeng/paravertalignitem.hxx b/editeng/inc/editeng/paravertalignitem.hxx
new file mode 100644
index 000000000000..f70a44e43df8
--- /dev/null
+++ b/editeng/inc/editeng/paravertalignitem.hxx
@@ -0,0 +1,83 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: paravertalignitem.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_PARAVERTALIGNITEM_HXX
+#define _SVX_PARAVERTALIGNITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#include <svl/intitem.hxx>
+#include <editeng/editengdllapi.h>
+
+// class SvxParaVertAlignItem ----------------------------------------------
+
+/* [Description]
+
+ This item defines the character alignment in the lines of a paragraph.
+ Currently the alignment can be none (i.e. baseline), top, center or bottom.
+
+*/
+
+class EDITENG_DLLPUBLIC SvxParaVertAlignItem : public SfxUInt16Item
+{
+public:
+ enum { AUTOMATIC, BASELINE, TOP, CENTER, BOTTOM };
+ TYPEINFO();
+
+ SvxParaVertAlignItem( sal_uInt16 nValue /*= 0*/,
+ const sal_uInt16 nId );
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual SvStream& Store(SvStream & rStrm, USHORT nIVer) const;
+ virtual USHORT GetVersion( USHORT nFileVersion ) const;
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper * = 0 ) const;
+
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal,
+ BYTE nMemberId );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal,
+ BYTE nMemberId ) const;
+
+ inline SvxParaVertAlignItem& operator=( const SvxParaVertAlignItem& rItem )
+ {
+ SetValue( rItem.GetValue() );
+ return *this;
+ }
+
+ virtual int operator==( const SfxPoolItem& ) const;
+
+};
+
+#endif
+
diff --git a/editeng/inc/editeng/pbinitem.hxx b/editeng/inc/editeng/pbinitem.hxx
new file mode 100644
index 000000000000..db69da17f4e3
--- /dev/null
+++ b/editeng/inc/editeng/pbinitem.hxx
@@ -0,0 +1,80 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: pbinitem.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_PBINITEM_HXX
+#define _SVX_PBINITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#include <svl/intitem.hxx>
+#include <editeng/editengdllapi.h>
+
+// define ----------------------------------------------------------------
+
+#define PAPERBIN_PRINTER_SETTINGS ((BYTE)0xFF)
+
+// class SvxPaperBinItem -------------------------------------------------
+
+/* [Beschreibung]
+
+ Dieses Item beschreibt die Auswahl eines Papierschachts des Drucker.
+*/
+
+class EDITENG_DLLPUBLIC SvxPaperBinItem : public SfxByteItem
+{
+public:
+ TYPEINFO();
+
+ inline SvxPaperBinItem( const USHORT nId ,
+ const BYTE nTray = PAPERBIN_PRINTER_SETTINGS );
+ inline SvxPaperBinItem &operator=( const SvxPaperBinItem &rCpy );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create( SvStream &, USHORT ) const;
+ virtual SvStream& Store( SvStream &, USHORT nItemVersion ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const IntlWrapper * = 0 ) const;
+};
+
+inline SvxPaperBinItem::SvxPaperBinItem( const USHORT nId, const BYTE nT )
+ : SfxByteItem( nId, nT )
+{}
+
+inline SvxPaperBinItem &SvxPaperBinItem::operator=(
+ const SvxPaperBinItem &rCpy )
+{
+ SetValue( rCpy.GetValue() );
+ return *this;
+}
+
+#endif
+
diff --git a/editeng/inc/editeng/pgrditem.hxx b/editeng/inc/editeng/pgrditem.hxx
new file mode 100644
index 000000000000..75d655aca554
--- /dev/null
+++ b/editeng/inc/editeng/pgrditem.hxx
@@ -0,0 +1,67 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: pgrditem.hxx,v $
+ * $Revision: 1.6 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_PGRDITEM_HXX
+#define _SVX_PGRDITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#include <svl/eitem.hxx>
+#include "editeng/editengdllapi.h"
+
+// class SvxParaGridItem -------------------------------------------------
+
+
+/*
+ [Beschreibung]
+ Paragraph snap to grid
+*/
+
+class EDITENG_DLLPUBLIC SvxParaGridItem : public SfxBoolItem
+{
+public:
+ TYPEINFO();
+
+ SvxParaGridItem( const BOOL bSnapToGrid /*= TRUE*/,
+ const USHORT nId );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual USHORT GetVersion( USHORT nFileVersion ) const;
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const IntlWrapper * = 0 ) const;
+};
+
+#endif
+
+
diff --git a/editeng/inc/editeng/pmdlitem.hxx b/editeng/inc/editeng/pmdlitem.hxx
new file mode 100644
index 000000000000..39900ef7650e
--- /dev/null
+++ b/editeng/inc/editeng/pmdlitem.hxx
@@ -0,0 +1,89 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: pmdlitem.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_PMDLITEM_HXX
+#define _SVX_PMDLITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#include <svl/stritem.hxx>
+#include <editeng/editengdllapi.h>
+
+// class SvxPageModelItem ------------------------------------------------
+
+/*
+[Beschreibung]
+Dieses Item enthaelt einen Namen einer Seitenvorlage.
+*/
+
+class EDITENG_DLLPUBLIC SvxPageModelItem : public SfxStringItem
+{
+private:
+ BOOL bAuto;
+
+public:
+ TYPEINFO();
+
+ inline SvxPageModelItem( USHORT nWh );
+ inline SvxPageModelItem( const String& rModel, BOOL bA /*= FALSE*/,
+ USHORT nWh );
+ inline SvxPageModelItem& operator=( const SvxPageModelItem& rModel );
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const IntlWrapper * = 0 ) const;
+
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ BOOL IsAuto() const { return bAuto; }
+};
+
+inline SvxPageModelItem::SvxPageModelItem( USHORT nWh )
+ : bAuto( FALSE )
+{
+ SetWhich( nWh );
+}
+
+inline SvxPageModelItem::SvxPageModelItem( const String& rModel, BOOL bA,
+ USHORT nWh ) :
+ SfxStringItem( nWh, rModel ),
+ bAuto( bA )
+{}
+
+inline SvxPageModelItem& SvxPageModelItem::operator=( const SvxPageModelItem& rModel )
+{
+ SetValue( rModel.GetValue() );
+ return *this;
+}
+
+#endif
+
diff --git a/editeng/inc/editeng/postitem.hxx b/editeng/inc/editeng/postitem.hxx
new file mode 100644
index 000000000000..356e6ea44b35
--- /dev/null
+++ b/editeng/inc/editeng/postitem.hxx
@@ -0,0 +1,92 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: postitem.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_POSTITEM_HXX
+#define _SVX_POSTITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#include <vcl/vclenum.hxx>
+#include <svl/eitem.hxx>
+#include <editeng/editengdllapi.h>
+
+class SvXMLUnitConverter;
+namespace rtl
+{
+ class OUString;
+}
+
+// class SvxPostureItem --------------------------------------------------
+
+/*
+ [Beschreibung]
+ Dieses Item beschreibt die Font-Stellung (Italic)
+*/
+
+class EDITENG_DLLPUBLIC SvxPostureItem : public SfxEnumItem
+{
+public:
+ TYPEINFO();
+
+ SvxPostureItem( const FontItalic ePost /*= ITALIC_NONE*/,
+ const USHORT nId );
+
+ // "pure virtual Methoden" vom SfxPoolItem + SwEnumItem
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const IntlWrapper * = 0 ) const;
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
+ virtual String GetValueTextByPos( USHORT nPos ) const;
+ virtual USHORT GetValueCount() const;
+
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+
+ virtual int HasBoolValue() const;
+ virtual BOOL GetBoolValue() const;
+ virtual void SetBoolValue( BOOL bVal );
+
+ inline SvxPostureItem& operator=(const SvxPostureItem& rPost) {
+ SetValue( rPost.GetValue() );
+ return *this;
+ }
+
+ // enum cast
+ FontItalic GetPosture() const
+ { return (FontItalic)GetValue(); }
+ void SetPosture( FontItalic eNew )
+ { SetValue( (USHORT)eNew ); }
+};
+
+#endif // #ifndef _SVX_POSTITEM_HXX
+
diff --git a/editeng/inc/editeng/prntitem.hxx b/editeng/inc/editeng/prntitem.hxx
new file mode 100644
index 000000000000..4f9605547d91
--- /dev/null
+++ b/editeng/inc/editeng/prntitem.hxx
@@ -0,0 +1,82 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: prntitem.hxx,v $
+ * $Revision: 1.8 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_PRNTITEM_HXX
+#define _SVX_PRNTITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#include <svl/eitem.hxx>
+#include "editeng/editengdllapi.h"
+
+
+
+// class SvxPrintItem ----------------------------------------------------
+
+
+/*
+[Beschreibung]
+Dieses Item beschreibt eine logische Variable "Drucken ja oder nein".
+*/
+
+
+class EDITENG_DLLPUBLIC SvxPrintItem : public SfxBoolItem
+{
+public:
+ TYPEINFO();
+
+ SvxPrintItem( const USHORT nId , const BOOL bPrt = TRUE );
+ inline SvxPrintItem &operator=( const SvxPrintItem &rCpy );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const;
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const IntlWrapper * = 0 ) const;
+};
+
+inline SvxPrintItem::SvxPrintItem( const USHORT nId, const BOOL bPrt )
+ : SfxBoolItem( nId, bPrt )
+{}
+
+inline SvxPrintItem &SvxPrintItem::operator=( const SvxPrintItem &rCpy )
+{
+ SetValue( rCpy.GetValue() );
+ return *this;
+}
+
+
+
+
+#endif
+
diff --git a/editeng/inc/editeng/protitem.hxx b/editeng/inc/editeng/protitem.hxx
new file mode 100644
index 000000000000..246a0cb963a9
--- /dev/null
+++ b/editeng/inc/editeng/protitem.hxx
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: protitem.hxx,v $
+ * $Revision: 1.9 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_PROTITEM_HXX
+#define _SVX_PROTITEM_HXX
+
+// include ---------------------------------------------------------------
+
+
+#include <svl/poolitem.hxx>
+#include "editeng/editengdllapi.h"
+
+class SvXMLUnitConverter;
+namespace rtl
+{
+ class OUString;
+}
+
+// class SvxProtectItem --------------------------------------------------
+
+
+/*
+[Beschreibung]
+Dieses Item beschreibt, ob Inhalt, Groesse oder Position geschuetzt werden
+sollen.
+*/
+
+class EDITENG_DLLPUBLIC SvxProtectItem : public SfxPoolItem
+{
+ BOOL bCntnt :1; //Inhalt geschuetzt
+ BOOL bSize :1; //Groesse geschuetzt
+ BOOL bPos :1; //Position geschuetzt
+
+public:
+ TYPEINFO();
+
+ inline SvxProtectItem( const USHORT nId );
+ inline SvxProtectItem &operator=( const SvxProtectItem &rCpy );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const IntlWrapper * = 0 ) const;
+
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const;
+
+ BOOL IsCntntProtected() const { return bCntnt; }
+ BOOL IsSizeProtected() const { return bSize; }
+ BOOL IsPosProtected() const { return bPos; }
+ void SetCntntProtect( BOOL bNew ) { bCntnt = bNew; }
+ void SetSizeProtect ( BOOL bNew ) { bSize = bNew; }
+ void SetPosProtect ( BOOL bNew ) { bPos = bNew; }
+
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+};
+
+inline SvxProtectItem::SvxProtectItem( const USHORT nId )
+ : SfxPoolItem( nId )
+{
+ bCntnt = bSize = bPos = FALSE;
+}
+
+inline SvxProtectItem &SvxProtectItem::operator=( const SvxProtectItem &rCpy )
+{
+ bCntnt = rCpy.IsCntntProtected();
+ bSize = rCpy.IsSizeProtected();
+ bPos = rCpy.IsPosProtected();
+ return *this;
+}
+
+
+
+
+#endif
+
diff --git a/editeng/inc/editeng/prszitem.hxx b/editeng/inc/editeng/prszitem.hxx
new file mode 100644
index 000000000000..bcf12c876c4c
--- /dev/null
+++ b/editeng/inc/editeng/prszitem.hxx
@@ -0,0 +1,71 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: prszitem.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_PRSZITEM_HXX
+#define _SVX_PRSZITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#include <svl/intitem.hxx>
+#include <editeng/editengdllapi.h>
+
+// class SvxPropSizeItem -------------------------------------------------
+
+/* [Beschreibung]
+
+ Dieses Item beschreibt die relative Schriftgroesse.
+*/
+
+class EDITENG_DLLPUBLIC SvxPropSizeItem : public SfxUInt16Item
+{
+public:
+ TYPEINFO();
+
+ SvxPropSizeItem( const USHORT nPercent /*= 100*/,
+ const USHORT nID );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const IntlWrapper * = 0 ) const;
+
+ inline SvxPropSizeItem& operator=(const SvxPropSizeItem& rPropSize)
+ {
+ SetValue( rPropSize.GetValue() );
+ return *this;
+ }
+};
+
+#endif
+
diff --git a/editeng/inc/editeng/scriptspaceitem.hxx b/editeng/inc/editeng/scriptspaceitem.hxx
new file mode 100644
index 000000000000..5f46e26d2fdd
--- /dev/null
+++ b/editeng/inc/editeng/scriptspaceitem.hxx
@@ -0,0 +1,73 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: scriptspaceitem.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_SRIPTSPACEITEM_HXX
+#define _SVX_SRIPTSPACEITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#include <svl/eitem.hxx>
+#include <editeng/editengdllapi.h>
+
+// class SvxScriptSpaceItem ----------------------------------------------
+
+/* [Description]
+
+ This item describe the scriptype of the selected text and is only
+ used for the user interface.
+*/
+
+class EDITENG_DLLPUBLIC SvxScriptSpaceItem : public SfxBoolItem
+{
+public:
+ TYPEINFO();
+
+ SvxScriptSpaceItem( sal_Bool bOn /*= sal_False*/,
+ const sal_uInt16 nId );
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual USHORT GetVersion( USHORT nFileVersion ) const;
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper * = 0 ) const;
+
+ inline SvxScriptSpaceItem& operator=(const SvxScriptSpaceItem& rItem )
+ {
+ SetValue( rItem.GetValue() );
+ return *this;
+ }
+
+};
+
+#endif
+
diff --git a/editeng/inc/editeng/scripttypeitem.hxx b/editeng/inc/editeng/scripttypeitem.hxx
new file mode 100644
index 000000000000..a4c0b51c6a72
--- /dev/null
+++ b/editeng/inc/editeng/scripttypeitem.hxx
@@ -0,0 +1,94 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: scripttypeitem.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_SCRIPTTYPEITEM_HXX
+#define _SVX_SCRIPTTYPEITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#include <svl/intitem.hxx>
+#include <svl/languageoptions.hxx>
+#include <editeng/editengdllapi.h>
+
+// class SvxScriptTypeItem ----------------------------------------------
+
+/* [Description]
+
+ This item describe the scriptype of the selected text and is only
+ used for the user interface.
+*/
+
+EDITENG_DLLPUBLIC USHORT GetI18NScriptTypeOfLanguage( USHORT nLang );
+USHORT GetItemScriptType( short nI18NType );
+short GetI18NScriptType( USHORT nItemType );
+
+class EDITENG_DLLPUBLIC SvxScriptTypeItem : public SfxUInt16Item
+{
+public:
+ TYPEINFO();
+
+ SvxScriptTypeItem( sal_uInt16 nType = SCRIPTTYPE_LATIN );
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+
+};
+
+class EDITENG_DLLPUBLIC SvxScriptSetItem : public SfxSetItem
+{
+public:
+ TYPEINFO();
+
+ SvxScriptSetItem( USHORT nSlotId, SfxItemPool& rPool );
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create( SvStream &, USHORT nVersion ) const;
+
+ static const SfxPoolItem* GetItemOfScriptSet( const SfxItemSet& rSet,
+ USHORT nWhich );
+ inline const SfxPoolItem* GetItemOfScriptSet( USHORT _nWhich ) const
+ { return SvxScriptSetItem::GetItemOfScriptSet( GetItemSet(), _nWhich ); }
+
+ static const SfxPoolItem* GetItemOfScript( USHORT nSlotId, const SfxItemSet& rSet, USHORT nScript );
+
+ const SfxPoolItem* GetItemOfScript( USHORT nScript ) const;
+
+ void PutItemForScriptType( USHORT nScriptType, const SfxPoolItem& rItem );
+
+ static void GetWhichIds( USHORT nSlotId, const SfxItemSet& rSet, USHORT& rLatin, USHORT& rAsian, USHORT& rComplex);
+
+ void GetWhichIds( USHORT& rLatin, USHORT& rAsian, USHORT& rComplex) const;
+
+ static void GetSlotIds( USHORT nSlotId, USHORT& rLatin, USHORT& rAsian,
+ USHORT& rComplex );
+ inline void GetSlotIds( USHORT& rLatin, USHORT& rAsian,
+ USHORT& rComplex ) const
+ { GetSlotIds( Which(), rLatin, rAsian, rComplex ); }
+};
+
+#endif
+
diff --git a/editeng/inc/editeng/shaditem.hxx b/editeng/inc/editeng/shaditem.hxx
new file mode 100644
index 000000000000..dd79068a67b8
--- /dev/null
+++ b/editeng/inc/editeng/shaditem.hxx
@@ -0,0 +1,114 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: shaditem.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_SHADITEM_HXX
+#define _SVX_SHADITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#include <tools/color.hxx>
+#include <svl/eitem.hxx>
+#include <editeng/svxenum.hxx>
+#include <editeng/editengdllapi.h>
+
+namespace rtl
+{
+ class OUString;
+}
+
+// class SvxShadowItem ---------------------------------------------------
+
+/* [Beschreibung]
+
+ Dieses Item beschreibt ein Schattenattribut (Farbe, Breite, Lage).
+*/
+
+#define SHADOW_TOP ((USHORT)0)
+#define SHADOW_BOTTOM ((USHORT)1)
+#define SHADOW_LEFT ((USHORT)2)
+#define SHADOW_RIGHT ((USHORT)3)
+
+class EDITENG_DLLPUBLIC SvxShadowItem : public SfxEnumItemInterface
+{
+ Color aShadowColor;
+ USHORT nWidth;
+ SvxShadowLocation eLocation;
+public:
+ TYPEINFO();
+
+ SvxShadowItem( const USHORT nId ,
+ const Color *pColor = 0, const USHORT nWidth = 100 /*5pt*/,
+ const SvxShadowLocation eLoc = SVX_SHADOW_NONE );
+
+ inline SvxShadowItem& operator=( const SvxShadowItem& rFmtShadow );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric